# Why does the tableau package raise the error “undefined control sequence” for \newpsstyle?

I'm running ubuntu 11.04, and trying tableau to draw logic diagrams for the first time.

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{ifsym}
\usepackage{amstext}
\usepackage{amssymb}
\usepackage{tableau}
\usepackage{babel}
\begin{document}

\
Here I use $\Box$ to represent necessity and $\Diamond$ to represent
possibility.

a) Whether $\Diamond(P\parallel Q) \vdash\Diamond P\parallel\Dimaond Q$

\end{document}

I'm getting this error:

...
(/usr/share/texmf-texlive/tex/latex/amsfonts/amssymb.sty
(/usr/share/texmf-texlive/tex/latex/amsfonts/amsfonts.sty))
(/usr/share/texmf-texlive/tex/latex/tableaux/tableau.sty
! Undefined control sequence.
l.151 \newpsstyle
{TabDblBarre}{linewidth=.4pt,doubleline=true,doublesep=.6pt}
?
-
Welcome to TeX.SX! You can highlight code in your questions by adding 4 spaces at the beginning of each line, as I did. –  ℝaphink Sep 1 '11 at 15:41
The package description mentions is "uses PStricks". Follow @Herbert's suggestion before \usepackage{tableau}. –  Werner Sep 1 '11 at 15:46

It seems like tableau is a rather ugly package which does not require its dependencies. For that reason, you need to include the pstricks package yourself.

Note also that you mispelled \Diamond. The following works:

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{ifsym}
\usepackage{amstext}
\usepackage{amssymb}
\usepackage{pstricks}
\usepackage{tableau}
\usepackage{babel}
\begin{document}

\
Here I use $\Box$ to represent necessity and $\Diamond$ to represent
possibility.

a) Whether $\Diamond(P\parallel Q) \vdash\Diamond P\parallel\Diamond Q$

\end{document}

Edit:

The variations package is a bit cleaner than tableau and has a proper documentation.

You can also achieve a "tableau de variations" (would love to know the name in English) following Daniel Flippo's method, which at least works fine with standard LaTeX engines (such as PDFTeX):

\documentclass{article}

\usepackage{tabvar}

\begin{document}

$\begin{tabvar}{|C|CCCCCCCCC|} \hline x &-\infty & &-\sqrt[3]{2} & &0 & & 1 & &+\infty \\ \hline f\u2019(x) & &- & &- &\dbarre &- & 0 &+ & \\ \hline \niveau{3}{3}f(x) &+\infty &\decroit &0 &\decroit &\discont{-\infty}{<}{+\infty} &\decroit &\frac{3}{2} &\croit &+\infty \\ \hline \end{tabvar}$

\end{document}

which produces:

A proper package implementing this technique might not hurt anyone.

-
Thank you. This resolves it. I'll contact the tableau author to to point to this. –  Evelyn Sep 1 '11 at 16:09
@Evelyn: if it resolves it, please accept the answer by checking it. –  ℝaphink Sep 1 '11 at 16:12
\usepackage{pstricks}

before package tableau is missing

-
Thanks! this is the solution. –  Evelyn Sep 1 '11 at 16:13