makeindex 什麼都不做,除非我將 .idx 檔案複製到另一個目錄

makeindex 什麼都不做,除非我將 .idx 檔案複製到另一個目錄

我用來編譯文檔的 makefilemakeindexpdflatex.我最近注意到索引不再被發送到 pdf 中,沒有明顯的原因(我沒有弄亂文檔的主要結構或序言)。

奇怪的是:如果我將文件來源回滾到早期版本(這絕對是做過產生正確的索引),那麼回滾的版本也沒有索引。

日誌檔案包含

runsystem(makeindex book.idx)...executed.

調查後,我發現book.idx正在按預期生成book.pdf(即它的內容反映了索引應包含的內容),但是當我makeindex在輸出目錄中運行時:

This is makeindex, version 2.15 [TeX Live 2015] (kpathsea + Thai support).
Scanning input file book...done (0 entries accepted, 0 rejected).
Nothing written in book.ind.
Transcript written in book.ilg.

此後,book.ind便是空空如也。但是,如果我這樣做

mkdir tmp
cp book.idx tmp
cd tmp
makeindex

然後book.ind按預期創建,使用似乎正確的 Tex 命令來渲染索引。

This is makeindex, version 2.15 [TeX Live 2015] (kpathsea + Thai support).
Scanning input file book.idx....done (10 entries accepted, 0 rejected).
Sorting entries....done (31 comparisons).
Generating output file book.ind....done (28 lines written, 0 warnings).
Output written in book.ind.
Transcript written in book.ilg.

簡而言之:如果我makeindex在包含以下內容的目錄中運行僅有的 book.idx那麼它就起作用了,否則就好像book.idx是空的。文件的其餘部分正在正確編譯和呈現。怎麼了makeindex

答案1

將命令從 更改為makeindex book似乎makeindex book.idx已經解決了問題。

我猜有一個包更新。

相關內容