diff options
Diffstat (limited to 'Master/texmf-doc/doc/english/FAQ-en/html/FAQ-newlineargs.html')
-rw-r--r-- | Master/texmf-doc/doc/english/FAQ-en/html/FAQ-newlineargs.html | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/Master/texmf-doc/doc/english/FAQ-en/html/FAQ-newlineargs.html b/Master/texmf-doc/doc/english/FAQ-en/html/FAQ-newlineargs.html new file mode 100644 index 00000000000..f30cab61497 --- /dev/null +++ b/Master/texmf-doc/doc/english/FAQ-en/html/FAQ-newlineargs.html @@ -0,0 +1,58 @@ +<head> +<title>UK TeX FAQ -- question label newlineargs</title> +</head><body> +<h3>Start of line goes awry</h3> +<!-- asterisk square bracket start line --> +<p>This answer concerns two sorts of problems: errors of the form +<blockquote> +<pre> +! Missing number, treated as zero. +<to be read again> + g +<*> [grump] +</pre> +</blockquote> +and those where a single asterisk at the start of a line mysteriously +fails to appear in the output. +<p>Both problems arise because <code>\</code><code>\</code> takes optional arguments. The +command <code>\</code><code>\*</code> means "break the line here, and inhibit page break +following the line break"; the command <code>\</code><code>\[</code><<i>dimen</i>><code>]</code> +means "break the line here and add <<i>dimen</i>> extra vertical space +afterwards". +<p>So why does <code>\</code><code>\</code> 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. +<p>The solution is to enclose the stuff at the start of the new line in +braces: +<blockquote> +<pre> +{\ttfamily + /* C-language comment\\ + {[grump]} I don't like this format\\ + {*}/ +} +</pre> +</blockquote> +(The above text derives from an actual post to +<i>comp.text.tex</i>; this particular bit of typesetting could +plainly also be done using the <code>verbatim</code> environment.) +<p>The problem also appears in maths mode, in arrays and so on. In this +case, large-scale bracketing of things is <em>not</em> a good idea; the +TeX primitive <code>\</code><code>relax</code> (which does nothing except to block +searches of this nature) may be used. From another +<i>comp.text.tex</i> example: +<blockquote> +<pre> +\begin{eqnarry} + [a] &=& b \\ + \relax[a] &=& b +\end{eqnarry} +</pre> +</blockquote> +which is a usage this FAQ would not recommend, anyway: refer +to the <a href="FAQ-eqnarray.html">reason not to use <code>eqnarray</code></a>. +<p>Note that the <i>amsmath</i> package modifies the behaviour of +<code>\\</code> in maths. With <i>amsmath</i>, the <code>eqnarray</code> +example doesn't need any special measures. +<p><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=newlineargs">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=newlineargs</a> +</body> |