According to the Eigenfactor ranking of journals, the Journal of Artificial Intelligence Research (JAIR) is a leading open-access journal in AI. Unfortunately, the JAIR style files are twenty years old and break horribly when trying to use hyperref. This particular error seems due to the shipped theapa styles which jair.sty depends on.
I have spent several hours trying to understand and fix the errors, but this seems to require a higher skill level of LaTeX hacking than I have attained. To replicate the problem, add \usepackage{hyperref} to the preamble of the provided sample.tex input file, then run LaTeX, BibTeX, LaTeX; the next and final run of LaTeX (to resolve the dangling references) then fails with
! Undefined control sequence.
\hyper@@link ->\let \Hy@reserved@a
\relax \@ifnextchar [{\hyper@link@ }{\hyp...
l.65 ...d graph partitioning problems \cite{papad}
.
at the very first place in the file where \cite{} is used. Note that if hyperref is not used, then these errors go away; packages like url or tikz work fine. If the bibliography commands are removed, then the error also goes away. A similar error occurs when changing \bibliographystyle{theapa} to standard bibliography styles, such as short:
! Use of \@year@ doesn't match its definition.
\Y@papad ->\@year@ J
PY
l.65 ...d graph partitioning problems \cite{papad}
.
Finally, if one removes the \usepackage{theapa} from the document preamble, then the problem goes away (except that \shortcite{} and other theapa macros are now undefined). I have even tried to use a different version of theapa.sty from the custom one that is shipped with jair.sty but this seems to give the same problems.
Does anyone have ideas about what to change in the jair.sty style file to avoid this problem? If we can track down the issue then I would be happy to work on a patch to submit to JAIR. It would be nice to help this volunteer-run journal to support bibliographies with internal links and hyperlinks to articles in the bibliography, as publishers like Elsevier do.
theapa. Better switch to biblatex and reimplement the bibliography styles and commands with its tools. Beside solving the hyperref issues it will also give you better unicode/utf8 support (with biber). – Ulrike Fischer Feb 03 '12 at 14:04natbibpackage as well? It might provide just enough functionality to keephyperreffrom blowing up. – Mico Feb 03 '12 at 15:24