2

My problem follows on from the question posed by JansthcirlU and from the response by Marijn (Converting equations to images). I blindly copied Marijn's first MWE and it works perfectly on Overleaf. But I can't use it on Overleaf for my own project because of the compilation timeout, so I tried on my local installation (TexLive 2023 + TexMaker) and I'm getting the following error :

LaTeX Warning: File '{main-figure0}.png' not found on input line 53. ! Package pdftex.def Error: File 'main-figure0.png' not found: using draft setting.

Equations are well converted to pdf, but the pdf are not converted into png and I have 4 differents files for each equation : .dpth, .md5, .log and .pdf. As Marijn said, since I'm on Windows, I replaced rm -f to del and convert to magick inside the MWE but it still doesn't work. I also have the latest ImageMagick release installed and when I type where magick in Windows' cmd, I got the right path.

What do you think is the problem ?

Edit 1 : Here is the content of my .log file :

This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2024.2.26)  27 FEB 2024 14:11
entering extended mode
 \write18 enabled.
 %&-line parsing enabled.
**main.tex
(./main.tex
LaTeX2e <2023-11-01> patch level 1
L3 programming layer <2024-02-20>
(c:/texlive/2023/texmf-dist/tex/latex/base/article.cls
Document Class: article 2023/05/17 v1.4n Standard LaTeX document class
(c:/texlive/2023/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2023/05/17 v1.4n Standard LaTeX file (size option)
)
\c@part=\count188
\c@section=\count189
\c@subsection=\count190
\c@subsubsection=\count191
\c@paragraph=\count192
\c@subparagraph=\count193
\c@figure=\count194
\c@table=\count195
\abovecaptionskip=\skip48
\belowcaptionskip=\skip49
\bibindent=\dimen140
)
(c:/texlive/2023/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2023/05/13 v2.17o AMS math features
\@mathmargin=\skip50

For additional information on amsmath, use the `?' option. (c:/texlive/2023/texmf-dist/tex/latex/amsmath/amstext.sty Package: amstext 2021/08/26 v2.01 AMS text

(c:/texlive/2023/texmf-dist/tex/latex/amsmath/amsgen.sty File: amsgen.sty 1999/11/30 v2.0 generic functions @emptytoks=\toks17 \ex@=\dimen141 )) (c:/texlive/2023/texmf-dist/tex/latex/amsmath/amsbsy.sty Package: amsbsy 1999/11/29 v1.2d Bold Symbols \pmbraise@=\dimen142 ) (c:/texlive/2023/texmf-dist/tex/latex/amsmath/amsopn.sty Package: amsopn 2022/04/08 v2.04 operator names ) \inf@bad=\count196 LaTeX Info: Redefining \frac on input line 234. \uproot@=\count197 \leftroot@=\count198 LaTeX Info: Redefining \overline on input line 399. LaTeX Info: Redefining \colon on input line 410. \classnum@=\count199 \DOTSCASE@=\count266 LaTeX Info: Redefining \ldots on input line 496. LaTeX Info: Redefining \dots on input line 499. LaTeX Info: Redefining \cdots on input line 620. \Mathstrutbox@=\box51 \strutbox@=\box52 LaTeX Info: Redefining \big on input line 722. LaTeX Info: Redefining \Big on input line 723. LaTeX Info: Redefining \bigg on input line 724. LaTeX Info: Redefining \Bigg on input line 725. \big@size=\dimen143 LaTeX Font Info: Redeclaring font encoding OML on input line 743. LaTeX Font Info: Redeclaring font encoding OMS on input line 744. \macc@depth=\count267 LaTeX Info: Redefining \bmod on input line 905. LaTeX Info: Redefining \pmod on input line 910. LaTeX Info: Redefining \smash on input line 940. LaTeX Info: Redefining \relbar on input line 970. LaTeX Info: Redefining \Relbar on input line 971. \c@MaxMatrixCols=\count268 \dotsspace@=\muskip16 \c@parentequation=\count269 \dspbrk@lvl=\count270 \tag@help=\toks18 \row@=\count271 \column@=\count272 \maxfields@=\count273 \andhelp@=\toks19 \eqnshift@=\dimen144 \alignsep@=\dimen145 \tagshift@=\dimen146 \tagwidth@=\dimen147 \totwidth@=\dimen148 \lineht@=\dimen149 @envbody=\toks20 \multlinegap=\skip51 \multlinetaggap=\skip52 \mathdisplay@stack=\toks21 LaTeX Info: Redefining [ on input line 2953. LaTeX Info: Redefining ] on input line 2954. ) (c:/texlive/2023/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty (c:/texlive/2023/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty (c:/texlive/2023/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty (c:/texlive/2023/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex \pgfutil@everybye=\toks22 \pgfutil@tempdima=\dimen150 \pgfutil@tempdimb=\dimen151 ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def \pgfutil@abb=\box53 ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex (c:/texlive/2023/texmf-dist/tex/generic/pgf/pgf.revision.tex) Package: pgfrcs 2023-01-15 v3.1.10 (3.1.10) )) Package: pgf 2023-01-15 v3.1.10 (3.1.10)

(c:/texlive/2023/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty (c:/texlive/2023/texmf-dist/tex/latex/graphics/graphicx.sty Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR)

(c:/texlive/2023/texmf-dist/tex/latex/graphics/keyval.sty Package: keyval 2022/05/29 v1.15 key=value parser (DPC) \KV@toks@=\toks23 ) (c:/texlive/2023/texmf-dist/tex/latex/graphics/graphics.sty Package: graphics 2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR)

(c:/texlive/2023/texmf-dist/tex/latex/graphics/trig.sty Package: trig 2021/08/11 v1.11 sin cos tan (DPC) ) (c:/texlive/2023/texmf-dist/tex/latex/graphics-cfg/graphics.cfg File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration ) Package graphics Info: Driver file: pdftex.def on input line 107.

(c:/texlive/2023/texmf-dist/tex/latex/graphics-def/pdftex.def File: pdftex.def 2022/09/22 v1.2b Graphics/color driver for pdftex )) \Gin@req@height=\dimen152 \Gin@req@width=\dimen153 ) (c:/texlive/2023/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty (c:/texlive/2023/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex Package: pgfsys 2023-01-15 v3.1.10 (3.1.10)

(c:/texlive/2023/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex \pgfkeys@pathtoks=\toks24 \pgfkeys@temptoks=\toks25

(c:/texlive/2023/texmf-dist/tex/generic/pgf/utilities/pgfkeyslibraryfiltered.co de.tex \pgfkeys@tmptoks=\toks26 )) \pgf@x=\dimen154 \pgf@y=\dimen155 \pgf@xa=\dimen156 \pgf@ya=\dimen157 \pgf@xb=\dimen158 \pgf@yb=\dimen159 \pgf@xc=\dimen160 \pgf@yc=\dimen161 \pgf@xd=\dimen162 \pgf@yd=\dimen163 \w@pgf@writea=\write3 \r@pgf@reada=\read2 \c@pgf@counta=\count274 \c@pgf@countb=\count275 \c@pgf@countc=\count276 \c@pgf@countd=\count277 \t@pgf@toka=\toks27 \t@pgf@tokb=\toks28 \t@pgf@tokc=\toks29 \pgf@sys@id@count=\count278 (c:/texlive/2023/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg File: pgf.cfg 2023-01-15 v3.1.10 (3.1.10) ) Driver file for pgf: pgfsys-pdftex.def

(c:/texlive/2023/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def File: pgfsys-pdftex.def 2023-01-15 v3.1.10 (3.1.10)

(c:/texlive/2023/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def File: pgfsys-common-pdf.def 2023-01-15 v3.1.10 (3.1.10) ))) (c:/texlive/2023/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex File: pgfsyssoftpath.code.tex 2023-01-15 v3.1.10 (3.1.10) \pgfsyssoftpath@smallbuffer@items=\count279 \pgfsyssoftpath@bigbuffer@items=\count280 ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex File: pgfsysprotocol.code.tex 2023-01-15 v3.1.10 (3.1.10) )) (c:/texlive/2023/texmf-dist/tex/latex/xcolor/xcolor.sty Package: xcolor 2023/11/15 v3.01 LaTeX color extensions (UK)

(c:/texlive/2023/texmf-dist/tex/latex/graphics-cfg/color.cfg File: color.cfg 2016/01/02 v1.6 sample color configuration ) Package xcolor Info: Driver file: pdftex.def on input line 274.

(c:/texlive/2023/texmf-dist/tex/latex/graphics/mathcolor.ltx) Package xcolor Info: Model cmy' substituted bycmy0' on input line 1350. Package xcolor Info: Model hsb' substituted byrgb' on input line 1354. Package xcolor Info: Model RGB' extended on input line 1366. Package xcolor Info: ModelHTML' substituted by rgb' on input line 1368. Package xcolor Info: ModelHsb' substituted by hsb' on input line 1369. Package xcolor Info: ModeltHsb' substituted by hsb' on input line 1370. Package xcolor Info: ModelHSB' substituted by hsb' on input line 1371. Package xcolor Info: ModelGray' substituted by gray' on input line 1372. Package xcolor Info: Modelwave' substituted by `hsb' on input line 1373. ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex Package: pgfcore 2023-01-15 v3.1.10 (3.1.10)

(c:/texlive/2023/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex (c:/texlive/2023/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex) (c:/texlive/2023/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex \pgfmath@dimen=\dimen164 \pgfmath@count=\count281 \pgfmath@box=\box54 \pgfmath@toks=\toks30 \pgfmath@stack@operand=\toks31 \pgfmath@stack@operation=\toks32 ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex) (c:/texlive/2023/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.te x) (c:/texlive/2023/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric .code.tex) (c:/texlive/2023/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.t ex) (c:/texlive/2023/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison.co de.tex) (c:/texlive/2023/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code.tex ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.te x) (c:/texlive/2023/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithm etics.code.tex) (c:/texlive/2023/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex) (c:/texlive/2023/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex \c@pgfmathroundto@lastzeros=\count282 )) (c:/texlive/2023/texmf-dist/tex/generic/pgf/math/pgfint.code.tex) (c:/texlive/2023/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex File: pgfcorepoints.code.tex 2023-01-15 v3.1.10 (3.1.10) \pgf@picminx=\dimen165 \pgf@picmaxx=\dimen166 \pgf@picminy=\dimen167 \pgf@picmaxy=\dimen168 \pgf@pathminx=\dimen169 \pgf@pathmaxx=\dimen170 \pgf@pathminy=\dimen171 \pgf@pathmaxy=\dimen172 \pgf@xx=\dimen173 \pgf@xy=\dimen174 \pgf@yx=\dimen175 \pgf@yy=\dimen176 \pgf@zx=\dimen177 \pgf@zy=\dimen178 ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.cod e.tex File: pgfcorepathconstruct.code.tex 2023-01-15 v3.1.10 (3.1.10) \pgf@path@lastx=\dimen179 \pgf@path@lasty=\dimen180 ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.te x File: pgfcorepathusage.code.tex 2023-01-15 v3.1.10 (3.1.10) \pgf@shorten@end@additional=\dimen181 \pgf@shorten@start@additional=\dimen182 ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex File: pgfcorescopes.code.tex 2023-01-15 v3.1.10 (3.1.10) \pgfpic=\box55 \pgf@hbox=\box56 \pgf@layerbox@main=\box57 \pgf@picture@serial@count=\count283 ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code .tex File: pgfcoregraphicstate.code.tex 2023-01-15 v3.1.10 (3.1.10) \pgflinewidth=\dimen183 ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.c ode.tex File: pgfcoretransformations.code.tex 2023-01-15 v3.1.10 (3.1.10) \pgf@pt@x=\dimen184 \pgf@pt@y=\dimen185 \pgf@pt@temp=\dimen186 ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex File: pgfcorequick.code.tex 2023-01-15 v3.1.10 (3.1.10) ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex File: pgfcoreobjects.code.tex 2023-01-15 v3.1.10 (3.1.10) ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.co de.tex File: pgfcorepathprocessing.code.tex 2023-01-15 v3.1.10 (3.1.10) ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex File: pgfcorearrows.code.tex 2023-01-15 v3.1.10 (3.1.10) \pgfarrowsep=\dimen187 ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex File: pgfcoreshade.code.tex 2023-01-15 v3.1.10 (3.1.10) \pgf@max=\dimen188 \pgf@sys@shading@range@num=\count284 \pgf@shadingcount=\count285 ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex File: pgfcoreimage.code.tex 2023-01-15 v3.1.10 (3.1.10) ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex File: pgfcoreexternal.code.tex 2023-01-15 v3.1.10 (3.1.10) \pgfexternal@startupbox=\box58 ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex File: pgfcorelayers.code.tex 2023-01-15 v3.1.10 (3.1.10) ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code .tex File: pgfcoretransparency.code.tex 2023-01-15 v3.1.10 (3.1.10) ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex File: pgfcorepatterns.code.tex 2023-01-15 v3.1.10 (3.1.10) ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex File: pgfcorerdf.code.tex 2023-01-15 v3.1.10 (3.1.10) ))) (c:/texlive/2023/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.te x File: pgfmoduleshapes.code.tex 2023-01-15 v3.1.10 (3.1.10) \pgfnodeparttextbox=\box59 ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex File: pgfmoduleplot.code.tex 2023-01-15 v3.1.10 (3.1.10) ) (c:/texlive/2023/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.st y Package: pgfcomp-version-0-65 2023-01-15 v3.1.10 (3.1.10) \pgf@nodesepstart=\dimen189 \pgf@nodesepend=\dimen190 ) (c:/texlive/2023/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.st y Package: pgfcomp-version-1-18 2023-01-15 v3.1.10 (3.1.10) )) (c:/texlive/2023/texmf-dist/tex/latex/pgf/utilities/pgffor.sty (c:/texlive/2023/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty (c:/texlive/2023/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex)) (c:/texlive/2023/texmf-dist/tex/latex/pgf/math/pgfmath.sty (c:/texlive/2023/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex)) (c:/texlive/2023/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex Package: pgffor 2023-01-15 v3.1.10 (3.1.10) \pgffor@iter=\dimen191 \pgffor@skip=\dimen192 \pgffor@stack=\toks33 \pgffor@toks=\toks34 )) (c:/texlive/2023/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex Package: tikz 2023-01-15 v3.1.10 (3.1.10)

(c:/texlive/2023/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.co de.tex File: pgflibraryplothandlers.code.tex 2023-01-15 v3.1.10 (3.1.10) \pgf@plot@mark@count=\count286 \pgfplotmarksize=\dimen193 ) \tikz@lastx=\dimen194 \tikz@lasty=\dimen195 \tikz@lastxsaved=\dimen196 \tikz@lastysaved=\dimen197 \tikz@lastmovetox=\dimen198 \tikz@lastmovetoy=\dimen199 \tikzleveldistance=\dimen256 \tikzsiblingdistance=\dimen257 \tikz@figbox=\box60 \tikz@figbox@bg=\box61 \tikz@tempbox=\box62 \tikz@tempbox@bg=\box63 \tikztreelevel=\count287 \tikznumberofchildren=\count288 \tikznumberofcurrentchild=\count289 \tikz@fig@count=\count290

(c:/texlive/2023/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex File: pgfmodulematrix.code.tex 2023-01-15 v3.1.10 (3.1.10) \pgfmatrixcurrentrow=\count291 \pgfmatrixcurrentcolumn=\count292 \pgf@matrix@numberofcolumns=\count293 ) \tikz@expandcount=\count294

(c:/texlive/2023/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzli brarytopaths.code.tex File: tikzlibrarytopaths.code.tex 2023-01-15 v3.1.10 (3.1.10) ))) (c:/texlive/2023/texmf-dist/tex/latex/pgf/frontendlayer/libraries/tikzlibraryex ternal.code.tex (c:/texlive/2023/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO )

(c:/texlive/2023/texmf-dist/tex/generic/infwarerr/infwarerr.sty Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO) ) (c:/texlive/2023/texmf-dist/tex/generic/iftex/iftex.sty Package: iftex 2022/02/03 v1.0f TeX engine tests ) (c:/texlive/2023/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty Package: ltxcmds 2023-12-04 v1.26 LaTeX kernel commands for general use (HO) ) Package pdftexcmds Info: \pdf@primitive is available. Package pdftexcmds Info: \pdf@ifprimitive is available. Package pdftexcmds Info: \pdfdraftmode found. ) (c:/texlive/2023/texmf-dist/tex/latex/base/atveryend-ltx.sty Package: atveryend-ltx 2020/08/19 v1.0a Emulation of the original atveryend pac kage with kernel methods ) (c:/texlive/2023/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzex ternalshared.code.tex)) \openout3 = `main.auxlock'.

\c@pngeq=\count295

(c:/texlive/2023/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def File: l3backend-pdftex.def 2024-02-20 L3 backend support: PDF output (pdfTeX) \l__color_backend_stack_int=\count296 \l__pdf_internal_box=\box64 ) (./main.aux) \openout1 = `main.aux'.

LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 47. LaTeX Font Info: ... okay on input line 47. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 47. LaTeX Font Info: ... okay on input line 47. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 47. LaTeX Font Info: ... okay on input line 47. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 47. LaTeX Font Info: ... okay on input line 47. LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 47. LaTeX Font Info: ... okay on input line 47. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 47. LaTeX Font Info: ... okay on input line 47. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 47. LaTeX Font Info: ... okay on input line 47. (c:/texlive/2023/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] \scratchcounter=\count297 \scratchdimen=\dimen258 \scratchbox=\box65 \nofMPsegments=\count298 \nofMParguments=\count299 \everyMPshowfont=\toks35 \MPscratchCnt=\count300 \MPscratchDim=\dimen259 \MPnumerator=\count301 \makeMPintoPDFobject=\count302 \everyMPtoPDFconversion=\toks36 ) (c:/texlive/2023/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4 85.

(c:/texlive/2023/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv e )) ===== Image 'main-figure0' is up-to-date. ======

LaTeX Warning: File `{main-figure0}.png' not found on input line 53.

! Package pdftex.def Error: File `main-figure0.png' not found: using draft sett ing.

See the pdftex.def package documentation for explanation. Type H <return> for immediate help. ...

l.53 }

Try typing <return> to proceed. If that doesn't work, type X <return> to quit.

