多字幕

多字幕

我是 Latex 的新手。这是我的文档。我的代码如下:

\documentclass[12pt,a4paper]{article}

\usepackage[utf8]{inputenc}

\title{Symplectic Geometry in Classical Mechanics}

\author{}

\date{}

\begin{document}

\maketitle
\chapter{Lecture 1}
\chapter{Basics of Manifolds}\\*
It is a mathematical formalism underlying\\*
\begin{itemize}\\*
\item Geometrical Optics\\  
\item Classical Mechanics\\
\item General Relativity\\
\item Quantum Mechanics\\
\end{itemize}

Such a unifying formalism help us to solve problems in one area of physics
by using ideas from another areas.
It doesn't work for systems with loss, friction or noise.

\end{document}

实际上我希望这份文件有三个标题。

第一章——《经典力学中的辛几何》

第二节 “讲座 1”

第三部分——“流形基础”

我希望这三者都位于中心的不同行中。但上述代码无法正确实现。该怎么做?

答案1

您可以借助该包定义自己的subtitle命令,如下例所示:subsubtitletitling

\documentclass[12pt,a4paper]{article}

\usepackage[utf8]{inputenc}

\usepackage{titling}
\newcommand{\subtitle}[1]{%
  \posttitle{%
    \par\end{center}
    \begin{center}\Large#1\end{center}
   }%
}



\newcommand{\subsubtitle}[1]{%
  \preauthor{%
    \begin{center}
    \large #1 \vskip0.5em
    \begin{tabular}[t]{c}
    }%
}


\title{Symplectic Geometry in Classical Mechanics }
\subtitle{Lecture 1}
\subsubtitle{Basics of Manifolds}
\author{}
\date{}

\begin{document}

\maketitle

It is a mathematical formalism underlying
\begin{itemize}
\item Geometrical Optics  
\item Classical Mechanics
\item General Relativity
\item Quantum Mechanics
\end{itemize}

Such a unifying formalism help us to solve problems in one area of physics
by using ideas from another areas.
It doesn't work for systems with loss, friction or noise.

\end{document}

在此处输入图片描述


要删除副标题下方的空白(为作者和日期保留),您可以使用以下命令:

\documentclass[12pt,a4paper]{article}

\usepackage[utf8]{inputenc}

\usepackage{titling}
\newcommand{\subtitle}[1]{%
  \posttitle{%
    \par\end{center}
    \begin{center}\Large#1\end{center}
   }%
}



\newcommand{\subsubtitle}[1]{%
  \preauthor{%
    \begin{center}
    \large #1 \vskip0.5em
    %\begin{tabular}[t]{c}
    }%
}
  \postauthor{%
    \end{center}
    }%
\predate{}
\postdate{}

\title{Symplectic Geometry in Classical Mechanics }
\subtitle{Lecture 1}
\subsubtitle{Basics of Manifolds}
\author{}
\date{}

\begin{document}

\maketitle

It is a mathematical formalism underlying
\begin{itemize}
\item Geometrical Optics  
\item Classical Mechanics
\item General Relativity
\item Quantum Mechanics
\end{itemize}

Such a unifying formalism help us to solve problems in one area of physics
by using ideas from another areas.
It doesn't work for systems with loss, friction or noise.

\end{document}

在此处输入图片描述

更“快速而粗糙”的方法是以下示例,其中用于\author字幕和\date子字幕:

\documentclass[12pt,a4paper]{article}

\usepackage[utf8]{inputenc}


\title{Symplectic Geometry in Classical Mechanics }
\author{Lecture 1}
\date{Basics of Manifolds}

\begin{document}

\maketitle

It is a mathematical formalism underlying
\begin{itemize}
\item Geometrical Optics  
\item Classical Mechanics
\item General Relativity
\item Quantum Mechanics
\end{itemize}

Such a unifying formalism help us to solve problems in one area of physics
by using ideas from another areas.
It doesn't work for systems with loss, friction or noise.

\end{document}

在此处输入图片描述

答案2

\maketitlehookb来自的变体titling

\documentclass[12pt,a4paper]{article}

\usepackage[utf8]{inputenc}
\usepackage{titling}

\title{Symplectic Geometry in Classical Mechanics}

\author{I. Ego}

\date{\today}

\newcommand{\subtitle}[1]{%
\gdef\subT{#1}}
\newcommand{\subT}{}
\renewcommand{\maketitlehookb}{%
\par\Large\centering\noindent \subT}
\subtitle{Lecture1\\[1ex] Basics of Manifolds\vskip 2em}

\begin{document}

\maketitle

It is a mathematical formalism underlying%\\*
\begin{itemize}%\\*
\item Geometrical Optics%\\
\item Classical Mechanics%\\
\item General Relativity%\\
\item Quantum Mechanics%\\
\end{itemize}

Such a unifying formalism help us to solve problems in one area of physics
by using ideas from another areas.
It doesn't work for systems with loss, friction or noise.

\end{document} 

在此处输入图片描述

相关内容