summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-newlineargs.html
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-05-22 23:51:44 +0000
committerKarl Berry <karl@freefriends.org>2009-05-22 23:51:44 +0000
commit566f5207d7e3cafb0633d31277067336ccd9cca7 (patch)
tree7af53e7ac405185168bc1dc38c4e820f442b78d0 /Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-newlineargs.html
parentb0beea26ffffd915bb6d9b82f2d65a0a05b7e23b (diff)
move generic english documents out of texmf-doc
git-svn-id: svn://tug.org/texlive/trunk@13396 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-newlineargs.html')
-rw-r--r--Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-newlineargs.html58
1 files changed, 58 insertions, 0 deletions
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 @@
+<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.
+&lt;to be read again&gt;
+ g
+&lt;*&gt; [grump]
+</pre>
+</blockquote><p>
+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 &ldquo;break the line here, and inhibit page break
+following the line break&rdquo;; the command <code>\</code><code>\[</code>&lt;<i>dimen</i>&gt;<code>]</code>
+means &ldquo;break the line here and add &lt;<i>dimen</i>&gt; extra vertical space
+afterwards&rdquo;.
+<p/>So why does <code>\</code><code>\</code> get confused by these things at the start of a
+line? It&rsquo;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><p>
+(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{eqnarray}
+ [a] &=& b \\
+ \relax[a] &=& b
+\end{eqnarray}
+</pre>
+</blockquote><p>
+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&rsquo;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>