gpt4 book ai didi

image - Latex Image 页眉和页脚

转载 作者:行者123 更新时间:2023-12-04 04:10:43 28 4
gpt4 key购买 nike

我正在尝试在 LaTex 中制作一个机构页面,该页面必须有我的机构提供的页眉和页脚,并且不能更改,所以我正在尝试用我的下一个代码强制他们从这里借来的 https://tex.stackexchange.com/questions/297240/adding-an-image-to-a-header-in-latex

\documentclass[12pt,letterpaper]{article}


\usepackage{fancyhdr}
\usepackage[left=4cm,top=4cm,right=3cm,bottom=3cm,headheight=3.8cm]{geometry}

\pagestyle{fancy}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{tikzpagenodes}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}


\fancyfoot[R]{\begin{tikzpicture}[remember picture,overlay]
\draw let \p1=($(current page footer area.north)-(current page.south)$),
\n1={veclen(\x1,\y1)} in
node [inner sep=0,outer sep=0,below right]
at (current page.south west){\includegraphics[width=\paperwidth,height=\n1]{exampleH}};
\end{tikzpicture}}


\fancyhead[L]{\begin{tikzpicture}[remember picture,overlay]
\draw let \p1=($(current page.north)-(current page header area.south)$),
\n1={veclen(\x1,\y1)} in
node [inner sep=0,outer sep=0,below right]
at (current page.north west){\includegraphics[width=\paperwidth,height=\n1]{ExampleF}};
\end{tikzpicture}}





\begin{document}
\section{First section}
Type your document as usual!
\newpage
\section{Second section}
Type your document as usual!
\end{document}

最佳答案

问题是您将页脚图像放置在页面底部边框下方。如果将节点放在下边框上方,您会看到它:

\documentclass[12pt,letterpaper]{article}


\usepackage{fancyhdr}
\usepackage[left=4cm,top=4cm,right=3cm,bottom=3cm,headheight=3.8cm]{geometry}

\pagestyle{fancy}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{tikzpagenodes}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}



\fancyfoot[R]{\begin{tikzpicture}[remember picture,overlay]
\draw let \p1=($(current page footer area.north)-(current page.south)$),
\n1={veclen(\x1,\y1)} in
node [inner sep=0,outer sep=0,above right]
at (current page.south west){\includegraphics[width=\paperwidth,height=\n1]{example-image-duck}};
\end{tikzpicture}}

\fancyhead[L]{\begin{tikzpicture}[remember picture,overlay]
\draw let \p1=($(current page.north)-(current page header area.south)$),
\n1={veclen(\x1,\y1)} in
node [inner sep=0,outer sep=0,below right]
at (current page.north west){\includegraphics[width=\paperwidth,height=\n1]{example-image-duck}};
\end{tikzpicture}}





\begin{document}
\section{First section}
Type your document as usual!
\newpage
\section{Second section}
Type your document as usual!
\end{document}

enter image description here

关于image - Latex Image 页眉和页脚,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61787196/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com