将图像设置为页脚 Rmarkdown 标题页并调整其大小
Set and resize image as footer Rmarkdown title page
我正在尝试将图像设置为降价文档标题页中的页脚并调整其大小。
我在 LaTex 中得到了想要的结果:
\documentclass{article}
\title{Test}
\author{}
\date{}
\usepackage{graphicx}
\usepackage{fancyhdr}
\fancypagestyle{plain}{
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\lfoot{\includegraphics[width=400px]{footer.png}}
}
\begin{document}
\maketitle
\end{document}
但是当我尝试在 Markdown 文档中做同样的事情时,出现以下错误:
yaml::yaml.load(string, ...) 错误:
扫描仪错误:在第 6 行第 5 列扫描普通标量时,在第 7 行第 1 列发现了一个违反意图的制表符
调用:... parse_yaml_front_matter -> yaml_load_utf8 ->
执行暂停
我的密码是:
---
title: "Test"
author: ""
header-includes:
- \usepackage{graphicx}
- \usepackage{fancyhdr}
- \fancypagestyle{plain}{
- \fancyhf{}
- \renewcommand{\headrulewidth}{0pt}
- \renewcommand{\footrulewidth}{0pt}
- \lfoot{\includegraphics[width=400px]{footer.png}}}
output: pdf_document
---
我已经尝试过 Creating a footer for every page using R markdown 之类的解决方案,但它无法完成标题页的工作。
尝试:
---
title: "Test"
author: ""
header-includes: |
\usepackage{graphicx}
\usepackage{fancyhdr}
\fancypagestyle{plain}{
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\lfoot{\includegraphics[width=400px]{footer.png}}}
output: pdf_document
---
Yaml 是转义引号等的猛兽。您可能想创建一个包含乳胶的单独文件 header 并只包含它。
---
header-includes: yourfile.tex
---
我正在尝试将图像设置为降价文档标题页中的页脚并调整其大小。
我在 LaTex 中得到了想要的结果:
\documentclass{article}
\title{Test}
\author{}
\date{}
\usepackage{graphicx}
\usepackage{fancyhdr}
\fancypagestyle{plain}{
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\lfoot{\includegraphics[width=400px]{footer.png}}
}
\begin{document}
\maketitle
\end{document}
但是当我尝试在 Markdown 文档中做同样的事情时,出现以下错误:
yaml::yaml.load(string, ...) 错误: 扫描仪错误:在第 6 行第 5 列扫描普通标量时,在第 7 行第 1 列发现了一个违反意图的制表符 调用:... parse_yaml_front_matter -> yaml_load_utf8 -> 执行暂停
我的密码是:
---
title: "Test"
author: ""
header-includes:
- \usepackage{graphicx}
- \usepackage{fancyhdr}
- \fancypagestyle{plain}{
- \fancyhf{}
- \renewcommand{\headrulewidth}{0pt}
- \renewcommand{\footrulewidth}{0pt}
- \lfoot{\includegraphics[width=400px]{footer.png}}}
output: pdf_document
---
我已经尝试过 Creating a footer for every page using R markdown 之类的解决方案,但它无法完成标题页的工作。
尝试:
---
title: "Test"
author: ""
header-includes: |
\usepackage{graphicx}
\usepackage{fancyhdr}
\fancypagestyle{plain}{
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\lfoot{\includegraphics[width=400px]{footer.png}}}
output: pdf_document
---
Yaml 是转义引号等的猛兽。您可能想创建一个包含乳胶的单独文件 header 并只包含它。
---
header-includes: yourfile.tex
---