You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the \annotate command is used outside the math environment (as the examples use it), and extra line/paragraph is added after the math environment.
If instead one puts the \annotate command inside the math environment, such before \end{equation}, then no extra line is added. The user then needs to add \vspace explicitly to add spacing for the annotation labels that are rendered below, which is consistent with the requirements for those rendered above.
Example
Output
Note the line 223.
Code
Some text before.
\begin{equation}
\eqnmark[red]{node1}{x} = \eqnmark[blue]{node2}{y}\end{equation}
\annotate[yshift=0.2em]{above,left}{node1}{fubar X}
\annotate[yshift=0.2em]{above,right}{node2}{hello Y}
Some text after.
Some text before.
\begin{equation}
\eqnmark[red]{node1}{x} = \eqnmark[blue]{node2}{y}\annotate[yshift=0.2em]{above,left}{node1}{fubar X}\annotate[yshift=0.2em]{above,right}{node2}{hello Y}\end{equation}
Some text after.
Some text before.
\begin{equation}
\eqnmark[red]{node1}{x} = \eqnmark[blue]{node2}{y}\end{equation}
Some text after.
The text was updated successfully, but these errors were encountered:
The \annotate command is treated as a paragraph started in some way. So if you put the text that comes later right after it, the line disappears. You can also put a commented line instead of a new line.
\begin{equation}
\eqnmark[red]{node1}{x} = \eqnmark[blue]{node2}{y}\end{equation}
\annotate[yshift=0.2em]{above,left}{node1}{fubar X}
\annotate[yshift=0.2em]{above,right}{node2}{hello Y}
% !!! This is changed from a mere new-line character in the original example.% Any number of commented lines is the same as no new-line characters at all.
Some text after (no extra new-line).
Second paragraph (note the different indentation).
Another Caveat
The workaround does not work if the item that follows is complicated? Like a section. So the following doesn't work:
\begin{equation}
\eqnmark[red]{node1}{x} = \eqnmark[blue]{node2}{y}\end{equation}
\annotate[yshift=0.2em]{above,left}{node1}{fubar X}
\annotate[yshift=0.2em]{above,right}{node2}{hello Y}
%% Does NOT work. New-line is still added!%\section{Section Title}
Fix
I don't know enough of Latex to suggest how to make \annotate not do that, but will keep an eye out for updates to the package in hopes that it's fixed! Thanks for the great package 👍
Problem
When the
\annotate
command is used outside the math environment (as the examples use it), and extra line/paragraph is added after the math environment.If instead one puts the
\annotate
command inside the math environment, such before\end{equation}
, then no extra line is added. The user then needs to add\vspace
explicitly to add spacing for the annotation labels that are renderedbelow
, which is consistent with the requirements for those renderedabove
.Example
Output
Note the line
223
.Code
The text was updated successfully, but these errors were encountered: