siunitx 包依赖问题

siunitx 包依赖问题

昨天我使用该siunitx软件包做了一些家庭作业,它运行良好。今天,我在处理同一个文档,出于某种我不知道的原因,TeXstudio 开始抛出近 100 个与siunitxexpl3软件包相关的错误。其中一些值得注意的错误是:

​! 软件包 siunitx 错误:支持软件包 expl3 太旧。

仅可用于序言。{综合 (SI) 单位包}

我不知道发生了什么。我重新安装了 TeX Live 发行版,但错误仍然存​​在。我该怎么办?

我使用的是 2020 版的 TeX Live,siunitx软件包的版本是 2.8b。

如果有人能帮助我我会很高兴,因为这个包对我的工作确实很有用。

这是一个 MWE(我认为它不会有帮助,但无论如何):

\documentclass{article}
\usepackage{siunitx}

\begin{document}
    hihi
\end{document}

编辑-1:刚刚注意到一件事。出于某种原因,使用终端而不是 LaTeX 编辑器来编译文件不会出现任何错误。

編輯-2:日志文件(部分):

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.77      \ExplLoaderFileDate{expl3.sty}}
                                         %
! Undefined control sequence.
l.82   \bool
            _new:N \g__expl_reload_bool
! Missing $ inserted.
<inserted text> 
                $
l.82   \bool_
             new:N \g__expl_reload_bool
! Undefined control sequence.
l.82   \bool_new:N \g
                     __expl_reload_bool
! Missing { inserted.
<to be read again> 
                   _
l.82   \bool_new:N \g__
                       expl_reload_bool
! Undefined control sequence.
l.84 \tl
        _if_exist:NF \c__expl_def_ext_tl

LaTeX Warning: Command \c invalid in math mode on input line 84.

! Missing $ inserted.
<inserted text> 
                $
l.84 \tl_if_exist:NF \c_
                        _expl_def_ext_tl
! Missing { inserted.
<to be read again> 
                   }
l.84 \tl_if_exist:NF \c_
                        _expl_def_ext_tl
! Undefined control sequence.
l.85   { \tl
            _const:Nn \c__expl_def_ext_tl { def } }

LaTeX Warning: Command \c invalid in math mode on input line 85.

! Missing $ inserted.
<inserted text> 
                $
l.85   { \tl_const:Nn \c_
                         _expl_def_ext_tl { def } }
! Missing { inserted.
<to be read again> 
                   }
l.85   { \tl_const:Nn \c_
                         _expl_def_ext_tl { def } }
! Extra }, or forgotten $.
l.85 ...\tl_const:Nn \c__expl_def_ext_tl { def } }
                                                  
! Undefined control sequence.
l.86 \cs
        _gset_protected:Npn \__kernel_sys_configuration_load:n #1
! You can't use `macro parameter character #' in math mode.
l.86 ...d:Npn \__kernel_sys_configuration_load:n #
                                                  1
! Undefined control sequence.
l.89     \cs
            _undefine:c { ver@ #1 .def }
! You can't use `macro parameter character #' in math mode.
l.89     \cs_undefine:c { ver@ #
                                1 .def }
! Argument of \@onefilewithoptions has an extra }.
<inserted text> 
                \par 
l.93   }
        
Runaway argument?
 ] [ ] \c __expl_def_ext_tl \ExplSyntaxOn 
! Paragraph ended before \@onefilewithoptions was complete.
<to be read again> 
                   \par 
l.93   }
        
! Missing $ inserted.
<inserted text> 
                $
l.93   }
        
! Missing } inserted.
<inserted text> 
                }
l.93   }
        
! Undefined control sequence.
l.94 \cs
        _gset_protected:Npn \__kernel_sys_configuration_load_std:n #1
! You can't use `macro parameter character #' in math mode.
l.94 ...n \__kernel_sys_configuration_load_std:n #
                                                  1
! Undefined control sequence.
l.96     \cs
            _undefine:c { ver@ #1 .def }
! You can't use `macro parameter character #' in math mode.
l.96     \cs_undefine:c { ver@ #
                                1 .def }
! Argument of \@onefilewithoptions has an extra }.
<inserted text> 
                \par 
l.99   }
        
Runaway argument?
 ] [ ] \c __expl_def_ext_tl 
! Paragraph ended before \@onefilewithoptions was complete.
<to be read again> 
                   \par 
l.99   }
        
! Missing $ inserted.
<inserted text> 
                $
l.99   }
        
! Missing } inserted.
<inserted text> 
                }
l.99   }
        
! Missing } inserted.
<inserted text> 
                }
