diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-07-06 19:11:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-07-06 19:11:00 +0200 |
commit | f977ff080f48ca7cbf248b5bb02748f766f0ed2b (patch) | |
tree | fcb52d340a1083579681074c8242d465162925aa /tex/context/base/pack-rul.mkiv | |
parent | 083ba74a2e7a28ca940b62d37e9e976d26c824d3 (diff) | |
download | context-f977ff080f48ca7cbf248b5bb02748f766f0ed2b.tar.gz |
beta 2012.07.06 19:11
Diffstat (limited to 'tex/context/base/pack-rul.mkiv')
-rw-r--r-- | tex/context/base/pack-rul.mkiv | 715 |
1 files changed, 284 insertions, 431 deletions
diff --git a/tex/context/base/pack-rul.mkiv b/tex/context/base/pack-rul.mkiv index 2803cd518..b757dfdce 100644 --- a/tex/context/base/pack-rul.mkiv +++ b/tex/context/base/pack-rul.mkiv @@ -13,35 +13,27 @@ \writestatus{loading}{ConTeXt Packaging Macros / Ruled Content} -%D The code here is expanded lots of time as framed is used in -%D many places. This is why the code here is (and gets) optimized -%D as much as possible. Also, by avoiding packaging and expansion -%D we also keep tracing reasonable. For instance, multiple stacked -%D backgrounds can slow down a run if not optimized this way. - -% eventually this will use the commandhandler code (same trick as -% with itemize) +%D The code here is expanded lots of time as framed is used in many places. This is +%D why the code here is (and gets) optimized as much as possible. Also, by avoiding +%D packaging and expansion we also keep tracing reasonable. For instance, multiple +%D stacked backgrounds can slow down a run if not optimized this way. \registerctxluafile{pack-rul}{1.001} \unprotect -\definesystemvariable {fc} % FramedContent -\definesystemvariable {od} % Omlijnd Defaults (simple) -> check page-bck too \definesystemvariable {ol} % OmLijnd -> check scrn-fld too %D \macros %D {linewidth, setuplinewidth} %D -%D This module deals with rules (lines) in several ways. First -%D we introduce two macros that can be used to set some common -%D characteristics. +%D This module deals with rules (lines) in several ways. First we introduce two +%D macros that can be used to set some common characteristics. %D %D \showsetup{setuplinewidth} %D -%D The linewidth is available in \type{\linewidth}. The -%D preset value of .4pt equals the default hard coded \TEX\ -%D rule width. +%D The linewidth is available in \type{\linewidth}. The preset value of .4pt equals +%D the default hard coded \TEX\ rule width. \newdimen\linewidth @@ -67,7 +59,7 @@ \to \everysetupscreens \setupscreens - [\c!screen=0.90] % was 0.95 but that's hardly visible + [\c!screen=.90] % was .95 but that's hardly visible %D The parameter handler: @@ -77,41 +69,26 @@ \installcorenamespace{framedleft} \installcorenamespace{framedright} -\let\currentframed\s!unknown % brrr must have a value - -% \def\framedparameter #1{\csname\doframedparameter\currentframed{#1}\endcsname} -% \def\framedparameterhash#1{\doframedparameterhash \currentframed#1} +\installcorenamespace{regularframed} +\installcorenamespace{simplifiedframed} -\def\framedparameter #1{\csname\ifcsname\currentframed#1\endcsname\currentframed#1\else\expandafter\doframedparentparameter\csname\currentframed\s!parent\endcsname{#1}\fi\endcsname} -\def\framedparameterhash#1{\ifcsname\currentframed#1\endcsname\currentframed\else\expandafter\doframedparentparameterhash\csname\currentframed\s!parent\endcsname#1\fi} +\installcommandhandler \??framed {framed} \??framed -\def\doframedparameter #1#2{\ifcsname#1#2\endcsname#1#2\else\expandafter\doframedparentparameter \csname#1\s!parent\endcsname{#2}\fi} -\def\doframedparameterhash#1#2{\ifcsname#1#2\endcsname #1\else\expandafter\doframedparentparameterhash\csname#1\s!parent\endcsname#2\fi} +\let\pack_framed_framedparameter \framedparameter +\let\pack_framed_framedparameterhash\framedparameterhash +\let\pack_framed_setupcurrentframed \setupcurrentframed -\def\doframedparentparameter #1#2{\ifx#1\relax\s!empty\else\doframedparameter #1{#2}\fi} -\def\doframedparentparameterhash#1#2{\ifx#1\relax \else\doframedparameterhash#1#2\fi} +\def\pack_framed_initialize + {\let\framedparameter \pack_framed_framedparameter + \let\framedparameterhash\pack_framed_framedparameterhash + \let\setupcurrentframed \pack_framed_setupcurrentframed + \inframedtrue} -\def\doframedparentparameter#1#2{\ifx#1\relax\doframedrootparameter#2\else\doframedparameter#1{#2}\fi} -\def\doframedrootparameter #1{\ifcsname\??framed#1\endcsname\??framed#1\else\s!empty\fi} - -\def\useframedstyleandcolor#1#2% style color - {\edef\currentstyleparameter{\framedparameter#1}% - \edef\currentcolorparameter{\framedparameter#2}% - \ifx\currentstyleparameter\empty\else\dousestyleparameter\currentstyleparameter\fi - \ifx\currentcolorparameter\empty\else\dousecolorparameter\currentcolorparameter\fi} +%D A helper: \def\frameddimension#1{\the\dimexpr\framedparameter{#1}\relax} -% \unexpanded\def\installsomebackground#1#2{\inheritlocalframed[\??ma#1#2][\??od]} - -\let\normalframedparameter \framedparameter -\let\normalframedparameterhash\framedparameterhash - -\def\pack_framed_initialize#1% will be inlined - {\inframedtrue - \edef\currentframed{#1}% - \let\framedparameter \normalframedparameter - \let\framedparameterhash\normalframedparameterhash} +%D Inheritance: \def\installinheritedframed#1% {\normalexpanded{\doinstallinheritedframed @@ -120,20 +97,22 @@ \expandafter\noexpand\csname #1parameterhash\endcsname \expandafter\noexpand\csname do#1parameter\endcsname \expandafter\noexpand\csname do#1parentparameter\endcsname - \expandafter\noexpand\csname do#1rootparameter\endcsname + \expandafter\noexpand\csname root#1parameter\endcsname + \expandafter\noexpand\csname setupcurrent#1\endcsname \expandafter\noexpand\csname inherited#1framed\endcsname \noexpand\??framed}} % if needed we can have a variant -\unexpanded\def\doinstallinheritedframed#1#2#3#4#5#6#7#8% - {\def#5##1##2{\ifx##1\relax#6{##2}\else#4##1{##2}\fi}% - \def#6##1{\ifcsname#8##1\endcsname#8##1\else\s!empty\fi}% - \unexpanded\def#7% +\unexpanded\def\doinstallinheritedframed#1#2#3#4#5#6#7#8#9% + {\def#5##1##2{\ifx##1\relax#6{##2}\else#4{##1}{##2}\fi}% + \def#6##1{\ifcsname#9:##1\endcsname#9:##1\else\s!empty\fi}% root + \unexpanded\def#8% {\bgroup \bgroup \inframedtrue - \let\currentframed #1% not used (more for tracing) + \let\currentframed #1% \let\framedparameter #2% \let\framedparameterhash#3% + \let\setupcurrentframed #7% \pack_framed_process_indeed}} \unexpanded\def\installframedcommandhandler#1#2#3% @@ -150,12 +129,11 @@ % for regular framed -\getparameters - [\??framed] +\setupframed [\c!width=\v!fit, \c!height=\v!broad, %\c!lines=, - \c!offset=0.25ex, % \defaultframeoffset + \c!offset=.25ex, % \defaultframeoffset \c!empty=\v!no, \c!frame=\v!on, %\c!topframe=, @@ -170,11 +148,12 @@ %\c!foregroundstyle=, %\c!background=, %\c!backgroundscreen=, + \c!backgroundscreen=\defaultbackgroundscreen, %\c!backgroundcolor=, \c!backgroundoffset=\zeropoint, %\c!framecolor=, \c!frameoffset=\zeropoint, - \c!backgroundcorner=\framedparameter\c!corner, + \c!backgroundcorner=\framedparameter\c!corner, % use \p_ here \c!backgroundradius=\framedparameter\c!radius, \c!backgrounddepth=\framedparameter\c!depth, \c!framecorner=\framedparameter\c!corner, @@ -196,21 +175,21 @@ \c!toffset=\zeropoint, \c!boffset=\zeropoint] -% for backgrounds +%D For backgrounds and such: -\getparameters - [\??od] % for fast version +\defineframed + [\??simplifiedframed] [\c!frame=\v!off, \c!depth=\zeropoint, \c!offset=\v!overlay, - %\c!component=, - %\c!region=, + \c!component=, + \c!region=, \c!radius=.5\bodyfontsize, \c!rulethickness=\linewidth, \c!corner=\v!rectangular, \c!backgroundoffset=\zeropoint, \c!frameoffset=\zeropoint, - \c!backgroundcorner=\framedparameter\c!corner, + \c!backgroundcorner=\framedparameter\c!corner, % use \p_ here \c!backgroundradius=\framedparameter\c!radius, \c!backgrounddepth=\framedparameter\c!depth, \c!framecorner=\framedparameter\c!corner, @@ -222,8 +201,14 @@ \c!toffset=\zeropoint, \c!boffset=\zeropoint] -%D We will communicate through module specific variables, current -%D framed parameters and some reserved dimension registers. +\unexpanded\def\definesimplifiedframed[#1]% no settings + {\defineframed[#1][\??simplifiedframed]% + \expandafter\let\csname#1\endcsname\undefined} + +\expandafter\let\csname\??simplifiedframed\endcsname\undefined + +%D We will communicate through module specific variables, current framed +%D parameters and some reserved dimension registers. \newdimen\d_framed_target_wd \newdimen\d_framed_target_ht @@ -281,16 +266,10 @@ \fi} \def\pack_framed_filled_box_round - {\normalexpanded{\doovalbox - {\the\d_framed_target_wd}% - {\the\d_framed_target_ht}% - {\the\d_framed_target_dp}% - {\the\dimexpr\d_framed_linewidth\relax}% - {\the\dimexpr\p_framed_backgroundradius\relax}% - {0}% - {1}% - {\ifx\p_framed_backgroundcorner\v!round0\else\number\p_framed_backgroundcorner\fi}% - }} + {\back_ovalbox + \d_framed_target_wd \d_framed_target_ht \d_framed_target_dp + \d_framed_linewidth \p_framed_backgroundradius + \zerocount \plusone {\ifx\p_framed_backgroundcorner\v!round0\else\number\p_framed_backgroundcorner\fi}} \def\pack_framed_stroked_box {\edef\p_framed_framecorner{\framedparameter\c!framecorner}% @@ -313,16 +292,10 @@ % \pack_framed_stroked_box_normal % later \def\pack_framed_stroked_box_round - {\normalexpanded{\doovalbox - {\the\d_framed_target_wd}% - {\the\d_framed_target_ht}% - {\the\d_framed_target_dp}% - {\the\dimexpr\d_framed_linewidth\relax}% - {\the\dimexpr\p_framed_frameradius\relax}% - {1}% - {0}% - {\ifx\p_framed_framecorner\v!round0\else\number\p_framed_framecorner\fi}% - }} + {\back_ovalbox + \d_framed_target_wd \d_framed_target_ht \d_framed_target_dp + \d_framed_linewidth \p_framed_frameradius + \plusone \zerocount {\ifx\p_framed_framecorner\v!round0\else\number\p_framed_framecorner\fi}} % a lot of weird corners % @@ -382,8 +355,8 @@ \def\pack_framed_background_box_gray_indeed % can be more direct but who cares, just compatibility {\colored[s=\p_framed_backgroundscreen]{\pack_framed_filled_box}} -%D It won't be a surprise that we not only provide gray boxes, -%D but also colored ones. Here it is: +%D It won't be a surprise that we not only provide gray boxes, but also colored +%D ones. Here it is: \def\pack_framed_background_box_color {\edef\p_framed_backgroundcolor{\framedparameter\c!backgroundcolor}% @@ -399,10 +372,9 @@ %D overlaywidth, overlayheight, overlaydepth, %D overlaycolor, overlaylinecolor, overlaylinewidth} %D -%D Before we define the macro that actually takes card of the -%D backgrounds, we introduce overlays. An overlay is something -%D that contrary to its name lays {\em under} the text. An -%D example of an overlay definition is: +%D Before we define the macro that actually takes card of the backgrounds, we +%D introduce overlays. An overlay is something that contrary to its name lays {\em +%D under} the text. An example of an overlay definition is: %D %D \startbuffer[tmp-1] %D \defineoverlay @@ -432,17 +404,16 @@ %D %D \showsetup{defineoverlay} %D -%D This macro's definition is a bit obscure, due the many -%D non||used arguments and the two step call that enable the -%D setting of the width, height and depth variables. -%D Multiple backgrounds are possible and are specified as: +%D This macro's definition is a bit obscure, due the many non||used arguments and +%D the two step call that enable the setting of the width, height and depth +%D variables. Multiple backgrounds are possible and are specified as: %D %D \starttyping %D \framed[background={one,two,three}]{Three backgrounds!} %D \stoptyping %D -%D Most drawing packages only know width and height. Therefore -%D the dimensions have a slightly different meaning here: +%D Most drawing packages only know width and height. Therefore the dimensions have a +%D slightly different meaning here: %D %D \startitemize[packed] %D \item \type{\overlaywidth }: width of the overlay @@ -464,9 +435,8 @@ \newtoks\everyoverlay -%D An example of an initialization is the following (overlays -%D can contain text and be executed under an regime where -%D interlineskip is off). +%D An example of an initialization is the following (overlays can contain text +%D and be executed under an regime where interlineskip is off). \installcorenamespace{overlay} \installcorenamespace{overlaybuiltin} @@ -527,8 +497,8 @@ \expandafter\secondoftwoarguments \fi} -%D The content of the box will be (temporary) saved in a box. We -%D also have an extra box for backgrounds. +%D The content of the box will be (temporary) saved in a box. We also have an +%D extra box for backgrounds. \newbox\b_framed_normal \newbox\b_framed_extra @@ -584,8 +554,8 @@ \expandafter\pack_framed_process_backgrounds \fi#2} -% beware, a backgroundbox can be empty which is another reason -% why we set the width to zero instead of back-skipping +%D Beware, a backgroundbox can be empty which is another reason why we set the +%D width to zero instead of back-skipping. \newdimen\framedbackgroundwidth \newdimen\framedbackgroundheight @@ -624,8 +594,7 @@ \egroup}} \def\pack_framed_overlay_initialize_indeed - {%\writestatus{!!!!}{<<<<<}% - \edef\overlaywidth {\the\d_framed_target_wd\space}% + {\edef\overlaywidth {\the\d_framed_target_wd\space}% \edef\overlayheight {\the\dimexpr\d_framed_target_ht+\d_framed_target_dp\relax\space}% \edef\overlaydepth {\the\d_framed_target_dp\space}% \edef\overlaycolor {\framedparameter\c!backgroundcolor}% let ? @@ -636,8 +605,8 @@ \edef\overlayoffset {\the\framedbackgroundoffset\space}% \backgroundoffset % we steal this one \let\pack_framed_overlay_initialize\relax} -%D One can explictly insert the foreground box. For that -%D purpose we introduce the overlay \type {foreground}. +%D One can explictly insert the foreground box. For that purpose we introduce the +%D overlay \type {foreground}. %D %D We predefine two already familiar backgrounds: @@ -645,14 +614,13 @@ \letvalue{\??overlaybuiltin\v!color }\pack_framed_background_box_color \letvalue{\??overlaybuiltin\v!foreground}\pack_framed_background_box_content % replaces: \defineoverlay[\v!foreground][\foregroundbox] -%D We can specify overlays as a comma separated list of -%D overlays, a sometimes handy feature. - -%D Besides backgrounds (overlays) we also need some macros to -%D draw outlines (ruled borders). Again we have to deal with -%D square and round corners. The first category can be handled -%D by \TEX\ itself, the latter one depends on the driver. This -%D macro also support a negative offset. +%D We can specify overlays as a comma separated list of overlays, a sometimes +%D handy feature. +%D +%D Besides backgrounds (overlays) we also need some macros to draw outlines (ruled +%D borders). Again we have to deal with square and round corners. The first category +%D can be handled by \TEX\ itself, the latter one depends on the driver. This macro +%D also support a negative offset. \def\pack_framed_add_outline {\setbox\b_framed_normal\hbox % rules on top of box @@ -756,11 +724,10 @@ % frame=off,rightframe=small,leftframe=small,topframe=small,bottomframe=on] % {} -%D The next few macros are probably the most misused ones in -%D \CONTEXT. They deal with putting rules around boxes, provide -%D backgrounds, offer alignment features, and some more. We -%D start with defining some booleans. These give an impression -%D of what we are going to take into account. +%D The next few macros are probably the most misused ones in \CONTEXT. They deal +%D with putting rules around boxes, provide backgrounds, offer alignment features, +%D and some more. We start with defining some booleans. These give an impression of +%D what we are going to take into account. % todo : \c_framed_hasoffset % faster : \let\c_framed_hasoffset\falseconditional @@ -778,67 +745,72 @@ %D \macros %D {framed, setupframed} %D -%D Ruled boxes are typeset using \type{\framed}. This command -%D is quite versatile and, although some users will probably -%D seldom use it, one cannot overlook its features. +%D Ruled boxes are typeset using \type{\framed}. This command is quite versatile +%D and, although some users will probably seldom use it, one cannot overlook its +%D features. %D -%D \showsetup{setupframed} -%D \showsetup{framed} +%D \showsetup{setupframed} +%D \showsetup{framed} %D -%D This general macro is a special version of an even more -%D general case, that can easily be linked into other macros -%D that need some kind of framing. The local version is called -%D with an extra parameter: the variable identifier. The reason -%D for passing this identifier between brackets lays in the -%D mere fact that this way we can use the optional argument -%D grabbers. +%D This general macro is a special version of an even more general case, that can +%D easily be linked into other macros that need some kind of framing. The local +%D version is called with an extra parameter: the variable identifier. The reason +%D for passing this identifier between brackets lays in the mere fact that this way +%D we can use the optional argument grabbers. \def\defaultframeoffset{.25ex} -\def\presetlocalframed [#1]{\letvalue {#1\s!parent}\??framed} -\def\inheritlocalframed[#1]#2[#3]{\setevalue{#1\s!parent}{#3}} +\installcorenamespace{regularframedlevel} + +\unexpanded\def\installregularframed#1% + {\defineframed[#1]} + +\unexpanded\def\presetlocalframed[#1]% + {\defineframed[#1]} -\presetlocalframed[\??ol] +% \presetlocalframed[\??framed] -\newcount\framednesting +\newcount\c_pack_framed_nesting + +\unexpanded\def\pack_framed_process_framed[#1]% + {\bgroup + \iffirstargument % faster + \setupcurrentframed[#1]% here ! + \fi + \pack_framed_process_indeed} \unexpanded\def\framed {\bgroup - \advance\framednesting\plusone - \expandafter\let\csname\??ol:\the\framednesting\s!parent\endcsname\??ol - \dodoubleempty\pack_framed_process[\??ol:\the\framednesting]} + \advance\c_pack_framed_nesting\plusone + \expandafter\let\csname\??framed>\the\c_pack_framed_nesting:\s!parent\endcsname\??framed + \edef\currentframed{>\the\c_pack_framed_nesting}% + \pack_framed_initialize + \dosingleempty\pack_framed_process_framed} \unexpanded\def\startframed {\dosingleempty\pack_framed_start_framed} \def\pack_framed_start_framed[#1]% {\bgroup - \advance\framednesting\plusone - \expandafter\let\csname\??ol:\the\framednesting\s!parent\endcsname\??ol + \advance\c_pack_framed_nesting\plusone + \expandafter\let\csname\??framed>\the\c_pack_framed_nesting:\s!parent\endcsname\??framed \iffirstargument\secondargumenttrue\fi % dirty trick - \pack_framed_process[\??ol:\the\framednesting][#1]% + \edef\currentframed{>\the\c_pack_framed_nesting}% + \pack_framed_initialize + \pack_framed_process_framed[#1]% can be inlined \bgroup} \let\stopframed\egroup -\unexpanded\def\setupframed - {\dodoubleempty\dosetupframed} - -\unexpanded\def\normalframedwithsettings +\unexpanded\def\normalframedwithsettings[#1]% {\bgroup - \advance\framednesting\plusone - \expandafter\let\csname\??ol:\the\framednesting\s!parent\endcsname\??ol - \pack_framed_process[\??ol:\the\framednesting]} - -% we can consider setting the parent of the regular framed to -% something else in the otr so that we isolate it there - -\def\dosetupframed[#1][#2]% - {\ifsecondargument - \getparameters[\??ol#1][#2]% - \else - \getparameters[\??ol][#1]% - \fi} + \advance\c_pack_framed_nesting\plusone + \expandafter\let\csname\??framed>\the\c_pack_framed_nesting:\s!parent\endcsname\??framed + \bgroup + \edef\currentframed{>\the\c_pack_framed_nesting}% + \pack_framed_initialize + \setupcurrentframed[#1]% + \pack_framed_process_indeed} %D \startbuffer %D \setupframed [framecolor=yellow] \framed{A} @@ -858,13 +830,11 @@ %D \macros %D {ifinframed} %D -%D The normal case first presets all parameters and next starts -%D looking for the user supplied ones. The first step is -%D omitted in the local case, because these are preset at -%D declaration time and keep their values unless explictly -%D changed. By presetting the variables everytime the normal -%D command is called, we can use this command nested, without -%D the unwanted side effect of inheritance. The boolean is +%D The normal case first presets all parameters and next starts looking for the user +%D supplied ones. The first step is omitted in the local case, because these are +%D preset at declaration time and keep their values unless explictly changed. By +%D presetting the variables everytime the normal command is called, we can use this +%D command nested, without the unwanted side effect of inheritance. The boolean is %D used to speed up the color stack. \newif\ifinframed @@ -874,7 +844,8 @@ \unexpanded\def\fastlocalframed[#1]#2[#3]#4% 3-4 {\bgroup - \pack_framed_initialize{#1}% + \edef\currentframed{#1}% + \pack_framed_initialize \setbox\b_framed_normal\hbox{#4}% \edef\p_framed_region{\framedparameter\c!region}% \ifx\p_framed_region\v!yes % maybe later named @@ -909,12 +880,13 @@ \box\b_framed_normal \egroup} -%D The next macro uses a box and takes its natural width and -%D height so these can better be correct. +%D The next macro uses a box and takes its natural width and height so these +%D can better be correct. -\def\localbackgroundframed#1#2#3% namespace component box +\unexpanded\def\localbackgroundframed#1#2#3% namespace component box {\bgroup - \pack_framed_initialize{#1}% + \edef\currentframed{#1}% + \pack_framed_initialize \setbox\b_framed_normal\box#3% \edef\p_framed_region{\framedparameter\c!region}% \ifx\p_framed_region\v!yes % maybe later named @@ -967,27 +939,30 @@ \unexpanded\def\localframed {\bgroup - \dodoubleempty\pack_framed_process} + \dodoubleempty\pack_framed_local} -\unexpanded\def\pack_framed_process[#1][#2]% assumes a \dodoubleempty (slows down), also should have leading \bgroup +\unexpanded\def\localframed[#1][#2]% {\bgroup - \pack_framed_initialize{#1}% + \edef\currentframed{#1}% + \pack_framed_initialize \ifsecondargument % faster - \getparameters[\currentframed][#2]% here ! + \setupcurrentframed[#2]% here ! \fi \pack_framed_process_indeed} \unexpanded\def\directlocalframed[#1]% no optional {\bgroup \bgroup - \pack_framed_initialize{#1}% + \edef\currentframed{#1}% + \pack_framed_initialize \pack_framed_process_indeed} \unexpanded\def\localframedwithsettings[#1][#2]% no checking (so no spaces between) {\bgroup \bgroup - \pack_framed_initialize{#1}% - \getparameters[\currentframed][#2]% here ! + \edef\currentframed{#1}% + \pack_framed_initialize + \setupcurrentframed[#2]% here ! \pack_framed_process_indeed} % done @@ -1316,11 +1291,10 @@ \def\pack_framed_do_top {\raggedtopcommand\framedparameter\c!top} \def\pack_framed_do_bottom{\framedparameter\c!bottom\raggedbottomcommand} -%D Carefull analysis of this macro will learn us that not all -%D branches in the last conditionals can be encountered, that -%D is, some assignments to \type{\next} will never occur. -%D Nevertheless we implement the whole scheme, if not for -%D future extensions. +%D Carefull analysis of this macro will learn us that not all branches in the last +%D conditionals can be encountered, that is, some assignments to \type{\next} will +%D never occur. Nevertheless we implement the whole scheme, if not for future +%D extensions. %D \macros %D {doassigncheckedframeoffset} @@ -1342,11 +1316,10 @@ %D \macros %D {ifreshapeframebox} %D -%D The last few lines tell what to do after the content of the -%D box is collected and passed to the next macro. In the case -%D of a fixed width and centered alignment, the content is -%D evaluated and used to determine the most natural width. The -%D rest of the code deals with backgrounds and frames. +%D The last few lines tell what to do after the content of the box is collected and +%D passed to the next macro. In the case of a fixed width and centered alignment, +%D the content is evaluated and used to determine the most natural width. The rest +%D of the code deals with backgrounds and frames. \newif\ifreshapeframebox \reshapeframeboxtrue @@ -1659,9 +1632,9 @@ \def\pack_framed_stop_orientation_even {\setbox\b_framed_normal\hbox{\dorotatebox\p_framed_orientation\hbox{\box\b_framed_normal}}} -%D The last conditional takes care of the special situation of -%D in||line \inframed[height=3cm]{framed} boxes. Such boxes have -%D to be \inframed{aligned} with the running text. +%D The last conditional takes care of the special situation of in||line \inframed +%D [height=3cm] {framed} boxes. Such boxes have to be \inframed {aligned} with the +%D running text. \unexpanded\def\inframed {\dosingleempty\pack_framed_inline} @@ -1674,15 +1647,14 @@ \def\pack_framed_inline[% {\framed[\c!location=\v!low,} -%D When we set \type{empty} to \type{yes}, we get -%D ourselves a frame and/or background, but no content, so -%D actually we have a sort of phantom framed box. +%D When we set \type{empty} to \type{yes}, we get ourselves a frame and/or background, +%D but no content, so actually we have a sort of phantom framed box. %D \macros %D {mframed, minframed} %D -%D When Tobias asked how to frame mathematical elements in -%D formulas, Taco's posted the next macro: +%D When Tobias asked how to frame mathematical elements in formulas, Taco's posted the +%D next macro: %D %D \starttyping %D \def\mframed#1% @@ -1694,9 +1666,8 @@ %D \fi} %D \stoptyping %D -%D Because \type {\ifinner} does not (always) reports what -%D one would expect, we move the test to the outer level. We -%D also want to pass arguments, +%D Because \type {\ifinner} does not (always) reports what one would expect, we move the +%D test to the outer level. We also want to pass arguments, %D %D \starttyping %D \def\mframed% @@ -1715,8 +1686,8 @@ %D \fi} %D \stoptyping %D -%D Still better is the next alternative, if only because it -%D takes care of setting the super- and subscripts styles +%D Still better is the next alternative, if only because it takes care of setting the super- +%D and subscripts styles \newcount\c_framed_mstyle @@ -1726,22 +1697,6 @@ \vphantom{(}% \Ustopmath} -% \unexpanded\def\mframed {\dosingleempty\pack_framed_math_display} -% \unexpanded\def\inmframed{\dosingleempty\pack_framed_math_inline } -% -% \def\pack_framed_math_inline[#1]#2% -% {\begingroup -% \c_framed_mstyle\mathstyle -% \inframed[#1]{\Ustartmath\triggermathstyle\c_framed_mstyle#2\Ustopmath}% -% \endgroup} -% -% \def\pack_framed_math_display[#1]#2% -% {\begingroup -% \c_framed_mstyle\mathstyle -% \let\normalstrut\pack_framed_math_strut -% \framed[#1]{\Ustartmath\triggermathstyle\c_framed_mstyle#2\Ustopmath}% -% \endgroup} - \installcorenamespace{mathframed} \installframedcommandhandler \??mathframed {mathframed} \??mathframed @@ -1767,8 +1722,7 @@ \definemathframed[mframed] \definemathframed[inmframed][\c!location=\v!low] -%D So instead of the rather versatile \type {\framed}, we ue -%D the \type {\mframed}. +%D So instead of the rather versatile \type {\framed}, we use \type {\mframed}: %D %D \startbuffer %D \startformula @@ -1789,11 +1743,9 @@ %D %D \typebuffer \getbuffer %D -%D As usual, one can specify in what way the text should be -%D framed. One should be aware of the fact that, inorder to -%D preserve the proper spacing, the \type {offset} is set to -%D \type {overlay} and \type {frameoffset} is used used -%D instead. +%D As usual, one can specify in what way the text should be framed. One should be +%D aware of the fact that, inorder to preserve the proper spacing, the \type +%D {offset} is set to \type {overlay} and \type {frameoffset} is used used instead. %D %D \startbuffer %D \startformula @@ -1803,13 +1755,11 @@ %D %D \typebuffer \getbuffer %D -%D For inline use, we also provide the \type {\inmframed} -%D alternative: we want $x \times \inmframed{y}$ in inline -%D math, right? +%D For inline use, we also provide the \type {\inmframed} alternative: we want $x +%D \times \inmframed{y}$ in inline math, right? -%D This previous framing macros needs a lot of alternatives for -%D putting rules around boxes, inserting offsets and aligning -%D text. Each step is handled by separate macros. +%D This previous framing macros needs a lot of alternatives for putting rules around +%D boxes, inserting offsets and aligning text. Each step is handled by separate macros. \newdimen\d_framed_applied_offset \newdimen\d_framed_loffset @@ -1849,8 +1799,8 @@ \hbox{\kern\d_framed_applied_offset\box\b_framed_normal\kern\d_framed_applied_offset}% \kern\d_framed_applied_offset}} -%D Let's hope that the next few examples show us enough of -%D what needs to be done by the auxiliary macros. +%D Let's hope that the next few examples show us enough of what needs to be +%D done by the auxiliary macros. %D %D \startbuffer %D \framed[height=1cm,offset=.5cm] {rule based learning} @@ -1904,25 +1854,21 @@ %D \hbox{\dontcomplain\getbuffer} %D \stoplinecorrection %D -%D So now we're ready for the complicated stuff. We distinguish -%D between borders with straight lines and those with round -%D corners. When using the first alternative it is possible to -%D turn off one or more lines. More fancy shapes are also -%D possible by specifying dedicated backgrounds. Turning lines -%D on and off is implemented as efficient as possible and as a -%D result is interface language dependant. This next -%D implementation evolved from simpler ones. It puts for -%D instance the rules on top of the content and provides -%D additional offset capabilities. The lot of calls to other -%D macros makes this mechanism not that easy to comprehend. - -%D We handle left, right or middle alignment as well as fixed -%D or free widths and heights. Each combination gets its own -%D macro. - -%D The following code handles one-liners: \type{align={line,flushright}}. -%D Beware, since we entered a group and either or not grab the next -%D bgroup token, we need to finish the group in the oneliner mode. +%D So now we're ready for the complicated stuff. We distinguish between borders with +%D straight lines and those with round corners. When using the first alternative it +%D is possible to turn off one or more lines. More fancy shapes are also possible by +%D specifying dedicated backgrounds. Turning lines on and off is implemented as +%D efficient as possible and as a result is interface language dependant. This next +%D implementation evolved from simpler ones. It puts for instance the rules on top +%D of the content and provides additional offset capabilities. The lot of calls to +%D other macros makes this mechanism not that easy to comprehend. +%D +%D We handle left, right or middle alignment as well as fixed or free widths and +%D heights. Each combination gets its own macro. +%D +%D The following code handles one-liners: \type {align={line,flushright}}. Beware, +%D since we entered a group and either or not grab the next bgroup token, we need to +%D finish the group in the oneliner mode. \ifdefined\raggedonelinerstate \else \newconditional\raggedonelinerstate \fi @@ -2102,11 +2048,10 @@ \localstrut \doformatonelinerbox} -%D On the next page we show some examples of how these macros -%D come into action. The examples show us how -%D \type {fit}, \type {broad} dimensions influence the -%D formatting. Watch the visualized struts. \footnote {Here we -%D used \type {\showstruts}.} +%D On the next page we show some examples of how these macros come into action. The +%D examples show us how \type {fit}, \type {broad} dimensions influence the +%D formatting. Watch the visualized struts. \footnote {Here we used \type +%D {\showstruts}.} %D %D \startpostponing %D \bgroup @@ -2161,9 +2106,8 @@ %D \macros %D {framednoflines, framedlastlength} %D -%D It is possible to let the frame macro calculate the width -%D of a centered box automatically (\type {fit}). When -%D doing so, we need to reshape the box: +%D It is possible to let the frame macro calculate the width of a centered box +%D automatically (\type {fit}). When doing so, we need to reshape the box: \newcount\framednoflines \newdimen\framedfirstheight @@ -2195,13 +2139,12 @@ % \startformula \startalign \NC \int_01 \NC B \NR \intertext{test} \NC \int_01 \NC D \NR \stopalign \stopformula % \stopTEXpage -%D The examples on the next page show how one can give the -%D frame as well as the background an additional offset and -%D even a bit more depth. The blue outline is the frame, the -%D red box is the background and the small black outline is the -%D visualization of the resulting box, that is, we applied -%D \type{\ruledhbox} to the result. - +%D The examples on the next page show how one can give the frame as well as the +%D background an additional offset and even a bit more depth. The blue outline is +%D the frame, the red box is the background and the small black outline is the +%D visualization of the resulting box, that is, we applied \type {\ruledhbox} to +%D the result. +%D %D \startpostponing %D \bgroup %D \unprotect @@ -2251,9 +2194,8 @@ %D \egroup %D \stoppostponing -%D We can draw lines from left to right and top to bottom by -%D using the normal \type{\hairline} command. Both directions -%D need a different treatment. +%D We can draw lines from left to right and top to bottom by using the normal \type +%D {\hairline} command. Both directions need a different treatment. %D %D \startbuffer %D \framed[width=4cm] {alfa\hairline beta\hairline gamma} @@ -2267,26 +2209,8 @@ %D \hbox{\getbuffer} %D \stoplinecorrection %D -%D These macros try to adapt their behaviour as good as -%D possible to the circumstances and act as natural as -%D possible. - -% \unexpanded\def\pack_framed_vboxed_hairline -% {\bgroup -% \dimen2=\ifconditional\c_framed_has_offset \localoffset \else \zeropoint \fi -% \dimen4=\dimexpr\dimen2+\d_framed_linewidth\relax -% \setbox0\vbox -% {\advance\hsize 2\dimen4 -% \vskip\dimen2 -% \hrule -% \!!height\d_framed_linewidth -% \!!depth\zeropoint -% \!!width\hsize -% \vskip\dimen2}% -% \endgraf\obeydepth\nointerlineskip -% \moveleft\dimen4\box0 -% \endgraf\nointerlineskip\localbegstrut % beware, we might kill it in a style using \vskip\lineheight -% \egroup} % so this must not be changed +%D These macros try to adapt their behaviour as good as possible to the circumstances +%D and act as natural as possible. \unexpanded\def\pack_framed_vboxed_hairline % nasty overlay mess .. needed for autowidth {\begingroup @@ -2312,32 +2236,29 @@ \localbegstrut \endgroup} -% todo: - \unexpanded\def\pack_framed_hboxed_hairline % use framed dimen {\bgroup - \dimen2=\ifconditional\c_framed_has_offset \localoffset \else \zeropoint \fi + \scratchoffset\ifconditional\c_framed_has_offset \localoffset \else \zeropoint \fi \ifconditional\c_framed_has_height - \dimen4\dimexpr\localheight/2+\strutdp-2\d_framed_linewidth\relax - \dimen6\dimexpr\localheight/2-\strutdp+2\d_framed_linewidth\relax + \dimen\scratchheight\dimexpr\localheight/\plustwo+\strutdp-\plustwo\d_framed_linewidth\relax + \dimen\scratchdepth \dimexpr\localheight/\plustwo-\strutdp+\plustwo\d_framed_linewidth\relax \else - \dimen4\dimexpr\strutht+\dimen2\relax - \dimen6\dimexpr\strutdp+\dimen2\relax + \dimen\scratchheight\dimexpr\strutht+\scratchoffset\relax + \dimen\scratchdepth \dimexpr\strutdp+\scratchoffset\relax \fi \unskip \setbox\scratchbox\hbox - {\hskip\dimen2 - \vrule\!!height\dimen4\!!depth\dimen6\!!width\d_framed_linewidth - \hskip\dimen2}% + {\hskip\scratchoffset + \vrule\!!height\dimen\scratchheight\!!depth\dimen\scratchdepth\!!width\d_framed_linewidth + \hskip\scratchoffset}% \ht\scratchbox\strutht \dp\scratchbox\strutdp \box\scratchbox \ignorespaces \egroup} -%D The argument of the frame command accepts \type{\\} as a -%D sort of newline signal. In horizontal boxes it expands to a -%D space. +%D The argument of the frame command accepts \type{\\} as a sort of newline signal. In +%D horizontal boxes it expands to a space. \unexpanded\def\pack_framed_vboxed_newline {\endgraf\ignorespaces} @@ -2345,10 +2266,9 @@ \unexpanded\def\pack_framed_hboxed_newline {\unskip\normalspace\ignorespaces} -%D We can set each rule on or off. The default setting is -%D inherited from \type{frame}. An earlier implementation -%D use a bit different approach, but the new one seems more -%D natural: +%D We can set each rule on or off. The default setting is inherited from +%D \type {frame}. An earlier implementation use a bit different approach, but the new +%D one seems more natural: %D %D \bgroup %D \setuptyping[margin=0pt] @@ -2388,10 +2308,9 @@ %D \macros %D {startframedtext, setupframedtexts, defineframedtext} %D -%D The general framing command we discussed previously, is not -%D entirely suited for what we call framed texts, as for -%D instance used in intermezzo's. The next examples show what -%D we have in mind. +%D The general framing command we discussed previously, is not entirely suited for +%D what we call framed texts, as for instance used in intermezzo's. The next +%D examples show what we have in mind. %D %D \startbuffer[framed-0] %D \setupframedtexts @@ -2453,8 +2372,8 @@ %D \bgroup \setuptyping[margin=0pt] \getbuffer[framed-3] \egroup %D \bgroup \setuptyping[margin=0pt] \getbuffer[framed-4] \egroup %D -%D Here we can see that we have a predefined framed text class -%D as well as the tools for defining our own. So we have: +%D Here we can see that we have a predefined framed text class as well as the +%D tools for defining our own. So we have: %D %D \showsetup{setupframedtexts} %D @@ -2477,7 +2396,7 @@ \let\setupframedtexts\setupframedtext \setupframedtext - [\c!width=0.75\hsize, + [\c!width=.75\hsize, \c!height=\v!fit, \c!align=\v!yes, %\c!top=, @@ -2550,7 +2469,6 @@ \hsize\localhsize % \insidefloattrue % ? better \normalexpanded{\switchtobodyfont[\framedtextparameter\c!bodyfont]}% -% \startcolor[\framedtextparameter\c!color]% \letframedtextparameter\c!strut\v!no \inheritedframedtextframed\bgroup \let\\=\endgraf @@ -2560,9 +2478,8 @@ \setupindenting[\framedtextparameter\c!indenting]% \useframedtextstyleandcolor\c!style\c!color} -%D The \type {none} option is handy for nested usage, as -%D in the presentation styles, where we don't want -%D interference. +%D The \type {none} option is handy for nested usage, as in the presentation +%D styles, where we don't want interference. \defineplacement[\??framedtext][\s!parent=\??framedtext\currentframedtext] @@ -2571,7 +2488,6 @@ \removelastskip \doif{\framedtextparameter\c!depthcorrection}\v!on\pack_framed_text_stop_depth_correction \stopboxedcontent -% \stopcolor \ifconditional\c_framed_text_location_none \egroup \box\b_framed_normal @@ -2640,8 +2556,8 @@ %D \egroup %D \stoptyping -%D The simple brace (or group) delimited case is typeset -%D slightly different and is not aligned. +%D The simple brace (or group) delimited case is typeset slightly different +%D and is not aligned. \unexpanded\def\pack_framed_text_direct#1% {\bgroup @@ -2668,7 +2584,8 @@ \egroup \egroup} -\defineframedtext[\v!framedtext] +\defineframedtext + [\v!framedtext] %D \macros %D {defineframed} @@ -2677,47 +2594,46 @@ %D %D \showsetup{defineframed} %D -%D As suggested by Wolfgang we can now use the new \MKIV\ inheritance -%D model instead of passing a combination of arguments. This also -%D also simplified the \type {\setupframed} command. There are -%D certainly more places where such improvements can be made. +%D As suggested by Wolfgang we can now use the new \MKIV\ inheritance model instead +%D of passing a combination of arguments. This also also simplified the \type +%D {\setupframed} command. There are certainly more places where such improvements +%D can be made. % actually, this can be another command handler .. todo -\unexpanded\def\defineframed - {\dotripleempty\pack_framed_define} +\appendtoks + \ifcsname\??regularframedlevel\currentframed\endcsname + % already defined, keeps settings + \else + \expandafter\newcount\csname\??regularframedlevel\currentframed\endcsname + \fi +\to \everypresetframed -\def\pack_framed_define[#1][#2][#3]% - {\ifcsname\??ol:#1\endcsname - % already defined, keeps settings - \else - \expandafter\newcount\csname\??ol:#1\endcsname % \the\everypresetframed - \fi - \ifsecondargument - \doifassignmentelse{#2} - {\getparameters[\??ol#1][\s!parent=\??ol,#2]}% - {\ifcsname#2\endcsname - \getparameters[\??ol#1][\s!parent=\??ol#2,#3]% - \else - \getparameters[\??ol#1][\s!parent=\??ol,#3]% - \fi}% - \else - \getparameters[\??ol#1][\s!parent=\??ol,#2]% - \fi - \setuvalue{#1}{\pack_framed_defined_process[#1]}}% % \the\everydefineframed +\appendtoks + \setuevalue\currentframed{\pack_framed_defined_process[\currentframed]}% +\to \everydefineframed \newcount\c_framed_crap \unexpanded\def\pack_framed_defined_process[#1]% official (not much checking, todo: parent) {\bgroup - \ifcsname\??ol:#1\endcsname - \expandafter\let\expandafter\c_framed_temp\csname\??ol:#1\endcsname + \ifcsname\??regularframedlevel#1\endcsname + \expandafter\let\expandafter\c_framed_temp\csname\??regularframedlevel#1\endcsname \else \let\c_framed_temp\c_framed_crap \fi \advance\c_framed_temp\plusone - \expandafter\def\csname\??ol#1:\the\c_framed_temp\s!parent\endcsname{\??ol#1}% \inheritlocalframed - \dodoubleempty\pack_framed_process[\??ol#1:\the\c_framed_temp]} + \expandafter\def\csname\??framed#1>\the\c_framed_temp:\s!parent\endcsname{\??framed#1}% \inheritlocalframed + \bgroup + \edef\currentframed{#1>\the\c_pack_framed_temp}% + \pack_framed_initialize + \dosingleempty\pack_framed_process} + +\def\pack_framed_defined_process_indeed[#1]% + {\ifsingleargument % faster + \setupcurrentframed[#1]% here ! + \fi + \pack_framed_process_indeed} \let\placeframed\pack_framed_defined_process % new per 2012/04/23 @@ -2729,8 +2645,8 @@ %D %D but the existing one is ok as well (less csname messy too). -%D New, for the moment private; let's see when GB finds out -%D about this one and its obscure usage. It's used in: +%D New, for the moment private; let's see when GB finds out about this one and its +%D obscure usage. It's used in: %D %D \startbuffer %D \defineframedtext @@ -2764,21 +2680,17 @@ %D %D \typebuffer -% to be redone +\installcorenamespace{framedcontent} -\def\framedcontentparameter #1{\csname\doframedcontentparameter{\??fc\currentframedcontent}#1\endcsname} -\def\doframedcontentparameter #1#2{\ifcsname#1#2\endcsname#1#2\else\expandafter\doframedcontentparentparameter\csname#1\s!parent\endcsname#2\fi} -\def\doframedcontentparentparameter#1#2{\ifx#1\relax\s!empty\else\doframedcontentparameter#1#2\fi} -\def\letframedcontentparameter #1{\expandafter\let\csname\??fc\currentframedcontent#1\endcsname} +\installframedcommandhandler \??framedcontent {framedcontent} \??framedcontent -\presetlocalframed[\??fc] - -\getparameters - [\??fc] +\setupframedcontent [\c!leftoffset=\zeropoint, - \c!rightoffset=\framedcontentparameter\c!leftoffset, + %\c!rightoffset=\framedcontentparameter\c!leftoffset, + \c!rightoffset=\scratchleftoffset, \c!topoffset=\zeropoint, - \c!bottomoffset=\framedcontentparameter\c!topoffset, + %\c!bottomoffset=\framedcontentparameter\c!topoffset, + \c!bottomoffset=\scratchtopoffset, \c!strut=\v!no, %\c!linecorrection=\v!no, %\c!left=, @@ -2786,19 +2698,6 @@ %\c!width=\v!fit, \c!offset=\v!overlay] -\unexpanded\def\defineframedcontent - {\dodoubleempty\dodefineframedcontent} - -\def\dodefineframedcontent[#1][#2]% - {\getparameters[\??fc#1][\s!parent=\??fc,#2]} - -\unexpanded\def\setupframedcontent - {\dodoubleempty\dosetupframedcontent} - -\def\dosetupframedcontent[#1][#2]% - {\def\docommand##1{\getparameters[\??fc##1][#2]}% - \processcommacommand[#1]\docommand} - \unexpanded\def\startframedcontent {\dosingleempty\pack_framed_start_content} @@ -2816,11 +2715,15 @@ {\setbox\b_framed_normal\hbox\bgroup \setlocalhsize \hsize\localhsize - \advance\hsize\dimexpr-\framedcontentparameter\c!leftoffset-\framedcontentparameter\c!rightoffset \relax - \advance\vsize\dimexpr-\framedcontentparameter\c!topoffset -\framedcontentparameter\c!bottomoffset\relax - \hskip\framedcontentparameter\c!leftoffset + \scratchleftoffset \framedcontentparameter\c!leftoffset \relax + \scratchrightoffset \framedcontentparameter\c!rightoffset \relax + \scratchtopoffset \framedcontentparameter\c!topoffset \relax + \scratchbottomoffset\framedcontentparameter\c!bottomoffset\relax + \advance\hsize\dimexpr-\scratchleftoffset-\scratchrightoffset \relax + \advance\vsize\dimexpr-\scratchtopoffset -\scratchbottomoffset\relax + \hskip\scratchleftoffset \vbox\bgroup - \vskip\framedcontentparameter\c!topoffset + \vskip\scratchtopoffset \vbox\bgroup \forgetall \blank[\v!disable]} @@ -2828,9 +2731,9 @@ \def\pack_framed_stop_content_indeed {\removelastskip \egroup - \vskip\framedcontentparameter\c!bottomoffset + \vskip\scratchbottomoffset \egroup - \hskip\framedcontentparameter\c!rightoffset + \hskip\scratchrightoffset \egroup \doif{\framedcontentparameter\c!width}\v!fit {\letframedcontentparameter\c!width\v!fixed}% no shapebox @@ -2842,7 +2745,7 @@ % plaats ? \ifdone\startlinecorrection\fi \framedcontentparameter\c!left % new - \localframed[\??fc\currentframedcontent]{\box\b_framed_normal}% hm + \inheritedframedcontentframed{\box\b_framed_normal}% hm \framedcontentparameter\c!right % new \ifdone\stoplinecorrection\fi \egroup} @@ -2852,54 +2755,4 @@ \setuplinewidth [\v!medium] -% We could omit the empty setings but that is some 10% slower due to -% extra testing in the chain. - -\setupframed - [\c!width=\v!fit, - \c!height=\v!broad, - %\c!lines=, - \c!offset=0.25ex, % \defaultframeoffset - \c!empty=\v!no, - \c!frame=\v!on, - %\c!topframe=, - %\c!bottomframe=, - %\c!leftframe=, - %\c!rightframe=, - \c!radius=.5\bodyfontsize, - \c!rulethickness=\linewidth, - \c!corner=\v!rectangular, - \c!depth=\zeropoint, - %\c!foregroundcolor=, - %\c!foregroundstyle=, - %\c!background=, - \c!backgroundscreen=\defaultbackgroundscreen, - %\c!backgroundcolor=, - \c!backgroundoffset=\zeropoint, - %\c!framecolor=, - \c!frameoffset=\zeropoint, - % somewhat messy - \c!backgroundcorner=\framedparameter\c!corner, - \c!backgroundradius=\framedparameter\c!radius, - \c!backgrounddepth=\framedparameter\c!depth, - \c!framecorner=\framedparameter\c!corner, - \c!frameradius=\framedparameter\c!radius, - \c!framedepth=\framedparameter\c!depth, - % - %\c!component=, - %\c!region=, - %\c!align=, - \c!bottom=\vss, - %\c!top=, - \c!autostrut=\v!yes, - \c!location=\v!normal, - %\c!orientation=, - \c!autowidth=\v!yes, - %\c!setups=, - \c!strut=\v!yes, - %\c!loffset=\zeropoint, - %\c!roffset=\zeropoint, - %\c!toffset=\zeropoint, - ]%\c!boffset=\zeropoint] - \protect \endinput |