提问人:sieste 提问时间:6/21/2013 更新时间:6/22/2013 访问量:24569
禁用页码,使用 pandoc 将 markdown 转换为 pdf [已关闭]
Disable page numbering converting markdown to pdf with pandoc [closed]
问:
我正在使用 pandoc 将 markdown 文件转换为 pdf。如何禁止显示pdf文件中的页码?
答:
75赞
sieste
6/22/2013
#1
我将在这里回答我自己的问题:
我在这篇文章中了解到 pandoc markdown 理解标准的 latex 命令。以以下名为 的 markdown 文件为例:test.md
% A pdf file without page numbers created from pandoc markdown
% sieste
% June 2013
\pagenumbering{gobble}
# First header
etc
和命令
pandoc test.md -o test.pdf
生成不带页码的所需 PDF。
起初我尝试使用,但没有用:如果我把它放在现在的位置,页码只会从第 2 页开始关闭,第一页仍然有编号。如果我把它放在标题栏之前,pdf中的标题就会搞砸。\pagestyle{empty}
\pagenumbering{gobble}
评论
6赞
MikeRSpencer
1/7/2016
对于那些尝试使用 Rmarkdown 的人,请在前言后添加。#' \pagenumbering{gobble}
6赞
DaveRGP
1/17/2018
或在 .请记住正确缩进。header-includes: - \pgenumbering{gobble}
YAML
5赞
Prof.Chaos
2/2/2018
@DaveRGP,你可能应该纠正你的最后一条评论:在“pgenumbering”中,“a”缺失。
4赞
nilon
3/7/2019
\thispagestyle{empty}
也很好用!
1赞
John
11/19/2019
在我的 markdown 文件中使用 yaml 标头也对我有用。pagestyle: empty
评论