Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\s*\\begin{ <-- HERE document}/ at /opt/texbin/latexindent line 677.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\s*%\*\s*\\begin{ <-- HERE (.*?)}/ at /opt/texbin/latexindent line 1047.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\s*%\*\s*\\end{ <-- HERE (.*?)}/ at /opt/texbin/latexindent line 1073.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^%\s*\\end{ <-- HERE (.*?)}/ at /opt/texbin/latexindent line 1199.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^%\s*\\begin{ <-- HERE (.*?)}/ at /opt/texbin/latexindent line 1220.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\s*(\$)?\\begin{ <-- HERE \\?(.*?)}/ at /opt/texbin/latexindent line 1621.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\s*\\end{ <-- HERE \\?(.*?)}/ at /opt/texbin/latexindent line 1682.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\\end{ <-- HERE table}/ at /opt/texbin/latexindent line 1621, <MAINFILE> line 1.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\\end{ <-- HERE tabular}/ at /opt/texbin/latexindent line 1621, <MAINFILE> line 6.
我肯定做了一些傻事。但那是什么呢?
更新
这是我的localSettings.yaml
文件:
# Default value of indentation
defaultIndent: " "
# remove trailing whitespace from all lines
removeTrailingWhitespace: 1
# verbatim environments- environments specified
# in this hash table will not be changed at all!
# vim: +2,/^\s*$/-1!column -t | sort -u | awk '{print "\t" $0}'
verbatimEnvironments:
ADA: 1
algorithmic: 1
AWKPROG: 1
CEEPL: 1
code: 1
Code: 1
CPLUSPLUS: 1
EIFFEL: 1
EMEL: 1
EMELRESPONSE: 1
JAVA: 1
lcode: 1
lCode: 1
lola: 1
LOLA: 1
LolaCodeTcbListing: 1
LolaCodeTcbListing*: 1
lstlisting: 1
OCCAM: 1
PASCAL: 1
PYTHON: 1
sample: 1
Sample: 1
session: 1
verbatim: 1
# no indent blocks (not necessarily verbatim environments) which are marked as
# %\begin{noindent} or anything else that the user puts in this hash table
noIndentBlock:
noindent: 1
cmhtest: 1
# if you don't want to have additional indentation in an environment put it in
# this hash table; note that environments in this hash table will inherit the
# *current* level of indentation they just won't get any *additional*.
# vim: +2,/^\s*$/-1!column -t | sort -u | awk '{print "\t" $0}'
noAdditionalIndent:
frame: 1
indentAfterHeading:
part :
indent : 0
level : 1
chapter :
indent : 0
level : 2
section :
indent : 0
level : 3
# vim: +2,/^\s*$/-1!column -t | sort -u | awk '{print "\t" $0}'
indentAfterItems:
description: 1
enumerate: 1
itemize: 1
# vim: +2,/^\s*$/-1!column -t | sort -u | awk '{print "\t" $0}'
constructIfElseFi:
if@fast: 1
ifnum: 1
ifodd: 1
@ifundefined: 1
# vim: +2,/^\s*$/-1!column -t | sort -u | awk '{print "\t" $0}'
lookForAlignDelims:
align: 1
align*: 1
alignat: 1
alignat*: 1
aligned: 1
array: 1
bmatrix: 1
cases: 1
dcases: 1
eqnarray: 1
eqnarray*: 1
listabla: 1
longtable: 1
matrix: 1
pmatrix: 1
tabular: 1
tabularx: 1
输入是一个名为的文件input.tex
:
\begin{itemize}
\item a
\end{itemize}
运行后输出latexindent -l input.tex
为:
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\s*\\begin{ <-- HERE document}/ at /opt/texbin/latexindent line 677.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\s*%\*\s*\\begin{ <-- HERE (.*?)}/ at /opt/texbin/latexindent line 1047.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\s*%\*\s*\\end{ <-- HERE (.*?)}/ at /opt/texbin/latexindent line 1073.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^%\s*\\end{ <-- HERE (.*?)}/ at /opt/texbin/latexindent line 1199.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^%\s*\\begin{ <-- HERE (.*?)}/ at /opt/texbin/latexindent line 1220.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\s*(\$)?\\begin{ <-- HERE \\?(.*?)}/ at /opt/texbin/latexindent line 1621.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\s*\\end{ <-- HERE \\?(.*?)}/ at /opt/texbin/latexindent line 1682.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\\end{ <-- HERE itemize}/ at /opt/texbin/latexindent line 1621, <MAINFILE> line 1.
\begin{itemize}
\item a
\end{itemize}
更新 我手动编辑了源代码,解决了这个问题。但其他问题又出现了:
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\s*\\begin{ <-- HERE document}/ at /home/yogi/bin/latexindent line 677.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\s*%\*\s*\\begin{ <-- HERE (.*?)}/ at /home/yogi/bin/latexindent line 1047.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\s*%\*\s*\\end{ <-- HERE (.*?)}/ at /home/yogi/bin/latexindent line 1073.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^%\s*\\end{ <-- HERE (.*?)}/ at /home/yogi/bin/latexindent line 1199.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^%\s*\\begin{ <-- HERE (.*?)}/ at /home/yogi/bin/latexindent line 1220.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\s*(\$)?\\begin{ <-- HERE \\?(.*?)}/ at /home/yogi/bin/latexindent line 1621.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\s*\\end{ <-- HERE \\?(.*?)}/ at /home/yogi/bin/latexindent line 1682.
这是因为/home/yogi/bin/latexindent
从git 存储库。
答案1
要复制警告,只需latexindent
在终端中输入。
这是由于{
perl 脚本中使用的正则表达式中的字符latexindent.pl
应按照以下要求进行转义而发出的警告:perl 弃用。
要纠正这些问题,只需将警告中提到的行中的左括号转义即可。例如第 677 行:
if(m/^\s*\\begin{document}/)
应修改为:
if(m/^\s*\\begin\{document}/)
等等。
这些警告可以忽略,但从 perl v5.26 开始它们将成为语法错误。