6
votes
2answers
241 views

Preamble anywhere

If I want to use a set of macros in my tex document, I have to obviously include the appropriate packages IN THE PREAMBLE. So now, i write a 100 page document, with 55 packages already included (in a ...
22
votes
2answers
402 views

Multi-line options with the `\usepackage` command

When including a package using the \usepackage command that has a lot of options, are there: Any restrictions on how the options can be split across multiple lines? Any best practices for formatting ...
3
votes
0answers
42 views

At what point of my input file is the subfig package loaded? [duplicate]

When trying to compile my report, I receive an error related to the subcaption package (which I load in my preamble): ! Package subcaption Error: This package can't be used in cooperation ...
4
votes
1answer
127 views

Should I load packages (for instance, all AMS packages) separately or all together?

I was reading some post here at SE and I noticed that many people load packages one by one. For example, \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amsthm} and so on. Usually, I load ...
3
votes
1answer
166 views

Is there a source function/capability in LaTeX [duplicate]

Possible Duplicate: How to make a standard preamble into a package I often have the same preamble stuff in my documents that kind of clutter the work space a bit. Some are custom commands ...
1
vote
1answer
131 views

Preamble vs. external style file - same code doesn't work in the later

I'm experiencing the following issue when using todonotes along with TikZ and its externalize library. If my document contains no \todo's then it compiles just fine and seems like the externalization ...
2
votes
2answers
57 views

Could using different packages cause a contradiction for the compiler?

If I am writing a pdf with LaTeX, I would like to use commands from different packages for figures or tables or what so ever ... and I just use all the packages i need, could this lead to a ...
13
votes
4answers
811 views

meta packages and typesetting

Background(just ignore): Is there an exhaustive list of packages that you should load and of things you should do to improve your document? Here I mean packages and things that have to do with the ...
17
votes
2answers
316 views

Load package after other package with \AfterPackage

I want to group packages together (in the real document, I load many more packages) and want to solve the sorting of the packages with commands like \AfterPackage from KOMA-Script. I am using this ...
11
votes
2answers
2k views

Placing items before \documentclass

When looking in books or at sample code, I always see \documentclass appearing first. Is that absolutely necessary? I have created some test code which seems to compile fine: \def\SetClass{article} ...
3
votes
1answer
224 views

Extracting parts of a .sty file

Can you load only some specific parts from a package while not loading the rest at all? For example, from the code below I wanted to load only the \newcommands %theorems \usepackage{theorem} ...
15
votes
1answer
373 views

Sorting preamble packages thematically while accounting for compulsory load orders

Within a document's preamble (or a custom "preamble" package), at times there's the need to take compulsory load orders for certain packages into account. Most packages must be loaded before the ...
5
votes
1answer
138 views

What is pkgindoc.sty really for?

During a discussion of this question, I looked a bit into the pkgindoc.sty buried in ltclass.dtx (docstrip option afterpreamble). While I understand how this works (and it works in an ugly way IMHO), ...
3
votes
1answer
538 views

Only \usepackage if the package can be found [duplicate]

Possible Duplicate: Conditional “if a package is available” I'm using a package "mcode.sty" that enhances/colors listings output; typesetting will work perfectly without it. ...
7
votes
0answers
309 views

What's the right order when loading packages? [duplicate]

Possible Duplicate: Non-commutative packages I remember reading in some reference guide that the order of loading packages with \usepackage in principle doesn't matter. Real life, however, ...
33
votes
5answers
3k views

How to make a standard preamble into a package

I have a preamble that I copy and paste into nearly all of my documents. Is there a nice way to turn this into a package than I can use? I would prefer to do this in a way that doesn't depend on my ...