I was using the annotate-equations
package https://github.com/st--/annotate-equations to create annotated equations.
The position of annotations seems to be wrong while rendering it in LaTeXit.
The same code works well in normal LaTeX editor:
By looking into the .sty
file of that package, I assume the problem comes from anchors (north, west, etc.) in TiKz package, but I failed to solve this problem.
In the running log, there is a warning about labels:
The code I used is below:
Preamble:
\documentclass{article}
\usepackage[usenames]{color} %used for font color
\usepackage[dvipsnames]{xcolor}
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage[utf8]{inputenc} %useful to type directly diacritic characters
\usepackage{annotate-equations}
Main:
\begin{equation*}
\eqnmark[purple]{node1}{GEBV}
\tikzmarknode{node2}{=}
\eqnmark[black]{node3}{\sum_{i}^{n}}
\eqnmarkbox[blue]{node4}{X_{i}}
\eqnmarkbox[red]{node5}{b_{i}}
\end{equation*}
\annotate[yshift=1em]{left}{node3}{sum across n loci}
\annotate[yshift=-1em]{below,left}{node1}{Genomic Estimated Breeding Value}
\annotate[yshift=-1em]{below,right}{node5}{effect at locus i}
\annotate[yshift=-2.5em]{below,right}{node4}{genotype at locus i}