emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: yggdrasil@gmx.co.uk
Cc: emacs-orgmode@gnu.org
Subject: Cannot generate latex preview images (Was:  imaxima babel)
Date: Sat, 30 Nov 2013 11:19:02 +0100	[thread overview]
Message-ID: <m2siue19bd.fsf@polytechnique.org> (raw)
In-Reply-To: <87vbzdmoex.fsf@gmx.co.uk>

Hello,

yggdrasil@gmx.co.uk writes:

> Alan Schmitt <alan.schmitt@polytechnique.org> 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)
| )
| \c@part=\count79
| \c@section=\count80
| \c@subsection=\count81
| \c@subsubsection=\count82
| \c@paragraph=\count83
| \c@subparagraph=\count84
| \c@figure=\count85
| \c@table=\count86
| \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

  parent reply	other threads:[~2013-11-30 12:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-21 22:58 imaxima babel yggdrasil
2013-11-21 23:07 ` Rüdiger Sonderfeld
2013-11-21 23:33   ` Eric Schulte
2013-11-22 17:05     ` yggdrasil
2013-11-23 16:12       ` Eric Schulte
2013-11-26 21:53         ` yggdrasil
2013-11-27  8:54           ` Alan Schmitt
2013-11-27 23:10             ` yggdrasil
2013-11-28  0:42               ` Nick Dokos
2013-11-28  1:09               ` Thomas S. Dye
2013-11-30 10:19               ` Alan Schmitt [this message]
2013-11-30 12:49                 ` Cannot generate latex preview images Nicolas Goaziou
2013-12-02 10:09                   ` Alan Schmitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2siue19bd.fsf@polytechnique.org \
    --to=alan.schmitt@polytechnique.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=yggdrasil@gmx.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).