diff options
author | Karl Berry <karl@freefriends.org> | 2021-05-26 20:04:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-05-26 20:04:05 +0000 |
commit | a9bd42785945c48202893f0e0f9fb33f478a3acb (patch) | |
tree | 4e9b170e07ad2de4bd19ae48c9544beddec392c5 /Master | |
parent | 8d1fa48748e36b37a06fc39b09607159e1586f90 (diff) |
mindflow (26may21)
git-svn-id: svn://tug.org/texlive/trunk@59358 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/mindflow/mindflow.pdf | bin | 193099 -> 193288 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/mindflow/mindflow.dtx | 84 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mindflow/mindflow.sty | 77 |
3 files changed, 88 insertions, 73 deletions
diff --git a/Master/texmf-dist/doc/latex/mindflow/mindflow.pdf b/Master/texmf-dist/doc/latex/mindflow/mindflow.pdf Binary files differindex bc995ec59fa..cff05860108 100644 --- a/Master/texmf-dist/doc/latex/mindflow/mindflow.pdf +++ b/Master/texmf-dist/doc/latex/mindflow/mindflow.pdf diff --git a/Master/texmf-dist/source/latex/mindflow/mindflow.dtx b/Master/texmf-dist/source/latex/mindflow/mindflow.dtx index 3ba27be29e6..e7d2345dd0e 100644 --- a/Master/texmf-dist/source/latex/mindflow/mindflow.dtx +++ b/Master/texmf-dist/source/latex/mindflow/mindflow.dtx @@ -18,7 +18,7 @@ %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{mindflow} %<*package> - [2021/05/25 mindflow environment] + [2021/05/27 mindflow environment] %</package> % %<*driver> @@ -68,6 +68,7 @@ mindflow,endmindflow,comment,endcomment, mindflowON,endmindflowON,mindflowOFF,endmindflowOFF, mfSepLine,makeLineNumber,LineNumber, + mindflow@makeLineNumber,LocallyStopLineNumbers,ResumeLineNumbers, ifdefined,linenomathpatch,cspreto,csappto,patchcmd,linenomathpatchAMS,linenomathAMS,linenomathWithnumbers,linenomath,endlinenomath,linenomathNonumbers,linenopenalty, define@key,setkeys, nowidow, @@ -76,7 +77,7 @@ \lstnewenvironment{code*}% {\setkeys{lst}{columns=fullflexible,keepspaces=true}}{} \lstnewenvironment{code}% -{\setkeys{lst}{columns=fullflexible,keepspaces=true,numbers=left,numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,lastline=202}}{} +{\setkeys{lst}{columns=fullflexible,keepspaces=true,numbers=left,numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,lastline=209}}{} \EnableCrossrefs \CodelineIndex \RecordChanges @@ -315,8 +316,8 @@ % markers within the \verb|mindflow| environments are called % \verb|mindflowLine|, \verb|mindflowText|, \verb|mindflowNum| and % \verb|mindflowMarker|, respectively. By default, they have the same color as -% the context, with opacity 30\% for the separation lines, text and markers, and -% 8\% for the line numbers. +% the context, with opacity 40\% for the separation lines and text, 20\% for +% the markers, and 8\% for the line numbers. % % \section{The same example} % With option \verb|leftlinenumber, rightlinenumber, leftmarker, rightmarker| @@ -382,9 +383,9 @@ \RequirePackage{xcolor} \colorlet{mfSavedColor}{.} -\colorlet{mindflowLine}{mfSavedColor!30} -\colorlet{mindflowText}{mfSavedColor!30} -\colorlet{mindflowMarker}{mfSavedColor!30} +\colorlet{mindflowLine}{mfSavedColor!40} +\colorlet{mindflowText}{mfSavedColor!40} +\colorlet{mindflowMarker}{mfSavedColor!20} \colorlet{mindflowNum}{mfSavedColor!8} \newcommand{\mindflowTextFont}{\footnotesize} @@ -398,14 +399,22 @@ %%================================ %% The mindflow environment %%================================ +\PassOptionsToPackage{all}{nowidow} \RequirePackage{nowidow} \RequirePackage{verbatim} + \newif\ifLNturnsON +\def\LocallyStopLineNumbers{\LNturnsONfalse% + \ifLineNumbers\LNturnsONtrue\fi\nolinenumbers} +\def\ResumeLineNumbers{\ifLNturnsON\linenumbers\fi} + +\newcounter{recordLN} +\newcounter{mfLN} +\setcounter{mfLN}{1} + \newcommand*{\mfSepLine}{% - \parskip=0pt - \nowidow[3]\par\nobreak% - \LNturnsONfalse% - \ifLineNumbers\LNturnsONtrue\fi\nolinenumbers% + \par%\nobreak% + \LocallyStopLineNumbers% \vspace*{-.5\baselineskip}% \if@mindflow@incolumn% \makebox[\linewidth]{\color{mindflowLine}\rule{\linewidth}{\mindflowLineHeight}}% @@ -413,49 +422,48 @@ \hspace*{-\paperwidth}% \makebox[\linewidth]{\color{mindflowLine}\rule{4\paperwidth}{\mindflowLineHeight}}% \fi% - \nowidow[3]\par\nobreak% - \ifLNturnsON\linenumbers\fi% + \par%\nobreak% + \ResumeLineNumbers% } -\newcounter{recordLN} -\newcounter{mfLN} -\setcounter{mfLN}{1} +\newcommand{\mindflow@makeLineNumber}{% + \hss% + \if@mindflow@leftlinenumber% + \normalfont\mindflowNumFont\color{mindflowNum}\LineNumber\hspace{1em}% + \fi% + \color{mindflowMarker}% + \if@mindflow@leftmarker% + \normalfont\mindflowMarkerFont\mindflowLeft\hspace{1em}% + \fi% + \rlap{\hskip\textwidth% + \if@mindflow@rightmarker% + \hspace{1em}\mindflowRight% + \fi% + \if@mindflow@rightlinenumber% + \hspace{1em}% + \normalfont\mindflowNumFont\color{mindflowNum}\LineNumber% + \fi% + }% +}% \let\mindflowOFF=\comment \let\endmindflowOFF=\endcomment \def\mindflowON{% + \postdisplaypenalty=10000 + \parskip=0pt \medskip% \setcounter{recordLN}{\value{linenumber}}% \setcounter{linenumber}{\value{mfLN}}% - \LNturnsONfalse% - \ifLineNumbers\LNturnsONtrue\fi\nolinenumbers% \mfSepLine% \normalfont\mindflowTextFont\color{mindflowText}% \linenumbers% - \renewcommand{\makeLineNumber}{% - \hss% - \if@mindflow@leftlinenumber% - \normalfont\mindflowNumFont\color{mindflowNum}\LineNumber\hspace{1em}% - \fi% - \color{mindflowMarker}% - \if@mindflow@leftmarker% - \normalfont\mindflowMarkerFont\mindflowLeft\hspace{1em}% - \fi% - \rlap{\hskip\textwidth% - \if@mindflow@rightmarker% - \hspace{1em}\mindflowRight% - \fi% - \if@mindflow@rightlinenumber% - \hspace{1em}% - \normalfont\mindflowNumFont\color{mindflowNum}\LineNumber% - \fi% - }% - }% + \let\makeLineNumber\mindflow@makeLineNumber% + \nopagebreak% } \def\endmindflowON{% + \nowidow[3]% \mfSepLine% - \ifLNturnsON\linenumbers\fi% \setcounter{mfLN}{\value{linenumber}}% \setcounter{linenumber}{\value{recordLN}}% \medskip% diff --git a/Master/texmf-dist/tex/latex/mindflow/mindflow.sty b/Master/texmf-dist/tex/latex/mindflow/mindflow.sty index 6dfa2ca1e94..8d573e83c27 100644 --- a/Master/texmf-dist/tex/latex/mindflow/mindflow.sty +++ b/Master/texmf-dist/tex/latex/mindflow/mindflow.sty @@ -17,7 +17,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{mindflow} - [2021/05/25 mindflow environment] + [2021/05/27 mindflow environment] \RequirePackage{kvoptions} \SetupKeyvalOptions{% family = @mindflow, @@ -52,9 +52,9 @@ \RequirePackage{xcolor} \colorlet{mfSavedColor}{.} -\colorlet{mindflowLine}{mfSavedColor!30} -\colorlet{mindflowText}{mfSavedColor!30} -\colorlet{mindflowMarker}{mfSavedColor!30} +\colorlet{mindflowLine}{mfSavedColor!40} +\colorlet{mindflowText}{mfSavedColor!40} +\colorlet{mindflowMarker}{mfSavedColor!20} \colorlet{mindflowNum}{mfSavedColor!8} \newcommand{\mindflowTextFont}{\footnotesize} @@ -68,14 +68,22 @@ %%================================ %% The mindflow environment %%================================ +\PassOptionsToPackage{all}{nowidow} \RequirePackage{nowidow} \RequirePackage{verbatim} + \newif\ifLNturnsON +\def\LocallyStopLineNumbers{\LNturnsONfalse% + \ifLineNumbers\LNturnsONtrue\fi\nolinenumbers} +\def\ResumeLineNumbers{\ifLNturnsON\linenumbers\fi} + +\newcounter{recordLN} +\newcounter{mfLN} +\setcounter{mfLN}{1} + \newcommand*{\mfSepLine}{% - \parskip=0pt - \nowidow[3]\par\nobreak% - \LNturnsONfalse% - \ifLineNumbers\LNturnsONtrue\fi\nolinenumbers% + \par%\nobreak% + \LocallyStopLineNumbers% \vspace*{-.5\baselineskip}% \if@mindflow@incolumn% \makebox[\linewidth]{\color{mindflowLine}\rule{\linewidth}{\mindflowLineHeight}}% @@ -83,49 +91,48 @@ \hspace*{-\paperwidth}% \makebox[\linewidth]{\color{mindflowLine}\rule{4\paperwidth}{\mindflowLineHeight}}% \fi% - \nowidow[3]\par\nobreak% - \ifLNturnsON\linenumbers\fi% + \par%\nobreak% + \ResumeLineNumbers% } -\newcounter{recordLN} -\newcounter{mfLN} -\setcounter{mfLN}{1} +\newcommand{\mindflow@makeLineNumber}{% + \hss% + \if@mindflow@leftlinenumber% + \normalfont\mindflowNumFont\color{mindflowNum}\LineNumber\hspace{1em}% + \fi% + \color{mindflowMarker}% + \if@mindflow@leftmarker% + \normalfont\mindflowMarkerFont\mindflowLeft\hspace{1em}% + \fi% + \rlap{\hskip\textwidth% + \if@mindflow@rightmarker% + \hspace{1em}\mindflowRight% + \fi% + \if@mindflow@rightlinenumber% + \hspace{1em}% + \normalfont\mindflowNumFont\color{mindflowNum}\LineNumber% + \fi% + }% +}% \let\mindflowOFF=\comment \let\endmindflowOFF=\endcomment \def\mindflowON{% + \postdisplaypenalty=10000 + \parskip=0pt \medskip% \setcounter{recordLN}{\value{linenumber}}% \setcounter{linenumber}{\value{mfLN}}% - \LNturnsONfalse% - \ifLineNumbers\LNturnsONtrue\fi\nolinenumbers% \mfSepLine% \normalfont\mindflowTextFont\color{mindflowText}% \linenumbers% - \renewcommand{\makeLineNumber}{% - \hss% - \if@mindflow@leftlinenumber% - \normalfont\mindflowNumFont\color{mindflowNum}\LineNumber\hspace{1em}% - \fi% - \color{mindflowMarker}% - \if@mindflow@leftmarker% - \normalfont\mindflowMarkerFont\mindflowLeft\hspace{1em}% - \fi% - \rlap{\hskip\textwidth% - \if@mindflow@rightmarker% - \hspace{1em}\mindflowRight% - \fi% - \if@mindflow@rightlinenumber% - \hspace{1em}% - \normalfont\mindflowNumFont\color{mindflowNum}\LineNumber% - \fi% - }% - }% + \let\makeLineNumber\mindflow@makeLineNumber% + \nopagebreak% } \def\endmindflowON{% + \nowidow[3]% \mfSepLine% - \ifLNturnsON\linenumbers\fi% \setcounter{mfLN}{\value{linenumber}}% \setcounter{linenumber}{\value{recordLN}}% \medskip% |