Tikz 中的着色在 Plain Tex 中不起作用

Tikz 中的着色在 Plain Tex 中不起作用

我的 Plain Tex 代码无法使用阴影。我在 TexStudio 中使用 xetex.exe -synctex=1 -interaction=nonstopmode。没有错误消息或警告。但是,代码在 LaTex 上可以工作。有人能帮忙检查一下哪里出了问题吗?谢谢。

\input miniltx
\input eplain
\beginpackages
\usepackage{url}
\usepackage{color}
\usepackage{graphicx}
\endpackages
\input tikz
\usetikzlibrary{shadings, arrows.meta, calc}
%\input pgfplots
\input insbox



%\usepgfplotslibrary{polar}
\input font-change-xetex

\pdfpagewidth=210mm
\pdfpageheight=297mm
\hsize=170mm
\vsize=257mm
\hoffset=-5mm
\voffset=-5mm


\enablehyperlinks[dvipdfm] % Remember the hyperlink driver option here is essential, otherwise, the bwidth option cannot be used

\hlopts{colormodel=,color=blue!50!black, bwidth=0}

\def\nopagenumbers{\footline={\hfill}}

\myzfont{Arial}{11}{:+lnum}
%\mymathfont{Helvetica}{11}


        \tikzpicture[axis/.style ={line width=2pt, ->, >={latex}}]
        \newdimen\w
        \w=8cm
        \newdimen\h
        \h=8cm

        \shadedraw [upper right=red, lower left=green, local bounding box=proposal] (0.825\w,0.825\h) circle [ x radius = 0.2\w, y radius = 0.15\w]  node [opaque=0, text = black, text width = 0.3\w, align = flush center]{Proposed models};

        %($(mpm)!0.75!(proposal)$);
        %\draw [fill= red!30!blue] (0.95\w,0.95\h) --+ (-0.35\w,0) arc (180:270:0.35\w) --cycle node [below left, align = flush center, text width = 0.2\w, text = white]{Proposed model}; 
        \endtikzpicture
\bye

答案1

您必须先加载 atbegshi,因为它会被 \usepackage 命令混淆:

\input miniltx
\input eplain
\input atbegshi.sty %<----
\beginpackages
\usepackage{url}
\usepackage{color}
\usepackage{graphicx}
\endpackages

\input tikz
\usetikzlibrary{shadings, arrows.meta, calc}
%\input pgfplots
\input insbox



%\usepgfplotslibrary{polar}
\input font-change-xetex

\pdfpagewidth=210mm
\pdfpageheight=297mm
\hsize=170mm
\vsize=257mm
\hoffset=-5mm
\voffset=-5mm


\enablehyperlinks[dvipdfm] % Remember the hyperlink driver option here is essential, otherwise, the bwidth option cannot be used

\hlopts{colormodel=,color=blue!50!black, bwidth=0}

\def\nopagenumbers{\footline={\hfill}}

\myzfont{Arial}{11}{:+lnum}
%\mymathfont{Helvetica}{11}


        \tikzpicture[axis/.style ={line width=2pt, ->, >={latex}}]
        \newdimen\w
        \w=8cm
        \newdimen\h
        \h=8cm

        \shadedraw [upper right=red, lower left=green, local bounding box=proposal] (0.825\w,0.825\h) circle [ x radius = 0.2\w, y radius = 0.15\w]  node [opaque=0, text = black, text width = 0.3\w, align = flush center]{Proposed models};

        %($(mpm)!0.75!(proposal)$);
        %\draw [fill= red!30!blue] (0.95\w,0.95\h) --+ (-0.35\w,0) arc (180:270:0.35\w) --cycle node [below left, align = flush center, text width = 0.2\w, text = white]{Proposed model};
        \endtikzpicture
        

\bye

相关内容