I have a new laptop and installed Ubuntu 14.04 including TeX Live. A LaTeX file which worked well under Ubuntu 12.04 now gives error "Illegal parameter number in definition of \Hy@temp
" when calling latex at every \citeads
command (but not for pdflatex). The file is example.tex
at http://www.staff.science.uu.nl/~rutte101/Report_recipe.html
and is a decades-old latex primer, more recently expanded with bibtex cite macros that turn in-text citations into web browser openers for the astronomy literature database at NASA. These macros were contributed and are recommended by the journal Astronomy & Astrophysics. The errors are non-fatal (answering with "s" produces the proper example.dvi
result).
Has something changed in hyperref
? Is there a mistake in the citeads
macros in that file?
MWE:
\documentclass{article}
\usepackage{natbib}
\usepackage{twoopt}
\usepackage{hyperref}
\makeatletter
\newcommandtwoopt{\citetads}[3][][]{%
\href{http://adsabs.harvard.edu/abs/#3}{%
\def\hyper@linkstart##1##2{}%
\let\hyper@linkend\@empty%
\citet[#1][#2]{#3}%
}
}
\makeatother
\begin{document}
\citetads{1981ApJ...247L..97M}
\end{document}
February 27 2019: solved by linuxss privately with
\makeatletter
\protected\def\sppresslink{\def\hyper@linkstart##1##2{}\let\hyper@linkend\@empty}
\newcommandtwoopt{\citeads}[3][][]{
\href{http://adsabs.harvard.edu/abs/#3}
{\sppresslink \citealp[#1][#2]{#3}}}
\makeatother
breakurl
lines.#
anywhere in the URL, escape it. Like so\#