rhl19.htm

来自「linux的初学电子书」· HTM 代码 · 共 2,061 行 · 第 1/4 页

HTM
2,061
字号

<LH><B>Unit</B><B> </B><B>Meaning</B></LH>

<BR>

</UL>

<UL>

<UL>

<P>em Approximately the width of the character M, depending on the font in use

<BR>

</UL></UL>

<UL>

<UL>

<P>in Inches

<BR>

</UL></UL>

<UL>

<UL>

<P>pt Points (1 inch equals 72 points)

<BR>

</UL></UL>

<UL>

<UL>

<P>mm Millimeters (1 inch equals 25.4 millimeters)

<BR>

</UL></UL>

<P>These units are used with decimal numbers to specify the amount of spacing that you need. The \hskip command can insert a horizontal space on a line, like this:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">\tt From here \hskip 0.5in to there</FONT></PRE>

<P>This produces the following output:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">From here to there</FONT></PRE>

<P>You can also supply a negative number, which moves the text following the \hskip command to the left (the negative direction). The \hfil command distributes horizontal space in a paragraph when space is available. The interesting thing about the \hfil 
command is the fact that TeX inserts one implicitly for each paragraph. Bearing this detail in mind, you can use this command to flush text left or right, or center it on a line, like this:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">\noindent \hfil Some centered text. \par</FONT></PRE>

<P>This is output as follows:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">Some centered text.</FONT></PRE>

<P>The \vskip command can insert a vertical space between paragraphs using a given unit of measurement (much like \hskip). The command

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">\vskip 40mm</FONT></PRE>

<P>places a vertical space of 40 millimeters between its preceding and succeeding paragraphs. TeX also provides vertical skipping commands in convenient units: \smallskip, \medskip, and \bigskip.

<BR>

<P>The vertical equivalent of \hfil is the \vfill command, which can distribute vertical spaces between paragraphs when extra space (nontext) is available. TeX assumes an implicit \vfill command at the end of a document.

<BR>

<P>You can also explicitly add line breaks and page breaks to your document with the \break command. If this command appears within a paragraph, TeX inserts a line break. If it appears between paragraphs, a page break is inserted. Conversely, you can 
specify points in your document where you want the text to be kept together and not broken across lines or pages. This is done by using the \nobreak command.

<BR>

<BR>

<A NAME="E69E261"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Page Layout</B></FONT></CENTER></H4>

<BR>

<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 TeX document, you are actually designing the look of the finished product.

<BR>

<P>The \headline and \footline commands both take arguments that specify their content. The format of these commands is as follows:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">\headline={parameters}</FONT></PRE>

<P>The parameters could be a list of things such as a page number command and an \hfil command:

<BR>

<PRE>

<FONT COLOR="#000080">\headline={\hfil \the\pageno}

\footline={\hfil}</FONT></PRE>

<P>This pair of commands creates a right-justified page number and a blank footer on each page.

<BR>

<P>You can change the size of the text box that TeX uses for paragraphs by using the \hsize command. For instance, the text

<BR>

<PRE>

<FONT COLOR="#000080">\hsize=2in

This text is 2 inches wide but we could choose to make it wider or thinner.</FONT></PRE>

<P>produces the following:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">This text is 2 inches wide but we could choose to make it wider or thinner.</FONT></PRE>

<P>Margins can be adjusted inward or outward using the \leftskip and \rightskip 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 using the \parindent command.

<BR>

<P>The \baselineskip and \parskip commands control the regular vertical spacing between lines and paragraphs, as in the following:

<BR>

<PRE>

<FONT COLOR="#000080">\baselineskip=0.15in

\parskip=0.3in</FONT></PRE>

<P>Baseline refers to the distance between the bottoms of characters (such as an i) on consecutive lines.

<BR>

<BR>

<A NAME="E69E262"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Using Groups</B></FONT></CENTER></H4>

<BR>

<P>Normally, TeX continues using such things as fonts and text styles until you explicitly change the format. The grouping features of TeX 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.

<BR>

<P>There are two ways to specify how text is grouped. One is to use the \begingroup and \endgroup command pair. The other is to use the braces { and }. Although both of these perform grouping roles, braces are also used to specify parameters to commands 
and, as such, must be used with care.

<BR>

<P>As an illustration of the use of groups in TeX, the text

<BR>

<PRE>

<FONT COLOR="#000080">Let's see \begingroup \it how {\bf this grouping stuff} really

works \endgroup, shall we?</FONT></PRE>

<P>produces the following:

<BR>

<PRE>

<FONT COLOR="#000080">Let's see how this grouping stuff really

works, shall we?</FONT></PRE>

<P>You may have noted from the example that, in fact, groups can contain other groups.

<BR>

<BR>

<A NAME="E69E263"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Mathematical Symbols</B></FONT></CENTER></H4>

<BR>

<P>One of the most powerful features of TeX is its capability to generate correct mathematical notation for formulas with convenient commands. This is one of the key reasons behind TeX's popularity among engineers and scientists.

<BR>

<P>TeX 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 $ symbol to denote inline formulas, as in

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">The equation $2+3=x$ must evaluate to $x=5$.</FONT></PRE>

<P>which is generated as the following:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">The equation 2+3=x must evaluate to x=5.</FONT></PRE>

<P>However, displayed formulas are denoted using two consecutive $ symbols, as in

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">The equation $$2+3=x$$ must evaluate to $$x=5$$.</FONT></PRE>

<P>which produces the following:

<BR>

<PRE>

<FONT COLOR="#000080">The equation

2+3=x

must evaluate to

x=5.</FONT></PRE>

<P>Table 19.1 shows some of the math symbols that TeX can generate, their associated commands, and their meaning.

<BR>

<BR>

<P ALIGN=CENTER>

<CENTER>

<FONT COLOR="#000080"><B>Table 19.1. Some of the math symbols that </B><B>TeX</B><B> can generate.</B></FONT></CENTER>

<BR>



<TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Symbol</I>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>TeX</I><I> Command</I>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Meaning</I></FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

P

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

\pi

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Pi</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

&aring;

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

\sum

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Sum</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

{

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

\{

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Open bracket</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

}

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

\}

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Close bracket</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

&#166;

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

\int

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Integral</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

&#163;

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

\leq

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Less than or equal to</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

&#179;

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

\geq

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Greater than or equal to</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

&#185;

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

\neq

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Not equal to</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

&#183;

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

\bullet

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Bullet</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

_

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

\ldots

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Horizontal ellipsis</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

⌨️ 快捷键说明

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