# Implementation of complex LaTeX command

Closed - This job posting has been filled and work has been completed.

## Job Description

We are writing a scientific document with a lot of notation. We would like to add a sidebar in the right-hand margin of each page with a short definition of the variables that are used on that page.

For example, take a look at Lemma 3.1 on page 8 of
http://web.mit.edu/rishig/papers/local-geometry.pdf
Most people reading the document would have long forgotten what P, \beta, s, and k are (the variables used in the statement of the lemma). We would like the following to appear at the top of the right hand margin of that page:

\beta: number of foos
k: 3*\beta
P: array of bars
s: length of P
.. etc

The way I imagine this being implemented is with declarations like the following in the preamble:
\MakeNotatedVariable{\P}{P}{array of bars}
and then we would use $\P$ instead of $P$ in the body of the document whenever we wanted the definition to show up in the margin of that page.

The list should be consistently ordered page to page, via an author-specified ordering. The ordering could be given to tex in whatever way is convenient for you; the order in which the \MakeNotatedVariable declarations appear in the preamble would be fine.

A nice to have would be for the variables in the right hand margin to link back to where they are originally defined in the text. For instance the command could instead be
\MakeNotatedVariable{\P}{P}{def:P}{array of bars}
and the P in the right hand margin would link back to \label{def:P}.

Your job would be to implement the \MakeNotatedVariable command, or to find a different way of accomplishing this task.