From 566f5207d7e3cafb0633d31277067336ccd9cca7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 22 May 2009 23:51:44 +0000 Subject: move generic english documents out of texmf-doc git-svn-id: svn://tug.org/texlive/trunk@13396 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/generic/FAQ-en/html/FAQ-plninltxstar.html | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-plninltxstar.html (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-plninltxstar.html') diff --git a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-plninltxstar.html b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-plninltxstar.html new file mode 100644 index 00000000000..d99a905e43c --- /dev/null +++ b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-plninltxstar.html @@ -0,0 +1,52 @@ + +UK TeX FAQ -- question label plninltx* + +

Using Plain or primitive commands in LaTeX

+

It’s well-known that LaTeX commands tend to be more complex, and to +run more slowly than, any Plain TeX (or primitive) command that they +replace. There is therefore great temptation not to use LaTeX +commands when macro programming. Nevertheless, the general rule is +that you should use LaTeX commands, if there are seeming +equivalents. The exception is when you are sure you know the +differences between the two commands and you know that you need the +Plain TeX version. So, for example, use \mbox in place of \hbox +unless you know that the extras that LaTeX provides in \mbox +would cause trouble in your application. Similarly, use +\newcommand (or one of its relatives) unless you need one of the +constructs that cannot be achieved without the use of \def (or friends). +

As a general rule, any LaTeX text command will start a new +paragraph if necessary; this isn’t the case with Plain TeX +commands, a fact which has a potential to confuse. +

The commands \smallskip, \medskip and \bigskip exist both +in Plain TeX and LaTeX, but behave slightly differently: in +Plain TeX they terminate the current paragraph, but in LaTeX they +don’t. The command \line is part of picture mode in LaTeX, +whereas it’s defined as “\hbox to \hsize” in +Plain TeX. (There’s no equivalent for users of the Plain TeX command in +LaTeX: an equivalent appears as the internal command \@@line). +

Maths setting shows a case where the LaTeX version is +essentially equivalent to the TeX primitive commands: the LaTeX +\( ... \) does essentially no different to the +TeX $ ... $ +(except for checking that you’re not attempting to open a maths +environment when you’re already in one, or vice versa). +However, \[ ... \] isn’t the same as +$$ ... $$: the TeX version, used +in LaTeX, can miss the effect of the class option fleqn. +

Font handling is, of course, wildly different in Plain TeX and +LaTeX. Plain TeX’s font loading command +(\font\foo=<fontname>) and its LaTeX equivalent +(\newfont) should be avoided wherever possible. They are only +safe in the most trivial contexts, and are potential sources of great +confusion in many circumstances. Further discussion of this issue +may be found in “What’s wrong with \newfont?”. + + + + + + + + +

This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=plninltx* + -- cgit v1.2.3