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-newlineargs.html | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-newlineargs.html (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-newlineargs.html') diff --git a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-newlineargs.html b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-newlineargs.html new file mode 100644 index 00000000000..ea8b6608c1d --- /dev/null +++ b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-newlineargs.html @@ -0,0 +1,58 @@ + +UK TeX FAQ -- question label newlineargs + +

Start of line goes awry

+ +

This answer concerns two sorts of problems: errors of the form +

+
+! Missing number, treated as zero.
+<to be read again> 
+                   g
+<*> [grump]
+
+

+and those where a single asterisk at the start of a line mysteriously +fails to appear in the output. +

Both problems arise because \\ takes optional arguments. The +command \\* means “break the line here, and inhibit page break +following the line break”; the command \\[<dimen>] +means “break the line here and add <dimen> extra vertical space +afterwards”. +

So why does \\ get confused by these things at the start of a +line? It’s looking for the first non-blank thing, and in the test it +uses ignores the end of the line in your input text. +

The solution is to enclose the stuff at the start of the new line in +braces: +

+
+{\ttfamily
+  /* C-language comment\\
+  {[grump]} I don't like this format\\
+  {*}/
+}
+
+

+(The above text derives from an actual post to +comp.text.tex; this particular bit of typesetting could +plainly also be done using the verbatim environment.) +

The problem also appears in maths mode, in arrays and so on. In this +case, large-scale bracketing of things is not a good idea; the +TeX primitive \relax (which does nothing except to block +searches of this nature) may be used. From another +comp.text.tex example: +

+
+\begin{eqnarray}
+  [a] &=& b \\
+  \relax[a] &=& b
+\end{eqnarray}
+
+

+which is a usage this FAQ would not recommend, anyway: refer +to the reason not to use eqnarray. +

Note that the amsmath package modifies the behaviour of +\\ in maths. With amsmath, the eqnarray +example doesn’t need any special measures. +

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