
amsartとsavetreesは互換性がないのか(また)? 私は texlive 2023 を使用しており、tlmgr
次のパッケージ バージョンが提供されています。
savetrees 2.4
amscls 2.20.6
geometry 5.9
このテスト用LaTeXファイル
\documentclass{amsart}
\usepackage{savetrees}
\begin{document}
\section{foo}
\end{document}
Undefined control sequence
次のコマンドでエラーが発生します\section
:
$ latex test
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2023-11-01> patch level 1
L3 programming layer <2024-01-04>
(/.../texlive/2023/texmf-dist/tex/latex/amscls/amsart.cls
Document Class: amsart 2020/05/29 v2.20.6
(/.../texlive/2023/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/.../texlive/2023/texmf-dist/tex/latex/amsmath/amstext.sty
(/.../texlive/2023/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/.../texlive/2023/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/.../texlive/2023/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/.../texlive/2023/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/.../texlive/2023/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/.../texlive/2023/texmf-dist/tex/latex/savetrees/savetrees.sty
(/.../texlive/2023/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/.../texlive/2023/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/.../texlive/2023/texmf-dist/tex/generic/xkeyval/xkvutils.tex
(/.../texlive/2023/texmf-dist/tex/generic/xkeyval/keyval.tex))))
(/.../texlive/2023/texmf-dist/tex/generic/iftex/ifpdf.sty
(/.../texlive/2023/texmf-dist/tex/generic/iftex/iftex.sty))
(/.../texlive/2023/texmf-dist/tex/generic/iftex/ifluatex.sty))
(/.../texlive/2023/texmf-dist/tex/latex/titlesec/titlesec.sty)
(/.../texlive/2023/texmf-dist/tex/latex/geometry/geometry.sty
(/.../texlive/2023/texmf-dist/tex/generic/iftex/ifvtex.sty))
(/.../texlive/2023/texmf-dist/tex/latex/tools/calc.sty)
(/.../texlive/2023/texmf-dist/tex/latex/l3backend/l3backend-dvips.def
) (./test.aux)
(/.../texlive/2023/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/.../texlive/2023/texmf-dist/tex/latex/amsfonts/umsb.fd)
*geometry* driver: auto-detecting
*geometry* detected driver: dvips
! Undefined control sequence.
<argument> ...on\endcsname \protect \@secnumpunct
l.5 \section{foo}
?
[1] (./test.aux) )
Output written on test.dvi (1 page, 376 bytes).
Transcript written on test.log.
答え1
デフォルトではと互換性のない がsavetrees
ロードされます。titlesec
amsart
オプションでロードするのでsections=normal
、titlesec
ロードされません。
\documentclass{amsart}
\usepackage[sections=normal]{savetrees}
\usepackage{kantlipsum}
\begin{document}
\section{foo}
\kant[1-3]
\section{baz}
\kant[4-6]
\end{document}
一方、以下がない場合でも、基本的に同じレイアウトが得られますsavetrees
。
\documentclass{amsart}
\usepackage{kantlipsum}
\addtolength{\textwidth}{170pt}
\addtolength{\textheight}{140pt}
\calclayout
\begin{document}
\section{foo}
\kant[1-3]
\section{baz}
\kant[4-6]
\end{document}