TeX

1.installation:

sudo apt-get install texlive texstudio

texlive: system

texstudio: editor

2. sample

\documentclass{article}
\begin{document}
$\pi=\sum\limits_{ij}^{n}{x_i}{x_j}{\pi_{ij}}$
\end{document}