From 79047ab6faaf371d311395c493fa7f2d41b69eee Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 17 Mar 2021 21:44:52 +0000 Subject: mindflow (17mar21) git-svn-id: svn://tug.org/texlive/trunk@58475 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/mindflow/mindflow.sty | 47 +++++++++++++++++++---- 1 file changed, 39 insertions(+), 8 deletions(-) (limited to 'Master/texmf-dist/tex/latex/mindflow') diff --git a/Master/texmf-dist/tex/latex/mindflow/mindflow.sty b/Master/texmf-dist/tex/latex/mindflow/mindflow.sty index 13f8f51f2ee..e585ae53d9e 100644 --- a/Master/texmf-dist/tex/latex/mindflow/mindflow.sty +++ b/Master/texmf-dist/tex/latex/mindflow/mindflow.sty @@ -17,9 +17,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{mindflow} - [2021/03/12 Mindflow environment] - - + [2021/03/17 Mindflow environment] \RequirePackage{kvoptions} \SetupKeyvalOptions{% family = @mindflow, @@ -45,11 +43,14 @@ \RequirePackage{xcolor} \colorlet{mfSavedColor}{.} +\colorlet{mindflowLine}{mfSavedColor!30} \colorlet{mindflowText}{mfSavedColor!30} +\colorlet{mindflowMarker}{mfSavedColor!30} \colorlet{mindflowNum}{mfSavedColor!8} \newcommand{\mindflowTextFont}{\normalfont\footnotesize} \newcommand{\mindflowNumFont}{\normalfont\scriptsize\ttfamily} +\newcommand{\mindflowMarkerFont}{\normalfont\scriptsize\ttfamily} \newcommand{\mindflowLeft}{*} \newcommand{\mindflowRight}{*} \newlength{\mindflowLineHeight} @@ -89,16 +90,17 @@ \setcounter{linenumber}{\value{mfLN}}% \LNturnsONfalse% \ifLineNumbers\LNturnsONtrue\fi\nolinenumbers% + \color{mindflowLine}\mfSepLine% \mindflowTextFont\color{mindflowText}% - \mfSepLine% \linenumbers% \renewcommand\makeLineNumber{% - \hss\color{mindflowNum}% + \hss% \if@mindflow@linenumber% - \mindflowNumFont\LineNumber~% + \mindflowNumFont\color{mindflowNum}\LineNumber\hspace{1em}% \fi% + \color{mindflowMarker}% \if@mindflow@leftmarker% - \mindflowLeft\hspace{1em}% + \mindflowMarkerFont\mindflowLeft\hspace{1em}% \fi% \if@mindflow@rightmarker% \rlap{\hskip\textwidth\hspace{1em}\mindflowRight}% @@ -107,12 +109,41 @@ } {% \par% - \vspace{-.5\baselineskip}\mfSepLine% + \vspace{-.5\baselineskip}\color{mindflowLine}\mfSepLine% \ifLNturnsON\linenumbers\fi% \setcounter{mfLN}{\value{linenumber}}% \setcounter{linenumber}{\value{recordLN}}% } \fi + +\ifdefined\linenomathpatch\else + \RequirePackage{amsmath} + \RequirePackage{etoolbox} + \newcommand*\linenomathpatch[1]{% + \cspreto{#1}{\linenomath}% + \cspreto{#1*}{\linenomath}% + \cspreto{end#1}{\endlinenomath}% + \cspreto{end#1*}{\endlinenomath}% + } + \newcommand*\linenomathpatchAMS[1]{% + \cspreto{#1}{\linenomathAMS}% + \cspreto{#1*}{\linenomathAMS}% + \csappto{end#1}{\endlinenomath}% + \csappto{end#1*}{\endlinenomath}% + } + \expandafter\ifx\linenomath\linenomathWithnumbers + \let\linenomathAMS\linenomathWithnumbers + \patchcmd\linenomathAMS{\advance\postdisplaypenalty\linenopenalty}{}{}{} + \else + \let\linenomathAMS\linenomathNonumbers + \fi + \linenomathpatch{equation} + \linenomathpatchAMS{gather} + \linenomathpatchAMS{multline} + \linenomathpatchAMS{align} + \linenomathpatchAMS{alignat} + \linenomathpatchAMS{flalign} +\fi \endinput %% %% End of file `mindflow.sty'. -- cgit v1.2.3