Left-align Rmarkdown PDF 的 YAML 标题

Left-align YAML title for Rmarkdown PDF

R 大师,

我想知道是否可以在 Rmarkdown 文档的 YAML 中左对齐 PDF 输出标题。

是否可以在标题上方添加徽标(header)?

---
output: 
  pdf_document:
    fig_caption: false

#title: "Multi pricing report"
latex_engine: xelatex
fontfamily: mathpazo
fontsize: 11pt
# spacing: double
endnote: no
---

非常感谢您花时间和精力回答。

您可以使用 titling 包,在标题前添加 \begin{flushleft},在标题后添加 \end{flushleft}

---
output: 
  pdf_document:
    fig_caption: false
    keep_tex: yes
title: "Multi pricing report"
fontfamily: mathpazo
fontsize: 11pt
header-includes:
  - \usepackage{titling}
  - \pretitle{\begin{flushleft}}
  - \posttitle{\end{flushleft}}
---