【发布时间】:2019-08-22 06:39:25
【问题描述】:
我目前在 Rmarkdown 中遇到了乳胶问题(使用 fancyhdr 包)。我正在尝试制作具有某种模板样式的数据报告。但截至目前,我的每一页的标题 1 都没有正确对齐。我认为这与我的 \headheight 有关,但我不确定如何解决它。
目前这是在 R-markdown 中完成的,我非常确信这个问题与我的 YAML 有关。如果有人能告诉我如何修复我的 \headheight 的 YAML 编码或整体改进我的 YAML 编码以解决重叠问题,我将不胜感激。
运行此代码时没有错误,但这是它们提供给我的警告(但我不知道如何解决警告)
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 输出的图像:https://tex.stackexchange.com/questions/482525/having-problems-with-latex-coding-in-rmarkdown-fancyhdr-headheight
我希望所有这些都相互对齐。我不知道我在 YAML 中的编码是否正确。
【问题讨论】:
标签: r latex r-markdown pdflatex