2

Environment:

Windows 10 (x64);
MiKTeX 2.9.7206-x64, GPL Ghostscript 9.25 (2018-09-13)
Shared TeX installation;
'animate' package 2019/08/22;
'dvisvgm' 2.6.3 (utility from MiKTeX);
2017/06/20 v1.0b dvisvgm graphics driver for latex (C:\Program Files\MiKTeX 2.9\tex\latex\graphics-def\dvisvgm.def)


I'm trying to compile an example from manual of Alexander Grahn :

\documentclass{article}
\usepackage{intcalc} %defines \intcalcMod for Modulo computation
\usepackage{animate}
\usepackage{graphicx}

\graphicspath{{files/}}

\newcounter{scarab}
\setcounter{scarab}{0}
\newcounter{blueline}
\setcounter{blueline}{101}
\newcounter{grayline}
\setcounter{grayline}{202}
%write timeline file
\newwrite\TimeLineFile
\immediate\openout\TimeLineFile=scarab.tln
\whiledo{\thescarab<101}{
\ifthenelse{\intcalcMod{\thescarab}{2}=0}{
%a gray line is added to every 2nd frame
\immediate\write\TimeLineFile{%
::\thegrayline x0;253;\thescarab x0,\theblueline}
\stepcounter{grayline}
}{
\immediate\write\TimeLineFile{%
::;253;\thescarab x0,\theblueline}
}
\stepcounter{scarab}
\stepcounter{blueline}
}
\immediate\closeout\TimeLineFile
%\DeclareGraphicsRule{.mps}{eps}{*}{}
\begin{document}
\begin{center}

\animategraphics[width=0.8\linewidth,
autoplay,controls,loop,timeline=scarab.tln]{12}{scarab_}{0}{253}
\end{center}
\end{document}

This source file can be converted to a PDF file without option 'dvisvgm' by any way, i.e. 'pdflatex' or 'latex' ---> 'dvips' ---> 'ps2pdf'. Result is Ok. But after adding this option (in '\documentclass[12pt,dvisvgm]{article}') the building DVI file becomes impossible (command line: latex file.tex):

! LaTeX Error: Unknown graphics extension: .mps.

l.35 ...ine=scarab.tln]{12}{scarab_}{0}{253}

If I insert

\DeclareGraphicsRule{.mps}{eps}{*}{}

Compilation aborted with:

! Undefined control sequence.
\pbs_pdflastann: ->\g_pbs_pdflastann_tl 

l.35 ...ine=scarab.tln]{12}{scarab_alter_}{0}{253}

Without option 'divsvgm' the utility dvisvgm creates only single svg file from DVI.
It says here that a similar problem has been solved by updating the TeXLive installation.
I wonder if someone can specify what needs to be updated in MiKTeX to get rid of this error.

P.S.

File list of successful compilation, with class option dvisvgm (AlexG):

 *File List*
 article.cls    2019/08/27 v1.4j Standard LaTeX document class
  size10.clo    2019/08/27 v1.4j Standard LaTeX file (size option)
 intcalc.sty    2016/05/16 v1.2 Expandable calculations with integers (HO)
 animate.sty    2019/08/20 PDF & SVG animations from files and inline graphics
 xkeyval.sty    2014/12/03 v2.7a package option processing (HA)
 xkeyval.tex    2014/12/03 v2.7a key=value parser (HA)
  ifthen.sty    2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
   ifpdf.sty    2019/10/25 v3.4 ifpdf legacy package. Use iftex instead.
   iftex.sty    2019/10/24 v1.0a TeX engine tests
ifluatex.sty    2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.
 ifxetex.sty    2019/10/25 v0.7 ifxetex legacy package. Use iftex instead.
 ifdraft.sty    2016/05/16 v1.4 Detect class options draft and final (HO)
    calc.sty    2017/05/25 v4.3 Infix arithmetic (KKT,FJ)
graphics.sty    2019/10/08 v1.3c Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg    2016/06/04 v1.11 sample graphics configuration
 dvisvgm.def    2017/06/20 v1.0b dvisvgm graphics driver for latex
zref-abspage.sty    2018/11/21 v2.27 Module abspage for zref (HO)
zref-base.sty    2018/11/21 v2.27 Module base for zref (HO)
 ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)
kvsetkeys.sty    2016/05/16 v1.17 Key value parser (HO)
etexcmds.sty    2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
kvdefinekeys.sty    2016/05/16 v1.4 Define keys (HO)
pdftexcmds.sty    2019/07/25 v0.30 Utility functions of pdfTeX for LuaTeX (HO)
 auxhook.sty    2016/05/16 v1.4 Hooks for auxiliary files (HO)
atbegshi.sty    2016/06/09 v1.18 At begin shipout hook (HO)
 pdfbase.sty    2019/11/04 v0.35 driver independent access to low-level PDF fea
tures
   expl3.sty    2019-10-28 L3 programming layer (loader) 
expl3-code.tex    2019-10-28 L3 programming layer 
l3deprecation.def    2019-04-06 v L3 Deprecated functions
l3backend-dvisvgm.def    2019-04-06 L3 backend support: dvisvgm
l3keys2e.sty    2019-10-11 LaTeX2e option processing using LaTeX3 keys
graphicx.sty    2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
files/scarab_0.mps
...
files/scarab_253.mps
 ***********

closed as off-topic by AlexG, Stefan Pinnow, Cragfelt, BambOo, Tiuri Nov 8 at 17:19

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • I have an error too, but not the same: ! LaTeX Error: File ifxetex.sty not found. – AndréC Nov 3 at 17:57
  • 1
    @AndréC According to the animate manual, you need to process scarab.mp with mpost --tex=latex first. It creates the missing .mps files. – Martin Nov 3 at 19:31
  • 1
    @AndréC Repository version of pdfbase.sty is needed. View SVG here. Note that Firefox is too slow, use Chrome or Chromium instead. – AlexG Nov 4 at 14:00
  • 1
    Many thanks to @AlexG and @Martin for their help! The problem was created by the absence of a variable prologues in my old Metapost file. It's not related to MiKTeX. It was a very difficult investigation... Thnks! – nailer Nov 6 at 20:41
  • 4
    I'm voting to close this question as off-topic because the problem it addresses was caused by using an old package version. – AlexG Nov 8 at 10:07