我正在使用 texmaker 并尝试从 glossary.tex 文件创建词汇表。但出现了错误:
抱歉,makeglossaries 未能成功,原因如下:MiKTeX 找不到执行“makeglossaries”所需的脚本引擎“perl.exe”。补救措施:确保您的系统上安装了“perl.exe”。日志文件希望包含让 MiKTeX 再次运行的信息:C:\Programs\MiKTex\texmfs\data\miktex\log\makeglossaries.log 有关更多信息,请访问:https://miktex.org/kb/fix-script-engine-not-found
我已按照本文中描述的步骤进行操作问题
我已经通过 ActiveState 在我的计算机上安装了 perl,并且我进行了检查,因为当我转到 cmd 并输入 perl --version 时会打印以下消息:
这是为 MSWin32-x64-multi-thread 构建的 perl 5,版本 32,subversion 0(v5.32.0)
问题是我找不到这样的文件夹
C:\perl\bin)
我只有 ActiveState 的文件夹,但里面没有这个文件夹。所以我将 ActiveState 文件夹添加到 PATH 中(我不知道这是否是正确的解决方案)
我已经重新启动了 Texmaker,但仍然出现同样的错误。
这是我的乳胶代码:
\usepackage{ae}
\usepackage{textcomp}
\usepackage[english]{babel}
\usepackage{lmodern}
\usepackage[
nonumberlist, %do not show page numbers
acronym, %generate acronym listing
toc, %show listings as entries in table of contents
section=section,automake] %use section level for toc entries
{glossaries}
\newglossary[slg]{symbolslist}{syi}{syg}{List of symbols}
\newcommand{\field}[1]{\protect\overrightarrow{#1}}
\makeglossaries
\loadglsentries{chapters/glossary.tex}
\begin{document}
\frontPage
\newpage
\thispagestyle{empty}
\newpage
\frontmatter
\input{chapters/abstract.tex}
\addcontentsline{toc}{section}{Abstract}
\newpage
\input{chapters/acknowlegments.tex}
\addcontentsline{toc}{section}{Acknowledgement}
\newpage
\tableofcontents
\newpage
\printglossary[style=altlist,title=Glossary] % Glossary%
\newpage
\printglossary[type=\acronymtype,style=long] % ACronyms %%
\newpage
\printglossary[type=symbolslist,style=long] % Symbols %%
\newpage
\listoffigures
\addcontentsline{toc}{section}{List of Figures}
\newpage
\listoftables
\addcontentsline{toc}{section}{List of Tables}
\newpage
\mainmatter
\input{chapters/introduzione.tex}
\input{chapters/capitolo01.tex}
\input{chapters/capitolo02.tex}
\input{chapters/capitolo03.tex}
\input{chapters/capitolo05.tex}
\input{chapters/capitolo06.tex}
\bibliography{biba}
\backmatter
\glsaddallunused
\end{document}
并且 glossary.tex 是:
% Symbols
\newglossaryentry{symb:mu}{
name=$\mu$,
description={Magnetic permeability},
sort=symbolmu, type=symbolslist
}
%Some acronyms
\newacronym{em}{EM}{Electromagnetic Methods}
这是来自 miktex 的日志文件:
2021-08-06 13:29:00,055+0100 INFO makeglossaries - starting with command line: makeglossaries
2021-08-06 13:29:00,063+0100 FATAL makeglossaries - The script engine could not be found.
2021-08-06 13:29:00,063+0100 FATAL makeglossaries - Info: scriptEngine="perl.exe", scriptName="makeglossaries"
2021-08-06 13:29:00,063+0100 FATAL makeglossaries - Source: Libraries\MiKTeX\Core\Session\runperl.cpp
2021-08-06 13:29:00,063+0100 FATAL makeglossaries - Line: 83
2021-08-06 13:29:00,066+0100 ERROR makeglossaries - minor issue: It has been a long time since you have checked for MiKTeX updates.
2021-08-06 13:38:43,492+0100 INFO makeglossaries - starting with command line: makeglossaries
2021-08-06 13:38:43,495+0100 FATAL makeglossaries - The script engine could not be found.
2021-08-06 13:38:43,495+0100 FATAL makeglossaries - Info: scriptEngine="perl.exe", scriptName="makeglossaries"
2021-08-06 13:38:43,495+0100 FATAL makeglossaries - Source: Libraries\MiKTeX\Core\Session\runperl.cpp
2021-08-06 13:38:43,495+0100 FATAL makeglossaries - Line: 83
2021-08-06 13:38:43,500+0100 ERROR makeglossaries - minor issue: It has been a long time since you have checked for MiKTeX updates.
2021-08-06 13:49:12,566+0100 INFO makeglossaries - starting with command line: makeglossaries -d build
2021-08-06 13:49:12,569+0100 FATAL makeglossaries - The script engine could not be found.
2021-08-06 13:49:12,569+0100 FATAL makeglossaries - Info: scriptEngine="perl.exe", scriptName="makeglossaries"
2021-08-06 13:49:12,569+0100 FATAL makeglossaries - Source: Libraries\MiKTeX\Core\Session\runperl.cpp
2021-08-06 13:49:12,569+0100 FATAL makeglossaries - Line: 83
2021-08-06 13:49:12,570+0100 ERROR makeglossaries - minor issue: It has been a long time since you have checked for MiKTeX updates.
2021-08-06 14:00:51,043+0100 INFO makeglossaries - starting with command line: makeglossaries -d build
2021-08-06 14:00:51,046+0100 FATAL makeglossaries - The script engine could not be found.
2021-08-06 14:00:51,046+0100 FATAL makeglossaries - Info: scriptEngine="perl.exe", scriptName="makeglossaries"
2021-08-06 14:00:51,046+0100 FATAL makeglossaries - Source: Libraries\MiKTeX\Core\Session\runperl.cpp
2021-08-06 14:00:51,046+0100 FATAL makeglossaries - Line: 83
2021-08-06 14:00:51,048+0100 ERROR makeglossaries - minor issue: It has been a long time since you have checked for MiKTeX updates.
答案1
参考评论
@MS-SPO 我不明白。我会用我的 latex 代码更新这个问题 – Jeniffer Barreto 29 分钟
有道理。我不确定这个glossaries
软件包如何处理 perl。浏览其庞大的用户手册https://mirror.marwan.ma/ctan/macros/latex/contrib/glossaries/glossaries-user.pdf它描述了第 50 页上的一系列命令行调用。对于你的问题来说,重要的是这个,一个强制的 (?)暗示:
You may need to **explicitly** loadmakeglossaries into Perl:
$perl makeglossaries myDoc
(以防万一:该$
符号仅表示来自 DOS 命令 shell、Linux 上的 bash 或您所在的任何系统的提示符。它可以是任何符号。)
现在,出于某种原因,命令 shell 中的此调用并不总是适用于 Active Perl om Windows。处理此问题的一种方法是指定 perl.exe 的完整路径,如下所示:
$cd yourLatexDocumentsDirectory
$C:\bin\whereveritis\perl.exe makeglossaries myDoc
一个被证明是错误的方法是:
- 在 perl.exe 的位置打开资源管理器
- 将 perl.exe 拖入 DOS shell
- 添加 makegloss...
考虑到这一点,我的评论中的项目 a) 应该很清楚 ;-) 成功 :)
附言:最好的情况下,您报告的错误现在应该已经消失了。但是,如果没有,我建议精简您的文档和词汇表来源,然后从那里开始。这样应该更容易识别真正的麻烦制造者。即尽可能简化两者,但仍保留其中至少一个错误。
附言:看起来用户手册中的命令 shell 副本来自 Linux 世界。DOS 和 Windows 世界应该会发生很大变化……