MiKTeX and proTeXt ⇒ running latex from a USB stick
running latex from a USB stick
Hi:
I write documents in latex in multiple locations, and I often have to use public computers that don't have these programs installed on them and for which I don't have administrator privileges. Naturally, I got pretty excited when I saw there was a portable version of miktex. I spent about 5 hours yesterday trying to get it to work and I failed. I tried downloading this thing called USBtex, which as far as I can tell just basically bundles miktex, an outdated version of Texmaker and a PDF viewing program and configures them to load off a USB stick -- this would be awesome (although, obviously, updating to the newer version of Texmaker would be preferred) but whenever I try to install new packages on a public computer, I get an "access denied" error message, which I thought was not supposed to happen.
I was wondering if someone out there could just give me straightforward, step-by-step instructions on how to get this thing up and running and for which installing packages could be done from any computer. Much appreciated!
I write documents in latex in multiple locations, and I often have to use public computers that don't have these programs installed on them and for which I don't have administrator privileges. Naturally, I got pretty excited when I saw there was a portable version of miktex. I spent about 5 hours yesterday trying to get it to work and I failed. I tried downloading this thing called USBtex, which as far as I can tell just basically bundles miktex, an outdated version of Texmaker and a PDF viewing program and configures them to load off a USB stick -- this would be awesome (although, obviously, updating to the newer version of Texmaker would be preferred) but whenever I try to install new packages on a public computer, I get an "access denied" error message, which I thought was not supposed to happen.
I was wondering if someone out there could just give me straightforward, step-by-step instructions on how to get this thing up and running and for which installing packages could be done from any computer. Much appreciated!
NEW: TikZ book now 40% off at Amazon.com for a short time.
running latex from a USB stick
Portable MiKTeX is in beta, so there might be some problems. File a bug report with details. In my quick testing it was extremely slow, but that could be because of my test set-up (VirtualBox with folder sharing).
If TeX Live is an option for you, there is a how-to available here and some more information here.
Cheers,
Tomek
If TeX Live is an option for you, there is a how-to available here and some more information here.
Cheers,
Tomek
Re: running latex from a USB stick
Tomek:
Thanks for the quick and thoughtful reply. I had no idea about the Texlive option, and I have tried following the directions on the link you sent without success. I get an error message saying "Texlive installation failed" or something to that effect. Such is life, I suppose.
Thanks for the quick and thoughtful reply. I had no idea about the Texlive option, and I have tried following the directions on the link you sent without success. I get an error message saying "Texlive installation failed" or something to that effect. Such is life, I suppose.
Re: running latex from a USB stick
I'm sorry to hear that this didn't work for you but without some further information it's impossible to diagnose the problem. I think that the quickest way to get TL onto stick is to follow the approach from the second link (i.e. extract and copy the content of .iso image if your USB stick is big enough).
I can try to help you work out the problems but I will need more detailed information about what went wrong.
Cheers,
Tomek
I can try to help you work out the problems but I will need more detailed information about what went wrong.
Cheers,
Tomek
Re: running latex from a USB stick
Yah, I was a bit vague -- fair enough. How about this? Would it be possible for you to tell me exactly what is required to get texmaker or whatever to "associate" (?) with the portable miktex? That is, when I click on pdflatex in texmaker, for it to go compile the pdf document by using the portable miktex that i put on my usb stick (and not possibly some other version of miktex on the hard drive of the computer). That would be awesome and I think would solve my problem. Incidentally, when I currently go to "texmaker options," for pdflatex it says
pdflatex -interaction=nonstopmode %.tex
which I don't understand -- it doesn't seem to be associated with portable miktex specifically.
Thanks for all your help thus far, Tomek.
pdflatex -interaction=nonstopmode %.tex
which I don't understand -- it doesn't seem to be associated with portable miktex specifically.
Thanks for all your help thus far, Tomek.
running latex from a USB stick
The problem is that MiKTeX binaries are not on the search path and therefore cannot be found. Use a .bat wrapper to set up the PATH and to start texmaker (or any other editor). Then it is enough to configure the editor with pdflatex.exe or even just pdflatex, the system will find it. Here's and example .bat file:
The %~d0 thing resolves to the drive containing the batch and %* passes through any command line arguments.
Cheers,
Tomek
Code: Select all
path %~d0\path to MiKTeX root directory\miktex\bin;%path%
start "" "%~d0\path to\texmaker.exe" %*
Cheers,
Tomek
Re: running latex from a USB stick
Thanks, Tomek -- I really appreciate you helping me out here. I tried making this bat file and...it didn't work. It did load texmaker, but I keep getting an "Error : could not start the command" message from texmaker when I click on pdflatex. Now, I am completely new to bat files and the like, so it's possible that I am doing something really dumb. I should mention that I've tried a number of permutations -- running the bat file before opening texmaker, opening up miktex on the usb and then running the bat file, splitting up the bat file into two separate ones, etc. Nothing works.
Thanks for your help.
Thanks for your help.
Re: running latex from a USB stick
It works for me (just tested with texmaker 1.8 and 1.9). It should be one batch file, don't split it. Are you sure the path to MiKTeX binaries is specified correctly? Maybe post your batch.
Cheers,
Tomek
Cheers,
Tomek
Re: running latex from a USB stick
Hi there,
I'm using MikTex portable 2.8 and have the same problem. Is it possible to give relative paths?
A batch file changing the path variable of the system is no good solution for me, as AFAIK you need special rights to do so, don't you?
Or is there a way to get out of this with a variable in the config files of TexMaker, that resolves the drive letter of the USB stick?
I'm using MikTex portable 2.8 and have the same problem. Is it possible to give relative paths?
A batch file changing the path variable of the system is no good solution for me, as AFAIK you need special rights to do so, don't you?
Or is there a way to get out of this with a variable in the config files of TexMaker, that resolves the drive letter of the USB stick?