3

SOLVED -- SEE AT BOTTOM

I have a work computer that is completely locked down and I can't install most software in it (including LyX). Not much of a problem, I've discovered the world of "Portable Apps", i.e. apps that don't need to be "installed installed", and they've been a life-saver.

Recently, I decide to learn LyX. So I try out various existing "Portable" versions of LyX available on the internet. And all of them give a PDF view error. I then find out that it's a real, known bug.

So I decide to "roll my own" Portable LyX using the current non-portable version of LyX and Portable MikTeX.

I do all of this on a USB flash drive stuck to my home computer (where I do have admin access to install LyX), with the intention that I will eventually be using this "Portable" LyX (on that USB flash drive) via my work computer.

Steps and Issues:

1) I download "Portable MikTeX" and install it to a LyXPortable folder on my USB flash drive. No issues.

2) Next, I download and install LyX Version 2.3.2-2 in the same LyXPortable folder.

  • When asked to point to latex, I point to the latex.exe file located at LyXPortable\texmfs\install\miktex\bin. Installation proceeds fine.

3) Folders: in case it helps, I'm linking to screenshots of the folders

4) Errors: now, when I run this "Portable" LyX (by double clicking on LyX.exe -- which I found out is the wrong way to go about it, update below), these are the errors I get.

Error when I try to save a .lyx file:

enter image description here

The only "View PDF" option I have is dvipdfm:

enter image description here

Error when I try to "View PDF":

(NOTE: this error mentions pplatex not pdflatex. I googled pplatex and was surprised at how few hits there were that referenced LyX or Portable MikTeX.)

enter image description here

Although dvipdfm is the only option I have under "View PDF", I do have many PDF format handlers listed in Preferences / File Handling / File Formats:

enter image description here

These are the options for pdflatex:

enter image description here

These are the options for dvipdfm:

enter image description here

Even under "Export", dvipdfm seems to be the only PDF option:

(However, when I actually export to PDF, I get the same pplatex error I screenshotted earlier).

enter image description here

enter image description here

I tried "Export As", and pdflatex showed up as a PDF option. However, when exporting I got an error:

enter image description here

enter image description here

enter image description here


Based on comment from Ulrike, below, I started LyX from within the Portable MikTeX terminal, then ran "Reconfigure", then restarted LyX from within the terminal. There were some differences, but still errors in View PDF.

New View options showed up:

enter image description here

Error when I try to View PDF via pdflatex:

(I also get the same error when I try to View PDF via dvipdfm or try to Export via pdflatex or dvipdfm)

enter image description here


My Question: I'm looking for your suggestions / pointers on what I can do to make this "Portable" install of LyX work with "Portable MikTeX". All suggestions / pointers will be tried out by me.


SOLVED: I was able to make this "Portable LyX" app package work: https://portableapps.com/node/38209

I had tried it before and it never worked for me. But this time I finally realized that the 4 dependencies listed there (MiKTeX, Ghostscript Portable, GSview, Strawberry Perl) are not included in the Portable LyX app, and instead have to be installed separately.

It took a while to figure out how to install the 5 apps (Portable LyX + 4 Dependencies) in such a way that they can recognize each other. It ultimately proved to be a no-brainer. I had to first install this Portable Apps platform app. Next, I installed each of the 5 apps via "the Portable Apps platform app > Apps > Install a New App (paf.exe)". Then I started LyX via "the Portable Apps platform app", tried to view a PDF, got a message to install some package (I think it was called bbplots or something like that), and then VOILA, a PDF was generated.

7
  • 1
    if article.cls can not be found it does'nt make sense to play around with engines. The miktex portable comes with a small terminal in its menu (miktex.org/howto/portable-edition). Did you start lyx from this menu? May 15, 2019 at 7:00
  • @UlrikeFischer Thanks for the pointer. I didn't know one was supposed to use the MikTeX terminal. I used it to start LyX, then "Reconfigured" it (took a long time), then restarted LyX via MikTeX terminal. I've added screenshots of the resulting issues to my post. Thanks again! May 15, 2019 at 7:37
  • 1
    there is no AEA.cls in miktex, perhaps this is a local class that you need to install first. Or you are using some curious template/document. May 15, 2019 at 7:45
  • 1
    @thanks_in_advance as for alternatives: you could consider creating a "live Ubuntu [or other Linux distro] USB". That's personally the option I would go for. Another possibility would be to use LyX in the cloud, e.g., rollapp.com/app/lyx
    – scottkosty
    May 15, 2019 at 8:09
  • 1
    As you now know run any TeX first with local variables so it is declared on its own session path (Thus not incurring IT dept. wrath by modifying your company or system paths) add a sprinkling of local environment variables for the parts lyx does not add NOTE it does have its own customised ghostscript ImageMagick Perl Python and other resources that also need to be defined on the session path finaly if adding a pdf viewer you need to understand that commands are served in background pipes through computer memory this is essential for two way syncing between lyx and any external viewer
    – user170109
    May 15, 2019 at 20:33

2 Answers 2

1

SOLVED: I was able to make this "Portable LyX" app package work: https://portableapps.com/node/38209

I had tried it before and it never worked for me. But this time I finally realized that the 4 dependencies listed there (MiKTeX, Ghostscript Portable, GSview, Strawberry Perl) are not included in the Portable LyX app, and instead have to be installed separately.

It took a while to figure out how to install the 5 apps (Portable LyX + 4 Dependencies) in such a way that they can recognize each other. It ultimately proved to be a no-brainer. I had to first install this Portable Apps platform app: https://portableapps.com/download .

Next, I installed each of the 5 apps via the Portable Apps platform app > Apps > Install a New App (paf.exe)". Then I started LyX via "the Portable Apps platform app", tried to view a PDF, got a message to install some package (I think it was called bbplots or something like that), and then VOILA, a PDF was generated.

1

From Lyx download blurb

NOTE: Before you install LyX on Windows, you need to install a TeX distribution. For more information on how to do this, please see this page on the LyX wiki...

1) Download latest MiKTeX portable from MiKTeX site and install it so it is running active in memory.

2) Download Latest compressed Lyx Windows Installer: LyX-232-2-Installer-10.exe (~58 MB) This expands to over 200MB including the dedicated tested selection of GhostScript9.22 stable, magick7.07 Perl5.242, Python2.7, no other downloads needed

Install Lyx "just for me" in usb stick folder, lyx should see MiKTeX in memory and adjust itself to store locations, installation done. (lyx may need to be reconfigured each time MiKTeX is loaded from a different usb port)

Yes there is some extra tweaking needed to run on another machine/location, so add a script to set all the TeX environmental settings for MiKTeX including adding to start of path.

Start MiKTeX first, add a line to pause, whilst it does start-up maintenance such as reload font list and font map after it is plugged into a usb port since last time.

Now start LyX with MiKTeX console in memory. NO NEED to add any 3rd party apps to system path LyX will automatically do that for you during the portable session.

If you are using an external PDF viewer it will need to call LyX via memory pipes too.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .