18

Assume I want to create an application working together with LaTeX compiler behind the scene. For the sake of simplicity, assume I also use minimal document class and no package imported.

At the final stage, I want to deploy this application to a computer with no LaTeX system installed. This scenario forces me to make the installer get shipped with the LaTeX compiler.

Shortly speaking, which files (in LaTeX distribution) are needed as minimal as possible?

Display Name
  • 46,933
  • @xport: I suppose that you have to use the full path to mkjobtexmf. Don't know how the files in Windows are found. You can also try perl mkjobtexmf ... –  Jan 04 '11 at 15:34
  • @xport: in Linux it is a link to the perl file ../texmf/scripts/mkjobtexmf/mkjobtexmf.pl Do you have that file? –  Jan 04 '11 at 15:44
  • @xport: in TeXLive2010 for windows it is present. I cannot say more here for other distributions. Maybe that you have to install it. –  Jan 04 '11 at 15:52
  • @xport: just tried it with TeXLive under Windows and in diffrence to Linux it creates a file <file>????.fls with a list of all used files. –  Jan 04 '11 at 15:59
  • @xport: ah I see. It couldn't create a directory. Write protected directory? And the contents of the created file list, is it ok? –  Jan 04 '11 at 16:16
  • I have almost exactly the same need, and have offered a bounty. I'm also curious how might I package my own LaTeX distribution (do I just copy the required files?). – ipavlic Mar 05 '11 at 17:35
  • It is strange practise to recommend installing perl for windows users. Although it is possible, Microsoft recommends Power Shell built into all recent versions of Windows. Since Microsoft always provides backward compatibility, Power Shell should also run .js, .wsf, .vb scripts as well. They provides access to all internal windows methods and properties. You can write a scripts that edits, say, MS World document. But for the sake of what? – Igor Kotelnikov Mar 06 '11 at 18:01
  • 2
    @Igor: There is no Microsoft WORLD. :D – LaTeX Mar 07 '11 at 01:47

1 Answers1

15

make a testfile and run it with:

mkjobtexmf --jobname <file> --cmd-tex <latex>

<file> is your source file <latex> is your LaTeX command, e.g. pdflatex or simply latex. The Perl program mkjobtexmf creates a directory <file>.mjt which is a compatible texmf directory with all loaded files of your example.

If you are running windows then you'll need an installed Perl, e.g. from http://www.activestate.com/perl/

However, I never used it under Windows, with Linux it is very useful.

  • it seems mkjobtexmf does not include the .fmt file? – Taco Hoekwater Jan 04 '11 at 15:21
  • @Taco: from a run: lrwxrwxrwx 1 voss users 56 4. Jan 16:10 latex.fmt -> /home/voss/.texlive2010/texmf-var/web2c/pdftex/latex.fmt –  Jan 04 '11 at 15:25
  • Ah ok, it seems to only work if the .fmt is inside a pre-conceived directory. I get a Failed line because the .fmt is not where mkjobtexmf expects it to be. – Taco Hoekwater Jan 04 '11 at 15:31
  • @Taco: drop Heiko a line, if you feel that it is a missing feature. –  Jan 04 '11 at 15:46
  • One time that I have been created the folder.mjt how can I execute pdflatex on my .tex document from that folder? – Aurelius Oct 28 '12 at 12:45
  • I am also interested in this process. If I share that folder with other computer without pdflatex, how to proceed? – Sigur Nov 04 '16 at 15:10
  • @Sigur: every program can use that folder. However with every run the files will be overwritten –  Nov 04 '16 at 16:01
  • @Herbert, I'd like to zip that folder and send to some body together with some TeX binary file. Is it possible to run pdflatex binary with that folder without installing other TeX stuffs on the computer? – Sigur Nov 04 '16 at 19:17
  • @Sigur: In general yes. You have to set TEXMFHOME=... to that directory. However, I do not tried it with binaries. Maybe that they should be in an executable directory. –  Nov 05 '16 at 08:30
  • @Herbert, thanks. I am having progress on that. I discovered the portable installation version of TL. It works well. – Sigur Nov 05 '16 at 11:39