emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Uwe Brauer via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
To: emacs-orgmode@gnu.org
Subject: BUG?: org-preview-latex-default-process: imagemagick: cannot use latexmk -f pdf
Date: Thu, 15 Aug 2024 09:18:44 +0200	[thread overview]
Message-ID: <87le0yntij.fsf@mat.ucm.es> (raw)


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. 




             reply	other threads:[~2024-08-15  7:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-15  7:18 Uwe Brauer via General discussions about Org-mode. [this message]
2024-08-15 17:53 ` BUG?: org-preview-latex-default-process: imagemagick: cannot use latexmk -f pdf Ihor Radchenko
2024-08-15 19:42   ` Uwe Brauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87le0yntij.fsf@mat.ucm.es \
    --to=emacs-orgmode@gnu.org \
    --cc=oub@mat.ucm.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).