-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using hyperref in iucr package will trigger some errors. #279
Comments
please provide a complete example and show your full log. this gives no error with pdflatex or latex in texlive 2023
|
you are probably already loading hyperref before (with other options). |
@davidcarlisle For your example, the same error still occurs in my case: $ cat test.tex
\documentclass{iucr}
\usepackage[unicode=true,
bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
breaklinks=false,pdfborder={0 0 0},pdfborderstyle={},backref=false,colorlinks=true]
{hyperref}
\begin{document}
This is a test!
\end{document}
$ pdflatex test.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-04-20> (./iucr.cls
Document Class: iucr 2021/03/05 IUCr article/chapter class
(/opt/texlive/2023/texmf-dist/tex/latex/tools/multicol.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/psnfss/times.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/graphics/graphics.sty
(/opt/texlive/2023/texmf-dist/tex/latex/graphics/trig.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/opt/texlive/2023/texmf-dist/tex/latex/graphics-def/dvips.def))
(/opt/texlive/2023/texmf-dist/tex/latex/float/float.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/tools/tabularx.sty
(/opt/texlive/2023/texmf-dist/tex/latex/tools/array.sty))
(/opt/texlive/2023/texmf-dist/tex/generic/dvips/colordvi.tex)
(/opt/texlive/2023/texmf-dist/tex/latex/base/article.cls
Document Class: article 2022/07/02 v1.4n Standard LaTeX document class
(/opt/texlive/2023/texmf-dist/tex/latex/base/size10.clo))
(/opt/texlive/2023/texmf-dist/tex/latex/harvard/harvard.sty
(/opt/texlive/2023/texmf-dist/tex/latex/base/ifthen.sty)
(/opt/texlive/texmf-local/tex/latex/html/html.sty
(/opt/texlive/2023/texmf-dist/tex/latex/hyperref/hyperref.sty
(/opt/texlive/2023/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty)
(/opt/texlive/2023/texmf-dist/tex/generic/iftex/iftex.sty)
(/opt/texlive/2023/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
(/opt/texlive/2023/texmf-dist/tex/generic/infwarerr/infwarerr.sty))
(/opt/texlive/2023/texmf-dist/tex/latex/graphics/keyval.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty)
(/opt/texlive/2023/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty)
(/opt/texlive/2023/texmf-dist/tex/generic/pdfescape/pdfescape.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/hycolor/hycolor.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/auxhook/auxhook.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/hyperref/nameref.sty
(/opt/texlive/2023/texmf-dist/tex/latex/refcount/refcount.sty)
(/opt/texlive/2023/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty
(/opt/texlive/2023/texmf-dist/tex/latex/kvoptions/kvoptions.sty)))
(/opt/texlive/2023/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/opt/texlive/2023/texmf-dist/tex/generic/intcalc/intcalc.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/hyperref/puenc.def)
(/opt/texlive/2023/texmf-dist/tex/latex/url/url.sty)
(/opt/texlive/2023/texmf-dist/tex/generic/bitset/bitset.sty
(/opt/texlive/2023/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty))
(/opt/texlive/2023/texmf-dist/tex/latex/base/atbegshi-ltx.sty))
(/opt/texlive/2023/texmf-dist/tex/latex/hyperref/hpdftex.def
(/opt/texlive/2023/texmf-dist/tex/latex/base/atveryend-ltx.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
(/opt/texlive/2023/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty)))))
FONT WARNINGS CAN USUALLY BE IGNORED. IF YOU EXPERIENCE
PROBLEMS WITH FONTS, USE THE [preprint] OPTION
(/opt/texlive/2023/texmf-dist/tex/latex/psnfss/ot1ptmcm.fd)
(/opt/texlive/2023/texmf-dist/tex/latex/psnfss/omlptmcm.fd)
(/opt/texlive/2023/texmf-dist/tex/latex/psnfss/ot1ptm.fd))
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.6 \begin
{document}
? |
I can't reproduce the error with latest
but in latest %% iucr.cls, lines 730--734
%%
% ================ load additional required packages =========================
% (harvard.sty loads html.sty if present, which uses counters defined in
% article.cls)
% \RequirePackage{html}
\RequirePackage{harvard} From the changelog found in beginning lines in % 2.0beta8 %
% 2002-04-11 Backed out RequirePackage{html}: not reqd in TeXLive6 %
% ...
% 2.0beta7 %
% ...
% 2.0beta6 %
% 2001-10-25 Added RequirePackage{html} ahead of %
% RequirePackage{harvard} to cure dependency problems %
% of these two packages that call each other % |
Either use a newer version of the class, or use \PassOptionsToPackage{....}{hyperref} before loading the class to pass additional options. |
Thank you for your valuable clues. The werner@X10DAi:/opt/texlive$ sudo rm -fr texmf-local/
werner@X10DAi:~/Desktop/iucr/latex$ cat test.tex
\documentclass{iucr}
\usepackage[unicode=true,
bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
breaklinks=false,pdfborder={0 0 0},pdfborderstyle={},backref=false,colorlinks=true]
{hyperref}
\begin{document}
\end{document}
werner@X10DAi:~/Desktop/iucr/latex$ pdflatex test.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-04-20> (./iucr.cls
Document Class: iucr 2021/03/05 IUCr article/chapter class
(/opt/texlive/2023/texmf-dist/tex/latex/tools/multicol.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/psnfss/times.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/graphics/graphics.sty
(/opt/texlive/2023/texmf-dist/tex/latex/graphics/trig.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/opt/texlive/2023/texmf-dist/tex/latex/graphics-def/dvips.def))
(/opt/texlive/2023/texmf-dist/tex/latex/float/float.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/tools/tabularx.sty
(/opt/texlive/2023/texmf-dist/tex/latex/tools/array.sty))
(/opt/texlive/2023/texmf-dist/tex/generic/dvips/colordvi.tex)
(/opt/texlive/2023/texmf-dist/tex/latex/base/article.cls
Document Class: article 2022/07/02 v1.4n Standard LaTeX document class
(/opt/texlive/2023/texmf-dist/tex/latex/base/size10.clo))
(/opt/texlive/2023/texmf-dist/tex/latex/harvard/harvard.sty
(/opt/texlive/2023/texmf-dist/tex/latex/base/ifthen.sty))
FONT WARNINGS CAN USUALLY BE IGNORED. IF YOU EXPERIENCE
PROBLEMS WITH FONTS, USE THE [preprint] OPTION
(/opt/texlive/2023/texmf-dist/tex/latex/psnfss/ot1ptmcm.fd)
(/opt/texlive/2023/texmf-dist/tex/latex/psnfss/omlptmcm.fd)
(/opt/texlive/2023/texmf-dist/tex/latex/psnfss/ot1ptm.fd))
(/opt/texlive/2023/texmf-dist/tex/latex/hyperref/hyperref.sty
(/opt/texlive/2023/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty)
(/opt/texlive/2023/texmf-dist/tex/generic/iftex/iftex.sty)
(/opt/texlive/2023/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
(/opt/texlive/2023/texmf-dist/tex/generic/infwarerr/infwarerr.sty))
(/opt/texlive/2023/texmf-dist/tex/latex/graphics/keyval.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty)
(/opt/texlive/2023/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty)
(/opt/texlive/2023/texmf-dist/tex/generic/pdfescape/pdfescape.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/hycolor/hycolor.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/auxhook/auxhook.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/hyperref/nameref.sty
(/opt/texlive/2023/texmf-dist/tex/latex/refcount/refcount.sty)
(/opt/texlive/2023/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty
(/opt/texlive/2023/texmf-dist/tex/latex/kvoptions/kvoptions.sty)))
(/opt/texlive/2023/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/opt/texlive/2023/texmf-dist/tex/generic/intcalc/intcalc.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/hyperref/puenc.def)
(/opt/texlive/2023/texmf-dist/tex/latex/url/url.sty)
(/opt/texlive/2023/texmf-dist/tex/generic/bitset/bitset.sty
(/opt/texlive/2023/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty))
(/opt/texlive/2023/texmf-dist/tex/latex/base/atbegshi-ltx.sty))
(/opt/texlive/2023/texmf-dist/tex/latex/hyperref/hpdftex.def
(/opt/texlive/2023/texmf-dist/tex/latex/base/atveryend-ltx.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
(/opt/texlive/2023/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty)))
(/opt/texlive/2023/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
No file test.aux.
Beginning to process article (iucr)
(/opt/texlive/2023/texmf-dist/tex/latex/graphics/color.sty
(/opt/texlive/2023/texmf-dist/tex/latex/graphics-cfg/color.cfg)
(/opt/texlive/2023/texmf-dist/tex/latex/graphics-def/pdftex.def
(/opt/texlive/2023/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
)) (/opt/texlive/2023/texmf-dist/tex/latex/graphics/mathcolor.ltx))
(/opt/texlive/2023/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
(/opt/texlive/2023/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
Finished processing article
(/opt/texlive/2023/texmf-dist/tex/latex/psnfss/ot1ppl.fd)
Underfull \vbox (badness 10000) has occurred while \output is active
Overfull \vbox (18.0pt too high) has occurred while \output is active
Overfull \vbox (25.37831pt too high) has occurred while \output is active
Overfull \hbox (1.90002pt too wide) has occurred while \output is active
[]
[1
Non-PDF special ignored!
<special> papersize=614.295pt,794.96999pt
{/opt/texlive/2023/texmf-var/fonts/map/pdftex/updmap/pdftex.map}{/opt/texlive/2
023/texmf-dist/fonts/enc/dvips/base/8r.enc}] (./test.aux)
Package rerunfilecheck Warning: File `test.out' has changed.
(rerunfilecheck) Rerun to get outlines right
(rerunfilecheck) or use package `bookmark'.
)
(see the transcript file for additional information)</opt/texlive/2023/texmf-di
st/fonts/type1/public/amsfonts/cm/cmsy7.pfb></opt/texlive/2023/texmf-dist/fonts
/type1/urw/palatino/uplb8a.pfb></opt/texlive/2023/texmf-dist/fonts/type1/urw/pa
latino/uplr8a.pfb>
Output written on test.pdf (1 page, 30789 bytes).
Transcript written on test.log. |
Now, I try to test the official iucr template.ltx and a new problem |
Both \usepackage{etoolbox}
\csdef{hyper@nopatch@caption}{} before loading It seems BTW I recommend uploading log instead of stdout. Log file contains more info. Explanation on the error In standard document classes,
|
If so, what's the function of your suggested workaround? I wonder whether there is a way to completely replace the original implementation in the package without revising its source code, aka, a monkey patching like solution.
Updated.
How to fix the problem from the perspective of the package files? |
Another problem I noticed that is the |
Sorry but the hyperref bug tracker is not the right place to debug a journal class. Please contact the authors of the class. |
For the sake of completeness of this discussion, I would like to forward the reply from the package developer here:
|
Currently, I'm using the iucr package to write a paper, but I find the following setting with
hyperref
will trigger a compile error:\usepackage[unicode=true, bookmarks=true,bookmarksnumbered=false,bookmarksopen=false, breaklinks=false,pdfborder={0 0 0},pdfborderstyle={},backref=false,colorlinks=true] {hyperref}
The error is as follows:
But if I use it as follows, the error will disappear:
Any tips for fixing the problem with more options?
Regards,
Zhao
The text was updated successfully, but these errors were encountered: