Here is my advice (I loved your question so much I needed to propose an answer). Some people may work differently though.
I use the same beginning code for all my documents which contains many many many packages, newcommands etc.
Everyone does something like this, but it results in a huge accumulation of packages over time, with 80% of them likely to stay unused. There might be interferences and compilation will be slower. I suggest to comment every \usepackage
line to make clear what the package is used for, and see if you really need it in that specific document. For instance:
\usepackage{booktabs} % Makes beautiful book-like tables
Then, if you write a document without a single table, you’ll know you can safely ignore this specific package.
Should I use only one .tex file, or write the chapters in distinct .tex files, then merge them when everything is finished?
This likely depends on the length of your document. Some people manage 40 .tex
files just fine, some prefer to deal with just one. If you plan to write 5000 pages, you might prefer to use distinct files. And there is no need to merge them by hand, you can use \include
in a main.tex
file.
Is having many packages a bad idea? Do I have to decide which packages to use now?
Again, it is not that bad if they are useful and carefully chosen. You should avoid using different packages that do the same thing, and pay attention to the order of packages. Loading some packages too early or too late may cause interferences with other packages. To begin, just add the usual suspects (amsmath
, babel
, geometry
) and wait and see if you need more later.
Will shortening everything cause a problem?
Clear commands are better ;-) Longer to type, but this will save time when you try to modify your document 6 months later.
Should I include tikz graphs etc. when the book is finished? Because I have a feeling that after some point with many tikz pictures, compiling the code will last quite long.
I do include pictures as soon as I can, I find it "motivating" to have a preview of what my document will look like. It does slow down compilation though, your point is valid.
What else should I be careful about?
Always backup your document! One mistake and you could lose your whole book. Also, pay attention to fonts. Fonts have been my number one TeX problem over the past few years. Sometimes the font won’t include one character you need, sometimes it won’t have the adequate bold type that you need, sometimes it will look bad for no reason. I have learned to stay away from anything which is not a very widely used, tried and tested, strong, common font.
Good luck!
\include
and\includeonly
. start with only the packages you need. read documentation. – barbara beeton Jun 28 '16 at 2:58externalize
tikz library to reduce the typesetting time with included tikz graphics. – Ronny Jun 28 '16 at 5:48standalone
package as well. – Peter Grill Jun 28 '16 at 5:49subfiles
package over the\includeonly
option (of course, having the chapters of the book in separate files). Then having a directory for every chapter and the main file in the root. This made it possible to work on single files on command line as well as with TeX Shop. – Mats Jun 28 '16 at 20:40