[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] Karnaugh Maps
On Tue, May 30, 2000 at 11:25:14PM +0100, Craig Andrews wrote:
> Hello all,
>
> Does anyone know a rough'n'ready way of producing simple (2x4) karnaugh
> maps using LaTeX2e? I tried using a table, thus:
>
> \begin{tabular}{c|c|c|c|c|}
> &A&A&$\bar A&\bar A\\ \hline
> .
> .
> \end{tabular}
>
> but the end result is a bit, well..
>
> |A|A|A|A|
> ----------
> C|1|1|0|0|
> ----------
> C|1|1|1|0|
> ----------
> |B|B|B|B|
>
> What I could to with is only having grid lines around the 1's and 0's, and
> not the letters.
>
It's gonna be a bit tricky, methinks. Take a look at the \cline tag,
which allows you to draw a horizontal line across a range of specified
columns. So instead of \hline at the end of every line you put
\cline{2-6}. That'll get you the right horizontal lines. As for the
verticals, you'll have to start messing with multicolumns, AFAIK.
It might look something like...
\def\st#1\multicolumn{1}{c|}{#1}
\begin{tabular}{ccccc}
& A &A &... \\ \cline{2-5}
\st{C} &\st{1} &\st{1} &... \\ \cline{2-5}
\st{C} &\st{1} &\st{1} &... \\ \cline{2-5}
& B & B &... \\
\end{tabular}
Don't quote me on this ;) It's late and I don't know where my LaTeX
book is.
A.D.
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.