Me gustaría usar el documentclass
revtex4
y en él me gustaría usar el paquete glossaries-extra
.
Desafortunadamente, cuando pongo los dos juntos, aparece el siguiente mensaje: Error: Missing \glsxtr@resource in aux file. (Have you used \glsxtrresourcefile or \GlsXtrLoadResources?) system returned with code 768
.
Y parece que el glossaries-extra
paquete no puede encontrar mis entradas, pero no veo por qué no debería funcionar. Utilizo el mismo tipo de código para muchos documentos (por \documentclass{article}
ejemplo) sin ningún problema.
Aquí está mi ejemplo mínimo que no funciona aipsamp-test.tex
:
% arara: pdflatex: { synctex: yes, shell: yes, interaction: batchmode }
% arara: pdflatex: { synctex: yes, shell: yes, interaction: batchmode }
%\documentclass[twocolumn]{article}
\documentclass[%
aip,
amsmath, amssymb,
reprint,% Neither reprint nor twocolumn options work.
% twocolumn,
]{revtex4-2} % or revtex4-1.
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\begin{filecontents}{SymbolsAcronymsTest.bib}
@acronym{fem,short= {FEM}, long= {Finite Element Method}}
@symbol{dens,
name={\ensuremath{ \rho }},
description={mass density},
}
\end{filecontents}
\newcommand{\PathSymbolsEntries}{./SymbolsAcronymsTest}%.bib
\usepackage[record, automake]{glossaries-extra}
\newglossary*{acronym}{Abbreviations}
\newglossary*{symbol}{Nomenclature}
\GlsXtrLoadResources[
src={\PathSymbolsEntries},
type={acronym},
match={entrytype=acronym},
]
\GlsXtrLoadResources[
src={\PathSymbolsEntries},
type=symbol,
match={entrytype=symbol},
]
\begin{document}
\title{Sample Title}
\author{A. Author}
\date{\today}
\begin{abstract}
An article usually includes an abstract.
\end{abstract}
\maketitle
\section{First-level heading}
This sample document demonstrates proper use of REV.
$\gls{dens}$, \gls{fem}
\printunsrtglossary[type=acronym]
\printunsrtglossary[type=symbol]
\end{document}
¿Se conocen incompatibilidades? ¿O tienes alguna idea? Gracias de antemano.
Editar
El problema se ve claramente a través del comando de shell:
pdflatex --shell-escape ./aipsamp-test.tex 1>log.txt
pdflatex --shell-escape ./aipsamp-test.tex 1>log.txt
Error: Missing \glsxtr@resource in aux file. (Have you used \glsxtrresourcefile or \GlsXtrLoadResources?)
system returned with code 768
Además, como lo muestra el comando anterior, el error no detiene la compilación sino que solo muestra una advertencia en la terminal. Entonces el problema no aparece en el archivo de registro. Por tanto, creo que el problema viene del glossaries-extra
interior runsystem(bib2gls aipsamp-test)
de la automake
opción.
De lo contrario, en el documento producido, la sección Acrónimo y Nomenclatura están vacías y hay un signo de interrogación donde deberían aparecer rho y FEM, como se puede ver en rojo en la captura de pantalla siguiente.
Aquí está el archivo de registro aipsamp-test.log
generado:
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex 2020.9.17) 17 SEP 2020 16:58
entering extended mode
\write18 enabled.
%&-line parsing enabled.
**./aipsamp-test.tex
(./aipsamp-test.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-03-06>
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/revtex/revtex4-2.cls
Document Class: revtex4-2 2019/01/18/14:29:48 4.2c (https://journals.aps.org/re
vtex/ for documentation)
Copyright (c) 2019 American Physical Society.
mailto:[email protected]
Licensed under the LPPL:
http://www.ctan.org/tex-archive/macros/latex/base/lppl.txt
Arthur Ogawa <arthur_ogawa at sbcglobal dot net>
Based on work by David Carlisle <david at dcarlisle.demon.co.uk>Version (4.2c)
: Modified by Mark Doyle
.
ltxutil[2019/01/18/14:29:48 4.2c utilities package (portions licensed from W. E
. Baxter web at superscript.com)]
LaTeX Info: Redefining \@centercr on input line 315.
Class revtex4-2 Info: Repairing broken LaTeX eqnarray on input line 365.
\eqncolsep=\skip47
Class revtex4-2 Info: Repairing hyperref-unfriendly LaTeX definition of \mpfoot
note on input line 440.
Class revtex4-2 Info: Repairing broken LateX \@sect on input line 762.
\intertabularlinepenalty=\count167
\@tbpen=\count168
\@arstrutbox@hline=\box45
Class revtex4-2 Info: Repairing broken LaTeX \@xbitor on input line 1793.
Class revtex4-2 Info: Making \typeout \long on input line 2053.
ltxfront[2019/01/18/14:29:48 4.2c frontmatter package (AO,DPC,MD)]
\c@affil=\count169
\c@collab=\count170
\absbox=\box46
ltxgrid[2019/01/18/14:29:48 4.2c page grid package (portions licensed from W. E
. Baxter web at superscript.com)]
\c@linecount=\count171
\output@latex=\toks15
\box@size@1=\box47
\box@size@2=\box48
\@protection@box=\box49
\@topmark@saved=\toks16
\footins@saved=\box50
\footins@recovered=\box51
\column@recovered=\box52
\pagesofar=\box53
\footsofar=\box54
\pagegrid@col=\count172
Class revtex4-2 Warning: Failed to recognize \@vspace, \@vspacer, \@no@pgbk, \@
newline, and \\; no patches applied. Please get a more up-to-date class, .
\c@part=\count173
\c@section=\count174
\c@subsection=\count175
\c@subsubsection=\count176
\c@paragraph=\count177
\c@subparagraph=\count178
\abovecaptionskip=\skip48
\belowcaptionskip=\skip49
\c@figure=\count179
\fbox@1=\box55
\c@table=\count180
\fbox@2=\box56
\c@video=\count181
\fbox@4=\box57
\@bibdataout=\write3
\widetext@top=\box58
\widetext@bot=\box59
Class revtex4-2 Info: Selecting society aip on input line 7581.
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/revtex/aip4-2.rtx
File: aip4-2.rtx 2019/01/18/14:29:48 4.2c AIP substyle for REVTeX
Class revtex4-2 Info: RevTeX society AIP selected on input line 87.
)
Class revtex4-2 Warning: No journal specified, using default cha.
Using journal substyle cha.
Class revtex4-2 Info: Reading file aps10pt4-2.rtx on input line 7586.
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/revtex/aps10pt4-2.rtx
File: aps10pt4-2 2019/01/18/14:29:48 4.2c (https://journals.aps.org/revtex/ for
documentation)
Class revtex4-2 Info: RevTeX pointsize 10pt selected on input line 36.
)
Class revtex4-2 Info: Overriding 10pt on input line 7586.
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/textcase/textcase.sty
Package: textcase 2019/09/14 v1.00 Text only upper/lower case changing (DPC)
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/amsfonts/amssymb.sty
Package: amssymb 2013/01/14 v3.01 AMS font symbols
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/amsfonts/amsfonts.sty
Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
\@emptytoks=\toks17
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info: Redeclaring math symbol \hbar on input line 98.
LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold'
(Font) U/euf/m/n --> U/euf/b/n on input line 106.
))
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2020/01/20 v2.17e AMS math features
\@mathmargin=\skip50
For additional information on amsmath, use the `?' option.
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2000/06/29 v2.01 AMS text
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks18
\ex@=\dimen134
)
LaTeX Info: Redefining \text on input line 28.
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen135
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/amsmath/amsopn.sty
Package: amsopn 2016/03/08 v2.02 operator names
)
\inf@bad=\count182
LaTeX Info: Redefining \frac on input line 227.
\uproot@=\count183
\leftroot@=\count184
LaTeX Info: Redefining \overline on input line 389.
\classnum@=\count185
\DOTSCASE@=\count186
LaTeX Info: Redefining \ldots on input line 486.
LaTeX Info: Redefining \dots on input line 489.
LaTeX Info: Redefining \cdots on input line 610.
\Mathstrutbox@=\box60
\strutbox@=\box61
\big@size=\dimen136
LaTeX Font Info: Redeclaring font encoding OML on input line 733.
LaTeX Font Info: Redeclaring font encoding OMS on input line 734.
\macc@depth=\count187
\c@MaxMatrixCols=\count188
\dotsspace@=\muskip16
\c@parentequation=\count189
\dspbrk@lvl=\count190
\tag@help=\toks19
\row@=\count191
\column@=\count192
\maxfields@=\count193
\andhelp@=\toks20
\eqnshift@=\dimen137
\alignsep@=\dimen138
\tagshift@=\dimen139
\tagwidth@=\dimen140
\totwidth@=\dimen141
\lineht@=\dimen142
\@envbody=\toks21
\multlinegap=\skip51
\multlinetaggap=\skip52
\mathdisplay@stack=\toks22
LaTeX Info: Redefining \[ on input line 2859.
LaTeX Info: Redefining \] on input line 2860.
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/url/url.sty
\Urlmuskip=\muskip17
Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc.
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/natbib/natbib.sty
Package: natbib 2010/09/13 8.31b (PWD, AO)
\bibhang=\skip53
\bibsep=\skip54
LaTeX Info: Redefining \cite on input line 694.
\c@NAT@ctr=\count194
)
Class revtex4-2 Info: Repairing natbib's \BibitemShut on input line 7588.
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/revtex/revsymb4-2.sty
Package: revsymb4-2 2019/01/18/14:29:48 4.2c (https://journals.aps.org/revtex/
for documentation)
LaTeX Info: Redefining \frak on input line 101.
LaTeX Info: Redefining \Bbb on input line 117.
LaTeX Info: Redefining \REV@mathfrak on input line 125.
))
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2018/08/11 v1.3c Input encoding file
\inpenc@prehook=\toks23
\inpenc@posthook=\toks24
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2020/02/11 v2.0o Standard LaTeX package
)
LaTeX Warning: File `SymbolsAcronymsTest.bib' already exists on the system.
Not generating it from this source.
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/glossaries-extra/glossaries-e
xtra.sty
Package: glossaries-extra 2020/03/23 v1.44 (NLCT)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/xkeyval/xkeyval.sty
Package: xkeyval 2014/12/03 v2.7a package option processing (HA)
(/Applis/TexLive/texlive2020/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/Applis/TexLive/texlive2020/texmf-dist/tex/generic/xkeyval/xkvutils.tex
\XKV@toks=\toks25
\XKV@tempa@toks=\toks26
(/Applis/TexLive/texlive2020/texmf-dist/tex/generic/xkeyval/keyval.tex))
\XKV@depth=\count195
File: xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
))
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2019/09/21 v2.5h e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count196
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/glossaries/base/glossaries.st
y
Package: glossaries 2020/03/19 v4.46 (NLCT)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/mfirstuc/mfirstuc.sty
Package: mfirstuc 2017/11/14 v2.06 (NLCT)
\@glsmfirst=\toks27
\@glsmrest=\toks28
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/xfor/xfor.sty
Package: xfor 2009/02/05 v1.05 (NLCT)
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/datatool/datatool-base.sty
Package: datatool-base 2019/09/27 v2.32 (NLCT)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/substr/substr.sty
Package: substr 2009/10/20 v1.2 Handle substrings
\c@su@anzahl=\count197
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/datatool/datatool-fp.sty
Package: datatool-fp 2019/09/27 v2.32 (NLCT)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/fp/fp.sty
Package: fp 1995/04/02
`Fixed Point Package', Version 0.8, April 2, 1995 (C) Michael Mehlich
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/fp/defpattern.sty
Package: defpattern 1994/10/12
\actioncount=\count198
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/fp/fp-basic.sty
Package: fp-basic 1996/05/13
\FP@xs=\count199
\FP@xia=\count266
\FP@xib=\count267
\FP@xfa=\count268
\FP@xfb=\count269
\FP@rega=\count270
\FP@regb=\count271
\FP@regs=\count272
\FP@times=\count273
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/fp/fp-addons.sty
Package: fp-addons 1995/03/15
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/fp/fp-snap.sty
Package: fp-snap 1995/04/05
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/fp/fp-exp.sty
Package: fp-exp 1995/04/03
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/fp/fp-trigo.sty
Package: fp-trigo 1995/04/14
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/fp/fp-pas.sty
Package: fp-pas 1994/08/29
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/fp/fp-random.sty
Package: fp-random 1995/02/23
\FPseed=\count274
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/fp/fp-eqn.sty
Package: fp-eqn 1995/04/03
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/fp/fp-upn.sty
Package: fp-upn 1996/10/21
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/fp/fp-eval.sty
Package: fp-eval 1995/04/03
)))
\@dtl@toks=\toks29
\@dtl@tmpcount=\count275
\dtl@tmplength=\skip55
\dtl@sortresult=\count276
\@dtl@numgrpsepcount=\count277
\@dtl@datatype=\count278
\dtl@codeA=\count279
\dtl@codeB=\count280
\@dtl@foreach@level=\count281
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/glossaries/base/glossaries-co
mpatible-307.sty
Package: glossaries-compatible-307 2020/03/19 v4.46 (NLCT)
)
\gls@level=\count282
\@gls@tmpb=\toks30
\gls@tmplen=\skip56
\glskeylisttok=\toks31
\glslabeltok=\toks32
\glsshorttok=\toks33
\glslongtok=\toks34
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/glossaries/styles/glossary-hy
pernav.sty
Package: glossary-hypernav 2020/03/19 v4.46 (NLCT)
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/glossaries/styles/glossary-li
st.sty
Package: glossary-list 2020/03/19 v4.46 (NLCT)
\glslistdottedwidth=\skip57
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/glossaries/styles/glossary-lo
ng.sty
Package: glossary-long 2020/03/19 v4.46 (NLCT)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/tools/longtable.sty
Package: longtable 2020/01/07 v4.13 Multi-page Table package (DPC)
\LTleft=\skip58
\LTright=\skip59
\LTpre=\skip60
\LTpost=\skip61
\LTchunksize=\count283
\LTcapwidth=\dimen143
\LT@head=\box62
\LT@firsthead=\box63
\LT@foot=\box64
\LT@lastfoot=\box65
\LT@cols=\count284
\LT@rows=\count285
\c@LT@tables=\count286
\c@LT@chunks=\count287
\LT@p@ftn=\toks35
)
\glsdescwidth=\skip62
\glspagelistwidth=\skip63
)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/glossaries/styles/glossary-su
per.sty
Package: glossary-super 2020/03/19 v4.46 (NLCT)
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/supertabular/supertabular.sty
Package: supertabular 2020/02/02 v4.1g the supertabular environment
\c@tracingst=\count288
\ST@wd=\dimen144
\ST@rightskip=\skip64
\ST@leftskip=\skip65
\ST@parfillskip=\skip66
\ST@pageleft=\dimen145
\ST@headht=\dimen146
\ST@tailht=\dimen147
\ST@pagesofar=\dimen148
\ST@pboxht=\dimen149
\ST@lineht=\dimen150
\ST@prevht=\dimen151
\ST@toadd=\dimen152
\ST@dimen=\dimen153
\ST@pbox=\box66
))
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/glossaries/styles/glossary-tr
ee.sty
Package: glossary-tree 2020/03/19 v4.46 (NLCT)
\glstreeindent=\skip67
))
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/glossaries-extra/glossaries-e
xtra-bib2gls.sty
Package: glossaries-extra-bib2gls 2020/03/23 v1.44 (NLCT)
)
\@glsxtr@leveloffset=\count289
\glsxtrresourcecount=\count290
\@glsxtrnewgls@inner=\count291
\glsshortpltok=\toks36
\glslongpltok=\toks37
)
runsystem(bib2gls aipsamp-test)...executed.
Package glossaries-extra Warning: No file `aipsamp-test.glstex' on input line 3
3.
Package glossaries-extra Warning: No file `aipsamp-test-1.glstex' on input line
39.
Class revtex4-2 Info: Unrecognized LaTeX tabular. Please update this document c
lass! (Proceeding with fingers crossed.) on input line 41.
Class revtex4-2 Info: Patching unrecognized longtable package. (Proceeding with
fingers crossed) on input line 41.
Class revtex4-2 Info: cite was not loaded (OK!) on input line 41.
Class revtex4-2 Info: mcite was not loaded (OK!) on input line 41.
Class revtex4-2 Info: multicol was not loaded (OK!) on input line 41.
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.d
ef
File: l3backend-pdfmode.def 2020-03-12 L3 backend support: PDF mode
\l__kernel_color_stack_int=\count292
\l__pdf_internal_box=\box67
) (./aipsamp-test.aux)
\openout1 = `aipsamp-test.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 41.
LaTeX Font Info: ... okay on input line 41.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 41.
LaTeX Font Info: ... okay on input line 41.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 41.
LaTeX Font Info: ... okay on input line 41.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 41.
LaTeX Font Info: ... okay on input line 41.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 41.
LaTeX Font Info: ... okay on input line 41.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 41.
LaTeX Font Info: ... okay on input line 41.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 41.
LaTeX Font Info: ... okay on input line 41.
\openout3 = `aipsamp-testNotes.bib'.
Class revtex4-2 Warning: Assuming \noaffiliation for authors.
LaTeX Font Info: Trying to load font information for T1+cmss on input line 4
8.
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/base/t1cmss.fd
File: t1cmss.fd 2019/12/16 v2.5j Standard LaTeX font definitions
)
LaTeX Font Info: Trying to load font information for U+msa on input line 52.
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/amsfonts/umsa.fd
File: umsa.fd 2013/01/14 v3.01 AMS symbols A
)
LaTeX Font Info: Trying to load font information for U+msb on input line 52.
(/Applis/TexLive/texlive2020/texmf-dist/tex/latex/amsfonts/umsb.fd
File: umsb.fd 2013/01/14 v3.01 AMS symbols B
)
Package glossaries-extra Warning: Glossary entry `dens' has not been defined on
input line 52.
Package glossaries-extra Warning: Glossary entry `fem' has not been defined on
input line 52.
Package glossaries-extra Warning: No entries defined in glossary `acronym' on i
nput line 54.
Package glossaries-extra Warning: No entries defined in glossary `symbol' on in
put line 55.
No file aipsamp-test.bbl.
No file aipsamp-test.bbl.
[1{/Applis/TexLive/texlive2020/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./aipsamp-test.aux) )
Here is how much of TeX's memory you used:
9602 strings out of 480608
149647 string characters out of 5901651
505453 words of memory out of 5000000
25383 multiletter control sequences out of 15000+600000
540170 words of font info for 40 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
59i,4n,41p,1053b,329s stack positions out of 5000i,500n,10000p,200000b,80000s
{/Applis/TexLive/texlive2020/texmf-dist/fonts/enc/dvips/c
m-super/cm-super-t1.enc}</Applis/TexLive/texlive2020/texmf-dist/fonts/type1/pub
lic/amsfonts/cm/cmr10.pfb></Applis/TexLive/texlive2020/texmf-dist/fonts/type1/p
ublic/cm-super/sfrm0900.pfb></Applis/TexLive/texlive2020/texmf-dist/fonts/type1
/public/cm-super/sfrm1000.pfb></Applis/TexLive/texlive2020/texmf-dist/fonts/typ
e1/public/cm-super/sfss1000.pfb></Applis/TexLive/texlive2020/texmf-dist/fonts/t
ype1/public/cm-super/sfsx0900.pfb></Applis/TexLive/texlive2020/texmf-dist/fonts
/type1/public/cm-super/sfsx1440.pfb>
Output written on aipsamp-test.pdf (1 page, 75208 bytes).
PDF statistics:
33 PDF objects out of 1000 (max. 8388607)
23 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
Continué las investigaciones y parece que el problema proviene de la opción reprint
en \documentclass
: al comentar esta opción, la compilación no devuelve ningún error y el documento se ve como se esperaba. Sin embargo, el diseño es completamente diferente sin esta opción. También noto el mismo problema con la opción twocolumn
. Pero persiste la pregunta de por qué estas opciones generan problemas.
Respuesta1
El problema es esencialmente que
\documentclass[twocolumn]{revtex4-2}
\makeatletter
\protected@write\@auxout{}{\gdef\string\foo{bar}}
\makeatother
\begin{document}
\maketitle
A
\end{document}
no escribe \gdef \foo{bar}
en el archivo auxiliar. No sé por qué, funciona cuando twocolumn
no está activo, también funciona si \maketitle
se omite, funciona si se escribe algún texto antes \maketitle
, pero si \maketitle
es lo primero que se escribe en twocolumn
ciertas llamadas para \@auxout
no aparecer.
Pensé que esto podría estar relacionado con elnuevos ganchos de látexque revtex ahora usa con versiones suficientemente recientes de látex, pero al probar en Overleaf parece que puedo replicar esto en TL 2014 (en lo que respecta a Overleaf) con revtex4
y revtex4-1
.
Si bien la mayor parte del archivo auxiliar sale correctamente, el \glsxtr@resource
que \GlsXtrLoadResources
debería haberse escrito no, en el fondo se utiliza \protected@write\@auxout
para generarlo. Con un par de parches \GlsXtrLoadResources
y \glsxtrresourcefile
podemos retrasar la escritura en el archivo auxiliar hasta \end{document}
que se escriban correctamente.
% arara: pdflatex: { synctex: yes, shell: yes, interaction: batchmode }
% arara: pdflatex: { synctex: yes, shell: yes, interaction: batchmode }
\begin{filecontents}{SymbolsAcronymsTest.bib}
@acronym{fem,short= {FEM}, long= {Finite Element Method}}
@symbol{dens,
name={\ensuremath{ \rho }},
description={mass density},
}
\end{filecontents}
\documentclass[twocolumn]{revtex4-2}
\usepackage[record,automake]{glossaries-extra}
\newglossary*{acronym}{Abbreviations}
\newglossary*{symbol}{Nomenclature}
\makeatletter
% patch some recent changes to the \GlsXtrLoadResources and
% \glsxtrresourcefile macros so the redefinitions below should
% also work with earlier versions of glossaries-extra
\providecommand{\glsindexingsetting}{}
\providecommand{\glsxtr@save@mfu}{}
\renewcommand*{\GlsXtrLoadResources}[1][]{%
\ifnum\glsxtrresourcecount=0\relax
\glsxtrresourcefile[#1]{\jobname}%
\else
\edef\glsxtrresourcefilename{\jobname-\the\glsxtrresourcecount}% <--- ADDED
\glsxtrresourcefile[#1]{\glsxtrresourcefilename}% <--- MODIFIED
\fi
\advance\glsxtrresourcecount by 1\relax
}
\renewcommand*{\glsxtrresourcefile}[2][]{%
\@glsxtr@if@record@only
{\renewcommand{\glsindexingsetting}{bib2gls}}%
{\edef\glsindexingsetting{bib2gls-\ifglsxindy xindy\else makeindex\fi}}%
\disable@keys{glossaries-extra.sty}{record}%
\glsxtr@writefields
\glsxtr@save@mfu
\ifdefempty\GlsXtrDefaultResourceOptions
{%
\AtEndDocument{% <--- ADDED
\protected@write\@auxout{\glsxtrresourceinit}%
{\string\glsxtr@resource{#1}{#2}}%
}% <--- ADDED
}%
{%
\AtEndDocument{% <--- ADDED
\protected@write\@auxout{\glsxtrresourceinit}%
{\string\glsxtr@resource{\GlsXtrDefaultResourceOptions,#1}{#2}}%
}% <--- ADDED
}%
\let\@glsxtr@org@see@noindex\@gls@see@noindex
\let\@gls@see@noindex\relax
\IfFileExists{#2.glstex}%
{%
\edef\@bibgls@restoreat{\noexpand\catcode\noexpand`\noexpand\@=\number\catcode`\@}%
\makeatletter
\@input{#2.glstex}%
\@bibgls@restoreat
\@glsxtr@check@bibgls@nameref
}%
{%
\GlossariesExtraWarning{No file `#2.glstex'}%
}%
\let\@gls@see@noindex\@glsxtr@org@see@noindex
}
\makeatother
\GlsXtrLoadResources[
src={./SymbolsAcronymsTest},
type={acronym},
match={entrytype=acronym},
]
\GlsXtrLoadResources[
src={./SymbolsAcronymsTest},
type={symbol},
match={entrytype=symbol},
]
\begin{document}
\maketitle
\gls{dens}, \gls{fem}
\printunsrtglossary[type=acronym]
\printunsrtglossary[type=symbol]
\end{document}
En lugar de alterar las partes internas de glossaries-extra
, escribir cualquier cosa antes \maketitle
también evitará el problema, por lo que
\documentclass[twocolumn]{revtex4-2}
\makeatletter
\protected@write\@auxout{}{\gdef\string\foo{bar}}
\makeatother
\begin{document}
\rule{0pt}{0pt}
\maketitle
A
\end{document}
proporciona un archivo auxiliar preciso, pero esto reduce notablemente cualquier título, a pesar de que la regla en sí es de tamaño cero.
El archivo auxiliar poco fiable sólo parece afectar a las llamadas externas (makeglossaries
/ bib2gls
), por lo que (como se sugiere enesta respuesta) probablemente sea suficiente cambiar onecolumn
y compilar una vez antes de realizar esas llamadas externas y luego volver a hacerlo twocolumn
. Será necesario repetir esto cada vez que desee actualizar un glosario.