Monday, May 18, 2009

Parskip

\parskip

\parskip is the extra vertical space inserted before a paragraph. It has a natural length of zero but should be a rubber length so that it may be stretched in a flushbottom environment.

To increase \parskip to skip a line between paragraphs one could use

\addtolength{\parskip}{\baselineskip}
\baselineskip \baselinestretch

\baselineskip is a length command which specifies the minimum space between the botton of two successive lines in a paragraph. Its value may be automatically reset by LaTeX, for example, by font changes in the text. The value used for an entire paragraph is the value in effect at the blank line or command which ends the paragraph unit.

\baselinestretch scales the value of \baselineskip. Its default value is 1.0 but it may be reset with a \renewcommand command. If one wants to change the spacing in a document one should reset \baselinestretch and not \baselineskip as the latter may be reset automatically by LaTeX to account for local variations in the text, but it is always scaled by the former. In principle, "double spacing" can be obtained by \renewcommand{\baselinestretch}{2}.

\textwidth \linewidth

\textwidth is the normal width of the text on a page. It should generally be changed only in the preamble.

\linewidth is the width of lines in the current environment. Normally equal to \textwidth, it may be different within an environment such as list or quote environments

The \unitlength command is a Length command. It defines the units used in the Picture Environment.

The default value is 1 point (approximately 1/72 inch) but it may be changed using the \setlength command.

\newlength

\newlength{\gnat}

The \newlength command defines the mandatory argument, \gnat, as a length command with a value of 0in. An error occurs if a \gnat command already exists.

\setlength

\setlength{len-cmd}{len}

The \setlength command is used to set the value of a length command, len-cmd, which is specified as the first argument. The len argument can be expressed in any terms of length LaTeX understands, i.e., inches (in), millimeters (mm), points (pt), etc.

\addtolength{len-cmd}{len}

The \addtolength command increments a length command, len-cmd, which is specified by the first argument, by the amount specified in the len argument. It can be a negative amount.

As an example,

\addtolength{\parskip}{-.1\parskip}

decreases the value of \parskip by 10%.

\settowidth

\settowidth{len-cmd}{text}

The \settowidth command sets the value of a length command, len-cmd, which is specified as the first argument, equal to the width of the text argument in the current font.

\settoheight{len-cmd}{text}

The \settoheight command sets the value of a length command, len-cmd, which is specified as the first argument, equal to the maximum height of the text argument in the current font.

For example,

\settoheight{\baselineskip}{Xanadu}
\setlength{\baselineskip}{1.5\baselineskip}

would set the value of \baselineskip to 1.5 times the height of the capital "X".

\settodepth{len-cmd}{text}

The \settodepth command sets the value of a length command, len-cmd, which is specified as the first argument, equal to the depth (distance below the baseline) of the text argument in the current font.

The \hfill fill command produces a rubber length which can stretch or shrink horizontally. It will be filled with spaces. It is equivalent to \hspace\fill.

\hspace[*]{len}

The \hspace command adds horizontal space. The length of the space len can be expressed in any terms that LaTeX understands, i.e., points, inches, etc. You can add negative as well as positive space with an \hspace command. Adding negative space is like backspacing.

LaTeX removes horizontal space that comes at the end of a line. If you don't want LaTeX to remove this space, include the optional * argument. Then the space is never removed.

\addvspace{length}

The \addvspace command normally adds a vertical space of height length. However, if vertical space has already been added to the same point in the output by a previous \addvspace command, then this command will not add more space than needed to make the natural length of the total vertical space equal to length.

\smallskip

The \smallskip command is equivalent to \vspace{\smallskipamount} where \smallskipamount is determined by the document style.

\medskip

The \medskip command is equivalent to \vspace{\medskipamount} where \medskipamount is determined by the document style.

\bigskip

The \bigskip command is equivalent to \vspace{\bigskipamount} where \bigskipamount is determined by the document style.

\vfill

The \vfill fill command produces a rubber length which can stretch or shrink vertically. It is equivalent to a blank line followed by \vspace\fill. It should be used only in paragraph mode.

\vspace

\vspace[*]{length}

The \vspace command adds vertical space. The length of the space can be expressed in any terms that LaTeX understands, i.e., points, inches, etc. You can add negative as well as positive space with an \vspace command.

If \vspace appears in the middle of a paragraph the space is added after the line containing it.

LaTeX removes vertical space that comes at the end of a page. If you don't want LaTeX to remove this space, include the optional * argument. Then the space is never removed.

No comments:

Post a Comment