文档将不再在 Texstudio 或 Overleaf 中编译任何 tikzpictures

文档将不再在 Texstudio 或 Overleaf 中编译任何 tikzpictures

当我向文档中添加更多 tikzpictures 时,我的 17 页文档将无法编译,我不知道为什么。我使用 TexStudio。如果我在下面的代码中注释掉倒数第二个 tikzpicture,它将编译。如果我只包含生成 tikzpictures 所需的包,则所有图片都将编译,这是我在将 tikz 绘图复制并粘贴到我的主要文档之前通常所做的测试。我将我使用的大多数包放在下面的示例中。

我还将其复制并粘贴到 Overleaf 文档中,并收到有关 scrextend 包的某种警告,因此我将其删除。但它仍然无法编译。我在 Texstudio 中没有收到任何错误消息;它只是保持冻结状态,直到我强制它停止编译。我以相同的顺序使用这些相同的包来处理 90 多页且包含大量 tikzpictures 的文档,这些文档可以编译。所以,我在这里迷茫了。

\documentclass[11pt]{article}

\usepackage[margin=1.25in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amsthm,psfrag,amsfonts,amssymb}
\usepackage{tikz,pgfplots}
\pgfplotsset{compat=1.16}
\usetikzlibrary{arrows.meta,calc,positioning,patterns}
\usepackage[colorlinks]{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
%    filecolor=magenta,  
    urlcolor=red,
}
\usepackage{cleveref}
\usepackage{commath,mathtools,enumitem,bbm,empheq,cases,wrapfig}
\usepackage{graphicx,yfonts,color,soul,fancyhdr,framed}
\usepackage{combelow,microtype,flexisym,wasysym,stmaryrd}
\usepackage[small,bf]{caption}
\usepackage{subcaption}
\captionsetup{belowskip=2pt}

\usepackage{titlesec}
\titleformat{\section}
    {\normalfont\Large\scshape}
    {\thesection}{1em}{}
\titleformat{\subsubsection}[runin]
{\normalfont\large\bfseries}{\thesubsubsection}{0.2cm}{\addperiod}
\newcommand{\addperiod}[1]{#1.}

\setlist[enumerate]{label=\arabic*.),itemsep=3pt,topsep=0pt,leftmargin=36pt,parsep=8pt}
%\setlist[enumerate,1]{label=(\alph.*)}
\renewcommand\labelitemi{$\RHD$}



\begin{document}


\begin{figure}[h]
\centering
\begin{subfigure}{0.5\textwidth}
\begin{tikzpicture}[scale=0.8]
\begin{axis}[
    axis lines=center,
    xticklabels={,,},
    yticklabels={,,,},
    xlabel={$Re$},
    xlabel style={xshift=1.75cm},
    ylabel={$Im$},
    ylabel style={xshift=0.45cm,yshift=1.3cm},
    xmin=-1.5,
    xmax=3.75,
    ymin=-3.25,
    ymax=3.25,
    ]
    \addplot[mark=none,thick,color=blue,domain=0:3,style=-{Triangle[length=2mm,width=1.5mm]}] {.95*x} node[above] {$z$};
    \addplot[mark=none,line width=0.04cm, dashed, color=red,domain=0:2.95] {0} node[below,xshift=-1cm] {$a$};
    \addplot +[mark=none,color=red,dashed] coordinates {(2.95, 0) (2.95, 2.95*.95)} node[anchor=west,yshift=-1cm] {$b$};
\end{axis}
\end{tikzpicture} \caption{$z = a + ib \in \mathbb{C}$ where $a,b \in \mathbb{R}$} \label{fig:zlength}
\end{subfigure}%
\begin{subfigure}{0.5\textwidth}
\begin{tikzpicture}[scale=0.8]
\begin{axis}[
    axis lines=center,
    xticklabels={,,},
    yticklabels={,,,},
    xlabel={$Re$},
    xlabel style={xshift=1.75cm},
    ylabel={$Im$},
    ylabel style={xshift=0.45cm,yshift=1.3cm},
    xmin=-1.5,
    xmax=3.75,
    ymin=-3.25,
    ymax=3.25,
    ]
    \addplot[mark=none,thick,color=blue,domain=0:2,style=-{Triangle[length=2mm,width=1.5mm]}] {.5*x} node[above,yshift=-0.7cm] {$z_1$};
    \addplot[mark=none,thick,color=cyan,domain=0:1,style=-{Triangle[length=2mm,width=1.5mm]}] {2*x} node[above,xshift=0.4cm] {$z_1 + z_2$};
    \addplot[mark=none,domain=-1:0,color=blue,style={Triangle[length=2mm,width=1.5mm]}-] {-x} node[above,xshift=-1.4cm,yshift=0.2cm] {$z_2$};
    \addplot[mark=none,dashed,domain=1:2,color=blue,style={Triangle[length=2mm,width=1.5mm]}-] {3-x} node[above,xshift=-0.1cm,yshift=0.2cm] {$z_2$};
