diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/karnaugh-map/karnaugh-map.sty | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/latex/karnaugh-map/karnaugh-map.sty b/Master/texmf-dist/tex/latex/karnaugh-map/karnaugh-map.sty index 877cb0806bf..f4b4eb98eb4 100644 --- a/Master/texmf-dist/tex/latex/karnaugh-map/karnaugh-map.sty +++ b/Master/texmf-dist/tex/latex/karnaugh-map/karnaugh-map.sty @@ -10,12 +10,12 @@ %% %% -%% Copyright (C) 2015 by Mattias Jacobsson -%% This work, karnaugh-map, is written from the ground up by Mattias Jacobsson. However the general implementation idea is based on the work published on [TeX - LaTeX Stack Exchange](https://tex.stackexchange.com) by [Ignasi](https://tex.stackexchange.com/users/1952/ignasi) found [here](https://tex.stackexchange.com/a/140581) and [here](https://tex.stackexchange.com/a/36879) which is licensed under [CC BY-SA](https://creativecommons.org/licenses/by-sa/3.0/). karnaugh-map is therefore licensed under [CC BY-SA](https://creativecommons.org/licenses/by-sa/3.0/). +%% Copyright (C) 2015, 2016, 2017 Mattias Jacobsson and contributors +%% This work, karnaugh-map, is written from the ground up by Mattias Jacobsson. However the general implementation idea is based on the work published on [TeX - LaTeX Stack Exchange](https://tex.stackexchange.com) by [Ignasi](https://tex.stackexchange.com/users/1952/ignasi) found [here](https://tex.stackexchange.com/a/140581) and [here](https://tex.stackexchange.com/a/36879) which is licensed under [CC BY-SA](https://creativecommons.org/licenses/by-sa/3.0/). karnaugh-map is therefore licensed under [CC BY-SA](https://creativecommons.org/licenses/by-sa/3.0/). Contributors include [Oscar Gustafsson](https://github.com/oscargus). %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{karnaugh-map}[2015/10/09 v1.0 Draw Karnaugh Maps] +\ProvidesPackage{karnaugh-map}[2017/02/20 v1.1 Draw Karnaugh Maps] %% %% Dependencies @@ -313,14 +313,7 @@ % bail if outside environment karnaugh-map \@karnaughmap@func@bailoutsideenvironment@{} % - \foreach \cell in {#1} {% - % only write to cell if it is empty otherwise fail silently - \IfSubStr{\@karnaughmap@var@usedcells@}{,\cell,}{}{% - \path (\@karnaughmap@func@decimaltobin@{\cell}) node {-}; - } - } - % update \@karnaughmap@var@usedcells@ - \expandafter\def\expandafter\@karnaughmap@var@usedcells@\expandafter{\@karnaughmap@var@usedcells@#1,} + \terms{#1}{-} } \DeclareDocumentCommand{\manualterms}{m} {% % bail if outside environment karnaugh-map @@ -351,23 +344,22 @@ % bail if outside environment karnaugh-map \@karnaughmap@func@bailoutsideenvironment@{} % - \foreach \cell in {#1} {% - % only write to cell if it is empty otherwise fail silently - \IfSubStr{\@karnaughmap@var@usedcells@}{,\cell,}{}{% - \path (\@karnaughmap@func@decimaltobin@{\cell}) node {0}; - } - } - % update \@karnaughmap@var@usedcells@ - \expandafter\def\expandafter\@karnaughmap@var@usedcells@\expandafter{\@karnaughmap@var@usedcells@#1,} + \terms{#1}{0} } \DeclareDocumentCommand{\minterms}{m} {% % bail if outside environment karnaugh-map \@karnaughmap@func@bailoutsideenvironment@{} % + \terms{#1}{1} +} +\DeclareDocumentCommand{\terms}{m m} {% + % bail if outside environment karnaugh-map + \@karnaughmap@func@bailoutsideenvironment@{} + % \foreach \cell in {#1} {% % only write to cell if it is empty otherwise fail silently \IfSubStr{\@karnaughmap@var@usedcells@}{,\cell,}{}{% - \path (\@karnaughmap@func@decimaltobin@{\cell}) node {1}; + \path (\@karnaughmap@func@decimaltobin@{\cell}) node {#2}; } } % update \@karnaughmap@var@usedcells@ |