I have to prepare a paper using the PoS class version provided by the conference organizers, and available via link: PoS for TWEPP 2018
However, I needed also to use the hyperref packet to provide clickable links in the produced PDF. Unfortunately, when hyperref packed is used, the pdflatex is not able to process the tex file, and the errors about not defined control sequences are produced:
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1phv.fd)
! Undefined control sequence.
<recently read> \Hy@colorlink
l.25 \begin{document}
[...]
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/omsptm.fd)
! Undefined control sequence.
\close@pdflink ->\Hy@endcolorlink
\Hy@VerboseLinkStop \pdfendlink
l.25 \begin{document}
?
! Undefined control sequence.
<recently read> \Hy@colorlink
l.25 \begin{document}
It looks like the PoS class breaks the definitions put into the \AtBeginDocument by hyperref. What is the cause of the problem, and how can I cure it?
Below is the example allowing to reproduce the problem (based on original skeleton.tex provided by the organizers). Please note that to compile it with pdflatex, you also need the PoSlogo.pdf file. If you replace the \usepackage{hyperref} with \usepackage{url}, everything works fine...
% Please make sure you insert your
% data according to the instructions in PoSauthmanual.pdf
\documentclass{PoS}
\usepackage{hyperref}
\title{Contribution title}
\ShortTitle{Short Title for header}
\author{\speaker{First Author}\thanks{A footnote may follow.}\\
Author affiliation\\
E-mail: \email{author@email}}
\abstract{..........................\
...........................}
\FullConference{Topical Workshop on Electronics for Particle Physics (TWEPP2018)\\
17-21 September 2018\\
Antwerp, Belgium}
\begin{document}
\section{Sample section}
Just a small link: \href{https://stackexchange.com}{https://stackexchange.com}
\begin{thebibliography}{99}
\bibitem{...}
....
\end{thebibliography}
\end{document}