diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-11 22:57:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-11 22:57:58 +0000 |
commit | 045d95f6d25e9587842a4a6693ae946495172ec4 (patch) | |
tree | 074bb4bd366b4fde6e322d02fbe0cd2febc57cc3 /Master/texmf-dist/tex | |
parent | 7b231522db5a36ee1adb84012907a09a3aac98e1 (diff) |
mindflow (11mar21) (branch)
git-svn-id: svn://tug.org/texlive/branches/branch2020.0@58281 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/mindflow/mindflow.sty | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/latex/mindflow/mindflow.sty b/Master/texmf-dist/tex/latex/mindflow/mindflow.sty index 230340c4905..4417c90b56f 100644 --- a/Master/texmf-dist/tex/latex/mindflow/mindflow.sty +++ b/Master/texmf-dist/tex/latex/mindflow/mindflow.sty @@ -20,7 +20,9 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{mindflow} - [2021/03/09 Mindflow environment] + [2021/03/11 Mindflow environment] + + \RequirePackage{kvoptions} \SetupKeyvalOptions{% family = @mindflow, @@ -30,31 +32,29 @@ \DeclareBoolOption[false]{leftmarker} % Left marker \DeclareBoolOption[false]{rightmarker} % Right marker \DeclareBoolOption[false]{linenumber} % Line numbers +\DeclareBoolOption[false]{twocolumn} % Two column +\DeclareBoolOption[false]{incolumn} % Separation line fits in the column \ProcessKeyvalOptions*\relax +\if@mindflow@twocolumn + \@mindflow@incolumntrue +\fi + %%================================ %% Initialization %%================================ -\newcommand{\mindflowFont}{\normalfont\footnotesize} -\newcommand{\mindflowNumFont}{\normalfont\scriptsize\ttfamily} - \RequirePackage{lineno} \RequirePackage{xcolor} \colorlet{mfSavedColor}{.} -\colorlet{mindflow}{mfSavedColor!30} +\colorlet{mindflowText}{mfSavedColor!30} +\colorlet{mindflowNum}{mfSavedColor!8} -\newcommand{\mindflowLeft}{% - \if@mindflow@leftmarker% - {*}% - \fi% -} -\newcommand{\mindflowRight}{% - \if@mindflow@rightmarker% - {*}% - \fi% -} +\newcommand{\mindflowTextFont}{\normalfont\footnotesize} +\newcommand{\mindflowNumFont}{\normalfont\scriptsize\ttfamily} +\newcommand{\mindflowLeft}{*} +\newcommand{\mindflowRight}{*} %%================================ %% The mindflow environment @@ -66,7 +66,11 @@ \LNturnsONfalse% \ifLineNumbers\LNturnsONtrue\fi\nolinenumbers% \par\noindent\nopagebreak% - \makebox[\linewidth]{\rule{\paperwidth}{0.4pt}}% + \if@mindflow@incolumn% + \makebox[\linewidth]{\rule{\linewidth}{0.4pt}}% + \else% + \hspace*{-\paperwidth}\makebox[\linewidth]{\rule{4\paperwidth}{0.4pt}}% + \fi% \nopagebreak\par% \ifLNturnsON\linenumbers\fi% } @@ -86,15 +90,20 @@ \setcounter{linenumber}{\value{mfLN}} \LNturnsONfalse% \ifLineNumbers\LNturnsONtrue\fi\nolinenumbers% - \mindflowFont\color{mindflow}% + \mindflowTextFont\color{mindflowText}% \mfSepLine% \linenumbers% \renewcommand\makeLineNumber{% - \hss\color{mindflow!25}% + \hss\color{mindflowNum}% \if@mindflow@linenumber% - \mindflowNumFont\LineNumber~% + \mindflowNumFont\LineNumber~% + \fi% + \if@mindflow@leftmarker% + \mindflowLeft\hspace{1em}% + \fi% + \if@mindflow@rightmarker% + \rlap{\hskip\textwidth\hspace{1em}\mindflowRight}% \fi% - \mindflowLeft\hspace{1em}\rlap{\hskip\textwidth\hspace{1em}\mindflowRight}% }% } {% |