summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/mindflow
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-11 22:52:00 +0000
committerKarl Berry <karl@freefriends.org>2021-03-11 22:52:00 +0000
commit50803bd6469f50a1d82162fdf241d3443b493dae (patch)
tree5cf54c1aab812dde360286b7892de6257cb5a830 /Master/texmf-dist/tex/latex/mindflow
parentb942b4473d57d787eceff7408b42a24a30897ec0 (diff)
mindflow (11mar21)
git-svn-id: svn://tug.org/texlive/trunk@58278 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/mindflow')
-rw-r--r--Master/texmf-dist/tex/latex/mindflow/mindflow.sty49
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}%
}%
}
{%