[pstricks] Clash between pstricks, pst-pdf, tabularx, and threeparttable

Alan Ristow ristow at ece.gatech.edu
Sun Feb 10 23:01:25 CET 2008


Herbert Voss wrote:
> Alan Ristow schrieb:
> 
>> I have a document that began producing a rather mysterious error 
>> yesterday. I have boiled it down to a minimal example (see below), and 
>> as far as I can tell pstricks is the only thing in the \usepackage list 
>> that has been updated since the last time I successfully compiled the 
>> document. However, at this point I am stuck.
>>
>> When I compile the example with pdflatex I have no problems at all. 
>> However, the regular latex run that would be required to process my 
>> graphics via pst-pdf produces:
> 
> The problem must be in pst-pdf because it is still there when I do not
> load pstricks.

I was puzzled by that comment at first, but then I remembered the 
nopstricks package option. Sure enough, the problem still exist when 
pstricks isn't loaded.

I have tracked it to this part of pst-pdf.sty (here copied from the 
pst-pdf docs):

Prevent multiple test-wise setting of table contents by “tabularx”.
156 \@ifundefined{tabularx}{}{%
157 \def\tabularx#1#2{\tabular{#2}}%
158 \newcolumntype{X}{c}%
159 \let\endtabularx=\endtabular}%

If I'm reading everything correctly, pst-pdf redefines tabularx to 
behave like tabular in DVI mode (which would be when it is extracting 
graphics on the latex, as opposed to pdflatex, run). When I make a local 
copy of pst-pdf.sty and comment out these four lines, the problem goes away.

Looking a little deeper, I think the issue is that threeparttable hooks 
into tabularx, but when pst-pdf redefines tabularx there is no way for 
threeparttable to compensate.

I'll have to think about how to handle this -- perhaps I'll post it to 
comp.text.tex, since it involves a non-PSTricks-related package. Also, 
doesn't pst-pdf's redefinition here prohibit the use of tabularx within 
PSTricks graphics?

Alan



More information about the PSTricks mailing list