From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Cannot generate latex preview images (Was: imaxima babel) Date: Sat, 30 Nov 2013 11:19:02 +0100 Message-ID: References: <87li0htl9g.fsf@gmx.co.uk> <35517207.uS1ReSrXEG@descartes> <87ppptjd0s.fsf@gmail.com> <878uwgtlhq.fsf@gmx.co.uk> <87a9gvgk7l.fsf@gmail.com> <878uwaomnz.fsf@gmx.co.uk> <87vbzdmoex.fsf@gmx.co.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmjJ5-0006Sz-8e for emacs-orgmode@gnu.org; Sat, 30 Nov 2013 07:06:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VmjIv-0007fv-Bm for emacs-orgmode@gnu.org; Sat, 30 Nov 2013 07:05:55 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:6817) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmjIv-0007fa-2S for emacs-orgmode@gnu.org; Sat, 30 Nov 2013 07:05:45 -0500 In-reply-to: <87vbzdmoex.fsf@gmx.co.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: yggdrasil@gmx.co.uk Cc: emacs-orgmode@gnu.org Hello, yggdrasil@gmx.co.uk writes: > Alan Schmitt 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