My first documents were very simple - just few rows of preamble and then the document content with the default settings - but most of my current projects require much more setup and the source code becomes very messy and quite difficult to read and review. I'm wondering if exists a more or less official style guide for LaTeX sources, like PEP 8 for Python. If not, what general rules should I follow to have an ordered code?
I'm particularly interested in the following:
- indentation
- new lines in commands with several arguments or long options lists, such as packages setup in the preamble
- structure of the preamble
- use of new lines to enhance readability (not the empty ones for new paragraphs, of course)
- use of \input{}
\begin{foo} bah \end{foo}in three lines with "bah" indented, but I want this in a single line except if "bah" is too long. I prefer \par instead of blank line except for plain text, etc. – Fran Apr 02 '20 at 23:57