I recently found the package witharrows which allows you to annotate your equations and steps taking during algebraic manipulations and things like this for example.

    \sum_{i=1}^n (x_i+1)^2
    & = \sum_{i=1}^n (x_i^2+2x_i+1) \Arrow{by linearity}\\
    & = \sum_{i=1}^n x_i^2 + 2\sum_{i=1}^nx_i+ n

Would generate

enter image description here

I also like to use the gather environment to show manipulations to both sides of an equation (using the gather environment) enter image description here

I was wondering if anyone has any suggestions as to how I can annotate/use arrows to show algebraic manipultations inside the gather environment

  • 3
    I think you will get much better answers if you provide us with the code that creates the equations. The annotations can be done with tikzmark.
    – user121799
    Jun 17, 2019 at 5:13
  • Thanks for the suggestion, I've added the code that creates the equations Jun 17, 2019 at 18:48
  • As of now, there is no direct solution to this question using the extension witharrows. However, I will try to write a new version of the extension witharrows to face this problem (I'm the author of that extension). Jun 18, 2019 at 5:44
  • @F.Pantigny Wow, thanks so much for looking into this! Jun 18, 2019 at 14:37

2 Answers 2


I have written a new version of witharrows to face that situation (version 1.17 2019-07-09). In this version, there is a option format which is similar to the preamble of an environment array of tabular. By putting format = c, we'll have only one centered column.

Let $n \in \mathbb N$ and we'll assume that $n \ge n_0$ so we have
25 \le n \Arrow{we multiply by $n$} \\
25 n \le n^2  \Arrow{here, I don't see very well} \\
3n+2 \le 5n \le \frac{n^2}{5} 

enter image description here

  • Beautiful, thank you! Jul 13, 2019 at 14:13

enter image description here

You can mark points with tikzmark then draw any kind of tikz thing using those point, here a couple of arrows.

  \tikzmark{a}12345 = x^3+x^2+x\\
   a=b \quad \text{and} \quad b=a\tikzmark{c}\\
\begin{tikzpicture}[remember picture,overlay]
\draw [,->] ($(pic cs:a) - (5pt,0pt)$)  to [bend right=70] 
node [left] {interesting step}
($(pic cs:d) - (10pt,0pt)$) 

\draw [->] ($(pic cs:c) + (5pt,0pt)$)  to [ bend left=70] 
node [right] {dull step}
($(pic cs:e) + (10pt,0pt)$) 


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.