summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/struktex/struktex.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/struktex/struktex.sty')
-rw-r--r--Master/texmf-dist/tex/latex/struktex/struktex.sty85
1 files changed, 66 insertions, 19 deletions
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}