|
703 | 703 | % ^^A #### CODE #### |
704 | 704 | % ^^A ########################################################################## |
705 | 705 | % ^^A ########################################################################## |
| 706 | +\newcount\@karnaughmap@local@max@\relax |
706 | 707 | \DeclareDocumentCommand{\autoterms}{O{-}} {% |
707 | 708 | % bail if outside environment karnaugh-map |
708 | 709 | \@karnaughmap@func@bailoutsideenvironment@{} |
709 | 710 | % |
710 | 711 | \begingroup |
711 | 712 | % calculate max cell number {[START] |
712 | | - \newcount\@karnaughmap@local@max@\relax |
713 | 713 | \@karnaughmap@local@max@=\@karnaughmap@var@mapsizex@\relax |
714 | 714 | \multiply\@karnaughmap@local@max@ by \@karnaughmap@var@mapsizey@\relax |
715 | 715 | \multiply\@karnaughmap@local@max@ by \@karnaughmap@var@mapsizez@\relax |
|
799 | 799 | % ^^A #### CODE #### |
800 | 800 | % ^^A ########################################################################## |
801 | 801 | % ^^A ########################################################################## |
| 802 | +\newcount\@karnaughmap@local@cellcount@\relax |
802 | 803 | \DeclareDocumentCommand{\manualterms}{m} {% |
803 | 804 | % bail if outside environment karnaugh-map |
804 | 805 | \@karnaughmap@func@bailoutsideenvironment@{} |
|
811 | 812 | } |
812 | 813 | % update \@karnaughmap@var@usedcells@ (previous cells + all cells up to \@karnaughmap@local@cellcount@ are used now) {[START] |
813 | 814 | \newcommand{\@karnaughmap@local@tmpusedcells@}{} |
814 | | - \newcount\@karnaughmap@local@cellcount@\relax |
815 | 815 | % count number of cells in #1 {[START] |
816 | 816 | \StrCount{#1}{,}[\@karnaughmap@local@tmpusedcells@] |
817 | 817 | \@karnaughmap@local@cellcount@=\@karnaughmap@local@tmpusedcells@\relax |
|
1040 | 1040 | % ^^A #### CODE #### |
1041 | 1041 | % ^^A ########################################################################## |
1042 | 1042 | % ^^A ########################################################################## |
| 1043 | +\newcount\@karnaughmap@local@northwest@\relax |
| 1044 | +\newcount\@karnaughmap@local@southeast@\relax |
1043 | 1045 | \DeclareDocumentCommand{\implicant}{m m O{0}} {% |
1044 | 1046 | % bail if outside environment karnaugh-map |
1045 | 1047 | \@karnaughmap@func@bailoutsideenvironment@{} |
|
1053 | 1055 | % make sure we don't try to draw on non existing sub maps |
1054 | 1056 | \ifnum\map<\@karnaughmap@var@mapsizez@ |
1055 | 1057 | % calculate cell number for the specified sub maps {[START] |
1056 | | - \newcount\@karnaughmap@local@northwest@\relax |
1057 | | - \newcount\@karnaughmap@local@southeast@\relax |
1058 | 1058 | \@karnaughmap@local@northwest@=\map\relax |
1059 | 1059 | \@karnaughmap@local@southeast@=\map\relax |
1060 | 1060 | \multiply\@karnaughmap@local@northwest@ by 16\relax |
|
1139 | 1139 | % ^^A #### CODE #### |
1140 | 1140 | % ^^A ########################################################################## |
1141 | 1141 | % ^^A ########################################################################## |
| 1142 | +\newcount\@karnaughmap@local@testcaseone@\relax |
| 1143 | +\newcount\@karnaughmap@local@testcasetwo@\relax |
| 1144 | +\newcount\@karnaughmap@local@coordinateonecounter@\relax |
| 1145 | +\newcount\@karnaughmap@local@coordinatetwocounter@\relax |
1142 | 1146 | \DeclareDocumentCommand{\implicantedge}{m m m m O{0}} {% |
1143 | 1147 | % bail if outside environment karnaugh-map |
1144 | 1148 | \@karnaughmap@func@bailoutsideenvironment@{} |
|
1156 | 1160 | \newcommand{\@karnaughmap@local@fillcontent@}{} |
1157 | 1161 | % [END]} |
1158 | 1162 | % determinate if this is an horizontal or vertical implicant {[START] |
1159 | | - \newcount\@karnaughmap@local@testcaseone@\relax |
1160 | | - \newcount\@karnaughmap@local@testcasetwo@\relax |
1161 | 1163 | \@karnaughmap@local@testcaseone@=#1\relax |
1162 | 1164 | \@karnaughmap@local@testcasetwo@=#1\relax |
1163 | 1165 | \advance\@karnaughmap@local@testcaseone@ by -#2\relax |
|
1196 | 1198 | \fi |
1197 | 1199 | % [END]} |
1198 | 1200 | % calculate cell numbers for the specified sub map {[START] |
1199 | | - \newcount\@karnaughmap@local@coordinateonecounter@\relax |
1200 | | - \newcount\@karnaughmap@local@coordinatetwocounter@\relax |
1201 | 1201 | \@karnaughmap@local@coordinateonecounter@=\map\relax |
1202 | 1202 | \@karnaughmap@local@coordinatetwocounter@=\map\relax |
1203 | 1203 | \multiply\@karnaughmap@local@coordinateonecounter@ by 16\relax |
|
1323 | 1323 | % ^^A #### CODE #### |
1324 | 1324 | % ^^A ########################################################################## |
1325 | 1325 | % ^^A ########################################################################## |
| 1326 | +\newcount\@karnaughmap@local@coordinate@\relax |
1326 | 1327 | \DeclareDocumentCommand{\implicantcorner}{O{0}} {% |
1327 | 1328 | % bail if outside environment karnaugh-map |
1328 | 1329 | \@karnaughmap@func@bailoutsideenvironment@{} |
|
1338 | 1339 | % loop through the four corners |
1339 | 1340 | \foreach \corner in {0,2,8,10} {% |
1340 | 1341 | % calculate corner's properties {[START] |
1341 | | - \newcount\@karnaughmap@local@coordinate@\relax |
1342 | 1342 | \@karnaughmap@local@coordinate@=\map\relax |
1343 | 1343 | \multiply\@karnaughmap@local@coordinate@ by 16\relax |
1344 | 1344 | \advance\@karnaughmap@local@coordinate@ by \corner\relax |
|
0 commit comments