0

I am using a portable XeTeX installation installed via TexLive parallel with a normal PdfLaTeX installation. I do not want to mix them up. I wanted to install some more packages for XeTeX which did not work.

When I run the command

tlmgr show <package>

tlmgr tells me that this package is installed. It returns something like

package:     ctex
category:    Package
shortdesc:   LaTeX classes and packages for Chinese typesetting
longdesc:    ctex is a collection of macro packages and document classes for LaTeX Chinese typesetting.
installed:   Yes
revision:    47595
sizes:       src: 457k, doc: 1141k, run: 717k
relocatable: Yes
cat-version: 2.4.14
cat-date:    2018-05-02 16:00:12 +0200
cat-license: lppl1.3c
cat-topics:  chinese book-pub class
collection:  collection-langchinese
Included files, by type:
run files:
  RELOC/tex/generic/ctex/ctexmakespa.tex
  ...

tlmgr sais that this package is installed. The problem is that I know for sure that this package is not installed. In fact tlmgr tells me that I have installed every single package which is not true. This may be true for my other installation.

Deleting the packages does not work. Also I tried the commands tlmgr update --self, tlmgr update --self --all and tlmgr init-usertree. I also re-downloaded the database file texlive.tlpdb from CTAN which didn't help too.

I am using windows so I also removed the normal PDFLaTeX installation from the PATH variable on my machine and I added the portable installation (which is stupid because this was the reason why I used the portable installation: Not to change the PATH). This still shows me that I have installed every package.

tlmgr conf does only show the paths of the portable installation. I checked the texmf.cnf which also contains the correct paths. When I run kpsewhich.exe -var-value=TEXMFSYSVAR or kpsewhich.exe -var-value=TEXMFLOCAL I always get the correct portable XeTeX paths. I don't know why tlmgr is always reading the wrong TeX-directory.

So my questions are:

  1. How does tlmgr decide whether a package is installed or not?
  2. Where is RELOC?

Note: I always called /path/to/the/portable/xetex/installation/bin/win32/tlmgr.bat to make sure that I am using the correct tlmgr of the portable XeTeX.

  • For what its worth I run several tex engines and the most common issue is the path order. 1) if I have two versions on path I cannot guarantee even if changing order which package will find another exe to run, thus only one tex engine is added at a time using separate start up scripts (same goes for perl, ghostcript etc etc.) 2) other problem is that the support texmf local may need to be changed and some of those on the machine may be found in preference to portable thus they also need scripting via a series of set texmf= difficult to know which to advise without paths but watch for appdata – user170109 Jan 24 at 17:16
  • There is nothing like a "portable xelatex installation" or so. Do you speak about a "portable TeX Live installation"? How did you install the "portable TeX Live installation"? tlmgr searches the local texlive.tlpdb for an entry of ctex to determine whether it is installed. In the portable case the tlpdb should be on YOURINSTALLROOT/tlpkg/texlive.tlpdb. RELOC means that packages can be installed in different TEXMF trees. On installation the RELOC will be replaced with the actual location (texmf tree). – norbert Jan 25 at 21:00
  • Thank you for your ansers. Yes, I am talking about a portable TeX Live installation with XeTeX. Sorry for messing this up. So in my texlive.tlpdb there are all the packages. This makes tlmgr think that they are installed even tough they are not. This is my problem. Do you have any idea how I can tell tlmgr that they are not installed? Updating the file manually is not possible because I have some of the packages installed. – miile7 Jan 31 at 9:28
0

It is working now. For everyone else who has a similar problem. I did the following things, I don't exactly know what fixed my problem:

  1. I removed my other latex installation completely (which was something I really didn't want to do. I think this is not necessary but it's too late for me to test it).
  2. I changed the TEXMFLOCAL in my texmf.cnf from ./texmf-local to $SELFAUTOPARENT/texmf-local. (I think this is the important thing).
  3. I ran tlmgr update --self again.
  4. Also there is a so called "user mode". This allows to change the installation/sources of the packages for tlmgr. Maybe this may help you. You can change the path to the path where your packages actually are. I also didn't test this.

I don't know the exact reason why this was happening or how I actually fixed it. I think something with the wrong paths as @KJO mentioned.

If you have a better solution or a real explanation feel free to comment. I am still interested in what I did wrong and not too happy with my "scrappy" solution.

  • The default value for TEXMFLOCAL in the main texmf.cnf file (I mean /usr/local/texlive/2018/texmf-dist/web2c/texmf.cnf) is TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local. If you changed it in the top texmf.cnf file (I mean /usr/local/texlive/2018/texmf.cnf), then just remove the faulty line. – egreg Mar 2 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.