* Is ob-latex maintained ?
@ 2022-06-17 13:08 DEBRY.Edouard
2022-06-17 13:28 ` Fraga, Eric
0 siblings, 1 reply; 6+ messages in thread
From: DEBRY.Edouard @ 2022-06-17 13:08 UTC (permalink / raw)
To: Emacs-orgmode
Hello,
I had a couple of small issues when trying to export latex src block to
images.
Here is to fix ideas a src block :
<=====================================================================================>
#+HEADER: :file test1.png
#+HEADER: :exports results
#+HEADER: :results output silent graphics file
#+HEADER: :fit yes :noweb yes :headers '("\\usepackage{tikz}" "\\usetikzlibrary{backgrounds}")
#+begin_src latex
\begin{tikzpicture}[background rectangle/.style={fill=olive!30}, show background rectangle]
\draw[->] (-3,0) -- (-2,0) arc[radius=0.5cm,start angle=-180,end angle=0] (-1,0) -- (1,0) arc[radius=0.5cm,start angle=180,end angle=0] (2,0) -- (3,0);
\filldraw (-1.5,0) circle[radius=1mm];
\filldraw (1.5,0) circle[radius=3mm];
\end{tikzpicture}
#+end_src
<=====================================================================================>
When hitting [C-c C-c], it did produce an "test1.png" however, it was
not a png file but ... a svg one !
I figured out that the process goes through first condition of
"org-babel-execute:latex (body params)" function (around line 150).
This one relies on function "org-create-formula-image" which should
have the process-type in argument, either 'dvipng, 'dvisvgm or
'imagemagick. If not given, the default one is given which for me is set
to 'dvisvgm.
The "org-create-formula-image" should be given in arguments the backend
corresponding to the desired image format. I tried adding 'dvipng
explicitely but image generation fails, however doing it manually (latex
+ dvipng) works.
Does someone maintains "ob-latex" ? and could make things clearer.
Regards
___________________________________________________________________________________________________________________________________
This email and any attachments are confidential to the intended recipient and may also be privileged.
If you are not the intended recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person.
Ce courriel et ses pieces-jointes sont envoyes de maniere confidentielle et doivent etre traites avec attention.
Si vous n'etes pas le destinataire, merci de le detruire et d'en informer son auteur.
Vous ne devez pas copier, utiliser, reveler ou diffuser son contenu a quiconque.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is ob-latex maintained ?
2022-06-17 13:08 Is ob-latex maintained ? DEBRY.Edouard
@ 2022-06-17 13:28 ` Fraga, Eric
2022-06-17 13:48 ` DEBRY.Edouard
0 siblings, 1 reply; 6+ messages in thread
From: Fraga, Eric @ 2022-06-17 13:28 UTC (permalink / raw)
To: DEBRY.Edouard; +Cc: Emacs-orgmode
Have you tried adding the line:
#+options: tex:dvipng
to the file? (you may need to type C-c C-c on that line to refresh the
settings.) Would this solve your problem?
--
: Eric S Fraga, with org release_9.5.4-535-ged6f8d in Emacs 29.0.50
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is ob-latex maintained ?
2022-06-17 13:28 ` Fraga, Eric
@ 2022-06-17 13:48 ` DEBRY.Edouard
2022-06-17 14:47 ` Fraga, Eric
0 siblings, 1 reply; 6+ messages in thread
From: DEBRY.Edouard @ 2022-06-17 13:48 UTC (permalink / raw)
To: Org Mode List
Unfortunately not.
If I remember well, this setting is for math environments, whether you
want to preview them as png or svg, it does not work for src blocks.
"Fraga, Eric" <e.fraga@ucl.ac.uk> writes:
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Attention, ce courriel provient d'Internet. L'emetteur n'est peut-etre pas celui que vous pensez.
> Merci de considerer ce point en lisant ce courriel, avant d'y repondre, de cliquer sur
> les liens ou d'ouvrir les pieces jointes.
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Have you tried adding the line:
>
> #+options: tex:dvipng
>
> to the file? (you may need to type C-c C-c on that line to refresh the
> settings.) Would this solve your problem?
___________________________________________________________________________________________________________________________________
This email and any attachments are confidential to the intended recipient and may also be privileged.
If you are not the intended recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person.
Ce courriel et ses pieces-jointes sont envoyes de maniere confidentielle et doivent etre traites avec attention.
Si vous n'etes pas le destinataire, merci de le detruire et d'en informer son auteur.
Vous ne devez pas copier, utiliser, reveler ou diffuser son contenu a quiconque.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is ob-latex maintained ?
2022-06-17 13:48 ` DEBRY.Edouard
@ 2022-06-17 14:47 ` Fraga, Eric
2022-06-19 13:31 ` Edouard Debry
0 siblings, 1 reply; 6+ messages in thread
From: Fraga, Eric @ 2022-06-17 14:47 UTC (permalink / raw)
To: DEBRY.Edouard; +Cc: Org Mode List
On Friday, 17 Jun 2022 at 13:48, DEBRY.Edouard wrote:
> Unfortunately not.
>
> If I remember well, this setting is for math environments, whether you
> want to preview them as png or svg, it does not work for src blocks.
Well, my src blocks work although I use imagemagick and then have the
following extra settings for the LaTeX src blocks:
#+property: header-args:latex :fit yes :results file :exports results
#+property: header-args:latex+ :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 1200
If you have ImageMagick installed, maybe try this?
--
: Eric S Fraga, with org release_9.5.4-535-ged6f8d in Emacs 29.0.50
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is ob-latex maintained ?
2022-06-17 14:47 ` Fraga, Eric
@ 2022-06-19 13:31 ` Edouard Debry
2022-06-19 17:17 ` Thomas S. Dye
0 siblings, 1 reply; 6+ messages in thread
From: Edouard Debry @ 2022-06-19 13:31 UTC (permalink / raw)
To: Org Mode List
Indeed, you can make the src block work (produce a png) by adding
imagemagick in the src block. It works because the generation process
is completely different.
But my main concern is that there is a bug in "ob-latex" : when you want
to produce a png without imagemagick, either it does not work, although
it should, or it produces a svg !
By the way, I did ask on this mailing list a previous question about
generating svg from tikz/latex src blocks. It did not work with
imagemagick, but it works well without (also with htlatex), provided
your default settings is 'dvisvgm.
This is also why I wonder if there is a maintainer for "ob-latex", such
previously mentioned bug should/could be corrected.
Regards
"Fraga, Eric" <e.fraga@ucl.ac.uk> writes:
> On Friday, 17 Jun 2022 at 13:48, DEBRY.Edouard wrote:
>> Unfortunately not.
>>
>> If I remember well, this setting is for math environments, whether you
>> want to preview them as png or svg, it does not work for src blocks.
>
> Well, my src blocks work although I use imagemagick and then have the
> following extra settings for the LaTeX src blocks:
>
> #+property: header-args:latex :fit yes :results file :exports results
> #+property: header-args:latex+ :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 1200
>
> If you have ImageMagick installed, maybe try this?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is ob-latex maintained ?
2022-06-19 13:31 ` Edouard Debry
@ 2022-06-19 17:17 ` Thomas S. Dye
0 siblings, 0 replies; 6+ messages in thread
From: Thomas S. Dye @ 2022-06-19 17:17 UTC (permalink / raw)
To: Edouard Debry; +Cc: emacs-orgmode
Aloha Edouard,
According to the table of core languages supported by Babel,
https://orgmode.org/worg/org-contrib/babel/languages/index.html,
there is no maintainer for ob-latex.
The information in the table is taken from the ob-*.el files,
which indicate a maintainer if there is one.
hth,
Tom
Edouard Debry <edouard.debry@gmail.com> writes:
> Indeed, you can make the src block work (produce a png) by
> adding
> imagemagick in the src block. It works because the generation
> process
> is completely different.
>
> But my main concern is that there is a bug in "ob-latex" : when
> you want
> to produce a png without imagemagick, either it does not work,
> although
> it should, or it produces a svg !
>
> By the way, I did ask on this mailing list a previous question
> about
> generating svg from tikz/latex src blocks. It did not work with
> imagemagick, but it works well without (also with htlatex),
> provided
> your default settings is 'dvisvgm.
>
> This is also why I wonder if there is a maintainer for
> "ob-latex", such
> previously mentioned bug should/could be corrected.
>
> Regards
>
> "Fraga, Eric" <e.fraga@ucl.ac.uk> writes:
>
>> On Friday, 17 Jun 2022 at 13:48, DEBRY.Edouard wrote:
>>> Unfortunately not.
>>>
>>> If I remember well, this setting is for math environments,
>>> whether you
>>> want to preview them as png or svg, it does not work for src
>>> blocks.
>>
>> Well, my src blocks work although I use imagemagick and then
>> have the
>> following extra settings for the LaTeX src blocks:
>>
>> #+property: header-args:latex :fit yes :results file :exports
>> results
>> #+property: header-args:latex+ :imagemagick yes :iminoptions
>> -density 600 :imoutoptions -geometry 1200
>>
>> If you have ImageMagick installed, maybe try this?
--
Thomas S. Dye
https://tsdye.online/tsdye
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-06-19 17:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-17 13:08 Is ob-latex maintained ? DEBRY.Edouard
2022-06-17 13:28 ` Fraga, Eric
2022-06-17 13:48 ` DEBRY.Edouard
2022-06-17 14:47 ` Fraga, Eric
2022-06-19 13:31 ` Edouard Debry
2022-06-19 17:17 ` Thomas S. Dye
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).