Overfull \hbox (5.2577pt too wide) in paragraph at lines 53--54 [][] []

Underfull \hbox (badness 10000) in paragraph at lines 53--54

[]

===== Image 'main-figure1' is up-to-date. ======

LaTeX Warning: File `{main-figure1}.png' not found on input line 60.

! Package pdftex.def Error: File `main-figure1.png' not found: using draft sett ing.

See the pdftex.def package documentation for explanation. Type H <return> for immediate help. ...

l.60 }

Try typing <return> to proceed. If that doesn't work, type X <return> to quit.

Overfull \hbox (5.2577pt too wide) in paragraph at lines 60--61 [][] []

Underfull \hbox (badness 10000) in paragraph at lines 60--61

[]

[1

{c:/texlive/2023/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./main.aux)


LaTeX2e <2023-11-01> patch level 1 L3 programming layer <2024-02-20>


) Here is how much of TeX's memory you used: 13144 strings out of 474136 272862 string characters out of 5748496 1927190 words of memory out of 5000000 35268 multiletter control sequences out of 15000+600000 559296 words of font info for 41 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 102i,5n,107p,541b,241s stack positions out of 10000i,1000n,20000p,200000b,200000s <c:/texlive/2023/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb><c:/tex live/2023/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb><c:/texlive/2023 /texmf-dist/fonts/type1/public/amsfonts/cm/cmmi7.pfb><c:/texlive/2023/texmf-dis t/fonts/type1/public/amsfonts/cm/cmr10.pfb><c:/texlive/2023/texmf-dist/fonts/ty pe1/public/amsfonts/cm/cmtt10.pfb> Output written on main.pdf (1 page, 57436 bytes). PDF statistics: 36 PDF objects out of 1000 (max. 8388607) 22 compressed objects within 1 object stream 0 named destinations out of 1000 (max. 500000) 13 words of extra memory for PDF output out of 10000 (max. 10000000)

