tikzpicture 轴错误

tikzpicture 轴错误

我于 2020 年 5 月 21 日更新了 miktex,当我尝试运行上一个文件时。使用之前运行良好的以下代码,轴标签显示小方块。

\documentclass[symmetric, justified, twoside]{tufte-book} % Use the tufte-book class which in turn uses the tufte-common class

\hypersetup{colorlinks} % Comment this line if you don't wish to have colored links

\usepackage{microtype} % Improves character and word spacing
\usepackage{lipsum} % Inserts dummy text
\usepackage{booktabs} % Better horizontal rules in tables
\usepackage[most]{tcolorbox}

\usepackage{mparhack}
\usepackage{amsmath,amsthm,amssymb,parskip}
\usepackage{cleveref}
\usepackage{pgf,tikz,pgfplots}
\pgfplotsset{compat=1.15}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\usepackage[english]{babel} %%% 'french', 'german', 'spanish', 'danish', etc.
\usepackage{txfonts}
\usepackage{mathdots}
\usepackage{enumitem}
\usepackage{IEEEtrantools}
\usepackage{todonotes} 
\usepackage{enumitem}
\usepackage{rotating}
\usepackage{caption}
\usetikzlibrary{arrows.meta,bending}%New package added to this file

\usepackage{tkz-euclide}
\usepackage{pgfplots}
\usepackage{tkz-fct}

\usepackage{etoolbox}

\begin{marginfigure}
    \begin{tikzpicture}[scale=0.8,>=stealth]
    \tkzInit[xmin=-2.5,xmax=3.5,ymin=-1.5,ymax=4.5]
    \tkzAxeXY[color=black!80]
    \draw[scale=1,domain=-2:3,smooth,thick,variable=\x,red,<->] plot ({\x},{(\x*\x-1)/(\x-1)});
    \draw [fill=red] (1,0) circle (1.3pt);
    \draw [fill=white] (1,2) circle (1.9pt);
    \draw[color=blue] (1.8,4.2) node {$f(x)=\frac{x^2-1}{x-1}$};
    \draw[-,dashed](0,2)--(0.95,2);
    \draw[-,dashed](1,0)--(1,1.95);
    \end{tikzpicture}
    \caption{Graph of $f(x)=\frac{x^2-1}{x-1}$. A hole in the graph at $x=1$ shows that the function and hence the graph is not defined at $x=1$.}
    \end{marginfigure}
\end{document}

现在图看起来像这样

在此处输入图片描述

请帮忙

相关内容