What's wrong with the attached MWE? If I try to compile
taocp.md with
pandoc taocp.md -o taocp.pdf, I receive the error message from LaTeX:
Error producing PDF.
! File ended while scanning use of \@writefile.
<inserted text>
\par
l.49 \begin{document}
If I delete either non-empty input line, the compilation is successful and the links work in the PDF dile.
(pandoc taocp.md -s -o taocp.html works fine.)