📄 things.tex
字号:
% define the title
\author{H.~Partl}
\title{Minimalism}
\begin{document}
% generates the title
\maketitle
% insert the table of contents
\tableofcontents
\section{Start}
Well, and here begins my lovely article.
\section{End}
\ldots{} and here it ends.
\end{document}
\end{verbatim}
\end{lined}
%\caption{Example of a Realistic Journal Article.} \label{document}
\caption{论文类~\LaTeX{}~源文件的例子} \label{document}
\end{figure}
%\section{A Typical Commandline Session}
\section{一个典型的命令行过程}
%I bet you must be dying to try out the neat small \LaTeX{} input file
%shown on page \pageref{mini}. Here is some help:
%\LaTeX{} itself comes without a GUI or
%fancy buttons to press. It is just a program which crunches away
%on your input file. Some \LaTeX{} installations feature a graphical
%front end where you can click \LaTeX{} into compiling your input file.
%But Real Men don't Click, so here is how to coax \LaTeX{} into
%compiling your input file on a text based system. Please note, this
%description assumes that a working \LaTeX{} installation already sitts
%on your computer.
我敢打赌你一定非常渴望尝试第~\pageref{mini}~页中短小简洁的~\LaTeX{}~
源文件。在此,下面的几点可能对你有所帮助。需要注意的是,\LaTeX{}~仅仅是
一个处理你所提供的源文件的程序,并不具有图形用户界面或精致的按钮。
可能有些~\LaTeX{}~安装提供了图形用户界面的前端,使得你可以点击按钮来
让~\LaTeX{}~编译你的源文件,但这并不是~\LaTeX{}~真正的工作方式。
因此,这里将说明如何在一个基于文本的系统下使得~\LaTeX{}~处理你的源文件。
当然,前提是你的计算机里已经正确安装了~\LaTeX。
\begin{enumerate}
%\item
% Edit/Create your \LaTeX{} input file. This file must be plain ASCII
% text. On Unix all the editors will create just that. On windows you
% might want to make sure that you save the file in ASCII or
% \emph{Plain Text} format. When picking a name for your file, make
% sure it bears the extention \texttt{.tex}.
\item 创建并编辑你的~\LaTeX{}~源文件。该文件必须是文本(ASCII)格式。
在~Unix~系统下,所有的编辑器都会使用文本格式创建文件。而在~Windows~
系统下,你可能需要明确地以~ASCII~或纯文本格式保存你的文件。当选取
你的源文件的文件名时,要确保其扩展名为~\texttt{.tex}。
%\item
%Run \LaTeX{} on your input file. If successful you will end up
%with a \texttt{.dvi} file.
\item 运行~\LaTeX{}~处理你的源文件。如果成功,你将会得到一个扩展名为~\texttt{.dvi}~
的文件。
\begin{verbatim}
latex foo.tex
\end{verbatim}
%\item
%Now you may view the DVI file.
\item 现在你可以预览所得到的~DVI~文件。
\begin{verbatim}
xdvi foo.dvi
\end{verbatim}
%or
%convert it to PS
或将其转换为~PS~文件:
\begin{verbatim}
dvips -Pcmz foo.dvi -o foo.ps
\end{verbatim}
%\texttt{\wi{xdvi}} and \texttt{\wi{dvips}} are open-source
%tools for handling \texttt{.dvi} files. The first displays them on
%screen within the X11 environment and the other
%creates a PostScript file for printing. If you are not working on
%a Unix system, other means for handling the \texttt{.dvi} files may be
%provided.
\texttt{\wi{xdvi}}~和~\texttt{\wi{dvips}}~用来处理~\texttt{.dvi}~文件的
开放源代码工具软件。前者可在~X11~环境下将~DVI~文件显示到屏幕上,后者则
将~DVI~文件转换为~PostScript~文件以用来打印。如果你不使用~Unix~操作系统,
将会提供其他工具软件来处理~\texttt{.dvi}~文件。
\end{enumerate}
%\section{The Layout of the Document}
\section{文档布局}
%\subsection {Document Classes}\label{sec:documentclass}
\subsection{文档类}\label{sec:documentclass}
%The first information \LaTeX{} needs to know when processing an
%input file is the type of document the author wants to create. This
%is specified with the \ci{documentclass} command.
当~\LaTeX{}~处理源文件时,首先需要知道的是作者所要创建的文档类型。
该信息可以通过命令~\ci{documentclass}~来提供给~\LaTeX。
\begin{lscommand}
\ci{documentclass}\verb|[|\emph{options}\verb|]{|\emph{class}\verb|}|
\end{lscommand}
%\noindent Here \emph{class} specifies the type of document to be created.
%Table~\ref{documentclasses} lists the document classes explained in
%this introduction. The \LaTeXe{} distribution provides additional
%classes for other documents, including letters and slides. The
%\emph{\wi{option}s} parameter customises the behaviour of the document
%class. The options have to be separated by commas. The most common options for the standard document
%classes are listed in
%Table~\ref{options}.
\noindent 这里~\emph{class}~指明了所要创建的文档类型。表\nbs\ref{documentclass}~中
仅列出了本文所说明的文档类。\LaTeXe{}~发行版本中还包括了像信件、幻灯片等其它文档类。
文档类的属性可以通过选项(\emph{\wi{option}s})来加以调节,不同的选项用逗号隔开。
表\nbs\ref{options}~列出了标准文档类最常用的一些选项。
\begin{table}[!bp]
%\caption{Document Classes.} \label{documentclasses}
\caption{文档类} \label{documentclasses}
\begin{lined}{12cm}
\begin{description}
%\item [\normalfont\texttt{article}] for articles in scientific journals, presentations,
% short reports, program documentation, invitations, \ldots
% \index{article class}
%\item [\normalfont\texttt{report}] for longer reports containing several chapters, small
% books, PhD theses, \ldots \index{report class}
%\item [\normalfont\texttt{book}] for real books \index{book class}
%\item [\normalfont\texttt{slides}] for slides. The class uses big sans serif
% letters. You might want to consider using Foil\TeX{}\footnote{%
% \texttt{CTAN:/tex-archive/macros/latex/contrib/supported/foiltex}} instead.
% \index{slides class}\index{foiltex}
\item [\normalfont\texttt{article}] 排版科技期刊、短报告、程序文档、邀请函等。\index{article class}
\item [\normalfont\texttt{report}] 排版多章节的长报告、短篇的书籍、博士论文等。\index{report class}
\item [\normalfont\texttt{book}] 排版书籍。 \index{book class}
\item [\normalfont\texttt{slides}] 排版幻灯片。其中使用了较大的~sans serif~字体。也可以考虑
使用~Foil\TeX{}来得到相同的效果。\footnote{%
\texttt{CTAN:/tex-archive/macros/latex/contrib/supported/foiltex}}
\index{slides class}\index{foiltex}
\end{description}
\end{lined}
\end{table}
\begin{table}[!bp]
%\caption{Document Class Options.} \label{options}
\caption{文档类选项} \label{options}
\begin{lined}{12cm}
\begin{flushleft}
\begin{description}
%\item[\normalfont\texttt{10pt}, \texttt{11pt}, \texttt{12pt}] \quad Sets the size
% of the main font in the document. If no option is specified,
% \texttt{10pt} is assumed. \index{document font size}\index{base
% font size}
\item[\normalfont\texttt{10pt}, \texttt{11pt}, \texttt{12pt}] \quad 设置
文档所使用的字体的大小。如果没有声明任何选项,缺省将使用~\texttt{10pt}~字体。
\index{document font size}\index{base font size}
%\item[\normalfont\texttt{a4paper}, \texttt{letterpaper}, \ldots] \quad Defines
% the paper size. The default size is \texttt{letterpaper}. Besides
% that, \texttt{a5paper}, \texttt{b5paper}, \texttt{executivepaper},
% and \texttt{legalpaper} can be specified. \index{legal paper}
% \index{paper size}\index{A4 paper}\index{letter paper} \index{A5
% paper}\index{B5 paper}\index{executive paper}
%
\item[\normalfont\texttt{a4paper}, \texttt{letterpaper}, \ldots] \quad 定义纸张的
大小,缺省的设置为~\texttt{letterpaper}。此外,还可以使用~\texttt{a5paper},
\texttt{b5paper},\texttt{executivepaper}~和~\texttt{legalpaper}。\index{legal paper}
\index{paper size}\index{A4 paper}\index{letter paper} \index{A5 paper}
\index{B5 paper}\index{executive paper}
%\item[\normalfont\texttt{fleqn}] \quad Typesets displayed formulae left-aligned
% instead of centred.
%
\item[\normalfont\texttt{fleqn}] \quad 设置该选项将使数学公式左对齐,而不是中间对齐。
%\item[\normalfont\texttt{leqno}] \quad Places the numbering of formulae on the
% left hand side instead of the right.
%
\item[\normalfont\texttt{leqno}] \quad 设置该选项将使数学公式的编号防置于左侧。
%\item[\normalfont\texttt{titlepage}, \texttt{notitlepage}] \quad Specifies
% whether a new page should be started after the \wi{document title}
% or not. The \texttt{article} class does not start a new page by
% default, while \texttt{report} and \texttt{book} do. \index{title}
%
\item[\normalfont\texttt{titlepage}, \texttt{notitlepage}] \quad 指定是否在
文档标题(\wi{document title})后开始一新页。\texttt{article}~文档类缺省
不开始新页,而~\texttt{book}~文档类则相反。\index{title}
%\item[\normalfont\texttt{onecolumn}, \texttt{twocolumn}] \quad Instructs \LaTeX{} to typeset the
% document in \wi{one column}\wi{two column}s.
%
\item[\normalfont\texttt{onecolumn}, \texttt{twocolumn}] \quad 指定~\LaTeX{}~
以单列(\wi{one column})或双列(\wi{two column})方式排版文档。
%\item[\normalfont\texttt{twoside, oneside}] \quad Specifies whether double or
% single sided output should be generated. The classes
% \texttt{article} and \texttt{report} are \wi{single sided} and the
% \texttt{book} class is \wi{double sided} by default. Note that this
% option concerns the style of the document only. The option
% \texttt{twoside} does \emph{not} tell the printer you use that it
% should actually make a two-sided printout.
%
\item[\normalfont\texttt{twoside, oneside}] \quad 指定~\LaTeX{}~排版的文档
为双面或单面格式。\texttt{article}~和~\texttt{report}~缺省使用单面格式,
而~\texttt{book}~则缺省使用双面格式。需要注意的是该选项仅作用于文档的式样。
\texttt{twoside}~选项\emph{不}会通知你的打印机让以得到双面的打印输出。
%\item[\normalfont\texttt{openright, openany}] \quad Makes chapters begin either
% only on right hand pages or on the next page available. This does
% not work with the \texttt{article} class, as it does not know about
% chapters. The \texttt{report} class by default starts chapters on
% the next page available and the \texttt{book} class starts them on
% right hand pages.
\item[\normalfont\texttt{openright, openany}] \quad 此选项决定新的章
是仅仅在右边页(奇数页)还是在下一可用页开始。该选项对~\texttt{article}~
文档类不起作用,因为该类中并没有定义“章”(Chapter)。\texttt{report}~
类中新的一章开始于下一可用页,而~\texttt{book}~类中新的一章总是开始于
右边页。
\end{description}
\end{flushleft}
\end{lined}
\end{table}
%Example: An input file for a \LaTeX{} document could start with the
%line
实例:一个~\LaTeX{}~源文件以下面一行开始
\begin{code}
\ci{documentclass}\verb|[11pt,twoside,a4paper]{article}|
\end{code}
%which instructs \LaTeX{} to typeset the document as an \emph{article}
%with a base font size of \emph{eleven points}, and to produce a
%layout suitable for \emph{double sided} printing on \emph{A4 paper}.
这条命令指定~\LaTeX{}~使用\emph{论文}版式,\emph{11~磅}大小的字体来排班此
文档,并且得到适合打印在~\emph{A4~纸}上的输出结果。
\pagebreak[2]
%\subsection{Packages}
\subsection{宏包}
\index{package}
%While writing your document, you will probably find
%that there are some areas where basic \LaTeX{} cannot solve your
%problem. If you want to include \wi{graphics}, \wi{coloured text} or
%source code from a file into your document, you need to enhance the
%capabilities of \LaTeX. Such enhancements are called packages.
%Packages are activated with the
当你排版文档的时候,你将会发现有很多时候基本的~\LaTeX{}~不能够解决你的
问题。如果你想插入图形、彩色文本或源代码文件,你需要使用宏包来增强~\LaTeX{}~的功能。
调入宏包使用如下的命令:
\begin{lscommand}
\ci{usepackage}\verb|[|\emph{options}\verb|]{|\emph{package}\verb|}|
\end{lscommand}
\noindent
%command where \emph{package} is the name of the package and
%\emph{options} is a list of keywords which trigger special features in
%the package. Some packages come with the \LaTeXe{} base distribution
%(See Table~\ref{packages}). Others are provided separately. You may
%find more information on the packages installed at your site in your
%\guide. The prime source for information about \LaTeX{} packages is \companion.
%It contains descriptions of hundreds of packages along with
%information of how to write your own extensions to \LaTeXe.
这里~\emph{package}~是宏包的名称,\emph{options}~是用来触发宏包中的特殊功能
的一组关键词。大部分宏包包含在~\LaTeX{}~基本发行版本中(参见表\nbs\ref{packages}),
另外一些宏包则单独发布。你可以在你所安装的~\LaTeX{}~系统中找到更多的
有关宏包的信息。\companion ~中提供了关于~\LaTeX{}~宏包的主要信息并
包括了上百个宏包的详细描述以及如何写作你自己的~\LaTeXe{}~扩展。
\begin{table}[!hbp]
%\caption{Some of the Packages Distributed with \LaTeX.} \label{packages}
\caption{伴随~\LaTeX{}~发布的一些宏包} \label{packages}
\begin{lined}{11cm}
\begin{description}
%\item[\normalfont\pai{doc}] Allows the documentation of \LaTeX{} programs.\\
% Described in \texttt{doc.dtx}\footnote{This file should be installed
% on your system, and you should be able to get a \texttt{dvi} file
% by typing \texttt{latex doc.dtx} in any directory where you have
% write permission. The same is true for all the
% other files mentioned in this table.} and in \companion.
\item[normalfont\pai{doc}] 排版~\LaTeX{}~程序文档。\\
详见~\texttt{doc.dtx}\footnote{此文件应该已安装在你的系统中,你可以
在你有写权限的目录下使用命令~\texttt{latex doc.dtx}~得
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -