[pstricks] A question about showexpl

Herbert Voss LaTeX at zedat.fu-berlin.de
Wed Oct 12 09:13:26 CEST 2005


Rafael Villarroel wrote:
> I hope this is a good place to ask about the great showexpl package.

not really :-)

> The following document compiles fine, but at the expense of the
> \makeatother commmand,
> which is not necessary for the example to work. It seems that commands
> with @ on it
> do not work well with the LTXexample environment. This is without loading
> any showexpl.cfg. Is there any way for this to work, so that one does
> not have to
> include the \makeatother in the example?

> ----------------------
> \documentclass{article}
> 
> \usepackage[matrix,arrow]{xy}
> \usepackage{showexpl}
> 
> \begin{document}
> 
> \lstset{%
>     basicstyle=\ttfamily\small,
>     showspaces=false,
>     showstringspaces=false,
>     breaklines=true,
>     numberstyle=\ttfamily\tiny,
>     breakautoindent=true,
> }
> 
> \begin{LTXexample}[pos=r,wide,width=0.5]

\begin{LTXexample}[pos=r,wide,width=0.5,preset=\makeatother]

or alternative \lstset{preset=\makeatother} for all environments.

btw: the same with psmatrix

\documentclass{article}
\usepackage{pst-node}
\begin{document}
  \[ \psmatrix
       & Q\left(\sqrt 2,\sqrt{-3}\right) \\
         Q\left(\sqrt 2\right) & Q\left(\sqrt{-6}\right)
              & B Q\left(\sqrt{-3}\right) \\
       & Q
     \endpsmatrix \]
     \psset{nodesep=5pt}
     \ncline{1,2}{2,1}\ncline{1,2}{2,3}
     \ncline{1,2}{2,2}\ncline{2,2}{3,2}
     \ncline{3,2}{2,1}\ncline{3,2}{2,3}
\end{document}


Herbert




More information about the PSTricks mailing list