
任意の時点で、フロントページのタイトルを繰り返すドキュメントを作成しようとしています。
\documentclass[a4paper,anonymous]{lipics-v2021}
\title{My Paper}
\titlerunning{paper}
\author{Me}{}{}{}{}
\begin{document}
% Generate title
\maketitle
% Any amount of text/sections
lorem ipsum...
% I now want to show exactly the same title again
\maketitle
\end{document}
ただし、このコードは、上記のタイトルと著者のパラメータの完全にフォーマットされていないテキストを出力します。
いくつかのリンク [1、2] はtitling
パッケージの使用を提案していますが、次の 2 つの問題があります。
- 私のプロジェクト(私の場合はlipics)のファイル
\maketitle
で定義されているように使用できないようです.cls
- パッケージでは、
titling
のすべてのパラメータを繰り返す必要があります\maketitle
(例\title{..}
:\author{}
、 など)。
答え1
あなたのクラスでも、標準クラスでも、 は\maketitle
自身を無効にし、コマンドとによって定義されたメタデータを含む および マクロを\@title
空にします ([github の lipic-v2021 クラス][1] の 304 行目以降を参照)。したがって、(プリアンブルで) 304 行目から 314 行目を除いて、同じコード (287 行目から始まる) でコマンドを実行できます。\@author
\title{...}
\author{...}
\renewcomnand
\maketitle
標準的な警告: 個人使用であれば可能です。ただし、文書が対応するジャーナル/会議/編集者 (ここでは LIPIcs シリーズ会議) に提出されることを意図している場合は、このような変更を決して行わないでください。[1]:https://github.com/prosysscience/lipics/blob/master/lipics-v2021.cls
答え2
を見てクラス定義(287行目から315行目)
\renewcommand\maketitle{\par
\begingroup
\thispagestyle{plain}
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
\if@twocolumn
\ifnum \col@number=\@ne
\@maketitle
\else
\twocolumn[\@maketitle]%
\fi
\else
\newpage
\global\@topnum\z@ % Prevents figures from going at top of page.
\@maketitle
\fi
\thispagestyle{plain}\@thanks
\endgroup
\global\let\thanks\relax
\global\let\maketitle\relax
\global\let\@maketitle\relax
\global\let\@thanks\@empty
\global\let\@author\@empty
\global\let\@date\@empty
\global\let\@title\@empty
\global\let\title\relax
\global\let\author\relax
\global\let\date\relax
\global\let\and\relax
}
2 番目は、すべてとが\maketitle
原因で失敗します。\global\let...\relax
\global\let...\@empty
\makeatletter
それを(内部で、マクロ名内の\makeatother
文字を処理するために)再定義してみることができます。@
\makeatletter
\renewcommand\maketitle{\par
\begingroup
\thispagestyle{plain}
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
\if@twocolumn
\ifnum \col@number=\@ne
\@maketitle
\else
\twocolumn[\@maketitle]%
\fi
\else
\newpage
\global\@topnum\z@ % Prevents figures from going at top of page.
\@maketitle
\fi
\thispagestyle{plain}\@thanks
\endgroup
}
\makeatother
フッターを含む完全なタイトル ページが再度印刷されます。タイトル自体だけが必要な場合は、\@maketitle
定義を確認して必要な部分をコピーする必要があります。
例:
\documentclass[a4paper,anonymous]{lipics-v2021}
\makeatletter
\renewcommand\maketitle{\par
\begingroup
\thispagestyle{plain}
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
\if@twocolumn
\ifnum \col@number=\@ne
\@maketitle
\else
\twocolumn[\@maketitle]%
\fi
\else
\newpage
\global\@topnum\z@ % Prevents figures from going at top of page.
\@maketitle
\fi
\thispagestyle{plain}\@thanks
\endgroup
}
\makeatother
\title{My Paper}
\titlerunning{paper}
\author{Me}{}{}{}{}
\begin{document}
% Generate title
\maketitle
% Any amount of text/sections
lorem ipsum...
% I now want to show exactly the same title again
\maketitle
\end{document}