[Tex/LaTex] Install package from CTAN which is not available in TeX Live

ctanpackagestexdeftexlivetlmgr

The texdef package was recently updated to fix a critical bug. The package is updated on CTAN, but because TeX Live is in its "freeze" period, attempting to update the package via tlmgr update does not work. I do not consider it an acceptable solution to wait until the freeze period is over. How can I install the most recent version?

Best Answer

CAVEAT: This answer holds only for packages which are available in the TDS format. This is indicated by their filename on CTAN. If the filename reads <package>.tds.zip, it is in TDS format.


You can simply install it by hand. The texdef package is available in TDS format which makes the installation ridiculously easy.

  1. Download texdef.tds.zip

  2. Unpack (probably you need sudo with it)

    unzip -o texdef.tds.zip -d `kpsexpand '$TEXMFDIST'`
    
  3. ???

  4. Profit

    $ texdef --version
    texdef: Version 1.8a -- 2018/03/28
    

For other packages extra steps might be necessary. If the package contains files which have to be located via kpathsea, you have to rebuild the filename database. Fonts have to be enabled in the map file. For example with STIX2.

  1. Download stix2-type1.tds.zip.

  2. Unpack (probably you need sudo with it)

    unzip -o stix2-type1.tds.zip -d `kpsexpand '$TEXMFDIST'`
    
  3. Rebuild the filename database (probably you need sudo with it)

    mktexlsr
    
  4. For fonts, enable the font in the map file (probably you need sudo with it)

    updmap-sys --enable Map stix2.map
    
  5. ???

  6. Profit