- 在bookdown的yaml头部添加metadata信息,包括title(书籍标题)、author(作者)、date(日期)、supervisor(指导老师)、institute(学院)等。
title: "我的书籍"
author: "我"
date: "`r Sys.Date()`"
supervisor: "指导老师"
institute: "某某学院"
output:
bookdown::pdf_book:
toc: false
includes:
in_header: latex/header.tex
- 创建一个Latex格式的header文件,用于在PDF书籍中添加metadata信息。
\usepackage{titling}
\pretitle{
\begin{center}
\LARGE
\includegraphics[width=6cm,height=6cm]{images/logo.png}\\[\bigskipamount]
}
\posttitle{\end{center}}
\preauthor{\begin{center}
\large \lineskip 0.5em%
\begin{tabular}[t]{c}}
\postauthor{\end{tabular}\par\end{center}}
\predate{\begin{center}}
\postdate{\end{center}}
\usepackage{titling}
\pretitle{
\begin{center}
\LARGE
\includegraphics[width=6cm,height=6cm]{images/logo.png}\\[\bigskipamount]
}
\posttitle{\end{center}}
\preauthor{\begin{center}
\large \lineskip 0.5em%
\begin{tabular}[t]{c}}
\postauthor{\end{tabular}\par\end{center}}
\predate{\begin{center}}
\postdate{\end{center}}
\usepackage{titling}
\pretitle{
\begin{center}
\LARGE
\includegraphics[width=6cm,height=6cm]{images/logo.png}\\[\bigskipamount]
}
\posttitle{\end{center}}
\preauthor{\begin{center}
\large \lineskip 0.5em%
\begin{tabular}[t]{c}}
\postauthor{\end{tabular}\par\end{center}}
\predate{\begin{center}}
\postdate{\end{center}}
\usepackage{titling}
\pretitle{
\begin{center}
\LARGE
\includegraphics[width=6cm,height=6cm]{images/logo.png}\\[\bigskipamount]
}
\posttitle{\end{center}}
\preauthor{\begin{center}
\large \lineskip