expl3 问题,扫描使用 \__file_parse_version:w 时文件结束

expl3 问题,扫描使用 \__file_parse_version:w 时文件结束

今天我在编译文档时遇到了一个问题.tex。(我正在使用 Sublime Text 3 Build 命令进行编译)最小的工作示例如下所示。

\documentclass[a4paper, 10pt]{article}
\usepackage{csquotes}
\usepackage[T1]{fontenc}
\usepackage[czech]{babel}
\usepackage{biblatex}

\title{Test}
\author{}
\date{}

\tracingcommands=1
\begin{document}
\tracingcommands=0

\maketitle
test

\end{document}

控制台中列出的错误是

TeX STOPPED: File ended while scanning use of \__file_parse_version:2021-01-09\s__file_stop \__int_eval_end: \exp_after:wN \use_ii:nn \fi: 
TeX reports the error was in file:3 \begin{document}
/Users/ondra/Downloads/test.tex:13: Missing number, treated as zero. [\begin{document}]

以及警告

/Users/ondra/Downloads/test.tex: LaTeX Warning: You have requested, on input line 15, version `2020/04/06' of package expl3, but only version `2021-01-09 L3 programming layer (loader) ' is available.

/Users/ondra/Downloads/test.log:1: Double-click here to open the full log.

查看文件时我发现了一些奇怪的行为.log

(/usr/local/texlive/2020basic/texmf-dist/tex/latex/l3kernel/expl3.sty
{\def}
{\let}
{\xdef}
{\edef}
{\let}
{\def}
{\def}
{\futurelet}
{\let}
{\futurelet}
{\let}
{\let}
{\let}
{\afterassignment}
{\xdef}
{\let}
{\let}
{\begingroup}
{\let}
{\immediate}
Package: expl3 2021-01-09 L3 programming layer (loader) 
{\endgroup}
{\protected}
{blank space  }
{\protected}
{blank space  }
{\protected}
{blank space  }
{\protected}
{blank space  }
{\protected}
{blank space  }
{\begingroup}
{\endgroup}
{\begingroup}
{\endgroup}
)
Runaway argument?
2021-01-09\s__file_stop \__int_eval_end: \exp_after:wN \use_ii:nn \fi: \ETC.
! File ended while scanning use of \__file_parse_version:w.
<inserted text> 
                \par 
l.13 \begin{document}
                     
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.

! Missing number, treated as zero.
<to be read again> 
                   \__kernel_tl_set:Nx 
l.13 \begin{document}
                     
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

{begin-group character {}
{\relax}
{\begingroup}
{\def}
{\let}
{\immediate}

LaTeX Warning: You have requested, on input line 13, version
               `2020/04/06' of package expl3,
               but only version
               `2021-01-09 L3 programming layer (loader) '
               is available.

{\endgroup}
{end-group character }}
{\xdef}
{\edef}
{\global}
{\gdef}
{\gdef}
{\catcode}
{\relax}
{\gdef}
{\gdef}
{\xdef}
{\xdef}
{\edef}
{\xdef}
{\xdef}
{\xdef}
{\edef}
{\global}
{\global}
{\global}
{\relax}
{\begingroup}
{\let}
{\let}
{\relax}
{\begingroup}
{\def}
{\let}
{\immediate}
Package biblatex Info: ... but expl3
(biblatex)             2021-01-09 L3 programming layer (loader) 
(biblatex)             is too old (older than 2020/04/06),
(biblatex)             setting 'casechanger=latex2e'.

特别是最后几行,版本2021-01-09被视为早于2020/04/06

\usepackage[czech]{babel}我可以通过注释掉行或来消除此错误\usepackage{biblatex}。但如果将它们一起导入,就会出现上述错误。

我的pdftex -v控制台转储:

pdfTeX 3.14159265-2.6-1.40.21 (TeX Live 2020)
kpathsea version 6.3.2
Copyright 2020 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 4.02

我应该关注什么?我是否应该尝试将我的 L3 编程层降级到版本2020/04/06?提前感谢您的建议和时间。

答案1

更新

此问题已在 3.17 中得到解决biblatex。请更新您的 TeX 系统。


旧答案

此问题是由于biblatex将加载延迟expl3到最后一分钟而导致的,因为此时它可以对文档编码做出最佳猜测(这是必需的,因为biblatex根据文档是否为 UTF-8 编码,为大小写转换器加载不同的代码,请参阅https://github.com/plk/biblatex/issues/1058)。

不幸的是,expl3加载得太晚了,以至于捷克语模块已经改变了连字符的类别代码-,这造成了麻烦。

由于加载更改案例的代码太晚,也在其他情况下造成了麻烦(https://github.com/plk/biblatex/issues/1090),biblatex现在将在加载文件时尝试猜测文件编码,并在猜测结果与稍后在钩子中做出的猜测不同时发出警告\AtBeginDocument(请参阅https://github.com/plk/biblatex/commit/15a62fb5bb227db5ef613aaa13778d92bd190f29)。这意味着inputenc和朋友应该先加载biblatex(这一直是个好主意,但现在有必要让事情正确)。

下一版本 (v3.17) 中将解决此问题biblatex。与此同时,一种解决方法是expl3在 之前明确加载biblatex

\documentclass[a4paper, 10pt]{article}

\usepackage[T1]{fontenc}
\usepackage[czech]{babel}
\usepackage{csquotes}
\usepackage{expl3}
\usepackage{biblatex}

\begin{document}
test
\end{document}

相关内容