Newbie question here. I seem to have some trouble changing the page numbering. I want it in the header, instead of the bottom of the page. I got the header working, but I have been deleting and changing code to no avail in order to delete the page numbering at the bottom.

\pagestyle{header}, works but removes some of the information in the header itself.

\pagenumbering{gobble}, nope.

It will probably be a very simple solution, I am just a tad confused :)

I looked at some other topics, but the fancyhdr website just gives more questions

    date: "`r format(Sys.time(), '%B %Y')`"
    tags: [nothing]
    output: pdf_document
      - \usepackage{lipsum}
      - \usepackage{multicol}
      - \usepackage{xcolor}
      - \usepackage{framed}
      - \usepackage{booktabs}
      - \usepackage[normalem]{ulem}
      - \useunder{\uline}{\ul}{}
      - \usepackage{fancyhdr}
      - \pagestyle{fancy}
      - \fancyhead[LO,LE]{\nouppercase{\rightmark}}
      - \fancyhead[RO,RE]{\thepage}




  • 1
    Could you post a small compilable code? – Bernard Apr 24 at 20:27

Instead of gobbling the page number I would use \fancyfoot{} to remove the footer:







  • @JohnKormylo Ups! Thanks for notifying me! – user186389 Apr 24 at 22:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.