I have been using LaTeX for a long time now, but still all my document files look a bit messy. Now I want to get rid of this bad habit and get some order into my code.
That is why I am wondering whether there are any coding style guidelines for LaTeX. Not necessarily anything official. It could for example make recommendations on how to format your code with respect to:
- Setting comments in the text/preamble
- Whether to highlight sections/subsections etc. by some comments
- How to indent environements
- How to organize your preamble to make it readable
If nothing as such exists (yet), it would be great if you could just post how you do it if you think your code looks rather nice.