summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-10-09 00:17:30 +0000
committerKarl Berry <karl@freefriends.org>2013-10-09 00:17:30 +0000
commit6ae8f0974768da24d4bcfff401e0f660c0b9fb5d (patch)
tree7d30ffa224cef20b8d5bcc4a4a6dfee90e4ca148 /Master/texmf-dist/source/latex/l3kernel/l3file.dtx
parentad8c0db83542b88b7a3d63af382ccc630df38d03 (diff)
l3 (8oct13)
git-svn-id: svn://tug.org/texlive/trunk@31865 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3file.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3file.dtx34
1 files changed, 30 insertions, 4 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
index 3e2f06dacce..a20994ed5d5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3file.dtx 4581 2013-07-28 08:38:50Z joseph $
+\GetIdInfo$Id: l3file.dtx 4591 2013-08-29 20:29:36Z joseph $
{L3 File and I/O operations}
%</driver|package>
%<*driver>
@@ -253,7 +253,23 @@
% \meta{stream} is not open, input is requested from the terminal.
% The material read from the \meta{stream} will be tokenized by
% \TeX{} according to the category codes in force when the function
-% is used.
+% is used. Note that any blank lines will be converted to the token
+% \cs{par}. Therefore, if skipping blank lines is requires a test such as
+% \begin{verbatim}
+% \ior_get:NN \l_my_stream \l_tmpa_tl
+% \tl_set:Nn \l_tmpb_tl { \par }
+% \tl_if_eq:NNF \l_tmpa_tl \l_tmpb_tl
+% ...
+% \end{verbatim}
+% may be used. Also notice that if multiple lines are read to match braces
+% then the resulting token list will contain \cs{par} tokens. As normal
+% \TeX{} tokenization is in force, any lines which do not end in a comment
+% character (usually |%|) will have the line ending converted to a space,
+% so for example input
+% \begin{verbatim}
+% a b c
+% \end{verbatim}
+% will result in a token list |a b c |.
% \begin{texnote}
% This protected macro expands to the \TeX{} primitive \tn{read}
% along with the |to| keyword.
@@ -262,14 +278,24 @@
%
% \begin{function}[added = 2012-06-24, updated = 2012-07-31]{\ior_get_str:NN}
% \begin{syntax}
-% \cs{ior_get_str:NN} \meta{stream} \meta{token list variable}
-% \end{syntax}
+% \cs{ior_get_str:NN} \meta{stream} \meta{token list variable
+% \end{syntax}}
% Function that reads one line from the input \meta{stream} and stores
% the result locally in the \meta{token list} variable. If the
% \meta{stream} is not open, input is requested from the terminal.
% The material is read from the \meta{stream} as a series of tokens with
% category code $12$ (other), with the exception of space
% characters which are given category code $10$ (space).
+% Multiple whitespace characters are retained by this process. It will
+% always only read one line and any blank lines in the input
+% will result in the \meta{token list variable} being empty. Unlike
+% \cs{ior_get:NN}, line ends do not receive any special treatment. Thus
+% input
+% \begin{verbatim}
+% a b c
+% \end{verbatim}
+% will result in a token list |a b c| with the letters |a|, |b|, and |c|
+% having category code~12.
% \begin{texnote}
% This protected macro is a wrapper around the \eTeX{} primitive
% \tn{readline}. However, the end-line character normally added by