[pstricks] A question about showexpl

Rafael Villarroel rvf0068 at gmail.com
Tue Oct 11 23:05:49 CEST 2005


I hope this is a good place to ask about the great showexpl package.

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?

Thanks in advance
Rafael

----------------------
\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]
  \documentclass{article}
  \usepackage[matrix,arrow]{xy}
  \begin{document}
  \begin{center}
    \makeatother
    \xymatrix{
      & Q(\sqrt 2,\sqrt{-3}) \ar@{-}[d]\ar@{-}[dr]\ar@{-}[dl] \\
      Q(\sqrt 2) \ar@{-}[dr] & Q(\sqrt{-6}) \ar@{-}[d] & B
      Q(\sqrt{-3}) \ar@{-}[dl] \\
      & Q &
    }
  \end{center}
  \end{document}
\end{LTXexample}
\end{document}




More information about the PSTricks mailing list