0

What is the right way to store XML or DTD files in a texmf tree and to configure my system so that kpsewhich will be able to find them?

Running kpsewhich -help-formats shows nothing about xml files, and the "other text files" option shows a path involving $TEXMF/kpsewhich// which is not really where I would like to have my files, I would rather put them in $TEXMF/tralics/xml or some place like that.

Setting TEXINPUTS to add the whole texmf tree works, but feels wrong.

I guess the proper way would be to teach kpathsea about a new file type but I found nowhere in the documentation how to do that. Is it possible?

Vincent Beffara
  • 246
  • 1
  • 11
  • which tool should then find the files per kpsewhich? – Ulrike Fischer Jan 06 '21 at 11:03
  • a shell script that runs xmllint – Vincent Beffara Jan 06 '21 at 11:05
  • find /usr/local/texlive/2020/texmf-dist/tex -name \*.xml | wc -l says that there are already 270 xml files in the standard texlive TEXINPUTS tree so adding a few more seems quite reasonable. – David Carlisle Jan 06 '21 at 11:07
  • Hm, and indeed kpsewhich finds those... – Vincent Beffara Jan 06 '21 at 11:19
  • Investigating, I ended up finding that my problem might actually be related to question https://tex.stackexchange.com/questions/553084/why-is-my-auxtree-added-via-tlmgr-not-found-by-kpsewhich – Vincent Beffara Jan 06 '21 at 11:39
  • So in texlive, kpsewhich finds .cls files in texmf-dist and in an auxtree, and finds .xml files in texmf-dist but not in an auxtree – Vincent Beffara Jan 06 '21 at 11:40
  • That sounds wrong, if the file would be found with .tex extension it should be found with .xml (the question you link to is unresolved but seems to be a local configuration error rather than anything about the intended behaviour) – David Carlisle Jan 06 '21 at 11:52
  • I just added an xml file in a folder tex/xml in a local auxtree and kpsewhich worked fine: kpsewhich testxml.xml gave ..../UFlocaltexmf/tex/xml/testxml.xml. But I don't think that a folder outside the tex folder can work without changes in the search pathes. – Ulrike Fischer Jan 06 '21 at 13:01
  • OK, so the easiest is to add everything below /tex/ then. Not TDS-compliant but so be it, as that will be for a local install. Thanks for your help! – Vincent Beffara Jan 06 '21 at 14:37

0 Answers0