From mboxrd@z Thu Jan 1 00:00:00 1970 From: Myles English Subject: using texlive class from a private texmf tree Date: Tue, 26 Nov 2019 13:36:57 +0000 Message-ID: <87blsysqun.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:41224) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZb1f-0000FX-Qw for help-guix@gnu.org; Tue, 26 Nov 2019 08:37:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iZb1a-0005yn-9h for help-guix@gnu.org; Tue, 26 Nov 2019 08:37:07 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:42633) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iZb1Z-0005xP-VR for help-guix@gnu.org; Tue, 26 Nov 2019 08:37:02 -0500 Received: by mail-wr1-x444.google.com with SMTP id a15so22485708wrf.9 for ; Tue, 26 Nov 2019 05:37:01 -0800 (PST) Received: from localhost ([2a02:390:8458:1::1fa]) by smtp.googlemail.com with ESMTPSA id v6sm14918941wrt.13.2019.11.26.05.36.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2019 05:36:59 -0800 (PST) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: help-guix Hello guix, I don't know if the problem I am having is with texlive or Guix. How do I use my own (xe)latex class with the guix texlive? Why does using a private texmf.cnf to specify the path to my class not work? Does anyone have a setup that works or any suggestions what else can be tried? In what follows I try to put my private latex tree under ~/.texmf but have also tried it under ~/texmf with the same results. This is on Arch Linux with a recent guix. This is what is installed: $ guix package -I | grep tex texlive-bin 20180414 out /gnu/store/x9c77i6r5fmarslij6ng81awgrxblplm-texlive-bin-20180414 texlive 20180414 out /gnu/store/7mxkdn6cp7x8sac49p2g80qw5j1aavi3-texlive-20180414 texlive-latex-koma-script 49435 out /gnu/store/fgk6c4xqs6vzhsnkslid88hmy4czyk21-texlive-latex-koma-script-49435 texlive-base 49435 out /gnu/store/6n4hmllzljyv8ai63k7dgslza7sl3kzi-texlive-base-49435 $ which -a xelatex /home/myles/.guix-profile/bin/xelatex Set up directories: #+begin_src sh mkdir -p ~/.texmf/tex/latex/mytest mkdir ~/tmp/tex #+end_src Create these test files: #+begin_src sh :tangle ~/.texmf/tex/latex/mytest/my-class.cls \ProvidesClass{my-class} \NeedsTeXFormat{LaTeX2e} \LoadClass[11pt]{article} \pagestyle{plain} #+end_src #+begin_src sh :tangle ~/tmp/tex/a.tex \documentclass{my-class} \begin{document} \end{document} #+end_src Check there are no environment variables that might effect things: $ env | grep TEX [nothing] $ source ~/.guix-profile/etc/profile $ env | grep TEX TEXMF=/gnu/store/bmdzgjxr0xjyz03gislmwvv1p8vid8qp-profile/share/texmf-dist TEXMFCNF=/gnu/store/bmdzgjxr0xjyz03gislmwvv1p8vid8qp-profile/share/texmf-dist/web2c $ kpsewhich -all -var-value TEXMF /gnu/store/bmdzgjxr0xjyz03gislmwvv1p8vid8qp-profile/share/texmf-dist $ kpsewhich -all -var-value TEXMFCNF /gnu/store/bmdzgjxr0xjyz03gislmwvv1p8vid8qp-profile/share/texmf-dist/web2c $ grep "^TEXMF " `kpsewhich -all -var-value TEXMFCNF`/texmf.cnf TEXMF = $TEXMFROOT/share/texmf-dist It it not going to find my-class.cls unless the path TEXMF in the texmf.cnf (above) is changed. So making a private texmf.cnf file as recommended in [1], and noting that "definitions in earlier files override those in later files" [2]: #+begin_src sh :tangle ~/.texmf/web2c/texmf.cnf TEXMFHOME = $HOME/.texmf TEXMF = {$TEXMFHOME,$TEXMFROOT/share/texmf-dist} #+end_src Change TEXMFCNF so it should be found: $ export TEXMFCNF={$HOME/.texmf/web2c,/home/myles/.guix-profile/share/texmf-dist/web2c} Check to see if that variable has been adopted by texlive: $ kpsewhich -all -var-value TEXMFCNF {/home/myles/.texmf/web2c,/home/myles/.guix-profile/share/texmf-dist/web2c} $ kpsewhich -show-path=cnf /home/myles/.texmf/web2c:/home/myles/.guix-profile/share/texmf-dist/web2c But when I check TEXMF it has not changed: $ kpsewhich -all -var-value TEXMF /gnu/store/bmdzgjxr0xjyz03gislmwvv1p8vid8qp-profile/share/texmf-dist However, TEXMF is also an environment variable set in ~/.guix-profile/etc/profile. Try compiling the test file anyway: $ cd ~/tmp/a $ xelatex a #+begin_quote This is XeTeX, Version 3.14159265-2.6-0.99999 (TeX Live 2018) (preloaded format=xelatex) restricted \write18 enabled. entering extended mode (./a.tex LaTeX2e <2018-04-01> patch level 2 ! LaTeX Error: File `my-class.cls' not found. Type X to quit or to proceed, or enter new name. (Default extension: cls) Enter file name: #+end_quote Well that didn't work. Try unsetting the environment variable TEXMF first: $ unset TEXMF $ kpsewhich -all -var-value TEXMF {/home/myles/.texmf,/gnu/store/b28kk24c3b0hspzb4787xb50mf074l0g-texlive-configuration/share/share/texmf-dist} $ kpsewhich -show-path=cnf /home/myles/.texmf/web2c:/home/myles/.guix-profile/share/texmf-dist/web2c $ cd ~/tmp/tex $ xelatex a #+begin_quote This is XeTeX, Version 3.14159265-2.6-0.99999 (TeX Live 2018) (preloaded format=xelatex) restricted \write18 enabled. kpathsea: Running mktexfmt xelatex.fmt perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_MESSAGES = "", LANG = "en_GB.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /home/myles/.texlive2018/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /home/myles/.texlive2018/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=xelatex, skipped mktexfmt [INFO]: Total formats: 0 mktexfmt [INFO]: exiting with status 0 I can't find the format file `xelatex.fmt'! #+end_quote Thanks, Myles [1] https://texfaq.org/FAQ-privinst [2] https://tug.org/texinfohtml/kpathsea.html#Config-files