all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 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

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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.