Wandmalfarbe / pandoc-latex-template

A pandoc LaTeX template to convert markdown files to PDF or LaTeX.
BSD 3-Clause "New" or "Revised" License
6.22k stars 968 forks source link

Make page after toc page 1 #104

Open abers opened 5 years ago

abers commented 5 years ago

Is there a line that can be added to the YAML or the tex file so that the page number starts from the first page after the table of contents?

ConnorBaker commented 5 years ago

I've been using

header-includes:
  - \setcounter{page}{0} # So that the titlepage is the zeroth page

for the title page. I haven't tried this with the TOC though.

abers commented 5 years ago

Thanks for the reply. Sadly using a title page and TOC it makes the title page jump around - it seems to be set to always be on page 1. Also, need to remove page number from bottom of initial pages.

Assuming need to setcounter, change page counter that title page appears, and add if statement to not show page number on pages 0 or below.

cagix commented 5 years ago

it seems to me, that in the default pandoc latex template \frontmatter is used before \maketitle, which would resolve the numbering issue.

for the time beeing i used in https://github.com/cagix/pandoc-thesis something like this as a workaround:

\usepackage{xpatch}
\xapptocmd{\frontmatter}{\setcounter{page}{3}}{}{}

(to be used as "header-include")

modestotech commented 4 years ago

Bump, it'd be really neat with a flag for setting the page after title, and, if any, the TOC, to be page 1. Furthermore, the page in the footer would be excluded on the TOC page.

frastlin commented 1 year ago

Hello, I would like this for generating word files from markdown as well.