|
废话不多说。看看我写的范例(当英文作业):
\documentclass{book}
\date{2003/2/1}
\title{\TeX{}\footnote{Also TeX or $\tau\varepsilon\chi$}, Beginner's Guide}
\author{Sandy Gong}
\begin{document}
\maketitle
\tableofcontents
\frontmatter
\chapter{This Book is Presented to:}
My English Teacher as my homework
\mainmatter
\chapter{Why Use \TeX{}?}
\section{What is \TeX{}?}
Technology? Technician? Their names are beginning with
phrase ``tech''(in greek they are $\tau{}\epsilon{}\chi{}$).\\
\TeX, as the capital form of $\tau{}\epsilon{}\chi{}$, of course,
is a high-$\tau{}\epsilon{}\chi{}$ text formating system.
\subsection*{How to pronounce \TeX{}}
Is it pronounced as ``TECKS''?\\
No. $\tau{}$ and $\epsilon{}$ \emph{are} pronounced as ``te''.
But the ``X'' do \emph{not} stand for English \sf{}``ex''
\rm but the Greek letter $\chi{}$ pronounced as ``ch'' in ``loch''
\section{Is \TeX{} \tt{}WYSIWYG\rm{}?}
No. \TeX is WYTIWYG(``what you think is what you get'').
It is \sc{}automatic\rm{}.
It has more privileges than WYSIWYG doc-system
for example \emph{Microsoft Word}.
\chapter{\TeX: The Beginning}
\section{Linefeeds and Quotemarks}
\subsection{Quotemarks}
To get double-quotemark as \\
``Yes''\\
you should type:
\begin{verbatim}
``Yes''
\end{verbatim}
But for a good TeX-supported editor like \tt{}emacs\rm{}
, you just need to type \fbox{Shift}+\fbox{''/'}.
\subsection{Math Mode}
Want to get Math in TeX?
Yes.
For example:\\
$f(a)\approx{}\vec{a}\cdot{}\alpha{}-c^2\pm{}\sin{}\theta{}$\\
You should type:
\begin{verbatim}
$f(a)\approx{}\vec{a}\cdot{}\alpha{}-c^2\pm{}\sin{}\theta{}$
\end{verbatim}
Now let's have it explained:\\
\verb=$= means the delimiter of math mode\\
\verb=\approx{}= is the ``yu\={e}d\v{e}ngh\`{a}o''(approximately equal sign)\\
\verb=\vec{a}= means add a vector sign on \emph{a}\\
\verb=\cdot{}= is the multiplication\\
And more you can read \emph{The \TeX{}book}! or \emph{\LaTeX Command
Summary}
\subsection{Linefeeds and Comments}
Want linefeeds(the recarrige of lines)?
So you want to type:
\begin{verbatim}
Line 1
Line 2
\end{verbatim}
But the output is:\\
Line 1
Line 2\\
O,o! Why? Because TeX ignores LFs and replaced it as \verb=Line1 Line2=.
In fact, you need to type:
\begin{verbatim}
Line1\\Line2
OR:
Line1\\
Line2
\end{verbatim}
Yeah! We needn't to type a long line.
For example, me, I like to have every sentence a line.
\subsubsection*{Comments}
Comments? Just in programming language? No!!!
For example:
\begin{verbatim}
i18n means intern%The meaning of i18n
ationalization
\end{verbatim}
Output:
i18n means intern%The meaning of i18n
ationalization\\
\tt{}\%\rm{} means the symbol of comment.
Now you know a method to let TeX ignore your LF.
\subsection*{Compile your \TeX{}File}
Save. And invoke \fbox{\tt{}tex \emph{yourfile}.tex\rm{}}\\
Then invoke \fbox{\tt{}xdvi \emph{yourfile}.dvi\rm{}}
\end{document}
编译以后是入门啦。 |
|