diff options
author | Karl Berry <karl@freefriends.org> | 2021-02-09 22:01:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-02-09 22:01:07 +0000 |
commit | fe491675252d9e6fe3ae6b1c67b198daed5cf936 (patch) | |
tree | ec846c8c711f8d0cdc9ab381f175d71746864a78 /Master/texmf-dist/tex/luatex/optex/base/verbatim.opm | |
parent | 8790b9df74c6be439ccba2d4c53edfb57407ad6b (diff) |
optex (9feb21)
git-svn-id: svn://tug.org/texlive/trunk@57691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/optex/base/verbatim.opm')
-rw-r--r-- | Master/texmf-dist/tex/luatex/optex/base/verbatim.opm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/luatex/optex/base/verbatim.opm b/Master/texmf-dist/tex/luatex/optex/base/verbatim.opm index dc701c96eba..8fd20ee5317 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/verbatim.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/verbatim.opm @@ -1,6 +1,6 @@ %% This is part of the OpTeX project, see http://petr.olsak.net/optex -\_codedecl \begtt {Verbatim <2020-11-13>} % preloaded in format +\_codedecl \begtt {Verbatim <2021-01-22>} % preloaded in format \_doc ---------------------------- The internal parameters @@ -59,13 +59,13 @@ \_def\_setverb{\_catcodetable\_verbatimcatcodes }% \_doc ---------------------------- - \`\activettchar``<char>` saves original catcode of previously declared `<char>` (if + \`\verbchar``<char>` saves original catcode of previously declared `<char>` (if such character was declared) using \`\_savedttchar` and \`\_savedttcharc` values. Then new such values are stored. The declared character is activated by `\_adef` as a macro (active character) which opens a group, does `\_setverb` and other settings and reads its parameter until second the same character. This is done by the \`\_readverb` macro. Finally, it prints scanned - `<text>` by \^`\_printinverbatim` and closes group. Suppose that `\activettchar"` is + `<text>` by \^`\_printinverbatim` and closes group. Suppose that `\verbchar"` is used. Then the following work is schematically done: \begtt \_def "{\_begingroup \_setverb ... \_readverb} @@ -75,14 +75,15 @@ deactivates it. \_cod ---------------------------- -\_def\_activettchar#1{% +\_def\_verbchar#1{% \_ifx\_savedttchar\_undefined\_else \_catcode\_savedttchar=\_savedttcharc \_fi \_chardef\_savedttchar=`#1 \_chardef\_savedttcharc=\_catcode`#1 \_adef{#1}{\_begingroup \_setverb \_adef{ }{\_dsp}\_ttfont \_the\_everyintt\_relax \_readverb}% \_def\_readverb ##1#1{\_printinverbatim{##1}\_endgroup}% } -\_public \activettchar ; +\_let \_activettchar=\_verbchar % for backward compatibility +\_public \verbchar \activettchar ; \_doc ---------------------------- \`\begtt` is defined only as public. We don't need a private `\_begtt` variant. @@ -158,7 +159,7 @@ \_cod ---------------------------- \_def\_printverb #1^^J#2{% - \_ifx\_printverblinenum\_relax \_else \_global\_advance\_ttline by1 \_fi + \_ifx\_printverblinenum\_relax \_else \_incr\_ttline \_fi \_testcommentchars #1\_relax\_relax\_relax \_iftrue \_ifx\_end#2 \_printcomments\_fi @@ -269,7 +270,7 @@ \_ttskip \_isnextchar\_par{}{\_noindent}% } -\_def\_vireadline{\_read\_vifile to \_tmp \_global\_advance\_viline by1 } +\_def\_vireadline{\_read\_vifile to \_tmp \_incr\_viline } \_def\_visaveline{\_ea\_addto\_ea\_tmpb\_ea{\_tmp}} \_public \verbinput ; @@ -362,6 +363,7 @@ \_endinput History: +2020-01-22 ... \activettchar changed to \verbchar 2020-12-30 ... \secc followed by \begtt must be unbreakable 2020-11-13 ... \commentchars implemented 2020-04-22 ... \ttshift introduced |