Skip to content

Conversation

@oscargus
Copy link
Contributor

@oscargus oscargus commented Feb 3, 2017

Not that I'll use it that often, but here is a PR for something that may be useful: being able to change the symbol (-) for indeterminants. The actual description of indeterminants may be reworded, but I didn't come up with anything clever.

Also, I didn't even manage to run the test on my computer, so nothing is changed there.

(Seems like X is commonly used is some traditions. It also opens up for doing Variable Entered Maps, which may be more useful.)

(First attempt at writing anything like this, so started simple...)

@2pi
Copy link
Owner

2pi commented Feb 3, 2017

Thanks for the PR!

being able to change the symbol (-) for indeterminants

Currently, although somewhat cumbersome, this can be accomplished by using the \manualterms command. I've never seen a X being used as a don't care so it may be a good idea to also make the min and max terms's content variable? If so, all three functions will essentially be the same.

An alternative approach I would prefer is: create a \terms{<cells>}{<content>} command and then create "aliases" to this command specifying the content eg. \indeterminants{<cells>} would be \terms{<cells>}{-} where as \maxterms{<cells>} would be \terms{<cells>}{0}.

I didn't even manage to run the test on my computer

I need tests before merging. I've set up travis to test commits. If you pull the .travis.yml file you should be able to run travis on your fork too. Or it may give you an idea of how to install it locally. Test files are tex files inside the test directory, which corresponds to an expected output pdf file inside the test/expected directory. When running the test.sh the tex files produces pdf files which are then visually compared to the expected pdf files.

It also opens up for doing Variable Entered Maps, which may be more useful.

Great idea! See the first quote. This could also be an "alias", maybe \variableterm..? Or just \terms...

@oscargus
Copy link
Contributor Author

oscargus commented Feb 3, 2017

I agree that \terms{<cells>}{<content>} is a much better approach. I'll come back with an updated PR eventually. Including using \terms for the other commands, if I manage to figure that out (seems straightforward, without trying). And tests.

The 'X' actually showed up here http://tex.stackexchange.com/questions/140567/drawing-karnaughs-maps-in-latex/140581#140581

Regarding minterms and maxterms I was thinking about that as well, but 0 and 1 seemed more well defined and it was enough to only adapt one of them. :-)

@2pi
Copy link
Owner

2pi commented Feb 3, 2017

Great! 👍

Apparently I've missed the X:es over at TeX SE, thanks for pointing it out!

I'll assign you to this issue for now.

@oscargus
Copy link
Contributor Author

oscargus commented Feb 4, 2017

Replaced by #7

@oscargus oscargus closed this Feb 4, 2017
@oscargus oscargus deleted the indeterminantscontent branch February 4, 2017 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants