I'm looking for some script (program) which would help in editing LaTeX code. Usually I have a mess in my .tex code, so it would be good if the script could align tabulars and so on. It would also be nice, if it allows editing code (for example replace every $$ with \begin{equation}...\end{equation} and vice versa).
Is there any program which is doing such a thing? It can be program, or a plugin of texstudio or a bash (python) script as well. However I don` want to change my editor (if it is of course possible).
latexindent. – Werner May 04 '15 at 18:49$$might be harder than you think (in the general case), but a naive solution is an easy sed:s/\$\$([^(\$\$)])\$\$/\\begin{equation*}\1\\end{equation*}/should do it, I think (untested) – Sean Allred May 04 '15 at 18:53\[and\], because theequationenvironment adds (roughly speaking) the numer of equation. – Przemysław Scherwentke May 04 '15 at 19:00C-c C-q C-e. (Won't do everything, but comes close.) – jon May 04 '15 at 19:08