Latexmk如何查找包檔?

Latexmk如何查找包檔?

我在 Arch Linux 上安裝了 TexLive 以便texlive-latexextra使用該軟體包todonotes,但latexmk沒有找到該todonotes.sty檔案。這是它打印的內容:

$乳膠mk --

pdf latex-preview.tex 
Latexmk: This is Latexmk, John Collins, 5 February 2015, version: 4.43a.
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex': File changes, etc:
   Non-existent destination files:
      'latex-preview.pdf'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'pdflatex  -recorder  "latex-preview.tex"'
------------
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Arch Linux) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./latex-preview.tex
LaTeX2e <2015/10/01> patch level 2
Babel <3.9m> and hyphenation patterns for 79 languages loaded.
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo))

! LaTeX Error: File `todonote.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 

我手動找到它,它在/usr/share/texmf-dist/tex/latex/todonotes/.

由於某種原因,此資料夾尚未新增至latexmk搜尋 sty 檔案的位置。

那麼,如何latexmk查找 sty 檔案以及如何新增資料夾以供其搜尋呢?

運行texhash給出:

texhash: Updating /etc/texmf/ls-R... 
texhash: Updating /usr/share/texmf-dist/ls-R... 
texhash: Updating /var/lib/texmf/ls-R... 
texhash: Done.

但此後或重新啟動後它不起作用。

texhash聲稱可以觀看ls -R /usr/share/texmf-dist/。考慮到這一點,它應該在那裡找到它:

$ ls -R /usr/share/texmf-dist/ | grep todonotes
fixmetodonotes
todonotes
/usr/share/texmf-dist/tex/latex/fixmetodonotes:
fixmetodonotes.sty
/usr/share/texmf-dist/tex/latex/todonotes:
todonotes.sty
luatodonotes
/usr/share/texmf-dist/tex/lualatex/luatodonotes:
luatodonotes.lua
luatodonotes.sty
todonotes-xetex-bidi.def

$ kpsewhich todonotes.sty
/usr/share/texmf-dist/tex/latex/todonotes/todonotes.sty

答案1

! LaTeX Error: File `todonote.sty' not found.

/usr/share/texmf-dist/tex/latex/todonotes:
todonotes.sty

一個有 s,一個沒有…

相關內容