【问题标题】:Footnotes and logo in Rmarkdown generated PDFRmarkdown 生成的 PDF 中的脚注和徽标
【发布时间】:2022-11-07 16:50:57
【问题描述】:

我正在尝试在 Rmarkdown 生成的 PDF 的首页上集成脚注和徽标。

我试试这个:

---
title             : "My report"
date              : November 4th, 2022
author:  "Author 1[^note1]"
documentclass     : report
keep_tex          : true
header-includes: 
- \usepackage{titling}
- \pretitle{\begin{center}
    \includegraphics[width=2in,height=2in]{logo.png}\LARGE\\}
- \posttitle{\end{center}}
output            : pdf_document
---

[^note1]: Writing, Research, Editing

受此过程的启发以集成徽标: https://bookdown.org/yihui/rmarkdown-cookbook/latex-logo.html

这是脚注: https://stackoverflow.com/a/62514739/12398676

但是,我收到此错误:

! Argument of \reserved@a has an extra }.
<inserted text> 
                \par 
l.69 ...or 1\footnote{Writing, Research, Editing}}

Error: LaTeX failed to compile logo_footnote.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See logo_footnote.log for more info.
Execution halted

任何人都知道出了什么问题?

编辑:samcarter_is_at_topanswers.xyz 提供的解决方案 ......离解决方案更近了一步,但并不完全在那里。 我现在有一个徽标和作者姓名,但作者姓名与日期重叠

【问题讨论】:

    标签: latex r-markdown pdf-generation


    【解决方案1】:

    您可以像这样解决问题:

    ---
    title             : "My report"
    date              : November 4th, 2022
    documentclass     : report
    keep_tex          : true
    header-includes: 
    - AtBeginDocument{uthor{Author 1protectootnote{Writing, Research, Editing}}}
    - usepackage{titling}
    - pretitle{egin{center}
        includegraphics[width=2in,height=2in]{example-image-duck}LARGEpar}
    - posttitle{end{center}}
    output            : 
      pdf_document:
        keep_tex: true
    ---
    
    test
    

    【讨论】:

    • 嗨,这已经很好了,但我现在还不在那里,因为现在作者姓名没有正确显示(与日期重叠)file.io/yqI4t84uJwJo
    • @raphael_ldl 您能否为您的问题添加屏幕截图?
    猜你喜欢
    • 2016-01-30
    • 1970-01-01
    • 2017-01-29
    • 2014-08-16
    • 1970-01-01
    • 1970-01-01
    • 2023-03-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多