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

breakurllines. – egreg Apr 27 '14 at 12:23#anywhere in the URL, escape it. Like so\#– abyshukla Aug 18 '17 at 10:16\documentclass{article} \usepackage{natbib} \usepackage{twoopt} \usepackage[T1]{fontenc} \usepackage{hyperref}
\makeatletter \bibcite{mycite}{{1}{1992}{{Carlsson}}{{}}}
\protected\def\disableLink{ \def\hyper@linkstart##1##2{}% \let\hyper@linkend@empty } \newcommandtwoopt{\citetads}[3][][]{% \href{http://adsabs.harvard.edu/abs/#3}{% \disableLink \citet[#1][#2]{#3}% }% } \makeatother
\begin{document} \citetads{mycite} \end{document}
– Linuxss Feb 27 '19 at 11:01