1

I am using R Markdown for showing the results of statistical analyses that I am conducting for my company. I would like to include the company logo at the upper right corner of the first page and company info in the footer of each page.

I browsed around this site to find potential answers, however they weren't very helpful for my purpose. I found this thread, but the procedures described within simply result with the logo being present on each page, whereas I only want it on the first page.

Since I couldn't find a way to do it, I gave up and tried to include only company info in the footer. I managed to properly include the company information in the footer; however, each page also contained a header with the name of the current chapter and the name of the document. I couldn't find a way to remove that header.

Is there a way to achieve what I want? Company logo in the header, only on the first page and company info in the footer on each page, with no chapter/document names in the header?

Waylan
  • 37,164
  • 12
  • 83
  • 109
J. Doe
  • 1,544
  • 1
  • 11
  • 26
  • 1
    Could you show what you've tried to get a title-page already? – berkes Mar 19 '19 at 15:31
  • 1
    It may help you to look for answers in LaTeX, then convert that into Markdown – Corey Levinson Mar 19 '19 at 15:37
  • If you're going for PDF output (and therefore using LaTeX), you can use the `fancyhdr` latex package. One reference: https://latex.org/forum/viewtopic.php?t=9191. Corey's suggestion to look into latex is the right start, though. – r2evans Mar 19 '19 at 15:38

1 Answers1

0

Are you printing an html file? If yes this should work:

htmltools::img(src = knitr::image_uri("logo.png"), 
               alt = 'logo', 
               style = 'position:absolute;top:0;right:100px;width:180px;height:100px;padding:10px;')

This is basic HTML so if you need to adjust the size of your logo you can do it using this part of the code: top:0;right:100px;width:180px;height:100px;