l.99   }
        
! Undefined control sequence.
l.100 \clist
            _if_exist:NF \l__expl_options_clist

LaTeX Warning: Command \l invalid in math mode on input line 100.

! Missing { inserted.
<to be read again> 
                   _
l.100 \clist_if_exist:NF \l__
                             expl_options_clist
! Undefined control sequence.
l.101   { \clist
                _new:N \l__expl_options_clist }

LaTeX Warning: Command \l invalid in math mode on input line 101.

! Missing { inserted.
<to be read again> 
                   _
l.101   { \clist_new:N \l__
                           expl_options_clist }
! Undefined control sequence.
l.105 \keys
           _define:nn { sys }
! Double subscript.
l.105 \keys_
            define:nn { sys }
! Undefined control sequence.
l.109       { \sys
                  _load_backend:n {#1} } ,
! You can't use `macro parameter character #' in math mode.
l.109       { \sys_load_backend:n {#
                                    1} } ,
! Undefined control sequence.
l.112         \sys
                  _load_debug:
! Undefined control sequence.
l.113         \debug
                    _on:n { check-declarations }
! You can't use `macro parameter character #' in math mode.
l.115     driver .meta:n = { backend = #
                                        1 } ,
! Undefined control sequence.
l.117       \sys
                _load_debug: ,
! Undefined control sequence.
l.120         \sys
                  _load_debug:
! Undefined control sequence.
l.121         \debug
                    _on:n { log-functions }
! Undefined control sequence.
l.124       = \g
                __kernel_backend_header_bool ,
! Missing { inserted.
<to be read again> 
                   _
l.124       = \g__
                  kernel_backend_header_bool ,
! Undefined control sequence.
l.128         \bool
                   _gset_true:N \g__kernel_deprecation_undo_recent_bool
! Undefined control sequence.
l.128         \bool_gset_true:N \g
                                  __kernel_deprecation_undo_recent_bool
! Missing { inserted.
<to be read again> 
                   _
l.128         \bool_gset_true:N \g__
                                    kernel_deprecation_undo_recent_bool
! Undefined control sequence.
l.129         \sys
                  _load_deprecation:
! Undefined control sequence.
l.132 \cs
         _if_exist:NF \@expl@sys@load@backend@@
! Undefined control sequence.
l.132 \cs_if_exist:NF \@expl@sys@load@backend@@
                                               
! Undefined control sequence.
l.134     \tl
             _put_left:Nn \document
! Missing } inserted.
<inserted text> 
                }
l.134     \tl_put_left:Nn \document
                                   
! Missing } inserted.
<inserted text> 
                }
l.134     \tl_put_left:Nn \document
                                   
! Missing } inserted.
<inserted text> 
                }
l.134     \tl_put_left:Nn \document
                                   
! Missing } inserted.
<inserted text> 
                }
l.134     \tl_put_left:Nn \document
                                   
! Missing } inserted.
<inserted text> 
                }
l.134     \tl_put_left:Nn \document
                                   
! Missing } inserted.
<inserted text> 
                }
l.134     \tl_put_left:Nn \document
                                   
! Missing $ inserted.
<inserted text> 
                $
l.134     \tl_put_left:Nn \document
                                   
! Extra \endgroup.
<recently read> \endgroup 
                          
l.134     \tl_put_left:Nn \document
                                   
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def)
(/home/joao/test.aux)
Overfull \hbox (1788.17528pt too wide) in paragraph at lines 77--134
[]\OT1/cmr/m/n/10 2020-10-05expl3.sty$[]\OML/cmm/m/it/10 ew \OT1/cmr/m/n/10 : \
OML/cmm/m/it/10 N[]$ 
! Missing } inserted.
<inserted text> 
                }
l.136         \endgroup
                       
! Extra \endgroup.
<recently read> \endgroup 
                          
l.136         \endgroup
                       
! Undefined control sequence.
l.137         \@expl@sys@load@backend@@
                                       
! Extra }, or forgotten \endgroup.
l.139       }
             
! Extra }, or forgotten \endgroup.
l.140   }
         
! Undefined control sequence.
l.141 \cs
         _gset_protected:Npn \@expl@sys@load@backend@@
! Missing $ inserted.
<inserted text> 
                $
l.141 \cs_
          gset_protected:Npn \@expl@sys@load@backend@@
! Undefined control sequence.
l.141 ...t_protected:Npn \@expl@sys@load@backend@@
                                                  
! Undefined control sequence.
l.143     \str
              _if_exist:NF \c_sys_backend_str

LaTeX Warning: Command \c invalid in math mode on input line 143.

