I want to get a similar and simple effect like this that doesn't involve crazy arrow curves or packages.

enter image description here

4 Answers 4


I'm adapting my answer to "How to add arrow in equations and matrix?" to your example; check it out for some explanations. Basically, you have to

  • wrap all parts that you want to reference in the drawing commands into a \tikznode command, which assigns a name to it and stores the size of the box

  • add a tikzpicture environment starting with

    \begin{tikzpicture}[remember picture,overlay,...]

    that contains the draw commands.

  • run LaTeX twice to get the positions right.

enter image description here

   {\tikz[remember picture,baseline=(#2.base)]
      \node[minimum size=0pt,inner sep=0pt,#1](#2){#3};%
  \tikznode{PT}{$P_{T}$} &=
  \tikznode{PB0}{$P^{0}_{B}$}+X_{A}(\tikznode{diff}{$\underbrace{P^{0}_{A}-P^{0}_{B}}$}) \\[2ex]
  \tikznode{y}{$y$} & =  \tikznode{a}{$a$}+ \tikznode{b}{$b$}\cdot x
\begin{tikzpicture}[remember picture,overlay,cyan,rounded corners,>=stealth,shorten > =1pt,shorten <=1pt,thick]
  \draw[->] (PT) -- (y);
  \draw[->] (PB0) -- (a);
  \draw[->] (diff) -- +(0,-0.5) -| (b);
  • What do the stealth and shorten parts do?
    – graffe
    Jan 18, 2021 at 6:48
  • 1
    @Anush Remove or change it, and you will see. stealth is a particular type of arrow (looking like these fighter planes, stealth bombers); if you remove >=stealth, you get the default type of arrows. shorten < and shorten > reduce the lines at the beginning and at the end by the given amount. Otherwise the lines would start directly from and end at the borders of the object. For more information, see the tikz manual.
    – gernot
    Jan 18, 2021 at 9:55

This is one of many solution to create your image...I have not used TikZ but a simple environment array. Just to be correct considering that the moving of the characters was done manually with \mkern, whenever you added something the arrows would move and not be aligned as in the example.

P_{T} &= P^{0}_{B}+X_{A}(\underbrace{P^{0}_{A}-P^{0}_{B}}) \\[-.4ex]
\downarrow & \quad \downarrow \mkern85mu \swarrow\\
y & =  a+\mkern50mu b\cdot x

enter image description here

  • 1
    Great, but, in the question, the two P^{0}_{B} are the same, and those look more like P_{A}^{0} and P_{B}^{0} to me. This would perfect the answer.
    – user231678
    Jan 17, 2021 at 20:54
  • 1
    @niamulbengali You have right :-(...I often do a mix of the sub-over script :-(
    – Sebastiano
    Jan 17, 2021 at 20:56

Here is a possibility with pstricks:

\usepackage{amssymb, bm} 


 \rnode{PT}{P_T} & ={} & \rnode{PB}{P_B⁰} & + X_A\bigl(\underbrace{P_A-P_B^0}_{\pnode[-3pt, 1.5ex]{PAB}}\bigr) \\[1.5ex]
\rnode{y}{\mathbsf{y}} & ={} & \rnode{a}{\mathbsf{a}} & \mathbin{\mathbsf{+}} \rnode{b}{\mathbsf{b}}\cdot \mathbsf{x}
\psset{arrows=->, arrowinset=0.12, linecolor=DeepSkyBlue, nodesep=1pt}

\end{document} } 

enter image description here


You should be to use the tikz to make arrows in the equation like example below.


        \node (E1) at (0,0.71) {$P_{T} = P^{0}_{B}+X_{A}(\underbrace{P^{0}_{A}-P^{0}_{B}})$};
        \node (E2) at (0,0) {$Y = A + B X$};
        \draw[->,thick] (-0.7,.6)--(-0.1,0.2); 
        \draw[->,thick] (1.2,.5)--(0.6,0.2); 
        \draw[->,thick] (-1.7,.7)--(-1.1,0.2); 


Good luck

enter image description here

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.