make4ht가 TikZ 사진으로 컴파일할 수 없습니다

make4ht가 TikZ 사진으로 컴파일할 수 없습니다

만드는데 어려움을 겪고 있어요make4ht함께 일하다틱즈 사진. 내 컴퓨터는 Mac M1 Sonoma 14.2.1이고 내 컴퓨터에는 TeX Live 2024 및 Ghostscript 10.03.0이 있습니다.

lualatex --version
This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)

gs --version
10.03.0

다음 게시물을 읽었지만 안타깝게도 문제를 해결할 수 없었습니다.

  1. 왜?dvisvgm의내 컴퓨터에서 PostScript 지원이 비활성화되어 있습니까?https://dvisvgm.de/FAQ/
  2. MacTex 2023 및 'libgs'가 설치된 경우 'dvisvgm'이 'libgs'를 감지하지 못함 - MacOS 12.7.2(Monterey)

그래서 내가 달릴 때 dvisvgm -V1나는 그렇게 한다.~ 아니다GS 지원이 있습니다:

dvisvgm -V1
dvisvgm 3.2.2 (aarch64-apple-darwin20.6.0)
------------------------------------------
brotli:   1.1.0
clipper:  6.2.1
freetype: 2.13.2
kpathsea: 6.4.0
mutool:   1.23.11
potrace:  1.16
xxhash:   0.8.2
zlib:     1.3.1


echo $LIBGS
/usr/local/share/ghostscript/10.03.0/lib/libgs.dylib.10.03

이 문제는 최근 GitHub에서 다시 발생한 것 같습니다.https://github.com/mgieseki/dvisvgm/issues/267

MacPorts를 사용하지 않고 이에 대한 해결책을 찾은 사람이 있습니까? 저는 Homebrew를 가지고 있는데 다른 패키지 관리자를 갖고 싶지 않습니다.

문제를 보여주는 MWE는 다음과 같습니다.(에서 가져옴TeX4ht 및 Tikz에는 Ghostscript가 없습니다.):

\documentclass[11pt]{article}
\ifdefined\HCode
    \def\pgfsysdriver{pgfsys-dvisvgm4ht.def}
\fi

\usepackage{tikz}
\usepackage{amsmath}
\begin{document}

\section*{Tikz picture}
\begin{tikzpicture}
    \coordinate[label =above:$0$,   label =below:{$u=0$}] (A) at (0,0);
    \coordinate[label =above:$\pi$, label =below:{$u_x=0$}] (B) at (4,0);

    \draw (A) -- node[above] {$u_t = k u_{xx} $}  node[below] {$f(x)$} ++ (B);

    \node at (A)[circle,fill,inner sep=1pt]{};
    \node at (B)[circle,fill,inner sep=1pt]{};
\end{tikzpicture}

\end{document}

이는 다음에 저장되고 다음 test.tex과 같이 컴파일됩니다.

make4ht --lua test.tex "mathml, mathjax" 

(이 테스트에서는 lua가 쓸모가 없지만 실제 사례에는 필요할 것입니다.) 나는 얻다:

[STATUS]  make4ht: Conversion started
[STATUS]  make4ht: Input file: test.tex
pre-processing DVI file (format version 2)
processing of PostScript specials is disabled (Ghostscript not found)
processing page 2
  WARNING: 115 PostScript specials ignored. The resulting SVG might look wrong.
  graphic size: 46.321112pt x 10.949997pt (16.280009mm x 3.848484mm)
  output written to test0x.svg
1 of 3 pages converted in 0.209179 seconds
[STATUS]  make4ht: Conversion finished

pgfsys-dvisvgm.def대신 드라이버를 사용하면 pgfsys-dvisvgm4ht.def컴파일되지만 출력 그림이 올바르지 않습니다. 드라이버가 최신 버전입니다. 마지막으로 나는 트릭을 시도했다.MacTeX의 dvisvgm과 Ghostscript가 서로 통신하도록 만들기, 그러나 그것도 작동하지 않았습니다.

관련 정보