emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Mathjax vs. problems with imagemagick
@ 2014-07-06  8:03 Joseph Vidal-Rosset
  2014-07-06  8:39 ` briangpowell .
  2014-07-06 21:25 ` Nick Dokos
  0 siblings, 2 replies; 14+ messages in thread
From: Joseph Vidal-Rosset @ 2014-07-06  8:03 UTC (permalink / raw)
  To: Liste-emacs-orgmode@gnu.org


[-- Attachment #1.1: Type: text/plain, Size: 655 bytes --]

Hello everybody,

To convert equations from *.org  into *.html, Mathjax is certainly the best
solution but unfortunately, this solution does not work as soons as one
need to use some texlive package convenient to produce easily proofs in
specific format
(for example if one uses bussproofs.sty of fitch.sty ).

That is why imagemagick is useful. Unfortunately, the produced png images
in my ltxpng/ have a very bad quality and if the browser load them, the
result is terrible.
I met already this problem and I do not remind what was the solution...

I you have suggestions...

Best wishes,

Jo.

PS: in attachment, an example of this terrible png images.

[-- Attachment #1.2: Type: text/html, Size: 819 bytes --]

[-- Attachment #2: iQa-completeness-proof-1_f9d952ab86d791757182fdd3144d39d1319d5b4c.png --]
[-- Type: image/png, Size: 489 bytes --]

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

* Re: Mathjax vs. problems with imagemagick
  2014-07-06  8:03 Mathjax vs. problems with imagemagick Joseph Vidal-Rosset
@ 2014-07-06  8:39 ` briangpowell .
  2014-07-06  8:59   ` Joseph Vidal-Rosset
  2014-07-06 21:25 ` Nick Dokos
  1 sibling, 1 reply; 14+ messages in thread
From: briangpowell . @ 2014-07-06  8:39 UTC (permalink / raw)
  To: Joseph Vidal-Rosset; +Cc: Liste-emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1531 bytes --]

* PNG is "lossless" format--if you can, make it the first file you create
rather than last.

** If you create a JPG a "lossy" format then you could lose some of the
beauty (like your example).

* ImageMagick has many switches you can throw--suggest you look deeper into
it in the freely available manual--though its very thick.

* Often there are blah2blah programs (and many methods in ImageMagick for
example) available which may help that you may be able to string together.
 General example:

dvips -o blah.dvi

ps2pdf blah.ps

pdf2png blah.pdf

** Maybe you can convert your file to an intermediary format and then
convert it to .png

*** But again, if possible, create a PNG (.png) type file firstly since it
is a "lossless" file type.





On Sun, Jul 6, 2014 at 4:03 AM, Joseph Vidal-Rosset <
joseph.vidal.rosset@gmail.com> wrote:

> Hello everybody,
>
> To convert equations from *.org  into *.html, Mathjax is certainly the
> best solution but unfortunately, this solution does not work as soons as
> one need to use some texlive package convenient to produce easily proofs in
> specific format
> (for example if one uses bussproofs.sty of fitch.sty ).
>
> That is why imagemagick is useful. Unfortunately, the produced png images
> in my ltxpng/ have a very bad quality and if the browser load them, the
> result is terrible.
> I met already this problem and I do not remind what was the solution...
>
> I you have suggestions...
>
> Best wishes,
>
> Jo.
>
> PS: in attachment, an example of this terrible png images.
>

[-- Attachment #2: Type: text/html, Size: 2289 bytes --]

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

* Re: Mathjax vs. problems with imagemagick
  2014-07-06  8:39 ` briangpowell .
@ 2014-07-06  8:59   ` Joseph Vidal-Rosset
  0 siblings, 0 replies; 14+ messages in thread
From: Joseph Vidal-Rosset @ 2014-07-06  8:59 UTC (permalink / raw)
  To: briangpowell .; +Cc: Liste-emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1931 bytes --]

Thanks for your reply.
Do you mean that  #+OPTIONS: tex:imagemagick  must be mentioned first?
In my opinion something is wrong in my setup and it is difficult for me to
see what's wrong. Even a minima-init.el  file is not helpful...

Best wishes,

Jo.


2014-07-06 10:39 GMT+02:00 briangpowell . <briangpowellms@gmail.com>:

> * PNG is "lossless" format--if you can, make it the first file you create
> rather than last.
>
> ** If you create a JPG a "lossy" format then you could lose some of the
> beauty (like your example).
>
> * ImageMagick has many switches you can throw--suggest you look deeper
> into it in the freely available manual--though its very thick.
>
> * Often there are blah2blah programs (and many methods in ImageMagick for
> example) available which may help that you may be able to string together.
>  General example:
>
> dvips -o blah.dvi
>
> ps2pdf blah.ps
>
> pdf2png blah.pdf
>
> ** Maybe you can convert your file to an intermediary format and then
> convert it to .png
>
> *** But again, if possible, create a PNG (.png) type file firstly since it
> is a "lossless" file type.
>
>
>
>
>
> On Sun, Jul 6, 2014 at 4:03 AM, Joseph Vidal-Rosset <
> joseph.vidal.rosset@gmail.com> wrote:
>
>> Hello everybody,
>>
>> To convert equations from *.org  into *.html, Mathjax is certainly the
>> best solution but unfortunately, this solution does not work as soons as
>> one need to use some texlive package convenient to produce easily proofs in
>> specific format
>> (for example if one uses bussproofs.sty of fitch.sty ).
>>
>> That is why imagemagick is useful. Unfortunately, the produced png images
>> in my ltxpng/ have a very bad quality and if the browser load them, the
>> result is terrible.
>> I met already this problem and I do not remind what was the solution...
>>
>> I you have suggestions...
>>
>> Best wishes,
>>
>> Jo.
>>
>> PS: in attachment, an example of this terrible png images.
>>
>
>

[-- Attachment #2: Type: text/html, Size: 3085 bytes --]

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

* Re: Mathjax vs. problems with imagemagick
  2014-07-06  8:03 Mathjax vs. problems with imagemagick Joseph Vidal-Rosset
  2014-07-06  8:39 ` briangpowell .
@ 2014-07-06 21:25 ` Nick Dokos
  2014-07-08 13:01   ` Joseph Vidal-Rosset
  1 sibling, 1 reply; 14+ messages in thread
From: Nick Dokos @ 2014-07-06 21:25 UTC (permalink / raw)
  To: emacs-orgmode

Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com> writes:


> To convert equations from *.org  into *.html, Mathjax is certainly the
> best solution but unfortunately, this solution does not work as soons
> as one need to use some texlive package convenient to produce easily
> proofs in specific format (for example if one uses bussproofs.sty of
> fitch.sty ).
>
> That is why imagemagick is useful. Unfortunately, the produced png
> images in my ltxpng/ have a very bad quality and if the browser load
> them, the result is terrible.  I met already this problem and I do not
> remind what was the solution...
>
> I you have suggestions...
>

The process by which images are produced (for imagemagick: dvipng
follows a slightly different path) is to wrap the latex fragment
into a complete latex file, run pdflatex (or whatever your
org-latex-pdf-process says) to produce a pdf file and then run
the imagemagick `convert' program to produce the png.

I'd suggest that you duplicate this process by hand and see where
it goes wrong.

I usually do that by adding a (debug) call into
org-create-formula-image-with-imagemagick like this:

--8<---------------cut here---------------start------------->8---
    (let ((latex-header (org-create-formula--latex-header)))
      (with-temp-file texfile
	(insert latex-header)
	(insert "\n\\begin{document}\n"
		"\\definecolor{fg}{rgb}{" fg "}\n"
		"\\definecolor{bg}{rgb}{" bg "}\n"
		"\n\\pagecolor{bg}\n"
		"\n{\\color{fg}\n"
		string
		"\n}\n"
		"\n\\end{document}\n")))
    (org-latex-compile texfile t)
    (debug)                                       <<<<<<<<<<<<<<ADDED THIS
    (if (not (file-exists-p pdffile))
	(progn (message "Failed to create pdf file from %s" texfile) nil)
      (ignore-errors
	(if (featurep 'xemacs)
	    (call-process "convert" nil nil nil
			  "-density" "96"
			  "-trim"
			  "-antialias"
			  pdffile
			  "-quality" "100"
			  ;; "-sharpen" "0x1.0"
			  pngfile)
	  (call-process "convert" nil nil nil
			"-density" dpi
			"-trim"
			"-antialias"
			pdffile
			"-quality" "100"
			;; "-sharpen" "0x1.0"
			pngfile)))
--8<---------------cut here---------------end--------------->8---


I then reload the file (M-x load-file RET /path/to/org.el RET) to pick
up the modified function and proceed normally to export the file. When
the (debug) is executed, I get a debug buffer and I can examine things
like `texfile' and `dpi', using the debugger's `e' command. I then copy
the latex file named by `texfile' to some private directory and run
pdflatex on it and then (using the dpi value the debugger showed me - in
my case, it was "120.0"), I convert to png using the same command as the
function does:

    cp /tmp/orgtex3771B9p.tex foo.tex
    pdflatex foo.tex
    convert -density 120.0 -trim -antialias foo.pdf -quality 100 foo.png

The whole thing is a bit fiddly but not really difficult: it takes more
time to explain than to do.

BTW, if you go this way, don't forget to delete the (debug) afterwards.

HTH.
-- 
Nick

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

* Re: Mathjax vs. problems with imagemagick
  2014-07-06 21:25 ` Nick Dokos
@ 2014-07-08 13:01   ` Joseph Vidal-Rosset
  2014-07-08 13:04     ` Joseph Vidal-Rosset
  2014-07-11  0:59     ` Nick Dokos
  0 siblings, 2 replies; 14+ messages in thread
From: Joseph Vidal-Rosset @ 2014-07-08 13:01 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 4129 bytes --]

#+OPTIONS: latex:t
#+LATEX_HEADER: \usepackage{bussproofs}

Hello Nick, hello everybody

Before using your  suggestion of debugging, I have made  another test to
convert formulas made with different  latex packages into png images for
a html file. 

At the beginning of my org file: 

#+LATEX_HEADER: \usepackage{fitch}
#+LATEX_HEADER: \usepackage{bussproofs}
#+OPTIONS: tex:imagemagick

All formulas used  with the equation environment have a  nice png image,
and the Fitch proofs also. 
But that is not  the case with proofs in Gentzen  tree style created via
bussproofs.sty : the png images are corrupted. 

That's strange  because it works  well with  LaTeX export and  even with
latex-preview-image   and  org-htmlize.    This  image   of  implication
elimination rule in my gnus-message should be nice: 

\begin{prooftree}
\AxiomC{$A \to B$}
\AxiomC{$A$}
\RightLabel{\scriptsize{$\to E$}}
\BinaryInfC{$B$}
\end{prooftree}


I am  afraid to be  not competent enough  to use correctly  the debugger
that  you suggest,  but  it is  probably  again a  problem  my setup  or
something missing in my headers and not a bug somewhere. 

Best wishes,

Jo. 

Le  dim. 06  juil. 2014  à 11:25:30  , Nick  Dokos <ndokos@gmail.com>  a
envoyé ce message:
> The process by which images are produced (for imagemagick: dvipng
> follows a slightly different path) is to wrap the latex fragment
> into a complete latex file, run pdflatex (or whatever your
> org-latex-pdf-process says) to produce a pdf file and then run
> the imagemagick `convert' program to produce the png.
>
> I'd suggest that you duplicate this process by hand and see where
> it goes wrong.
>
> I usually do that by adding a (debug) call into
> org-create-formula-image-with-imagemagick like this:
>
>     (let ((latex-header (org-create-formula--latex-header)))
>       (with-temp-file texfile
>         (insert latex-header)
>         (insert "\n\\begin{document}\n"
>                 "\\definecolor{fg}{rgb}{" fg "}\n"
>                 "\\definecolor{bg}{rgb}{" bg "}\n"
>                 "\n\\pagecolor{bg}\n"
>                 "\n{\\color{fg}\n"
>                 string
>                 "\n}\n"
>                 "\n\\end{document}\n")))
>     (org-latex-compile texfile t)
>     (debug)                                       <<<<<<<<<<<<<<ADDED THIS
>     (if (not (file-exists-p pdffile))
>         (progn (message "Failed to create pdf file from %s" texfile) nil)
>       (ignore-errors
>         (if (featurep 'xemacs)
>             (call-process "convert" nil nil nil
>                           "-density" "96"
>                           "-trim"
>                           "-antialias"
>                           pdffile
>                           "-quality" "100"
>                           ;; "-sharpen" "0x1.0"
>                           pngfile)
>           (call-process "convert" nil nil nil
>                         "-density" dpi
>                         "-trim"
>                         "-antialias"
>                         pdffile
>                         "-quality" "100"
>                         ;; "-sharpen" "0x1.0"
>                         pngfile)))
>
>
> I then reload the file (M-x load-file RET /path/to/org.el RET) to pick
> up the modified function and proceed normally to export the file. When
> the (debug) is executed, I get a debug buffer and I can examine things
> like `texfile' and `dpi', using the debugger's `e' command. I then copy
> the latex file named by `texfile' to some private directory and run
> pdflatex on it and then (using the dpi value the debugger showed me - in
> my case, it was "120.0"), I convert to png using the same command as the
> function does:
>
>     cp /tmp/orgtex3771B9p.tex foo.tex
>     pdflatex foo.tex
>     convert -density 120.0 -trim -antialias foo.pdf -quality 100 foo.png
>
> The whole thing is a bit fiddly but not really difficult: it takes more
> time to explain than to do.
>
> BTW, if you go this way, don't forget to delete the (debug) afterwards.
>
> HTH.

[-- Attachment #2.1: Type: text/html, Size: 4896 bytes --]

[-- Attachment #2.2: latex2370749y_e0d3b5403491143b62376f682dfe5dbed1070fa6.png --]
[-- Type: image/png, Size: 636 bytes --]

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

* Re: Mathjax vs. problems with imagemagick
  2014-07-08 13:01   ` Joseph Vidal-Rosset
@ 2014-07-08 13:04     ` Joseph Vidal-Rosset
  2014-07-08 13:44       ` Joseph Vidal-Rosset
  2014-07-11  0:59     ` Nick Dokos
  1 sibling, 1 reply; 14+ messages in thread
From: Joseph Vidal-Rosset @ 2014-07-08 13:04 UTC (permalink / raw)
  To: Nick Dokos; +Cc: Liste-emacs-orgmode@gnu.org


[-- Attachment #1.1: Type: text/plain, Size: 507 bytes --]

2014-07-08 15:01 GMT+02:00 Joseph Vidal-Rosset <
joseph.vidal.rosset@gmail.com>:

> That's strange because it works well with LaTeX export and even with
> latex-preview-image and org-htmlize. This image of implication
> elimination rule in my gnus-message should be nice:
>
> [image: \begin{prooftree} \AxiomC{$A \to B$} \AxiomC{$A$}
> \RightLabel{\scriptsize{$\to E$}} \BinaryInfC{$B$} \end{prooftree}]
>
>

No. I see  now the image in my browser, it is not nice at all... I do not
understand why. :(

Jo.

[-- Attachment #1.2: Type: text/html, Size: 1045 bytes --]

[-- Attachment #2: latex2370749y_e0d3b5403491143b62376f682dfe5dbed1070fa6.png --]
[-- Type: image/png, Size: 636 bytes --]

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

* Re: Mathjax vs. problems with imagemagick
  2014-07-08 13:04     ` Joseph Vidal-Rosset
@ 2014-07-08 13:44       ` Joseph Vidal-Rosset
  0 siblings, 0 replies; 14+ messages in thread
From: Joseph Vidal-Rosset @ 2014-07-08 13:44 UTC (permalink / raw)
  To: Nick Dokos; +Cc: Liste-emacs-orgmode@gnu.org


[-- Attachment #1.1: Type: text/plain, Size: 1317 bytes --]

Hello Nick, hello everybody,

I have finally got the solution.

I have put again in my init.el  the code from the page
http://orgmode.org/worg/org-tutorials/org-latex-preview.html , i.e.

(setq org-latex-listings 'minted) (require 'ox-latex) (add-to-list
'org-latex-packages-alist '("" "minted"))



and I have added this one foiunded on the web (I do not remind where
exactly):


;; Let the exporter use the -shell-escape option to let latex
;; execute external programs.
;; This obviously and can be dangerous to activate!
(setq org-latex-pdf-process
      '("xelatex -shell-escape -interaction nonstopmode -output-directory
%o %f"))


Now it works. But I do not know really why.

Best wishes,

Jo.



2014-07-08 15:04 GMT+02:00 Joseph Vidal-Rosset <
joseph.vidal.rosset@gmail.com>:

>
> 2014-07-08 15:01 GMT+02:00 Joseph Vidal-Rosset <
> joseph.vidal.rosset@gmail.com>:
>
> That's strange because it works well with LaTeX export and even with
>> latex-preview-image and org-htmlize. This image of implication
>> elimination rule in my gnus-message should be nice:
>>
>> [image: \begin{prooftree} \AxiomC{$A \to B$} \AxiomC{$A$}
>> \RightLabel{\scriptsize{$\to E$}} \BinaryInfC{$B$} \end{prooftree}]
>>
>>
>
> No. I see  now the image in my browser, it is not nice at all... I do not
> understand why. :(
>
> Jo.
>

[-- Attachment #1.2: Type: text/html, Size: 2842 bytes --]

[-- Attachment #2: latex2370749y_e0d3b5403491143b62376f682dfe5dbed1070fa6.png --]
[-- Type: image/png, Size: 636 bytes --]

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

* Re: Mathjax vs. problems with imagemagick
  2014-07-08 13:01   ` Joseph Vidal-Rosset
  2014-07-08 13:04     ` Joseph Vidal-Rosset
@ 2014-07-11  0:59     ` Nick Dokos
  2014-07-11  7:38       ` Joseph Vidal-Rosset
  1 sibling, 1 reply; 14+ messages in thread
From: Nick Dokos @ 2014-07-11  0:59 UTC (permalink / raw)
  To: emacs-orgmode

Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com> writes:

> Hello Nick, hello everybody
>
> Before using your suggestion of debugging, I have made another test to
> convert formulas made with different latex packages into png images for
> a html file.
>
> At the beginning of my org file:
>
> All formulas used with the equation environment have a nice png image,
> and the Fitch proofs also.
> But that is not the case with proofs in Gentzen tree style created via
> bussproofs.sty : the png images are corrupted.
>
> That's strange because it works well with LaTeX export and even with
> latex-preview-image and org-htmlize. This image of implication
> elimination rule in my gnus-message should be nice:
>

It was far from nice in my case: almost completely unreadable.

Can you please post an example org file and the tex file that's produced
that gives you such bad images?

>
> I am afraid to be not competent enough to use correctly the debugger
> that you suggest, but it is probably again a problem my setup or
> something missing in my headers and not a bug somewhere.
>

That was just to get the details of what org does with it, just in case
the parameters had something to do with it. But it seems that the
problem is with bussproofs.sty (maybe?)

Nick

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

* Re: Mathjax vs. problems with imagemagick
  2014-07-11  0:59     ` Nick Dokos
@ 2014-07-11  7:38       ` Joseph Vidal-Rosset
  2014-07-11 15:59         ` Nick Dokos
  0 siblings, 1 reply; 14+ messages in thread
From: Joseph Vidal-Rosset @ 2014-07-11  7:38 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode

Le  ven. 11  juil. 2014  à 02:59:23  , Nick  Dokos <ndokos@gmail.com>  a
envoyé ce message:

>
> Can you please post an example org file and the tex file that's produced
> that gives you such bad images?

Dear Nick,

I sent an email three days ago to tell you that I've got the solution. I
said: 

" I have put again in my init.el the code from the page [[http://orgmode.org/worg/org-tutorials/org-latex-preview.html]] , i.e.

(setq org-latex-listings 'minted) (require 'ox-latex) (add-to-list 'org-latex-packages-alist '("" "minted"))


and I have added :

;; Let the exporter use the -shell-escape option to let latex
;; execute external programs.
;; This obviously and can be dangerous to activate!
(setq org-latex-pdf-process
      '("xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"))


Now it works. But I do not know really why." End of quotation .

I would have been happy to show you an example. But now I meet again, as
often, the tiring same problem: 

Creating LaTeX Image...
Failed to create dvi file from /tmp/orgtex15065yFA.tex
Creating LaTeX Image...
Failed to create dvi file from /tmp/orgtex15065MaM.tex
Ispell process killed
Starting new Ispell process [aspell::en] ...
Mark set
Sending...
Mark set [2 times]
mm-insert-file-contents: Opening input file: aucun fichier ou dossier de ce type, /tmp/ltxpng/latex15065_PG_37f10648c57a40194a74eaabbaa5c1678a5d2046.png
Mark set

Nevertheless,  the png  file is  in  /tmp/ltxpng and  it is  a nice  png
image. 

I  remind  that the  error  in  creating the  dvi  file  was created  by
minted. I  deleted every reference  to minted and  it worked, but  now I
realize that  without minted the  use of bussproofs.sty cannot  work for
html conversion. :S 

I guess that I have to put in  my .bashrc a command to say that I always
want to use latex with -shell-escape option  , but I am not sure that it
is the best solution. 

Every help is welcome. 

Best regards,

Jo. 

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

* Re: Mathjax vs. problems with imagemagick
  2014-07-11  7:38       ` Joseph Vidal-Rosset
@ 2014-07-11 15:59         ` Nick Dokos
  2014-07-11 16:06           ` Joseph Vidal-Rosset
  0 siblings, 1 reply; 14+ messages in thread
From: Nick Dokos @ 2014-07-11 15:59 UTC (permalink / raw)
  To: emacs-orgmode

Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com> writes:

> Le  ven. 11  juil. 2014  à 02:59:23  , Nick  Dokos <ndokos@gmail.com>  a
> envoyé ce message:
>
>>
>> Can you please post an example org file and the tex file that's produced
>> that gives you such bad images?
>
> Dear Nick,
>
> I sent an email three days ago to tell you that I've got the solution. I
> said: 
>

Yes, I remember this, but what with the mail delays and time reordering of
the replies, I got confused.


> mm-insert-file-contents: Opening input file: aucun fichier ou dossier
> de ce type,
> /tmp/ltxpng/latex15065_PG_37f10648c57a40194a74eaabbaa5c1678a5d2046.png
> Mark set
>
> Nevertheless,  the png  file is  in  /tmp/ltxpng and  it is  a nice  png
> image. 
>

And you are sure that it is named
"latex15065_PG_37f10648c57a40194a74eaabbaa5c1678a5d2046.png" ?
The existing file might be a remnant from a previous run with a slightly
different name (uuid readability is not the best :-) )

> I  remind  that the  error  in  creating the  dvi  file  was created  by
> minted. I  deleted every reference  to minted and  it worked, but  now I
> realize that  without minted the  use of bussproofs.sty cannot  work for
> html conversion. :S 
>
> I guess that I have to put in  my .bashrc a command to say that I always
> want to use latex with -shell-escape option  , but I am not sure that it
> is the best solution. 
>

-shell-escape is a security risk, allowing arbitrary programs to
execute, but if you are careful about what you allow and don't get
careless, I think it's reasonable to set it once and for all. I do that
because I use minted all the time (it's also needed by some svg package
that I occasionally use). But I do try to be careful about what new
latex packages I install.

Nick

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

* Re: Mathjax vs. problems with imagemagick
  2014-07-11 15:59         ` Nick Dokos
@ 2014-07-11 16:06           ` Joseph Vidal-Rosset
  2014-07-11 18:05             ` Nick Dokos
  0 siblings, 1 reply; 14+ messages in thread
From: Joseph Vidal-Rosset @ 2014-07-11 16:06 UTC (permalink / raw)
  To: Nick Dokos; +Cc: Liste-emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1367 bytes --]

2014-07-11 17:59 GMT+02:00 Nick Dokos <ndokos@gmail.com>:

> And you are sure that it is named
> "latex15065_PG_37f10648c57a40194a74eaabbaa5c1678a5d2046.png" ?
> The existing file might be a remnant from a previous run with a slightly
> different name (uuid readability is not the best :-) )
>
>
:)  I am pretty sure, yes ! :)


>  > I  remind  that the  error  in  creating the  dvi  file  was created  by
> > minted. I  deleted every reference  to minted and  it worked, but  now I
> > realize that  without minted the  use of bussproofs.sty cannot  work for
> > html conversion. :S
> >
> > I guess that I have to put in  my .bashrc a command to say that I always
> > want to use latex with -shell-escape option  , but I am not sure that it
> > is the best solution.
> >
>
> -shell-escape is a security risk, allowing arbitrary programs to
> execute, but if you are careful about what you allow and don't get
> careless, I think it's reasonable to set it once and for all. I do that
> because I use minted all the time (it's also needed by some svg package
> that I occasionally use). But I do try to be careful about what new
> latex packages I install.
>

I have just to find how to write this setup in my .bashrc file. If you know
the command line for a Linux user, do not hesitate to tell me. It will be
more quick for me !

Best wishes and thanks again !

Jo.

[-- Attachment #2: Type: text/html, Size: 2283 bytes --]

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

* Re: Mathjax vs. problems with imagemagick
  2014-07-11 16:06           ` Joseph Vidal-Rosset
@ 2014-07-11 18:05             ` Nick Dokos
  2014-07-11 18:24               ` Joseph Vidal-Rosset
  2014-07-28 14:36               ` Sebastien Vauban
  0 siblings, 2 replies; 14+ messages in thread
From: Nick Dokos @ 2014-07-11 18:05 UTC (permalink / raw)
  To: emacs-orgmode

Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com> writes:

>     > I guess that I have to put in  my .bashrc a command to say that I always
>     > want to use latex with -shell-escape option  , but I am not sure that it
>     > is the best solution.
>     >
>    
>     -shell-escape is a security risk, allowing arbitrary programs to
>     execute, but if you are careful about what you allow and don't get
>     careless, I think it's reasonable to set it once and for all. I do that
>     because I use minted all the time (it's also needed by some svg package
>     that I occasionally use). But I do try to be careful about what new
>     latex packages I install.
>
> I have just to find how to write this setup in my .bashrc file. If you know the command line for a Linux user, do not hesitate to
> tell me. It will be more quick for me !
>

Sorry, I misspoke: I only set it in org. Most of my latex usage is
org->latex->pdf nowadays, so I don't bother to do it from the shell. On
the rare occasions when I do it from the command line, I type the option
explicitly if needed.

My org-latex-pdf-process setting is

  (setq org-latex-pdf-process '("texi2dvi --shell-escape --pdf %f"))

and I'm experimenting with

  (setq org-latex-pdf-process '("latexmk --shell-escape -pdf -xelatex %f"))

HTH,
Nick

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

* Re: Mathjax vs. problems with imagemagick
  2014-07-11 18:05             ` Nick Dokos
@ 2014-07-11 18:24               ` Joseph Vidal-Rosset
  2014-07-28 14:36               ` Sebastien Vauban
  1 sibling, 0 replies; 14+ messages in thread
From: Joseph Vidal-Rosset @ 2014-07-11 18:24 UTC (permalink / raw)
  To: Nick Dokos; +Cc: Liste-emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]

2014-07-11 20:05 GMT+02:00 Nick Dokos <ndokos@gmail.com>:

> My org-latex-pdf-process setting is
>
>   (setq org-latex-pdf-process '("texi2dvi --shell-escape --pdf %f"))
>
> and I'm experimenting with
>
>   (setq org-latex-pdf-process '("latexmk --shell-escape -pdf -xelatex %f"))
>


I am going to test this code, and I will be back to tell you how it works
for me.

Many many thanks.

Best wishes

Jo.

[-- Attachment #2: Type: text/html, Size: 930 bytes --]

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

* Re: Mathjax vs. problems with imagemagick
  2014-07-11 18:05             ` Nick Dokos
  2014-07-11 18:24               ` Joseph Vidal-Rosset
@ 2014-07-28 14:36               ` Sebastien Vauban
  1 sibling, 0 replies; 14+ messages in thread
From: Sebastien Vauban @ 2014-07-28 14:36 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Nick Dokos wrote:
> My org-latex-pdf-process setting is
>
>   (setq org-latex-pdf-process '("texi2dvi --shell-escape --pdf %f"))
>
> and I'm experimenting with
>
>   (setq org-latex-pdf-process '("latexmk --shell-escape -pdf -xelatex %f"))

FWIW, I do have:

    (setq org-latex-pdf-process
          (if (executable-find "latexmk")
              '("latexmk -CF -pdf %f && latexmk -c")
                                      ; must clean .fdb_latexmk, .fls, .ilg,
                                      ; .ind, etc.
            '("pdflatex -interaction=nonstopmode -output-directory=%o %f"
              "pdflatex -interaction=nonstopmode -output-directory=%o %f"
              "pdflatex -interaction=nonstopmode -output-directory=%o %f")))

Best regards,
  Seb

-- 
Sebastien Vauban

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

end of thread, other threads:[~2014-07-28 14:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-06  8:03 Mathjax vs. problems with imagemagick Joseph Vidal-Rosset
2014-07-06  8:39 ` briangpowell .
2014-07-06  8:59   ` Joseph Vidal-Rosset
2014-07-06 21:25 ` Nick Dokos
2014-07-08 13:01   ` Joseph Vidal-Rosset
2014-07-08 13:04     ` Joseph Vidal-Rosset
2014-07-08 13:44       ` Joseph Vidal-Rosset
2014-07-11  0:59     ` Nick Dokos
2014-07-11  7:38       ` Joseph Vidal-Rosset
2014-07-11 15:59         ` Nick Dokos
2014-07-11 16:06           ` Joseph Vidal-Rosset
2014-07-11 18:05             ` Nick Dokos
2014-07-11 18:24               ` Joseph Vidal-Rosset
2014-07-28 14:36               ` Sebastien Vauban

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