
私は、acmart
カンファレンス論文の提出にドキュメントクラスを使用しています。現在、次の出力をレンダリングする簡単な例 (以下のコード) を示しました。
質問:
- 「定義」環境を変更して、「定義」というテキストが「定理」というテキストと同じように見えるようにするにはどうすればよいでしょうか (斜体を削除すると、フォントも異なるように見えます)?
- すでに存在するもの (定理、補題、系など) と同じものを表示する新しい「注釈」環境を追加するにはどうすればよいですか?
- これらの環境の最後に同じサイズの「qed square」を追加するにはどうすればよいでしょうか (「証明」がない場合でも)?
コード:
\documentclass[acmtog,anonymous,review]{acmart}
\usepackage{graphicx}
\AtEndPreamble{%
\theoremstyle{acmtheorem}
\newtheorem{remark}[theorem]{Remark}}
\begin{document}
\section{}
\begin{theorem}
A theorem.
\begin{proof}
\end{proof}
\end{theorem}
\begin{definition}
A definition.
\begin{flushright}
$\square$
\end{flushright}
\end{definition}
\begin{remark}
A remark.
\begin{flushright}
$\square$
\end{flushright}
\end{remark}
\end{document}
答え1
カンファレンスに提出する場合は、そのカンファレンスの標準を変更しようとしないでください。とにかく、その方法は次のとおりです。
\documentclass[acmtog,anonymous,review]{acmart}
\AtEndPreamble{%
\theoremstyle{acmplain}%
% note to copy editors: remove the following
% two lines if standard ACM style is preferred
\let\definition\relax\let\enddefinition\relax
\newtheorem{definition}[theorem]{Definition}%
% end note to copy editors
\newtheorem{remark}[theorem]{Remark}%
\AtBeginEnvironment{definition}{\pushQED{\qed}}%
\AtEndEnvironment{definition}{\popQED}%
\AtBeginEnvironment{remark}{\pushQED{\qed}}%
\AtEndEnvironment{remark}{\popQED}%
}
\begin{document}
\section{Test}
\begin{theorem}
A theorem.
\end{theorem}
\begin{proof}
And its proof.
\end{proof}
\begin{definition}
A definition.
\end{definition}
\begin{remark}
A remark.
\end{remark}
\end{document}
ノート。
- 標準的な定理のスタイルは です
acmplain
。 - 証明は定理に属しません。
答え2
あなたの質問は、定理、定義、注釈を全て同じスタイルを持っている場合、順番に質問に回答しません。
- すでに存在するもの (定理、補題、系など) と同じものを表示する新しい「注釈」環境を追加するにはどうすればよいですか?
編集: コメントから判断すると、3 つの環境すべてでヘッダーに小文字の大文字を使用し、本文に斜体でないフォントを使用することを希望されているようです。
acmart
まず、の事前定義された定理スタイルのどちらもニーズに合わないため、新しい定理スタイルを定義する必要があります。acmart
クラスドキュメント定理スタイルの定義のソース コードacmplain
(110 ページにあると思います) が提供されているため、その定義をコピーして独自のコードに貼り付け、必要に応じて変更できます。その後、 を使用して\theoremstyle{your-style-name}
カスタム定理環境のスタイルを設定できます。
- 「定義」環境を変更して、「定義」というテキストが「定理」というテキストと同じように見えるようにするにはどうすればよいでしょうか (斜体を削除すると、フォントも異なるように見えます)?
定理環境の定義を変更する簡単な方法はないので、definition
(およびtheorem
) のスタイルを自分で定義する必要があります。 2 つのオプションがあります。
- 既存の環境と衝突しないように、異なる名前で独自の定義および定理環境を定義します。このオプションは最も簡単で、既存の定義を上書きしないため (提出時に問題が発生する可能性がある場合)、お勧めします。
- クラスオプションを使用して既存の環境定義を抑制します
acmthm=false
。その後、独自の環境定義を定義することができますdefinition
。theorem
。これにより、既存の環境と衝突することなく定義されるすべての定理環境acmart
theorem
、、、などproposition
が含まれます。したがって、このオプションを選択した場合は、必要に応じて他のすべての環境を自分で定義する必要があります。definition
example
- これらの環境の最後に同じサイズの「qed square」を追加するにはどうすればよいでしょうか (「証明」がない場合でも)?
私はthmtools
。これにより、QEDシンボルの設定が非常に簡単になります。このソリューションは、ポスト@barbara-beeton がコメントでリンクしていますが、3番目です。thmtools
パッケージドキュメント詳細については。
新しく改良された MWE (異なる名前のカスタム環境付き):
\documentclass[acmtog, anonymous, review]{acmart}
\usepackage{thmtools}
\makeatletter
\AtEndPreamble{
% Modified from definition of acmplain
% acmart documentation, page 110
% https://mirror.las.iastate.edu/tex-archive/macros/latex/contrib/acmart/acmart.pdf
\newtheoremstyle{mystyle}%
{.5\baselineskip\@plus.2\baselineskip
\@minus.2\baselineskip}% space above
{.5\baselineskip\@plus.2\baselineskip
\@minus.2\baselineskip}% space below
{\normalfont}% body font
{\@acmplainindent}% indent amount
{\scshape}% head font
{.}% punctuation after head
{.5em}% spacing after head
{\thmname{#1}\thmnumber{ #2}\thmnote{ {\@acmplainnotefont(#3)}}}% head spec
\theoremstyle{mystyle}
\declaretheorem[name=Theorem, parent=section]{thm}
\declaretheorem[name=Definition, qed=$\square$, sibling=thm]{defn}
\declaretheorem[name=Remark, qed=$\square$, sibling=thm]{remark}
}
\makeatother
\begin{document}
\section{}
\begin{thm}
A theorem.
\begin{proof}
\end{proof}
\end{thm}
\begin{defn}
A definition.
\end{defn}
\begin{remark}
A remark.
\end{remark}
\end{document}