我正在 texstudio 中处理一个项目,我的 pdf 在第五页后就被截断了。有人知道这是为什么吗?
谢谢,约翰
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{automata, positioning, arrows}
\tikzset{
->, % makes the edges directed
%>=stealth’, % makes the arrow heads bold
node distance=3cm, % specifies the minimum distance between two nodes. Change if necessary.
every state/.style={thick, fill=gray!10}, % sets the properties for each ’state’ node
initial text=$ $, % sets the text that appears on the start arrow
}
\begin{document}
\begin{enumerate}
\begin{figure}[ht] % ’ht’ tells LaTeX to place the figure ’here’ or at the top of the page
\centering % centers the figure
\item[1.4]
\item[e]
\begin{tikzpicture}
\node[state, initial] (q1) {$q_1$};
\node[state, accepting, right of=q1] (q2) {$q_2$};
\node[state,right of=q2] (q3) {$q_3$};
\draw
(q1) edge[bend right, below] node{b} (q3)
(q1) edge[above] node{a} (q2)
(q2) edge[loop above] node{a,b} (q2)
(q3) edge[loop above] node{a, b} (q3);
\end{tikzpicture}
\caption{$\{w$: $w$ starts with an $a\}$}
\label{fig:my_label}
\begin{tikzpicture}
\node[state, initial, accepting] (s1) {$s_1$};
\node[state, accepting, right of=s1] (s2) {$s_2$};
\node[state,right of=s2] (s3) {$s_3$};
\draw
(s1) edge[loop below] node{a} (s1)
(s1) edge[above] node{b} (s2)
(s2) edge[loop below] node{a} (s2)
(s2) edge[above] node{b} (s3)
(s3) edge[loop above] node{a, b} (s3);
\path (current bounding box.north) ++ (0,1cm);
\end{tikzpicture}
\caption{$\{w$: $w$ has at most one $b\}$}
\label{fig:my_label2}
\begin{tikzpicture}
\node[state, initial] (s1q1) {$s_1, q_1$};
\node[state, accepting, right of=s1q1] (s1q2) {$s_1, q_2$};
\node[state, below of=s1q1] (s2q3) {$s_2, q_3$};
\node[state, accepting,below of=s1q2] (s2q2) {$s_2, q_2$};
\node[state, below of=s2q3] (s3q3) {$s_3, q_3$};
\node[state, below of=s2q2] (s3q2) {$s_3, q_2$};
\draw
(s1q1) edge[above] node{a} (s1q2)
(s1q1) edge[right] node{b} (s2q3)
(s1q2) edge[loop above] node{a} (s1q2)
(s1q2) edge[right] node{b} (s2q2)
(s2q3) edge[loop left] node{a} (s2q3)
(s2q3) edge[left] node{b} (s3q3)
(s3q3) edge[loop left] node{a, b} (s3q3)
(s2q2) edge[loop left] node{a} (s2q2)
(s2q2) edge[left] node{b} (s3q2)
(s3q2) edge[loop left] node{a, b} (s3q2);
\path (current bounding box.north) ++ (0,1cm);
\end{tikzpicture}
\caption{$\{w$: $w$ starts with an $a$ and $w$ has at most one $b\}$};
\label{fig:my_label23}
where ($s_3$, $q_1$), ($s_2$, $q_1$), and ($s_1$, $q_3$) have been optimized out.
\end{figure}
\begin{figure}[ht] % ’ht’ tells LaTeX to place the figure ’here’ or at the top of the page
\centering % centers the figure
\item[1.4]
\item[f.]
\begin{tikzpicture}
\node[state, initial] (q1) {$q_{even}$};
\node[state, accepting, right of=q1] (q2) {$q_{odd}$};
\draw
(q1) edge[bend left, above] node{a} (q2)
(q1) edge[loop above] node{b} (q1)
(q2) edge[bend left, below] node{a} (q1)
(q2) edge[loop above] node{b} (q2);
\end{tikzpicture}
\caption{$\{w$: $w$ has an odd number of $a$'s$\}$}
\label{fig:my_label5}
\begin{tikzpicture}
\node[state, initial] (s1) {$s_1$};
\node[state, accepting, right of=s1] (s2) {$s_2$};
\draw
(s1) edge[loop above] node{$a$} (s1)
(s1) edge[bend left, above] node{$b$} (s2)
(s2) edge[bend left, below] node{$a$} (s1)
(s2) edge[loop above] node{$b$} (s2);
\path (current bounding box.north) ++ (0,1cm);
\end{tikzpicture}
\caption{$\{w$: $w$ ends with $b\}$}
\label{fig:my_label4}
\begin{tikzpicture}
\node[state, initial] (s1qe) {$s_1, q_{even}$};
\node[state, right of=s1qe] (s2qe) {$s_2, q_{even}$};
\node[state, below of=s1qe] (s1qo) {$s_1, q_{odd}$};
\node[state, accepting, right of=s1qo] (s2qo) {$s_2, q_{odd}$};
\draw
(s1qe) edge[bend left, left] node{$a$} (s1qo)
(s1qe) edge[bend left, above] node{$b$} (s2qe)
(s2qe) edge[bend left, below] node{$a$} (s1qo)
(s2qe) edge[loop above] node{$b$} (s2qe)
(s1qo) edge[bend left, left] node{$a$} (s1qe)
(s1qo) edge[bend right, below] node{$b$} (s2qo)
(s2qo) edge[bend right, right] node{$a$} (s1qe)
(s2qo) edge[bend right, right] node{$b$} (s2qe);
\path (current bounding box.north) ++ (0,1cm);
\end{tikzpicture}
\caption{$\{w$: $w$ has an odd number of $a$'s and ends with a $b\}$}
\label{fig:my_label7}
\end{figure}
\begin{figure}[ht] % ’ht’ tells LaTeX to place the figure ’here’ or at the top of the page
\centering % centers the figure
\item[1.4]
\item[g.]
\begin{tikzpicture}
\node[state, initial] (q1) {$q_{even}$};
\node[state, accepting, right of=q1] (q2) {$q_{odd}$};
\draw
(q1) edge[bend left, above] node{a} (q2)
(q1) edge[loop above] node{b} (q1)
(q2) edge[bend left, below] node{a} (q1)
(q2) edge[loop above] node{b} (q2);
\end{tikzpicture}
\caption{$\{w$: $w$ has an odd number of $a$'s$\}$}
\label{fig:my_labela}
\begin{tikzpicture}
\node[state, initial, accepting] (se) {$s_{even}$};
\node[state, right of=se] (so) {$s_{odd}$};
\draw
(se) edge[bend left, above] node{$a, b$} (so)
(so) edge[bend left, above] node{$a, b$} (se);
\path (current bounding box.north) ++ (0,1cm);
\end{tikzpicture}
\caption{$\{w$: $w$ an even length $\}$}
\label{fig:my_label10}
\begin{tikzpicture}
\node[state, initial] (seqe) {$s_{even}, q_{even}$};
\node[state, right of=seqe] (soqo) {$s_{odd}, q_{odd}$};
\node[state, below of=seqe] (soqe) {$s_{odd}, q_{even}$};
\node[state, accepting, right of=soqe] (seqo) {$s_{even}, q_{odd}$};
\draw
(seqe) edge[bend left, above] node{$a$} (soqo)
(seqe) edge[bend left, left] node{$b$} (soqe)
(soqe) edge[bend left, above] node{$a$} (seqo)
(soqe) edge[bend left, left] node{$b$} (seqe)
(soqo) edge[bend left, below] node{$a$} (seqe)
(soqo) edge[bend left, left] node{$b$} (seqo)
(seqo) edge[bend left, below] node{$a$} (soqe)
(s2qo) edge[bend left, left] node{$b$} (soqo);
\path (current bounding box.north) ++ (0,1cm);
\end{tikzpicture}
\caption{$\{w$: $w$ has an odd number of $a$'s and ends with a $b\}$}
\label{fig:my_labelo}
\end{figure}
\begin{figure}[ht] % ’ht’ tells LaTeX to place the figure ’here’ or at the top of the page
\centering % centers the figure
\item[1.5]
\item[c]
\begin{tikzpicture}
\node[state, initial] (q1) {$q_1$};
\node[state, right of=q1] (q2) {$q_2$};
\node[state, accepting, right of=q2] (q3) {$q_3$};
\draw
(q1) edge[above] node{a} (q2)
(q1) edge[loop above] node{b} (q1)
(q2) edge[loop above] node{a} (q2)
(q2) edge[above] node{b} (q3)
(q3) edge[loop above] node{a, b} (q3);
\end{tikzpicture}
\caption{$\{w$: $w$ contains $ab\}$}
\label{fig:my_labeltable}
\begin{tikzpicture}
\node[state, initial] (s1) {$s_1$};
\node[state, right of=s1] (s2) {$s_2$};
\node[state, accepting, right of=s2] (s3) {$s_3$};
\draw
(s1) edge[loop above] node{a} (s1)
(s1) edge[above] node{b} (s2)
(s2) edge[above] node{a} (s3)
(s2) edge[loop above] node{b} (s2)
(s3) edge[loop above] node{a, b} (s3);
\path (current bounding box.north) ++ (0,1cm);
\end{tikzpicture}
\caption{$\{w$: $w$ contains $ba\}$}
\label{fig:my_labelol}
\begin{tikzpicture}
\node[state, initial] (q1s1) {$q_1, s_1$};
\node[state, right of=q1s1] (q1s2) {$q_1, s_2$};
\node[state, below of=s1q1] (q2s2) {$q_2, s_2$};
\node[state, below of=q1s2] (q2s3) {$q_2, s_3$};
\node[state, below of=q2s2] (q3s2) {$q_3, s_2$};
\node[state, accepting, below of=q2s3] (q3s3) {$q_3, s_2$};
\draw
(q1s1) edge[left] node{a} (q2s2)
(q1s1) edge[above] node{b} (q1s2)
(q1s2) edge[right] node{a} (q2s3)
(q1s2) edge[right] node{b} (q2s2)
(q2s2) edge[above] node{a} (q2s3)
(q2s2) edge[right] node{b} (q3s2)
(q2s3) edge[loop right] node{a} (q2s3)
(q2s3) edge[right] node{b} (q3s3)
(q3s2) edge[below] node{a} (q3s3)
(q3s2) edge[loop below] node{b} (q3s2)
(q3s3) edge[loop below] node{a, b} (q3s3);
\path (current bounding box.north) ++ (0,1cm);
\end{tikzpicture}
\caption{$\{w$: $w$ contains $ab$ and $ba\}$};
\label{fig:my_labelp}
where ($q_1$, $s_3$), ($q_2$, $s_1$), and ($q_3$, $s_1$) have been optimized out.
%\end{figure}
\begin{tikzpicture}
\node[state, accepting,initial] (q1s1) {$q_1, s_1$};
\node[state, accepting,right of=q1s1] (q1s2) {$q_1, s_2$};
\node[state, accepting,below of=s1q1] (q2s2) {$q_2, s_2$};
\node[state, accepting,below of=q1s2] (q2s3) {$q_2, s_3$};
\node[state, accepting,below of=q2s2] (q3s2) {$q_3, s_2$};
\node[state, below of=q2s3] (q3s3) {$q_3, s_2$};
\draw
(q1s1) edge[left] node{a} (q2s2)
(q1s1) edge[above] node{b} (q1s2)
(q1s2) edge[right] node{a} (q2s3)
(q1s2) edge[right] node{b} (q2s2)
(q2s2) edge[above] node{a} (q2s3)
(q2s2) edge[right] node{b} (q3s2)
(q2s3) edge[loop right] node{a} (q2s3)
(q2s3) edge[right] node{b} (q3s3)
(q3s2) edge[below] node{a} (q3s3)
(q3s2) edge[loop below] node{b} (q3s2)
(q3s3) edge[loop below] node{a, b} (q3s3);
\path (current bounding box.north) ++ (0,1cm);
\end{tikzpicture}
\caption{$\{w$: $w$ does not contain $ab$ nor $ba\}$};
\label{fig:my_labelhp}
where ($q_1$, $s_3$), ($q_2$, $s_1$), and ($q_3$, $s_1$) have been optimized out.
\end{figure}
\end{enumerate}
\end{document}