ページ余白の外側のフッター

ページ余白の外側のフッター

フッターがページ余白の外側にあります。ページの形状に関係なく、フッターは内側にある必要があります。

\documentclass[11pt,a4paper]{report}
\usepackage[left=1cm,right=1cm,top=1cm,bottom=1cm]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{}
\rhead{}
\lfoot{My Name}
\cfoot{\thepage}
\rfoot{University}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0.4pt}
\begin{document}
test
\end{document}

答え1

を設定するとbottom=1cmgeometryテキスト ブロックの最後の行がページ境界から 1cm 離れるように設定され、当然、フッターが下に押し下げられます。

オプションincludefootgeometryフッターベースラインはページ境界から 1cm 離す必要があります。

\documentclass[11pt,a4paper]{report}
\usepackage[
  left=1cm,
  right=1cm,
  top=1cm,
  bottom=1cm,
  includefoot,
  heightrounded,
]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{} % clear all fields
\fancyfoot[L]{My Name}
\fancyfoot[C}{\thepage}
\fancyfoot[R]{University}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0.4pt}
\begin{document}
test
\end{document}

heightroundedまた、ページ上の行数が整数になるように(テキスト ブロックの高さを少し変更する可能性もあります)を追加しました。また、の「古い」構文をfancyhdr「最新の」構文に変更しました。

以下の画像を作成するために、さまざまな部分をわかりやすく表示するために、showframeのオプションを追加しましたgeometry。追加の線はドキュメントには表示されません。

ここに画像の説明を入力してください

関連情報