⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 typeset.tex

📁 用于公式编辑
💻 TEX
📖 第 1 页 / 共 5 页
字号:

\begin{example}
I know only one English poem by
heart. It is about Humpty Dumpty.
\begin{flushleft}
\begin{verse}
Humpty Dumpty sat on a wall:\\
Humpty Dumpty had a great fall.\\
All the King's horses and all
the King's men\\
Couldn't put Humpty together
again.
\end{verse}
\end{flushleft}
\end{example}

%\subsection{Printing Verbatim}
\subsection{逐字打印}

\iffalse Text which is enclosed between
\verb|\begin{|\ei{verbatim}\verb|}| and \verb|\end{verbatim}| will
be directly printed, as if it was typed on a typewriter, with all
linebreaks and spaces, without any \LaTeX{} command being
executed. \fi %%%%%%%%%%%%%%%%%%%%%%

位于~\verb|\begin{|\ei{verbatim}\verb|}|~和~\verb|\end{verbatim}|~
之间的文本将直接打印,包括所有的断行和空白,就像在打字机上键入一样,
不执行任何~\LaTeX{}~命令。


\iffalse
Within a paragraph, similar behavior can be accessed with
\begin{lscommand}
\ci{verb}\verb|+|\emph{text}\verb|+|
\end{lscommand}
\noindent The \verb|+| is just an example of a delimiter
character. You can use any character except letters, \verb|*| or
space. Many \Latex{} examples in this booklet are typeset with
this command. \fi %%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%
在一个段落中,类似的功能可由
\begin{lscommand}
\ci{verb}\verb|+|\emph{text}\verb|+|
\end{lscommand}
\noindent 完成。\verb|+|~仅是分隔符的一个例子。除了~\verb|*|~
或空格,可以使用任意一个字符。 这个小册子中的许多%\Latex{}% \Latex{}
例子是用这个命令排印的。

\begin{example}
The \verb|\ldots| command \ldots

\begin{verbatim}
10 PRINT "HELLO WORLD ";
20 GOTO 10
\end{verbatim}
\end{example}

\begin{example}
\begin{verbatim*}
the starred version of
the      verbatim
environment emphasizes
the spaces   in the text
\end{verbatim*}
\end{example}

%The \ci{verb} command can be used in a similar fashion with a star:
带星的命令~\ci{verb}~能以类似的方式使用:

\begin{example}
\verb*|like   this :-) |
\end{example}

%The \texttt{verbatim} environment and the \verb|\verb| command may
%not be used within parameters of other commands.
\texttt{verbatim}~环境和~\verb|\verb|~命令不能在其他命令的参数中使用。

%\subsection{Tabular}
\subsection{表格}

\iffalse
The \ei{tabular} environment can be used to typeset beautiful
\wi{table}s with optional horizontal and vertical lines. \LaTeX{}
determines the width of the columns automatically.\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ei{tabular}~环境能用来排印带有水平和铅直表线的漂亮表格。\LaTeX{}~自动确定每一列的宽度。


\iffalse
The \emph{table spec} argument of the
\begin{lscommand}
\verb|\begin{tabular}{|\emph{table spec}\verb|}|
\end{lscommand}
\noindent command defines the format of the table. Use an \texttt{l} for a column of
left-aligned text, \texttt{l}, and \texttt{c} for
centred text; \verb|p{|\emph{width}\verb|}| for a column containing justified
text with linebreaks, and \verb.|. for a vertical line.
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
命令
\begin{lscommand}
\verb|\begin{tabular}{|\emph{table spec}\verb|}|
\end{lscommand}
\noindent 的参量~\emph{table spec}~定义了表格的式样。用一个~\texttt{l}~产生
左对齐的列,用一个~\texttt{r}~产生右对齐的列,用一个~\texttt{c}~产生居中的列;
用~\verb|p{|\emph{宽度值 width}\verb|}|~产生相应宽度、包含自动断行文本的列;
\verb.|.~产生铅直表线。



