[latexrefman-commits] [SCM] latexrefman updated: r719 - in trunk: . latex2e-help-texinfo-tree/la [more]

jimhefferon at gnu.org.ua jimhefferon at gnu.org.ua
Tue Oct 23 00:03:49 CEST 2018


Author: jimhefferon
Date: 2018-10-23 01:03:49 +0300 (Tue, 23 Oct 2018)
New Revision: 719

Modified:
   trunk/ChangeLog
   trunk/latex2e-help-texinfo-tree/latex2e/_005cmessage.html
   trunk/latex2e-help-texinfo-tree/latex2e/_005copenin-_0026-_005copenout.html
   trunk/latex2e-help-texinfo-tree/latex2e/_005cwrite.html
   trunk/latex2e.dbk
   trunk/latex2e.dvi
   trunk/latex2e.html
   trunk/latex2e.info
   trunk/latex2e.pdf
   trunk/latex2e.texi
   trunk/latex2e.txt
   trunk/latex2e.xml
Log:
adjust \openin

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2018-10-22 18:07:42 UTC (rev 718)
+++ trunk/ChangeLog	2018-10-22 22:03:49 UTC (rev 719)
@@ -1,3 +1,8 @@
+2018-10-22  Jim Hefferon  <jhefferon at smcvt.edu>
+
+	* latex2e.texi (\openin & \openout): Change description of \openin
+	to say it handles number allocation.
+
 2018-10-22  Karl Berry  <karl at freefriends.org>
 
 	* latex2e.texi (\write, etc.): small changes to text and examples.
@@ -2,3 +7,3 @@
 
-2018-10-21  Jim Hefferon  <jhefferon at smcvt.edu>
+2018-10-22  Jim Hefferon  <jhefferon at smcvt.edu>
 

Modified: trunk/latex2e-help-texinfo-tree/latex2e/_005cmessage.html
===================================================================
--- trunk/latex2e-help-texinfo-tree/latex2e/_005cmessage.html	2018-10-22 18:07:42 UTC (rev 718)
+++ trunk/latex2e-help-texinfo-tree/latex2e/_005cmessage.html	2018-10-22 22:03:49 UTC (rev 719)
@@ -138,7 +138,7 @@
 <p>With this example document body.
 </p>
 <div class="example">
-<pre class="example">before\message{One Two}\message{Three} \message{Four^^JI}
+<pre class="example">before\message{One Two}\message{Three}\message{Four^^JI}
 \message{declare a thumb war.}After
 </pre></div>
 
@@ -151,7 +151,8 @@
 </pre></div>
 
 <p>Note that <code>^^J</code> produces a newline.  Also, in the output document,
-between ‘<samp>before</samp>’ and ‘<samp>After</samp>’ will be a single space.
+between ‘<samp>before</samp>’ and ‘<samp>After</samp>’ will be a single space (from
+the end of line following ‘<samp>I}</samp>’).
 </p>
 <p>While <code>\message</code> allows you more control over formatting
 interaction lines, a gotcha is that LaTeX may mess up your formatting
@@ -160,7 +161,7 @@
 one given above.
 </p>
 <div class="example">
-<pre class="example">before\message{One}\message{Two Three} \message{Four^^JI}
+<pre class="example">before\message{One}\message{Two Three}\message{Four^^JI}
 \message{declare a thumb war.}After
 </pre></div>
 

Modified: trunk/latex2e-help-texinfo-tree/latex2e/_005copenin-_0026-_005copenout.html
===================================================================
--- trunk/latex2e-help-texinfo-tree/latex2e/_005copenin-_0026-_005copenout.html	2018-10-22 18:07:42 UTC (rev 718)
+++ trunk/latex2e-help-texinfo-tree/latex2e/_005copenin-_0026-_005copenout.html	2018-10-22 22:03:49 UTC (rev 719)
@@ -154,12 +154,19 @@
 </pre></div>
  
 <p>The <code>\newread</code> command allocates input stream numbers from 0
-to 15 (there is also a <code>\newwrite</code>).  Being able to work not
-with a number but with the more memorable <code>\presidentsfile</code> is just
-a convenience; the first line typed out is something like
-‘<samp>presidentsfile is 1</samp>’.  The second line is like ‘<samp>1 Washington,
-George</samp>’.
+to 15 (there is also a <code>\newwrite</code>).  The
+<code>\presidentsfile</code> is more memorable but under the hood it is still
+a number; the first <code>\typeout</code> gives something like
+‘<samp>presidentsfile is 1</samp>’.  In addition, <code>\newread</code> keeps track of
+the allocation so that if you use too many then you get an error like
+‘<samp>! No room for a new \read</samp>’.  The second <code>\typeout</code> gives the
+first line of the file, something like ‘<samp>1 Washington, George</samp>’.
 </p>
+<p>Ordinarily TeX will not try to open the file until the next page
+shipout. To change this, use
+<code>\immediate\openin<var>number</var>=<var>filename</var></code> or
+<code>\immediate\openout<var>number</var>=<var>filename</var></code>.
+</p>
 <p>Close files with <code>\closein<var>number</var></code> and
 <code>\closeout<var>number</var></code>.
 </p>
@@ -185,11 +192,6 @@
 the ten digits, along with underscore and dash, and in particular with
 no dot or space.
 </p>
