I want to make the section titles in my document link to external files on my machine, so that when you click on the section title, an external document (a pdf-file) is opened. What is the nicest way to do this?

  • I guess one solution is: \section{\href{../somefile.pdf}{Section Title}} but is there a "better" way to do this?
    – utdiscant
    Jan 7, 2013 at 2:55
  • 1
    Better in what respect? Jan 7, 2013 at 2:57
  • In the sense that often, some solution which works is deprecated or frowned upon. Like the use of double dollars for equations, where [ ] is a better solution. A solution is also better if it does not break other functionality.
    – utdiscant
    Jan 7, 2013 at 3:14

1 Answer 1


You could define a \hrefsection command:



which replicates the behavior of \section:

\hrefsection{file}[toc entry]{Title}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .