我想在非标题页的页面上添加作者信息。
就像是
\documentclass[12pt,a4paper]{book}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry}
\title{}
\author{}
\begin{document}
\date{}
\maketitle
\chapter{New Chapter}
Authors
Institutions
\end{document}
作者信息需要放在章节标题下的章节页上。我该如何实现这一点?
答案1
的默认行为是删除在、和\maketitle
中输入的值。您可以使用以下代码在删除之前捕获这些值:\title
\author
\date
\documentclass{book}
\title{A title}
\author{An author}
\date{\today}
\makeatletter
\let\oldmaketitle\maketitle
\renewcommand{\maketitle}{%
\let\printtitle\@title
\let\printauthor\@author
\let\printdate\@date
\oldmaketitle
}
\makeatother
\setlength{\parindent}{0pt}% Just for this example
\begin{document}
\maketitle
\chapter{A chapter}
Title: \printtitle \par
Author: \printauthor \par
Date: \printdate
\end{document}
以下 - 将内容存储在您以后可以访问的宏中 - 是一种等效的替代方法:
\documentclass{book}
\newcommand{\mytitle}{A title}
\newcommand{\myauthor}{An author}
\newcommand{\mydate}{\today}
\title{\mytitle}
\author{\myauthor}
\date{\mydate}
\setlength{\parindent}{0pt}% Just for this example
\begin{document}
\maketitle
\chapter{A chapter}
Title: \mytitle \par
Author: \myauthor \par
Date: \mydate
\end{document}