From 66f7d795ee15bbbe970dccad9b0d5ecb1e9d4884 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 14 Jan 2021 21:53:33 +0000 Subject: optex (13jan21) git-svn-id: svn://tug.org/texlive/trunk@57419 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/luatex/optex/base/basic-macros.opm | 52 ++++++++++++++-------- 1 file changed, 33 insertions(+), 19 deletions(-) (limited to 'Master/texmf-dist/tex/luatex/optex/base/basic-macros.opm') diff --git a/Master/texmf-dist/tex/luatex/optex/base/basic-macros.opm b/Master/texmf-dist/tex/luatex/optex/base/basic-macros.opm index ea9cced9c1a..3f0f7a5c24e 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/basic-macros.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/basic-macros.opm @@ -1,10 +1,10 @@ -%% This is part of OpTeX project, see http://petr.olsak.net/optex +%% This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \sdef {Basic macros for OpTeX <2020-02-14>} % loaded in format +\_codedecl \sdef {Basic macros for OpTeX <2021-01-08>} % loaded in format \_doc ------------------------------ - \`\bgroup`, \`\egroup`, \`\empty`, \`\space`, \`\null` and \`\wlog` - are classical macros from plain \TeX/. + \`\bgroup`, \`\egroup`, \`\empty`, \`\space`, \`\null` and \`\wlog` + are classical macros from plain \TeX/. \_cod ------------------------------ \_let\_bgroup={ \_let\_egroup=} @@ -16,9 +16,21 @@ \_public \bgroup \egroup \empty \space \null \wlog ; \_doc ------------------------------ - \`\bslash` is \"normal backslash" with category code 12. - \`\nbb` and \`\pcent` are double backslash and normal~`%`, - they should be used in lua codes, for example. + \`\ignoreit` ignores next token or `{}`, \`\ignoresecond` + uses first, ignores second parameter and \`\usesecond` + ignores first, uses second parameter. + \_cod ------------------------------ + +\_long\_def \_ignoreit #1{} +\_long\_def \_ignoresecond #1#2{#1} +\_long\_def \_usesecond #1#2{#2} + +\_public \ignoreit \ignoresecond \usesecond ; + + \_doc ------------------------------ + \`\bslash` is \"normal backslash" with category code 12. + \`\nbb` and \`\pcent` are double backslash and normal~`%`, + they should be used in Lua codes, for example. \_cod ------------------------------ \_edef \_bslash {\_csstring\\} @@ -45,7 +57,7 @@ \_doc ------------------------------ \`\adef` `{}{}` puts the as active character and defines it - as `{}`. You can declare a macro with parameters too. For example + as `{}`. You can declare a macro with parameters too. For example `\adef @#1{...$1...}`. \_cod ------------------------------ @@ -56,7 +68,7 @@ \`\cs` `{}` is only a shortcut to `\csname \endcsname`, but you need one more `\_ea` if you need to get the real control sequence `\`. \nl - \`\trycs` `{}{}` expands to `\` + \`\trycs` `{}{}` expands to `\` if it is defined else to the ``. \_cod ------------------------------ @@ -75,33 +87,35 @@ \`\opwarning` `{}` prints warning on the terminal and to the log file. \_cod ------------------------------ -\_def \_opwarning #1{\_wterm{l.\_the\_inputlineno> WARNING: #1.}} +\_def \_opwarning #1{\_wterm{WARNING l.\_the\_inputlineno: #1.}} \_public \opwarning ; \_doc ------------------------------ - \`\loggingall` and \`\tracingall` are defined similarly as in + \`\loggingall` and \`\tracingall` are defined similarly as in plain \TeX/, but they print - more logging information to the log file and to the terminal. + more logging information to the log file and the terminal. \_cod ------------------------------ -\_def\_loggingall{\_tracingcommands=3 \_tracingstats=2 \_tracingpages=1 - \_tracingoutput=1 \_tracinglostchars=1 \_tracingmacros=2 - \_tracingparagraphs=1 \_tracingrestores=1 \_tracingscantokens=1 +\_def\_loggingall{\_tracingcommands=3 \_tracingstats=2 \_tracingpages=1 + \_tracingoutput=1 \_tracinglostchars=1 \_tracingmacros=2 + \_tracingparagraphs=1 \_tracingrestores=1 \_tracingscantokens=1 \_tracingifs=1 \_tracinggroups=1 \_tracingassigns=1 } \_def\_tracingall{\_tracingonline=1 \_loggingall} -\_public \loggingall \tracingall ; +\_public \loggingall \tracingall ; \_doc ------------------------------ - Write a warning if the user did not to load a Unicode Font {\em or} + Write a warning if the user did not load a Unicode Font {\em or} if there were unresolved references. \`\_byehook` is used in the \^`\bye` macro. \_cod ------------------------------ \_def\_byehook{% \_ifx\_initunifonts\_relax \_relax\_else \_opwarning{Unicode font was not loaded}\_fi - \_ifnum\_unresolvedrefs>0 \_opwarning{Rerun to get references right}\_fi + \_ifnum\_unresolvedrefs>0 \_opwarning{Try to rerun to get references right}\_fi } \_endcode % ------------------------------------- - +2021-01-08: \opwarning format changed (secondly, hope that conclusively) +2020-10-12: \opwarning: line numbers added +2020-02-14: introduced -- cgit v1.2.3