diff options
Diffstat (limited to 'Master/texmf-dist/doc/support/latexindent/success/stylefile.tex')
-rw-r--r-- | Master/texmf-dist/doc/support/latexindent/success/stylefile.tex | 152 |
1 files changed, 77 insertions, 75 deletions
diff --git a/Master/texmf-dist/doc/support/latexindent/success/stylefile.tex b/Master/texmf-dist/doc/support/latexindent/success/stylefile.tex index 1fd497c1e2f..c7e3cce3730 100644 --- a/Master/texmf-dist/doc/support/latexindent/success/stylefile.tex +++ b/Master/texmf-dist/doc/support/latexindent/success/stylefile.tex @@ -45,89 +45,91 @@ Another tabbing mechanism]\relax \advance\CurrentLineWidth -2em \advance\CurrentLineWidth -\displayindent \advance\CurrentLineWidth -\leftskip - \fi\fi - \ifdim\CurrentLineWidth<\z@ \CurrentLineWidth\z@\fi - % Enshrine the tab-to position; #1 might reference \CurrentLineWidth - \@tempdimb=#1\relax - \message{*** Tab to \the\@tempdimb, previous width is \the\CurrentLineWidth. ***}% - % Save width for possible return use - \xdef\TabPrevPos{\the\CurrentLineWidth}% - % Build the action to perform - \protected@xdef\TTo@action{% - \vrule\@width\z@\@depth\the\prevdepth - \ifdim\CurrentLineWidth>\@tempdimb - \ifTTo@overlap\else - \protect\newline \protect\null - \fi\fi - \protect\nobreak - \protect\hskip\the\@tempdimb\relax - }% - %\message{\string\TTo@action: \meaning \TTo@action. }% - % get back to the baseline, regardless of its depth. - \vskip-\prevdepth - \prevdepth-99\p@ - \vskip\prevdepth - }}% - $$ - % Don't count the display as lines in the paragraph - \count@\prevgraf \advance\count@-4 \prevgraf\count@ - \TTo@action - %% \penalty\@m % to allow a penalized line break - \fi - \endgroup - \TTo@overlapfalse - \ignorespaces + \fi \fi - } + \ifdim\CurrentLineWidth<\z@ \CurrentLineWidth\z@\fi + % Enshrine the tab-to position; #1 might reference \CurrentLineWidth + \@tempdimb=#1\relax + \message{*** Tab to \the\@tempdimb, previous width is \the\CurrentLineWidth. ***}% + % Save width for possible return use + \xdef\TabPrevPos{\the\CurrentLineWidth}% + % Build the action to perform + \protected@xdef\TTo@action{% + \vrule\@width\z@\@depth\the\prevdepth + \ifdim\CurrentLineWidth>\@tempdimb + \ifTTo@overlap\else + \protect\newline \protect\null + \fi + \fi + \protect\nobreak + \protect\hskip\the\@tempdimb\relax + }% + %\message{\string\TTo@action: \meaning \TTo@action. }% + % get back to the baseline, regardless of its depth. + \vskip-\prevdepth + \prevdepth-99\p@ + \vskip\prevdepth + }}% + $$ + % Don't count the display as lines in the paragraph + \count@\prevgraf \advance\count@-4 \prevgraf\count@ + \TTo@action + %% \penalty\@m % to allow a penalized line break + \fi + \endgroup + \TTo@overlapfalse + \ignorespaces + \fi +} - % \tab -- to the next position - % \hskip so \tab\tab moves two positions - % Allow a (penalized but flexible) line-break right after the tab. - % - \newcommand\tab{\leavevmode\hskip2sp\tabto{\NextTabStop}% - \nobreak\hskip\z@\@plus 30\p@\penalty4000\hskip\z@\@plus-30\p@\relax} +% \tab -- to the next position +% \hskip so \tab\tab moves two positions +% Allow a (penalized but flexible) line-break right after the tab. +% +\newcommand\tab{\leavevmode\hskip2sp\tabto{\NextTabStop}% + \nobreak\hskip\z@\@plus 30\p@\penalty4000\hskip\z@\@plus-30\p@\relax} - % Expandable macro to select the next tab position from the list +% Expandable macro to select the next tab position from the list - \newcommand\NextTabStop{% - \expandafter \TTo@nexttabstop \TabStopList,\maxdimen,>% - } +\newcommand\NextTabStop{% + \expandafter \TTo@nexttabstop \TabStopList,\maxdimen,>% +} - \def\TTo@nexttabstop #1,{% - \ifdim#1<\CurrentLineWidth - \expandafter\TTo@nexttabstop - \else - \ifdim#1<0.9999\linewidth#1\else\z@\fi - \expandafter\strip@prefix - \fi - } - \def\TTo@foundtabstop#1>{} +\def\TTo@nexttabstop #1,{% + \ifdim#1<\CurrentLineWidth + \expandafter\TTo@nexttabstop + \else + \ifdim#1<0.9999\linewidth#1\else\z@\fi + \expandafter\strip@prefix + \fi +} +\def\TTo@foundtabstop#1>{} - \newcommand\TabPositions[1]{\def\TabStopList{\z@,#1}} +\newcommand\TabPositions[1]{\def\TabStopList{\z@,#1}} - \newcommand\NumTabs[1]{% - \def\TabStopList{}% - \@tempdimb\linewidth - \divide\@tempdimb by#1\relax - \advance\@tempdimb 1sp % counteract rounding-down by \divide - \CurrentLineWidth\z@ - \@whiledim\CurrentLineWidth<\linewidth\do {% - \edef\TabStopList{\TabStopList\the\CurrentLineWidth,}% - \advance\CurrentLineWidth\@tempdimb - }% - \edef\TabStopList{\TabStopList\linewidth}% - } +\newcommand\NumTabs[1]{% + \def\TabStopList{}% + \@tempdimb\linewidth + \divide\@tempdimb by#1\relax + \advance\@tempdimb 1sp % counteract rounding-down by \divide + \CurrentLineWidth\z@ + \@whiledim\CurrentLineWidth<\linewidth\do {% + \edef\TabStopList{\TabStopList\the\CurrentLineWidth,}% + \advance\CurrentLineWidth\@tempdimb + }% + \edef\TabStopList{\TabStopList\linewidth}% +} - % default setting of tab positions: - \TabPositions{\parindent,.5\linewidth} +% default setting of tab positions: +\TabPositions{\parindent,.5\linewidth} - \newif\ifTTo@overlap \TTo@overlapfalse +\newif\ifTTo@overlap \TTo@overlapfalse - \@ifundefined{predisplaydirection}{ - \let\TTo@Direction\predisplaysize - \let\predisplaydirection\@undefined - } - { - \let\TTo@Direction\predisplaydirection - } +\@ifundefined{predisplaydirection}{ + \let\TTo@Direction\predisplaysize + \let\predisplaydirection\@undefined +} +{ + \let\TTo@Direction\predisplaydirection +} |