4

Is there some kind of automatic test to check for best practice according to some sort of style guide in LaTeX, or will there be any in near future? For python we have pep8, pyflakes, pyflint, and whatnot, which helps a great deal.

I know there are a lot of paper, like the essential guide to LaTeX usage and the Short Math Guide, and talks out there, like the one by Didier Verna. Also several questions have been asked on stackoverflow, but no one asked for some kind of automation, which could help shape our LaTeX code, especially when I think of collaborative work on github or ShareLaTeX.

5

1 Answer 1

8

No there isn't and can't. Because of TeX's in-place replacement parsing, it is not possible to analyze the code without fully expanding everything and still then it wouldn't be possible to know what is what.

Note that PEP8 is also an agreement of (a small part of) the community not an essential property of Python. And the tools you mentioned follow the agreement not the language itself. In TeX there is no, fortunately, such agreement.

2
  • 5
    We do have a style guide for expl3 code (certainly not entire documents), though I think it's rather shorter than some of the examples in the question (and really mainly for the team's own code). It's also mainly 'encouragement' not 'requirement' ;-)
    – Joseph Wright
    Commented Jan 19, 2016 at 15:20
  • @JosephWright Ah I should have remembered that.
    – percusse
    Commented Jan 19, 2016 at 15:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .