emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Latex Previewing process: imagemagick use pdflatex by default
@ 2016-05-24  4:28 Feng Shu
  2016-05-24  9:27 ` Rasmus
  0 siblings, 1 reply; 3+ messages in thread
From: Feng Shu @ 2016-05-24  4:28 UTC (permalink / raw)
  To: orgmode-devel; +Cc: Feng Shu

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-Latex-Previewing-process-imagemagick-use-pdflatex-by.patch --]
[-- Type: text/x-diff, Size: 1190 bytes --]

From 2cce55f48773f05f1aaeed31be8a53e3f59af312 Mon Sep 17 00:00:00 2001
From: Feng Shu <tumashu@163.com>
Date: Tue, 24 May 2016 12:06:41 +0800
Subject: [PATCH] Latex Previewing process: imagemagick use pdflatex by default

* org.el (org-preview-latex-process-alist):
---
 lisp/org.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 83ac51c..8056016 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4033,9 +4033,9 @@ All available processes and theirs documents can be found in
      :image-input-type "pdf"
      :image-output-type "png"
      :image-size-adjust (1.0 . 1.0)
-     :latex-compiler ("latex -interaction nonstopmode -output-directory %o %f")
+     :latex-compiler ("pdflatex -interaction nonstopmode -output-directory %o %f")
      :image-converter
-     ("convert -density %S -trim -antialias %f -quality 100 %b.png")))
+     ("convert -density %D -trim -antialias %f -quality 100 %b.png")))
   "Definitions of external processes for LaTeX previewing.
 Org mode can use some external commands to generate TeX snippet's images for
 previewing or inserting into HTML files, e.g., \"dvipng\".  This variable tells
-- 
2.1.4


[-- Attachment #2: Type: text/plain, Size: 5 bytes --]


-- 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Latex Previewing process: imagemagick use pdflatex by default
  2016-05-24  4:28 [PATCH] Latex Previewing process: imagemagick use pdflatex by default Feng Shu
@ 2016-05-24  9:27 ` Rasmus
  2016-05-24 17:29   ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Rasmus @ 2016-05-24  9:27 UTC (permalink / raw)
  To: emacs-orgmode

Hi Feng,

"Feng Shu" <tumashu@163.com> writes:

> From 2cce55f48773f05f1aaeed31be8a53e3f59af312 Mon Sep 17 00:00:00 2001
> From: Feng Shu <tumashu@163.com>
> Date: Tue, 24 May 2016 12:06:41 +0800
> Subject: [PATCH] Latex Previewing process: imagemagick use pdflatex by default
>
> * org.el (org-preview-latex-process-alist):
> ---
>  lisp/org.el | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lisp/org.el b/lisp/org.el
> index 83ac51c..8056016 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -4033,9 +4033,9 @@ All available processes and theirs documents can be found in
>       :image-input-type "pdf"
>       :image-output-type "png"
>       :image-size-adjust (1.0 . 1.0)
> -     :latex-compiler ("latex -interaction nonstopmode -output-directory %o %f")
> +     :latex-compiler ("pdflatex -interaction nonstopmode -output-directory %o %f")
>       :image-converter
> -     ("convert -density %S -trim -antialias %f -quality 100 %b.png")))
> +     ("convert -density %D -trim -antialias %f -quality 100 %b.png")))
>    "Definitions of external processes for LaTeX previewing.
>  Org mode can use some external commands to generate TeX snippet's images for
>  previewing or inserting into HTML files, e.g., \"dvipng\".  This variable tells
> -- 
> 2.1.4

Thanks for the patch.  It looks good.  Feel free to push.

* Aside 1

Re ‘org-preview-latex-process-alist’.

- It should be "you need to install the programs:..."
- :post-clean, it should consider ‘org-latex-logfiles-extensions’
- Note that you haven’t documented "%f" in the :latex-compiler.

* Aside 2

IMO the Correctᵀᴹ approach would be for Org to use the latex processor
specified by the document, when present.

E.g. \mathbb{1} typically requires unicode-math and hence requires
compilation with xelatex or lualatex.

Some things speak against this.

- :image-input-type would be "unpredictable" in the case of dvisvgm (dvi
  vs xdv), but both formats are supported.
- dvipng does not work with xelatex as it only support dvi up to format 2.

Thanks,
Rasmus

-- 
Don't slow down Johnny, leave the Cadillac runnin'

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Latex Previewing process: imagemagick use pdflatex by default
  2016-05-24  9:27 ` Rasmus
@ 2016-05-24 17:29   ` Nicolas Goaziou
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Goaziou @ 2016-05-24 17:29 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

Hello,

Rasmus <rasmus@gmx.us> writes:

> "Feng Shu" <tumashu@163.com> writes:
>
>> From 2cce55f48773f05f1aaeed31be8a53e3f59af312 Mon Sep 17 00:00:00 2001
>> From: Feng Shu <tumashu@163.com>
>> Date: Tue, 24 May 2016 12:06:41 +0800
>> Subject: [PATCH] Latex Previewing process: imagemagick use pdflatex by default
>>
>> * org.el (org-preview-latex-process-alist):

[...]

> Thanks for the patch.  It looks good.  Feel free to push.

I don't know if Feng Shu has commit access, so I pushed it.

Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-24 17:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-24  4:28 [PATCH] Latex Previewing process: imagemagick use pdflatex by default Feng Shu
2016-05-24  9:27 ` Rasmus
2016-05-24 17:29   ` Nicolas Goaziou

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).