fancyhdrでヘッダの書式指定
2012/02/28
これは不便に感じることがあるので,設定の変更の仕方を調べた.
leftmarkの大文字化を防ぐというページに解決法が載っていたので,これを修正して自分好みの書式に変更した.リンク先のページの方,ありがとうございました.
下記をfancyhdrの設定部分(\pagestylefancyの記述箇所)よりも前に置けば書式変更が適用される.
\makeatletter \def\ps@fancy{% %\def\sectionmark##1{\markboth{\ifnum \c@secnumdepth>\z@ \thesection\hskip 1em\relax \fi ##1}{}}% \def\chaptermark##1{\markboth{\ifnum \c@secnumdepth>\z@ \thechapter\hskip 0.5em\relax \fi ##1}{}}% %\def\subsectionmark##1{\markright {\ifnum \c@secnumdepth >\@ne \thesubsection\hskip 1em\relax \fi ##1}}% \def\sectionmark##1{\markright {\ifnum \c@secnumdepth >\@ne \thesection\hskip 0.5em\relax \fi ##1}}% \ps@@fancy \gdef\ps@fancy{\@fancyplainfalse\ps@@fancy}% \ifdim\headwidth<0sp \global\advance\headwidth123456789sp\global\advance\headwidth\textwidth \fi } \makeatother