Edit 2 : I've partially solved the problem. It seems that Ghostscript is needed in order to rasterize vector files such as PDF (https://stackoverflow.com/questions/32466112/imagemagick-convert-pdf-to-jpeg-failedtoexecutecommand-gswin32c-exe-pdfdel). Now, when I try to manually convert a .pdf equation (main-figure0.pdf for example) using magick -density 300 "main-figure0.pdf" "main-figure0.png" in cmd, it's working. But the MWE still doesn't work, so it seems that magick command can't be executed inside a LaTex script and I don't know why. However, when I manually converted the .pdf files to .png files, the script ran smoothly. Here is the actual MWE with modifications to work on Windows :

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{external}
\tikzexternalize

\tikzset{% % Add size information to the .dpth file (png is in density not size) /pgf/images/external info, % Use the png export AND the import use png/.style={png export,png import}, png export/.style={ external/system call=% {pdflatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource";% magick -density 300 "\image.pdf" "\image.png"; del "\image.pdf"}, }, png import/.code={% \tikzset{% /pgf/images/include external/.code={% % Here you can alter to whatever you want % \pgfexternalwidth is only available if /pgf/images/external info % is set \includegraphics% [width=\pgfexternalwidth,height=\pgfexternalheight]% {{##1}.png}% }% }% }% } \newcounter{pngeq} \setcounter{pngeq}{0} \newcommand{\pngequation}[1]{% \tikzset{use png} \begin{tikzpicture} \node (eq) { \hspace{-1.1\parindent}\begin{minipage}{\textwidth}% \setcounter{equation}{\number\value{pngeq}} \begin{equation} #1 \end{equation} \end{minipage} }; \end{tikzpicture}% \stepcounter{pngeq} }

\begin{document} \section{Linear equation through a point given its gradient} A very simple differential equation is to find a linear equation through a particular point $P(x_i,y_i)$ given its gradient $k_i$ (or more commonly used for lines, its slope).

\pngequation{ \frac{dy}{dx} = k_i \iff \int dy = \int k_i \cdot dx \iff y = k_i \cdot x + C }

Plug in the initial conditions to find the particular value of the constant of integration $C$.

\pngequation{ \frac{dy}{dx} = k_i \iff \int dy = \int k_i \cdot dx \iff y = k_i \cdot x + C' } \end{document}

If anyone can spot why the script does't want to convert .pdf file to .png file, I'm all ears.

Chakrastyl
  • 21
  • 4
  • 1
    Are you compiling with shell-escape enabled? Can you show the first couple of lines of your .log file? – samcarter_is_at_topanswers.xyz Feb 27 '24 at 13:21
  • @samcarter_is_at_topanswers.xyz Yes I enable shell-escape, here is the first lines of my .log file :

    This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2024.2.26) 27 FEB 2024 14:11 entering extended mode \write18 enabled.

    I also tried with the command line (also with shell-escape) and I got the same result.

    – Chakrastyl Feb 27 '24 at 13:23
  • Good. Can you show your complete .log file in your question? – samcarter_is_at_topanswers.xyz Feb 27 '24 at 13:26
  • @samcarter_is_at_topanswers.xyz I'll edit the question to show my entire .log file – Chakrastyl Feb 27 '24 at 13:27
  • Thanks! I can't see anything which stands out. Maybe if a windows user sees your question, they can see something. – samcarter_is_at_topanswers.xyz Feb 27 '24 at 15:25
  • If you typed where convert but changed convert to magick, something seems awry. If magick is the right command to use on Windows, I'd assume you'd want where magick. On the other hand, if convert is available, maybe you should be using that? – cfr Feb 27 '24 at 17:19
  • @cfr You're totally right, but it doesn't change the problem. Indeed, the where convert was not refering to ImageMagick path but to Windows's convert. However, I tried where magickand it showed the ImageMagick command path. So magick seems to be the right command here on Windows. – Chakrastyl Feb 27 '24 at 21:23
  • 1
    Hopefully somebody on Windows will happen by. The code compiles OK for me, but 'install Linux' probably isn't the answer you're looking for :). – cfr Feb 27 '24 at 21:30
  • @cfr Thanks, I found the beginning of an answer and I edited my question. Again, it seems that it is a problem related to Windows. – Chakrastyl Feb 27 '24 at 21:47

0 Answers0