▼ fancyhdrでヘッダの書式指定
【未分類】
初期設定のままだと,章や節のタイトル中にある半角アルファベットの小文字が大文字に変換されてしまう.
これは不便に感じることがあるので,設定の変更の仕方を調べた.
leftmarkの大文字化を防ぐというページに解決法が載っていたので,これを修正して自分好みの書式に変更した.リンク先のページの方,ありがとうございました.
下記をfancyhdrの設定部分(\pagestylefancyの記述箇所)よりも前に置けば書式変更が適用される.
これは不便に感じることがあるので,設定の変更の仕方を調べた.
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
▼ コメント(0件)
- TB-URL http://ac206223.ppp.asahi-net.or.jp/adiary/memo/adiary.cgi/hirosugu/0101/tb/