使用列表文件中的 keywords\index{keywords} 替换文件中的关键字
我正在尝试在 Linux 下在 LaTeX 文件中生成索引条目。我有两个文件:file1.txt包含所有索引条目 cats\index{cat} dogs\index{dog} elephants\index{elephant} rats\index{rat} 该animals.tex文件包含故事文本。 elephants are afraid of rats but are not scared of cats and dogs. 我怎样才能用 file1.txt 中的动物替换 .tex 文件中的不同动物?以获取以下文本: Elephant...