
임의의 지점에서 첫 페이지의 제목을 반복하는 문서를 만들려고 합니다.
\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
여기에는 두 가지 문제가 있지만 패키지 사용을 제안합니다.
- 내 프로젝트의 파일
\maketitle
에 정의된 대로 사용하도록 할 수 없는 것 같습니다 (내 경우에는 lipics)..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
}
두 번째 \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}