all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* using texlive class from a private texmf tree
@ 2019-11-26 13:36 Myles English
  2019-12-04 20:33 ` Andreas Enge
  0 siblings, 1 reply; 4+ messages in thread
From: Myles English @ 2019-11-26 13:36 UTC (permalink / raw)
  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 <RETURN> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: using texlive class from a private texmf tree
  2019-11-26 13:36 using texlive class from a private texmf tree Myles English
@ 2019-12-04 20:33 ` Andreas Enge
  2019-12-06 11:31   ` Myles English
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Enge @ 2019-12-04 20:33 UTC (permalink / raw)
  To: Myles English; +Cc: help-guix

Hello,

I am using a private class without problems from

On Tue, Nov 26, 2019 at 01:36:57PM +0000, Myles English wrote:
> In what follows I try to put my private latex tree under ~/.texmf but

~/.texlive2018/texmf-var/tex/latex/myclass.cls

with the big non-modular "texlive" package. Could you maybe try this
directory? There should not be any need to fiddle with environment
variables.

Andreas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: using texlive class from a private texmf tree
  2019-12-04 20:33 ` Andreas Enge
@ 2019-12-06 11:31   ` Myles English
  2019-12-08 14:30     ` Andreas Enge
  0 siblings, 1 reply; 4+ messages in thread
From: Myles English @ 2019-12-06 11:31 UTC (permalink / raw)
  To: help-guix


Andreas,

Thanks a lot for your reply. I have tried what you suggested but It
still doesn't work.

on [2019-12-04] at 20:33 Andreas Enge writes:

> I am using a private class without problems from
>
> On Tue, Nov 26, 2019 at 01:36:57PM +0000, Myles English wrote:
>> In what follows I try to put my private latex tree under ~/.texmf but
>
> ~/.texlive2018/texmf-var/tex/latex/myclass.cls
>
> with the big non-modular "texlive" package. 

These are the packages installed:

$ guix package -I | grep tex
texlive 20180414 out /gnu/store/wlba9v03ypi0z5qz7p89sa0w12lh37zb-texlive-20180414
texlive-bin 20180414 out /gnu/store/znf7mmx3vslsscn9v3ilxmgkirqwswy8-texlive-bin-20180414
texlive-base 49435 out /gnu/store/5qg546zydvcjcqvbf7d49yg4iq7yhn9d-texlive-base-49435

> Could you maybe try this directory? 

These are the directories I have put my-class.cls in:

$ tree ~/.texlive2018
/home/myles/.texlive2018
└── texmf-var
    ├── tex
    │   ├── latex
    │   │   ├── my-class.cls
    │   │   └── mypkg
    │   │       └── my-class.cls
    │   └── xelatex
    │       ├── my-class.cls
    │       └── mypkg
    │           └── my-class.cls
    └── web2c
        └── xetex
            ├── xelatex.fmt
            └── xelatex.log

> There should not be any need to fiddle with environment variables.

Here are the relevant environment variables:

$ env | grep TEX                        
TEXMF=/home/myles/.guix-profile/share/texmf-dist
TEXMFCNF=/home/myles/.guix-profile/share/texmf-dist/web2c

But still the class isn't found:

$ xelatex a         
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 <RETURN> to proceed,
or enter new name. (Default extension: cls)

Enter file name: X

Is there anything else I can try?

Myles

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: using texlive class from a private texmf tree
  2019-12-06 11:31   ` Myles English
@ 2019-12-08 14:30     ` Andreas Enge
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Enge @ 2019-12-08 14:30 UTC (permalink / raw)
  To: Myles English; +Cc: help-guix

Hello,

On Fri, Dec 06, 2019 at 11:31:07AM +0000, Myles English wrote:
> These are the packages installed:
> 
> $ guix package -I | grep tex
> texlive 20180414 out /gnu/store/wlba9v03ypi0z5qz7p89sa0w12lh37zb-texlive-20180414
> texlive-bin 20180414 out /gnu/store/znf7mmx3vslsscn9v3ilxmgkirqwswy8-texlive-bin-20180414
> texlive-base 49435 out /gnu/store/5qg546zydvcjcqvbf7d49yg4iq7yhn9d-texlive-base-49435
> 
> Here are the relevant environment variables:
> 
> $ env | grep TEX                        
> TEXMF=/home/myles/.guix-profile/share/texmf-dist
> TEXMFCNF=/home/myles/.guix-profile/share/texmf-dist/web2c
> 
> Is there anything else I can try?

maybe try to exactly mimick my environment? And if that does not help,
I would not know where to look next.

$ guix package -I | grep tex
texlive	20180414	out	/gnu/store/axddwjmfip84lz3fp7xqh9p9vx8hchcm-texlive-20180414

In particular, I think that texlive-base (from the split-up texlive
distribution) and texlive-bin (from the monolithic one, but also included
in the "meta-package" texlive) will collide.

$ env | grep TEX

There should be nothing. Maybe that is also pulled in from the split-up
package installed into the profile?

If it works with the monolithic, but not the split-up package, then it is
a bug to be reported.

Andreas

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-08 14:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26 13:36 using texlive class from a private texmf tree Myles English
2019-12-04 20:33 ` Andreas Enge
2019-12-06 11:31   ` Myles English
2019-12-08 14:30     ` Andreas Enge

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.