I would like to display a small title for each equation on the left and right margins of a document like this

enter image description here

How to do it please?

2 Answers 2


The note in the margin can be added using the command \marginnote from marginnote, and the box around the equation can be added with the empheq environment from empheq.

This equality implies that it makes sense to introduce the notion of the \emph{electric field} at point \(\mathbf{r}\) (as an entity independent of \(q\)), characterized by the following vector:
\marginnote{\color{blue}Electric field: definition}[-2mm]
\mathbf{E}(\mathbf{r}) \equiv \frac{\mathbf{F}(\mathbf{r})}{q},
formally called the \emph{electric field strength} -- but much more frequently, just the ``electric field''.
  • In my books, I avoid writing text in the margin. It is a matter of style - Some authors keep it, while others drop it.
    – Dr. Sundar
    Mar 20, 2022 at 4:07
  • Vincent, thank you so much, that's what I was looking for.
    – Gallagher
    Mar 20, 2022 at 10:42

A combination of \boxed (a macro provided by the amsmath package) and \marginnote (a macro provided by the marginnote package) gets the job done.

enter image description here

\usepackage{marginnote} % for '\marginnote' macro
\usepackage{amsmath}    % for '\boxed' macro
\usepackage{xcolor}     % for '\color' macro

This equality implies that it makes sense to define an \emph{electric field} 
at a point~\(\mathbf{r}\), as an entity that is 
independent of~\(q\), as:
\boxed{\mathbf{E}(\mathbf{r}) \equiv \frac{\mathbf{F}(\mathbf{r})}{q}\,.}
\marginnote{\color{blue}Electric field: definition}
\(\mathbf{E}\) is formally called the \emph{electric field 
strength} or, far more frequently, just the ``electric field.''
  • Mico, thank you so much.
    – Gallagher
    Mar 20, 2022 at 10:40

You must log in to answer this question.

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