linux无法格式化,[Linux] [VS Code] LaTeX代码无法格式化

我在Ubuntu (20.04 LTS) 系统下安装了TeXlive 2020 和 VS Code 按Ctrl+Shift+I (默认)格式化代码时报错...

参考了

问题并没有得到解决...

很有可能是latexindent的问题...

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{equation*}

\int_C \mathbf{F}\cdot\,d\mathbf{r}

\end{equation*}

\end{document}

LaTeX Workshop  输出:

[16:55:46] Found root file from active editor: /home/bang/文档/VS Code/LaTeX/test/test.tex

[16:55:46] Root file remains unchanged from: /home/bang/文档/VS Code/LaTeX/test/test.tex.

[16:55:49] Formatting with command latexindent -c,/home/bang/文档/VS Code/LaTeX/test/,/home/bang/文档/VS Code/LaTeX/test/__latexindent_temp.tex,-y=defaultIndent: '    '

[16:55:49] Formatting failed with exit code 2

[16:55:49] stderr: Can't locate Log/Dispatch/File.pm in @INC (you may need to install the Log::Dispatch::File module) (@INC contains: /usr/local/texlive/2020/texmf-dist/scripts/latexindent /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/local/texlive/2020/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm line 24.

BEGIN failed--compilation aborted at /usr/local/texlive/2020/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm line 24.

Compilation failed in require at /usr/local/texlive/2020/texmf-dist/scripts/latexindent/LatexIndent/Document.pm line 25.

BEGIN failed--compilation aborted at /usr/local/texlive/2020/texmf-dist/scripts/latexindent/LatexIndent/Document.pm line 25.

Compilation failed in require at /usr/local/texlive/2020/bin/x86_64-linux/latexindent line 27.

BEGIN failed--compilation aborted at /usr/local/texlive/2020/bin/x86_64-linux/latexindent line 27.

154032472265daaa599040c66c85efca.png

f322c59f2f8c870e3787440d6aa98dbe.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值