
~ 안에LaTeX 및 친구들의 페이지 헤더패키지 fancyhdr
는 LaTeX and Friends 책의 페이지 헤더를 만드는 데 사용됩니다. memoir
클래스를 사용하고 장이 시작되는 첫 페이지에서도 어떻게 할 수 있나요 ?
MWE:
\documentclass[a4,twoside]{memoir}
\usepackage{lipsum}
\nouppercaseheads
\makepagestyle{mystyle}
\setlength{\headwidth}{\dimexpr\marginparsep+\marginparwidth\relax}
\makerunningwidth{mystyle}{\headwidth}
\makeevenhead{mystyle}{\thepage\quad\smash{\rule[-0.2ex]{1pt}{4cm}}\quad\textsc{\chaptername~\thechapter}}{}{}
\makeoddhead{mystyle}{}{}{\textsc{\leftmark}\quad\smash{\rule[-0.2ex]{1pt}{4cm}}\quad\thepage}
\makeatletter
\makepsmarks{mystyle}{%
\createmark{chapter}{left}{nonumber}{\@chapapp\ }{.\ }}
\makeatother
\makepagestyle{plain}
\makerunningwidth{plain}{\dimexpr\marginparsep+\marginparwidth\relax}
\makeevenfoot{plain}{\textsc{\leftmark}\quad\smash{\rule[-0.2ex]{1pt}{4cm}}\quad\thepage}{}{}
\pagestyle{mystyle}
\begin{document}
\chapter{Test Chapter}
\lipsum[1]
\section{Test Section}
\lipsum[1-20]
\end{document}
답변1
클래스 는 장의 첫 번째 페이지에 memoir
페이지 스타일을 사용합니다 . chapter
그래서 당신은 할 수 있습니다
...
\pagestyle{mystyle}
\aliaspagestyle{chapter}{mystyle}
\begin{document}
...
plain
페이지 스타일을 와 동일하게 재정의한 이유가 무엇인지 잘 모르겠지만 , 여전히 필요한 경우 mystyle
로 바꾸는 것이 더 좋을 것입니다 .\aliaspagestyle{plain}{mystyle}