-<p>Ordinarily TeX will not try to open the file until the next page
-shipout. To change this, use
-<code>\immediate\openin<var>number</var>=<var>filename</var></code> or
-<code>\immediate\openout<var>number</var>=<var>filename</var></code>.
-</p>
 <p>For <code>openin</code>, if TeX cannot find the file then it does not give
 an error.  It just considers that the stream is not open (test for this
 with <code>\ifeof</code>; one recourse is the command

Modified: trunk/latex2e-help-texinfo-tree/latex2e/_005cwrite.html
===================================================================
--- trunk/latex2e-help-texinfo-tree/latex2e/_005cwrite.html	2018-10-22 18:07:42 UTC (rev 718)
+++ trunk/latex2e-help-texinfo-tree/latex2e/_005cwrite.html	2018-10-22 22:03:49 UTC (rev 719)
@@ -131,7 +131,7 @@
 opened by <code>\openout</code>.  For instance, <code>\write6</code> writes to text
 stream number 6.
 </p>
-<p>If this appears in <samp><var>basefile</var>.tex</samp> then it opens
+<p>If the following appears in <samp><var>basefile</var>.tex</samp> then it opens
 <samp><var>basefile</var>.jh</samp>, writes ‘<samp>Hello World!</samp>’ and a newline to
 it, and closes that file.
 </p>
@@ -139,9 +139,9 @@
 <pre class="example">\newwrite\myfile
 \immediate\openout\myfile=\jobname.jh   % \jobname is current file name
   ...
-\write\myfile{Hello world!}
+\immediate\write\myfile{Hello world!}
   ...
-\closeout\myfile
+\immediate\closeout\myfile
 </pre></div>
 
 <p>The <code>\newwrite</code> allocates a stream number, giving it a symbolic
@@ -162,7 +162,7 @@
 puts ‘<samp>Hello World!</samp>’ followed by a newline in the terminal output.
 (But 16, 17, and 18 are special as <var>number</var>; see below.)
 </p>
-<p>In LuaLaTeX, instead of 16 output streams there are 256
+<p>In LuaTeX, instead of 16 output streams there are 256
 (see <a href="TeX-engines.html#TeX-engines">TeX engines</a>).
 </p>
 <p>Write to the current <samp>.aux</samp> file, which is associated with the main
@@ -222,11 +222,11 @@
 <pre class="example">\wlog{Parallel lines have a lot in common.^^JBut they never meet.}
 </pre></div>
 
-<p>The ability to Write files raises security issues.  If you compiled a
+<p>The ability to write files raises security issues. If you compiled a
 downloaded LaTeX file and it overwrote your password file then you
-would be annoyed.  TeX systems by default only allow you to open
-files for writing that are in the current directory or in a
-subdirectory.  This
+would be justifiably troubled. TeX systems by default only allow
+you to open files for writing that are in the current directory or in
+a subdirectory. This
 </p>
 <div class="example">
 <pre class="example">\newwrite\jhfile

Modified: trunk/latex2e.dbk
===================================================================
--- trunk/latex2e.dbk	2018-10-22 18:07:42 UTC (rev 718)
+++ trunk/latex2e.dbk	2018-10-22 22:03:49 UTC (rev 719)
@@ -16653,12 +16653,19 @@
 \typeout{\presidentline}
 </screen> 
 <para>The <literal>\newread</literal> command allocates input stream numbers from 0
-to 15 (there is also a <literal>\newwrite</literal>).  Being able to work not
-with a number but with the more memorable <literal>\presidentsfile</literal> is just
-a convenience; the first line typed out is something like
-‘<literal>presidentsfile is 1</literal>’.  The second line is like ‘<literal>1 Washington,
-George</literal>’.
+to 15 (there is also a <literal>\newwrite</literal>).  The
+<literal>\presidentsfile</literal> is more memorable but under the hood it is still
+a number; the first <literal>\typeout</literal> gives something like
+‘<literal>presidentsfile is 1</literal>’.  In addition, <literal>\newread</literal> keeps track of
+the allocation so that if you use too many then you get an error like
+‘<literal>! No room for a new \read</literal>’.  The second <literal>\typeout</literal> gives the
+first line of the file, something like ‘<literal>1 Washington, George</literal>’.
 </para>
+<para>Ordinarily &tex; will not try to open the file until the next page
+shipout. To change this, use
+<literal>\immediate\openin<replaceable>number</replaceable>=<replaceable>filename</replaceable></literal> or
+<literal>\immediate\openout<replaceable>number</replaceable>=<replaceable>filename</replaceable></literal>.
+</para>
 <para>Close files with <literal>\closein<replaceable>number</replaceable></literal> and
 <literal>\closeout<replaceable>number</replaceable></literal>.
 </para>
@@ -16682,11 +16689,6 @@
 the ten digits, along with underscore and dash, and in particular with
 no dot or space.
 </para>
-<para>Ordinarily &tex; will not try to open the file until the next page
-shipout. To change this, use
-<literal>\immediate\openin<replaceable>number</replaceable>=<replaceable>filename</replaceable></literal> or
-<literal>\immediate\openout<replaceable>number</replaceable>=<replaceable>filename</replaceable></literal>.
-</para>
 <para>For <literal>openin</literal>, if &tex; cannot find the file then it does not give
 an error.  It just considers that the stream is not open (test for this
 with <literal>\ifeof</literal>; one recourse is the command
@@ -16836,16 +16838,16 @@
 opened by <literal>\openout</literal>.  For instance, <literal>\write6</literal> writes to text
 stream number 6.
 </para>
-<para>If this appears in <filename><replaceable>basefile</replaceable>.tex</filename> then it opens
+<para>If the following appears in <filename><replaceable>basefile</replaceable>.tex</filename> then it opens
 <filename><replaceable>basefile</replaceable>.jh</filename>, writes ‘<literal>Hello World!</literal>’ and a newline to
 it, and closes that file.
 </para>
 <screen>\newwrite\myfile
 \immediate\openout\myfile=\jobname.jh   % \jobname is current file name
   ...
-\write\myfile{Hello world!}
+\immediate\write\myfile{Hello world!}
   ...
-\closeout\myfile
+\immediate\closeout\myfile
 </screen>
 <para>The <literal>\newwrite</literal> allocates a stream number, giving it a symbolic
 names to make life easier, so that <literal>test
@@ -16865,7 +16867,7 @@
 puts ‘<literal>Hello World!</literal>’ followed by a newline in the terminal output.
 (But 16, 17, and 18 are special as <replaceable>number</replaceable>; see below.)
 </para>
-<para>In Lua&latex;, instead of 16 output streams there are 256
+<para>In Lua&tex;, instead of 16 output streams there are 256
 (see <link linkend="TeX-engines">&tex; engines</link>).
 </para>
 <para>Write to the current <filename>.aux</filename> file, which is associated with the main
@@ -16920,11 +16922,11 @@
 </para>
 <screen>\wlog{Parallel lines have a lot in common.^^JBut they never meet.}
 </screen>
-<para>The ability to Write files raises security issues.  If you compiled a
+<para>The ability to write files raises security issues. If you compiled a
 downloaded &latex; file and it overwrote your password file then you
-would be annoyed.  &tex; systems by default only allow you to open
-files for writing that are in the current directory or in a
-subdirectory.  This
+would be justifiably troubled. &tex; systems by default only allow
+you to open files for writing that are in the current directory or in
+a subdirectory. This
 </para>
 <screen>\newwrite\jhfile
 \openout\jhfile=../test.jh
@@ -16965,7 +16967,7 @@
 </para>
 <para>With this example document body.
 </para>
-<screen>before\message{One Two}\message{Three} \message{Four^^JI}
+<screen>before\message{One Two}\message{Three}\message{Four^^JI}
 \message{declare a thumb war.}After
 </screen>
 <para>under some circumstances (see below) &latex; writes the following to
@@ -16975,7 +16977,8 @@
 I declare a thumb war.
 </screen>
 <para>Note that <literal>^^J</literal> produces a newline.  Also, in the output document,
-between ‘<literal>before</literal>’ and ‘<literal>After</literal>’ will be a single space.
+between ‘<literal>before</literal>’ and ‘<literal>After</literal>’ will be a single space (from
+the end of line following ‘<literal>I}</literal>’).
 </para>
 <para>While <literal>\message</literal> allows you more control over formatting
 interaction lines, a gotcha is that &latex; may mess up your formatting
@@ -16983,7 +16986,7 @@
 out. Contrast this document body, where the ‘<literal>Two</literal>’ has moved, to the
 one given above.
 </para>
-<screen>before\message{One}\message{Two Three} \message{Four^^JI}
+<screen>before\message{One}\message{Two Three}\message{Four^^JI}
 \message{declare a thumb war.}After
 </screen>
 <para>This can happen: when &latex; is outputting the messages to the

Modified: trunk/latex2e.dvi
===================================================================
(Binary files differ)

Modified: trunk/latex2e.html
===================================================================
--- trunk/latex2e.html	2018-10-22 18:07:42 UTC (rev 718)
+++ trunk/latex2e.html	2018-10-22 22:03:49 UTC (rev 719)
@@ -21913,12 +21913,19 @@
 </pre></div>
  
 <p>The <code>\newread</code> command allocates input stream numbers from 0
-to 15 (there is also a <code>\newwrite</code>).  Being able to work not
-with a number but with the more memorable <code>\presidentsfile</code> is just
-a convenience; the first line typed out is something like
-‘<samp>presidentsfile is 1</samp>’.  The second line is like ‘<samp>1 Washington,
-George</samp>’.
+to 15 (there is also a <code>\newwrite</code>).  The
+<code>\presidentsfile</code> is more memorable but under the hood it is still
+a number; the first <code>\typeout</code> gives something like
+‘<samp>presidentsfile is 1</samp>’.  In addition, <code>\newread</code> keeps track of
+the allocation so that if you use too many then you get an error like
+‘<samp>! No room for a new \read</samp>’.  The second <code>\typeout</code> gives the
+first line of the file, something like ‘<samp>1 Washington, George</samp>’.
 </p>
+<p>Ordinarily TeX will not try to open the file until the next page
+shipout. To change this, use
+<code>\immediate\openin<var>number</var>=<var>filename</var></code> or
+<code>\immediate\openout<var>number</var>=<var>filename</var></code>.
+</p>
 <p>Close files with <code>\closein<var>number</var></code> and
 <code>\closeout<var>number</var></code>.
 </p>
@@ -21944,11 +21951,6 @@
 the ten digits, along with underscore and dash, and in particular with
 no dot or space.
 </p>
-<p>Ordinarily TeX will not try to open the file until the next page
-shipout. To change this, use
-<code>\immediate\openin<var>number</var>=<var>filename</var></code> or
-<code>\immediate\openout<var>number</var>=<var>filename</var></code>.
-</p>
 <p>For <code>openin</code>, if TeX cannot find the file then it does not give
 an error.  It just considers that the stream is not open (test for this
 with <code>\ifeof</code>; one recourse is the command
@@ -22140,7 +22142,7 @@
 opened by <code>\openout</code>.  For instance, <code>\write6</code> writes to text
 stream number 6.
 </p>
-<p>If this appears in <samp><var>basefile</var>.tex</samp> then it opens
+<p>If the following appears in <samp><var>basefile</var>.tex</samp> then it opens
 <samp><var>basefile</var>.jh</samp>, writes ‘<samp>Hello World!</samp>’ and a newline to
 it, and closes that file.
 </p>
@@ -22148,9 +22150,9 @@
 <pre class="example">\newwrite\myfile
 \immediate\openout\myfile=\jobname.jh   % \jobname is current file name
   ...
-\write\myfile{Hello world!}
+\immediate\write\myfile{Hello world!}
   ...
-\closeout\myfile
+\immediate\closeout\myfile
 </pre></div>
 
 <p>The <code>\newwrite</code> allocates a stream number, giving it a symbolic
@@ -22171,7 +22173,7 @@
 puts ‘<samp>Hello World!</samp>’ followed by a newline in the terminal output.
 (But 16, 17, and 18 are special as <var>number</var>; see below.)
 </p>
-<p>In LuaLaTeX, instead of 16 output streams there are 256
+<p>In LuaTeX, instead of 16 output streams there are 256
 (see <a href="#TeX-engines">TeX engines</a>).
 </p>
 <p>Write to the current <samp>.aux</samp> file, which is associated with the main
@@ -22231,11 +22233,11 @@
 <pre class="example">\wlog{Parallel lines have a lot in common.^^JBut they never meet.}
 </pre></div>
 
-<p>The ability to Write files raises security issues.  If you compiled a
+<p>The ability to write files raises security issues. If you compiled a
 downloaded LaTeX file and it overwrote your password file then you
-would be annoyed.  TeX systems by default only allow you to open
-files for writing that are in the current directory or in a
-subdirectory.  This
+would be justifiably troubled. TeX systems by default only allow
+you to open files for writing that are in the current directory or in
+a subdirectory. This
 </p>
 <div class="example">
 <pre class="example">\newwrite\jhfile
@@ -22295,7 +22297,7 @@
 <p>With this example document body.
 </p>
 <div class="example">
-<pre class="example">before\message{One Two}\message{Three} \message{Four^^JI}
+<pre class="example">before\message{One Two}\message{Three}\message{Four^^JI}
 \message{declare a thumb war.}After
 </pre></div>
 
@@ -22308,7 +22310,8 @@
 </pre></div>
 
 <p>Note that <code>^^J</code> produces a newline.  Also, in the output document,
-between ‘<samp>before</samp>’ and ‘<samp>After</samp>’ will be a single space.
+between ‘<samp>before</samp>’ and ‘<samp>After</samp>’ will be a single space (from
+the end of line following ‘<samp>I}</samp>’).
 </p>
 <p>While <code>\message</code> allows you more control over formatting
 interaction lines, a gotcha is that LaTeX may mess up your formatting
@@ -22317,7 +22320,7 @@
 one given above.
 </p>
 <div class="example">
-<pre class="example">before\message{One}\message{Two Three} \message{Four^^JI}
+<pre class="example">before\message{One}\message{Two Three}\message{Four^^JI}
 \message{declare a thumb war.}After
 </pre></div>
 

Modified: trunk/latex2e.info
===================================================================
--- trunk/latex2e.info	2018-10-22 18:07:42 UTC (rev 718)
+++ trunk/latex2e.info	2018-10-22 22:03:49 UTC (rev 719)
@@ -14744,11 +14744,17 @@
      \typeout{\presidentline}
 
 The '\newread' command allocates input stream numbers from 0 to 15
-(there is also a '\newwrite').  Being able to work not with a number but
-with the more memorable '\presidentsfile' is just a convenience; the
-first line typed out is something like 'presidentsfile is 1'.  The
-second line is like '1 Washington, George'.
+(there is also a '\newwrite').  The '\presidentsfile' is more memorable
+but under the hood it is still a number; the first '\typeout' gives
+something like 'presidentsfile is 1'.  In addition, '\newread' keeps
+track of the allocation so that if you use too many then you get an
+error like '! No room for a new \read'.  The second '\typeout' gives the
+first line of the file, something like '1 Washington, George'.
 
+   Ordinarily TeX will not try to open the file until the next page
+shipout.  To change this, use '\immediate\openinNUMBER=FILENAME' or
+'\immediate\openoutNUMBER=FILENAME'.
+
    Close files with '\closeinNUMBER' and '\closeoutNUMBER'.
 
    How LaTeX handles filenames varies among distributions, and even can
@@ -14770,10 +14776,6 @@
 letters (not case-sensitive) and the ten digits, along with underscore
 and dash, and in particular with no dot or space.
 
-   Ordinarily TeX will not try to open the file until the next page
-shipout.  To change this, use '\immediate\openinNUMBER=FILENAME' or
-'\immediate\openoutNUMBER=FILENAME'.
-
    For 'openin', if TeX cannot find the file then it does not give an
 error.  It just considers that the stream is not open (test for this
 with '\ifeof'; one recourse is the command '\InputIfFileExists', *note
@@ -14912,15 +14914,16 @@
    Write 'string' to the log file, to the terminal, or to a file opened
 by '\openout'.  For instance, '\write6' writes to text stream number 6.
 
-   If this appears in 'BASEFILE.tex' then it opens 'BASEFILE.jh', writes
-'Hello World!' and a newline to it, and closes that file.
+   If the following appears in 'BASEFILE.tex' then it opens
+'BASEFILE.jh', writes 'Hello World!' and a newline to it, and closes
+that file.
 
      \newwrite\myfile
      \immediate\openout\myfile=\jobname.jh   % \jobname is current file name
        ...
-     \write\myfile{Hello world!}
+     \immediate\write\myfile{Hello world!}
        ...
-     \closeout\myfile
+     \immediate\closeout\myfile
 
 The '\newwrite' allocates a stream number, giving it a symbolic names to
 make life easier, so that 'test \newwrite\myfile\the\myfile' produces
@@ -14939,7 +14942,7 @@
 but also puts 'Hello World!' followed by a newline in the terminal
 output.  (But 16, 17, and 18 are special as NUMBER; see below.)
 
-   In LuaLaTeX, instead of 16 output streams there are 256 (*note TeX
+   In LuaTeX, instead of 16 output streams there are 256 (*note TeX
 engines::).
 
    Write to the current '.aux' file, which is associated with the main
@@ -14990,10 +14993,11 @@
 
      \wlog{Parallel lines have a lot in common.^^JBut they never meet.}
 
-   The ability to Write files raises security issues.  If you compiled a
+   The ability to write files raises security issues.  If you compiled a
 downloaded LaTeX file and it overwrote your password file then you would
-be annoyed.  TeX systems by default only allow you to open files for
-writing that are in the current directory or in a subdirectory.  This
+be justifiably troubled.  TeX systems by default only allow you to open
+files for writing that are in the current directory or in a
+subdirectory.  This
 
      \newwrite\jhfile
      \openout\jhfile=../test.jh
@@ -15035,7 +15039,7 @@
 
    With this example document body.
 
-     before\message{One Two}\message{Three} \message{Four^^JI}
+     before\message{One Two}\message{Three}\message{Four^^JI}
      \message{declare a thumb war.}After
 
    under some circumstances (see below) LaTeX writes the following to
@@ -15045,14 +15049,15 @@
      I declare a thumb war.
 
 Note that '^^J' produces a newline.  Also, in the output document,
-between 'before' and 'After' will be a single space.
+between 'before' and 'After' will be a single space (from the end of
+line following 'I}').
 
    While '\message' allows you more control over formatting interaction
 lines, a gotcha is that LaTeX may mess up your formatting because it
 inserts line breaks depending on what it has already put out.  Contrast
 this document body, where the 'Two' has moved, to the one given above.
 
-     before\message{One}\message{Two Three} \message{Four^^JI}
+     before\message{One}\message{Two Three}\message{Four^^JI}
      \message{declare a thumb war.}After
 
    This can happen: when LaTeX is outputting the messages to the
@@ -16840,7 +16845,7 @@
 * amsmath package, replacing eqnarray:   eqnarray.            (line   6)
 * amsthm package:                        theorem.             (line  28)
 * amsthm package <1>:                    \rule.               (line  18)
-* answers package:                       \write.              (line 107)
+* answers package:                       \write.              (line 109)
 * appendices:                            \appendix.           (line   6)
 * appendix:                              \appendix.           (line   6)
 * appendix package:                      \appendix.           (line  29)
@@ -17671,7 +17676,7 @@
                                                               (line  19)
 * package, amsthm:                       theorem.             (line  28)
 * package, amsthm <1>:                   \rule.               (line  18)
-* package, answers:                      \write.              (line 107)
+* package, answers:                      \write.              (line 109)
 * package, appendix:                     \appendix.           (line  29)
 * package, array (package):              array.               (line  77)
 * package, Asymptote:                    \line.               (line  36)
@@ -18666,24 +18671,24 @@
 Node: \telephone531173
 Node: Input/output531538
 Node: \openin & \openout532258
-Node: \read534834
-Node: \typein535912
-Node: \typeout537166
-Node: \write538216
-Node: \message543258
-Node: \wlog544985
-Node: \write18545488
-Node: Command line548158
-Node: Command line options550207
-Node: Command line input553784
-Node: Recovering from errors555647
-Node: Document templates556993
-Node: beamer template557438
-Node: article template558092
-Node: book template558519
-Node: Larger book template559000
-Node: tugboat template560486
-Node: Index562857
-Ref: Command Index562943
+Node: \read534994
+Node: \typein536072
+Node: \typeout537326
+Node: \write538376
+Node: \message543458
+Node: \wlog545221
+Node: \write18545724
+Node: Command line548394
+Node: Command line options550443
+Node: Command line input554020
+Node: Recovering from errors555883
+Node: Document templates557229
+Node: beamer template557674
+Node: article template558328
+Node: book template558755
+Node: Larger book template559236
+Node: tugboat template560722
+Node: Index563093
+Ref: Command Index563179
 
 End Tag Table

Modified: trunk/latex2e.pdf
===================================================================
(Binary files differ)

Modified: trunk/latex2e.texi
===================================================================
--- trunk/latex2e.texi	2018-10-22 18:07:42 UTC (rev 718)
+++ trunk/latex2e.texi	2018-10-22 22:03:49 UTC (rev 719)
@@ -18458,12 +18458,19 @@
  
 @noindent
 The @code{\newread} command allocates input stream numbers from 0
-to at tie{}15 (there is also a @code{\newwrite}).  Being able to work not
-with a number but with the more memorable @code{\presidentsfile} is just
-a convenience; the first line typed out is something like
- at samp{presidentsfile is 1}.  The second line is like @samp{1 Washington,
-George}.
+to at tie{}15 (there is also a @code{\newwrite}).  The
+ at code{\presidentsfile} is more memorable but under the hood it is still
+a number; the first @code{\typeout} gives something like
+ at samp{presidentsfile is 1}.  In addition, @code{\newread} keeps track of
+the allocation so that if you use too many then you get an error like
+ at samp{! No room for a new \read}.  The second @code{\typeout} gives the
+first line of the file, something like @samp{1 Washington, George}.
 
+Ordinarily @TeX{} will not try to open the file until the next page
+shipout. To change this, use
+ at code{\immediate\openin at var{number}=@var{filename}} or
+ at code{\immediate\openout at var{number}=@var{filename}}.
+
 Close files with @code{\closein at var{number}} and
 @code{\closeout at var{number}}.
 
@@ -18490,11 +18497,6 @@
 the ten digits, along with underscore and dash, and in particular with
 no dot or space.
 
-Ordinarily @TeX{} will not try to open the file until the next page
-shipout. To change this, use
- at code{\immediate\openin at var{number}=@var{filename}} or
- at code{\immediate\openout at var{number}=@var{filename}}.
-
 For @code{openin}, if @TeX{} cannot find the file then it does not give
 an error.  It just considers that the stream is not open (test for this
 with @code{\ifeof}; one recourse is the command

Modified: trunk/latex2e.txt
===================================================================
--- trunk/latex2e.txt	2018-10-22 18:07:42 UTC (rev 718)
+++ trunk/latex2e.txt	2018-10-22 22:03:49 UTC (rev 719)
@@ -13786,11 +13786,17 @@
      \typeout{\presidentline}
 
 The '\newread' command allocates input stream numbers from 0 to 15
-(there is also a '\newwrite').  Being able to work not with a number but
-with the more memorable '\presidentsfile' is just a convenience; the
-first line typed out is something like 'presidentsfile is 1'.  The
-second line is like '1 Washington, George'.
+(there is also a '\newwrite').  The '\presidentsfile' is more memorable
+but under the hood it is still a number; the first '\typeout' gives
+something like 'presidentsfile is 1'.  In addition, '\newread' keeps
+track of the allocation so that if you use too many then you get an
+error like '! No room for a new \read'.  The second '\typeout' gives the
+first line of the file, something like '1 Washington, George'.
 
+   Ordinarily TeX will not try to open the file until the next page
+shipout.  To change this, use '\immediate\openinNUMBER=FILENAME' or
+'\immediate\openoutNUMBER=FILENAME'.
+
    Close files with '\closeinNUMBER' and '\closeoutNUMBER'.
 
    How LaTeX handles filenames varies among distributions, and even can
@@ -13812,10 +13818,6 @@
 letters (not case-sensitive) and the ten digits, along with underscore
 and dash, and in particular with no dot or space.
 
-   Ordinarily TeX will not try to open the file until the next page
-shipout.  To change this, use '\immediate\openinNUMBER=FILENAME' or
-'\immediate\openoutNUMBER=FILENAME'.
-
    For 'openin', if TeX cannot find the file then it does not give an
 error.  It just considers that the stream is not open (test for this
 with '\ifeof'; one recourse is the command '\InputIfFileExists', *note
@@ -13942,15 +13944,16 @@
    Write 'string' to the log file, to the terminal, or to a file opened
 by '\openout'.  For instance, '\write6' writes to text stream number 6.
 
-   If this appears in 'BASEFILE.tex' then it opens 'BASEFILE.jh', writes
-'Hello World!' and a newline to it, and closes that file.
+   If the following appears in 'BASEFILE.tex' then it opens
+'BASEFILE.jh', writes 'Hello World!' and a newline to it, and closes
+that file.
 
      \newwrite\myfile
      \immediate\openout\myfile=\jobname.jh   % \jobname is current file name
        ...
-     \write\myfile{Hello world!}
+     \immediate\write\myfile{Hello world!}
        ...
-     \closeout\myfile
+     \immediate\closeout\myfile
 
 The '\newwrite' allocates a stream number, giving it a symbolic names to
 make life easier, so that 'test \newwrite\myfile\the\myfile' produces
@@ -13969,7 +13972,7 @@
 but also puts 'Hello World!' followed by a newline in the terminal
 output.  (But 16, 17, and 18 are special as NUMBER; see below.)
 
-   In LuaLaTeX, instead of 16 output streams there are 256 (*note TeX
+   In LuaTeX, instead of 16 output streams there are 256 (*note TeX
 engines::).
 
    Write to the current '.aux' file, which is associated with the main
@@ -14020,10 +14023,11 @@
 
      \wlog{Parallel lines have a lot in common.^^JBut they never meet.}
 
-   The ability to Write files raises security issues.  If you compiled a
+   The ability to write files raises security issues.  If you compiled a
 downloaded LaTeX file and it overwrote your password file then you would
-be annoyed.  TeX systems by default only allow you to open files for
-writing that are in the current directory or in a subdirectory.  This
+be justifiably troubled.  TeX systems by default only allow you to open
+files for writing that are in the current directory or in a
+subdirectory.  This
 
      \newwrite\jhfile
      \openout\jhfile=../test.jh
@@ -14056,7 +14060,7 @@
 
    With this example document body.
 
-     before\message{One Two}\message{Three} \message{Four^^JI}
+     before\message{One Two}\message{Three}\message{Four^^JI}
      \message{declare a thumb war.}After
 
    under some circumstances (see below) LaTeX writes the following to
@@ -14066,14 +14070,15 @@
      I declare a thumb war.
 
 Note that '^^J' produces a newline.  Also, in the output document,
-between 'before' and 'After' will be a single space.
+between 'before' and 'After' will be a single space (from the end of
+line following 'I}').
 
    While '\message' allows you more control over formatting interaction
 lines, a gotcha is that LaTeX may mess up your formatting because it
 inserts line breaks depending on what it has already put out.  Contrast
 this document body, where the 'Two' has moved, to the one given above.
 
-     before\message{One}\message{Two Three} \message{Four^^JI}
+     before\message{One}\message{Two Three}\message{Four^^JI}
      \message{declare a thumb war.}After
 
    This can happen: when LaTeX is outputting the messages to the
@@ -14597,36 +14602,36 @@
 
 * &:                                     tabular.           (line  4953)
 * * prompt:                              Recovering from errors.
-                                                            (line 14449)
+                                                            (line 14454)
 * *-form of environment commands:        \newenvironment & \renewenvironment.
                                                             (line  6784)
 * *-form of sectioning commands:         Sectioning.        (line  1988)
 * *-form, defining new commands:         \newcommand & \renewcommand.
                                                             (line  6426)
 * --disable-write18 command-line option: Command line options.
-                                                            (line 14351)
+                                                            (line 14356)
 * --enable-write18 command-line option:  Command line options.
-                                                            (line 14351)
+                                                            (line 14356)
 * --file-line-error command-line option: Command line options.
-                                                            (line 14378)
+                                                            (line 14383)
 * --halt-on-error command-line option:   Command line options.
-                                                            (line 14375)
+                                                            (line 14380)
 * --help command-line option:            Command line options.
-                                                            (line 14316)
+                                                            (line 14321)
 * --interaction command-line option:     Command line options.
-                                                            (line 14319)
+                                                            (line 14324)
 * --jobname command-line option:         Command line options.
-                                                            (line 14336)
+                                                            (line 14341)
 * --no-file-line-error command-line option: Command line options.
-                                                            (line 14378)
+                                                            (line 14383)
 * --no-shell-escape command-line option: Command line options.
-                                                            (line 14351)
+                                                            (line 14356)
 * --output-directory command-line option: Command line options.
-                                                            (line 14348)
+                                                            (line 14353)
 * --shell-escape command-line option:    Command line options.
-                                                            (line 14351)
+                                                            (line 14356)
 * --version command-line option:         Command line options.
-                                                            (line 14311)
+                                                            (line 14316)
 * .aux file:                             Output files.      (line   465)
 * .dvi file:                             Output files.      (line   442)
 * .glo file:                             Glossaries.        (line 13451)
@@ -14642,7 +14647,7 @@
 * .lot file <1>:                         Table of contents etc..
                                                             (line 12858)
 * .pdf file:                             Output files.      (line   452)
-* .tex, default extension:               Command line.      (line 14273)
+* .tex, default extension:               Command line.      (line 14278)
 * .toc file:                             Output files.      (line   475)
 * .toc file <1>:                         Table of contents etc..
                                                             (line 12858)
@@ -15246,7 +15251,7 @@
                                                             (line 10449)
 * \medspace:                             Spacing in math mode.
                                                             (line  9346)
-* \message:                              \message.          (line 14136)
+* \message:                              \message.          (line 14140)
 * \mho:                                  Math symbols.      (line  8452)
 * \mid:                                  Math symbols.      (line  8457)
 * \min:                                  Math functions.    (line  9192)
@@ -15456,7 +15461,7 @@
 * \rbrack:                               Math symbols.      (line  8618)
 * \rceil:                                Math symbols.      (line  8622)
 * \Re:                                   Math symbols.      (line  8625)
-* \read:                                 \read.             (line 13919)
+* \read:                                 \read.             (line 13921)
 * \ref:                                  \ref.              (line  2786)
 * \reflectbox:                           \scalebox.         (line 12030)
 * \refstepcounter:                       \refstepcounter.   (line  7345)
@@ -15551,7 +15556,7 @@
 * \star:                                 Math symbols.      (line  8736)
 * \stepcounter:                          \stepcounter.      (line  7363)
 * \stop:                                 Recovering from errors.
-                                                            (line 14449)
+                                                            (line 14454)
 * \strut:                                \strut.            (line 10497)
 * \subparagraph:                         Sectioning.        (line  1963)
 * \subparagraph <1>:                     \subsubsection & \paragraph & \subparagraph.
@@ -15692,8 +15697,8 @@
 * \tt:                                   Font styles.       (line  1296)
 * \ttfamily:                             Font styles.       (line  1255)
 * \twocolumn:                            \twocolumn.        (line  1541)
-* \typein:                               \typein.           (line 13949)
-* \typeout:                              \typeout.          (line 13994)
+* \typein:                               \typein.           (line 13951)
+* \typeout:                              \typeout.          (line 13996)
 * \u (breve accent):                     Accents.           (line 12453)
 * \unboldmath:                           \boldmath & \unboldmath.
                                                             (line  9019)
@@ -15745,11 +15750,11 @@
 * \wedge:                                Math symbols.      (line  8935)
 * \widehat:                              Math accents.      (line  9267)
 * \widetilde:                            Math accents.      (line  9270)
-* \wlog:                                 \wlog.             (line 14180)
+* \wlog:                                 \wlog.             (line 14185)
 * \wp:                                   Math symbols.      (line  8939)
 * \wr:                                   Math symbols.      (line  8942)
-* \write:                                \write.            (line 14027)
-* \write18:                              \write18.          (line 14198)
+* \write:                                \write.            (line 14029)
+* \write18:                              \write18.          (line 14203)
 * \Xi:                                   Math symbols.      (line  8945)
 * \xi:                                   Math symbols.      (line  8948)
 * \year:                                 \day & \month & \year.
@@ -15830,7 +15835,7 @@
 * amsmath package, replacing eqnarray:   eqnarray.          (line  3252)
 * amsthm package:                        theorem.           (line  5509)
 * amsthm package <1>:                    \rule.             (line 12575)
-* answers package:                       \write.            (line 14128)
+* answers package:                       \write.            (line 14132)
 * appendices:                            \appendix.         (line  2404)
 * appendix:                              \appendix.         (line  2404)
 * appendix package:                      \appendix.         (line  2427)
@@ -15849,7 +15854,7 @@
 * Asymptote package:                     \line.             (line  4410)
 * Asymptote package <1>:                 \strut.            (line 10553)
 * Asymptote package <2>:                 \mbox & \makebox.  (line 10785)
-* Asymptote package <3>:                 \write18.          (line 14205)
+* Asymptote package <3>:                 \write18.          (line 14210)
 * at clause, in font definitions:        \newfont.          (line  7022)
 * at-sign:                               \@.                (line 10140)
 * author, for titlepage:                 \maketitle.        (line  9731)
@@ -15871,7 +15876,7 @@
 * bar-over accent, math:                 Math accents.      (line  9238)
 * bar-under accent:                      Accents.           (line 12417)
 * basics of LaTeX:                       Overview.          (line   380)
-* beamer template and class:             beamer template.   (line 14476)
+* beamer template and class:             beamer template.   (line 14481)
 * beginning of document hook:            \AtBeginDocument.  (line  3153)
 * bibliography format, open:             Document class options.
                                                             (line   732)
@@ -16008,7 +16013,7 @@
 * colored boxes:                         Colored boxes.     (line 11288)
 * colored page:                          Colored pages.     (line 11325)
 * colored text:                          Colored text.      (line 11217)
-* command line:                          Command line.      (line 14261)
+* command line:                          Command line.      (line 14266)
 * command syntax:                        LaTeX command syntax.
                                                             (line   536)
 * commands, class and package:           Class and package commands.
@@ -16024,7 +16029,7 @@
                                                             (line  7093)
 * commands, redefining:                  \newcommand & \renewcommand.
                                                             (line  6407)
-* commands, run from LaTeX:              \write18.          (line 14198)
+* commands, run from LaTeX:              \write18.          (line 14203)
 * commands, star-variants:               \@ifstar.          (line  6611)
 * composite word mark, in text:          Text symbols.      (line 12280)
 * computer programs, typesetting:        verbatim.          (line  5556)
@@ -16054,7 +16059,7 @@
 * dagger, in text:                       Text symbols.      (line 12195)
 * dagger, in text <1>:                   Text symbols.      (line 12287)
 * DANTE e.V.:                            CTAN.              (line   625)
-* datatool package:                      \read.             (line 13943)
+* datatool package:                      \read.             (line 13945)
 * date, for titlepage:                   \maketitle.        (line  9739)
 * date, today's:                         \today.            (line 12598)
 * datetime package:                      \today.            (line 12619)
@@ -16103,7 +16108,7 @@
 * document classes:                      Document classes.  (line   637)
 * document environment:                  document.          (line  3147)
 * document templates:                    Document templates.
-                                                            (line 14469)
+                                                            (line 14474)
 * dollar sign:                           Text symbols.      (line 12293)
 * dot accent:                            Accents.           (line 12398)
 * dot over accent, math:                 Math accents.      (line  9250)
@@ -16222,7 +16227,7 @@
                                                             (line  7990)
 * extended Latin:                        Additional Latin letters.
                                                             (line 12506)
-* external commands:                     \write18.          (line 14198)
+* external commands:                     \write18.          (line 14203)
 * external files, writing:               filecontents.      (line  3386)
 * families, of fonts:                    Low-level font commands.
                                                             (line  1397)
@@ -16239,7 +16244,7 @@
                                                             (line 13857)
 * file, opening:                         \openin & \openout.
                                                             (line 13857)
-* file, reading:                         \read.             (line 13919)
+* file, reading:                         \read.             (line 13921)
 * file, root:                            Splitting the input.
                                                             (line 12633)
 * filecontents environment:              filecontents.      (line  3386)
@@ -16357,7 +16362,7 @@
 * hyperref package <1>:                  \footnotemark.     (line  6276)
 * hyperref package <2>:                  \pagenumbering.    (line  9804)
 * hyperref package <3>:                  Command line input.
-                                                            (line 14390)
+                                                            (line 14395)
 * hyphenation, defining:                 \hyphenation.      (line  5920)
 * hyphenation, discretionary:            \discretionary.    (line  5856)
 * hyphenation, forcing:                  \- (hyphenation).  (line  5821)
@@ -16402,7 +16407,7 @@
 * input file:                            Splitting the input.
                                                             (line 12629)
 * input, on command line:                Command line input.
-                                                            (line 14386)
+                                                            (line 14391)
 * input/output:                          Input/output.      (line 13848)
 * input/output, to terminal:             Input/output.      (line 13848)
 * inserting figures:                     figure.            (line  3328)
@@ -16529,7 +16534,7 @@
 * lrbox:                                 lrbox.             (line 11050)
 * lshort document:                       About this document.
                                                             (line   371)
-* ltugboat class:                        tugboat template.  (line 14600)
+* ltugboat class:                        tugboat template.  (line 14605)
 * lualatex command:                      TeX engines.       (line   508)
 * LuaTeX:                                TeX engines.       (line   508)
 * m-width:                               Units of length.   (line  7530)
@@ -16644,7 +16649,7 @@
 * options, color package:                Color package options.
                                                             (line 11105)
 * options, command line:                 Command line options.
-                                                            (line 14303)
+                                                            (line 14308)
 * options, document class:               Document class options.
                                                             (line   671)
 * options, document class <1>:           Class and package structure.
@@ -16690,13 +16695,13 @@
                                                             (line  9512)
 * package, amsthm:                       theorem.           (line  5509)
 * package, amsthm <1>:                   \rule.             (line 12575)
-* package, answers:                      \write.            (line 14128)
+* package, answers:                      \write.            (line 14132)
 * package, appendix:                     \appendix.         (line  2427)
 * package, array (package):              array.             (line  2949)
 * package, Asymptote:                    \line.             (line  4410)
 * package, Asymptote <1>:                \strut.            (line 10553)
 * package, Asymptote <2>:                \mbox & \makebox.  (line 10785)
-* package, Asymptote <3>:                \write18.          (line 14205)
+* package, Asymptote <3>:                \write18.          (line 14210)
 * package, babel:                        \chapter.          (line  2167)
 * package, babel <1>:                    thebibliography.   (line  5299)
 * package, babel <2>:                    Accents.           (line 12374)
@@ -16713,7 +16718,7 @@
 * package, cleveref <2>:                 \footnotemark.     (line  6267)
 * package, cprotect:                     verbatim.          (line  5576)
 * package, cprotect <1>:                 \verb.             (line  5634)
-* package, datatool:                     \read.             (line 13943)
+* package, datatool:                     \read.             (line 13945)
 * package, datetime:                     \today.            (line 12619)
 * package, dcolumn:                      array.             (line  2949)
 * package, enumitem:                     list.              (line  3893)
@@ -16735,7 +16740,7 @@
 * package, hyperref <1>:                 \footnotemark.     (line  6276)
 * package, hyperref <2>:                 \pagenumbering.    (line  9804)
 * package, hyperref <3>:                 Command line input.
-                                                            (line 14390)
+                                                            (line 14395)
 * package, indentfirst:                  \part.             (line  2092)
 * package, indentfirst <1>:              \chapter.          (line  2154)
 * package, indentfirst <2>:              \section.          (line  2249)
@@ -16773,7 +16778,7 @@
 * package, polyglossia <3>:              \index.            (line 13178)
 * package, PSTricks:                     \line.             (line  4410)
 * package, sagetex:                      Command line options.
-                                                            (line 14359)
+                                                            (line 14364)
 * package, setspace:                     Low-level font commands.
                                                             (line  1494)
 * package, showidx:                      Indexes.           (line 13118)
@@ -16879,7 +16884,7 @@
 * preamble, defined:                     Starting and ending.
                                                             (line   422)
 * prompt, *:                             Recovering from errors.
-                                                            (line 14449)
+                                                            (line 14454)
 * pronunciation:                         Overview.          (line   398)
 * PSTricks package:                      \line.             (line  4410)
 * pt:                                    Units of length.   (line  7502)
@@ -16900,7 +16905,7 @@
 * ragged left text, environment for:     flushright.        (line  3498)
 * ragged right text:                     \raggedright.      (line  3465)
 * ragged right text, environment for:    flushleft.         (line  3437)
-* read a file:                           \read.             (line 13919)
+* read a file:                           \read.             (line 13921)
 * redefining environments:               \newenvironment & \renewenvironment.
                                                             (line  6763)
 * reference, forward:                    Cross references.  (line  2685)
@@ -16941,7 +16946,7 @@
                                                             (line  1680)
 * running header and footer style:       \pagestyle.        (line  9823)
 * sagetex package:                       Command line options.
-                                                            (line 14359)
+                                                            (line 14364)
 * sans serif font:                       Font styles.       (line  1291)
 * Scaled point:                          Units of length.   (line  7528)
 * scaling:                               \scalebox.         (line 12030)
@@ -17066,14 +17071,14 @@
                                                             (line  2037)
 * tables, creating:                      table.             (line  4867)
 * tabular environment:                   tabular.           (line  4927)
-* template, article:                     article template.  (line 14507)
-* template, beamer:                      beamer template.   (line 14476)
-* template, book:                        book template.     (line 14527)
+* template, article:                     article template.  (line 14512)
+* template, beamer:                      beamer template.   (line 14481)
+* template, book:                        book template.     (line 14532)
 * template, book <1>:                    Larger book template.
-                                                            (line 14550)
-* template, TUGboat:                     tugboat template.  (line 14600)
+                                                            (line 14555)
+* template, TUGboat:                     tugboat template.  (line 14605)
 * templates, document:                   Document templates.
-                                                            (line 14469)
+                                                            (line 14474)
 * terminal input/output:                 Input/output.      (line 13848)
 * TeX logo:                              Text symbols.      (line 12242)
 * text symbols:                          Text symbols.      (line 12185)
@@ -17142,7 +17147,7 @@
 * trademark symbol:                      Text symbols.      (line 12360)
 * transcript file:                       Output files.      (line   460)
 * TrueType fonts:                        TeX engines.       (line   484)
-* TUGboat template:                      tugboat template.  (line 14600)
+* TUGboat template:                      tugboat template.  (line 14605)
 * two-column output:                     \twocolumn.        (line  1541)
 * two-thirds em-dash:                    Text symbols.      (line 12363)
 * twocolumn option:                      Document class options.

Modified: trunk/latex2e.xml
===================================================================
--- trunk/latex2e.xml	2018-10-22 18:07:42 UTC (rev 718)
+++ trunk/latex2e.xml	2018-10-22 22:03:49 UTC (rev 719)
@@ -3,7 +3,7 @@
 <texinfo xml:lang="en">
 <filename file="latex2e.xml"></filename>
 <preamble>\input texinfo
-</preamble><!-- c $Id: latex2e.texi 716 2018-10-21 21:39:31Z jimhefferon $ -->
+</preamble><!-- c $Id: latex2e.texi 718 2018-10-22 18:07:42Z karl $ -->
 <!-- comment %**start of header (This is for running Texinfo on a region.) -->
 <setfilename file="latex2e.info" spaces=" ">latex2e.info</setfilename>
 <set name="UPDATED" line=" UPDATED October 2018">October 2018</set>
@@ -18818,12 +18818,19 @@
  
 <noindent></noindent>
 <para>The <code>\newread</code> command allocates input stream numbers from 0
-to 15 (there is also a <code>\newwrite</code>).  Being able to work not
-with a number but with the more memorable <code>\presidentsfile</code> is just
-a convenience; the first line typed out is something like
-<samp>presidentsfile is 1</samp>.  The second line is like <samp>1 Washington,
-George</samp>.
+to 15 (there is also a <code>\newwrite</code>).  The
+<code>\presidentsfile</code> is more memorable but under the hood it is still
+a number; the first <code>\typeout</code> gives something like
+<samp>presidentsfile is 1</samp>.  In addition, <code>\newread</code> keeps track of
+the allocation so that if you use too many then you get an error like
+<samp>! No room for a new \read</samp>.  The second <code>\typeout</code> gives the
+first line of the file, something like <samp>1 Washington, George</samp>.
 </para>
+<para>Ordinarily &tex; will not try to open the file until the next page
+shipout. To change this, use
+<code>\immediate\openin<var>number</var>=<var>filename</var></code> or
+<code>\immediate\openout<var>number</var>=<var>filename</var></code>.
+</para>
 <para>Close files with <code>\closein<var>number</var></code> and
 <code>\closeout<var>number</var></code>.
 </para>
@@ -18850,11 +18857,6 @@
 the ten digits, along with underscore and dash, and in particular with
 no dot or space.
 </para>
-<para>Ordinarily &tex; will not try to open the file until the next page
-shipout. To change this, use
-<code>\immediate\openin<var>number</var>=<var>filename</var></code> or
-<code>\immediate\openout<var>number</var>=<var>filename</var></code>.
-</para>
 <para>For <code>openin</code>, if &tex; cannot find the file then it does not give
 an error.  It just considers that the stream is not open (test for this
 with <code>\ifeof</code>; one recourse is the command
@@ -19032,7 +19034,7 @@
 opened by <code>\openout</code>.  For instance, <code>\write6</code> writes to text
 stream number 6.
 </para>
-<para>If this appears in <file><var>basefile</var>.tex</file> then it opens
+<para>If the following appears in <file><var>basefile</var>.tex</file> then it opens
 <file><var>basefile</var>.jh</file>, writes <samp>Hello World!</samp> and a newline to
 it, and closes that file.
 </para>
@@ -19040,9 +19042,9 @@
 <pre xml:space="preserve">\newwrite\myfile
 \immediate\openout\myfile=\jobname.jh   % \jobname is current file name
   ...
-\write\myfile{Hello world!}
+\immediate\write\myfile{Hello world!}
   ...
-\closeout\myfile
+\immediate\closeout\myfile
 </pre></example>
 
 <noindent></noindent>
@@ -19064,7 +19066,7 @@
 puts <samp>Hello World!</samp> followed by a newline in the terminal output.
 (But 16, 17, and 18 are special as <var>number</var>; see below.)
 </para>
-<para>In Lua&latex;, instead of 16 output streams there are 256
+<para>In Lua&tex;, instead of 16 output streams there are 256
 (<pxref label="TeX-engines"><xrefnodename>&tex; engines</xrefnodename></pxref>).
 </para>
 <para>Write to the current <file>.aux</file> file, which is associated with the main
@@ -19126,11 +19128,11 @@
 <pre xml:space="preserve">\wlog{Parallel lines have a lot in common.^^JBut they never meet.}
 </pre></example>
 
-<para>The ability to Write files raises security issues.  If you compiled a
+<para>The ability to write files raises security issues. If you compiled a
 downloaded &latex; file and it overwrote your password file then you
-would be annoyed.  &tex; systems by default only allow you to open
-files for writing that are in the current directory or in a
-subdirectory.  This
+would be justifiably troubled. &tex; systems by default only allow
+you to open files for writing that are in the current directory or in
+a subdirectory. This
 </para>
 <example endspaces=" ">
 <pre xml:space="preserve">\newwrite\jhfile
@@ -19182,7 +19184,7 @@
 <para>With this example document body.
 </para>
 <example endspaces=" ">
-<pre xml:space="preserve">before\message{One Two}\message{Three} \message{Four^^JI}
+<pre xml:space="preserve">before\message{One Two}\message{Three}\message{Four^^JI}
 \message{declare a thumb war.}After
 </pre></example>
 
@@ -19196,7 +19198,8 @@
 
 <noindent></noindent>
 <para>Note that <code>^^J</code> produces a newline.  Also, in the output document,
-between <samp>before</samp> and <samp>After</samp> will be a single space.
+between <samp>before</samp> and <samp>After</samp> will be a single space (from
+the end of line following <samp>I}</samp>).
 </para>
 <para>While <code>\message</code> allows you more control over formatting
 interaction lines, a gotcha is that &latex; may mess up your formatting
@@ -19205,7 +19208,7 @@
 one given above.
 </para>
 <example endspaces=" ">
-<pre xml:space="preserve">before\message{One}\message{Two Three} \message{Four^^JI}
+<pre xml:space="preserve">before\message{One}\message{Two Three}\message{Four^^JI}
 \message{declare a thumb war.}After
 </pre></example>
 



More information about the latexrefman-commits mailing list