MiKTeX and proTeXtrunning latex from a USB stick

Information and discussion about MikTeX distribution for Windows and the related proTeXt: Installing, updating, configuring
User avatar
T3.
Posts: 208
Joined: Fri Mar 14, 2008 12:58 pm

running latex from a USB stick

Post by T3. »

Knuffi wrote: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?
No, the batch file only changes the path for its own process and applications started from it. The system and user paths stored in the registry are not affected.
Knuffi wrote: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 don't know of any such way.

Cheers,

Tomek

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Knuffi
Posts: 25
Joined: Fri Oct 10, 2008 1:27 pm

Re: running latex from a USB stick

Post by Knuffi »

Ok, I will test it tomorrow, when I'm back on a system without installed MikTeX and Admin rights ...:)
Knuffi
Posts: 25
Joined: Fri Oct 10, 2008 1:27 pm

Re: running latex from a USB stick

Post by Knuffi »

Ok, the batch works for me, the files are compiled (I hard coded the drive letter of the USB into the batch file instead of using the %~d0) but sumatra pdf works only once after setting the TexmakerX options and then only opens, but shows no pdf. The filename is shown above the window, but sumatra shows page 0 from 6 and only dark background.

Very strange (maybe I should post it in the TexMakerX forum):
when searching for and afterwards selekting sumatrapdf.exe as viewer, the options window shows the paths with forward slashes instead of backslashes:

"E:/Programme/Sumatra/SumatraPDF.exe" %.pdf
But the programme starts nevertheless, even if I change the slashes to backslahes. But the pdf seems not to be opened correctly in either case.
Knuffi
Posts: 25
Joined: Fri Oct 10, 2008 1:27 pm

running latex from a USB stick

Post by Knuffi »

To be a bit more precise:

I altered the batch like this:

Code: Select all

path driveletter-of-the-stick:\path to MiKTeX root directory\miktex\bin;%path%
start "" "%~d0\path to\texmaker.exe" %*
The %~d0 works for starting the tool, but not for changing the path (at least for me), so I put the drive letter hard coded there. If you change the computer and get another drive letter, you could change the batch file in the way of using a query for the drive letter and a case-loop in it.

This way, the batch also works for LeD. :)
Post Reply