<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div>On 28 Jun2021, at 6:32 PM, Herbert Schulz <<a href="mailto:herbs@wideopenwest.com" class="">herbs@wideopenwest.com</a>> wrote:<br class=""><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><meta charset="UTF-8" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">On Jun 28, 2021, at 4:08 PM, Murray Eisenberg <<a href="mailto:murrayeisenberg@gmail.com" class="">murrayeisenberg@gmail.com</a>> wrote:<br class=""><br class="">A _very_ peculiar thing happens from time to time when running pdflatexmk -- or just running latex 3 times! -- in TeXShop 4.64 (under macOS 11.4) with TeXLive 2021 on a book-length document whose body consists of many subsidiary files: the cross-reference to one particular theorem with a \label disappears (it was there after the 3nd latex run!!) and so the \cref to that label gives a “??” in the output.<br class=""><br class="">The really peculiar thing is that if I just run typeset twice with the latex engine, everything is OK. It’s only when I then run pdflatexmk (with or without first Trashing all aux files), or after doing 3 consecutive latex runs, that the cross-reference cannot be resolved.  <br class=""><br class="">To make sure I did not accidentally put some non-printing character in the label when referencing it, I carefully retyped the original \label{…} command and did a copy-and-past of the argument there to the argument of the subsequent \cref.<br class=""><br class="">This has happened with _different_ theorems’ labels at different times while working on this document!<br class=""><br class="">In each case, the errant label will have the form “kind:long-label-hyphens-separating” where ‘kind’ might be ’thm”, e.g. The particular label creating the problem at the moment is in:<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;">   </span>\begin{theorem}%<br class=""><span class="Apple-tab-span" style="white-space: pre;">     </span>\label{thm:sup-metric-bded-cont-complete}<br class=""><span class="Apple-tab-span" style="white-space: pre;">    </span><br class=""><span class="Apple-tab-span" style="white-space: pre;">     </span>Let $(X, d)$ be a metric space….<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;">      </span>\end{theorem}<br class=""><br class="">and the missing reference after the latex engine runs the third time occurs later in the same inputted source file in:<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;">   </span>In other words, in the notation of \cref{thm:sup-metric-bded-cont-complete},<br class=""><br class="">Here’s the relevant portion of the .aux file after the 2nd latex run:<br class=""><br class="">\newlabel{thm:sup-metric-bded-cont-complete}{{\M@TitleReference {1.85}{Completeness of sequence and functions spaces}}{200}{}{theorem.1.5.85}{}}<br class="">\newlabel{thm:sup-metric-bded-cont-complete@cref}{{[theorem][85][1]1.85}{[1][200][]200}}<br class="">\@writefile{lla}{\defcounter {refsection}{0}\relax }\@writefile{lla}{\contentsline {chapter}{\numberline {\crtrefnumber{thm:sup-metric-bded-cont-complete}}thm:sup-metric-bded-cont-complete}{200}{theorem.1.5.85}\protected@file@percent }<br class=""><br class=""><br class="">The preamble is very complicated but includes this, in case it matters to diagnosing the problem:<br class=""><br class="">\usepackage[T2A,T1]{fontenc}<br class="">%\usepackage{amsmath}<span class="Apple-tab-span" style="white-space: pre;">      </span>% avoid \dddot clash<br class="">\usepackage{mathtools}<span class="Apple-tab-span" style="white-space: pre;">   </span>% avoid unicode-math clash<br class="">\usepackage{amsthm}<span class="Apple-tab-span" style="white-space: pre;">        </span>% avoid openbox clash<br class="">\usepackage[russian,french,ngerman,polish,english]{babel}<br class=""><br class="">\RequirePackage[refpage,norefeq,intoc,english,cfg]{nomencl}<br class="">\usepackage[pdfa]{hyperref}<br class="">\hypersetup{<br class=""> unicode,<br class=""> pdfapart=2, pdfaconformance=u,<br class=""> bookmarksnumbered,bookmarksopen=true,bookmarksopenlevel=3,<br class=""> breaklinks=true,<br class=""> colorlinks, citecolor=red, filecolor=defaultcolor, linkcolor=blue, urlcolor=blue,<br class=""> linktocpage=true,linktoc=all,<br class="">}<br class="">\usepackage[user,hyperref]{zref}%{zref-base,zref-user}<br class="">\zref@newprop*{pagedest}[Doc-Start]{page.\@the@H@page}<br class="">\zref@addprop{main}{pagedest}<br class="">\newcommand\hyperpageref[1]{\hyperlink{\zref@extract{#1}{pagedest}}{\pageref*{#1}}}<br class="">%<br class="">\RequirePackage[nameinlink,noabbrev,capitalize]{cleveref}<br class="">%<br class="">\RequirePackage{crossreftools}<br class="">% Fix to crossreftools<br class="">% <a href="https://tex.stackexchange.com/a/512175/13492" class="">https://tex.stackexchange.com/a/512175/13492</a><br class="">\renewcommand{\@@crtextr@ct@ref}[2]{%<br class=""> \expandafter\@@@crtextr@ct@ref\expandafter{\detokenize{#2}}{#1}%<br class="">}<br class="">\newcommand{\@@@crtextr@ct@ref}[2]{%<br class=""> \expandafter\ifx\csname r@#1\endcsname\relax<br class=""> \crt@refundefined%<br class=""> \else<br class=""> \expandafter\expandafter\csname crt@ref@splitter@#2\endcsname\csname r@#1\endcsname%<br class=""> \fi<br class="">}<br class=""><br class="">I would be happy to provide an archive of the entire book project’s files to anybody who might help in resolving this peculiar cross-reference error.<br class=""><br class="">---<br class="">Murray Eisenberg<span class="Apple-tab-span" style="white-space: pre;">      </span><span class="Apple-tab-span" style="white-space: pre;">  </span><a href="mailto:murrayeisenberg@gmail.com" class="">murrayeisenberg@gmail.com</a><br class=""></blockquote><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Howdy,</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">You say you have multiple files? Do you \include or \input the files? When you clean the aux files do you clean ALL the aux files including the files that are \include'd?</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">If you can find a way to make the document files available I'm willing to take a look at the problem but can't make a promise to solve your problem.</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""></div></blockquote><br class=""></div><div>All the files are obtained through \input and none through \include.</div><br class=""></body></html>