1

The error is

Runaway argument?
{\@firstoffive }\fi  
! Paragraph ended before \Hy@setref@link was complete.
<to be read again> 
                   \par 
l.61 

This error only occurs when I try to \ref{Sdesign} in Main once the SI.aux is compiled

File 1:

\documentclass[9pt,twocolumn,twoside]{pnas-new}
% Use the lineno option to display guide line numbers if required.
% Note that the use of elements such as single-column equations
% may affect the guide line number alignment.
\usepackage{mathptmx} % gives Times as roman font
\usepackage[T1]{fontenc} % allows access to many extra glyphs
\usepackage{graphicx}
%% \usepackage{caption} included in the class with presets
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{array}
\usepackage{xy}
\usepackage{color}
\usepackage{xr}
\usepackage{listings}
\externaldocument{MWESI}

\templatetype{pnasresearcharticle} % Choose template
\title{Title Title Title Title Title Title Title Title Title}

% Use letters for affiliations, numbers to show equal authorship (if applicable) and to indicate the corresponding author
\author[a,1]{Nicholas A. DeLateur}
\author[b,2]{Ron Weiss}
\affil[a] {Department of Chemistry, Massachusetts Institute of Technology, Cambridge, MA 02139, USA}
\affil[b] {Department of Biological Engineering, Massachusetts Institute of Technology, Cambridge, MA 02139, USA}
% Please give the surname of the lead author for the running footer
\leadauthor{DeLateur}
% Please add here a significance statement to explain the relevance of your work
\significancestatement{Authors must submit a 120-word maximum statement about the significance of their research paper written at a level understandable to an undergraduate educated scientist outside their field of speciality. The primary goal of the Significance Statement is to explain the relevance of the work in broad context to a broad readership. The Significance Statement appears in the paper itself and is required for all research papers.}
% Please include corresponding author, author contribution and author declaration information
\authorcontributions{Please provide details of author contributions here.}
\authordeclaration{The authors declare no conflicts of interest}
\equalauthors{\textsuperscript{1}ND and KMM and DK contributed equally to this work}
\correspondingauthor{\textsuperscript{2}To whom correspondence should be addressed. Tel: +1(617)715-4150; E-mail: rweiss@mit.edu.}

% Keywords are not mandatory, but authors are strongly encouraged to provide them. If provided, please include two to five keywords, separated by the pipe symbol, e.g:
\keywords{Keyword 1 $|$ Keyword 2 $|$ Keyword 3 $|$ ...}

\begin{abstract}
 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\end{abstract}

\dates{This manuscript was compiled on \today}
\doi{\url{www.pnas.org/cgi/doi/10.1073/pnas.XXXXXXXXXX}}

\begin{document}

% Optional adjustment to line up main text (after abstract) of first page with line numbers, when using both lineno and twocolumn options.
% You should only change this length when you've finalised the article contents.
\verticaladjustment{-2pt}

\maketitle
\thispagestyle{firststyle}
\ifthenelse{\boolean{shortarticle}}{\ifthenelse{\boolean{singlecolumn}}{\abscontentformatted}{\abscontent}}{}

% If your first paragraph (i.e. with the \dropcap) contains a list environment (quote, quotation, theorem, definition, enumerate, itemize...), the line after the list may have some extra indentation. If this is the case, add \parshape=0 to the end of the list environment.
\dropcap{M} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit

\ref{Sdesign}

 anim id est laborum.  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

%Materials and Methods
\matmethods{Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.}
\showmatmethods{} % Display the Materials and Methods section

%Acknowledgments
\acknow{Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum..}
\showacknow{} % Display the acknowledgments section

% Bibliography
\bibliography{SEPFref}

\end{document}

File 2:

%v5.29
\documentclass[12pt]{article}
\newcommand{\bluf}[1]{\textcolor{blue}{#1}}
\def\baselinestretch{1.5}
\textwidth=170mm \textheight=240mm \oddsidemargin=0mm
\topmargin=-20mm

\usepackage{mathptmx} % gives Times as roman font
\usepackage[T1]{fontenc} % allows access to many extra glyphs
\usepackage{graphicx}
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{bm}% bold math
\usepackage{latexsym,amssymb,amsmath}
\usepackage{amsthm}
\usepackage{array}
\usepackage{xy}
\usepackage{color}
\usepackage{xr}
\usepackage{amssymb}
\usepackage{caption}
\usepackage{epstopdf}
\externaldocument{MWEmain}

\title{Supplementary Information}
\date{}

\author{}

\begin{document}
\maketitle

\section{System design}
\label{Sdesign}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\end{document}

>

  • Welcome to TeX.SX! Why to you add two files? Plese add a minimal example. You cant reference a label from a different document. If you would combine both files see:When should I use \input vs. \include? – Bobyandbob Jul 19 '17 at 19:00
  • 2
    the command \Hy@setref@link is defined in hyperref, but i don't see that called anywhere; presumably it is loaded by the pnas class, but it certainly is not loaded by article. links for hyperref require five arguments; the "ordinary" \label coding produces only four. that is most likely the cause of the error you report, but there's not enough information given to say more. check the SI.aux file to see how many arguments are given for each newlabel. if only four, it will need to be regenerated with hyperref in attendance. – barbara beeton Jul 20 '17 at 1:41
  • I ran into the same problem with the pnas class and, yes, the problem was differing labels in the .aux files. My main article used hyperref but the external document did not, hence the clash. Loading hyperref in the external document fixed it. Thanks, @barbarabeeton, for the hint! – tmalsburg Aug 15 '18 at 16:00
1

Your PNAS manuscript uses hyperref (via the pnas-new class) but your document containing the supplementary information does not. Hence, the label definitions in SI.aux are not compatible with the main document (hyperref changes the label definitions). The solution is to add \usepackage{hyperref} in SI.tex. Hyperref or the xr package should catch this issue and produce a more informative error message.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.