\iffalse
Within a \texttt{tabular} environment, \verb|&| jumps to the next column, \ci{\bs}
starts a new line and \ci{hline} inserts a horizontal line.
You can add partial Lines by using the \ci{cline}\verb|{j-i}| whereby
j and i are the column numbers the line should extend over.
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
在~\texttt{tabular}~环境中,用~\verb|&|~跳入下一列,用~\ci{\bs}~开始新的一行,
用~\ci{hline}~插入水平表线。用~\ci{cline}\verb|{j-i}|~可添加部分表线,
其中~j~和~i~分别表示表线的起始列和终止列的序号。

\index{"|@ \verb."|.}

\begin{example}
\begin{tabular}{|r|l|}
\hline
7C0 & hexadecimal \\
3700 & octal \\ \cline{2-2}
11111000000 & binary \\
\hline \hline
1984 & decimal \\
\hline
\end{tabular}
\end{example}

\begin{example}
\begin{tabular}{|p{4.7cm}|}
\hline
Welcome to Boxy's paragraph.
We sincerely hope you'll
all enjoy the show.\\
\hline
\end{tabular}
\end{example}

\iffalse
The column separator can be specified with the \verb|@{...}|
construct. This command kills the inter-column space and replaces it
with whatever is between the curly braces.  One common use for
this command is explained below in the decimal alignment problem.
Another possible application is to suppress leading space in a table with
\verb|@{}|.
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
表列分隔符可由~\verb|@{...}|~构造。这个命令去掉表列之间的间隔,
代之为两个花括号间的任何输入。一个用途在于下面要解释的十进制数对齐问题。
另一个可能应用在于用~\verb|@{}|~压缩表列右端空间。

\begin{example}
\begin{tabular}{@{} l @{}}
\hline
no leading space\\
\hline
\end{tabular}
\end{example}

\begin{example}
\begin{tabular}{l}
\hline
leading space left and right\\
\hline
\end{tabular}
\end{example}

%
% This part by Mike Ressler
%

\iffalse
\index{decimal alignment} Since there is no built-in way to align
numeric columns to a decimal point,\footnote{If the `tools' bundle is
  installed on your system, have a look at the \pai{dcolumn} package.}
we can ``cheat'' and do it by using two columns: a right-aligned
integer and a left-aligned fraction. The \verb|@{.}| command in the
\verb|\begin{tabular}| line replaces the normal inter-column spacing with
just a ``.'', giving the appearance of a single,
decimal-point-justified column.  Don't forget to replace the decimal
point in your numbers with a column separator (\verb|&|)! A column label
can be placed above our numeric ``column'' by using the
\ci{multicolumn} command.
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
由于没有内建的方法使十进制数按小数点对齐,\footnote{如果系统安装了~`tools'~包,
请看一下宏包~\pai{dcolumn}。}我们可以使用两列“作弊”到达这个目的:
整数右对齐,小数左对齐。\verb|\begin{tabular}|~行中的命令~\verb|@{.}|~用一个
~``.''~取代了表列间的正常间隔,从而给出了按小数点表列对齐的效果。不要忘记用
表列分隔符~(\verb|&|)~取代十进制数的小数点!使用命令~\ci{multicolumn}~可在
数值“表列”上放置一个表列标签。
\begin{example}
\begin{tabular}{c r @{.} l}
Pi expression       &
\multicolumn{2}{c}{Value} \\
\hline
$\pi$               & 3&1416  \\
$\pi^{\pi}$         & 36&46   \\
$(\pi^{\pi})^{\pi}$ & 80662&7 \\
\end{tabular}
\end{example}

\begin{example}
\begin{tabular}{|c|c|}
\hline
\multicolumn{2}{|c|}{Ene} \\
\hline
Mene & Muh! \\
\hline
\end{tabular}
\end{example}

%Material typeset with the tabular environment always stays together on
%one page. If you want to typeset long tables you might want to have a
%look at the \pai{supertabular} and the \pai{longtabular} environments.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
用表格环境排印的材料总是呆在同一页上。如果要排印一个长表格,可以看一下
~\pai{supertabular}~和~\pai{longtabular}~环境。

