
Amsart e savetrees são incompatíveis (de novo)? Estou usando o texlive 2023 e tlmgr
oferece as seguintes versões de pacote:
savetrees 2.4
amscls 2.20.6
geometry 5.9
Este arquivo de látex de teste
\documentclass{amsart}
\usepackage{savetrees}
\begin{document}
\section{foo}
\end{document}
gera um Undefined control sequence
erro no \section
comando:
$ 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.
Responder1
Por padrão savetrees
carrega titlesec
o que não é compatível com amsart
.
Carregue-o com a sections=normal
opção, então titlesec
não será carregado.
\documentclass{amsart}
\usepackage[sections=normal]{savetrees}
\usepackage{kantlipsum}
\begin{document}
\section{foo}
\kant[1-3]
\section{baz}
\kant[4-6]
\end{document}
Por outro lado, você obtém essencialmente o mesmo layout sem 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}