-
Notifications
You must be signed in to change notification settings - Fork 16
Take \tikzpicture out of karnaugh-map environment (fixes #21) #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This allows the user to place their own tikzpicture environment around the karnaugh-map-inner environment, which makes the package compatible with tikz externalization.
Signed-off-by: Zhang Maiyun <me@maiyun.me>
|
Thank you for the PR! I've looked briefly at your patch, and I'm not entirely happy with introducing yet another environment( Trying to follow the design-pattern of the package, this would probably be most suitable if it were introduced as an option; see 1.3 Options in the documentation. For example as Any thoughts? |
|
Thanks!
Yes, I definitely agree that an entire new environment is a bit too messy. Changing this to an option should be doable.
Maiyun Zhang (he/him)
… On 7 Mar 2025, at 10:49, 2pi ***@***.***> wrote:
2pi
left a comment
(2pi/karnaugh-map#24)
Thank you for the PR! I've looked briefly at your patch, and I'm not entirely happy with introducing yet another environment(karnaugh-map-inner).
Trying to follow the design-pattern of the package, this would probably be most suitable if it were introduced as an option; see 1.3 Options in the documentation. For example as omittikzpicture or something better. It would, if I'm not mistaken, also make it easier to switch back and fourth.
Any thoughts?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
<https://mirrors.ctan.org/graphics/pgf/contrib/karnaugh-map/karnaugh-map.pdf#page=8> <#24 (comment)> <https://github.com/notifications/unsubscribe-auth/AFSX55FD5S4O2WACRE3KYRL2THS3ZAVCNFSM6AAAAABTD5JTQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMBXGE3TMNZSHE>
2pi
left a comment
(2pi/karnaugh-map#24)
<#24 (comment)>
Thank you for the PR! I've looked briefly at your patch, and I'm not entirely happy with introducing yet another environment(karnaugh-map-inner).
Trying to follow the design-pattern of the package, this would probably be most suitable if it were introduced as an option; see 1.3 Options <https://mirrors.ctan.org/graphics/pgf/contrib/karnaugh-map/karnaugh-map.pdf#page=8> in the documentation. For example as omittikzpicture or something better. It would, if I'm not mistaken, also make it easier to switch back and fourth.
Any thoughts?
—
Reply to this email directly, view it on GitHub <#24 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AFSX55FD5S4O2WACRE3KYRL2THS3ZAVCNFSM6AAAAABTD5JTQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMBXGE3TMNZSHE>.
You are receiving this because you authored the thread.
|
Signed-off-by: Zhang Maiyun <me@maiyun.me>
Signed-off-by: Zhang Maiyun <me@maiyun.me>
|
Before continuing, two things. How would you like to be attributed? Would this be okay(hyperlink only when appropriate, see earlier examples)? Regarding licensing. Similarly to #7 (comment) I just want to check that you are aware and okay with the licensing(CC BY-SA). |
|
Thank you. I am fine with the attribution and license. I have fixed the options and added some draft for the documentation. Does this look good? This option is not very visually visible, so I included sort of a not-so-useful example of a rotated karnaugh map. Please advise if you have better ideas. |
|
Also, in the original code, I believe there was extra space after the Do you think this is an issue? Please check this comparison: |
I agree, better to keep it like this for backwards compatibility. Might be something to look at for a future major version. May I ask how you made the examples? |
Great!
I'm thinking that an simple example would be better. Like a plain |
|
Regarding testing, I think it would be best to do something similar to |
They were produced with the |
Signed-off-by: Zhang Maiyun <me@maiyun.me>
Signed-off-by: Zhang Maiyun <me@maiyun.me>
Strangely end{scope} does not produce the same extra space
Signed-off-by: Zhang Maiyun <me@maiyun.me>
Signed-off-by: Zhang Maiyun <me@maiyun.me>
Signed-off-by: Zhang Maiyun <me@maiyun.me>
Signed-off-by: Zhang Maiyun <me@maiyun.me>
Signed-off-by: Zhang Maiyun <me@maiyun.me>
|
8ba81d6 might be a little intrusive: it is to allow local environment options to override global ones (i.e. if we had Apparently it wasn't allowed in the previous versions. Please advise if I am doing this incorrectly. |
Not sure... could be useful but also makes it a bit more complex. Regardless, better if we discuss this in a separate pull-request. |
|
I've done a bit of changes to everything but the tests in pr24 what are your opinions on this? |
I added this to implement this test:
Without it, a global I hope this explanation makes sense though. My point is, it would be impossible to test a "mix of using the option and not" if the global option cannot be locally overridden. |
|
Your version in |
|
Sorry for the delay! Since there are a lot of back and forth in the commits for this PR. Would you mind squashing together something more sensible without the tests of Then I will add some reasonable tests to so that we don't have to go back and fourth and delay it even more. Does it sounds good to you? |
I stumbled upon #21 myself and found this answer that claims that
tikzexternalizescans forend{tikzpicture}.This patch allows the user to place their own
tikzpictureenvironment around thekarnaugh-map-innerenvironment, which makes the package compatible with tikz externalization.If the code looks reasonable, then I am also happy to add the documentation.
In this test, the results with or without externalizing (by toggling
\def\testingexternalizeare visually identical.