4

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:

\documentclass{article}    
\usepackage{sseq}
\newcommand{\Zp}{Z_p}
\newcommand{\Zl}{Z_l}
\begin{document}
\[
    \begin{sseq}[entrysize=3.5cm,grid=dots]{0...3}{0...3}
    \ssmoveto 0 0
    \ssdrop{H_0(\Zp,H_0(\Zl^k))}
    \ssmoveto 0 1
    \ssdrop{H_0(\Zp,H_1(\Zl^k))}
    \ssmoveto 0 2
    \ssdrop{H_0(\Zp,H_2(\Zl^k))}
    \ssmoveto 0 3
    \ssdrop{H_0(\Zp,H_3(\Zl^k))}
    \ssmoveto 1 0
    \ssdrop{H_1(\Zp,H_0(\Zl^k))}
    \ssmoveto 1 1
    \ssdrop{H_1(\Zp,H_1(\Zl^k))}
    \ssmoveto 1 2
    \ssdrop{H_1(\Zp,H_2(\Zl^k))}
    \ssmoveto 1 3
    \ssdrop{H_1(\Zp,H_3(\Zl^k))}
    \ssmoveto 2 0
    \ssdrop{H_2(\Zp,H_0(\Zl^k))}
    \ssmoveto 2 1
    \ssdrop{H_2(\Zp,H_1(\Zl^k))}
    \ssmoveto 2 2
    \ssdrop{H_2(\Zp,H_2(\Zl^k))}
    \ssmoveto 2 3
    \ssdrop{H_2(\Zp,H_3(\Zl^k))}
    \ssmoveto 3 0
    \ssdrop{H_3(\Zp,H_0(\Zl^k))}
    \ssmoveto 3 1
    \ssdrop{H_3(\Zp,H_1(\Zl^k))}
    \ssmoveto 3 2
    \ssdrop{H_3(\Zp,H_2(\Zl^k))}
    \ssmoveto 3 3 
    \ssdrop{H_3(\Zp,H_3(\Zl^k))}
    \end{sseq}
    \]
\end{document}
4

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"
  '(progn
     (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 '13 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 '13 at 20:11
  • @LalitJain if I compile the document you posted I see a white background. – giordano Aug 19 '13 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 '13 at 20:30

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.