2

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}  
  • hi Herbert, thanks for your quick response. unfortunately the error remains. – Benjamin Sanderse Nov 8 '12 at 9:16
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}
[...]
  • 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 – user2478 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 – user2478 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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