! Missing $ inserted.
<inserted text> 
                $
l.143     \str_if_exist:NF \c_
                              sys_backend_str
! Missing { inserted.
<to be read again> 
                   }
l.143     \str_if_exist:NF \c_
                              sys_backend_str
! Undefined control sequence.
l.144       { \sys
                  _load_backend:n { } }
! Extra }, or forgotten $.
l.145   }
         
! Undefined control sequence.
l.146 \keys
           _set:nV { sys } \l__expl_options_clist

LaTeX Warning: Command \l invalid in math mode on input line 146.

! Missing { inserted.
<to be read again> 
                   _
l.146 \keys_set:nV { sys } \l__
                               expl_options_clist
! Undefined control sequence.
l.147 \str
          _if_exist:NF \c_sys_backend_str

LaTeX Warning: Command \c invalid in math mode on input line 147.

! Missing $ inserted.
<inserted text> 
                $
l.147 \str_if_exist:NF \c_
                          sys_backend_str
! Missing { inserted.
<to be read again> 
                   }
l.147 \str_if_exist:NF \c_
                          sys_backend_str
! Undefined control sequence.
l.148   { \sys
              _load_backend:n { } }
! Undefined control sequence.
l.149 \bool
           _if:NT \g__expl_reload_bool
! Undefined control sequence.
l.149 \bool_if:NT \g
                    __expl_reload_bool
! Missing { inserted.
<to be read again> 
                   _
l.149 \bool_if:NT \g__
                      expl_reload_bool
! Undefined control sequence.
l.151     \cs
             _gset_eq:NN \__kernel_sys_configuration_load:n
! Undefined control sequence.
l.154     \file
               _input_stop:
! Undefined control sequence.
l.156 \cs
         _if_free:cTF { [email protected] }
! Undefined control sequence.
l.158     \tex
              _everyjob:D \exp_after:wN
! Undefined control sequence.
l.160         \tex
                  _the:D \tex_everyjob:D
! Undefined control sequence.
l.160         \tex_the:D \tex
                             _everyjob:D
! Undefined control sequence.
l.161         \sys
                  _everyjob:
! Undefined control sequence.
l.164   { \sys
              _everyjob: }
! Undefined control sequence.
l.165 \reverse
              _if:N \if_cs_exist:N \s__expl_stop
! Undefined control sequence.
l.168 \cs
         _if_exist:NF \@expl@push@filename@@
! Undefined control sequence.
l.168 \cs_if_exist:NF \@expl@push@filename@@
                                            
! Undefined control sequence.
l.170     \tl
             _put_left:Nn  \@pushfilename { \@expl@push@filename@@ }

! LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.170     \tl_put_left:Nn  \@pushfilename
                                          { \@expl@push@filename@@ }
! Undefined control sequence.
l.170 ...  \@pushfilename { \@expl@push@filename@@
                                                   }
! Undefined control sequence.
l.171     \tl
             _put_right:Nn \@pushfilename { \@expl@push@filename@aux@@ }

! LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.171     \tl_put_right:Nn \@pushfilename
                                          { \@expl@push@filename@aux@@ }
! Undefined control sequence.
l.171 ...pushfilename { \@expl@push@filename@aux@@
                                                   }
! Undefined control sequence.
l.173 \cs
         _gset_protected:Npn \@expl@push@filename@@
! Undefined control sequence.
l.173 ...gset_protected:Npn \@expl@push@filename@@
                                                  
! Undefined control sequence.
l.177         \tl
                 _to_str:N \@currname .
! Undefined control sequence.
l.178         \tl
                 _to_str:N \@currext
! Undefined control sequence.
l.180     \tl
             _put_left:Nx \l__expl_status_stack_tl

LaTeX Warning: Command \l invalid in math mode on input line 180.

! Missing { inserted.
<to be read again> 
                   _
l.180     \tl_put_left:Nx \l__
                              expl_status_stack_tl
! Undefined control sequence.
l.182         \bool
                   _if:NTF \l__kernel_expl_bool

LaTeX Warning: Command \l invalid in math mode on input line 182.

! Missing { inserted.
<to be read again> 
                   _
l.182         \bool_if:NTF \l__
                               kernel_expl_bool
! Undefined control sequence.
l.188 \cs
         _gset_protected:Npn \@expl@push@filename@aux@@ #1#2#3
! Undefined control sequence.
l.188 ..._protected:Npn \@expl@push@filename@aux@@
                                                   #1#2#3
! You can't use `macro parameter character #' in math mode.
l.188 ...rotected:Npn \@expl@push@filename@aux@@ #
                                                  1#2#3
! You can't use `macro parameter character #' in math mode.
l.188 ...tected:Npn \@expl@push@filename@aux@@ #1#
                                                  2#3
! You can't use `macro parameter character #' in math mode.
l.188 ...cted:Npn \@expl@push@filename@aux@@ #1#2#
                                                  3
! Undefined control sequence.
l.190     \str
              _gset:Nn \g_file_curr_name_str {#3}
! Undefined control sequence.
l.190     \str_gset:Nn \g
                         _file_curr_name_str {#3}
! You can't use `macro parameter character #' in math mode.
l.190     \str_gset:Nn \g_file_curr_name_str {#
                                               3}
! You can't use `macro parameter character #' in math mode.
l.191     #
           1 #2 {#3}
! You can't use `macro parameter character #' in math mode.
l.191     #1 #
              2 {#3}
! You can't use `macro parameter character #' in math mode.
l.191     #1 #2 {#
                  3}
! Undefined control sequence.
l.193 \cs
         _if_exist:NF \@expl@pop@filename@@
! Undefined control sequence.
l.193 \cs_if_exist:NF \@expl@pop@filename@@
                                           
! Undefined control sequence.
l.195     \tl
             _put_right:Nn \@popfilename

! LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.195     \tl_put_right:Nn \@popfilename
                                        
! Undefined control sequence.
l.196       { \@expl@pop@filename@@
                                    }
! Undefined control sequence.
l.198 \cs
         _gset_protected:Npn \@expl@pop@filename@@
! Undefined control sequence.
l.198 \cs_gset_protected:Npn \@expl@pop@filename@@
                                                  
! Undefined control sequence.
l.201     \tl
             _if_empty:NTF \l__expl_status_stack_tl

LaTeX Warning: Command \l invalid in math mode on input line 201.

! Missing { inserted.
<to be read again> 
                   _
l.201     \tl_if_empty:NTF \l__
                               expl_status_stack_tl

LaTeX Warning: Command \l invalid in math mode on input line 203.

! Missing { inserted.
<to be read again> 
                   _
l.203 ...{ \exp_after:wN \__expl_status_pop:w \l__
                                                  expl_status_stack_tl \s__e...

! Undefined control sequence.
l.203 ..._status_pop:w \l__expl_status_stack_tl \s
                                                  __expl_stop }
! Missing { inserted.
<to be read again> 
                   _
l.203 ...tatus_pop:w \l__expl_status_stack_tl \s__
                                                  expl_stop }
! Undefined control sequence.
l.205 \cs
         _gset_protected:Npn \__expl_status_pop:w #1#2 \s__expl_stop
! Double subscript.
l.205 \cs_
          gset_protected:Npn \__expl_status_pop:w #1#2 \s__expl_stop
! You can't use `macro parameter character #' in math mode.
l.205 ...gset_protected:Npn \__expl_status_pop:w #
                                                  1#2 \s__expl_stop
! You can't use `macro parameter character #' in math mode.
l.205 ...et_protected:Npn \__expl_status_pop:w #1#
                                                  2 \s__expl_stop
! Undefined control sequence.
l.205 ...rotected:Npn \__expl_status_pop:w #1#2 \s
                                                  __expl_stop
! Missing { inserted.
<to be read again> 
                   _
l.205 ...tected:Npn \__expl_status_pop:w #1#2 \s__
                                                  expl_stop
! Undefined control sequence.
l.207     \tl
             _set:Nn \l__expl_status_stack_tl {#2}

LaTeX Warning: Command \l invalid in math mode on input line 207.

! Missing { inserted.
<to be read again> 
                   _
l.207     \tl_set:Nn \l__
                         expl_status_stack_tl {#2}
! You can't use `macro parameter character #' in math mode.
l.207     \tl_set:Nn \l__expl_status_stack_tl {#
                                                2}
! You can't use `macro parameter character #' in math mode.
l.208     \int_if_odd:nTF {#
                            1}
! Undefined control sequence.
l.212 \tl
         _if_exist:NF \l__expl_status_stack_tl
! Double subscript.
l.212 \tl_
          if_exist:NF \l__expl_status_stack_tl

LaTeX Warning: Command \l invalid in math mode on input line 212.

! Missing { inserted.
<to be read again> 
                   _
l.212 \tl_if_exist:NF \l__
                          expl_status_stack_tl
! Undefined control se

最后编辑:事实证明,我的机器中某个地方安装了 TeX Live 2019,而 LaTeX 编辑器正在寻找该安装中的文件。所以我需要找到这个安装并删除与之对应的每个文件。

相关内容