\end{axis}
\end{tikzpicture} \caption{$z_1, z_2, z_1 + z_2 \in \mathbb{C}$} \label{fig:Cvectoradd}
\end{subfigure} \caption{Vector representation of $\mathbb{C}$}
\end{figure}

\vspace{0.5cm}

\begin{minipage}[t]{0.45\textwidth}
\vspace{-5cm}
\begin{align*}
    r &= \sqrt{x^2 + y^2} \\[1.5em]
    \theta &= \arctan\left(\frac{y}{x}\right) \\[1.5em]
    z &= r \cos\theta + ir \sin\theta \\
    &= re^{i\theta}
\end{align*}
\end{minipage}
\begin{minipage}[t]{0.5\textwidth}
\centering
\begin{tikzpicture}
\begin{axis}[
    axis lines=center,
    xticklabels={,,},
    yticklabels={,,,},
    xlabel={$Re$},
    xlabel style={anchor=north west,xshift=-0.3cm,yshift=-0.2cm},
    ylabel={$Im$},
    ylabel style={xshift=0.1cm},
    xmin=-1.25,
    xmax=3.75,
    ymin=-1.25,
    ymax=4.25,
    ]
    \addplot[mark=none,line width=0.03cm,color=blue,domain=0:3,style=-{Triangle[length=2mm,width=1.5mm]}] {.95*x} node[above,pos=0.5,yshift=0.25cm] {$r$};
    \addplot[mark=none,line width=0.04cm, dashed, color=red,domain=0:2.97] {0} node[below,xshift=-1cm] {$x$};
    \addplot +[mark=none,color=red,dashed] coordinates {(2.997, 0) (2.97, 2.97*.95)} node[anchor=west,yshift=-1cm] {$y$};
    \addplot[mark=none,thick,color=black,dashed,domain=1.45:2] {(4 - x^2)^0.5} node[above,pos=0.5,xshift=0.2cm] {$\theta$};
\end{axis}
\end{tikzpicture} \captionof{figure}{Polar representation of $\mathbb{C}$} \label{fig:polarrep}
\end{minipage}

\vspace{0.5cm}

\begin{enumerate}[label=\arabic*.)]
\item An arbitrary open region

\hl{PICTURES, p. 10}

\item The open unit disc, $\mathbb{D} = \{z \in \mathbb{C} ~|~ |z| < 1\}$

\centering
\begin{tikzpicture}
    \draw[step=1cm,gray,very thin] (-3,-3) rectangle (3,3);
    \draw[pattern color=red,pattern=north west lines,dashed] (0,0) circle (1.25cm);
    \draw[thick,<->] (-3,0) -- (3,0) node[below,xshift=-0.35cm] {$Re$};
    \draw[thick,<->] (0,-3) -- (0,3) node[right,yshift=-0.3cm] {$Im$};
    \node at (1.15,1.4) {$|z| = 1$};
    \node at (1.42,-0.25) {$1$};
    \node at (-1.63,-0.25) {$-1$};
    \node at (-0.18,1.52) {$i$};
    \node at (-0.32,-1.5) {$-i$};
\end{tikzpicture}

\item The annulus $D = \{z \in \mathbb{C} ~|~ 1 < |z| < 2\}$

%\begin{center}
%\begin{tikzpicture}
%   \draw[step=1cm,gray,very thin] (-2,-2) rectangle (2,2);
%   \draw[dashed,pattern color=red,pattern=north west lines] (0,0) circle (1.25cm);
%   \draw[fill=white] (0,0) circle (0.65cm);
%   \draw[thick,<->] (-2,0) -- (2,0);
%   \draw[thick,<->] (0,-2) -- (0,2) node[above=0.1cm];
%   \node at (0.26,0.3) {$|z| = 1$};
%   \node at (1.15,1.05) {$|z| = 2$};
%\end{tikzpicture}
%\end{center}
\end{enumerate}

\end{document}

相关内容