헤더가 너무 오래 실행됨

헤더가 너무 오래 실행됨

실행 중인 헤더가 가끔 너무 길어서 \sectionmark를 사용해 보았지만 작동하지 않습니다...

MWE:

\documentclass[twocolumn,a4paper,10pt]{book}
\usepackage{fancyhdr}
\pagestyle{fancy}

\usepackage{lipsum}

\begin{document}

\tableofcontents


\section{Introduction}

\lipsum{5}

\section{Here's long text that is two long for the page and I'd like to substitute it but can't figure out how}
\sectionmark[long text]

\lipsum{5}

\end{document}

답변1

섹션형 명령에는 이러한 경우에 대한 선택적 인수가 있습니다.

\documentclass[twocolumn,a4paper,10pt]{book}
\usepackage{fancyhdr}
\pagestyle{fancy}

\usepackage{lipsum}

\begin{document}

\tableofcontents


\section{Introduction}

\lipsum{5}

%The next line
\section[This is the shortened version]{Here's long text that is two long for the page and I'd like to substitute it but can't figure out how}
%\sectionmark[long text]

\lipsum{5}

\end{document}

관련 정보