From 367b7308be7e0cfe84cf093538bb7c37a70e7138 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 7 Mar 2018 21:48:57 +0000 Subject: struktex (7mar18) git-svn-id: svn://tug.org/texlive/trunk@46873 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/struktex/struktex.sty | 85 ++++++++++++++++++----- Master/texmf-dist/tex/latex/struktex/struktxf.sty | 3 +- 2 files changed, 67 insertions(+), 21 deletions(-) (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/struktex/struktex.sty b/Master/texmf-dist/tex/latex/struktex/struktex.sty index cfb76c5b740..ef0cfa7b4c7 100644 --- a/Master/texmf-dist/tex/latex/struktex/struktex.sty +++ b/Master/texmf-dist/tex/latex/struktex/struktex.sty @@ -25,19 +25,30 @@ }% %% \RequirePackage{ifthen} +\let\@ifthenelse\ifthenelse \RequirePackage{struktxf} \RequirePackage{struktxp} -\newcommand{\dbgString@nss}[1]{\typeout{===> dbg String:\space#1}} +\newcommand{\dbgArgs@nss}[1]{\typeout{===> dbg Args:\space\space\space#1}} +\newcommand{\dbgCond@nss}[1]{% + \@ifthenelse{\boolean{#1}}{ + \typeout{===> dbg Cond:\space #1 = true} + }{ + \typeout{===> dbg Cond:\space #1 = false} + } +} \newcommand{\dbgCount@nss}[2][]{% \def\argI{#1}% ^^A dbg - \typeout{===> dbg Count:\space\space\ifx\argI\empty\else(#1)\space\fi\string#2 = \the#2}} + \typeout{===> dbg Count:\space\space\ifx\argI\empty\else(#1)\space\fi% + \string#2 = \the#2}} \newcommand{\dbgCoord@nss}[3][]{% \def\argI{#1}% ^^A dbg - \typeout{===> dbg Coord:\space\space\ifx\argI\empty\else(#1)\space\fi(\string#2, - \string#3) = (\the#2, \the#3)}}% ^^A dbg + \typeout{===> dbg Coord:\space\space\ifx\argI\empty\else(#1)\space\fi% + (\string#2, \string#3) = (\the#2, \the#3)}}% ^^A dbg \newcommand{\dbgMark@nss}[3][]{% \def\argI{#1}% ^^A dbg - \put(#2,#3){\makebox(0,0)[cc]{\ifx\argI\empty$\bullet$\else#1\fi}}}% ^^A dbg + \put(#2,#3){\makebox(0,0)[cc]{\ifx\argI\empty$\bullet$\else#1\fi% + }}}% ^^A dbg +\newcommand{\dbgString@nss}[1]{\typeout{===> dbg String:\space#1}} \newboolean{curves} \newboolean{emlines} \newboolean{pictIIe} @@ -112,6 +123,13 @@ {% \setboolean{outer}{true} } +\def\dimtomm #1{\the\numexpr \dimexpr #1\relax*635000/118407168\relax } +\newboolean{fixedindent@nss} +\DeclareOption{fixedindent}% +{% + \setboolean{fixedindent@nss}{true} + \gdef\xindent@nss{\dimtomm{\baselineskip}} +} %% \ifnum\language=\languageNGerman% \ExecuteOptions{pict2e,english,final} \ProcessOptions*\relax @@ -125,10 +143,11 @@ \ifthenelse{\boolean{debug}}{ \typeout{debug active}}{ \typeout{debug inactive} - \renewcommand{\dbgString@nss}[1]{} + \renewcommand{\dbgCond@nss}[1]{} \renewcommand{\dbgCount@nss}[2][]{} \renewcommand{\dbgCoord@nss}[3][]{} \renewcommand{\dbgMark@nss}[3][]{} + \renewcommand{\dbgString@nss}[1]{} } \def\StrukTeX{S\kern-.05emt\kern-.05em\raise.5ex\hbox{r}% \kern-.1667emu\kern-.05em\lower.5ex\hbox{k}% @@ -203,8 +222,7 @@ \let\struktogramm@nss=\struktogramm@NoProof% } \let\struktogramm@nss=\struktogramm@NoProof% -\def\openstrukt#1#2% -{% +\def\openstrukt#1#2{% \setlength{\savelength@nss}{\unitlength} \setlength{\unitlength}{0.001mm} \begin{picture}(#1000,#2000) @@ -220,6 +238,7 @@ \def\getnum[#1]{\param@nss=#1\next} \def\str@kt#1#2#3{% \dbgString@nss{Beginn \string\str@kt} + \dbgArgs@nss{#1, #2, #3} \global\gx@nss=#1\global\gy@nss=#2\global\gsize@nss=#3% \begingroup% \x@nss=\gx@nss\y@nss=\gy@nss\xsize@nss=\gsize@nss% @@ -272,6 +291,7 @@ \else% \advance\y@nss by \ydepth@nss% \fi\fi% + \dbgString@nss{Ende \string\block@nss} } \def\declarationtitle{\declarationtitlename@nss} \newlength{\descriptionindent} \setlength{\descriptionindent}{1.5em} @@ -578,12 +598,18 @@ \def\while{\let\next=\@while\getoption} \def\@while#1{% \dbgString@nss{Beginn \string\@while} + \dbgCond@nss{fixedindent@nss} \tempx@nss=\xsize@nss\divide\tempx@nss by 6 \set@nss{#1\hskip\xsize@nss\unitlength}{\tempx@nss} \tempy@nss=\number\param@nss000 \block@nss{\tempy@nss}{0} \tempy@nss=\y@nss\advance\y@nss by \ydepth@nss - \tempx@nss=\x@nss\advance\tempx@nss by \ydepth@nss - \tempxx@nss=\xsize@nss\advance\tempxx@nss by -\ydepth@nss + \@ifthenelse{\boolean{fixedindent@nss}}{% + \tempx@nss=\x@nss\advance\tempx@nss by \xindent@nss + \tempxx@nss=\xsize@nss\advance\tempxx@nss by -\xindent@nss + }{% + \tempx@nss=\x@nss\advance\tempx@nss by \ydepth@nss + \tempxx@nss=\xsize@nss\advance\tempxx@nss by -\ydepth@nss + } \str@kt{\tempx@nss}{\tempy@nss}{\tempxx@nss}% } \def\whileend{% @@ -594,19 +620,40 @@ } \def\until{\let\next=\@until\getoption} \def\@until#1{\tempx@nss=\xsize@nss\divide\tempx@nss by 6 - \set@nss{#1\hskip\xsize@nss\unitlength}{\tempx@nss} - \tempy@nss=\number\param@nss000 \block@nss{\tempy@nss}{2} + \dbgString@nss{Beginn \string\@until} + \dbgCoord@nss[Ursprung]{\x@nss}{\y@nss} + \dbgCount@nss[Breite]{\xsize@nss} + \set@nss{#1\hskip\xsize@nss\unitlength}{\tempx@nss} + \tempy@nss=\number\param@nss000 \block@nss{\tempy@nss}{2} + \@ifthenelse{\boolean{fixedindent@nss}}{% + \advance\x@nss by \xindent@nss\tempxx@nss=\xsize@nss + \advance\tempxx@nss by -\xindent@nss \tempy@nss=\ydepth@nss + % \advance\x@nss by \xindent@nss\tempxx@nss=\xsize@nss + % \advance\tempxx@nss by -\xindent@nss \tempy@nss=\ydepth@nss + }{ \advance\x@nss by \ydepth@nss\tempxx@nss=\xsize@nss \advance\tempxx@nss by -\ydepth@nss \tempy@nss=\ydepth@nss - \str@kt{\x@nss}{\y@nss}{\tempxx@nss} } -\def\untilend{\endstr@kt\advance\x@nss by-\tempy@nss - \advance\ydepth@nss by -\tempy@nss - \tempyy@nss=\ydepth@nss\ydepth@nss=-\ydepth@nss% - \advance\ydepth@nss by \y@nss - \y@nss=\tempyy@nss + } + \str@kt{\x@nss}{\y@nss}{\tempxx@nss} +} +\def\untilend{\endstr@kt% + \advance\ydepth@nss by -\tempy@nss + \tempyy@nss=\ydepth@nss\ydepth@nss=-\ydepth@nss% + \advance\ydepth@nss by \y@nss + \y@nss=\tempyy@nss + \@ifthenelse{\boolean{fixedindent@nss}}{% + \advance\x@nss by -\xindent@nss + \put(\x@nss,\y@nss){\framebox(\xsize@nss,\ydepth@nss){}} + \put(\x@nss,\y@nss){\makebox(\xsize@nss,\tempy@nss) + {\box\TextBox@nss}} + }{% + \advance\x@nss by-\tempy@nss \put(\x@nss,\y@nss){\framebox(\xsize@nss,\ydepth@nss){}} \put(\x@nss,\y@nss){\makebox(\xsize@nss,\tempy@nss) - {\box\TextBox@nss}}} + {\box\TextBox@nss}} + }% + \dbgString@nss{Ende \string\untilend}% +} \def\case{\let\next=\@case\getoption} \def\@case#1#2#3#4{% \dbgString@nss{Beginn \string\@case} diff --git a/Master/texmf-dist/tex/latex/struktex/struktxf.sty b/Master/texmf-dist/tex/latex/struktex/struktxf.sty index 6c7044a57b8..2d89d940965 100644 --- a/Master/texmf-dist/tex/latex/struktex/struktxf.sty +++ b/Master/texmf-dist/tex/latex/struktex/struktxf.sty @@ -37,8 +37,7 @@ <-8> cmbtt8 <9> cmbtt9 <10-> cmbtt10 }{} -\def\btt% -{% +\def\btt{% \fontencoding{\encodingdefault}\fontfamily{cmbtt}\fontseries{bx}% \fontshape{n}\selectfont% } -- cgit v1.2.3