我是 Markdown 新手,需要生成带有正确标题(包括 jpg 图像)的每周报告。我有以下 yaml
---
title: "My Title"
author: "Author Name"
date: "`r Sys.Date()`"
header-includes:
- \usepackage{setspace}\doublespacing
- \usepackage{float}
- \usepackage{graphicx}
- \usepackage{fancyhdr}
- \pagestyle{fancy}
- \pretitle{\begin{center}
\includegraphics[width=2in]{picture.jpg}}
- \posttitle{\end[center]}
mainfont: Calibri
output:
pdf_document:
latex_engine: xelatex
---
公司政策规定所有文件必须采用 Calibri 格式(我知道),这是之前的主要问题。当我去编织时,出现此错误
Error in yaml::yaml.load(..., eval.expr = TRUE) :
Scanner error: while scanning a simple key at line 11, column 5 could not find expected ':' at line 12, column 5
Calls: <Anonymous> ... parse_yaml_front_matter -> yaml_load -> <Anonymous>
Execution halted
任何有关解决方案的帮助都将不胜感激。