I built a little private package and I want texdoc to find its manual. So I moved the documentation to <TEXMFHOME>/doc/twindex.pdf (i.e. ~/Library/texmf/doc/twindex.pdf on my Mac). But if I call
texdoc twindex
it doesn’t find the package. If I ask kpsewhich with
kpsewhich -format "TeX system documentation" twindex.pdf
it finds the right file (/Users/Tobi/Library/texmf/doc/twindex.pdf)
I thought that texdoc looks at $TEXMFHOME too, am I wrong with that? How can I configure it to search there too?
Update
Belonging to Andrey’s (and Phil’s) answer
I tried to use a category but it doesn’t work. kpsewhich finds the file at
/Users/Tobi/Library/texmf/doc/latex/twindex/twindex.pdf
I also had a look at $TEXDOCS and it contains my texmf folder. But if I compare it with $PATH, there is a difference. In the latter the paths are separated by : instead of , may this the problem?
Update 2
The TEXDOCS varaiable contains my user texmf folder (line 3):
Tobis-Mac:~ Tobi$ kpsewhich --var-value TEXDOCS
{/Users/Tobi/Library/texlive/2011/texmf-config,
/Users/Tobi/Library/texlive/2011/texmf-var,
/Users/Tobi/Library/texmf,
!!/usr/local/texlive/2011/texmf-config,
!!/usr/local/texlive/2011/texmf-var,
!!/usr/local/texlive/2011/texmf,
!!/usr/local/texlive/2011/../texmf-local,
!!/usr/local/texlive/2011/texmf-dist}/doc//
Update 3
To debug texdoc I tried texdoc --debug=texdocs twindex while twindex.pdf is saved at $TEXMFHOME/doc/latex/twindex/twindex.pdf and additionally at $TEXMFHOME/tex/latex /tw/twindex/twindex.pdf and $TEXMFHOME/twindex.pdf my home path is $TEXMFOME = /Users/Tobi/Library/texmf
Tobis-Mac:texmf Tobi$ texdoc --debug=texdocs twindex
texdoc debug-version: /usr/local/texlive/2011/texmf/scripts/texdoc/texdoclib.tlu version 0.83
texdoc debug-texdocs: texdocs[8] = /Users/Tobi/Library/texlive/2011/texmf-config/doc (index_mandatory=false, recursion_allowed=true)
texdoc debug-texdocs: texdocs[7] = /Users/Tobi/Library/texlive/2011/texmf-var/doc (index_mandatory=false, recursion_allowed=true)
texdoc debug-texdocs: texdocs[6] = /Users/Tobi/Library/texmf/doc (index_mandatory=false, recursion_allowed=true)
texdoc debug-texdocs: texdocs[6] using index: /Users/Tobi/Library/texmf (shift=doc/)
texdoc debug-texdocs: texdocs[5] = /usr/local/texlive/2011/texmf-config/doc (index_mandatory=true, recursion_allowed=true)
texdoc debug-texdocs: texdocs[4] = /usr/local/texlive/2011/texmf-var/doc (index_mandatory=true, recursion_allowed=true)
texdoc debug-texdocs: texdocs[3] = /usr/local/texlive/2011/texmf/doc (index_mandatory=true, recursion_allowed=true)
texdoc debug-texdocs: texdocs[3] using index: /usr/local/texlive/2011/texmf (shift=doc/)
texdoc debug-texdocs: texdocs[2] = /usr/local/texlive/2011/../texmf-local/doc (index_mandatory=true, recursion_allowed=true)
texdoc debug-texdocs: texdocs[1] = /usr/local/texlive/2011/texmf-dist/doc (index_mandatory=true, recursion_allowed=true)
texdoc debug-texdocs: texdocs[1] using index: /usr/local/texlive/2011/texmf-dist (shift=doc/)
Sorry, no documentation found for twindex.
If you are unsure about the name, try searching CTAN's TeX catalogue at
http://ctan.org/search.html#byDescription.
Everything seems ok. As far as I can see texdoc searches /Users/Tobi/Library/texmf/doc recursive which includes the twindex path …
I have to correct myself, twindex is not found at$TEXMFHOME/twindex.pdf` too.
If I call ls -R in texmf the list contains all three places of twindex.pdf.
Whats wrong with my system?
<category>component. Which version of texdoc are you using (texdoc --version)? – mpg Feb 27 '12 at 17:24texdoc -d -v twindexand see if there is something relevant. – Andrey Vihrov Feb 27 '12 at 20:45TEXDOCSis a "virtual" environment variable that in general you don't set. In order to see its value (which is known to the TeX programs), dokpsewhich --var-value TEXDOCS. The fact that this has a comma separated list as value, compared to$PATH, where the value is a colon separated list, is irrelevant. – egreg Mar 4 '12 at 13:54ls-R-database for$TEXMFHOME? This isn't needed forkpathsea(it'll search the whole directory structure as there is no!!in front of/Users/Tobi/Library/texmf), buttexdocrelies on the database. You can check the file/Users/Tobi/Library/texmf/ls-Rfor the appearance of your manualtwindex.pdf. – diabonas Mar 4 '12 at 16:43