【问题标题】:Insert a logo in upper right corner of Rmarkdown pdf document & header在 Rmarkdown pdf 文档和标题的右上角插入徽标
【发布时间】:2017-01-29 19:17:58
【问题描述】:

我查看了"insert a logo in upper right corner of R markdown pdf document"topic,并设法使用此输入在右上角插入了一个徽标:

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

但是当我另外添加author: title: date: 时,徽标消失了。 我意识到,在一个多页的文档中,徽标从第二页开始出现,但不在第一页上,我在第一页中包含了标题

我怎样才能在第一页上添加徽标作为作者:、标题:等正常信息之外的其他信息?

【问题讨论】:

  • 您可以添加指向您查看的主题的链接吗?
  • stackoverflow.com/questions/27982052/… 不知道能否以其他方式参考这篇文章,但应该通过该链接找到它。我现在用一个多页的文档网尝试了它。徽标从第二页开始出现,但不在第一页上,我在第一页中包含了标题。

标签: r image pdf markdown rstudio


【解决方案1】:

将以下内容放入'header.tex'

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-10-05
    • 1970-01-01
    • 2015-03-14
    • 2023-03-04
    • 2022-11-07
    • 1970-01-01
    • 2012-12-17
    相关资源
    最近更新 更多