summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/kvmap/kvmap.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/kvmap/kvmap.dtx')
-rw-r--r--macros/latex/contrib/kvmap/kvmap.dtx31
1 files changed, 19 insertions, 12 deletions
diff --git a/macros/latex/contrib/kvmap/kvmap.dtx b/macros/latex/contrib/kvmap/kvmap.dtx
index 1c7bb4008d..2adb0fbaa3 100644
--- a/macros/latex/contrib/kvmap/kvmap.dtx
+++ b/macros/latex/contrib/kvmap/kvmap.dtx
@@ -64,6 +64,12 @@ End of file
\tcbset{enhanced,sharp corners=all}
\usemintedstyle{vs}
+^^A quick fix for tcolorbox's broken documentation library
+^^A by Skillmon, see https://chat.stackexchange.com/transcript/message/55558127#55558127
+\makeatletter
+\let\tcb@doc@index@doc\relax
+\makeatother
+
\usepackage{fontspec}
\usepackage{unicode-math}
\setmainfont[Numbers={OldStyle}]{Libertinus Serif}
@@ -102,7 +108,7 @@ End of file
%<*pkg>
%<@@=kvmap>
\RequirePackage{expl3}
-\ProvidesExplPackage{kvmap}{2020/04/25}{0.3.4}{Drawing karnaugh maps with LaTeX}
+\ProvidesExplPackage{kvmap}{2020/09/16}{0.3.5}{Drawing karnaugh maps with LaTeX}
%</pkg>
% \fi
%
@@ -133,8 +139,8 @@ End of file
% \section{Introduction}
% \pkg{kvmap} aims to provide a \emph{user-friendly} (i.e. less typing) way to
% typeset Karnaugh maps including the surrounding gray code and bundles of
-% cells (implicants). This package relies on \pkg{xparse} (with \pkg{expl3}),
-% \pkg{tikz} and \pkg{environ}.\par
+% cells (implicants). This package relies on \pkg{amsmath}, \pkg{xparse} (with
+% \pkg{expl3}) and \pkg{tikz}.\par
% Drawing Karnaugh maps is not that uncommon and there are already packages
% available on CTAN that provide means to typeset them:\begin{itemize}
% \item \pkg{askmaps} -- This package lets you draw American style Karnaugh
@@ -291,17 +297,18 @@ End of file
% \end{documentation}
% \begin{implementation}
% \clearpage\section{Implementation}
+% \changes{v0.3.5}{2020/09/16}{Add amsmath dependency to have smash option b available}
% \begin{macrocode}
+\RequirePackage{amsmath}
\RequirePackage{xparse}
\RequirePackage{tikz}
-\RequirePackage{environ}
% \end{macrocode}
-% \begin{macro}[aux]{\seq_set_split:Nno,\seq_set_split:Nnx,\int_mod:VV,\int_div_truncate:VV}
+% \begin{macro}[aux]{\seq_set_split:Nnx,\int_mod:VV,\int_div_truncate:VV}
% Define variants for better expansion.
% \begin{macrocode}
-\cs_generate_variant:Nn \seq_set_split:Nnn { Nno, Nnx }
-\cs_generate_variant:Nn \int_mod:nn { VV }
-\cs_generate_variant:Nn \int_div_truncate:nn { VV }
+\cs_generate_variant:Nn \seq_set_split:Nnn { Nnx }
+\cs_generate_variant:Nn \int_mod:nn { VV }
+\cs_generate_variant:Nn \int_div_truncate:nn { VV }
% \end{macrocode}
% \end{macro}
@@ -753,14 +760,14 @@ End of file
% \end{macrocode}
% \end{variable}
% \begin{macrocode}
-\NewEnviron { kvmatrix } [ 1 ]
+\NewDocumentEnvironment { kvmatrix } { m +b }
{
% \end{macrocode}
% Split the environments body at |\\| and remove empty lines. Now the height
% of the map is just the count of the sequence. Split the first element at |&|
% and use the count of that as width.
% \begin{macrocode}
- \seq_set_split:Nno \l_tmpa_seq { \\ } { \BODY }
+ \seq_set_split:Nnn \l_tmpa_seq { \\ } { #2 }
\seq_remove_all:Nn \l_tmpa_seq { }
\seq_set_split:Nnx \l_tmpb_seq { & } { \seq_item:Nn \l_tmpa_seq { 1 } }
\int_gset:Nn \l_@@_matrix_width_int { \seq_count:N \l_tmpb_seq }
@@ -790,7 +797,7 @@ End of file
{ #1 }
\bool_if:NF \l_@@_matrix_isintikz_bool
{ \end{tikzpicture} }
- }
+ } { }
% \end{macrocode}
% \end{environment}
@@ -809,6 +816,6 @@ End of file
% \end{macro}
% \end{implementation}
% \clearpage\PrintChanges
-% \clearpage\PrintIndex
+% ^^A\clearpage\PrintIndex
% \Finale
% \endinput \ No newline at end of file