-
-
Notifications
You must be signed in to change notification settings - Fork 322
Complete and reformat conditionals.rst truth table #127
Conversation
Use don't care entries to collapse the truth table in conditionals.rst
The build failed on both attempts. I've seen this problem before when using unicode characters when Latex is involved. Unless someone knows how to work around this (I tried in the past for my own work and was unsuccessful) I'll switch back to 1's and 0's
The table would look like this if it used 1=valid, 0=invalid, X=don't care: This would probably require a legend |
googling tells me that only some latex implementations, not all, support unicode character embedding. Generally you need to use a code instead of the literal character, like you would for embedding non-ascii chars in html. |
I see that there are svg files for pass/fail used in this doc and elsewhere. They might be suitable for the table. I'll take one more pass at this with the images. |
Ok, I give up. I tried with the svg's and they work fine for html but aren't liked by latex. Looks like if you want images in the truth table you probably need to write some python or know sphinx/resturctured text (which I don't). Otherwise, you can just accept the text based table for now. For the record the svgs would look nice if you can solve the problem of Latex (as they match the example icons): Here's how I did it (which might be unacceptable because it fixes the sizes of the images) .. |fail| image:: ../_static/fail.svg
:width: 20pt
:height: 20pt
.. |pass| image:: ../_static/pass.svg
:width: 20pt
:height: 20pt
====== ====== ====== ============
if then else whole schema
====== ====== ====== ============
|fail| |fail| |fail|
|fail| |pass| |pass|
|pass| |fail| |fail|
|pass| |pass| |pass|
====== ====== ====== ============ |
@mdboom , as one of the last people to merge PRs in this repo, are you able to take a look at this one? Is there anything others could do to help? |
I was fixing another bug on the conditionals page and noticed the table wrong and fixed that as well. After merging today, I noticed this PR. I'm going to close this as fixed by #143. I used simple text for the symbols. If anyone wants to do something prettier, please open a new PR. |
|
Addresses #117
UPDATE: This PR was updated based on comments in the original issue asking that the table use don't care entries to collapse the table. Current version generates a table without images or emojis.