I'm writing up class notes for distribution to the students, and the hypertext package does a bang-up job of making the index into links. I've also set up a footer on every page that links to the first page, where the section headers are links to the beginning of each section.

However, I'd like for the section titles, at the top of each page on the left, to be links to the appropriate section in the table of contents. I have no idea how to have the code create a link to a position that is created by the ToC. Currently, those section titles all link to the beginning of the ToC, which is passable, but I'd prefer to link to that section instead of the beginning of the ToC as a whole. Any advice appreciated.

Here is the entirety of the main file, which uses subfiles for most of the content:

\documentclass[11pt, letterpaper]{article}

\usepackage{subfiles} % these are for splitting the sections into individual files.

\usepackage[head=14pt]{ geometry}
\lhead{Mathematical Methods of Physics}                

  colorlinks   = true,    % Colours links instead of ugly boxes
  urlcolor     = purple,  % Colour for external hyperlinks
  linkcolor    = blue,    % Colour of internal links
  citecolor    = red      % Colour of citations



\rfoot{\hyperref[firstpage]{Mathematical Methods of Physics}}

\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}

\graphicspath{ {./graphics/} }

\newcommand{\bull}{\, \vcenter{\hbox{\tiny$\bullet$}} \,} % middle sized dot, between \cdot and \bullet, in math mode
\newcommand{\inv}{\:\!{\text -}1}
\newcommand{\ddx}{\dfrac{\mathrm{d}}{\mathrm{d} x} \,}
\newcommand{\I}{\mathbb{I}} % capitol letter i, for identity element or matrix
\newcommand{\ee}{\, \mathrm{e}}
\newcommand{\ves}[1]{\skew{-2} \vec{#1}}

\title{Mathematical Methods of Physics}
\author{Martin F. Melhus}



{\huge Mathematical Methods of Physics}


Physics 309, section A

Fall 2019


Physics 309 covers the mathematical methods of physics.  The class meets three hours a week, at times to be arranged.  The instructor is Professor Martin Melhus.  Dr.\ Melhus's office is in Kirkbride Hall, room 246, and his campus phone extension is 4377. Dr.\ Melhus will post his schedule and office hours outside his office; he is also available outside these hours by appointment.

The textbook is \emph{Mathematical Methods for Physics and Engineering}, by Riley, Hobson, and Bence, 3$^{rd}$ edition, Cambridge University Press.  References to the text in these notes will simply be page numbers in square brackets [ ].

The class is divided into several sections, each addressing a different topic.  Those topics are:

\item \hyperref[sec01]{Fundamentals}
\item \hyperref[sec02]{Vector Calculus} (Differentiation) % only chapters written so far
\item Calculus of Variations
\item Generalized Integration
\item Complex Variables
\item Matrices, Linear Algebra, Vector Spaces, and Function Spaces
\item Ordinary Differential Equations (Overview)
\item Partial Differential Equations\\[6pt]
(if time permits)
\item Special Functions
\item Tensors

There will be one oral midterm approximately three fifths of the way through the semester, and a written take home final exam due during finals week.  The instructor may also add a second oral exam as part of the final exam if it is deemed necessary.

Homework will be assigned approximately bi-weekly, with due dates stated as part of the assignment.  Grading for the class will be as follows (subject to modification by the professor):

\begin{tabular}{l l l}
Homework & $\quad$ & 40\%\\[3pt]
Participation & & 10\%\\[3pt]
Midterm Exam & & 20\%\\[3pt]
Final Exam & & 30\%\\










Here is the beginning of section 1:


\ifcsname preamble@file\endcsname



We begin the course by examining the fundamental mathematical principles that we already know, insuring that we understand them to sufficient depth to build a complete and coherent mathematical structure upon them.  Much of this section should be well understood by the student; the professor feels that, despite this, it is best to formalize that understanding.

The idea of equality is so fundamental to mathematics that we must begin by defining the concept of equality, with the following three statements [1064]:

\begin{tabular}{l l l}
Reflexive principle & $\quad $ &$a = a$\\[1mm]
Symmetry principle & & If $a = b$ then $b = a$\\[1mm]
Transitive principle & & If $a = b$ and $b = c$ then $a = c$

These principles allow us to understand what constitutes the mathematical concept we call `equals'.  These ideas are so deeply ingrained in our mathematical thinking that we often do not consider them, but simply use them appropriately.  The ideas that they represent, that a thing is equal to itself, that if a first thing is equal to a second then perforce the second thing is equal to the first, and so forth, are fundamental, but need to be examined critically and formalized.


In addition to equals, $=$, we have a number of other symbols that express a relation between elements of sets.  The more commonly used ones are listed below, and explained.

(and so on, ....)
  • 2
    Sorry your example is much to long, loads to many packages, contains irrelevant definitions and is not complete. Try to make one that concentrates on the core problem and that actually compiles. Aug 13, 2019 at 14:59
  • I was hoping there was a simple way to do this, somehow referencing a location like toc.section.1, or something like that. If there isn't an answer like that soon, or the dreaded 'you can't do that', I'll put together a MWE in a day or two.
    – Martin
    Aug 13, 2019 at 15:24
  • There is perhaps a simple solution, but I didn't even started to look when I saw all this unnecessary stuff. I don't have the time to clean this up. Aug 13, 2019 at 15:42

1 Answer 1


Check out \hypertarget and \hyperlink. Every link is assigned a name, which you can usually find by looking in the aux file. Worst case, open the PDF as an ASCII file and search for /Names.



This should also link to the \hyperlink{section.1}{section}.

You must log in to answer this question.

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