tkzDrawTangentLine !FP 错误:UPN 堆栈为空!。\FP@errmessage #1->\errmessage {FP 错误:#1!}

tkzDrawTangentLine !FP 错误:UPN 堆栈为空!。\FP@errmessage #1->\errmessage {FP 错误:#1!}

以下代码排版有误! FP error: UPN stack is empty!. \FP@errmessage #1->\errmessage {FP error: #1!}

有人知道我该如何修复这个问题吗?

平均能量损失

\documentclass[tikz]{standalone}
\usepackage{tkz-fct}

%
\begin{document}

\begin{tikzpicture}
\tikzset{tan style/.style={-}}
\tkzInit[xmin=0,xmax=1,ymin=0,ymax=2]
\tkzAxeXY
\tkzGrid[sub,subxstep=0.25,subystep=0.25]
\tkzFct[thick,domain=0:1]{-(\x**2)+\x+1}
\tkzDrawTangentLine[draw=true,kl=0,kr=0.5](0)
\end{tikzpicture}

\end{document}

答案1

在 中将减号设为运算,而不是负数。\tkzFct您可以将其作为{0-(\x**2)+\x+1}或 执行,如在我的 MWE 中一样{1-(\x**2)+\x}

\documentclass[tikz]{standalone}
\usepackage{tkz-fct}

%
\begin{document}

\begin{tikzpicture}
\tikzset{tan style/.style={-}}
\tkzInit[xmin=0,xmax=1,ymin=0,ymax=2]
\tkzAxeXY
\tkzGrid[sub,subxstep=0.25,subystep=0.25]
\tkzFct[thick,domain=0:1]{1-(\x**2)+\x}
\tkzDrawTangentLine[draw=true,kl=0,kr=0.5](0)
\end{tikzpicture}

\end{document}

在此处输入图片描述

相关内容