Search code examples
latexrstudiopandoc

Removing page numbers from PDF created using knitr from a moderncv template


This question covers R Studio, pandoc and also LaTeX I suppose. The following is what my YAML looks like in R Studio:

---
name: Me Me Me
surname: Myself
position: "Job seeker"
address: "Some address in Newfoundland"
phone: +1 800 111111
www: google.com
email: "myemail@yahoo.com"
linkedin: john-joseph-jingle-jabber-smith/123
date: "`r format(Sys.time(), '%B %Y')`"
output: vitae::moderncv
theme: classic 
---

In the footer, the page number is displayed. People with a similar problem have fixed this by changing the LaTeX preamble, but I have no such file, instead I have a collection of one .cls and several .sty files. Which of these would I need to change in order to suppress page numbering? Or is it possible to add pandoc args for this in the preamble?


Solution

  • moderncv has the \nopagenumbers macro to switch off page numbers:

    ---
    name: Me Me Me
    surname: Myself
    position: "Job seeker"
    address: "Some address in Newfoundland"
    phone: +1 800 111111
    www: google.com
    email: "myemail@yahoo.com"
    linkedin: john-joseph-jingle-jabber-smith/123
    date: "`r format(Sys.time(), '%B %Y')`"
    output: 
      vitae::moderncv:
        keep_tex: true
    header-includes:
      - \nopagenumbers
    theme: classic 
    ---
    
    test
    
    \clearpage
    
    test