Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a "template" .tex file which I've created manually, and I want to be able to dynamically convert it to PDF in my software.

On my computer I use pdflatex for the conversion, but the end user might not have it installed. My question is - how can I install pdflatex on the end user's computer? what files should I install? I don't want the user to have to install a whole latex distribution because it is huge.. Maybe there is a small-minimal package to which I could add the packages I use in my pdf?

share|improve this question
    
Aurora uses a simplified MiKTeX. And MATLAB also includes a small TeX distribution as part of it. Old but small teTeX might be also suitable. –  Leo Liu Jun 21 '11 at 17:10
    
I have not tried this tex.stackexchange.com/questions/8249/…. Please try it and let me know. :-) Thank you. –  xport Jun 21 '11 at 18:52
    
@xport: I haven't tried it.. I looked at what @Karl suggested - the MiKTeX Portable, and it looks great. A bit big though.. –  Ofir Jun 21 '11 at 20:22

3 Answers 3

up vote 4 down vote accepted

MiKTeX Portable is the simplest solution, I think.

It's about 400 MB uncompressed. Size can be reduced to ~300 MB by uninstalling unnecessary packages and fonts. But some packages can't be removed because there are package dependences.

Removing the doc folder will save yet another ~80 MB but that brakes the packages themselves. And should be done last.

Going below 200 MB uncompressed is equal in effort to making your own TeX distribution (or fork of a such distribution).

share|improve this answer
    
Thanks. I will look into the MiKTeX Portable.. It looks promising :) –  Ofir Jun 21 '11 at 16:47
    
Right now I'm standing at about 320MB.. How could I know if some packages depend on a package I want to uninstall? –  Ofir Jun 21 '11 at 20:23
    
@Ofir: The fastest way is just uninstall everything you think will not need. If it's needed, MiKTeX will reinstall it automatically. And just make a sample document, that uses all packages you need to install. Run it, and MiKTeX will resolve all dependences and will install all the packages needed. That's in case needed packages exist in the MiKTeX repository. –  Karl Karlsson Jun 21 '11 at 20:40

My advice: use plain TeX instead of LaTeX. You will need far fewer files that way, and that means you can (usually) have everything you need as part of your software. I have done this on various occasions, and could usually get by with only a couple of megabytes of extra stuff (pdftex.exe, plain format and a macro file, and a few fonts).

share|improve this answer
    
Thanks. But when I try using pdftex <FileName> on command prompt it generates an error for practically every line in the .tex file, starting from the \documentclass (says "Undefined control sequence").. Should I use it differently from pdflatex? (and again, what files do I need to include except pdftex.exe and the .sty s of the packages I use?) –  Ofir Jun 21 '11 at 16:47
    
@Ofir Unfortunately what Taco is suggesting would require rewriting your document in plain TeX and not in LaTeX. And I suspect that this might not be something you might be able to do at the present time. Although some style files are usable in both TeX and LaTeX, (although invoked differently in TeX) most aren't, so translating an existing LaTeX document to plain TeX is likely not to be a trivial task. –  Alan Munn Jun 21 '11 at 17:05
    
@Alan I didn't think there was such a difference between TeX and LaTeX... So I guess my best option will be to include some version of MiKTeX with my software.. Thanks anyway –  Ofir Jun 21 '11 at 17:26

In order to get below 200 MB I ended up writing a small C# console application, which "builds" a minimal "core" from a full MiKTeX installation. The basic steps were:

1) Set up file access audit rules for all files in the original full MiKTeX installation.

2) Compile the target .tex files.

3) Copy all files accessed during compilation to form the new "core".

Using this approbation I was able to get down to ~ 60 MB uncompressed using a decent amount of packages.

share|improve this answer
1  
Would you be willing to share that application? I would find it useful! –  mrf Sep 25 '12 at 23:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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