cat /dev/brain |

ad-hoc texdoc

published on Sunday, February 5, 2017

Archlinux does not include documentation for tex packages. Therefore, native texdoc does not work:

% texdoc siunitx
Sorry, no documentation found for siunitx.
If you are unsure about the name, try searching CTAN's TeX catalogue at

Consider using this (very primitive) replacement for texdoc:


function texdoc
    mkdir -p $prefix
    cache=$prefix/$(basename $url) && (
    if [[ ! -e $cache ]]; then
        wget $url -O $cache
    ) &&
    evince $cache

It will download documentation from CTAN and save it in ~/.cache/texdoc/ folder for future use.

This entry was tagged config, gist, helper, tex, util and zsh