[pstricks] pst-tree and pst-circ

Patrice Mégret Patrice.Megret at fpms.ac.be
Mon Nov 10 10:08:48 CET 2008


Dear Herbert,

Thanks for your effort. Your example works but in my example there were a main tree and sub-trees (in fact, I have just sent a small part of the tree to demonstrate the problem).

If I try with your code, I still get an error:
! Missing } inserted.
<inserted text> 
                }
l.22 \endgroup


Here is my sample file: 

\documentclass{article}
\listfiles
\usepackage{pstricks}
\usepackage{pst-tree}
\usepackage{pst-circ}

\begin{document}

\begingroup
\pstree[levelsep=1.5cm,treesep=0.5cm,nodesep=3pt]{%
    \pstree{\Tr{Main tree}}{%
		\Tr{Item 1}%
		\Tr{Item 2}%
	      \pstree{\Tr{Sub tree 3}}{%
			\Tr{Sub item 1}%
			\Tr{Sub item 2}%
		}%
	}%
}%
\endgroup

\begin{pspicture}(5,5)
\dotnode(1,1){A}
\dotnode(3,1){B}
\resistor(A)(B){$R$}
\end{pspicture}

\end{document}

Moreover, if I don't use pst-circ, I have to remove \begingroup and \endgroup to have my example working. 



For completeness, here is the complete tree which requires packages

\usepackage[version=3]{mhchem}
\usepackage[cdot,Gray,squaren,textstyle]{SIunits}

\pstree[levelsep=1.5cm,treesep=0.5cm,nodesep=3pt]{\Tr{Refractive index change}}{%
	\pstree{\Tr{Internal writing}}{%
		\pstree{\Tr{\shortstack{\unit{488}{\nano\metre}\\ band}}}{%
			\pstree{\Tr{\ce{Ge:SiO2}}}{%
				\Tr{Self-induced grating}
			}%
		}%
	}%
	\pstree{\Tr{External writing}}{%
		\pstree{\Tr{\shortstack{\unit{157}{\nano\metre}\\ band}}}{%
			\Tr{\shortstack{\ce{H2} loaded\\ $\delta n \sim \power{10}{-4}$}}%
		}%
		\Tr{\psframebox[fillcolor=yellow,fillstyle=solid,boxsep=false,linestyle=none]{\shortstack{\unit{193}{\nano\metre}\\ band}}}%
		\Tr{\psframebox[fillcolor=yellow,fillstyle=solid,boxsep=false,linestyle=none]{\shortstack{\unit{240}{\nano\metre}\\ band}}}%
		\pstree{\Tr{\shortstack{\unit{330}{\nano\metre}\\ band}}}{%
			\Tr{\shortstack{\ce{H2} loaded\\ $\delta n \sim \power{10}{-2}$}}%
			\Tr{\shortstack{\ce{Ge} co-dopants\\ \ce{B}, \ce{Er}, \ce{Ce}\\ $\delta n \sim \power{10}{-4}$}}%
		}%
	}%
}%



Best regards,

Patrice


--- Message d'origine-----
De : pstricks-bounces at tug.org [mailto:pstricks-bounces at tug.org] De la part de Herbert Voss
Envoyé : samedi 8 novembre 2008 17:29
À : Graphics with PSTricks
Objet : Re: [pstricks] pst-tree and pst-circ

Patrice Mégret schrieb:

> I have a trouble with the packages pst-tree and pst-circ:

Patrice,
try it with http://perce.de/LaTeX/pst-circ/pst-circ.tex

and put the tree in a group

\documentclass{article}
\listfiles
\usepackage{pstricks}
\usepackage{pst-tree}
\usepackage{pst-circ}

\begin{document}

\begingroup
\pstree[levelsep=1.5cm,treesep=0.5cm,nodesep=3pt]%
  {\Tr{Refractive index change}}{%
          \Tr{Internal writing}%
          \Tr{External writing}%
}%
\endgroup

\begin{pspicture}(5,5)
\dotnode(1,1){A}
\dotnode(3,1){B}
\resistor(A)(B){$R$}
\end{pspicture}


\end{document}


Herbert
_______________________________________________
PSTricks mailing list
PSTricks at tug.org
http://tug.org/mailman/listinfo/pstricks


More information about the PSTricks mailing list