summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/mindflow
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-02-02 03:04:47 +0000
committerNorbert Preining <norbert@preining.info>2022-02-02 03:04:47 +0000
commit460879b45ff6e83765da88734e8cc0c6da5043eb (patch)
tree8bbeaad213d6647db82d17b25a6ffd5bab08da18 /macros/latex/contrib/mindflow
parent811714247a66acfce87bba00b9758441ff9d1413 (diff)
CTAN sync 202202020304
Diffstat (limited to 'macros/latex/contrib/mindflow')
-rw-r--r--macros/latex/contrib/mindflow/README.md4
-rw-r--r--macros/latex/contrib/mindflow/mindflow.dtx112
-rw-r--r--macros/latex/contrib/mindflow/mindflow.pdfbin172607 -> 191911 bytes
3 files changed, 61 insertions, 55 deletions
diff --git a/macros/latex/contrib/mindflow/README.md b/macros/latex/contrib/mindflow/README.md
index 5b8f135fb0..16c3675a42 100644
--- a/macros/latex/contrib/mindflow/README.md
+++ b/macros/latex/contrib/mindflow/README.md
@@ -1,4 +1,4 @@
-<!-- Copyright (C) 2021 by Jinwen XU -->
+<!-- Copyright (C) 2021-2022 by Jinwen XU -->
# The mindflow package
@@ -6,6 +6,8 @@
More specifically, it provides a LaTeX environment with its own line numbers or markers, which can be well distinguished from the main text.
+For more information, please refer to its documentation.
+
# License
This work is released under the LaTeX Project Public License, v1.3c or later.
diff --git a/macros/latex/contrib/mindflow/mindflow.dtx b/macros/latex/contrib/mindflow/mindflow.dtx
index 8111c872ec..221a7e3c78 100644
--- a/macros/latex/contrib/mindflow/mindflow.dtx
+++ b/macros/latex/contrib/mindflow/mindflow.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2021 by Jinwen XU
+% Copyright (C) 2021-2022 by Jinwen XU
% -------------------------------
%
% This file may be distributed and/or modified under the conditions of the LaTeX
@@ -18,7 +18,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{mindflow}
%<*package>
- [2021/12/16 mindflow environment]
+ [2022/01/31 The mindflow environment]
%</package>
%
%<*driver>
@@ -26,18 +26,23 @@
\usepackage{doc}
\usepackage[a4paper,top=1.2in,bottom=1.2in,left=1.6in,right=1.2in]{geometry}
\usepackage{titlesec}
-\titleformat{\section}{\large\scshape\centering}{\thesection.}{.5em}{}
-\titleformat{\subsection}{\large\itshape}{\thesubsection}{.5em}{}
+\titleformat{\section}{\large\scshape\centering}{\textcolor{black!55}{$\thesection$}}{.5em}{}
+\titleformat{\subsection}{\normalsize\scshape}{\textcolor{black!55}{$\thesubsection$}}{.5em}{}
+\titlespacing{\section}{0pt}{.75pc}{.5pc}
+\titlespacing{\subsection}{0pt}{.75pc}{.5pc}
\usepackage{titling}
-\setlength{\droptitle}{-.7in}
+\setlength{\droptitle}{-.75in}
\usepackage{enumitem}
\setlist{noitemsep}
-\usepackage{mathpazo,newpxtext}
+\setlist[itemize,1]{label=\textcolor{black!55}{$\bullet$}}
+\usepackage{newpxtext}
\useosf
+\usepackage{amssymb}
+\usepackage[euler-digits]{eulervm}
+% \usepackage{ebgaramond,ebgaramond-maths}
\usepackage[symbol]{footmisc}
\usepackage{microtype}
-\PassOptionsToPackage{mathlines}{lineno}
-\usepackage[linenumber,rightmarker]{mindflow}
+\usepackage[mathlines,linenumber,rightmarker]{mindflow}
\usepackage{parskip}
\usepackage{listings}
\definecolor{maintheme}{RGB}{50,100,150}
@@ -63,7 +68,7 @@
{linenumbers,nolinenumbers,mindflowLeft,mindflowRight,mindflowTextFont,mindflowNumFont,mindflowMarkerFont,mindflowLineHeight,setlength,colorlet,color,
RequirePackage,SetupKeyvalOptions,DeclareBoolOption,ProcessKeyvalOptions,PassOptionsToPackage,
PackageWarning,MessageBreak,
- @mindflow@incolumntrue,if@mindflow@linenumber,@mindflow@leftlinenumbertrue,if@mindflow@on,if@mindflow@off,@mindflow@offfalse,if@mindflow@incolumn,if@mindflow@leftlinenumber,if@mindflow@rightlinenumber,if@mindflow@leftmarker,if@mindflow@rightmarker,if@mindflow@nonbreakable,
+ @mindflow@incolumntrue,if@mindflow@linenumber,@mindflow@leftlinenumbertrue,if@mindflow@on,if@mindflow@off,@mindflow@offfalse,if@mindflow@incolumn,if@mindflow@leftlinenumber,if@mindflow@rightlinenumber,if@mindflow@leftmarker,if@mindflow@rightmarker,if@mindflow@nonbreakable,if@mindflow@mathlines,
mindflow@parindent,mindflow@parskip,
ifLNturnsON,LNturnsONtrue,LNturnsONfalse,ifLineNumbers,
mindflowset,
@@ -82,7 +87,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=231}}{}
+{\setkeys{lst}{columns=fullflexible,keepspaces=true,numbers=left,numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,lastline=236}}{}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
@@ -97,25 +102,25 @@
% \GetFileInfo{mindflow.dtx}
%
%
-% \title{{\normalfont\textsf{mindflow}} -- write your ideas in a clear way}
-% \author{\scshape Jinwen Xu}
-% \date{\filedate}
+% \title{{\huge\scshape\textsf{mindflow}}\\[.15\baselineskip]\itshape\large write your ideas in a clear way\smallskip}
+% \author{\scshape Jinwen XU}
+% \footnotetext{\hspace*{-1em}Corresponding to: \textsf{mindflow} \ttfamily\filedate}
+% \date{\normalsize January 2022, in Paris}
%
% \maketitle
%
% \section{Introduction}
%
% The \textsf{mindflow} package provides you a way to write your ideas
-% and annotations clearly. For example, with the options
-% \verb|linenumber| and \verb|rightmarker|, you will get something like:
+% and annotations clearly. For example, with the options \verb|linenumber|
+% and \verb|rightmarker|, you will get something like this:
% \begin{mindflow}
% What to write next:
% \begin{itemize}
% \item usage: the initialization, options and configuration;
-% \item an example;
+% \item an example maybe;
% \item some word on the line numbering feature;
-% \item some internal macros;
-% \item the complete code.
+% \item some internal macros and the complete code.
% \end{itemize}
% \end{mindflow}
% This example only shows the default effect. You can customize it further according to the instructions in the next section.
@@ -123,7 +128,7 @@
% \section{The usage}
%
% \subsection{How to load it\,?}
-% Simply load the package with
+% Simply load the package with
% \iffalse
%<*example>
% \fi
@@ -134,21 +139,24 @@
%</example>
% \fi
%
-% By default, the environment has no line numbers or markers. You can use the
-% following options (they can be specified directly, like \verb|off|, or as a
-% boolean optional, like \verb|off=false|):
+% By default, there are no decorations like line numbers or markers. To enable
+% them, you can use the following options (they can be specified directly, like
+% \verb|off|, or as a boolean optional, like \verb|off=false|):
%
+% \begin{center}
% \begin{tabular}{ll}
-% \verb|linenumber|\hspace{5em} & Same as \verb|leftlinenumber|\\
+% \verb|linenumber|\hspace{5em} & Enable line numbering feature, same as \verb|leftlinenumber|\\
+% \verb|mathlines| & Enable line numbers for displayed equations\\
% \verb|leftlinenumber| & Enable left line numbers\\
% \verb|rightlinenumber| & Enable right line numbers\\
-% \verb|leftmarker| & Enable left marker, by default it is a ``\verb|*|''\\
-% \verb|rightmarker| & Enable right marker, by default it is a ``\verb|*|''\\
+% \verb|leftmarker| & Enable left marker, by default it is an asterisk ``\verb|*|''\\
+% \verb|rightmarker| & Enable right marker, by default it is an asterisk ``\verb|*|''\\
% \verb|incolumn| & The separation line would fit in the column \\&(\emph{automatically applied in two-column documents})\\
% \verb|off|, \verb|on| & Turn the \verb|mindflow| environments \emph{off} or \emph{on}
% \end{tabular}
+% \end{center}
%
-% Additionally, there is an option \verb|nonbreakble|, which enables the \textsf{tcolorbox} version, permits a background color, but is not breakable and doesn't support line numbering quite well.
+% There is also an option \verb|nonbreakable|, which enables the \textsf{tcolorbox} version, permitting a background color, but is not breakable and does not support line numbering quite well.
%
% \subsection{How to use it\,?}
% \DescribeEnv{\{mindflow\}}
@@ -165,11 +173,13 @@
%</example>
% \fi
%
-% \subsection{Further configuration}
+% \subsection{Further configurations}
%
% \DescribeMacro{\mindflowset}
% You can use \lstinline|\mindflowset{|\meta{configuration}\lstinline|}| to
-% configure the \texttt{mindflow} environment. The available keys are listed at the top of the next page.
+% further configure the \texttt{mindflow} environment. The available keys are
+% listed at the top of the next page.
+% \clearpage
%
% \begin{center}
% \begin{tabular}{ll|ll}
@@ -181,10 +191,10 @@
% \verb|linecolor| & Color of the separation line & \verb|lineheight| & Height of the separation line\\
% \hline
% \end{tabular}
-%\end{center}
+% \end{center}
%
-% Additionally, all the options mentioned in the previous section (except for \verb|nonbreakble|) can be set with \lstinline|\mindflowset|.%
-% \footnote{If the package option \texttt{nonbreakble} is enabled, then there is also a key \texttt{backgroundcolor}, similar to \texttt{textcolor}, for configuring the background color of the \texttt{mindflow} environments.}
+% Additionally, most of the options mentioned in the previous section (except for \verb|nonbreakable| and \verb|mathlines|) can be set with \lstinline|\mindflowset|.%
+% \footnote{If the package option \texttt{nonbreakable} is enabled, then there is also a key \texttt{backgroundcolor}, similar to \texttt{textcolor}, for configuring the background color of the \texttt{mindflow} environments.}
%
% \section{An example}
% With the following settings:
@@ -210,7 +220,7 @@
%</example>
% \fi
% \vspace{-.5\baselineskip}
-% One will have something like this:
+% One will get something like this (a little bit exaggerated, to be honest):
% \begingroup
% \makeatletter
% \@mindflow@leftmarkertrue
@@ -249,40 +259,29 @@
%
% \nolinenumbers
%
-% The line numbering feature is provided by the package \textsf{lineno}. For
-% more details, please refer to its documentation. Notice that, by default,
-% displayed equations are not numbered. You can add the following line before
-% \lstinline|\usepackage{mindflow}|:
-% \iffalse
-%<*example>
-% \fi
-\begin{code*}
-\PassOptionsToPackage{mathlines}{lineno}
-\end{code*}
-% \iffalse
-%</example>
-% \fi
-% \vspace{-.5\baselineskip}
-% to enable the line numbers for displayed equations.
+% The line numbering feature is provided by package \textsf{lineno}. For
+% more details, please refer to its documentation. Notice that
+% displayed equations are not numbered by default. To enable the line numbers for them, you can use the option \verb|mathlines|. The result would be like:
%
% \begin{mindflow}\vspace{-\baselineskip}
% \begin{align*}
-% (a + b)^2 &= a^2 + 2ab + b^2\\
-% (a + b)^3 &= a^3 + 3a^2b + 3ab^2 + b^3
+% \sum_{i_1 < \cdots < i_n} \prod_{1 \leqslant j \leqslant n} i_j^{-2} &= \frac{\pi^{2n}}{(2n+1)!}\\
+% \implies \frac{e^{\pi}-e^{-\pi}}{2\pi} &= 1+ \sum_{n \geqslant 1} \sum_{i_1 < \cdots < i_n} \prod_{1 \leqslant j \leqslant n} i_j^{-2}
% \end{align*}
% \end{mindflow}
-% \smallskip
%
% \clearpage
+% {\color{black!55}
% \makebox[\linewidth]{\rule{4\paperwidth}{\mindflowLineHeight}}%
% \centerline{\itshape ---~~Readers who are not interested in technical details can skip the rest~~---}
%
% \vspace{-\baselineskip}
% \makebox[\linewidth]{\rule{4\paperwidth}{\mindflowLineHeight}}%
+% }
%
% \section{Some \TeX{}nical details}
%
-% \subsection{Internal macro for text elements}
+% \subsection{Internal macros for text elements}
% \DescribeMacro{\mindflowTextFont}
% \DescribeMacro{\mindflowNumFont}
% \DescribeMacro{\mindflowMarkerFont}
@@ -313,7 +312,7 @@
% The height of the separation lines is a length macro named \lstinline|\mindflowLineHeight|,
% with default value \verb|0.4pt|. You can change this with \lstinline|\setlength|.
%
-% \subsection{Internal name of the colors}
+% \subsection{Internal names of the colors}
% \DescribeMacro{mindflowLine}
% \DescribeMacro{mindflowText}
% \DescribeMacro{mindflowNum}
@@ -328,7 +327,7 @@
% \DescribeMacro{*mindflowBackground}
% If the package option \verb|nonbreakable| is enabled, then there is also the background color \verb|mindflowBackground|, which by default is white.
%
-% \section{The same example}
+% \section{The same example revisited}
% With option \verb|leftlinenumber, rightlinenumber, leftmarker, rightmarker|
% and the following settings:
% \iffalse
@@ -356,7 +355,7 @@
%
% \begin{itemize}
% \item There is no absolute guarantee that the separation lines will not fall alone at the top or bottom of the page, though great effort has been made to reduce the occurrence of such situation.
-% \item The \textsf{nonbreakable} version doesn't support line numbering quite well, especially for displayed equations. This is due to the usage of \verb|internallinenumbers|.
+% \item The \texttt{nonbreakable} version does not support line numbering quite well, especially for displayed equations. This is due to the usage of \verb|internallinenumbers|.
% \end{itemize}
%
% \StopEventually{}
@@ -380,6 +379,7 @@
\DeclareBoolOption[false]{rightlinenumber} % Right line numbers
\DeclareBoolOption[false]{incolumn} % Separation line fits in column
\DeclareBoolOption[false]{nonbreakable} % Use the tcolorbox version
+\DeclareBoolOption[false]{mathlines} % Add line numbers to equations
\ProcessKeyvalOptions*\relax
@@ -389,6 +389,9 @@
\if@mindflow@linenumber
\@mindflow@leftlinenumbertrue
\fi
+\if@mindflow@mathlines
+ \PassOptionsToPackage{mathlines}{lineno}
+\fi
%%================================
%% Initialization
@@ -594,6 +597,7 @@
\define@key{mindflow}{left}{\renewcommand{\mindflowLeft}{#1}}
\define@key{mindflow}{right}{\renewcommand{\mindflowRight}{#1}}
\define@key{mindflow}{lineheight}{\setlength{\mindflowLineHeight}{#1}}
+
\newcommand{\mindflowset}[1]{%
\setkeys{mindflow}{#1}%
}
diff --git a/macros/latex/contrib/mindflow/mindflow.pdf b/macros/latex/contrib/mindflow/mindflow.pdf
index 5771109955..b702a90053 100644
--- a/macros/latex/contrib/mindflow/mindflow.pdf
+++ b/macros/latex/contrib/mindflow/mindflow.pdf
Binary files differ