LaTeX is used to format math and science papers. It is a markup language (similar to what HTML is for the web).
LilyPond (http://LilyPond.org) is a markup language for writing musical scores.


Fescobaldi (http://www.frescobaldi.org/)is a Python program that makes it easy to write the LilyPond code and see the resulting script.