我正在准备向《美国政治科学评论》投稿,并打算使用 Overleaf.com 提供的 tex 模板。
我正在使用 Miktex 2.9 和 TexWork 0.6.2(OS Win10)。
模板如下:
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Please note that whilst this template provides a
% preview of the typeset manuscript for submission, it
% will not necessarily be the final publication layout.
%
%% Document class options: (**...** are defaults)
% - bibtex: Uses bibtex+natbib, chicago.bst
% - biblatex: Uses biblatex-chicago
% You MUST select one of the above two options, depending
% on whether you prefer bibtex or biblatex. This template
% contains code that uses bibtex.
% - twocolumn: Switch to two column for main text
% - singlespace/onehalfspace/**doublespace**:
% changes line spacing for main text
% - **blind**/nonblind: Anonymises authors
% and affiliations, or not
% - autowc: Automatically inserts a word count
% after the abstract, using texcount.
% The abstract is ignored.
% NOTE THAT THIS WILL ONLY WORK IF YOU HAVE
% INSTALLED TEXCOUNT, AND HAVE ENABLED --shell-escape
% OR --enable-write18. (These will work on Overleaf.)
% If you get an error about "texcount not found", delete
% the autowc option, and manually specify the wordcount
% with \totalwordcount{xxx}.
%%% autowc may cause longer compilation time. You can
%%% disable it first while actively editing, and only
%%% enable it when you're ready to take stock and check
%%% on your work.
\documentclass[bibtex]{apsr_submission}
% \totalwordcount{500}
%% Example alternative options with everything the opposite of the above: (DO NOT USE AUTOWC WITH BIBLATEX; the word count will be greatly over-reported)
% \documentclass[biblatex,nonblind,singlespace,twocolumn]{apsr_submission}
\title{American Political Science Review \emph{(APSR)} Submission Template}
% The custom \author command takes THREE arguments:
% #1 = Author name
% #2 = Affiliation name
% #3 = Brief author profile, or anything that you'd usually put in a \thanks. Leave blank {} if there's nothing to be said.
\author{Author One}
{Affiliation A}
{Author One is PhD Candidate, ABC Department, Affiliation A, 12345 NY. ([email protected])}
\author{Author Two}
{Affiliation C}
{Author Two is Assistant Professor, Faculty of Z, Affiliation B, 42813. Corresponding Author ([email protected]) Additional notes about Author Two.}
\author{Author Three}
{Affiliation B}
{Author Three is ...}
%% Any other acknowledgements or author notes
\thanks{The authors thank...}
%% These are used for the headers
\runningtitle{APSR Submission Template}
\runningauthor{Author One, Author Two, and Author Three} % 4 + Authors, Author One et al.
%% Useful packages
\usepackage{amsmath}
\usepackage{graphicx}
%% If you are using a custom figure or table environment from a package and it's not getting framed, add \makeframedenv{MyFigure} in the preamble, where the custom figure environment is \begin{MyFigure}...\end{MyFigure}.
%% Currently table, table*, figure, figure*, longtable, supertabular, sidewaystable and sidewaysfigure will be automatically framed.
%% Handy for setting wide tables/figures in landscape
\usepackage{pdflscape}
%% Recent LaTeX distributions should be able to automatically convert .eps to .pdf; but if this isn't happening, try loading the epstopdf package manually
% \usepackage{epstopdf}
%% Just to add some dummy text
\usepackage{lipsum}
%%% Use \addbibresource{...} if using BibLaTeX
% \addbibresource{sample.bib}
\begin{document}
%%% DO NOT REMOVE THESE LINES. For automatic word count.
%TC:ignore
\begin{frontmatter}
\begin{abstract}
Your abstract. It should be at least three lines long to accommodate the dropped-cap. \lipsum[1]
\end{abstract}
\end{frontmatter}
%%% DO NOT REMOVE THIS LINE. For automatic word count.
%TC:endignore
\section{Introduction}
\dropcap{Thanks} for using Overleaf to write your article. Your introduction goes here! Do make sure the first paragraph here is at least three lines long, to accommodate the dropped-cap. Some examples of commonly used commands and features are listed below, to help you get started.
Here's a second paragraph of extra text, to test paragraph indents.
\section{Some \LaTeX{} Examples}
\label{sec:examples}
Use section and subsection commands to organize your document. \LaTeX{} handles all the formatting and numbering automatically. Use \verb|\ref| and \verb|\label| commands for cross-references.
\subsection{Figures and Tables}
Use the table and tabular commands for basic tables --- see Table \ref{tab:widgets}, for example. \href{http://tablesgenerator.com}{TablesGenerator.com} is a handy tool for designing tables and generating the LaTeX code, which you can copy and paste into your article here.
You can upload a figure (JPG, PNG or PDF) using the PROJECT menu (Files\ldots > Add files). To include it in your document, use the \verb|graphicx| package and the \verb|\includegraphics| command as in the code for Figure \ref{fig:view}.
\begin{table}[hbt!]
\caption{An example table}
\label{tab:widgets}
\centering
\begin{tabular}{lr}
Item & Quantity \\\midrule
Widgets & 42 \\
Gadgets & 13
\end{tabular}
\floatnote{This is a note for this table.}
\end{table}
\begin{figure}[hbt!]
\includegraphics[width=\linewidth]{example-image}
\caption{A figure example.}
\label{fig:view}
\floatnote{This is a note for this figure.}
\end{figure}
Notes can be added to the bottom of figures and tables using the \verb|\floatnote| command.
\begin{table*}
\caption{Automobile Land Speed Records (GR 5-10).}
\label{tab:wide}
\begin{tabular}{l l l l r}
Speed (mph) & Driver & Car & Engine & Date \\
\midrule
407.447 & Craig Breedlove & Spirit of America & GE J47 & 8/5/63 \\
413.199 & Tom Green & Wingfoot Express & WE J46 & 10/2/64 \\
434.22 & Art Arfons & Green Monster & GE J79 & 10/5/64 \\
468.719 & Craig Breedlove & Spirit of America & GE J79 & 10/13/64 \\
526.277 & Craig Breedlove & Spirit of America & GE J79 & 10/15/65 \\
536.712 & Art Arfons & Green Monster & GE J79 & 10/27/65 \\
555.127 & Craig Breedlove & Spirit of America, Sonic 1 & GE J79 & 11/2/65 \\
576.553 & Art Arfons & Green Monster & GE J79 & 11/7/65 \\
600.601 & Craig Breedlove & Spirit of America, Sonic 1 & GE J79 & 11/15/65 \\
622.407 & Gary Gabelich & Blue Flame & Rocket & 10/23/70 \\
633.468 & Richard Noble & Thrust 2 & RR RG 146 & 10/4/83 \\
763.035 & Andy Green & Thrust SSC & RR Spey & 10/15/97\\
\end{tabular}
\floatnote{\url{https://www.sedl.org/afterschool/toolkits/science/pdf/ast_sci_data_tables_sample.pdf}}
\end{table*}
For wide, double-column figures and tables, use the \verb|figure*| (Figure \ref{fig:wide}) or \verb|table*| (Table \ref{tab:wide}) starred environments. Landscaped figures and tables can be obtained using the \texttt{sidewaysfigure} and \texttt{sidewaysfigure} commands from the \texttt{rotating} package. Alternatively, you can use the \texttt{landscape} environment from the \texttt{pdflscape} package.
Multi-page tables can be created using the \texttt{longtable} and \texttt{supertabular} packages, though note that \texttt{longtable}s cannot be used in two-column documents.\footnote{This is an example footnote. \lipsum[1]}
Currently \texttt{table}, \texttt{table*}, \texttt{figure}, \texttt{figure*}, \texttt{longtable}, \texttt{supertabular}, \texttt{sidewaystable} and \texttt{sidewaysfigure} will be automatically framed.
If you are using a custom figure or table environment from a package (e.g.~a \texttt{MyFigure} environment) and it's not getting framed, add \verb|\makeframedenv{MyFigure}| in the preamble.
\subsection{Lists and Quotations}
You can make lists with automatic numbering \dots
\begin{enumerate}
\item Like this,
\item and like this.
\end{enumerate}
\dots or bullet points \dots
\begin{itemize}
\item Like this,
\item and like this.
\end{itemize}
\dots or with words and descriptions \dots
\begin{description}
\item[Word] Definition
\item[Concept] Explanation
\item[Idea] Text
\end{description}
An example quotation:
\begin{quoting}
This is a sample quotation text. This is a sample quotation text. This is a sample quotation text.
\end{quoting}
(This is some filler text.) \lipsum[2]
\subsection{Citations}
\LaTeX{} formats citations and references automatically using the bibliography records in your .bib file, which you can edit via the project menu. Use the \verb|\citep| command for a citation in parentheses \citep{greenwade93}, or \verb|\citet| for a text citation: \citet{greenwade93}. Multiple citations can be given as \citep{greenwade93,knuth1984texbook}.
If your manuscript is accepted, the APSR production team will re-format the references for publication. \emph{It is not necessary to format the reference list yourself to mirror the final published form.}
\subsubsection{Using bibtex} Pass the \texttt{bibtex} option to the \verb|\documentclass| declaration, then specify your \texttt{.bib} file with \verb|\bibliography{sample}| (the extension is unnecessary) near the end of your manuscript, where you want the references list to appear.
\subsubsection{Using biblatex} Pass the \texttt{biblatex} option to the \verb|\documentclass| declaration, then specify your \texttt{.bib} file name in the \emph{preamble}: \verb|\addbibresources{sample.bib}| (the extension is necessary). Write \verb|\printbibliography| near the end of your manuscript where you want the references to appear.
Note that you may want to remove the \texttt{autowc} (automatic word count) document class option, if you are using \texttt{biblatex}. There have been reports of texcount over-reporting word counts when authors use \texttt{biblatex}, due to the database nature of \texttt{.bbl} files produced by \texttt{biblatex}. For more information, see \url{https://tex.stackexchange.com/a/110902/226}.
\subsection{Mathematics}
\LaTeX{} is great at typesetting mathematics:
Let $X_1, X_2, \ldots, X_n$ be a sequence of independent and identically distributed random variables with $\text{E}[X_i] = \mu$ and $\text{Var}[X_i] = \sigma^2 < \infty$, and let
\begin{equation}
\label{eq:CLT}
S_n = \frac{X_1 + X_2 + \cdots + X_n}{n}
= \frac{1}{n}\sum_{i}^{n} X_i
\end{equation}
denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge in distribution to a normal $\mathcal{N}(0, \sigma^2)$.
\begin{figure*}
\centering
\caption{A wide figure}\label{fig:wide}
\includegraphics[width=\linewidth]{example-image-16x9}
\end{figure*}
\section{Level 1 heading}
\lipsum[2]
\subsection{Level 2 Heading}
\lipsum[3]
\subsubsection{Level 3 Heading}
\lipsum[4]
\input{tableex2}
%% Use \bibliography{...} if using BibTeX
\bibliography{sample}
%TC:subst \printbibliography \bibliography
%TC:macro \field [0,1]
%TC:macro \name [0,0,0,1]
%TC:macro \list [0,0,1]
%% Use \printbibliography if using BibLaTeX
% \printbibliography
\end{document}
当我尝试编译它时,我收到一条错误消息,说缺少 apsr_submission.cls。我找到了它。它看起来像:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% apsr_submission.cls, v1.1, 2017/12/06
% Developed by Overleaf
%
% This class file enables authors to prepare
% manuscripts for submission to APSR.
%
% v1.01: corrected ASPR typos to APSR
% v1.1: Uses chicago-apsr.bst that doesn't shorten first names
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{apsr_submission}[2017/12/06 v1.1]
\newif\if@biblatex
\newif\if@blind
\newif\if@twocol
\newif\if@onehalfspace
\newif\if@doublespace
\newif\if@extracover
\newif\if@autowc
\DeclareOption{biblatex}{\@biblatextrue}
\DeclareOption{bibtex}{\@biblatexfalse}
\DeclareOption{twocolumn}{\@twocoltrue}
\DeclareOption{blind}{\@blindtrue}
\DeclareOption{nonblind}{\@blindfalse}
\DeclareOption{singlespace}{\@onehalfspacefalse\@doublespacefalse}
\DeclareOption{onehalfspace}{\@onehalfspacetrue\@doublespacefalse}
\DeclareOption{doublespace}{\@onehalfspacefalse\@doublespacetrue}
\DeclareOption{autowc}{\@autowctrue}
\DeclareOption{titlepage}{\@extracovertrue}
\ExecuteOptions{blind,doublespace}
\ProcessOptions\relax
\LoadClass[twoside,12pt]{article}
\RequirePackage{silence}
\WarningFilter*{hyperref}{Ignoring empty anchor}
\WarningFilter*{hyperref}{Rerun to get}
\WarningFilter*{microtype}{Unknown slot number of character}
%% Language and font encodings
\RequirePackage[english]{babel}
\RequirePackage{ifxetex,ifluatex,ifpdf}
\ifxetex\else
\ifluatex\else
\RequirePackage[utf8]{inputenc}
\fi\fi
\RequirePackage[T1]{fontenc}
\RequirePackage{newtxtext,newtxmath}
\RequirePackage{microtype}
\RequirePackage{textcase}
\RequirePackage{lettrine}
\RequirePackage{xpatch}
\RequirePackage[framemethod=tikz]{mdframed}
%% Sets page size and margins
\RequirePackage[letterpaper,top=1.8cm,bottom=2.2cm,left=2.1cm,right=2.5cm,columnsep=0.65cm,footskip=2.5\baselineskip,headsep=1.5\baselineskip]{geometry}
%% Front matters
\def\@authorlist{}
\def\@authorinfo{}
\def\@authorlistblind{}
\def\@authorinfoblind{}
\def\@runningauthor{}
\def\@runningtitle{}
\def\@journalname{American Political Science Review}
\def\@publishername{American Political Science Association}
\def\@publishedyear{\the\year}
\renewcommand{\author}[3]{%
\appto{\@authorlist}{%
{\noindent\Large%
\ifxetex\MakeUppercase{#1}%
\else\ifpdf
\textls[80]{\MakeUppercase{#1}}%
\else\MakeUppercase{#1}%
\fi\fi%
}\hspace{1em}%
{\itshape\large #2}\par\vskip3pt}%
\authorinfo{#3\par}
}
\RequirePackage[style]{abstract}
\RequirePackage{environ}
\RequirePackage[explicit]{titlesec}
\RequirePackage{tikz,pgffor}
\RequirePackage{fancyhdr}
\RequirePackage{setspace}
\RequirePackage{lastpage}
\AtBeginDocument{\RequirePackage[hidelinks]{hyperref}}
\setcounter{DefaultLines}{3}
\setlength{\DefaultFindent}{0.25em}
\setlength{\DefaultNindent}{0pt}
\appto{\LettrineFontHook}{\bfseries}
\renewcommand{\LettrineTextFont}{\upshape}
\renewcommand{\LettrineSecondString}{l}
\newcommand{\dropcap}[2][]{\lettrine[#1] #2}
\renewcommand{\abstitlestyle}[1]{}
\setlength{\absleftindent}{2em}
\setlength{\absrightindent}{2em}
\setlength{\absparindent}{0pt}
\renewcommand{\abstracttextfont}{\itshape\noindent\dropcap[findent=0.5em]}
\let\maketitle\relax
\newcommand{\authorinfo}[1]{\appto{\@authorinfo}{#1}}
\let\thanks\authorinfo
\newcommand{\runningauthor}[1]{\def\@runningauthor{#1}}
\newcommand{\runningtitle}[1]{\def\@runningtitle{#1}}
\newcommand{\publishedyear}[1]{\def\@publishedyear{#1}}
\RequirePackage[marginal]{footmisc}
\setlength{\footnotemargin}{0.25em}
\def\blfootnote{\gdef\@thefnmark{}\@footnotetext}
\renewcommand{\footnotelayout}{\small}
\if@doublespace
\appto{\footnotelayout}{\doublespacing}
\fi
\if@onehalfspace
\appto{\footnotelayout}{\onehalfspacing}
\fi
\renewcommand{\@maketitle}{%
\vspace*{\baselineskip}
{\fontfamily{qhvc}\fontseries{b}\fontsize{20pt}{24pt}\selectfont\raggedright\@title\par\vskip3pt}
{\@authorlist\par}
}
\if@blind
\newcommand{\@anonymizeauthors}{
\def\@authorlistblind{}
\def\@authorinfoblind{}
\patchcmd{\author}{\@authorlist}{\@authorlistblind}{}{}
\patchcmd{\authorinfo}{\@authorinfo}{\@authorinfoblind}{}{}
\author{Anonymised Author(s)}{Anonymised Institution(s)}{Anonymised submission.\par\medskip\textbf{This is a manuscript submitted for review.}}
\gdef\@runningauthor{Anonymised Author(s)}
\let\@authorlist\@authorlistblind
\let\@authorinfo\@authorinfoblind
}
\else
\let\@anonymizeauthors\relax
\fi
\def\@totalwordcount{0}
\newcommand{\totalwordcount}[1]{%
%% Only allow total word count to be changed it if it's still 0
\if@autowc%
\ClassWarning{apsr_submission.cls}{\string\totalwordcount{} is ignored when autowc is active.}
\else
\def\@totalwordcount{#1}
\fi
}
\if@autowc
\RequirePackage{bashful}
\newcommand{\@autowordcount}{%
\def\@totalwordcount{\splice{texcount -1 -sum=1,1,1,0,0,0,0 -merge -incbib -utf8 \jobname.tex}}}%
\else
\let\@autowordcount\relax
\fi
\NewEnviron{frontmatter}{%
\def\apsr@frontmatter{
\@maketitle\BODY%
\if@autowc\@autowordcount\fi%
{\centering Word Count: \@totalwordcount\par}%
}
\appto{\@authorinfo}{\par\medskip\textbf{This is a manuscript submitted for review.}\par}
\if@twocol
\if@extracover
\setcounter{page}{0}
\onecolumn\apsr@frontmatter
\blfootnote{\hspace*{-\footnotemargin}\@authorinfo}
\thispagestyle{empty}\clearpage
\fi
%% Anonymise main text only
\if@blind\@anonymizeauthors\fi
\twocolumn[\apsr@frontmatter\bigskip]
\else
\if@extracover
\setcounter{page}{0}
\apsr@frontmatter
\blfootnote{\hspace*{-\footnotemargin}\@authorinfo}
\thispagestyle{empty}\clearpage
\fi
%% Anonymise main text only
\if@blind\@anonymizeauthors\fi
\apsr@frontmatter
\fi
\thispagestyle{titlepage}
\blfootnote{\hspace*{-\footnotemargin}\@authorinfo}
}{}
\AfterEndEnvironment{frontmatter}{
\if@onehalfspace\onehalfspacing\fi%
\if@doublespace\doublespacing\fi%
}
\setcounter{secnumdepth}{3}
\titleformat{\section}{\sffamily\bfseries\large\raggedright}{}{0pt}{\MakeTextUppercase{#1}}
\titleformat{\subsection}{\sffamily\bfseries\large\raggedright}{}{0pt}{#1}
\titleformat{\subsubsection}[runin]{\itshape\bfseries}{}{0pt}{#1}
\titlespacing*{\section}{0pt}{1.25\baselineskip}{0.25\baselineskip}
\titlespacing*{\subsection}{0pt}{1.25\baselineskip}{0.25\baselineskip}
\RequirePackage{enumitem}
\setlist{noitemsep,topsep=0.5\baselineskip,leftmargin=2\parindent}
\RequirePackage{quoting}
\quotingsetup{font=small,indentfirst=false,begintext={``},endtext={''},vskip=0.5\baselineskip,leftmargin=\parindent,rightmargin=0pt}
\fancyhf{}
\renewcommand{\headrulewidth}{1pt}
\fancyhead[RO]{\footnotesize\@runningtitle}
\fancyhead[LE]{\footnotesize\@runningauthor}
\fancyfoot[LE,RO]{\thepage}
\pagestyle{fancy}
\fancypagestyle{titlepage}{%
\pagestyle{fancy}
\fancyhead[RO]{\footnotesize Page \thepage{} of \pageref{LastPage}}
\fancyhead[LO]{\footnotesize%
\textit{Submission to \@journalname}\\[-\baselineskip]%
\raisebox{-1.25\baselineskip}[0pt][0pt]{doi:xx.xxxx/xxxxx}
}
}
\cfoot{%
\tikz[remember picture,overlay]
\ifnumodd{\thepage}{%
\node[transform shape,rotate=90,anchor=north,yshift=-2pt,text=gray!10,font=\scriptsize] at (current page.west)
}{%
\node[transform shape,rotate=-90,anchor=north,yshift=-2pt,text=gray!10,font=\scriptsize] at (current page.east)
}
{\foreach \n in {1,...,10}{APSR Submission Template\hspace{1em}}};
}
%% Easiest way to get framed floats, both single-column and wide
\RequirePackage[framestyle=fbox,framefit=yes,heightadjust=all,framearound=all,font=sf]{floatrow}
\RequirePackage{booktabs}
\RequirePackage{caption}
\RequirePackage{mdframed}
\newcommand{\makeframedenv}[1]{%
\cspreto{#1}{\begin{mdframed}}
\csappto{end#1}{\end{mdframed}}
}
\AtBeginDocument{%
\@ifpackageloaded{longtable}{
\floatsetup[longtable]{LTcapwidth=table}
\makeframedenv{longtable}
}{}
\@ifpackageloaded{supertabular}{
\makeframedenv{supertabular}
}{}
\@ifpackageloaded{rotating}{
\makeframedenv{sidewaystable}
\makeframedenv{sidewayfigure}
}{}
}
\floatsetup{capposition=top,midcode=rule,}
\captionsetup*{
figurename=FIGURE,tablename=TABLE,
font={bf,sf},
labelsep=period,
justification=justified,
footfont={sf,md,small},
singlelinecheck=false}
\pretocmd{\floatfoot}{\rule{\hsize}{0.4pt}\vskip-0.75em}{}{}
\newcommand{\floatnote}[1]{\floatfoot{\textit{Note: }#1}}
\if@biblatex
\RequirePackage{csquotes}
\RequirePackage[natbib,style=chicago-authordate,backend=biber,sorting=nyt]{biblatex}
\else
\RequirePackage{natbib}
\bibliographystyle{chicago-apsr}
\setcitestyle{aysep={}}
\fi
\renewcommand{\bibfont}{\small}
\endinput
我将 cls 文件放入模板文件所在的文件夹中。编译到一定程度时,它会询问我字体图块 x1xtt.tfm。虽然我尝试安装它,但过程失败(不幸的是,无法安装 txfonts 包。)。因此,我从https://ctan.org/tex-archive/fonts/txfonts/tfm并放入文件夹“C:\Program Files (x86)\MiKTeX 2.9\fonts\tfm\public\newtx”。仍然找不到字体文件,最终没有任何 pdf。
有什么建议吗?谢谢