pdflatex
当我使用 Tikz 3D Plot 和版本编译这个最小示例时pdfTeX 3.141592653-2.6-1.40.25 (TeX Live 2023/Arch Linux)
,我得到了一系列“缺少字符:nullfont 中没有”。这是最小的例子:
\documentclass[]{article}
\usepackage{tikz,tikz-3dplot}
\usetikzlibrary{calc}
\tdplotsetmaincoords{70}{110}
\begin{document}
\begin{tikzpicture}
\node (P1) at (-5.0, -1.0) {};
\node (P2) at (5.0, 1.0) {};
\clip (P1) rectangle (P2);
\shade[ball color=blue] (0, 0) circle (1);
\pgfmathsetmacro{\rt}{10}
\pgfmathsetmacro{\start}{(90/32)*(-16)}
\pgfmathsetmacro{\angle}{(90/32)*(\rt-16)}
\pgfmathsetmacro{\cstart}{cos(\start)}
\pgfmathsetmacro{\sstart}{sin(\start)}
\pgfmathsetmacro{\cangle}{cos(\angle)}
\pgfmathsetmacro{\sangle}{sin(\angle)}
\begin{scope}[tdplot_main_coords]
\tdplotdefinepoints(0,0,0)(\cstart,\sstart,0)(\cangle,\sangle,0)
% FIXME: This is not working for some bizarre reason. It used to work in an older version!
\tdplotdrawpolytopearc[red, thick]{1}{}{}
\end{scope}
\end{tikzpicture}
转储到终端的错误是:
Missing character: There is no - in font nullfont!
Missing character: There is no - in font nullfont!
Missing character: There is no + in font nullfont!
Missing character: There is no + in font nullfont!
Missing character: There is no ( in font nullfont!
Missing character: There is no 0 in font nullfont!
Missing character: There is no . in font nullfont!
Missing character: There is no 0 in font nullfont!
Missing character: There is no , in font nullfont!
Missing character: There is no 0 in font nullfont!
Missing character: There is no . in font nullfont!
Missing character: There is no 0 in font nullfont!
Missing character: There is no , in font nullfont!
Missing character: There is no 0 in font nullfont!
Missing character: There is no . in font nullfont!
Missing character: There is no 4 in font nullfont!
Missing character: There is no 7 in font nullfont!
Missing character: There is no 1 in font nullfont!
Missing character: There is no 3 in font nullfont!
Missing character: There is no 9 in font nullfont!
Missing character: There is no ) in font nullfont!
Missing character: There is no ; in font nullfont!
angles for cross product: phi: 0theta: 0.0
在之前的 PDFLaTeX 版本中,这个功能可以顺利运行,没有出现这些错误。不过,渲染后的图像看起来还不错。
知道如何修复它吗?
答案1
在我看来,这是无害的。在 tikz-3dplot.sty 中,注释字符被遗忘了:
%DEBUG: show the cross product
%\draw[->,blue] (\tdplotvertexx,\tdplotvertexy,\tdplotvertexz)
-- ++(\tdplotresx,\tdplotresy,\tdplotresz); %<------------- here
最后一行应该被注释掉,因为它现在以 nullfont 格式打印一些字符,从而导致出现消息。