This question already has an answer here:

Coming from Python land, one of the best tools is autopep8 and alike which automatically tweak the layout and spacing of your programs to fit the PEP8 code style guide.

My basic question is: are there any similar tools/standards for LaTeX or similar functionalities in various IDEs that can automatically standardise my source-formatting and slap me around when I screw it up?

marked as duplicate by Andrew Bolster, Rico, user31729, barbara beeton, Werner May 19 '15 at 14:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Tex doesn't really have code-formatting guidelines or strong layout conventions like other languages do. As far as I know, the answer to your question is no: no such tool exists. – jub0bs May 19 '15 at 10:42
  • 1
    You could use latexindent, but as @Jubobs said, not really any convention. For a few exceptions, you could print all in just one line. – Johannes_B May 19 '15 at 10:43
  • 1
    There are some code tidiers. You could have a look at @mas Answer on this question: tex.stackexchange.com/questions/26102 – Rico May 19 '15 at 10:52
  • @Rico good stuff, looks like that just about answers my question, so I'll mark this as a dup. Cheers! – Andrew Bolster May 19 '15 at 14:09