diff options
Diffstat (limited to 'tex/context/base/mkiv/file-ini.mkvi')
-rw-r--r-- | tex/context/base/mkiv/file-ini.mkvi | 54 |
1 files changed, 24 insertions, 30 deletions
diff --git a/tex/context/base/mkiv/file-ini.mkvi b/tex/context/base/mkiv/file-ini.mkvi index 225b6b40d..5341cc07b 100644 --- a/tex/context/base/mkiv/file-ini.mkvi +++ b/tex/context/base/mkiv/file-ini.mkvi @@ -10,9 +10,8 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -%D \TEX\ operates on files, so one wouldn't wonder that there -%D is a separate module for file commands. In \CONTEXT\ files -%D are used for several purposes: +%D \TEX\ operates on files, so one wouldn't wonder that there is a separate module +%D for file commands. In \CONTEXT\ files are used for several purposes: %D %D \startitemize[packed] %D \item general textual input @@ -21,10 +20,9 @@ %D \item buffering defered textual input %D \stopitemize %D -%D When dealing with files we can load them as a whole, using -%D the \type{\input} primitive or load them on a line||by||line -%D basis, using \type{\read}. Writing is always done line by -%D line, using \type{\write}. +%D When dealing with files we can load them as a whole, using the \type {\input} +%D primitive or load them on a line||by||line basis, using \type {\read}. Writing is +%D always done line by line, using \type {\write}. \writestatus{loading}{ConTeXt File Macros / Helpers} @@ -35,9 +33,9 @@ %D \macros %D {scratchread, scratchwrite} %D -%D We define a scratch file for reading. Keep in mind that -%D the number of files is limited to~16, so use this one when -%D possible. We also define a scratch output file. +%D We define a scratch file for reading. Keep in mind that the number of files is +%D limited to~16, so use this one when possible. We also define a scratch output +%D file. In \MKIV\ and \LMTX\ we never use these file handles. \ifdefined\scratchread \else \newread \scratchread \fi \ifdefined\scratchwrite \else \newwrite\scratchwrite \fi @@ -60,12 +58,10 @@ %D \macros %D {pushendofline,popendofline} %D -%D When we are loading files in the middle of the typesetting -%D process, for instance when we load references, we have to be -%D sure that the reading process does not generate so called -%D 'spurious spaces'. This can be prevented by assigning the -%D line ending character the \CATCODE\ comment. This is -%D accomplished by +%D When we are loading files in the middle of the typesetting process, for instance +%D when we load references, we have to be sure that the reading process does not +%D generate so called 'spurious spaces'. This can be prevented by assigning the line +%D ending character the \CATCODE\ comment. This is accomplished by %D %D \starttyping %D \pushendofline @@ -114,11 +110,10 @@ %D \macros %D {input, normalinput} %D -%D Sometimes we run into troubles when \type {\input} wants to get -%D expanded, e.g. in a \type {\write} (which happens in the metafun -%D manual when we permit long MP lines). So, instead of fixing that, -%D we go for a redefinition of \type {\input}. Of course it's better -%D to use \type {\readfile} or \type {\processfile}. +%D Sometimes we run into troubles when \type {\input} wants to get expanded, e.g. in +%D a \type {\write} (which happens in the metafun manual when we permit long MP +%D lines). So, instead of fixing that, we go for a redefinition of \type {\input}. +%D Of course it's better to use \type {\readfile} or \type {\processfile}. \unexpanded\def\input{\normalinput} @@ -127,8 +122,8 @@ %D \macros %D {doifelsefile} %D -%D The next alternative only looks if a file is present. No -%D loading is done. This one obeys the standard \TEX\ lookup. +%D The next alternative only looks if a file is present. No loading is done. This +%D one obeys the standard \TEX\ lookup. %D %D \starttyping %D \doiffileelse {filename} {found} {not found} @@ -155,7 +150,7 @@ %D \doifparentfileelse{filename}{yes}{no} %D \stoptyping -\ifx\outputfilename\undefined \def\outputfilename{\jobname} \fi +\ifdefined\outputfilename \else \def\outputfilename{\jobname} \fi \unexpanded\def\doifelseparentfile{\clf_doifelseparentfile} @@ -200,10 +195,9 @@ %D \macros %D {doonlyonce, doinputonce, doendinputonce} %D -%D Especially macropackages need only be loaded once. -%D Repetitive loading not only costs time, relocating registers -%D often leads to abortion of the processing because \TEX's -%D capacity is limited. One can prevent multiple execution and +%D Especially macropackages need only be loaded once. Repetitive loading not only +%D costs time, relocating registers often leads to abortion of the processing +%D because \TEX's capacity is limited. One can prevent multiple execution and %D loading by using one of both: %D %D \starttyping @@ -212,8 +206,8 @@ %D \doendinputonce{filename} %D \stoptyping %D -%D This command obeys the standard method for locating files. We could -%D move this function to the \LUA\ end. +%D This command obeys the standard method for locating files. We could move this +%D function to the \LUA\ end. \installsystemnamespace {fileonce} |