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'm looking to treat myself to a totally portable TeX system and was wondering: is it possible to devise an installation scheme that would run on Windows, Linux and MacOS at the "same" time?

I think TeXLive is the best choice here, but I'd much rather avoid having to maintain three separate TeXLive installations. I'd like the three installations to share the package databases for instance.

I'll be using a 32Gb USB stick, in case it matters.

PS: I think I'm onto something here... will post back when I have a working prototype.

Edit: after reading this note I managed to format a USB stick with UDF and have it read and written in Linux and Windows (need to perform some tests on Mac yet). This is the first step towards interoperability.

Edit 2: well, as it turns out, the previous note was useless (the partition table breaks under Windows), I've found this question on superuser and it works like a charm. The only remaining step is writing a couple of scripts to set the environmental variables and we're done ;)

share|improve this question
    
The TL installer used to let you select multiple sets of binaries to install, but I don't know if it still does in TL2011. I don't know if the format files are cross-platform compatible, though, so maybe you'd have to duplicate the TEXMF tree those live in. –  Ulrich Schwarz Oct 30 '11 at 6:38
    
The TL2011 installer does indeed allow you to select multiple sets of binaries. As long as it's a relatively small portion of the tree there's no problem in duplicating. My question mas more along the lines of "Can I install TeXLive in my USB stick under linux, and then 'complete' the installation onto the same directory under windows to get a multi-OS Portable TeX system?", ie. what actual methods would you suggest in order to get this done? –  mpr Oct 30 '11 at 7:15
    
Looking at tug.org/texlive/doc/texlive-en/texlive-en.html#x1-410004, you might be fine just installing in Windows (to be on the safe side), and using the portable option. –  Ulrich Schwarz Oct 30 '11 at 7:29
    
Yep, I read that already and was aware of the --portable option, the thing is: is it enough to install it under windows only? what makes you think that? –  mpr Oct 30 '11 at 7:35
    
I think the only "non-portable" aspect of the linux version is that the installer can put symlinks in /usr/bin, so there's not much danger of things going wrong there. –  Ulrich Schwarz Oct 30 '11 at 8:29
add comment

1 Answer

What you want is possible to achieve with TeX Live to some extent, but there are some caveats. People often want multi-OS setup on a network share and this is well supported. On a USB stick things are more complicated, because of symlinks which are not supported on Windows file systems[*] (FAT32 is the one usually found on USB sticks).

One way around it is to install with --portable option, add any platforms you require afterwards (Windows, OS X, etc.; this can be done only when installed on a Unix-like OS, again, due to symlinks problem), and finally copy everything to a USB stick with dereferencing symlinks to copy the linked files instead.

You won't be able to update such an installation afterwards, though (or to be more specific, updates of binary packages with symlinks won't work[*]). However, binaries are usually not updated between yearly releases, so you might in fact get away with this, but there is no guarantee [**].

A possible further hack would be to remove all platforms but the Windows one, but only from the TL database and not their actual files, so tlmgr is effectively fooled and won't do any updates to the "problematic" packages. Such a setup may be fragile under certain circumstances [**] and requires hand-editing of TL database, which I don't recommend to anyone unless they know exactly what they are doing and can recover from possible breakage.

Yet another approach to updateable system on a stick could be to keep updating the original "source" installation and sync it with the USB one afterwards, which is a bit less convenient and also means no updates on the go, but OTOH shouldn't cause any problems (the last famous words).

[*] Edit: To clarify the issue with symlinks - TL packages are stored simply as compressed tar archives (+ some meta data about the package). Symlinks are archived together with regular files and everything is extracted during package installation and/or update. If the file system doesn't support symlinks, this extraction will fail and therefore package installation/update will fail.

[**] Edit 2: TL makes package backup before its update, so update failure should not be fatal (the old version will be restored), but this can be fragile if the old version has some incompatibility with dependent packages.

share|improve this answer
    
OK, I'm puzzled... you say that I can install 3 different TeXLives (Windows, Linux, MacOS) and that will work fine, but I can't update that install because of symlinks? doesn't TL "remember" that a particular install was to be --portable and not insist on creating such symlinks? –  mpr Oct 31 '11 at 2:00
1  
I tried to clarify in my answer what's the problem with symlinks. TL uses tar to extract package files (including symlinks) and either this extraction works or not and it doesn't on file systems not supporting symlinks. To change that would require to get rid of symlinks altogether, not likely to happen. –  Tomek Oct 31 '11 at 9:10
    
I understand what you mean... but I can install the Win32 TeXLive bundle on an USB stick formatted with FAT32, right? So there seems to be no problem regarding this... why should there be any if I additionally install the Linux bundle as well? I'm sorry to insist on the matter, it just boggles me :S –  mpr Oct 31 '11 at 15:42
    
@mpr: If you understand what I mean, then I don't quite get your question. Is it actually: why do we use symlinks in the Unixy part of TL? Because they are much simpler than what we use on Win32 in their place (see runscript -v -h if you're interested in details). –  Tomek Oct 31 '11 at 16:34
1  
@mpr: In my tests untarring symlinks to FAT32 on linux (CentOS 5.7) fails and on win32 it gives zero size files, so in neither case this works. Dunno about NTFS, but not all linux systems even have drivers installed for it by default (which may or may not be a problem for you). –  Tomek Nov 3 '11 at 14:13
show 4 more comments

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.