1

I recently moved my tex installation from Windows to Linux Mint. While I never had any trouble with the paths on Windows, I don't get it to work under Linux.

I have several own packages (BriefVorlageDeutsch and CVVorlageDeutsch) which are located at /home/tikey/Dokumente/.../. I am trying to add these packages to my tex installation but fail to do so, i.e. the files are not found when I run pdflatex and kpsewhich cannot find them either. What I tried is:

  • check which is my TEXMFHOME
  • create symlinks to my packages in TEXMFHOME
  • run texhash in TEXMFHOME

When I do this, the files from my packages are listed in the ls-R of my TEXMFHOME but kpsewhich still cannot find them. Does anyone know what is wrong here?

tikey@tikey ~ $ kpsewhich --var-value TEXMFHOME
/home/tikey/texmf
tikey@tikey ~ $ cd /home/tikey/texmf/
tikey@tikey ~/texmf $ ln -s /home/tikey/Dokumente/_business/mail/eclipse_workspace/CVVorlageDeutsch/ .
tikey@tikey ~/texmf $ ln -s /home/tikey/Dokumente/_business/mail/eclipse_workspace/BriefVorlageDeutsch/ .
tikey@tikey ~/texmf $ texhash .
texhash: Updating /home/tikey/texmf/./ls-R... 
texhash: Done.
tikey@tikey ~/texmf $ ll
insgesamt 16
drwxr-xr-x  2 tikey tikey 4096 Jul 24 12:58 ./
drwxr-xr-x 64 tikey tikey 4096 Jul 24 12:55 ../
lrwxrwxrwx  1 tikey tikey   75 Jul 24 12:58 BriefVorlageDeutsch -> /home/tikey/Dokumente/_business/mail/eclipse_workspace/BriefVorlageDeutsch//
lrwxrwxrwx  1 tikey tikey   72 Jul 24 12:57 CVVorlageDeutsch -> /home/tikey/Dokumente/_business/mail/eclipse_workspace/CVVorlageDeutsch//
tikey@tikey ~/texmf $ cat ls-R 
% ls-R -- filename database for kpathsea; do not change this line.
./:
.:
BriefVorlageDeutsch
CVVorlageDeutsch
ls-R

./BriefVorlageDeutsch:
doc
document.pdf
document.synctex.gz
ls-R
.project
tex
.texlipse
tmp

./BriefVorlageDeutsch/doc:
document.tex

./BriefVorlageDeutsch/tex:
address
briefkopf
MailTK.sty
settings

./CVVorlageDeutsch:
doc
ls-R
.project
tex
.texlipse

./CVVorlageDeutsch/doc:
document.tex

./CVVorlageDeutsch/tex:
CurriculumVitaeAnna.sty
CurriculumVitaeTKen.sty
CurriculumVitaeTK.sty
tikey@tikey ~/texmf $ kpsewhich CurriculumVitaeAnna.sty
tikey@tikey ~/texmf $ kpsewhich enumitem.sty
/usr/share/texlive/texmf-dist/tex/latex/enumitem/enumitem.sty

Edit: I've also tried to put the files in texmf/tex/latex but it still doesn't work.

tikey@tikey ~/texmf $ cat ls-R
% ls-R -- filename database for kpathsea; do not change this line.
./:
.:
ls-R
tex


./tex:
latex

./tex/latex:
CVVorlageDeutsch

./tex/latex/CVVorlageDeutsch:
CurriculumVitaeAnna.sty
tikey@tikey ~/texmf $ kpsewhich CurriculumVitaeAnna.sty
tikey@tikey ~/texmf $ 

kpsewhich finds the .sty file, if a put a link to it directly in texmf/tex/latex:

tikey@tikey ~/texmf $ cat ls-R 
% ls-R -- filename database for kpathsea; do not change this line.
./:
.:
ls-R
tex


./tex:
latex

./tex/latex:
CurriculumVitaeAnna.sty
tikey@tikey ~/texmf $ kpsewhich CurriculumVitaeAnna.sty
/home/tikey/texmf/tex/latex/CurriculumVitaeAnna.sty

However, this can only be a solution for single sty-files or projects with very few files. If, however, I have a template where I include several other files within the sty-file, where do I put these other files?

2nd Edit:

I have now put the links to my project folders in /usr/local/share/texmf/tex and then it works. I just don't understand why.

tikey@tikey /usr/local/share/texmf/tex $ ll
insgesamt 16
drwxr-sr-x 2 root staff 4096 Jul 24 22:14 ./
drwxrwsr-x 3 root staff 4096 Mai 31 18:29 ../
lrwxrwxrwx 1 root staff   75 Mai 31 18:16 BriefVorlageDeutsch -> /home/tikey/Dokumente/_business/mail/eclipse_workspace/BriefVorlageDeutsch//
lrwxrwxrwx 1 root staff   72 Jul 24 22:14 CVVorlageDeutsch -> /home/tikey/Dokumente/_business/mail/eclipse_workspace/CVVorlageDeutsch//
tikey@tikey /usr/local/share/texmf/tex $ mktexlsr /home/tikey/Dokumente/_business/mail/eclipse_workspace/CVVorlageDeutsch/
mktexlsr: Updating /home/tikey/Dokumente/_business/mail/eclipse_workspace/CVVorlageDeutsch//ls-R... 
mktexlsr: Done.
tikey@tikey /usr/local/share/texmf/tex $ sudo mktexlsr 
mktexlsr: Updating /usr/local/share/texmf/ls-R... 
mktexlsr: Updating /var/lib/texmf/ls-R-TEXLIVEDIST... 
mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN... 
mktexlsr: Updating /var/lib/texmf/ls-R... 
mktexlsr: Done.
tikey@tikey /usr/local/share/texmf/tex $ kpsewhich CurriculumVitaeAnna.sty
/usr/local/share/texmf/tex/CVVorlageDeutsch/tex/CurriculumVitaeAnna.sty
Thomas
  • 111
  • it is not enough to put files inside texmf, they must go in the correct subfolder; assuming that these are latex files they should go in texmf/tex/latex. – Ulrike Fischer Jul 24 '16 at 12:49
  • So far, I assumed that as long as I run texhash after the files have been placed in texmf, I don't need to put them in exactly these folders (see http://tex.stackexchange.com/questions/1137/where-do-i-place-my-own-sty-or-cls-files-to-make-them-available-to-all-my-te). Also, I used the same folder structure under windows. But I'm happy to put them unter texmf/tex/latex if that helps. However, how do I put files from several projects there? Suppose I have a template for a CV and for a letter and I want to keep them in different subfolders, what folder structure do I need? – Thomas Jul 24 '16 at 19:32
  • Different subfolders are no problem, just place them in texmf/tex/latex/. – samcarter_is_at_topanswers.xyz Jul 24 '16 at 20:13
  • That did not work for me. However, I now placed the links in /usr/local/share/texmf/tex and then it works. – Thomas Jul 24 '16 at 20:17
  • 1
    I just now experimented with this (TexLive 2017), and in particular with symbolic links. It appears that texhash finds such symbolic links (they're listed in the ls-R file), but kpsewhich does not. Replacing the symbolic link with an actual copy of the file does, however, work. Is this a bug? – Mike Maxwell Nov 02 '17 at 16:36

0 Answers0