创建强制横向模式的 LaTeX 包

创建强制横向模式的 LaTeX 包

我正在尝试创建一个始终处于横向模式的 LaTeX 包,但尽管使用了\LoadClass[landscape]{article}\RequirePackage[landscape]{geometry},我还是遇到了麻烦。我将其归结为以下最小可验证示例:

testlandscape.cls

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{landscapetest}[forcing landscape mode]

\LoadClass[landscape]{article}
\RequirePackage[landscape]{geometry}

test.tex

\documentclass{landscapetest}

\begin{document}
    landscape mode?
\end{document}

运行pdflatex test.tex不会产生横向 PDF。但是,当我更改test.tex为以下内容时:

\documentclass[landscape]{landscapetest}

\begin{document}
    landscape mode?
\end{document}

制作横向 PDF。有什么方法可以强制横向模式而不需要我的包的用户指定[landscape]


这是我的输出pdflatex --version

pdfTeX 3.141592653-2.6-1.40.24 (TeX Live 2022)
kpathsea version 6.3.4
Copyright 2022 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.03

相关内容