etex 包在 LaTeX2e 2015/10/01 中似乎仍然是必要的?

etex 包在 LaTeX2e 2015/10/01 中似乎仍然是必要的?

我经历过这个问题升级到 TeX Live 2015 后,我的所有软件包都获得了较新版本。(可能其中一些软件包更新是罪魁祸首。)

活动视频:

\documentclass{scrartcl}

\PassOptionsToPackage{table}{xcolor}
\usepackage{listings}
\usepackage{graphicx}
\usepackage{framed}
\usepackage[bookmarksnumbered]{hyperref}
\usepackage{multirow}
\usepackage{pgfplots}
\usepackage{algorithm}
\usepackage{bytefield}
\usepackage{longtable}
\usepackage[normalem]{ulem}
\usepackage{syntax}
\usepackage{tikz}
\usepackage{titlesec}

\begin{document}

\begin{figure}
\begin{bytefield}{32}
    \bitheader{0,8,16,24,32} \\
    \bitbox{16}{Kind} & \bitbox{16}{} \\
    \wordbox{3}{Payload} \\
\end{bytefield}
\end{figure}

\end{document}

TeX Live 2015,“LaTeX2e <2015/10/01> 补丁级别 1”:

! No room for a new \dimen .
\ch@ck ...\else \errmessage {No room for a new #3}
                                                  \fi
l.24    \bitbox{16}{Kind}
                        & \bitbox{16}{} \\

使用 安装在 Fedora 22 上install-tl。所有软件包均已确认为最新tlmgr

TeX Live 2007,“LaTeX2e <2005/12/01>”:

  • 成功构建

使用 Fedora 11 安装yum install texlive texlive-latex texlive-dvips texlive-contex texlive-utils texlive-texmf-latex;一些软件包手动安装。版本未知(如果需要我可能可以弄清楚。)


添加\usepackage{etex}修复了这个问题,这让我很困惑,因为我听说 LaTeX2e 2015/10/01 应该已经将其淘汰了。此外,我无法简单地将其添加到我的 LaTeX 文档中,因为我无法更改项目的历史版本,我希望这些版本可以在我的新系统上构建。

可以使用我的旧软件包版本创建一个独立的构建环境,以支持这些历史版本——这确实是我的 B 计划——但我的旧环境配置得很笨拙(特别是那些手动安装的软件包),我宁愿坚持使用我刚刚在新服务器上使用闪亮的 TeX Live 2015 创建的更易于维护的设置(特别是因为我们不能要求install-tl自动安装旧版本的 TeX Live)。

我该如何解决这个问题?我能否在周围的 Linux 环境中向 TeX Live 指示此包是总是如何使用?(然后我可以构建我的旧文档而不改变它.tex或构建命令。例如,shell 别名是alias pdflatex=pdflatex -etex可以接受的,尽管传递-etexpdflatex似乎不能为我解决问题。)

或者你能告诉我为什么这似乎是必要的,并帮助我消除这个因素吗?

答案1

该问题已在 bytefield v2.3 中修复。

原始答案如下。


问题出现在bytefield软件包树设置 dimen 寄存器的“本地”分配时。如果etex已加载,它将使用该软件包的功能,但如果未加载,它将使用原始分配器代码的“内部”版本,该版本会忽略 e-TeX 和内核改进。所有这些都可以通过以下方式绕过

\let\locdimen\newdimen

之前的任何位置

\usepackage{bytefield}

一个长期的解决方案就是改变包装:团队会尽力实现这一点。

答案2

因为当前的 MiKTeX(今天更新)没有发生错误,所以我在这里将其添加为答案。

我减少了给定的 MWE 并添加了命令\listfiles

\listfiles
\documentclass{scrartcl}

\usepackage{bytefield}

\begin{document}

\begin{figure}
\begin{bytefield}{32}
    \bitheader{0,8,16,24,32} \\
    \bitbox{16}{Kind} & \bitbox{16}{} \\
    \wordbox{3}{Payload} \\
\end{bytefield}
\end{figure}

然后 TeXnicCenter 在日志区域显示:

TeXnicCenter 日志区域

.log文件(仅部分,包含使用的软件包和版本的列表):

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2015.7.19)  26 OCT 2015 21:05
entering extended mode
**275042.tex
(275042.tex
LaTeX2e <2015/01/01> patch level 2 <=====================================

看来 MiKTeX 仍然使用 2015/01/01 版本。使用的软件包列表如下:

 *File List*
scrartcl.cls    2015/10/03 v3.19a KOMA-Script document class (article)
scrkbase.sty    2015/10/03 v3.19a KOMA-Script package (KOMA-Script-dependent basics and keyval usage)
 scrbase.sty    2015/10/03 v3.19a KOMA-Script package (KOMA-Script-independent basics and keyval usage)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
scrlfile.sty    2015/10/03 v3.19a KOMA-Script package (loading files)
tocbasic.sty    2015/10/03 v3.19a KOMA-Script package (handling toc-files)
scrsize11pt.clo    2015/10/03 v3.19a KOMA-Script font size class option (11pt)
typearea.sty    2015/10/03 v3.19a KOMA-Script package (type area)
bytefield.sty    2014/06/03 v2.2 Network protocol diagrams
    calc.sty    2014/10/28 v4.3 Infix arithmetic (KKT,FJ)
 ***********

编辑:

如果我使用完整的给定 MVE,我只会收到 7 个警告,这是由于使用titlesecKOMA-Script 而导致的,还有一个警告是更好地使用\pgfplotsset{compat=1.12}。没有其他错误或警告!

如果需要,我可以添加完整的.log文件,这里仅包含带有警告的相关部分:

Class scrartcl Warning: Usage of package `titlesec' together
(scrartcl)              with a KOMA-Script class is not recommended.
(scrartcl)              I'd suggest to use the package only
(scrartcl)              if you really need it, because it breaks several
(scrartcl)              KOMA-Script features, i.e., option `headings' and
(scrartcl)              the extended optional argument of the section
(scrartcl)              commands.
(scrartcl)              Nevertheless, using requested
(scrartcl)              package `titlesec' on input line 19.

("C:\Program Files\MiKTeX 2.9\tex\latex\titlesec\titlesec.sty"
Package: titlesec 2011/12/15 v2.10.0 Sectioning titles
\ttl@box=\box53
\beforetitleunit=\skip82
\aftertitleunit=\skip83
\ttl@plus=\dimen190
\ttl@minus=\dimen191
\ttl@toksa=\toks39
\titlewidth=\dimen192
\titlewidthlast=\dimen193
\titlewidthfirst=\dimen194


Package titlesec Warning: Non standard sectioning command detected
(titlesec)                Using default spacing and no format.


Package titlesec Warning: Non standard sectioning command detected
(titlesec)                Using default spacing and no format.


Package titlesec Warning: Non standard sectioning command detected
(titlesec)                Using default spacing and no format.


Package titlesec Warning: Non standard sectioning command detected
(titlesec)                Using default spacing and no format.


Package titlesec Warning: Non standard sectioning command detected
(titlesec)                Using default spacing and no format.

)

Package scrartcl Warning: Activating an ugly workaround for a missing
(scrartcl)                feature of package `titlesec` on input line 19.

ABD: EveryShipout initializing macros

Package pgfplots Warning: running in backwards compatibility mode (unsuitable tick labels; missing features). Consider w
riting \pgfplotsset{compat=1.12} into your preamble.
 on input line 20.

\height=\dimen197 (locally)
\depth=\dimen198 (locally)
\totalheight=\dimen199 (locally)
\width=\dimen200 (locally)

使用的软件包和版本:

 *File List*
scrartcl.cls    2015/10/03 v3.19a KOMA-Script document class (article)
scrkbase.sty    2015/10/03 v3.19a KOMA-Script package (KOMA-Script-dependent basics and keyval usage)
 scrbase.sty    2015/10/03 v3.19a KOMA-Script package (KOMA-Script-independent basics and keyval usage)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
scrlfile.sty    2015/10/03 v3.19a KOMA-Script package (loading files)
tocbasic.sty    2015/10/03 v3.19a KOMA-Script package (handling toc-files)
scrsize11pt.clo    2015/10/03 v3.19a KOMA-Script font size class option (11pt)
typearea.sty    2015/10/03 v3.19a KOMA-Script package (type area)
listings.sty    2015/06/04 1.6 (Carsten Heinz)
 lstmisc.sty    2015/06/04 1.6 (Carsten Heinz)
listings.cfg    2015/06/04 1.6 listings configuration
graphicx.sty    2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2014/10/28 v1.0p Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
  framed.sty    2011/10/22 v 0.96: framed or shaded text with page breaks
hyperref.sty    2012/11/06 v6.83m Hypertext links for LaTeX
hobsub-hyperref.sty    2012/04/25 v1.12 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty    2012/04/25 v1.12 Bundle oberdiek, subset generic (HO)
  hobsub.sty    2012/04/25 v1.12 Construct package bundles (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
  ifvtex.sty    2010/03/01 v1.5 Detect VTeX and its facilities (HO)
 intcalc.sty    2007/09/27 v1.1 Expandable calculations with integers (HO)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)
kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
pdfescape.sty    2011/11/25 v1.13 Implements pdfTeX's escape features (HO)
bigintcalc.sty    2012/04/08 v1.3 Expandable calculations on big integers (HO)
  bitset.sty    2011/01/30 v1.1 Handle bit-vector datatype (HO)
uniquecounter.sty    2011/01/30 v1.2 Provide unlimited unique counter (HO)
letltxmacro.sty    2010/09/02 v1.4 Let assignment for LaTeX macros (HO)
 hopatch.sty    2011/06/24 v1.1 Wrapper for package hooks (HO)
xcolor-patch.sty    2011/01/30 xcolor patch
atveryend.sty    2011/06/30 v1.8 Hooks at the very end of document (HO)
atbegshi.sty    2011/10/05 v1.16 At begin shipout hook (HO)
refcount.sty    2011/10/16 v3.4 Data extraction from label references (HO)
 hycolor.sty    2011/01/30 v1.7 Color options for hyperref/bookmark (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
 auxhook.sty    2011/03/04 v1.3 Hooks for auxiliary files (HO)
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
  pd1enc.def    2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
     url.sty    2013/09/16  ver 3.4  Verb mode for urls, etc.
 hpdftex.def    2012/11/06 v6.83m Hyperref driver for pdfTeX
rerunfilecheck.sty    2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
multirow.sty    
pgfplots.sty    2015/05/02 v1.12.1 Data Visualization (1.12.1)
    tikz.sty    2015/08/07 v3.0.1a (rcs-revision 1.151)
     pgf.sty    2015/08/07 v3.0.1a (rcs-revision 1.15)
  pgfrcs.sty    2015/08/07 v3.0.1a (rcs-revision 1.31)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
  pgfrcs.code.tex
 pgfcore.sty    2010/04/11 v3.0.1a (rcs-revision 1.7)
  pgfsys.sty    2014/07/09 v3.0.1a (rcs-revision 1.48)
  pgfsys.code.tex
pgfsyssoftpath.code.tex    2013/09/09  (rcs-revision 1.9)
pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
colortbl.sty    2012/02/13 v1.0a Color table columns (DPC)
   array.sty    2014/10/28 v2.4c Tabular extension package (FMi)
 pgfcore.code.tex
pgfcomp-version-0-65.sty    2007/07/03 v3.0.1a (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v3.0.1a (rcs-revision 1.1)
  pgffor.sty    2013/12/13 v3.0.1a (rcs-revision 1.25)
 pgfkeys.sty    
 pgfkeys.code.tex
 pgfmath.sty    
 pgfmath.code.tex
  pgffor.code.tex
    tikz.code.tex
algorithm.sty    2009/08/24 v0.1 Document Style `algorithm' - floating environment
   float.sty    2001/11/08 v1.3d Float enhancements (AL)
  ifthen.sty    2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
bytefield.sty    2014/06/03 v2.2 Network protocol diagrams
    calc.sty    2014/10/28 v4.3 Infix arithmetic (KKT,FJ)
longtable.sty    2014/10/28 v4.11 Multi-page Table package (DPC)
    ulem.sty    2012/05/18
  syntax.sty    1996/05/17 1.07 Syntax typesetting (MDW)
titlesec.sty    2011/12/15 v2.10.0 Sectioning titles
supp-pdf.mkii
 nameref.sty    2012/10/27 v2.43 Cross-referencing by name of section
gettitlestring.sty    2010/12/03 v1.4 Cleanup title references (HO)
275042-1.out
275042-1.out
 ***********

答案3

为了自动设置构建环境,以使最新的 TeX Live 包版本不与这些文档冲突,我在我的 中添加了以下内容Dockerfile

RUN sed -i '1s/^/\\let\\locdimen\\newdimen\n/' \
    /usr/local/texlive/2015/texmf-dist/tex/latex/bytefield/bytefield.sty

附有解释性评论,并注明下次删除此可怕的黑客攻击Docker图像重建,如果字节字段到那时包已经被“修复”。

这确实有效地告诉 LaTeX 总是要使用扩展分配器。:)

相关内容