diff options
Diffstat (limited to 'tex/context/base/buff-ver.mkiv')
-rw-r--r-- | tex/context/base/buff-ver.mkiv | 66 |
1 files changed, 19 insertions, 47 deletions
diff --git a/tex/context/base/buff-ver.mkiv b/tex/context/base/buff-ver.mkiv index dcea15496..430834a30 100644 --- a/tex/context/base/buff-ver.mkiv +++ b/tex/context/base/buff-ver.mkiv @@ -45,10 +45,8 @@ \unexpanded\def\specialcontrolspace{\hskip\zeropoint\fastcontrolspace\hskip\zeropoint} -\setvalue{\??typinglines\v!no }{\buff_verbatim_ignore_hyphens} -\setvalue{\??typinglines\v!normal }{\buff_verbatim_ignore_hyphens} -\setvalue{\??typinglines\v!yes }{\buff_verbatim_obey_breakpoints} -\setvalue{\??typinglines\v!hyphenated}{\buff_verbatim_obey_hyphens} +\setvalue{\??typinglines\v!yes }{\obeybreakpoints} +\setvalue{\??typinglines\v!hyphenated}{\obeyhyphens} \setvalue{\??typingspace\v!on }{\let\obeyedspace\specialcontrolspace} \setvalue{\??typingspace\v!stretch }{\let\obeyedspace\specialstretchedspace} @@ -63,36 +61,15 @@ \setvalue{\??typingblank\v!line }{\baselineskip} \setvalue{\??typingblank\v!none }{\zeropoint} -\unexpanded\def\buff_verbatim_obey_hyphens - {} - -\unexpanded\def\buff_verbatim_obey_breakpoints - {\language\minusone % tricky as this affects the pagebuilder - \veryraggedright} - -\unexpanded\def\buff_verbatim_ignore_hyphens - {\language\minusone} % tricky as this affects the pagebuilder - -\def\buff_verbatim_initialize_breaks % order matters - {\spaceskip.5\emwidth\relax - \let\obeyedspace\specialobeyedspace - \let\controlspace\specialcontrolspace - \edef\p_buff_lines{\typeparameter\c!lines}% - \ifcsname\??typinglines\p_buff_lines\endcsname % sets \obeyedspace, \controlspace, - \csname\??typinglines\p_buff_lines\endcsname - \fi - \edef\p_buff_space{\typeparameter\c!space}% - \ifcsname\??typingspace\p_buff_space\endcsname % sets \obeyedspace - \csname\??typingspace\p_buff_space\endcsname - \fi} - \def\buff_verbatim_initialize_type_one {\let\obeylines\ignorelines + \ignorehyphens % default \usetypestyleandcolor\c!style\c!color \setcatcodetable\vrbcatcodes} \def\buff_verbatim_initialize_type_two - {\buff_verbatim_initialize_breaks + {\let\obeyedspace\specialobeyedspace + \csname\??typingspace\typeparameter\c!space\endcsname \relax\the\everyinitializeverbatim\relax} \unexpanded\def\doinitializeverbatim % for use elsewhere .. temp hack (see lxml-ini) @@ -121,10 +98,13 @@ {\switchtobodyfont[\typingparameter\c!bodyfont]% can be low level call \buff_verbatim_check_margins \usetypingstyleandcolor\c!style\c!color - \doifsomething{\typingparameter\c!align}{\setupalign[\typingparameter\c!align]}} + \doifsomething{\typingparameter\c!align}{\setupalign[\typingparameter\c!align]}% + \ignorehyphens} % default \def\buff_verbatim_initialize_typing_two - {\buff_verbatim_initialize_breaks + {\let\obeyedspace\specialobeyedspace + \csname\??typingspace\typingparameter\c!space\endcsname + \csname\??typinglines\typingparameter\c!lines\endcsname \relax\the\everyinitializeverbatim\relax} %D \macros @@ -275,7 +255,7 @@ {\dontleavehmode \bgroup \edef\currenttype{#1}% - \lettypeparameter\c!lines\v!hyphenated + \lettypeparameter\v!lines\v!hyphenated \let\specialobeyedspace\specialstretchedspace \doifnextoptionalelse\buff_verbatim_type_yes\buff_verbatim_type_nop} @@ -318,11 +298,10 @@ {\buff_verbatim_initialize_type_two \dostarttagged\t!verbatim\currenttype \ctxcommand{typestring{ - data = \!!bs\detokenize{#1}\!!es, - tab = "\typeparameter\c!tab", - method = "\typeparameter\c!option", - nature = "inline", - compact = "\typeparameter\c!compact", % none | all | last (all needed in tabulate etc for manuals) + data = \!!bs\detokenize{#1}\!!es, + tab = "\typeparameter\c!tab", + method = "\typeparameter\c!option", + nature = "inline", }}% \dostoptagged \buff_verbatim_right_of_type @@ -355,7 +334,7 @@ \unexpanded\def\specialfixedspace {\kern\interwordspace\relax} \unexpanded\def\specialobeyedspace {\hskip\interwordspace\relax} % better than spaceskip -\unexpanded\def\specialstretchedspace{\hskip.5\interwordspace\s!plus.125\interwordspace\relax} % \interwordstretch can be zero +\unexpanded\def\specialstretchedspace{\hskip.5\interwordspace\s!plus.125\interwordstretch\relax} % more but not less \unexpanded\def\specialcontrolspace {\hskip\zeropoint\hbox{\normalcontrolspace}\hskip\zeropoint\relax} \unexpanded\def\obeyhyphens @@ -371,7 +350,7 @@ {\language\minusone % extra bonus, the \null should do the job too \let\obeyedspace \specialobeyedspace \let\controlspace\specialcontrolspace - \spaceskip.5\emwidth\relax} + \spaceskip.5em\relax} %D \macros %D {tex,arg,mat,dis,astype} @@ -399,9 +378,7 @@ \catcode\leftbraceasciicode \begingroupcatcode \catcode\rightbraceasciicode\endgroupcatcode #1% - \bgroup % else wrong font for #2 \aftergroup#2% - \aftergroup\egroup \let\nexttoken} \unexpanded\def\tex{\buff_verbatim_special_type\texescape \relax} @@ -663,7 +640,6 @@ %\c!bodyfont=, %\c!color=, \c!space=\v!off, - \c!lines=\v!no, \c!page=\v!no, \c!tab=\v!yes, % what is this: \s!ascii ? \c!option=\v!none, @@ -676,6 +652,7 @@ \c!blank=\v!line, %\c!escape=, % yes | no | {START,STOP} | default when yes: {BTEX,ETEX} \c!numbering=\v!no, + %\c!lines=, %\c!range=, \c!start=1, %\c!stop=, @@ -692,13 +669,11 @@ \setuptype [\c!space=\v!off, - \c!lines=\v!no, %\c!color=, \c!style=\tt, %\c!option=\v!normal, \c!page=\v!no, - \c!tab=\v!yes, - \c!compact=\v!all] + \c!tab=\v!yes] %D Buffers @@ -710,9 +685,6 @@ \unexpanded\def\buff_verbatim_type_defined_buffer {\dotripleempty\buff_verbatim_type_defined_buffer_indeed} -\unexpanded\def\typedefinedbuffer[#1]% - {\buff_verbatim_type_defined_buffer[\v!buffer][\thedefinedbuffer{#1}]}% - \appendtoks \setuevalue{\e!type\currentbuffer}{\buff_verbatim_type_defined_buffer[\v!buffer][\currentdefinedbuffer]}% \to \everydefinebuffer |