PDF 스페셜을 dvisvgm에 어떻게 전달할 수 있습니까?

PDF 스페셜을 dvisvgm에 어떻게 전달할 수 있습니까?

dvisvgm 문서에서:

SUPPORTED SPECIALS
       dvisvgm supports several special commands that enrich the DVI command set with additional
       instructions for features, like color, graphics, and hyperlinks. The term special command,
       or just special, originates from the TeX command \special{...} which does almost nothing.

[...]

       dvisvgm
           dvisvgm offers its own small set of specials. The following list gives a brief
           overview.

           dvisvgm:raw text
               Adds an arbitrary sequence of XML nodes to the page section of the SVG document.
               dvisvgm checks syntax and proper nesting of the inserted elements but does not
               perform any validation, thus the user has to ensure that the resulting SVG is
               still valid. Opening and closing tags may be distributed among different raw
               specials. The tags themselves can also be split but must be continued with the
               immediately following raw special. Both syntactically incorrect and wrongly nested
               tags lead to error messages. Parameter text may also contain the expressions {?x},
               {?y}, {?color}, and {?matrix} that expand to the current x or y coordinate, the
               current color, and current transformation matrix, respectively. Character sequence
               {?nl} expands to a newline character. Finally, constructions of the form {?(expr)}
               enable the evaluation of mathematical expressions which may consist of basic
               arithmetic operations including modulo. Like above, the variables x and y
               represent the current coordinates. Example: {?(-10*(x+2y)-5)}.

다음 TeX 파일을 DVI로 컴파일하면 dvisvgm을 사용하여 SVG로 변환합니다.

\pdfoutput=0
\pdfcompresslevel=0
\pdfobjcompresslevel=0
\documentclass{article}
\usepackage[active, tightpage]{preview}
\usepackage{tikz}
\pagenumbering{gobble}
\begin{document}
\begin{preview}
\special{dvisvgm:raw <g id='abc'>}
\begin{tikzpicture}
\draw (0,0) circle (1);
\end{tikzpicture}
\special{dvisvgm:raw </g>}
\end{preview}
\end{document}

dvisvgm --output=main.svg main.dvi

그런 다음 SVG 출력은 ​​다음과 같습니다.

<?xml version='1.0' encoding='UTF-8'?>
<!-- This file was generated by dvisvgm 3.1.2 -->
<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='57.0899pt' height='57.0899pt' viewBox='-.00005 -57.08985 57.0899 57.0899'>
<g id='page1'>
<g id='abc'>
<path d='M56.8906-28.546875C56.8906-44.2031 44.2031-56.8906 28.546875-56.8906C12.8906-56.8906 .1992-44.2031 .1992-28.546875C.1992-12.8906 12.8906-.1992 28.546875-.1992C44.2031-.1992 56.8906-12.8906 56.8906-28.546875Z' stroke='#000' fill='none' stroke-width='.3985'/>
</g>
</g>
</svg>

중요한 부분은 명명된 그룹이 abc출력에 포함된다는 것입니다.

이제 동일한 작업을 시도하지만 PDF를 통과합니다.

\pdfoutput=1
\pdfcompresslevel=0
\pdfobjcompresslevel=0
\documentclass{article}
\usepackage[active, tightpage]{preview}
\usepackage{tikz}
\pagenumbering{gobble}
\begin{document}
\begin{preview}
\special{pdf:dvisvgm:raw <g id='abc'>}
\begin{tikzpicture}
\draw (0,0) circle (1);
\end{tikzpicture}
\special{pdf:dvisvgm:raw </g>}
\end{preview}
\end{document}

특별 상품은 예상대로 PDF에 포함되어 있습니다.

%PDF-1.5
%ÐÔÅØ
6 0 obj
<<
/Length 392       
>>
stream
1 0 0 1 0.5 57.591 cm
dvisvgm:raw <g id='abc'>
1 0 0 1 28.546 -28.545 cm
q 
0 G 
0 g 
0.3985 w 
q 
0.0 0.0 m 

그런 다음 SVG를 PDF로 변환합니다.

dvisvgm --pdf --output=main.svg main.pdf

하지만 SVG에는 원하는 태그가 포함되어 있지 않습니다.

질문:TeX → PDF → SVG 컴파일을 하고 TeX 소스 코드에 원시 SVG 태그를 지정하여 최종 SVG 파일에 삽입할 수 있습니까?(TeX → DVI → SVG 컴파일에서 했던 것과 똑같습니다)?

관련 정보