平均能量损失

平均能量损失

我的页眉徽标约为 3.5 x 6 厘米。页脚徽标约为 3 x 20 厘米。

页眉显示在正确位置,但页脚根本没有显示。我应该如何更改几何图形才能显示页脚?

\documentclass[12pt]{article}
\usepackage{geometry}       % customize page layout
\usepackage{graphicx}       % support for graphics
\usepackage{fancyhdr}       % headers and footers

\geometry{
    a4paper,
    left=20mm,
    top=20mm,
    headheight=110pt,
    voffset=100pt,
    footskip=50pt
}

\pagenumbering{gobble}                          % sets page numbering off
\pagestyle{fancy}                               % set the pagestyle to fancy to include headers and footers
\fancyhf{}                                      % clear the header and footer
\renewcommand{\headrulewidth}{0pt}              % no horizontale ruler under header
\fancyhead[L]{
    \includegraphics[width=6cm]{logo.png}
}
\fancyfoot[L]{
    \includegraphics[width=20cm]{footer.jpg}
}

\begin{document}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

\end{document}

答案1

您的几何设置有点错误。考虑到页眉和页脚的内容,边距需要很大。这voffset给您带来了麻烦。

尝试

\geometry{
  a4paper,
  left=20mm,
  right=20mm,
  headheight=4cm,
  top=5.5cm,
  bottom=4.5cm,
  footskip=4cm
}

可以将页眉放置在页面中心的零宽度框中,以使页眉重叠。

\fancyhead[C]{%
  \makebox[0pt][c]{%
    \includegraphics[height=3.5cm,width=6cm]{example-image.jpg}\hspace{14cm}}}
\fancyfoot[C]{%
  \makebox[0pt][c]{%
    \includegraphics[height=3cm,width=20cm]{example-image.jpg}}}

平均能量损失

\documentclass[12pt]{article}
\usepackage{showframe}      % show frame to see what is going on
\usepackage{geometry}       % customize page layout
\usepackage{graphicx}       % support for graphics
\usepackage{fancyhdr}       % headers and footers

\geometry{
  a4paper,
  left=20mm,
  right=20mm,
  headheight=4cm,
  top=5.5cm,
  bottom=4.5cm,
  footskip=4cm
}

\pagenumbering{gobble}                          % sets page numbering off
\pagestyle{fancy}                               % set the pagestyle to fancy to include headers and footers
\fancyhf{}                                      % clear the header and footer
\renewcommand{\headrulewidth}{0pt}              % no horizontale ruler under header
\fancyhead[C]{%
  \makebox[0pt][c]{%
    \includegraphics[height=3.5cm,width=6cm]{example-image.jpg}\hspace{14cm}}}
\fancyfoot[C]{%
  \makebox[0pt][c]{%
    \includegraphics[height=3cm,width=20cm]{example-image.jpg}}}

\begin{document}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

\end{document}

输出

相关内容