summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/cartonaugh
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-07-15 19:58:41 +0000
committerKarl Berry <karl@freefriends.org>2021-07-15 19:58:41 +0000
commit891003f6c81de2e720cd103ba1837a370fb99153 (patch)
treec89d25049d5a1414321a8ae1cfa7eb22f27a11f8 /Master/texmf-dist/doc/latex/cartonaugh
parent67817aca6ac8b7e6eef5c777feaa55dfb08e0843 (diff)
cartonaugh (15jul21)
git-svn-id: svn://tug.org/texlive/trunk@59938 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/cartonaugh')
-rw-r--r--Master/texmf-dist/doc/latex/cartonaugh/README.md39
-rw-r--r--Master/texmf-dist/doc/latex/cartonaugh/cartonaugh-example.pdfbin0 -> 18322 bytes
-rw-r--r--Master/texmf-dist/doc/latex/cartonaugh/cartonaugh-example.tex10
-rw-r--r--Master/texmf-dist/doc/latex/cartonaugh/cartonaugh.pdfbin0 -> 148416 bytes
-rwxr-xr-xMaster/texmf-dist/doc/latex/cartonaugh/test.sh66
-rw-r--r--Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-bw-color.tex16
-rw-r--r--Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-grid.tex12
-rw-r--r--Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-implicant.tex248
-rw-r--r--Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-implicantcorner.tex38
-rw-r--r--Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-implicantedge.tex69
-rw-r--r--Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-options.tex29
-rw-r--r--Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-terms.tex79
12 files changed, 606 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/cartonaugh/README.md b/Master/texmf-dist/doc/latex/cartonaugh/README.md
new file mode 100644
index 00000000000..7a271fec759
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/cartonaugh/README.md
@@ -0,0 +1,39 @@
+# NOTE: THIS FORK IS STILL IN DEVELOPEMENT.
+# Cartonaugh
+This package is a fork of the [karnaugh-map](https://github.com/2pi/karnaugh-map) package. This fork
+is meant to replace some of the functions in this package with Lua internally, and add some
+features unto the original package (for example I'm thinking an auto-boolean equation parser).
+
+## But Why LuaLaTeX?
+Personally, it's much easier to write expansion macros in Lua rather than nativally in LaTeX. It's just
+a matter of personal preference. It make macros easier to explain, document, and expand upon in the future.
+It also allows for some advanced capability, for example the ability to feed in a boolean equation and have it
+automatically highlight which cells need to be highlighed (upcomming/todo).
+
+## Installation
+ # to get the cartonaugh.sty and cartonaugh.lua file
+ lualatex cartonaugh.ins
+ # to get the documentation: cartonaugh.pdf
+ lualatex cartonaugh.dtx
+
+## Dependencies
+* tikz
+* xparse
+* xstring
+
+## Development
+This fork is still in development.
+
+## Tests
+ ./test.sh
+Testing consists of building the pdf output from the test files, and then comparing them to how they are expected to look like.
+Comparison is done with help from [diff-pdf](https://github.com/vslavik/diff-pdf).
+All of this is done by running the `test.sh` file from the project root folder.
+If there is a difference, between the actual and expected output, a diff will be written to the folder `test/result`.
+
+## License
+As karnaugh-map is licensed under [CC BY-SA](https://creativecommons.org/licenses/by-sa/3.0/), and thus so is this fork.
+
+## Credit
+Credit goes to [2pi](https://github.com/2pi) and [Oscar Gustafsson](https://github.com/oscargus) for writting the orignal package which
+this is based upon/forked from.
diff --git a/Master/texmf-dist/doc/latex/cartonaugh/cartonaugh-example.pdf b/Master/texmf-dist/doc/latex/cartonaugh/cartonaugh-example.pdf
new file mode 100644
index 00000000000..74523a08f63
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/cartonaugh/cartonaugh-example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/cartonaugh/cartonaugh-example.tex b/Master/texmf-dist/doc/latex/cartonaugh/cartonaugh-example.tex
new file mode 100644
index 00000000000..a9eb12f3461
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/cartonaugh/cartonaugh-example.tex
@@ -0,0 +1,10 @@
+\documentclass{standalone}
+\usepackage{cartonaugh}
+\begin{document}
+ \begin{cartonaugh}[2][2][1][$X_0$][$X_1$]
+ \minterms{1,2}
+ \autoterms[0]
+ \implicant{1}{1}
+ \implicant{2}{2}
+ \end{cartonaugh}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/cartonaugh/cartonaugh.pdf b/Master/texmf-dist/doc/latex/cartonaugh/cartonaugh.pdf
new file mode 100644
index 00000000000..140c47073ae
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/cartonaugh/cartonaugh.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/cartonaugh/test.sh b/Master/texmf-dist/doc/latex/cartonaugh/test.sh
new file mode 100755
index 00000000000..c2859bd0da6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/cartonaugh/test.sh
@@ -0,0 +1,66 @@
+#!/usr/bin/env bash
+
+# color variables
+C_RED='\033[0;31m'
+C_GREEN='\033[0;32m'
+C_RESET='\033[0m'
+
+# error count variable
+ERROR=0
+
+# enter test directory
+pushd ./test > /dev/null
+
+# clean actual and result directory and recreate
+rm -rf actual result
+mkdir actual result
+
+processTexFile() {
+ printf "Processing '%s'\n" "${1}";
+ lualatex -halt-on-error -interaction=nonstopmode -output-directory actual "${1}" > /dev/null 2>&1
+ if [ "$?" == 0 ]; then
+ printf "Processing of '%s' finished\n" "${1}";
+ else
+ printf "%bProcessing of '%s' failed%b\n" "${C_RED}" "${1}" "${C_RESET}";
+ fi
+}
+
+# run lualatex on all files ending with ".tex" and output to folder actual
+for file in *.tex; do
+ (processTexFile "${file}")& # run i parallel
+done;
+
+# wait for all lualatex children
+wait
+
+# if expected folder exist compare to actual
+if [ ! -d "./expected" ]; then
+ printf "%bMissing expected directory, can not compare%b\n" "${C_RED}" "${C_RESET}";
+ ERROR=$((ERROR+1))
+else
+ pushd expected > /dev/null
+ for file in *.pdf; do
+ # make sure the actual version exist
+ if [ ! -f "../actual/${file}" ]; then
+ printf "%bTest '%s' is missing%b\n" "${C_RED}" "${file}" "${C_RESET}";
+ ERROR=$((ERROR+1))
+ else
+ diff-pdf --output-diff="../result/${file}" "${file}" "../actual/${file}";
+ # if actual is equal to expected (exit code == 0) rm result file
+ if [ "$?" == 0 ]; then
+ rm "../result/${file}";
+ printf "%bTest '%s' succeeded%b\n" "${C_GREEN}" "${file}" "${C_RESET}";
+ else
+ printf "%bTest '%s' failed%b\n" "${C_RED}" "${file}" "${C_RESET}";
+ ERROR=$((ERROR+1))
+ fi
+ fi
+ done
+ popd > /dev/null
+fi
+
+# return from test directory
+popd > /dev/null
+
+# return correct error code
+exit $ERROR;
diff --git a/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-bw-color.tex b/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-bw-color.tex
new file mode 100644
index 00000000000..e45b0215c65
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-bw-color.tex
@@ -0,0 +1,16 @@
+\documentclass{standalone}
+\usepackage{cartonaugh}
+\begin{document}
+ \begin{cartonaugh}*[4][4][1]
+ \implicant{0}{0}
+ \implicant{4}{5}
+ \implicant{12}{15}
+ \implicant{8}{10}
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][1]
+ \implicant{0}{0}
+ \implicant{4}{5}
+ \implicant{12}{15}
+ \implicant{8}{10}
+ \end{cartonaugh}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-grid.tex b/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-grid.tex
new file mode 100644
index 00000000000..61663a86bc7
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-grid.tex
@@ -0,0 +1,12 @@
+\documentclass{standalone}
+\usepackage{cartonaugh}
+\begin{document}
+ \begin{cartonaugh}[2][2][1]\end{cartonaugh}
+ \begin{cartonaugh}[2][4][1]\end{cartonaugh}
+ \begin{cartonaugh}[4][2][1]\end{cartonaugh}
+ \begin{cartonaugh}[4][4][1]\end{cartonaugh}
+ \begin{cartonaugh}[4][4][2]\end{cartonaugh}
+ \begin{cartonaugh}[4][4][4]\end{cartonaugh}
+ \begin{cartonaugh}[4][4][2][$X_1X_0$][$X_3X_2$][$X_5X_4$][1]\end{cartonaugh}
+ \begin{cartonaugh}[4][4][4][$X_1X_0$][$X_3X_2$][$X_5X_4$][1]\end{cartonaugh}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-implicant.tex b/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-implicant.tex
new file mode 100644
index 00000000000..2951c8e7dbf
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-implicant.tex
@@ -0,0 +1,248 @@
+\documentclass{standalone}
+\usepackage{cartonaugh}
+\begin{document}
+ % draw cell implicants(single, horizontal, vertical, and 2x2 block), default submap
+ \begin{cartonaugh}[2][2][1]
+ % single cell
+ \implicant{0}{0}
+ % horizontal
+ \implicant{2}{3}
+ % vertical
+ \implicant{1}{3}
+ % block
+ \implicant{0}{3}
+ \end{cartonaugh}
+ \begin{cartonaugh}[2][4][1]
+ % single cell
+ \implicant{0}{0}
+ \implicant{1}{1}
+ % horizontal
+ \implicant{2}{3}
+ % vertical
+ \implicant{3}{7}
+ % block
+ \implicant{6}{5}
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][2][1]
+ % single cell
+ \implicant{0}{0}
+ \implicant{1}{1}
+ % horizontal
+ \implicant{4}{5}
+ % vertical
+ \implicant{1}{5}
+ % block
+ \implicant{3}{6}
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][1]
+ % single cell
+ \implicant{0}{0}
+ \implicant{1}{1}
+ \implicant{2}{2}
+ \implicant{3}{3}
+ % horizontal
+ \implicant{9}{11}
+ % vertical
+ \implicant{4}{12}
+ % block
+ \implicant{5}{15}
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][2]
+ % single cell
+ \implicant{0}{0}
+ \implicant{1}{1}
+ \implicant{2}{2}
+ \implicant{3}{3}
+ % horizontal
+ \implicant{9}{11}
+ % vertical
+ \implicant{4}{12}
+ % block
+ \implicant{5}{15}
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][4]
+ % single cell
+ \implicant{0}{0}
+ \implicant{1}{1}
+ \implicant{2}{2}
+ \implicant{3}{3}
+ % horizontal
+ \implicant{9}{11}
+ % vertical
+ \implicant{4}{12}
+ % block
+ \implicant{5}{15}
+ \end{cartonaugh}
+ % draw on 0th and 2nd submaps(when possible)
+ \begin{cartonaugh}[2][2][1]
+ % single cell
+ \implicant{0}{0}[0,2]
+ % horizontal
+ \implicant{2}{3}[0,2]
+ % vertical
+ \implicant{1}{3}[0,2]
+ % block
+ \implicant{0}{3}[0,2]
+ \end{cartonaugh}
+ \begin{cartonaugh}[2][4][1]
+ % single cell
+ \implicant{0}{0}[0,2]
+ \implicant{1}{1}[0,2]
+ % horizontal
+ \implicant{2}{3}[0,2]
+ % vertical
+ \implicant{3}{7}[0,2]
+ % block
+ \implicant{6}{5}[0,2]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][2][1]
+ % single cell
+ \implicant{0}{0}[0,2]
+ \implicant{1}{1}[0,2]
+ % horizontal
+ \implicant{4}{5}[0,2]
+ % vertical
+ \implicant{1}{5}[0,2]
+ % block
+ \implicant{3}{6}[0,2]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][1]
+ % single cell
+ \implicant{0}{0}[0,2]
+ \implicant{1}{1}[0,2]
+ \implicant{2}{2}[0,2]
+ \implicant{3}{3}[0,2]
+ % horizontal
+ \implicant{9}{11}[0,2]
+ % vertical
+ \implicant{4}{12}[0,2]
+ % block
+ \implicant{5}{15}[0,2]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][2]
+ % single cell
+ \implicant{0}{0}[0,2]
+ \implicant{1}{1}[0,2]
+ \implicant{2}{2}[0,2]
+ \implicant{3}{3}[0,2]
+ % horizontal
+ \implicant{9}{11}[0,2]
+ % vertical
+ \implicant{4}{12}[0,2]
+ % block
+ \implicant{5}{15}[0,2]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][4]
+ % single cell
+ \implicant{0}{0}[0,2]
+ \implicant{1}{1}[0,2]
+ \implicant{2}{2}[0,2]
+ \implicant{3}{3}[0,2]
+ % horizontal
+ \implicant{9}{11}[0,2]
+ % vertical
+ \implicant{4}{12}[0,2]
+ % block
+ \implicant{5}{15}[0,2]
+ \end{cartonaugh}
+ % draw multiple different implicants
+ \begin{cartonaugh}[2][2][1]
+ % single cell
+ \implicant{0}{0}[0]
+ % horizontal
+ \implicant{2}{3}[0]
+ % vertical
+ \implicant{1}{3}[0]
+ % block
+ \implicant{0}{3}[0]
+ \end{cartonaugh}
+ \begin{cartonaugh}[2][4][1]
+ % single cell
+ \implicant{0}{0}[0]
+ \implicant{1}{1}[0]
+ % horizontal
+ \implicant{2}{3}[0]
+ % vertical
+ \implicant{3}{7}[0]
+ % block
+ \implicant{6}{5}[0]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][2][1]
+ % single cell
+ \implicant{0}{0}[0]
+ \implicant{1}{1}[0]
+ % horizontal
+ \implicant{4}{5}[0]
+ % vertical
+ \implicant{1}{5}[0]
+ % block
+ \implicant{3}{6}[0]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][1]
+ % single cell
+ \implicant{0}{0}[0]
+ \implicant{1}{1}[0]
+ \implicant{2}{2}[0]
+ \implicant{3}{3}[0]
+ % horizontal
+ \implicant{9}{11}[0]
+ % vertical
+ \implicant{4}{12}[0]
+ % block
+ \implicant{5}{15}[0]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][2]
+ % single cell
+ \implicant{0}{0}[0]
+ \implicant{1}{1}[0]
+ \implicant{2}{2}[0]
+ \implicant{3}{3}[0]
+ \implicant{0}{0}[1]
+ \implicant{1}{1}[1]
+ \implicant{2}{2}[1]
+ \implicant{3}{3}[1]
+ % horizontal
+ \implicant{9}{11}[0]
+ \implicant{9}{11}[1]
+ % vertical
+ \implicant{4}{12}[0]
+ \implicant{4}{12}[1]
+ % block
+ \implicant{5}{15}[0]
+ \implicant{5}{15}[1]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][4]
+ % single cell
+ \implicant{0}{0}[0]
+ \implicant{1}{1}[0]
+ \implicant{2}{2}[0]
+ \implicant{3}{3}[0]
+ \implicant{0}{0}[1]
+ \implicant{1}{1}[1]
+ \implicant{2}{2}[1]
+ \implicant{3}{3}[1]
+ \implicant{0}{0}[2]
+ \implicant{1}{1}[2]
+ \implicant{2}{2}[2]
+ \implicant{3}{3}[2]
+ \implicant{0}{0}[3]
+ \implicant{1}{1}[3]
+ \implicant{2}{2}[3]
+ \implicant{3}{3}[3]
+ % horizontal
+ \implicant{9}{11}[0]
+ \implicant{9}{11}[1]
+ \implicant{9}{11}[2]
+ \implicant{9}{11}[3]
+ % vertical
+ \implicant{4}{12}[0]
+ \implicant{4}{12}[1]
+ \implicant{4}{12}[2]
+ \implicant{4}{12}[3]
+ % block
+ \implicant{5}{15}[0]
+ \implicant{5}{15}[1]
+ \implicant{5}{15}[2]
+ \implicant{5}{15}[3]
+ \end{cartonaugh}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-implicantcorner.tex b/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-implicantcorner.tex
new file mode 100644
index 00000000000..740e4f263c4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-implicantcorner.tex
@@ -0,0 +1,38 @@
+\documentclass{standalone}
+\usepackage{cartonaugh}
+\begin{document}
+ % test default(should only draw on 0th submap)
+ \begin{cartonaugh}[4][4][1]
+ \implicantcorner
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][2]
+ \implicantcorner
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][4]
+ \implicantcorner
+ \end{cartonaugh}
+ % draw on 0th and 2nd submaps(when possible)
+ \begin{cartonaugh}[4][4][1]
+ \implicantcorner[0,2]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][2]
+ \implicantcorner[0,2]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][4]
+ \implicantcorner[0,2]
+ \end{cartonaugh}
+ % draw multiple different implicants
+ \begin{cartonaugh}[4][4][1]
+ \implicantcorner[0]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][2]
+ \implicantcorner[0]
+ \implicantcorner[1]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][4]
+ \implicantcorner[0]
+ \implicantcorner[1]
+ \implicantcorner[2]
+ \implicantcorner[3]
+ \end{cartonaugh}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-implicantedge.tex b/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-implicantedge.tex
new file mode 100644
index 00000000000..b8dd02ec338
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-implicantedge.tex
@@ -0,0 +1,69 @@
+\documentclass{standalone}
+\usepackage{cartonaugh}
+\begin{document}
+ % vertical and horizontal implicants(when possible), default submap
+ \begin{cartonaugh}[2][4][1]
+ \implicantedge{0}{1}{4}{5}
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][2][1]
+ \implicantedge{1}{3}{5}{7}
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][1]
+ \implicantedge{1}{3}{9}{11}
+ \implicantedge{4}{12}{6}{14}
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][2]
+ \implicantedge{1}{3}{9}{11}
+ \implicantedge{4}{12}{6}{14}
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][4]
+ \implicantedge{1}{3}{9}{11}
+ \implicantedge{4}{12}{6}{14}
+ \end{cartonaugh}
+ % draw on 0th and 2nd submaps(when possible)
+ \begin{cartonaugh}[2][4][1]
+ \implicantedge{0}{1}{4}{5}[0,2]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][2][1]
+ \implicantedge{1}{3}{5}{7}[0,2]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][1]
+ \implicantedge{1}{3}{9}{11}[0,2]
+ \implicantedge{4}{12}{6}{14}[0,2]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][2]
+ \implicantedge{1}{3}{9}{11}[0,2]
+ \implicantedge{4}{12}{6}{14}[0,2]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][4]
+ \implicantedge{1}{3}{9}{11}[0,2]
+ \implicantedge{4}{12}{6}{14}[0,2]
+ \end{cartonaugh}
+ % draw multiple different implicants
+ \begin{cartonaugh}[2][4][1]
+ \implicantedge{0}{1}{4}{5}[0]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][2][1]
+ \implicantedge{1}{3}{5}{7}[0]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][1]
+ \implicantedge{1}{3}{9}{11}[0]
+ \implicantedge{4}{12}{6}{14}[0]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][2]
+ \implicantedge{1}{3}{9}{11}[0]
+ \implicantedge{4}{12}{6}{14}[0]
+ \implicantedge{1}{3}{9}{11}[1]
+ \implicantedge{4}{12}{6}{14}[1]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][4]
+ \implicantedge{1}{3}{9}{11}[0]
+ \implicantedge{4}{12}{6}{14}[0]
+ \implicantedge{1}{3}{9}{11}[1]
+ \implicantedge{4}{12}{6}{14}[1]
+ \implicantedge{1}{3}{9}{11}[2]
+ \implicantedge{4}{12}{6}{14}[2]
+ \implicantedge{1}{3}{9}{11}[3]
+ \implicantedge{4}{12}{6}{14}[3]
+ \end{cartonaugh}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-options.tex b/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-options.tex
new file mode 100644
index 00000000000..6fe84ba61bb
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-options.tex
@@ -0,0 +1,29 @@
+% Test to test out the different package options
+\documentclass[]{standalone}
+\usepackage{cartonaugh}
+\begin{document}
+ % Normal stuff
+ \begin{cartonaugh}[4][4][4]
+ \autoterms[-]
+ \end{cartonaugh}
+ % Test out non-seperated kmap
+ \begin{cartonaugh}[4][4][4][$BA$][$DC$][$FE$][1]
+ \autoterms[-]
+ \end{cartonaugh}
+ % Test changing color
+ \begin{cartonaugh}[4][4][4]
+ \implicant{0}{2}[0]
+ \implicant{4}{6}[0]
+ \changecolor{blue}
+ \implicant{8}{10}[0]
+ \implicant{12}{14}[0]
+ \end{cartonaugh}
+ % Test changing the implicant corner spread
+ \begin{cartonaugh}[4][4][4]
+ \implicantcorner[0]
+ \implicantspread{0.2}{0.7}
+ \implicantcorner[1]
+ \resetimplicantspread
+ \implicantcorner[2]
+ \end{cartonaugh}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-terms.tex b/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-terms.tex
new file mode 100644
index 00000000000..aae274f8be7
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/cartonaugh/test/cartonaugh-terms.tex
@@ -0,0 +1,79 @@
+\documentclass{standalone}
+\usepackage{cartonaugh}
+\begin{document}
+ % fill all fields (autoterms)
+ \begin{cartonaugh}[2][2][1]
+ \autoterms[-]
+ \end{cartonaugh}
+ \begin{cartonaugh}[2][4][1]
+ \autoterms[-]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][2][1]
+ \autoterms[-]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][1]
+ \autoterms[-]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][2]
+ \autoterms[-]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][4]
+ \autoterms[-]
+ \end{cartonaugh}
+ % fill remaining after '\indeterminants' '\manualterms' '\maxterms' and '\minterms'
+ \begin{cartonaugh}[2][2][1]
+ \manualterms{m}
+ \indeterminants{1}
+ \maxterms{2}
+ \minterms{3}
+ \autoterms[a]
+ \end{cartonaugh}
+ \begin{cartonaugh}[2][2][1]
+ \manualterms{m}
+ \terms{1}{T}
+ \indeterminants{1}
+ \maxterms{2}
+ \minterms{3}
+ \autoterms[a]
+ \end{cartonaugh}
+ \begin{cartonaugh}[2][4][1]
+ \manualterms{m}
+ \indeterminants{1}
+ \maxterms{2}
+ \minterms{3}
+ \terms{4}{T}
+ \autoterms[a]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][2][1]
+ \manualterms{m}
+ \indeterminants{1}
+ \maxterms{2}
+ \minterms{3}
+ \terms{4}{T}
+ \autoterms[a]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][1]
+ \manualterms{m,m}
+ \indeterminants{2,3}
+ \maxterms{4,5}
+ \minterms{6,7}
+ \terms{8,9}{T}
+ \autoterms[a]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][2]
+ \manualterms{m,m,m,m}
+ \indeterminants{4,5,6,7}
+ \maxterms{8,9,10,11}
+ \minterms{12,13,14,15}
+ \terms{16,17,18,19}{T}
+ \autoterms[a]
+ \end{cartonaugh}
+ \begin{cartonaugh}[4][4][4]
+ \manualterms{m,m,m,m}
+ \indeterminants{4,5,6,7}
+ \maxterms{8,9,10,11}
+ \minterms{12,13,14,15}
+ \terms{16,17,18,19}{T}
+ \autoterms[a]
+ \end{cartonaugh}
+\end{document}