Expand LaTeX newcommands
Demo Load, Parse and Replace Newcommands in Textfile
Load File
Load LaTeX Source File
Parse Newcommands
parse the newcommands in the source document (see generated JSON below).
Replace Newcommands
replace the calls of macros in the source document and store in textarea "Result".
Save Result
Save the replaced result into file.
Filename:
Loaded Text:
Text \newcommand{\tool}[2]{Title #1: The #1 is used for #2} \newcommand{\cmd}[3]{\int_{#1}^{#2} f(#3) d#3} \tool{hammer}{nails} \tool{hammer}{nails} \tool{hammer}{nails} Mathematical expressions are $\cmd{4}{5}{x}$ and $\cmd{a}{b}{y}$
Result:
Newcommand JSON:
GitHub-Respository BracketHandler - closingbracket.js