我有以下示例代码:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage{blindtext}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{dsfont}
\usepackage{mathrsfs}
\usepackage{marvosym}
\usepackage{tabularx}
\usepackage{tabulary}
\usepackage{booktabs}
\usepackage{wasysym}
%\usepackage[a4paper,top=1cm,bottom=2cm,left=2cm,right=2cm]{geometry}
\theoremstyle{remark}
\newtheorem*{remark}{Remark}
\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
%\newtheorem{theorem}{Theorem}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}{Corollary}[theorem]
\newtheorem{lemma}[theorem]{Lemma}
\title{Theorems And Proofs}
\author{Napoleone Bonaparte}
\date{May 2014}
\renewcommand\qedsymbol{$\blacksquare$}
\begin{document}
\begin{flushleft}
\section{Introduction}
Theorems can easily be defined
\theoremstyle{definition}
\begin{definition}{Fibration}
A fibration is a mapping between two topological spaces that has the homotopy lifting property for every space $X$.
\end{definition}
\begin{theorem}
Let $f$ be a function whose derivative exists in every point, then $f$ is
a continuous function.
\end{theorem}
\begin{theorem}[Pythagorean theorem]
\label{pythagorean}
This is a theorema about right triangles and can be summarised in the next
equation
\[ x^2 + y^2 = z^2 \]
\end{theorem}
And a consequence of theorem \ref{pythagorean} is the statement in the next
corollary.
\begin{corollary}
There's no right rectangle whose sides measure 3cm, 4cm, and 6cm.
\end{corollary}
You can reference theorems such as \ref{pythagorean} when a label is assigned.
\begin{lemma}
Given two line segments whose lengths are $a$ and $b$ respectively there is a
real number $r$ such that $b=ra$.
\end{lemma}
\begin{proof}
To prove it by contradiction try and assume that the statemenet is false,
proceed from there and at some point you will arrive to a contradiction.
\end{proof}
\end{flushleft}
\end{document}
但我不明白,因为我看不到标题、作者和日期。
答案1
使用命令 将元数据包含在文档中\maketitle
。通常,它是命令之后的第一件事\begin{document}
。