I am wondering if there is a way to impose coding style in editors (TeXstudio etc.), or to get it automatically formatted, in order to have always code as clean as in C or Python, for instance.

  • 2
    Have a look here → tex.stackexchange.com/questions/163/… – DG' Oct 26 '18 at 9:03
  • 3
    Perhaps relevent: tex.stackexchange.com/questions/26102/… – cmhughes Oct 26 '18 at 9:06
  • Thanks both. So, the 1st is more for syntax error. The 2nd seems more related, but, if I understood correctly, latexindent.pl is a script one has to run externally (maybe it could be attached to the compilation workflow...) ... I am looking more for a package that can be simply loaded at the beginning of your .tex ... – jjrr Oct 26 '18 at 12:24
  • Have you looked at arara? It sounds like it might be of interest. It contains a rule for latexindent. If you find a script that can be loaded in the way you describe, do let me know :) disclaimer: I'm the author of latexindent – cmhughes Oct 27 '18 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.