Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

There appears to be a problem when using the pst-tree package together with the align environment and pdflatex (dvi-ps-pdf works, but there are reasons for me not to use it). Attached is a code example using the equation environment, leading to the correct result. When changing in both equations \begin{equation} to \begin{align} the second equation shows the same picture as the first equation. This is definitely not correct.

Note that upon typesetting I get the message:

Package pst-pdf Warning: `test_tree-pics.pdf' contains 4 pages 
(pst-pdf)                but 2 pages are requested: 
(pst-pdf)                File `test_tree-pics.pdf' is no more valid! 
(pst-pdf)                Recreate it .
[1 
Non-PDF special ignored!
Non-PDF special ignored!
Non-PDF special ignored!

The file test_tree-pics.pdf appears to contains both figures twice.

Does anybody have suggestions? Is this a bug?

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage[pdf]{pstricks}
\usepackage{pst-tree}

\newcommand{\TreeSpace}{0.7cm}
\newcommand{\RadiusMeagre}{3pt}
\newcommand{\RadiusFat}{5pt}

\begin{document}

\begin{equation}
\ddot{u} = \pstree[treemode=U,levelsep=\TreeSpace,radius=\RadiusMeagre]{\Tc*{\RadiusMeagre}}{\TC *} \,\,
\end{equation}
\begin{equation}
\dot{p} = \pstree[treemode=U,levelsep=\TreeSpace,radius=\RadiusMeagre]{\Tc{\RadiusFat}}{\TC* \TC*}
\end{equation}

\end{document}  
share|improve this question
    
hi Herbert, thanks for your quick response. unfortunately the error remains. –  Benjamin Sanderse Nov 8 '12 at 9:16

1 Answer 1

this should work:

\listfiles
\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{pst-tree}
\usepackage{auto-pst-pdf}
\PreviewEnvironment{align*}%% Make it known to preview

\newcommand{\TreeSpace}{0.7cm}
\newcommand{\RadiusMeagre}{3pt}
\newcommand{\RadiusFat}{5pt}

\begin{document}

\begin{align*}
\ddot{u} = \pstree[treemode=U,levelsep=\TreeSpace,radius=\RadiusMeagre]{\Tc*{\RadiusMeagre}}{\TC *} \,\,
\end{align*}

\begin{align*}
\dot{p} = \pstree[treemode=U,levelsep=\TreeSpace,radius=\RadiusMeagre]{\Tc{\RadiusFat}}{\TC* \TC*}
\end{align*}

\end{document}  

The equation environment is known by default but align*not.

[...]
\begin{center}
$\ddot{u} = \pstree[treemode=U,levelsep=\TreeSpace,radius=\RadiusMeagre]{\Tc*{\RadiusMeagre}}{\TC *} \,\,$

$\dot{p} = \pstree[treemode=U,levelsep=\TreeSpace,radius=\RadiusMeagre]{\Tc{\RadiusFat}}{\TC* \TC*}$
\end{center}
[...]
share|improve this answer
    
The pictures are correct, but there are no 'returns' present after the equations... so they are all on one line now (even when I put text inbetween). –  Benjamin Sanderse Nov 8 '12 at 9:25
    
add an empty line between the environments –  Herbert Nov 8 '12 at 9:28
    
hmm, it is still strange. now the equation numbers do not align anymore (I use align instead of align*). –  Benjamin Sanderse Nov 8 '12 at 9:31
    
that is a problem with the previewpackage. You can use {\raggedleft ...}. However, why can't you use simply xelatex and everything will be fine, without loading auto-pst-pdf –  Herbert Nov 8 '12 at 9:33
    
ok, I didn't try that. I am not sure if it works with the classic thesis style that I use, and if it works in Texshop. –  Benjamin Sanderse Nov 8 '12 at 9:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.