LaTeX R-Markdown中存在头高问题(页面布局不一致)
我目前在使用fancyhdr软件包的Rmarkdown中遇到一个关于乳胶的问题。我正在尝试使用某种模板样式制作数据报告。但到目前为止,我每页的标题都没有正确对齐。我想这与我的头高有关,但我不确定如何解决 目前这是在R-markdown中完成的,我很有信心这个问题与我的YAML有关。如果有人能告诉我如何修复\ headheight的YAML编码或全面改进YAML编码以解决重叠问题,我将不胜感激 我运行此代码时没有错误,但这是他们提供给我的警告,但我不知道如何解决该警告LaTeX R-Markdown中存在头高问题(页面布局不一致),r,latex,r-markdown,pdflatex,R,Latex,R Markdown,Pdflatex,我目前在使用fancyhdr软件包的Rmarkdown中遇到一个关于乳胶的问题。我正在尝试使用某种模板样式制作数据报告。但到目前为止,我每页的标题都没有正确对齐。我想这与我的头高有关,但我不确定如何解决 目前这是在R-markdown中完成的,我很有信心这个问题与我的YAML有关。如果有人能告诉我如何修复\ headheight的YAML编码或全面改进YAML编码以解决重叠问题,我将不胜感激 我运行此代码时没有错误,但这是他们提供给我的警告,但我不知道如何解决该警告 Package Fancyh
Package Fancyhdr Warning: \headheight is too small (12.0pt):
Make it at least 32.08571pt.
We now make it that large for the rest of the document.
This may cause the page layout to be inconsistent, however.
这是我的YAML:
---
output:
pdf_document:
latex_engine: pdflatex
header-includes:|
\usepackage{graphicx}
\usepackage{fancyhdr}
\pagestyle{fancy}
\newcommand{\helv}{%
\fontfamily{phv}\fontseries{b}\fontsize{9}{11}\selectfont}
\fancyhead[R]{\includegraphics[width=3cm]{logo.png}}
\fancyhead[L]{\textbf\selectfont\sffamily{Daily Report}}
\fancyfoot[L]{\textbf\selectfont\sffamily{NOT INTENDED FOR FORWARDING}}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
classoption: a4paper
---
其余代码中有这些代码:
```r-markdown
## \selectfont\sffamily{EQUITY 1}
# content page 1
\newpage
## \selectfont\sffamily{EQUITY 2}
# content page 2
我在TeXStackExchange上发布了pdf输出的图像:
我希望它们都能相互协调。我不知道我是否用YAML正确编码。警告非常明确,头部高度需要大于32.08571pt。这个要求可以通过添加例如.\setlength{\headheight}{32.09pt}到您的头包含中来实现
---
output:
pdf_document:
latex_engine: pdflatex
header-includes:|
\usepackage{graphicx}
\usepackage{fancyhdr}
\pagestyle{fancy}
\newcommand{\helv}{%
\fontfamily{phv}\fontseries{b}\fontsize{9}{11}\selectfont}
\fancyhead[R]{\includegraphics[width=3cm]{logo.png}}
\fancyhead[L]{\textbf\selectfont\sffamily{Daily Report}}
\fancyfoot[L]{\textbf\selectfont\sffamily{NOT INTENDED FOR FORWARDING}}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\setlength{\headheight}{32.09pt}
classoption: a4paper
---