Math & ScienceIs there an elegant way to typeset abbreviated truth table?

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
mado
Posts: 16
Joined: Thu Dec 10, 2015 5:55 am

Is there an elegant way to typeset abbreviated truth table?

Post by mado »

I asked a question on http://tex.stackexchange.com/q/286883/82730.
A few valid answers came up, but they all seemed overly complex for a beginner or suboptimal.

Can anyone think of a concise and elegant way to typeset an abbreviated truth table?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Is there an elegant way to typeset abbreviated truth tab

Post by Johannes_B »

You got an excellent answer from Enrico making it very very easy to input the tables. What else do you want? You either need a complex definition to allow an easy input, or make it simple but manual like in cfr's answer.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
mado
Posts: 16
Joined: Thu Dec 10, 2015 5:55 am

Is there an elegant way to typeset abbreviated truth table?

Post by mado »

Johannes_B wrote:You got an excellent answer from Enrico making it very very easy to input the tables. What else do you want? You either need a complex definition to allow an easy input, or make it simple but manual like in cfr's answer.
Sir, I cannot find Enrico on that web page.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Is there an elegant way to typeset abbreviated truth table?

Post by Johannes_B »

The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
mado
Posts: 16
Joined: Thu Dec 10, 2015 5:55 am

Re: Is there an elegant way to typeset abbreviated truth tab

Post by mado »

I felt that egreg's answer was overly complex in the preamble.
It should take a while to understand what the preamble of egreg's answer contains.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Is there an elegant way to typeset abbreviated truth table?

Post by Johannes_B »

This is LaTeX3 code, low-level. Chances are high, you will never understand that code.

You can place it in an extra tex file and input that file into your preamble using \input. That way, your preamble will appear a bit more tidy.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply