I want to convert some LaTeX files into JSON files. So I would like to extract some text in LaTeX like this :
\mycommand{Text with some other \othercommand{123} ... }
How can I get the string 'Text with some other \othercommand{123} ... ' with a javascript command ?