%\section{Floating Bodies}
\section{浮动体}
\iffalse
Today most publications contain a lot of figures and tables. These
elements need special treatment, because they cannot be broken across
pages.  One method would be to start a new page every time a figure or
a table is too large to fit on the present page. This approach would
leave pages partially empty, which looks very bad.
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
今天大多数出版物含有许多图片和表格。由于不能把它们分割在不同的页面上,所以需要专门的处理。
如果一个图片或一个表格太大在当前页面排不下,一个解决办法就是每次新开一页。这个方法在页面上留下
部分空白,效果看起来很差。

\iffalse
The solution to this problem is to `float' any figure or table which
does not fit on the current page to a later page, while filling the
current page with body text. \LaTeX{} offers two environments for
\wi{floating bodies}; one for tables and  one for figures.  To
take full advantage of these two environments it is important to
understand approximately how \LaTeX{} handles floats internally.
Otherwise floats may become a major source of frustration, because
\LaTeX{} never puts them where you want them to be.
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
对于在当前排不下的任何一个图片或表格,其解决办法是把它们“浮动”到下一页,与此同时当前页面用
正文文本填充。\LaTeX{}~提供了两个\wi{浮动体}环境;一个用于图片,一个用于表格。要充分发挥这两个
环境的优越性,应该大致了解\LaTeX{}~处理浮动体的内在原理。但是浮动可能成为令人沮丧的主要原因,
因为~\LaTeX{}~总不把浮动体放在你想要的地方。

\bigskip
%Let's first have a look at the commands \LaTeX{} supplies
%for floats:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
首先看一下供浮动使用的~\LaTeX{}~命令:

\iffalse Any material enclosed in a \ei{figure} or \ei{table} environment will
be treated as floating matter. Both float environments support an optional
parameter
\begin{lscommand}
\verb|\begin{figure}[|\emph{placement specifier}\verb|]| or
\verb|\begin{table}[|\emph{placement specifier}\verb|]|
\end{lscommand}
\noindent called the \emph{placement specifier}. This parameter
is used to tell \LaTeX{} about the locations to which the float
is allowed to be moved.  A \emph{placement specifier} is constructed by building a string
of \emph{float-placing permissions}. See Table~\ref{tab:permiss}.
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
包围于环境~\ei{figure}~或环境~\ei{table}~中的任何材料都将被视为浮动内容。
两个浮动环境都支持可选参数
\begin{lscommand}
\verb|\begin{figure}[|\emph{placement specifier}\verb|]| or
\verb|\begin{table}[|\emph{placement specifier}\verb|]|
\end{lscommand}
\noindent 称为\emph{放置说明符},它由\emph{浮动允许放置参量}写成的字符串组成。
请见表\nbs\ref{tab:permiss}。

\iffalse
\begin{table}[!bp]
\caption{Float Placing Permissions.}\label{tab:permiss}
\noindent \begin{minipage}{\textwidth}
\medskip
\begin{center}
\begin{tabular}{@{}cp{10cm}@{}}
Spec&Permission to place the float \ldots\\
\hline
\rule{0pt}{1.05em}\texttt{h} & \emph{here} at the very place in the text
  where it occurred.  This is useful mainly for small floats.\\[0.3ex]
\texttt{t} & at the \emph{top} of a page\\[0.3ex]
\texttt{b} & at the \emph{bottom} of a page\\[0.3ex]
\texttt{p} & on a special \emph{page} containing only floats.\\[0.3ex]
\texttt{!} & without considering most of the  internal parameters\footnote{Such as the
    maximum number of floats allowed  on one page.} which could stop this
  float from being placed.
\end{tabular}
\end{center}
\end{minipage}
\end{table}
Note: The \texttt{0pt} and \texttt{1.05em} are \TeX{} units. Read more
on this in table \ref{units} on page \pageref{units}.
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{table}[!bp]
\caption{浮动允许放置参量。}\label{tab:permiss}
\noindent \begin{minipage}{\textwidth}
\med

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -