summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/mindflow
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-17 21:44:52 +0000
committerKarl Berry <karl@freefriends.org>2021-03-17 21:44:52 +0000
commit79047ab6faaf371d311395c493fa7f2d41b69eee (patch)
tree562b032a405839efbab8cb7bf3a3fc349c640cd5 /Master/texmf-dist/tex/latex/mindflow
parentf06e79bd309afbadc3fac255ad00b59ea6eb1652 (diff)
mindflow (17mar21)
git-svn-id: svn://tug.org/texlive/trunk@58475 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/mindflow')
-rw-r--r--Master/texmf-dist/tex/latex/mindflow/mindflow.sty47
1 files changed, 39 insertions, 8 deletions
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'.