Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
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
add comment

1 Answer 1

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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