1

I need to update a single package (thmtools from v.68 to v.72, see my issue).
I am on a Fedora 32 machine (5.11.11-100.fc32.x86_64), and I install/update texlive with the Fedora manager dnf. Unfortunately, thmtools does not seem to be updated at the Fedora repository.

Do I have a quick trick to add somehow (by hand?) the updated version of the package without destroy anything?

note, if I try tlmgr I get a Warning not to do it:

>> tlmgr update --list
*** WARNING ***: Performing this action will likely destroy the Fedora TeXLive install on your system.
*** WARNING ***: This is almost NEVER what you want to do.
*** WARNING ***: Try using dnf install/update instead.
*** WARNING ***: If performing this action is really what you want to do, pass the "ignore-warning" option.
*** WARNING ***: But please do not file any bugs with the OS Vendor.
mario
  • 761
  • 1
    An easy way is to download the 2 files thmtools.ins and thmtools.dtx from https://www.ctan.org/tex-archive/macros/latex/contrib/thmtools/source, save them in the directory of your document, and run latex thmtools.ins (note: latex, not pdflatex). This will create thmtools.sty in your directory, and since this is this first place LaTeX looks for packages it will be used when you compile your document. – Marijn Aug 10 '21 at 10:03
  • Related/duplicate: https://tex.stackexchange.com/questions/73016/how-do-i-install-an-individual-package-on-a-linux-system, https://tex.stackexchange.com/questions/6925/how-do-i-install-a-dtx-file, https://tex.stackexchange.com/questions/1137/where-do-i-place-my-own-sty-or-cls-files-to-make-them-available-to-all-my-te – Marijn Aug 10 '21 at 10:06

1 Answers1

1

Look for your local TEXMF directory, e.g.

echo $TEXMFLOCAL
/usr/local/texlive/texmf-local

then create the directory

/usr/local/texlive/texmf-local/tex/latex/thmtools

Download the zip from CTAN, put the files into that new directory, run

latex thmtools.ins
latex thmtools.dtk  (only if you need the documentation ...)

then run

texhash

and now the local file should be used.

user187802
  • 16,850
  • Note that the OP already has an old version of the package, so creating a directory is not needed, instead kpsewhich thmtools.sty will give the correct directory to put the new file in. – Marijn Aug 10 '21 at 10:09
  • 1
    No! That is the wrong way, never use the directory of the "official" distribution. – user187802 Aug 10 '21 at 10:10
  • 1
    @Marijn as mentioned never manually install stuff into the main installation. It is better to find the "local" part, for texlive one can use kpsewhich -var-value TEXMFLOCAL and it will tell you where the texmf-local is and then one should use that. – daleif Aug 10 '21 at 10:16
  • @daleif I have heard it is "better", for example https://tex.stackexchange.com/questions/69487/purpose-of-local-texmf-trees?noredirect=1&lq=1, but the reasons there do not really apply to the use case in this question I think. – Marijn Aug 10 '21 at 10:18
  • 1
    @Marijn I think at least 95% of installations are single user. – daleif Aug 10 '21 at 10:47
  • @daleif possibly (although in that case according to Alan Mann you should use TEXMFHOME and not TEXMFLOCAL) but that was not what I was referring to. The reasons listed in the linked question above are: texmf-dist is for official packages (thmtools is an official package), local is for test versions (thmtools on CTAN is not a test version), local is for configuration files (doesn't apply), local is for restricted material (thmtools is not restricted). The only possibly valid [...] – Marijn Aug 10 '21 at 10:55
  • [...] reason is that an update by a package manager does not work for packages that you have manually placed in texmf-dist. However, while that may apply to tlmgr, I think that when Fedora packages a new version of TeX Live with associated package updates it will happily overwrite manual updates, or at least ask the user about it with an option to overwrite. I might be wrong about that though, I'll try if I can confirm this. – Marijn Aug 10 '21 at 10:58
  • Hi, for the time being I opted for a dirty way. I rename the old folder to thmtoolsORi, and extract the .zip from CTAN to a new folder /usr/share/texlive/texmf-dist/tex/latex/thmtools, then I run sudo latex thmtools.ins. It seems I need to copy all the files from both source and doc therein, otherwise i get a I can't find file VERSION.tex. l.4 \input VERSION.tex. Note sudo latex thmtools.dtx fails with ! LaTeX Error: File luximono.sty not found, but I do not think I need that. I am able to process my project with thmtools v. 072. This is good for now. – mario Aug 10 '21 at 15:48