我有这个错误让我很抓狂:
Argument of \ttl@gmk has an extra }. \begin{thebibliography}{112}
然后还有
Paragraph ended before \ttl@gmk was complete. \begin{thebibliography}{112}
。
显然,计算参考书目时出现了问题。但是,我检查了references.bib
文件中的所有参考书目条目,一切似乎都正常。我还检查了\cite{}
tex 文件中的所有调用,这里一切似乎都正常。
如果我不使用该命令打印参考书目,\bibliography{references}
则不会出现错误。
我使用 texstudio 和 overleaf。两者都给出了相同的错误。但是,overleaf 生成了最终的 pdf,而 texstudio 没有。在 pdf 文件中我没有看到任何问题。
main.tex
在我的文件下面
\documentclass{NSF}
\usepackage[most]{tcolorbox}
\usepackage{enumitem}
\definecolor{amber}{rgb}{1.0, 0.75, 0.0}
\definecolor{palegold}{rgb}{0.9, 0.75, 0.54}
% BT: this file has a bunch of useful macros:
\input{BT_commands.tex}
% BT: this file holds journal abbreviations:
\input{journals.tex}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathptmx}
\usepackage[rightcaption]{sidecap}
\usepackage{enumitem}
\usepackage{bm}
\usepackage{amsmath}
\usepackage{gensymb}
\usepackage{subfigure}
\usepackage{multirow}
\usepackage{array}
\usepackage{hhline}
\usepackage{hyperref}
\usepackage{natbib}
\bibliographystyle{plainnat}
\setlength{\bibsep}{2.0pt}
\setcitestyle{aysep={}}
\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref}
\setlength\parindent{0pt}
\setlength{\parskip}{6pt}%anything smaller than 4pt looks bad
\usepackage[labelfont=bf,font=footnotesize]{caption}
\captionsetup{width=.99\textwidth}
\usepackage{wrapfig}
\usepackage{comment}
\newcommand\gamornet{G\textsc{a}M\textsc{or}N\textsc{et}}
\newcommand\gamornettwo{G\textsc{a}M\textsc{or}N\textsc{et}II}
\begin{document}
\title{\Large Title}
\newsection{B}
\vspace{-0.2in}
\input{sections/summary}
% C. Table of Contents
% A Table of Contents is automatically generated for the proposal by FastLane
% D. Project Description
\newpage\newsection{C}
\input{sections/description}
% E. References Cited
\newpage\newsection{D}
\bibliography{references}
\clearpage
% G. Budget Justification
\newpage\newsection{F}
\input{sections/budget}
\newpage\newsection{F}
\input{sections/budget_CMU}
% I. Facilities, Equipment and Other Resources
\newpage\newsection{G}
\input{sections/resources}
% J. Special Information and Supplementary Documentation
\newpage\newsection{I}
\input{sections/data} % Data Management Plan (Required)
\newpage\newsection{J}
\input{sections/SuggestedReviewers}
\newpage
\input{sections/ReviewersNotToInclude}
\end{document}
有什么建议么?
编辑:如果我注释掉这些\input{}
行,我会得到同样的错误。bib 条目示例:
@ARTICLE{assef2018,
author = {{Assef}, R.~J. and {Stern}, D. and {Noirot}, G. and {Jun}, H.~D. and
{Cutri}, R.~M. and {Eisenhardt}, P.~R.~M.},
title = "{The WISE AGN Catalog}",
journal = {\apjs},
keywords = {galaxies: active, infrared: general, quasars: general, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics},
year = 2018,
month = feb,
volume = {234},
number = {2},
eid = {23},
pages = {23},
doi = {10.3847/1538-4365/aaa00a},
archivePrefix = {arXiv},
eprint = {1706.09901},
primaryClass = {astro-ph.GA},
adsurl = {https://ui.adsabs.harvard.edu/abs/2018ApJS..234...23A},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
@article{Hausen2020,
archivePrefix = {arXiv},
arxivId = {1906.11248},
author = {Hausen, Ryan and Robertson, Brant E.},
doi = {10.3847/1538-4365/ab8868},
eprint = {1906.11248},
issn = {0067-0049},
journal = {The Astrophysical Journal Supplement Series},
keywords = {Computational methods,Convolutional neural networks,Extragalactic astronomy,GPU computing,Galaxies,Galaxy classification systems},
month = {may},
number = {1},
pages = {20},
publisher = {American Astronomical Society},
title = {{ Morpheus : A Deep Learning Framework for the Pixel-level Analysis of Astronomical Image Data }},
url = {https://doi.org/10.3847/1538-4365/ab8868},
volume = {248},
year = {2020}
}
文档类 NSF 是以下NSF.cls
文件
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{NSF}
\LoadClass[11pt, letterpaper, times, onecolumn]{article}
\RequirePackage[margin=1.02in]{geometry}
\RequirePackage[pdftex,colorlinks,linkcolor=black,citecolor=black,urlcolor=black,filecolor=black]{hyperref}
\RequirePackage{threeparttable}
\RequirePackage{booktabs, caption, makecell}
\RequirePackage[pdftex]{graphicx}
\DeclareGraphicsExtensions{.eps,.pdf,.jpeg,.png}
\RequirePackage{fancyhdr}
\pagestyle{fancyplain}
\renewcommand{\headrulewidth}{0pt}
\fancyhf{}
\fancyfoot[R]{\thepage}
\RequirePackage{titlecaps}
\RequirePackage[explicit]{titlesec}
\titleformat{\section}{\Large\bfseries\filcenter}{}{0pt}{\titlecap{#1}\\\rule{\textwidth}{0.4pt}}
\titleformat{\subsection}{\large\bfseries}{}{0pt}{\titlecap{#1}}
\titleformat{\subsubsection}{\bfseries}{}{0pt}{\titlecap{#1}}
%\titlespacing*{\section}{0pt}{0.5em}{0.3pt}
%\titlespacing*{\subsection}{0pt}{0.35em}{0pt}
%\titlespacing*{\subsubsection}{0pt}{0.25em}{0pt}
\renewcommand{\title}[1]{\begin{center}\LARGE\bfseries{#1}\end{center}}
% Reset page numbering to 1. This is helpful, since the text can only
% be 15 pages (unless otherwise specified, see individual solicitations),
% and reviewers will want to believe we've kept it within those limits
\newcommand{\newsection}[1]{\pagenumbering{arabic}\renewcommand{\thepage}{#1--\arabic{page}}}
答案1
错误消息Argument of \ttl@gmk has an extra }
来自使用的包titlesec
,或者更好的是错误是由命令引起的\titleformat
。
如果你像这样注释掉所有这些命令:
\RequirePackage{titlecaps}
\RequirePackage[explicit]{titlesec}
%\titleformat{\section}{\Large\bfseries\filcenter}{\thesection}{0pt}{\titlecap{#1}\\\rule{\textwidth}{0.4pt}}
%\titleformat{\subsection}{\large\bfseries}{\thesubsection}{0pt}{\titlecap{#1}}
%\titleformat{\subsubsection}{\bfseries}{\thesubsubsection}{0pt}{\titlecap{#1}}
%%\titlespacing*{\section}{0pt}{0.5em}{0.3pt}
%%\titlespacing*{\subsection}{0pt}{0.35em}{0pt}
%%\titlespacing*{\subsubsection}{0pt}{0.25em}{0pt}
在您的课程中,NFS
该文档编译时会出现一个正确的错误(缺少定义\apjs
),符合以下参考书目:
因为我不使用包,所以titlesec
我无法帮助您搜索错误,但对我来说,它似乎来自于您使用\titlecap{#1}
的\titleformat
...