
tocloft 패키지를 사용하면 라텍스 문서 시작 부분에 "List of Z" 제목 아래에 텍스트를 추가할 수 있습니다.
\renewcommand{\cftafterZtitle}{\par\noindent \textnormal{Z} \hfill \textnormal{PAGE}}
다음을 사용하여 "List of Z"라는 제목을 중앙에 배치할 수 있습니다.
\renewcommand{\cftZtitlefont}{\hfill\bfseries}
\renewcommand{\cftafterZtitle}{\hfill}
그러나 두 명령을 결합하려고 하면 텍스트가 중앙이 아닌 오른쪽 여백으로 이동합니다.
\renewcommand{\cftloftitlefont}{\hfill\bfseries}
\renewcommand{\cftafterloftitle}{\hfill\par\noindent \textnormal{Z} \hfill \textnormal{PAGE}}
"List of Z" 제목을 중앙에 배치하고 제목 아래에 텍스트를 표시하는 방법을 아는 사람이 있습니까?
답변1
\hbox
두 번째 뒤에 공백을 추가할 수 있습니다.\hfill
(참조egreg님의 답변에게\null은 무엇이며 언제 사용해야 합니까?):
\documentclass{article}
\usepackage{tocloft}
\renewcommand{\cftloftitlefont}{\hfill\bfseries}
\renewcommand{\cftafterloftitle}{\hfill\null\par\noindent\textnormal{Z}\hfill \textnormal{PAGE}}
\begin{document}
\listoffigures
\noindent X\hrulefill Y% for coparison only
\end{document}
또 다른 옵션은 대신 사용하는 것입니다 \hfil
.
\renewcommand{\cftloftitlefont}{\hfil\bfseries}
\renewcommand{\cftafterloftitle}{\hfil\par\textnormal{Z}\hfill \textnormal{PAGE}}