diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-03-13 21:26:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-03-13 21:26:00 +0100 |
commit | 729d3d0b48bf862c0dcf97b038c07b8563e3dc53 (patch) | |
tree | 52424500941c8c5e973b2d7279d5c34021b341a6 /tex/context/base/syst-aux.mkiv | |
parent | e5c38ccdf08d13ffe4fe365c7af07143d7dde75b (diff) | |
download | context-729d3d0b48bf862c0dcf97b038c07b8563e3dc53.tar.gz |
beta 2012.03.13 21:26
Diffstat (limited to 'tex/context/base/syst-aux.mkiv')
-rw-r--r-- | tex/context/base/syst-aux.mkiv | 51 |
1 files changed, 39 insertions, 12 deletions
diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv index 5f00960e0..1fbf98296 100644 --- a/tex/context/base/syst-aux.mkiv +++ b/tex/context/base/syst-aux.mkiv @@ -5130,21 +5130,48 @@ %D These examples show us that an optional can be used. The %D value provided is added to \type{\localhsize}. -\newdimen\localhsize +% todo: a fast non argument variant -\def\complexsetlocalhsize[#1]% don't change ! - {\localhsize\hsize - \ifnum\hangafter<\zerocount - \advance\localhsize\ifdim\hangindent>\zeropoint-\fi\hangindent - \fi - \advance\localhsize -\leftskip - \advance\localhsize -\rightskip - \advance\localhsize #1\relax} +\newdimen\localhsize -\def\simplesetlocalhsize - {\complexsetlocalhsize[\zeropoint]} +% \def\complexsetlocalhsize[#1]% don't change ! +% {\localhsize\hsize +% \ifnum\hangafter<\zerocount +% \advance\localhsize\ifdim\hangindent>\zeropoint-\fi\hangindent +% \fi +% \advance\localhsize -\leftskip +% \advance\localhsize -\rightskip +% \advance\localhsize #1\relax} +% +% \def\simplesetlocalhsize +% {\complexsetlocalhsize[\zeropoint]} +% +% \definecomplexorsimple\setlocalhsize + +\unexpanded\def\setlocalhsize % don't change ! + {\doifnextoptionalelse + \syst_helpers_set_local_hsize_yes + \syst_helpers_set_local_hsize_nop} + +% \def\syst_helpers_set_local_hsize_nop +% {\localhsize\hsize +% \ifnum\hangafter<\zerocount +% \advance\localhsize\ifdim\hangindent>\zeropoint-\fi\hangindent +% \fi +% \advance\localhsize -\leftskip +% \advance\localhsize -\rightskip} + +\def\syst_helpers_set_local_hsize_nop + {\localhsize\dimexpr + \hsize -\leftskip -\rightskip + \ifnum\hangafter<\zerocount + \ifdim\hangindent>\zeropoint-\else+\fi\hangindent + \fi + \relax} -\definecomplexorsimple\setlocalhsize +\def\syst_helpers_set_local_hsize_yes[#1]% + {\syst_helpers_set_local_hsize_nop + \advance\localhsize#1\relax} %D \macros %D {doifvalue,doifnotvalue,doifelsevalue, |