3

The following example aims to produce an svg output, using tikz library animations.

% main.tex
\documentclass[tikz, dvisvgm]{standalone}
\usetikzlibrary{animations}
\begin{document}
\tikz \node
  :fill opacity = {0s="0", 5s="1"}
  :rotate = {6s="0", 10s="360", repeats, restart=false}
  [fill=blue!20, draw=blue, ultra thick, circle] {Hello!};
\end{document}

In the tex -> dvi/xdv process, xelatex -no-pdf main produces latex3 error

! LaTeX3 Error: Backend request inconsistent with engine: using 'xdvipdfmx'
(LaTeX3)        backend.

But both pdflatex -output-format=dvi main and lualatex -output-format=dvi main work fine. I am using

  • LaTeX2e <2020-02-02> patch level 2
  • L3 programming layer <2020-02-14>

This might be related to LaTeX2e release 2020-02-02, since in this release expl3 is packaged into latex format.

Question

Why the example works for both pdflatex and lualatex, but not xelatex? Is this a problem?

Workaround

Clear the latex3 inner macro storing backend name before \documentclass fixes the problem.

\ExplSyntaxOn
\str_clear:N \c_sys_backend_str
\ExplSyntaxOff
\documentclass[tikz, dvisvgm]{standalone}
... ...
5
  • Can dvisvgm handle a xdv from xelatex? – Ulrike Fischer Feb 19 '20 at 14:53
  • 1
    @UlrikeFischer Yes. dvisvgm recognizes xdv as dvi version 5 to 7. With the workaround, dvisvgm produces valid svg from xdv. – muzimuzhi Z Feb 19 '20 at 14:58
  • Then we should allow for this. Add an issue to the latex3 tracker at GitHub. – Ulrike Fischer Feb 19 '20 at 15:03
  • What do you gain by using xelatex compared to dvilualatex? – Ulrike Fischer Feb 19 '20 at 15:45
  • @UlrikeFischer Added here github.com/latex3/latex3/issues/677. Currently and personally, no expected gain. I use xelatex by default since I need the xetex-only package xeCJK to handle Chinese. So I encounter the reported problem incidentally. – muzimuzhi Z Feb 19 '20 at 15:54
1

This problem has been reported to and fixed by latex3 [1]. The fix is contained in l3kernel 2020-02-21 [2].


[1] https://github.com/latex3/latex3/issues/677

[2] https://github.com/latex3/latex3/blob/2020-02-21/l3kernel/CHANGELOG.md#2020-02-21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.