I have a multi-part LaTeX document that I intend to hand in to a conference. One of the requirements is that I also hand in the source code. Obviously this includes all dependencies of my document (i.e. all \usepackage{} sources).

I am not certain what kind of tool chain the "other side" uses, so I would like to ship all dependencies. Obviously I do not want to ship my whole texlive distribution, so is there a way to fetch all transitive dependencies from a latex run into the current source dir?

Or is there any other way to enhance portability?

  • I was unsure about that, since it is more of a tool-issue and not really a TeX issue. Is there a way to cross-post a question? – choeger Mar 31 '14 at 14:02
  • 1
    Many packages internally load dependent packages, so it's not just a case of if you have \usepackage{x} then you need to include x.sty. I think it's best to assume that if it's in TeX Live, then the conference editor should have it. (TL is more restrictive than MikTeX, so there are packages in MikTeX that aren't in TL.) Production editors should really have an up-to-date TeX distribution (although I know it's not always the case). Personally I find it a bit of a nuisance when authors send me a load of .sty files with their .tex file. – Nicola Talbot Apr 1 '14 at 16:09
  • 1
    latexpand can expand input, include, bibliography and usepackage. – Jörg Apr 1 '14 at 18:23
  • This is what bundledoc and arlatex are designed to do. See my answer here for an example of how to do it. – jon Apr 1 '14 at 20:25

Two things come to mind: Firstly, you need to combine the various parts into one .tex file. I don't know of a better solution than copying and pasting (or writing a script that does it for you). Secondly, you can put the contents of any .bib files into a filecontents environment. For example:


    Author = {Chomsky, Noam},  
    Doi = {10.1162/0024389052993655},  
    Journaltitle = {Linguistic Inquiry},  
    Number = {1},  
    Pages = {1--22},  
    Title = {Three Factors in Language Design},  
    Volume = {36},  
    Year = {2005}}


When the .tex file is run this will produce a .bib file with the contents of the environment.

As Nicola Talbot said in a comment above, it's probably safe to assume that you don't need to include any standard packages.

EDIT: Jörg pointed out in a comment that latexpand will deal with \input etc. without copying and pasting.

| improve this answer | |
  • 1
    Bundledoc does precisely this, but can be configured with a great degree of precision; see this answer of mine for more details. – jon Apr 1 '14 at 20:27

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.