2

I am using PSTricks and trying to generate an inline preview with auctex for part of a document.

This works fine if I surround the whole thing in $ signs like

$
\begin{pspicture}
...
\end{pspicture}
$

but this doesn't work when I want to use a math variable, say $\theta$ within that block. I expected using \theta without the dollar signs would work, but it doesn't.

Is there a way to generate inline previews without surrounding dollar signs, or is there a way to include nested dollar signs within the section?

4
  • pspicture will make a box so you will need $ to get back into math mode, just as $ ++ \mbox{text $math$ text} +++$ – David Carlisle Dec 1 '12 at 15:54
  • @David Carlisle nesting dollar signs throws off auctex preview though. Any way around that? – James Dec 1 '12 at 17:07
  • 3
    looks like instead of wrapping pspicture in a spurious $ you should just add pspicture to the environments preview-latex knows about: gnu.org/software/auctex/manual/preview-latex/… has a section _Preview your favourite LaTeX constructs _ – David Carlisle Dec 1 '12 at 19:08
  • yes, that works – James Dec 2 '12 at 14:58
3

Instead of wrapping pspicture in a spurious $ you should just add pspicture to the environments preview-latex knows about: http://www.gnu.org/software/auctex/manual/preview-latex/Simple-customization.html has a section Preview your favourite LaTeX constructs with details of tehe customisation required.

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.