* BUG?: org-preview-latex-default-process: imagemagick: cannot use latexmk -f pdf
@ 2024-08-15 7:18 Uwe Brauer via General discussions about Org-mode.
2024-08-15 17:53 ` Ihor Radchenko
0 siblings, 1 reply; 3+ messages in thread
From: Uwe Brauer via General discussions about Org-mode. @ 2024-08-15 7:18 UTC (permalink / raw)
To: emacs-orgmode
Hi
I prefer to open a new thread for this.
- I set org-preview-latex-default-process
--8<---------------cut here---------------start------------->8---
org-preview-latex-default-process is a variable defined in ‘org.el’.
Its value is ‘imagemagick’
--8<---------------cut here---------------end--------------->8---
- The corresponding latex-compiler is
--8<---------------cut here---------------start------------->8---
("pdflatex -interaction nonstopmode -output-directory %o %f")
--8<---------------cut here---------------end--------------->8---
- Take the simple example
--8<---------------cut here---------------start------------->8---
\begin{equation*}
A^{0}=
\begin{array}{cccc}
-m^{00}& 0 & 0 & 0\\
\hline
0 & 0 & &\\
0 & & & \\
0 & & & \\
\end{array}
\end{equation*}
--8<---------------cut here---------------end--------------->8---
The conversion works!
- Then I change the compiler to
--8<---------------cut here---------------start------------->8---
("latexmk -f -pdf -output-directory %o %f")
--8<---------------cut here---------------end--------------->8---
But, then I receive the following error:
--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (error "File \"/tmp/orgtexX2KSUz.pdf\" wasn’t produced. Please adjust ‘imagemagick’ part of ‘org-preview-latex-process-alist’.")
signal(error ("File \"/tmp/orgtexX2KSUz.pdf\" wasn’t produced. Please adjust ‘imagemagick’ part of ‘org-preview-latex-process-alist’."))
error("File \"/tmp/orgtexX2KSUz.pdf\" wasn't produced. Please adjust `imagemagick' part of `org-preview-latex-process-alist'.")
org-compile-file("/tmp/orgtexX2KSUz.tex" ("latexmk -f -pdf -output-directory %o %f") "pdf" "Please adjust `imagemagick' part of `org-preview-latex-process-alist'." #<buffer *Org Preview LaTeX Output*>)
org-create-formula-image("\\begin{equation*}\n A^{0}=\n \\begin{array}{cccc}\n -m^{00}& 0 & 0 & 0\\\\\n \\hline\n 0 & 0 & &\\\\\n 0 & & & \\\\\n 0 & & & \\\\\n \\end{array}\n\\end{equation*}\n" "/home/oub/ALLES/HGs/HG-Org/BUGS/ltximg/org-ltximg_..." (:foreground "black" :background "grey98" :scale 1.5 :html-foreground "Black" :html-background "Transparent" :html-scale 1 :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")) forbuffer imagemagick)
org-format-latex("ltximg/org-ltximg" 405 569 "/home/oub/ALLES/HGs/HG-Org/BUGS/" overlays nil forbuffer imagemagick)
org--latex-preview-region(405 569)
org-latex-preview(nil)
funcall-interactively(org-latex-preview nil)
call-interactively(org-latex-preview nil nil)
command-execute(org-latex-preview)
--8<---------------cut here---------------end--------------->8---
However the file generated /tmp/orgtexX2KSUz.tex
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage[usenames]{color}
\usepackage[numbered,framed]{matlab-prettifier}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
% Package longtable omitted
% Package wrapfig omitted
% Package rotating omitted
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{amssymb}
% Package capt-of omitted
% Package hyperref omitted
\pagestyle{empty} % do not remove
% The settings below are copied from fullpage.sty
\usepackage{a4wide}
\usepackage{mymathmatrix}
\usepackage{nicematrix}
\newcolumntype{C}{c}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{wasysym}
\usepackage{mdframed}
\addtolength{\topmargin}{-2.54cm}
\graphicspath{{./images/}}
\begin{document}
\definecolor{fg}{rgb}{0,0,0}%
\definecolor{bg}{rgb}{0.980392,0.980392,0.980392}%
\pagecolor{bg}%
{\color{fg}
\begin{equation*}
A^{0}=
\begin{array}{cccc}
-m^{00}& 0 & 0 & 0\\
\hline
0 & 0 & &\\
0 & & & \\
0 & & & \\
\end{array}
\end{equation*}
%
}
\end{document}
--8<---------------cut here---------------end--------------->8---
Can be perfectly compiled from the command line with
--8<---------------cut here---------------start------------->8---
latexmk -f -pdf
--8<---------------cut here---------------end--------------->8---
So I ask: is this a BUG?
Uwe Brauer
--
I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel
I strongly condemn Putin's war of aggression against Ukraine.
I support to deliver weapons to Ukraine's military.
I support the EU and NATO membership of Ukraine.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: BUG?: org-preview-latex-default-process: imagemagick: cannot use latexmk -f pdf
2024-08-15 7:18 BUG?: org-preview-latex-default-process: imagemagick: cannot use latexmk -f pdf Uwe Brauer via General discussions about Org-mode.
@ 2024-08-15 17:53 ` Ihor Radchenko
2024-08-15 19:42 ` Uwe Brauer
0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2024-08-15 17:53 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-orgmode
Uwe Brauer via "General discussions about Org-mode."
<emacs-orgmode@gnu.org> writes:
> - Take the simple example
> ...
> ...
> - Then I change the compiler to
> ("latexmk -f -pdf -output-directory %o %f")
>
> But, then I receive the following error:
> ...
I cannot reproduce. Things work on my side.
> Debugger entered--Lisp error: (error "File \"/tmp/orgtexX2KSUz.pdf\" wasn’t produced. Please adjust ‘imagemagick’ part of ‘org-preview-latex-process-alist’.")
You may examine *Org Preview LaTeX Output* buffer to see more details.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: BUG?: org-preview-latex-default-process: imagemagick: cannot use latexmk -f pdf
2024-08-15 17:53 ` Ihor Radchenko
@ 2024-08-15 19:42 ` Uwe Brauer
0 siblings, 0 replies; 3+ messages in thread
From: Uwe Brauer @ 2024-08-15 19:42 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Uwe Brauer, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]
>>> "IR" == Ihor Radchenko <yantar92@posteo.net> writes:
> Uwe Brauer via "General discussions about Org-mode."
> <emacs-orgmode@gnu.org> writes:
>> - Take the simple example
>> ...
>> ...
>> - Then I change the compiler to
>> ("latexmk -f -pdf -output-directory %o %f")
>>
>> But, then I receive the following error:
>> ...
> I cannot reproduce. Things work on my side.
You are not going to believe it, now it works.
BTW, but this does not really concern org vanilla, there is the org-mime package that allows to convert latex constructions into png, in a way similar to org-latex-preview,
But which does not allow to use imagemagick,
I will open an issue for that package, then
Thanks and regards
Uwe Brauer
--
I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel
I strongly condemn Putin's war of aggression against Ukraine.
I support to deliver weapons to Ukraine's military.
I support the EU and NATO membership of Ukraine.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5684 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-15 19:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-15 7:18 BUG?: org-preview-latex-default-process: imagemagick: cannot use latexmk -f pdf Uwe Brauer via General discussions about Org-mode.
2024-08-15 17:53 ` Ihor Radchenko
2024-08-15 19:42 ` Uwe Brauer
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).