emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Cannot generate latex preview images (Was: imaxima babel)


From: Alan Schmitt
Subject: [O] Cannot generate latex preview images (Was: imaxima babel)
Date: Sat, 30 Nov 2013 11:19:02 +0100
User-agent: mu4e 0.9.9.6pre2; emacs 24.3.1

Hello,

address@hidden writes:

> Alan Schmitt <address@hidden> writes:
>
>> I tried previewing the fragment, but I got the error:
>>
>> ,----
>> | Failed to create dvi file from
>> /var/folders/68/fvntfrw92y50gkk_67rkhsfw0000gn/T/orgtex16220cbr.tex
>> `----
>>
>> Looking at the tex file and the log file, it seems that the tex files is
>> to be processed by xelatex, but the command called seems to be pdfTeX. I
>> probably have something misconfigured, but I don't know what it is. Any
>> suggestion?
>>
> Are you sure you have 'dvipng' installed as mentioned in the manual? 
> ,----
> | If you have `dvipng' installed, LaTeX fragments can be processed to
> | produce preview images of the typeset expressions:
> `----
> I have dvipng 1.14 that comes with texlive 2013-3 in F20 which seems to
> work fine.
>

I do have dvipng installed, but the problem seems to come before that.

If I have a org buffer with the single following line:

#+BEGIN_SRC org
$$\alpha$$
#+END_SRC

If I try to preview the image, I get this error:

,----
| Creating images for buffer...1
| Failed to create dvi file from 
/var/folders/68/fvntfrw92y50gkk_67rkhsfw0000gn/T/orgtex292450MA.tex
`----

If I look at that tex file I see this:

#+BEGIN_SRC latex
\documentclass{article}
\usepackage[usenames]{color}
\usepackage{xltxtra}
\usepackage[T1]{fontenc}
% Package fixltx2e omitted
\usepackage{graphicx}
% Package longtable omitted
% Package float omitted
% Package wrapfig omitted
% Package rotating omitted
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{amssymb}
% Package hyperref omitted
\tolerance=1000
\pagestyle{empty}             % do not remove
% The settings below are copied from fullpage.sty
\setlength{\textwidth}{\paperwidth}
\addtolength{\textwidth}{-3cm}
\setlength{\oddsidemargin}{1.5cm}
\addtolength{\oddsidemargin}{-2.54cm}
\setlength{\evensidemargin}{\oddsidemargin}
\setlength{\textheight}{\paperheight}
\addtolength{\textheight}{-\headheight}
\addtolength{\textheight}{-\headsep}
\addtolength{\textheight}{-\footskip}
\addtolength{\textheight}{-3cm}
\setlength{\topmargin}{1.5cm}
\addtolength{\topmargin}{-2.54cm}
\begin{document}
$$\alpha$$
\end{document}
#+END_SRC

This file can be compiled using xelatex (because of the xltxtra
package). However it seems that org tries to compile it with something
else, as seen in the log file:

,----
| This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013) (format=latex 
2013.8.2)  30 NOV 2013 11:12
| entering extended mode
|  restricted \write18 enabled.
|  %&-line parsing enabled.
| **/var/folders/68/fvntfrw92y50gkk_67rkhsfw0000gn/T/orgtex29245BXG.tex
| (/var/folders/68/fvntfrw92y50gkk_67rkhsfw0000gn/T/orgtex29245BXG.tex
| LaTeX2e <2011/06/27>
| Babel <3.9f> and hyphenation patterns for 78 languages loaded.
| (/usr/local/texlive/2013/texmf-dist/tex/latex/base/article.cls
| Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
| (/usr/local/texlive/2013/texmf-dist/tex/latex/base/size10.clo
| File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
| )
| address@hidden
| address@hidden
| address@hidden
| address@hidden
| address@hidden
| address@hidden
| address@hidden
| address@hidden
| \abovecaptionskip=\skip41
| \belowcaptionskip=\skip42
| \bibindent=\dimen102
| )
| (/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/color.sty
| Package: color 2005/11/14 v1.0j Standard LaTeX Color (DPC)
| 
| (/usr/local/texlive/2013/texmf-dist/tex/latex/latexconfig/color.cfg
| File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
| )
| Package color Info: Driver file: dvips.def on input line 130.
| 
| (/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/dvips.def
| File: dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
| )
| (/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/dvipsnam.def
| File: dvipsnam.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
| ))
| (/usr/local/texlive/2013/texmf-dist/tex/latex/xltxtra/xltxtra.sty
| Package: xltxtra 2010/09/20 v0.5e Improvements for the "XeLaTeX" format
| 
| (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/ifluatex.sty
| Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
| Package ifluatex Info: LuaTeX not detected.
| )
| (/usr/local/texlive/2013/texmf-dist/tex/generic/ifxetex/ifxetex.sty
| Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
| )
| ! 
|  ********************************************
|  * XeTeX is required to compile this document.
|  * Sorry!
|  ********************************************.
| \RequireXeTeX ...********************************}
|                                                   \endgroup \fi 
| l.26 \RequireXeTeX
|                   
| ? 
| ! Emergency stop.
| \RequireXeTeX ...********************************}
|                                                   \endgroup \fi 
| l.26 \RequireXeTeX
|                   
| End of file on the terminal!
| 
|  
| Here is how much of TeX's memory you used:
|  580 strings out of 493316
|  8570 string characters out of 6137931
|  55188 words of memory out of 5000000
|  4098 multiletter control sequences out of 15000+600000
|  3640 words of font info for 14 fonts, out of 8000000 for 9000
|  957 hyphenation exceptions out of 8191
|  23i,0n,19p,237b,36s stack positions out of 5000i,500n,10000p,200000b,80000s
| No pages of output.
`----

The reason I have xltxtra is because I add it to the latex packages to
use for export:

#+BEGIN_SRC emacs-lisp
  (add-to-list 'org-latex-packages-alist '("" "xltxtra" t))
#+END_SRC

I guess this does not play nice with the latex image preview. Is there a
way to only use this package when I exporting latex to pdf?

Thanks,

Alan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]