I'm currently writing a document collaboratively and I need to make sure that the compilation is executed correctly on every possible system (e.g., that the document encoding - UTF-8 - is detected by most editors - if not all - the .tex file is opened in, that all packages are found during compilation, and so on).

The final version of the LaTeX document will be compiled by other people, and I don't know which TeX distribution, platforms and editors will be used; for this reason, I'm in search of a general solution to the problem.

What are the current best practices to achieve this goal? At present, I've thought about:

  • inserting appropriate modelines into the preamble (like the TeXShop one % !TEX encoding = UTF-8) to solve the encoding problem, and
  • using the snapshot package to get a list of all required dependencies and putting them along my LaTeX file in the RCS I'm using.

Are there other points I'm missing?

  • 1
    As well, there're many ways how to produce a document: XeLaTeX, LuaLaTeX, pdfLaTeX, latex>dvips>pdf, latex>dvipdfm, etc. You have to make this clear as well somehow. – yo' Nov 16 '12 at 12:53
  • Sorry, forgot to add that - I can assume that pdflatex is always going to be used. – Alessandro Menti Nov 16 '12 at 18:33
  • @elgaton:Happy? – Dr. Manuel Kuehner Nov 21 '12 at 10:24
  • @ManuelKuehner: Sorry for the late reply - I think both you and tohecz have addressed the problem. I've marked yours as the accepted answer as it's the most detailed one. – Alessandro Menti Nov 24 '12 at 13:00
  • @elgaton: Alright! – Dr. Manuel Kuehner Nov 26 '12 at 16:50

I would recommend this minimal preamble:



You can specify the oldest version to be used for each package by:


e. g.




In addition maybe it is better you use a mighty document class like the KOMA classes (e. g. scrbook). This combines the features of many packages in one document class. Therefore there is less chance to run into problems because of using may packages with maybe different versions.

| improve this answer | |

Yes, you are certainly missing a point about default paper size, which is a4paper for European systems and letter for American systems.

So: always use


or similar.

| improve this answer | |
  • the default at that level (in TeX for the standard classes) is always usletter. The driver probably defaults to a4 or use letter for positioning the typeset area on a physical page though. – David Carlisle Nov 16 '12 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.