351-354.html
来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 230 行
HTML
230 行
<HTML>
<HEAD>
<TITLE>Linux Unleashed, Third Edition:TeX and LaTeX</TITLE>
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!--ISBN=0672313723//-->
<!--TITLE=Linux Unleashed, Third Edition//-->
<!--AUTHOR=Tim Parker//-->
<!--PUBLISHER=Macmillan Computer Publishing//-->
<!--IMPRINT=Sams//-->
<!--CHAPTER=19//-->
<!--PAGES=351-354//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="348-351.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="354-356.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H4 ALIGN="LEFT"><A NAME="Heading7"></A><FONT COLOR="#000077">Page Layout</FONT></H4>
<P>A page is composed of a header, footer, and body. The header and footer contain information such as chapter title, section heading, and page number. The body is where the main information in your document appears. By changing how this information is ordered in your <TT>TeX</TT> document, you are actually designing the look of the finished product.</P>
<P>The <TT>\headline</TT> and <TT>\footline</TT> commands both take arguments that specify their content. The format of these commands is as follows:</P>
<!-- CODE SNIP //-->
<PRE>
\headline={<I>parameters</I>}
</PRE>
<!-- END CODE SNIP //-->
<P>The parameters could be a list of things such as a page number command and an <TT>\hfil</TT> command:</P>
<!-- CODE SNIP //-->
<PRE>
\headline={\hfil \the\pageno}
\footline={\hfil}
</PRE>
<!-- END CODE SNIP //-->
<P>This pair of commands creates a right-justified page number and a blank footer on each page.
</P>
<P>You can change the size of the text box that <TT>TeX</TT> uses for paragraphs by using the <TT>\hsize</TT> command. For instance, the text</P>
<!-- CODE SNIP //-->
<PRE>
\hsize=2in
This text is 2 inches wide but we could choose to make it wider or
thinner.
</PRE>
<!-- END CODE SNIP //-->
<P>produces the following:
</P>
<!-- CODE SNIP //-->
<PRE>
This text is 2 inches wide but
we could choose to make it
wider or thinner.
</PRE>
<!-- END CODE SNIP //-->
<P>Margins can be adjusted inward or outward using the <TT>\leftskip</TT> and <TT>\rightskip</TT> commands, respectively. By providing positive values to these commands, they move the margin inward, depending on which side you specify (left or right). As you may expect, negative values have the opposite effect: They move the margins outward. Indentation is controlled similarly by using the <TT>\parindent</TT> command.</P>
<P>The <TT>\baselineskip</TT> and <TT>\parskip</TT> commands control the regular vertical spacing between lines and paragraphs, as in the following:</P>
<!-- CODE SNIP //-->
<PRE>
\baselineskip=0.15in
\parskip=0.3in
</PRE>
<!-- END CODE SNIP //-->
<P><I>Baseline</I> refers to the distance between the bottoms of characters (such as an <I>i</I>) on consecutive lines.</P>
<H4 ALIGN="LEFT"><A NAME="Heading8"></A><FONT COLOR="#000077">Using Groups</FONT></H4>
<P>Normally, <TT>TeX</TT> continues using such things as fonts and text styles until you explicitly change the format. The grouping features of <TT>TeX</TT> enable you to define changes that are local to particular sections of text. The formatting originally specified is then restored after the group has been processed.</P>
<P>There are two ways to specify how text is grouped. One is to use the <TT>\begingroup</TT> and <TT>\endgroup</TT> command pair. The other is to use the braces <TT>{</TT> and <TT>}</TT>. Although both of these perform grouping roles, braces are also used to specify parameters to commands and, as such, must be used with care.</P>
<P>As an illustration of the use of groups in <TT>TeX</TT>, the text</P>
<!-- CODE SNIP //-->
<PRE>
Let’s see \begingroup \it how {\bf this grouping stuff} really
works \endgroup, shall we?
</PRE>
<!-- END CODE SNIP //-->
<P>produces the following:
</P>
<!-- CODE SNIP //-->
<PRE>
Let’s see <I>how</I> <B>this grouping stuff</B> <I>really</I>
<I>works</I>, shall we?
</PRE>
<!-- END CODE SNIP //-->
<P>You may have noted from the example that, in fact, groups can contain other groups.
</P>
<H4 ALIGN="LEFT"><A NAME="Heading9"></A><FONT COLOR="#000077">Mathematical Symbols</FONT></H4>
<P>One of the most powerful features of <TT>TeX</TT> is its capability to generate correct mathematical notation for formulas with convenient commands. This is one of the key reasons behind <TT>TeX</TT>’s popularity among engineers and scientists.</P>
<TT>TeX</TT> distinguishes between formulas that must appear within regular text (inline formulas) and those that must appear on their own line (displayed formulas). You must use the <TT>$</TT> symbol to denote inline formulas, as in
<!-- CODE SNIP //-->
<PRE>
The equation $2+3=x$ must evaluate to $x=5$.
</PRE>
<!-- END CODE SNIP //-->
<P>which is generated as the following:
</P>
<!-- CODE SNIP //-->
<PRE>
The equation 2+3=<I>x</I> must evaluate to <I>x</I>=5.
</PRE>
<!-- END CODE SNIP //-->
<P>However, displayed formulas are denoted using two consecutive <TT>$</TT> symbols, as in</P>
<!-- CODE SNIP //-->
<PRE>
The equation $$2+3=x$$ must evaluate to $$x=5$$.
</PRE>
<!-- END CODE SNIP //-->
<P>which produces the following:
</P>
<!-- CODE SNIP //-->
<PRE>
The equation
2+3=<I>x</I>
must evaluate to
x=5.
</PRE>
<!-- END CODE SNIP //-->
<P>Table 19.1 shows some of the math symbols that <TT>TeX</TT> can generate, their associated commands, and their meaning.</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT><B>Table 19.1.</B> Some of the math symbols that <TT>TeX</TT> can generate.
<TR>
<TH COLSPAN="3"><HR>
<TR>
<TH WIDTH="20%" ALIGN="LEFT">Symbol
<TH WIDTH="35%" ALIGN="LEFT"><TT>TeX</TT> Command
<TH WIDTH="45%" ALIGN="LEFT">Meaning
<TR>
<TD COLSPAN="3"><HR>
<TR>
<TD>[185]
<TD><TT>\pi</TT>
<TD>Pi
<TR>
<TD>[183]
<TD><TT>\sum</TT>
<TD>Sum
<TR>
<TD>{
<TD><TT>\{</TT>
<TD>Open bracket
<TR>
<TD>}
<TD><TT>\}</TT>
<TD>Close bracket
<TR>
<TD>[186]
<TD><TT>\int</TT>
<TD>Integral
<TR>
<TD>[178]
<TD><TT>\leq</TT>
<TD>Less than or equal to
<TR>
<TD>[179]
<TD><TT>\geq</TT>
<TD>Greater than or equal to
<TR>
<TD>[173]
<TD><TT>\neq</TT>
<TD>Not equal to
<TR>
<TD>[165]
<TD><TT>\bullet</TT>
<TD>Bullet
<TR>
<TD>[201]
<TD><TT>\ldots</TT>
<TD>Horizontal ellipses
<TR>
<TD>[215]
<TD><TT>\diamond</TT>
<TD>Diamond
<TR>
<TD>[198]
<TD><TT>\Delta</TT>
<TD>Delta
<TR>
<TD COLSPAN="3"><HR>
</TABLE>
<P><TT>TeX</TT> uses particular fonts for the formulas it produces. These can be overridden in the usual fashion, but the changes are applicable only to letters and digits.</P>
<H4 ALIGN="LEFT"><A NAME="Heading10"></A><FONT COLOR="#000077">Using Figures in Your Document</FONT></H4>
<P>Figures that are drawn outside of <TT>TeX</TT> can be inserted into their own space. This space “floats.” In other words, <TT>TeX</TT> knows that it must keep track of the figure space as the text around it is added or deleted. This flexibility means that you, the writer, need not worry about exactly where in the document your figures will appear.</P>
<P>To insert a figure that must appear at the top of a page, use the following command:</P>
<!-- CODE SNIP //-->
<PRE>
\topinsert <I>figure</I> \endinsert
</PRE>
<!-- END CODE SNIP //-->
<P>Here, <I>figure</I> can be an external reference or an internal definition. <TT>TeX</TT> tries to place the figure at the top of the next page with sufficient space.</P>
<P>You can also tell <TT>TeX</TT> that you want a figure to appear on its own page by using this command:</P>
<!-- CODE SNIP //-->
<PRE>
\pageinsert <I>figure</I> \endinsert
</PRE>
<!-- END CODE SNIP //-->
<P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="348-351.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="354-356.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?