我一直在尝试安装arara
并latexindent
在 TeXstudio 中实现自动缩进。我已成功安装arara
,并且latexindent
似乎运行良好。但我不知道如何运行latexindent
。arara
我尝试将文件放入arara/rules
。但arara file.tex
在命令行中运行显示: 。但如果文件与 tex 文件位于同一文件夹中,Running Indent... FAILURE
它就会起作用。latexindent
我该如何做呢?
操作系统:Windows 10
Fri Jan 8 13:38:41 2016
latexindent.exe version 2.1R, a script to indent .tex files
latexindent.exe lives here: C:/Users/Username/Documents/!LaTeX Documents/test/
latexindent.exe is a standalone script and caches the required perl modules
onto your system. If you'd like to see their location in your log file, indent.log,
call the script with the tracing option, e.g latexindent.exe -t myfile.tex
Directory for backup files and indent.log:
ERROR There seems to be a yaml formatting error in defaultSettings.yaml
Please check it for mistakes- you can find a working version at https://github.com/cmhughes/latexindent.pl
if you would like to overwrite your current version
Exiting, no indendation done.
答案1
设法解决了。看来latexindent
我下载的 与 已安装的 相冲突MikTeX
。
因此我latexindent
通过MikTeX
访问Start -> MikTeX 2.9 -> Maintenance (Admin) -> Package Manager (Admin)
并卸载 来卸载latexindent
。
然后我访问Program Files\MiKTeX 2.9\miktex\bin\x64
并删除了 latexindent.exe 。最后,我通过添加来
将我自己的latexindent
目录添加到PATH
中,我将所有文件都放在那里。System -> Environment Variables -> PATH
C:\Users\Username\latexindent
latexindent