Skip to content

Commit 66e7101

Browse files
committed
test
1 parent 8ba81d6 commit 66e7101

1 file changed

Lines changed: 17 additions & 25 deletions

File tree

karnaugh-map.dtx

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -339,14 +339,6 @@
339339
% parse environment options
340340
\setkeys{karnaugh-map}{#1}%
341341
%
342-
% check if the user wants us to omit begin/end{tikzpicture}
343-
\if@karnaughmap@option@omittikzpicture
344-
\begin{scope}
345-
\else
346-
% wrap in tikzpicture for the user
347-
\begin{tikzpicture}
348-
\fi
349-
%
350342
% check if implicant colors are specified
351343
\IfStrEq{\@karnaughmap@option@implicantcolors}{}{}{%
352344
% ensure no empty colors are specified
@@ -380,15 +372,13 @@
380372
% to parse remaining arguments and finish initialization.
381373
\@karnaughmap@func@karnaughstart@%
382374
}{
383-
% end tikzpicture if the user did not want us to omit it
384-
\if@karnaughmap@option@omittikzpicture
385-
\end{scope}
386-
\else
375+
\end{scope}
376+
% end tikzpicture environment if the user did not want us to omit it
377+
\if@karnaughmap@option@omittikzpicture\else
387378
\end{tikzpicture}
388379
\fi
389380
\endgroup
390381
}
391-
392382
\DeclareDocumentCommand{\@karnaughmap@func@karnaughstart@}{oooooo} {%
393383
% parse label args {[START]
394384
% try to maintain backwards compatibility with v1 while enabling users to separatly
@@ -584,14 +574,19 @@
584574
Existing templates have the following dimensions: 2x2x1, 2x4x1, 4x2x1, 4x4x1, 4x4x2, and 4x4x4.
585575
}%
586576
\fi
587-
\tikzset{
577+
% begin tikzpicture environment if the user did not want us to omit it
578+
\if@karnaughmap@option@omittikzpicture\else
579+
\begin{tikzpicture}
580+
\fi
581+
%
582+
\begin{scope}[
588583
LineStyleA/.style={semithick,solid},
589584
LineStyleB/.style={semithick,dash dot dot},
590585
LineStyleC/.style={thin,double distance=0.8pt},
591586
LineStyleD/.style={ultra thick},
592587
LineStyleE/.style={semithick,dashed},
593588
LineStyleF/.style={semithick,densely dotted},
594-
}
589+
]
595590
% grid {[START]
596591
% for all dimensions
597592
\draw[color=black, ultra thin] (0,0) grid (\@karnaughmap@var@mapsizex@,\@karnaughmap@var@mapsizey@);
@@ -1482,16 +1477,13 @@
14821477
% \end{karnaugh-map}
14831478
% \end{figure}
14841479
%
1485-
% \texttt{omittikzpicture}: By default, the |karnaugh-map| environment creates its own |tikzpicture| environment. This option disables this behavior, and it would be expected that the user wraps the |karnaugh-map| environment in a |tikzpicture| environment. This option makes it possible to use the |tikzexternal| package with |karnaugh-map|, or to integrate |karnaugh-map| into a larger |tikzpicture|.
1486-
%
1487-
% \begin{verbatim}
1488-
% \begin{tikzpicture}
1489-
% \begin{karnaugh-map}(omittikzpicture)
1490-
% \minterms{0,1,2,3}
1491-
% \end{karnaugh-map}
1492-
% % Additional tikz code in the same picture
1493-
% \end{tikzpicture}}
1494-
% \end{verbatim}
1480+
% \texttt{omittikzpicture}: By default, the |karnaugh-map| environment creates its own |tikzpicture| environment. This option disables this behavior, and it would be expected that the user wraps the |karnaugh-map| environment in a |tikzpicture| environment. This option makes it possible to use the |tikzexternal| package with |karnaugh-map|, or to integrate |karnaugh-map| into a larger |tikzpicture|. A code example follows;
1481+
%\begin{verbatim}
1482+
%\begin{tikzpicture}
1483+
% \begin{karnaugh-map}(omittikzpicture)
1484+
% \end{karnaugh-map}
1485+
%\end{tikzpicture}}
1486+
%\end{verbatim}
14951487
%
14961488
% \newpage
14971489
% \section{Examples}

0 commit comments

Comments
 (0)