【发布时间】:2020-02-07 02:23:10
【问题描述】:
我正在使用带有乳胶输出的 Rmarkdown 处理文档,该文件编译良好并正确交付文档,但是我想删除文档标题中出现的页码,即数字 1。我已经尝试过乳胶的替代品,例如 \thispagestyle {empty},但我没有找到。我的代码如下:
---
title: |
| \vspace{5cm} \Huge [My title][1]
| \vspace{0.5cm} \LARGE My subtitle
author: "xxx"
date: "`r Sys.Date()`"
output:
pdf_document:
citation_package: natbib
fig_caption: yes
keep_tex: yes
number_sections: yes
highlight: zenburn
csl: ajpa.csl
bibliography: bibliography.bib
header-includes:
- \usepackage{draftwatermark}
- \usepackage{fancyhdr}
- \usepackage{xcolor, hyperref}
- \usepackage{lipsum}
- \usepackage{appendix}
- \setlength{\headheight}{47pt}
- \setlength{\footskip}{25pt}
- \renewcommand{\headrulewidth}{0.5pt}
- \renewcommand{\footrulewidth}{0.5pt}
- \rhead{\thepage}
- \hypersetup{colorlinks = true, linkcolor = black, urlcolor = blue, citecolor
= blue}
- \fancypagestyle{plain}{\pagestyle{fancy}}
- \pagestyle{fancy}
- \lhead{\includegraphics[width=7cm,height=1cm]{C:/mypath/stack.jpg}}
---
代码的结果是所有工作表的文档格式,但我只需要从文档的首页删除数字 1 和顶部图像(见附图)enter image description here,并且数字1 从下一张纸开始。 非常感谢您的宝贵时间和建议。
【问题讨论】:
-
嗨!到目前为止你尝试了什么?例如,您是否尝试过此处提供的任何解决方案:stackoverflow.com/questions/38765422/… 或 tex.stackexchange.com/questions/487450/…
-
@Annet 感谢您的建议,我正在审查它们,我可以达到预期的结果,我将在答案中留下代码的结果
-
@Annet 你是对的。问题是我总是被认为是 YAML 中的命令 '''\pagenumbering {Arabic}''',因为它不在此范围内。非常感谢!!
标签: r latex r-markdown