From: Edouard Debry <edouard.debry@gmail.com>
To: emacs-orgmode@gnu.org
Subject: latex block tikz to svg
Date: Mon, 17 Jan 2022 15:14:32 +0100 [thread overview]
Message-ID: <86r196motz.fsf@gmail.com> (raw)
Hello,
I experience some difficulties to export latex src block
consisting of tikz code to svg.
Here is for example the simple code I try to run with `C-c C-c` :
<==================================================>
#+HEADER: :file test1.png
#+HEADER: :imagemagick yes
#+HEADER: :exports results
#+HEADER: :results output silent graphics file
#+HEADER: :headers '("\\usepackage{tikz}")
#+HEADER: :fit yes :imoutoptions -geometry 400 :iminoptions -density 600
#+begin_src latex
\begin{tikzpicture} %
\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=1mm];
\end{tikzpicture}
#+end_src
<==================================================>
First of all, for this to work I have to change `org-latex-pdf-process`
to ("latexmk.exe -pdf -f %f -cd %o"), which unfortunately breaks the
latex to pdf export of org files (C-c C-e l o/p).
Then, it works when image file format is png. However, a close look of
the pdflatex output shows this error :
<====================================================================>
=== TeX engine is 'pdfTeX'
Latexmk: All targets (latex-JEShjO.pdf) are up-to-date
Rule 'pdflatex': File changes, etc:
Changed files, or newly in use since previous run(s):
'd:/xxxx/Documents/utils/texlive/2021/texmf-dist/tex/latex/tools/.tex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'pdflatex -shell-escape -synctex=1 -interaction=nonstopmode -recorder "d:\xxxxxx\Documents\utils\texlive\2021\texmf-dist\tex\latex\tools\.tex"'
------------
Latexmk: applying rule 'pdflatex'...
This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2021/W32TeX) (preloaded format=pdflatex)
\write18 enabled.
entering extended mode
(d:/xxxxxx/Documents/utils/texlive/2021/texmf-dist/tex/latex/tools/.tex
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2022-01-12> File ignored)
! Emergency stop.
<*> ...exlive/2021/texmf-dist/tex/latex/tools/.tex
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on .log.
Failure to make '.pdf'
Collected error summary (may duplicate other messages):
pdflatex: Command for 'pdflatex' gave return code 1
Refer to '.log' for details
Latexmk: Undoing directory change
------------
Latexmk: Some operations failed, for the following tex file(s)
Latexmk: Examining '.log'
=== TeX engine is 'pdfTeX'
Latexmk: Errors, in force_mode: so I tried finishing targets
...xxxx\Documents\utils\texlive\2021\bin\win32\runscript.tlu:915: command failed with exit code 12:
perl.exe d:\xxxxxx\Documents\utils\texlive\2021\texmf-dist\scripts\latexmk\latexmk.pl -pdf -f "c:/Users/xxxxxx/AppData/Local/Temp/babel-B1S4gp/latex-JEShjO.tex" -cd "c:/Users/xxxxxx/AppData/Local/Temp/babel-B1S4gp/"
<=========================================================================================>
I wonder why it tries every time to compile a ".tex" file although the
temporary previous pdf file was correctly generated.
Finally, if I change "test1.png" to "test1.svg", such a svg file is
generated but with garbage in it.
I would like to find a way to generate svg images from latex src blocks
(using tikz) which works and is compatible with default orgmode settings
for latex export (at least does not break it)
Did you experience such issues ? do you have some workings settings and
examples ? I googled several times "org latex block tikz svg", but it is
difficult to guess how relevant are the elements found, some of them
seems quiet outdated. Hence my question on this mailing list
Regards
My configuration :
- windows 11
- emacs 29.0.50 (compiled master from a few days)
- orgmode (9.5.2)
- mingw64 : imagemagick
- texlive 2021 (installed from yesterday)
next reply other threads:[~2022-01-17 14:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-17 14:14 Edouard Debry [this message]
2022-01-17 16:01 ` latex block tikz to svg Juan Manuel Macías
2022-01-25 23:24 ` Edouard Debry
2022-04-18 13:23 ` Edouard Debry
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86r196motz.fsf@gmail.com \
--to=edouard.debry@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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 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.