Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A few things:

1. Separate each part of a document into different TeX files and include them in the main document. Each file should be a separate unit of the work. Only compile the main document when you need to.

2. Generally write with readability in mind and use newlines and other whitespace in the source a lot more than you think you should.

3. If you have common boilerplate that you frequently use at the top of docs, make your own package(s) for those commands and maintain that separately.

4. Refs and labels everywhere you possibly can. Also, prefixing your label names helps a lot, so \label{clouds} on a picture of clouds becomes \label{fig:clouds}. If you are writing a book, and this is the chapter on the sky, consider \label{fig:sky:clouds}.




Regarding point 2, would that mean you’d suggest using a newline instead of a space to separate sentences?


Awesome. Can you point to a repository with an example?

Also, is there a book that you would recommend for learning LaTeX?


Overleaf has several examples that are not bad. I am currently working on a book and the Krantz template is a pretty decent example of how you might structure things (although the package itself is total spaghetti). The ACM and IEEE paper examples are also both OK, but are short so they cut some corners.

I'm not sure if there is a good book on LaTeX, ironically.


I've always used memoir.


The publisher wanted krantz. It's very pretty, but I wouldn't self-publish with it.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: