I like using preview-latex in Emacs. I have been working a lot with spectral sequences lately and so I would like to get the figures I draw in sseq to show up in preview-latex. So far no luck. Does anybody have any ideas on how to make this work?

Currently the image does seem to compile but I just see a black box. No actual image appears.

Example for people to play with:

    \ssmoveto 0 0
    \ssmoveto 0 1
    \ssmoveto 0 2
    \ssmoveto 0 3
    \ssmoveto 1 0
    \ssmoveto 1 1
    \ssmoveto 1 2
    \ssmoveto 1 3
    \ssmoveto 2 0
    \ssmoveto 2 1
    \ssmoveto 2 2
    \ssmoveto 2 3
    \ssmoveto 3 0
    \ssmoveto 3 1
    \ssmoveto 3 2
    \ssmoveto 3 3 

1 Answer 1


Quoting from the preview-latex manual:

If you have a certain macro or environment that you want to preview, first check if it can be chosen by cutomizing preview-default-options-list in the Preview Latex group.

If it is not available there, you can add it to preview-default-preamble also in the Preview Latex group, by adding a \PreviewMacro or \PreviewEnvironment entry (see Provided commands) after the \RequirePackage line.

So you have to add sseq to the list of environments to be preview. You can customize the variable preview-default-preamble (M-x customize-variable RET preview-default-preamble RET) or add the following code to your .emacs

(eval-after-load "preview"
     (add-to-list 'preview-default-preamble
          "\\PreviewEnvironment{sseq}" t)))

enter image description here

  • This does seem to work only when my background is white. When the background is black, I still don't see the diagram (though the other formulas do compile).
    – Lalit Jain
    Aug 19, 2013 at 20:10
  • Can you post an example? I'm not familiar with this package, I used an example provided in its manual.
    – giordano
    Aug 19, 2013 at 20:11
  • @LalitJain if I compile the document you posted I see a white background.
    – giordano
    Aug 19, 2013 at 20:23
  • Sorry, I meant emacs background color! However it does seem to work fine now. Thanks for your help!
    – Lalit Jain
    Aug 19, 2013 at 20:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .