
私はfancyhdr
レポート クラスで使用しています。課題の名前を変数に保存します。次に、最初のページを除く各ページの右上にそのコンテンツを配置します。右上のほかに、左上と中央のヘッダーもあります。課題のテキストが長い場合は、画像でわかるように、中央のヘッダーと重なります。
% Header and footer style.
\RequirePackage{fancyhdr}
\fancypagestyle{firstpage}{%
\fancyhf{}
\fancyfoot[CE,CO]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0.7pt}
}
\fancypagestyle{followingpage}{%
\fancyhf{}
\fancyhead[LE,LO]{\@student}
\fancyhead[CE,CO]{\@course}
\fancyhead[RE,RO]{\@assignment}
\fancyfoot[CE,CO]{\thepage}
\renewcommand{\headrulewidth}{0.7pt}
\renewcommand{\footrulewidth}{0.7pt}
}
変数の内容を分割し@assignment
て 2 行以上に表示し、重複を防ぐ方法があるかどうか知りたいです。