3

I always use LaTeX on different computers, so I hope to install a LaTeX system on a USB drive. I tried to install the LaTeX Portable on my USB drive, then I insert it into another computer, but I found it can't be used normally. Is there a way to make a flash drive USB LaTeX?

Ingmar
  • 6,690
  • 5
  • 26
  • 47
Y. zeng
  • 1,885
  • Yes, there is. Just run the installer with the -portable option: install-tl -portable – AlexG Jun 01 '22 at 07:10
  • @AlexG I clicked the install-tl-windows.bat in USB drive, but it installed again. So installing USB LaTeX only download the files in USB. Am I right? – Y. zeng Jun 01 '22 at 07:15
  • I can only speak for the Linux version of the installer. If you run the installer by click, you may need to set the portable option by setting the corresponding checkmark somewhere in the process and adjust the target parent directory TEXDIR. – AlexG Jun 01 '22 at 07:21
  • @AlexG Okay, but I use Windows 11. Thanks for your idea for Linux. – Y. zeng Jun 01 '22 at 07:25
  • I just tested the Windows installer on another computer. Within the installer GUI, you need to open the "Advanced" menu, in order to set the "portable installation" option and to adjust TEXDIR, the installation root directory. – AlexG Jun 01 '22 at 07:30
  • @AlexG I did as you said, so I installed LaTeX in my USB drive, but it can't be used in another computer. – Y. zeng Jun 01 '22 at 07:37
  • @Y.zeng have you set the path on the second machine? – David Carlisle Jun 01 '22 at 07:54
  • @DavidCarlisle How to set the path on the second machine? – Y. zeng Jun 01 '22 at 07:57
  • 1
    just usual windows settings (as you must also have done on the first machine if works there?) all texlive does is copy the files to a directory but in any operating system you need the folder with pdflatex to be in your path so when you type pdflatex it knows what program to run. – David Carlisle Jun 01 '22 at 08:26
  • @DavidCarlisle I started the texworks in the USB drive, and ran it. It showed: Error launching Console Application PDFLaTeX . How should I fix it? – Y. zeng Jun 01 '22 at 08:28
  • You can set your system PATH environment using the windows control panel but I believe texworks has an option to set the path locally in its configuraion menu but I do not have texworks so can not help more. – David Carlisle Jun 01 '22 at 08:46
  • @DavidCarlisle I set the path. Now the error is:fmtutil [ERROR]: -user mode but path setup is -sys type and I can't find the format file pdflatex.fmt – Y. zeng Jun 01 '22 at 08:47
  • "On Windows, you can double-click tl-tray-menu at the root of the installation and create a temporary ‘tray menu’ offering a choice of a few common tasks." https://www.tug.org/texlive/doc/texlive-en/texlive-en.html#x1-420004.2 – hair-splitter Jun 01 '22 at 09:10
  • I can find tray menu and open it. How should I modify it to suit texworks?@hair-splitter – Y. zeng Jun 01 '22 at 09:25
  • Choose the 'Editor' menu item – hair-splitter Jun 01 '22 at 09:32
  • @hair-splitter 'Editor'-'Preference'-'typesettingand what should I modify? I change the location ofpdflatex` – Y. zeng Jun 01 '22 at 09:34
  • @Y. zeng No need to change anything. Just use it. – hair-splitter Jun 01 '22 at 09:37
  • @hair-splitter but the error is fmtutil [ERROR]: -user mode but path setup is -sys type and I can't find the format file pdflatex.fmt – Y. zeng Jun 01 '22 at 09:38
  • @Y. zeng Then the installation may be bad. – hair-splitter Jun 01 '22 at 09:43
  • @hair-splitter Is there a way to repair it? – Y. zeng Jun 01 '22 at 09:44
  • @Y. zeng Try tray menu / Package manager / Actions – hair-splitter Jun 01 '22 at 09:47
  • @hair-splitter You are so excellent. It can be used in another computer now. May you teach me how to set xelatex-biber-xelatex-xelatex in texworks with one click? – Y. zeng Jun 01 '22 at 10:21
  • @Y. zeng Set the latexmk.exe with -xelatex argument in TeXworks / Edit / Preferences / Typesetting – hair-splitter Jun 01 '22 at 10:41
  • @hair-splitter It is too obvious to imagine. Could you send me a figure of that? – Y. zeng Jun 01 '22 at 11:47

0 Answers0