apa6/7 中的图形编译错误

apa6/7 中的图形编译错误

当我运行 pdftexify/pdflatex 时,程序卡住了。它显示未定义的控制序列

\documentclass[man]{apa7}
\usepackage[american]{babel}

\usepackage{amsfonts,amssymb,amsmath,amsthm,mathtools}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{fancybox,fancyhdr}
\usepackage{graphicx}
\usepackage{eso-pic}
\usepackage{booktabs,tabularx}
%\usepackage[dvips]{epsfig}
%\usepackage{subfigure}
\usepackage{caption,subcaption}
\usepackage{algorithmicx}
\usepackage[ruled]{algorithm}
\usepackage{algpseudocode}
\usepackage{xcolor}
\usepackage{csquotes}
\usepackage[backend=biber,style=apa]{biblatex}
\usepackage{float}
\usepackage{tikz}
\usepackage{pgfplots}
%\usepackage{times}
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
\DeclarePairedDelimiter{\abs}{\mid}{\mid}
\captionsetup{labelfont=bf,skip=0.5\baselineskip,justification=raggedright,singlelinecheck=false}
\usepackage{pdfsync}
\usepackage{hyperref}

\newtheorem{rem}{Remark}[section]
\newtheorem{defi}{Definition}[section]

\addbibresource{distbib.bib}





\title{Sample APA-Style Document Using the \textsf{apa7} Package}
\author{Daniel A. Weiss}
\affiliation{A University Somewhere}
\leftheader{Weiss}
\abstract{This demonstration paper uses the \textsf{apa7} \LaTeX\
class to format the document in compliance with the 7th Edition of
the American Psychological Assocation’s \textit{Publication Manual.}
The references are managed using \textsf{biblatex}.}
\keywords{APA style, demonstration}
\begin{document}
\maketitle
\pagenumbering{roman}

\tableofcontents
\listoftables
\listoffigures
\eject
\pagenumbering{arabic}
%\include{chap2}
\begin{table}%[!htp]
 %   \small
 %   \sisetup{table-format=6.2e-1,per-mode=symbol}
 %   \setlength\tabcolsep{3pt}
\caption{The QPSO update equations for different potential energy types}\label{3wavfun}
%\centering
%\begin{threeparttable}
\begin{tabularx}{\textwidth}{@{} >{\raggedright\arraybackslash}X >{$\displaystyle}l<{$} @{}}%{\textwidth}{@{} L l *{3}{>{$}l<{$}S} @{}}
\toprule
 {\bf Delta potential}  & ${\bf QPSO update equation}$\\
 \midrule
 Delta potential well & x_i(t+1)=p(t)\pm\frac{\ln(1/u)}{2q\ln\sqrt{2}}\norm{x_i(t)-p(t)}\\
 \midrule
 Harmonic oscillator & x_i(t+1)=p(t)\pm\frac{\sqrt{\ln1/u}}{0.47694q}\norm{ x_i(t)-p(t)}\\
 \midrule
 Square well & x_i(t+1)=p(t)+\frac{0.6574}{\xi q}\cos^{-1}(\pm\sqrt u)\norm{x_i(t)-p(t)}\\
\bottomrule
\end{tabularx}
%\end{threeparttable}
\end{table}
The following The simulated annealing, Tabu search, Ants colonies, and Evolutionary algorithms uses stochastic strategies, and they are also known as basic metaheuristics.
%\include{dedication}
\begin{figure}[!htp]
\begin{tikzpicture}
\begin{axis}[unbounded coords=discard, xlabel={Your IV Here},
ylabel={Your DV Here}, xmin=0, ymin=0, axis lines = left]
\addplot[thick, color=black] (\x,2.8 + 0.8*\x);
\addplot[dashed, color=black] (\x,5.3 - 0.5*\x);
\end{axis}
\end{tikzpicture}
\caption{An Interaction}
\label{figure2}
\end{figure}

   \begin{figure}[!tb]
    \includegraphics[width=13cm]{D:/Ph.D/Dissertations.Books.reference/maps/stoc-opt}
    \caption{Stochastic methods of searching global optimum}
    \label{j}
    \end{figure}
We begin with \textcite{Scha85}. We can also cite this work in
parenthesis, like this: \parencite{Lam1}.
A three-author paper \parencite[e.g.,][]{rao} lists all
three authors for the first citation\ref{s}, then only the first author
on all subsequent citations \parencite{rao}.
Note the use of five heading levels throughout this demonstration
Method section.

\subsection{Participants}
We had a lot of people in this study.
\subsection{Materials}
Several materials were used for this project. Some of them were
already created for prior research.
\subsubsection{Paper-and-Pencil Instrument}
We used an instrument that we found to be highly successful.
\paragraph{Reliability}
The reliability of this instrument is extraordinary.
\paragraph{Validity}
We now discuss the validity of our instrument.
\subparagraph{Face validity} The face validity is exceptionally
strong. Everyone should be impressed.
\subparagraph{Construct validity} Also very strong.
\subsection{Design}
This section describes the study’s design.
\subsection{Procedure}
The procedure was fairly straightforward, yet required
attention to detail.
\section{Results}
Table \ref{tab:ComplexTable} contains some sample data. Our
statistical prowess in analyzing these data is unmatched.
\begin{table}[htbp]
\vspace*{2em}
\begin{threeparttable}
\caption{A Complex Table}
\label{tab:ComplexTable}
\begin{tabular}{@{}lrrr@{}} \toprule
Distribution type & \multicolumn{2}{l}{Percentage of} & Total number \\
& \multicolumn{2}{l}{targets with} & of trials per \\
& \multicolumn{2}{l}{segment in} & participant \\ \cmidrule(r){2-3}
& Onset & Coda & \\ \midrule
Categorical -- onset\tabfnm{a} & 100 & 0 & 196 \\
Probabilistic & 80 & 20\tabfnm{*} & 200 \\
Categorical -- coda\tabfnm{b} & 0 & 100\tabfnm{*} & 196 \\ \midrule
\end{tabular}
\begin{tablenotes}[para,flushleft]
{\small
\textit{Note.} All data are approximate.
\tabfnt{a}Categorical may be onset.
\tabfnt{b}Categorical may also be coda.
\tabfnt{*}\textit{p} < .05.
\tabfnt{**}\textit{p} < .01.
}
\end{tablenotes}
\end{threeparttable}
\end{table}
\section{Discussion}
This is a lengthy and erudite discussion. It demonstrates amazing
skill in interpreting the results for the masses.
\printbibliography
\end{document}

相关内容