2

I viewed the "insert a logo in upper right corner of R markdown pdf document"topic and I managed to insert a logo in the upper right corner using this input:

  pdf_document:
      keep_tex: true
      includes:
        in_header: header.tex

But when I additionally include author: title: date: the logo disappears. I realised, that in a document with more than one page, the logo appears from the second page onwards but not on the first page, where I included the header

How can I include the logo on the first page additional to the normal infomations as author:, titel: and so on?

Community
  • 1
  • 1
Christina
  • 31
  • 3
  • 1
    can you add a link to the topic you viewed? – Ben Bolker Sep 21 '16 at 14:43
  • http://stackoverflow.com/questions/27982052/insert-a-logo-in-upper-right-corner-of-r-markdown-pdf-document Don't know if I can refer to this articel in an other way, but should find it with that link. I now tried it with a documnet with more than one page. the logo appears from the second page onwards but not on the first page, where I included the header. – Christina Sep 21 '16 at 16:19

1 Answers1

1

Put the following in 'header.tex'

\usepackage{titling}
\pretitle{%
\begin{center}
\LARGE
\hfill \includegraphics[width=4cm,height=6cm]{logo.png}\\[\bigskipamount]
}
\posttitle{\end{center}}
mth_mad
  • 135
  • 1
  • 10