\,inserts a\thinspace(equivalent to.16667em) in text mode, or\thinmuskip(equivalent to3mu) in math mode;\!inserts a negative\thinmuskipin math mode;\>inserts\medmuskip(equivalent to4.0mu plus 2.0mu minus 4.0mu) in math mode;\;inserts\thickmuskip(equivalent to5.0mu plus 5.0mu) in math mode;\:is equivalent to\>(see above);\enspaceinserts a space of.5emin text or math mode;\quadinserts a space of1emin text or math mode;\qquadinserts a space of2emin text or math mode;\kern <len>inserts a skip of<len>(may be negative) in text or math mode (a plain TeX skip);\hskip <len>(similar to\kern);\hspace{<len>}inserts a space of length<len>(may be negative) in math or text mode (a LaTeX\hskip);\hphantom{<stuff>}inserts space of length equivalent to<stuff>in math or text mode. Should be\protected when used in fragile commands (like\captionand sectional headings);\inserts what is called a "control space" (in text or math mode);inserts an inter-word space in text mode (and is gobbled in math mode). Similarly for\spaceand{ }.~inserts an "unbreakable" space (similar to an HTML ) (in text or math mode);\hfillinserts a so-called "rubber length" or stretch between elements (in text or math mode). Note that you may need to provide a type of anchor to fill from/to; see What is the difference between\hspace*{\fill}and\hfill?;
$\:$.Try this in Latex document":
\documentclass{article}
\setlength{\parindent}{0pt}% Just for this example
\begin{document}
There are a number of horizontal spacing macros for LaTeX:
\begin{tabular}{lp{5cm}}
\verb|a\,b| & a\,b \\
\verb|$a\,b$| & $a\,b$ \\
\verb|a\thinspace b| & a\thinspace b \\
\verb|$a\thinspace b$| & $a\thinspace b$ \\
\verb|$a\!b$| & $a\!b$ \\
\verb|$a\mkern-\thinmuskip b$| & $a\mkern-\thinmuskip b$ \\
\verb|$a\>b$| & $a\>b$ \\
\verb|$a\mkern\medmuskip b$| & $a\mkern\medmuskip b$ \\
\verb|$a\;b$| & $a\;b$ \\
\verb|$a\mkern\thickmuskip b$| & $a\mkern\thickmuskip b$ \\
\verb|$a\:b$| & $a\:b$ \\
\verb|$a\mkern\medmuskip b$| & $a\mkern\medmuskip b$ \\
\verb|a\enspace b| & a\enspace b \\
\verb|$a\enspace b$| & $a\enspace b$ \\
\verb|a\quad b| & a\quad b \\
\verb|$a\quad b$| & $a\quad b$ \\
\verb|a\qquad b| & a\qquad b \\
\verb|$a\qquad b$| & $a\qquad b$ \\
\verb|a\hskip 1em b| & a\hskip 1em b \\
\verb|$a\hskip 1em b$| & $a\hskip 1em b$ \\
\verb|a\kern 1pc b| & a\kern 1pc b \\
\verb|$a\kern 1pc b$| & $a\kern 1pc b$ \\
\verb|a\hspace{35pt}b| & a\hspace{35pt}b \\
\verb|$a\hspace{35pt}b$| & $a\hspace{35pt}b$ \\
\verb|axyzb| & axyzb \\
\verb|a\hphantom{xyz}b| & a\hphantom{xyz}b \\
\verb|$axyzb$| & $axyzb$ \\
\verb|$a\hphantom{xyz}b$| & $a\hphantom{xyz}b$ \\
\verb|a{ }b| & a{ }b \\
\verb|$a{ }b$| & $a{ }b$ \\
\verb|a\space b| & a\space b \\
\verb|$a\space b$| & $a\space b$ \\
\verb|a\ b| & a\ b \\
\verb|$a\ b$| & $a\ b$ \\
\verb|a~b| & a~b \\
\verb|$a~b$| & $a~b$ \\
\verb|a\hfill b| & a\hfill b \\
\verb|$a\hfill b$| & $a\hfill b$
\end{tabular}
\end{document}
No comments:
Post a Comment