summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-04-16 20:01:13 +0000
committerKarl Berry <karl@freefriends.org>2024-04-16 20:01:13 +0000
commit8800184fd797769c8f0f4a3eeb5a9a609b80a53a (patch)
tree01e44dbe426020927d68b2c3c2003cc0b14dd36e /Master
parent13ffce6d82e6fbbdc4b0b513d7d6357e882a5100 (diff)
lscapeenhanced (16apr24)
git-svn-id: svn://tug.org/texlive/trunk@70967 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/lscapeenhanced/LICENSE.md19
-rw-r--r--Master/texmf-dist/doc/latex/lscapeenhanced/README.md154
-rw-r--r--Master/texmf-dist/doc/latex/lscapeenhanced/lscapeenhanced.pdfbin0 -> 261243 bytes
-rw-r--r--Master/texmf-dist/source/latex/lscapeenhanced/lscapeenhanced.dtx420
-rw-r--r--Master/texmf-dist/tex/latex/lscapeenhanced/lscapeenhanced.sty76
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds1
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/lscapeenhanced.tlpsrc0
9 files changed, 672 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/lscapeenhanced/LICENSE.md b/Master/texmf-dist/doc/latex/lscapeenhanced/LICENSE.md
new file mode 100644
index 00000000000..1863f2f61a2
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/lscapeenhanced/LICENSE.md
@@ -0,0 +1,19 @@
+----------------------------------------------------------------------------
+
+This work may be distributed and/or modified under the conditions of the
+LaTeX Project Public License, version 1.3c of the license. The latest
+version of this license is in http://www.latex-project.org/lppl.txt and
+version 1.3c or later is part of all distributions of LaTeX 2005/12/01
+or later. This work has the LPPL maintenance status “maintained”.
+The current maintainer and author of this work is Markus Kohm.
+
+----------------------------------------------------------------------------
+
+Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
+in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
+Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
+Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
+oder später. Dieses Werk hat den LPPL-Verwaltungs-Status „maintained”.
+Der aktuelle Verwalter und Autor dieses Werks ist Markus Kohm.
+
+----------------------------------------------------------------------------
diff --git a/Master/texmf-dist/doc/latex/lscapeenhanced/README.md b/Master/texmf-dist/doc/latex/lscapeenhanced/README.md
new file mode 100644
index 00000000000..d60cb80e9bb
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/lscapeenhanced/README.md
@@ -0,0 +1,154 @@
+# Package `lscapeenhanced`
+
+Copyright © 2008–2024 Markus Kohm
+
+Release: 2024-04-16 v1.0
+
+License: LPPL 1.3c
+
+KOMA presents the `lscapeenhanced` package to extend the functionality of
+package [`lscape`](https://ctan.org/pkg/lscape) and
+[`pdflscape`](https://ctan.org/pkg/pdflscape). The `lscapeenhanced` package
+is part of the *third-party enhancements* project.
+
+----------------------------------------------------------------------------
+
+This work may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, version 1.3c of the license.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+This work has the LPPL maintenance status "maintained".
+
+The Current Maintainer and author of this work is Markus Kohm.
+
+----------------------------------------------------------------------------
+
+# Abstract
+
+For several years
+[KOMA-Script](https://www.sourceforge.net/project/koma-script) provided a
+package `scrhack`, that has been made not only to improve the compatibility of
+third-party packages with KOMA-Script classes, but also to generally improve
+third-party packages. The package consisted not only in the package file
+`scrhack.sty` but also in several so called hacks as separate files with
+extension `.hak`. In the course of splitting off former KOMA-Script packages
+from the KOMA-Script collection, it was decided to create independent packages
+from the individual hacks. These new independent packages then serve as
+replacements for the original packages they were intended to improve. Package
+`lscapeenhanced` is such an enhancement package. It provides additional
+features and a consistent handling of `\textwidth` and `\textheight`.
+
+# Installation for Users
+
+If you are a user, you should wait until the package has been added to your
+preferred TeX distribution. Then you can use the package manager of your TeX
+distribution to install the package.
+
+# Unpacking for Distributors
+
+Distributors should download [the distribution from
+CTAN](https://www.ctan.org/pkg/lscapeenhanced). This consists in:
+
+* `lscapeenhanced.dtx`
+* `README.md`
+* `LICENSE.md`
+* `lscapeenhanced.pdf`
+
+If distributors also want to distribute `lscapeenhanced.sty`, they can
+unpack it using
+
+ tex lscapeenhanced.dtx
+
+Note, that you have to use `tex` not `latex`, `pdflatex`, `xelatex` or
+`lualatex`!
+
+Note also, that a legal distribution consists at least in:
+
+* `lscapeenhanced.dtx`
+* `README.md`
+
+The following files are optionally, but must not be distributed without the
+previous ones:
+
+* `LICENSE.md`
+* `lscapeenhanced.sty`
+* `lscapeenhanced.pdf`
+
+# Unpacking and Installation for Developers
+
+Developers who want the current developer version of the code to be installed
+for testing, should clone [the `third-party-enhancements`
+repository](https://github.com/komascript/third-party-enhancements), e.g.,
+using
+
+ git clone https://github.com/komascript/third-party-enhancements.git
+
+You can than either unpack and install all the third-party enhancements using:
+
+ l3build install --full
+
+from within the main directory of the cloned respository. For installation of
+`lscapeenhanced` only run the same command from within the
+`lscapeenhanced` subdirectory. For installation without the manual omit
+option `--full`, but this is not recommended for developers.
+
+# How to get the Manual
+
+After installation you should get the user manual using:
+
+ texdoc lscapeenhanced
+
+See the manual of your TeX distribution for more information.
+
+Developers or distributors can also build the manual from the source using:
+
+ l3build doc
+
+# How to Contribute
+
+To become a contributor, e.g., do heavy testing. If you find an issue, please
+report it using [the issue
+tracker](https://github.com/komascript/third-party-enhancements/issues). You
+can also become a developer and, e.g., make new test files to the
+packages. See the [`l3build`](https://ctan.org/pkg/l3build) manual for more
+information about tests. If you've created a new test and think that it would
+be useful, please either do a pull request or [add a new
+issue](https://github.com/komascript/third-party-enhancements/issues/new/choose)
+and include your test file.
+
+Another kind of contribution would be to contact an author of one of the
+third-party packages and convince her or him to integrate the code of the
+corresponding enhancement package from this project into her or his package.
+
+# How to Report Issues
+
+If you think you have found a bug (or another kind of issue) using
+`lscapeenhanced` you should use [the issue
+tracker](https://github.com/komascript/third-party-enhancements/issues). Please
+first search for similar issues already reported and maybe also already fixed
+and closed. Maybe the replies to such a similar report would help you too.
+
+If your issue is new, you should report it also using [the issue
+tracker](https://github.com/komascript/third-party-enhancements/issues). Please
+be kind, not only when writing the report but also when reading replies and
+commenting or answering. And please always add a minimal working example and
+usually the relevant parts of the `log`-file to your report. Please use the
+[markdown for
+code](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks)
+to add such files into the text of your report. The correct language
+identifier for LaTeX code would be `latex`. For `log`-files you won't need any
+language identifier. Usually you should not use attachments for code or
+`log`-files unless you've been asked to do so. And please note, reports should
+always be self-containing. External links often break and so the report become
+useles.
+
+# How to Say Thank You for my Work
+
+Hey, I'm doing this as a hobby. So no need to say thank you. But I'm a vain
+fop, so I'm certainly up for a quick thank you by email. On komascript.de you
+can find an [explanation of my wishes](https://komascript.de/wunschliste) if
+you want to give more. If you don't understand German, just click to links at
+that page.
diff --git a/Master/texmf-dist/doc/latex/lscapeenhanced/lscapeenhanced.pdf b/Master/texmf-dist/doc/latex/lscapeenhanced/lscapeenhanced.pdf
new file mode 100644
index 00000000000..27b0cacc0c6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/lscapeenhanced/lscapeenhanced.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/lscapeenhanced/lscapeenhanced.dtx b/Master/texmf-dist/source/latex/lscapeenhanced/lscapeenhanced.dtx
new file mode 100644
index 00000000000..91192b5d080
--- /dev/null
+++ b/Master/texmf-dist/source/latex/lscapeenhanced/lscapeenhanced.dtx
@@ -0,0 +1,420 @@
+% \iffalse meta-comment
+% ======================================================================
+% lscapeenhanced.dtx
+% Copyright © 2008–2024 Markus Kohm
+%
+% This work is a KOMA-Script spin-off. For the original sources of
+% KOMA-Script's `float.hak' see file `scrhack.dtx' in the KOMA-Script
+% sources at <https://sourceforge.net/p/koma-script/code/>.
+%
+% Development is taking place as part of `scrhack' at
+% <https://github.com/komascript/third-party-enhancements>. New issues
+% should be reported there as well as known issues can be found.
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, version 1.3c of the license.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.<3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later and of this work.
+%
+% This work has the LPPL maintenance status "author-maintained".
+%
+% The Current Maintainer and author of this work is Markus Kohm.
+%
+% This work consists of the file `lscapeenhanced.dtx' and `README.md'.
+%
+% The recommended way to install `lscapeenhanced' is to use
+% the package manager of your TeX distribution.
+% ======================================================================
+%
+%<*dtx>
+\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
+\ProvidesFile{lscapeenhanced.dtx}
+%</dtx>
+%<*dtx|package>
+%<package>\ProvidesPackage{lscapeenhanced}
+ [2024-04-16 v1.0
+%<dtx> sources and unpack driver of
+ improved lscape package]
+%</dtx|package>
+%<*dtx>
+\ifx\documentclass\undefined
+ \input docstrip.tex
+ \generate{%
+ \file{lscapeenhanced.sty}{%
+ \from{lscapeenhanced.dtx}{package}%
+ }%
+ }%
+\else
+ \let\endbatchfile\relax
+\fi
+\endbatchfile
+\documentclass[ngerman,USenglish]{koma-script-source-doc}
+\usepackage{babel}
+\usepackage{csquotes}
+\usepackage[style=alphabetic]{biblatex}
+\begin{filecontents}[force]{\jobname.bib}
+@article{latexnews35,
+ author={{The {\LaTeX} Project Team}},
+ shortauthor={TLT},
+ year={2022},
+ month={6},
+ title={Issue 35},
+ journal={{\LaTeX} News},
+ url={http://mirrors.ctan.org/macros/latex/base/ltnews35.pdf},
+ urldate={2023-07-14},
+}
+@online{pkg:lscape,
+ author = {David Carlisle and {The \LaTeX{} Project Team}},
+ version = {3.02},
+ date = {2020-05-28},
+ title = {\pkg*{lscape} – Place selected parts of a document in landscape},
+ url = {https://ctan.org/pkg/lscape},
+ urldate = {2023-07-19},
+ note = {Modifies the margins and rotates the page contents but not the
+ page number. Useful, for example, with large multipage tables, as
+ it is compatible with \pkg{longtable} and \pkg{supertabular}.},
+}
+@manual{pkg:lscape:manual,
+ author = {David Carlisle},
+ version = {3.02},
+ date = {2020-05-08},
+ title = {The \pkg*{lscape} package},
+ url = {http://mirrors.ctan.org/macros/latex/required/graphics/lscape.pdf},
+ urldate = {2023-07-19},
+ abstract = {All text, within the \env{landscape} environment is rotate
+ through 90 degrees. The environment may span several pages. It
+ works well with, and was originally created for, use with
+ \pkg{longtable} to produce long wide tables.},
+}
+@online{pkg:pdflscape,
+ author = {Heiko Oberdiek},
+ version = {0.13},
+ date = {2022-10-28},
+ title = {\pkg*{pdflscape} – Make landscape pages display as landscape},
+ url = {https://ctan.org/pkg/pdflscape},
+ urldate = {2023-07-19},
+ note = {The package adds PDF support to the \env{landscape} environment
+ of package \pkg{lscape}, by setting the PDF \texttt{/Rotate} page
+ attribute. Pages with this attribute will be displayed in
+ landscape orientation by conforming PDF viewers.},
+}
+@manual{pkg:pdflscape:manual,
+ author = {Heiko Oberdiek},
+ version = {0.13},
+ date = {2022-10-28},
+ title = {The \pkg*{pdflscape} package},
+ url = {http://mirrors.ctan.org/macros/latex/contrib/pdflscape/pdflscape.pdf},
+ urldate = {2023-07-19},
+ abstract = {Package \pkg*{pdflscape} adds PDF support to the environment
+ \env{landscape} of package \pkg{lscape} by setting the PDF
+ page attribute \texttt{/Rotate}.},
+}
+@online{pkg:xpatch,
+ author = {Enrico Gregorio},
+ version = {0.3},
+ date = {2020-03-25},
+ title = {\pkg*{xpatch} – Extending \pkg{etoolbox} patching commands},
+ url = {https://ctan.org/pkg/xpatch},
+ urldate = {2023-07-19},
+ note = {The package generalises the macro patching commands provided
+ by Philipp Lehmann's \pkg{etoolbox}.},
+}
+@manual{pkg:xpatch:manual,
+ author = {Enrico Gregorio},
+ version = {0.3},
+ date = {2020-03-25},
+ title = {The \pkg*{xpatch} package
+ extending \pkg{etoolbox} patching commands},
+ url = {http://mirrors.ctan.org/macros/latex/contrib/xpatch/xpatch.pdf},
+ urldate = {2023-07-19},
+ abstract = {},
+}
+@online{pkg:scrlfile,
+ author = {Markus Kohm},
+ version = {3.41},
+ date = {2023-07-07},
+ title = {\pkg*{scrlfile} – Installation control (not only) for
+ \KOMAScript{} packages},
+ url = {https://ctan.org/pkg/scrlfile},
+ urldate = {2023-07-19},
+ note = {The package provides hooks for the execution of commands before
+ or after loading files, classes or packages independent from the
+ \LaTeX{} kernel version.},
+}
+@online{pkg:koma-script,
+ author={Markus Kohm},
+ version={3.41},
+ date={2023-07-07},
+ title={{\KOMAScript} --- A bundle of versatile classes and packages},
+ url={https://ctan.org/pkg/koma-script},
+ urldate={2023-07-14},
+ note={The \KOMAScript{} bundle provides replacements for the \pkg*{article},
+ \pkg*{report}, and \pkg*{book} classes with emphasis on typography and
+ versatility. There is also a letter class.},
+}
+@manual{pkg:koma-script:manual:de,
+ author={Markus Kohm},
+ date={2023-06-16},
+ title={{\KOMAScript}},
+ subtitle={Die Anleitung},
+ url={http://mirrors.ctan.org/macros/latex/contrib/koma-script/scrguide-de.pdf},
+ urldate={2023-07-04},
+}
+@manual{pkg:koma-script:manual:en,
+ author={Markus Kohm},
+ date={2023-06-16},
+ title={{\KOMAScript}},
+ subtitle={The Guide},
+ url={http://mirrors.ctan.org/macros/latex/contrib/koma-script/scrguide-en.pdf},
+ urldate={2023-07-14},
+}
+\end{filecontents}
+\addbibresource{\jobname.bib}
+\setcounter{StandardModuleDepth}{2}
+\begin{document}
+ \nocite{pkg:lscape,pkg:pdflscape,pkg:koma-script}
+ \DocInput{lscapeenhanced.dtx}
+\end{document}
+%</dtx>
+%\fi
+%
+% \changes{v0.1}{2023/06/01}{start of \KOMAScript{} spin-off}
+% \changes{v1.0}{2024/04/16}{first release as standalone package}
+%
+% \GetFileInfo{lscapeenhanced.dtx}
+% \title{Improving ``\pkg{lscape}'' and ``\pkg{pdflscape}''}
+% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}^^A
+% \thanks{Repository and bug reports:
+% \url{https://github.com/komascript/third-party-enhancements}^^A
+% }%
+% }
+% \date{Version \filedate{} \fileversion}
+% \maketitle
+% \begin{abstract}
+% Package \pkg*{lscapeenhanced} has started as hack module of the
+% \KOMAScript{} package \pkg*{scrhack} years ago to fix an issue when using
+% package \pkg{lscape} with \KOMAScript{} packages \pkg{scrlayer} or
+% \pkg{scrlayer-scrpage}. This became necessary because package
+% \pkg{lscape} has a somehow strange handling of \len{textheight}
+% resp. \len{textwidth} at landscape pages. This is not only an issue with
+% \KOMAScript{} but also other packages, e.g., \pkg{showframe}. Package
+% \pkg*{lscapeenhanced} solved this issue. This is a really small change and
+% best would be, if the \pkg*{lscape} author would at least include this
+% change optionally.
+% \end{abstract}
+%
+% \tableofcontents
+%
+%\iffalse
+%<*doc>
+%\fi
+\section{What is the Potential Issue With
+ \texorpdfstring{\pkg{lscape}}{lscape}?}
+\label{sec:why}
+
+The \pkg{lscape} package defines a \env{landscape} environment to set the page
+contents, but not the header or footer in landscape mode. Inside this
+environment, \len{textheight} is set to the value of \len{textwidth}, but
+\len{textwidth} is not set to the former value of \len{textheight}. This is
+inconsistent. As far as I know, \len{textwidth} is left unchanged because
+setting it to \len{textheight} could interfere with other packages or user
+commands. But changing \len{textheight} also has this potential, and indeed it
+breaks, for example, \pkg{showframe} and \pkg{scrlayer} and in consequence
+also \pkg{scrlayer-scrpage}. Thus it would be best if \len{textheight} too
+remained unchanged. \pkg*{lscapeenhanced} uses the \pkg{xpatch} package (see
+\autocite{pkg:xpatch}) to modify the \env{landscape} environment's start macro
+\cs{landscape} appropriately.
+
+Incidentally, the \pkg{pdflscape} package also uses \pkg{lscape}, so
+\pkg*{lscapeenhanced} affects the functioning of this package too.
+
+\section{How to use \texorpdfstring{\pkg*{lscapeenhanced}}{lscapeenhanced}}
+\label{sec:howtouse}
+
+In the document preamble of your document you just can replace
+\begin{verbatim}
+ \usepackage{lscape}
+\end{verbatim}
+by
+\begin{verbatim}
+ \usepackage{lscapeenhanced}
+\end{verbatim}
+to load package \pkg*{lscapeenhanced}. This does still also load package
+\pkg{lscape} but additionally patches one command of \pkg{lscape} to avoid
+the issues shown in \autoref{sec:why}.
+
+If you want you can alternatively also load both packages explicitly, either
+\pkg{lscape} before \pkg*{lscapeenhanced} or---if you
+want---\pkg*{lscapeenhanced} before \pkg{lscape}. This is also useful, if you
+use a package, that uses \pkg{lscape} itself, i.e., \pkg{pdflscape}.
+
+\DescribeOption{pdflscape}%
+In case of \pkg{pdflscape} you can alternatively replace
+\begin{verbatim}
+ \usepackage{pdflscape}
+\end{verbatim}
+by
+\begin{verbatim}
+ \usepackage[pdflscape]{lscapeenhanced}
+\end{verbatim}
+in which case \pkg*{lscapeenhanced} would load \pkg{pdflscape}.
+
+When using a class that uses \pkg{lscape}, the correct operation can be
+ensured with
+\begin{verbatim}
+ \AddToHook{package/lscape/after}{\RequirePackage{lscapeenhanced}}
+\end{verbatim}
+even before \cs{documentclass}. This requires at least \LaTeX{}
+2020/10/01. For older versions of \LaTeX{} you can use
+\begin{verbatim}
+ \RequirePackage{scrlfile}
+ \AfterPackage{lscape}{\RequirePackage{lscapeenhanced}}
+\end{verbatim}
+also before \cs{documentclass}. This would require the \KOMAScript{} package
+\pkg{scrlfile}\nocite{pkg:scrlfile}.
+
+The user interface of \pkg*{lscapeenhanced} is the same as of \pkg{lscape}
+resp. \pkg{pdflscape}, see \autocite{pkg:lscape:manual}. The only difference
+is, that the issue explained in \autoref{sec:why} has been fixed.
+
+\DescribeOption{lscape}
+To deactivate the changes of \pkg*{lscapeenhanced} you can use option
+\opt{lscape=false}. This option can also be changed using
+\begin{verbatim}
+ \SetKeys[lscapeenhanced]{lscape=false}
+\end{verbatim}
+or
+\begin{verbatim}
+ \SetKeys[lscapeenhanced]{lscape=true}
+\end{verbatim}
+after loading the package.
+%
+% \iffalse
+%</doc>
+% \fi
+%
+% \MaybeStop{\printbibliography[heading=bibintoc]\PrintIndex}
+%
+% \iffalse
+%<*package>
+% \fi
+% \section{Implementation}
+%
+% \pkg*{lscapeenhanced} uses the new \LaTeX{} kernel feature of
+% key-value-options introduced in \autocite{latexnews35}. So we need at least
+% \LaTeX{} 2022-06-01:
+% \begin{macrocode}
+\ifnum 0=\ifcsname IfFormatAtLeastTF\endcsname
+ \IfFormatAtLeastTF{2022-06-01}{1}{0}%
+ \else
+ 0%
+ \fi\relax
+ \PackageError{lscapeenhanced}{LaTeX kernel too old}{%
+ The package needs at least LaTeX 2022-06-01.\MessageBreak
+ This error is fatal. Loading will be aborted.%
+ }%
+ \endinput
+\fi
+\ExplSyntaxOn
+% \end{macrocode}
+%
+% \begin{option}{pdflscape}
+% \begin{macro}{\@lscapeenhanced@req@packages}
+% If the option is used (without value!) it just changes the macro
+% indicating the package that should also be loaded. Package authors
+% could also define the internal macro \cs{@lscapeenhanced@req@packages}.
+% \begin{macrocode}
+\providecommand*{\@lscapeenhanced@req@packages}{lscape}
+\DeclareKeys{%
+ pdflscape .code = {
+ \renewcommand*{\@lscapeenhanced@req@packages}{lscape,pdflscape}
+ },
+ pdflscape .usage = load,
+ pdflscape .value_forbidden:n = true
+}
+% \end{macrocode}
+% \end{macro}
+% \end{option}
+%
+% \begin{option}{lscape}
+% \begin{macro}{\if@lscapeenhanced@lscape}
+% A switch to allow to activate and deactivate usage of the change.
+% \begin{macrocode}
+\newif\if@lscapeenhanced@lscape \@lscapeenhanced@lscapetrue
+\DeclareKeys{%
+ lscape .if = @lscapeenhanced@lscape,
+ lscape.usage = general,
+}
+% \end{macrocode}
+% \end{macro}
+% \end{option}
+%
+% Processing the options:
+% \begin{macrocode}
+\ExplSyntaxOff
+\ProcessKeyOptions\relax
+% \end{macrocode}
+%
+% Now we can request the base package(s):
+% \begin{macrocode}
+\expandafter\RequirePackage\expandafter{\@lscapeenhanced@req@packages}
+% \end{macrocode}
+%
+% As often as possible, we do not redefine macros of \pkg{lscape}, but patch
+% them using \pkg{xpatch}:
+% \begin{macrocode}
+\RequirePackage{xpatch}
+% \end{macrocode}
+%
+% \begin{command}{\landscape}
+% This command is the beginning of environment \env{landscape}. This has to be
+% patched using \pkg{xpatch}.
+% \begin{macrocode}
+\xpatchcmd{\landscape}{\textheight=\vsize}{%
+ \if@lscapeenhanced@lscape
+% \end{macrocode}
+% \begin{macro}{\@outputpage,\@lscapeenhanced@outputpage}
+% \begin{ilength}{\@lscapeenhanced@textheight}
+% Here the changed value of \len{textheight} is needed for initialization of
+% \cs{@colht}. So we patch it to use the new internal
+% \len{@lscapeenhanced@textheight} instead of \len{textheight}.
+% \begin{macrocode}
+ \@lscapeenhanced@textheight=\vsize
+ \let\@lscapeenhanced@outputpage\@outputpage
+ \def\@outputpage{%
+ \@lscapeenhanced@outputpage\global\@colht\@lscapeenhanced@textheight
+ }%
+ \else
+ \textheight=\vsize
+ \fi
+}{%
+ \PackageInfo{lscapeenhanced}{\string\landscape\space patched to make
+ \string\textheight\space change optional}%
+}{%
+ \PackageWarning{lscapeenhanced}{Cannot patch \string\landscape!\MessageBreak
+ Maybe you are using a unsupported lscape version}%
+ \@lscapeenhanced@lscapefalse
+}
+\newlength{\@lscapeenhanced@textheight}
+% \end{macrocode}
+% \end{ilength}
+% \end{macro}
+% \end{command}
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
+% \PrintChanges
+%
+% \endinput
+% Local Variables:
+% mode: doctex
+% ispell-local-dictionary: "en_US"
+% eval: (flyspell-mode 1)
+% TeX-master: t
+% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
+% End:
diff --git a/Master/texmf-dist/tex/latex/lscapeenhanced/lscapeenhanced.sty b/Master/texmf-dist/tex/latex/lscapeenhanced/lscapeenhanced.sty
new file mode 100644
index 00000000000..402a9715df2
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lscapeenhanced/lscapeenhanced.sty
@@ -0,0 +1,76 @@
+%%
+%% This is file `lscapeenhanced.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lscapeenhanced.dtx (with options: `package')
+%%
+%% IMPORTANT NOTICE:
+%%
+%% For the copyright see the source file.
+%%
+%% Any modified versions of this file must be renamed
+%% with new filenames distinct from lscapeenhanced.sty.
+%%
+%% For distribution of the original source see the terms
+%% for copying and modification in the file lscapeenhanced.dtx.
+%%
+%% This generated file may be distributed as long as the
+%% original source files, as listed above, are part of the
+%% same distribution. (The sources need not necessarily be
+%% in the same archive or directory.)
+\ProvidesPackage{lscapeenhanced}
+ [2024-04-16 v1.0
+ improved lscape package]
+\ifnum 0=\ifcsname IfFormatAtLeastTF\endcsname
+ \IfFormatAtLeastTF{2022-06-01}{1}{0}%
+ \else
+ 0%
+ \fi\relax
+ \PackageError{lscapeenhanced}{LaTeX kernel too old}{%
+ The package needs at least LaTeX 2022-06-01.\MessageBreak
+ This error is fatal. Loading will be aborted.%
+ }%
+ \endinput
+\fi
+\ExplSyntaxOn
+\providecommand*{\@lscapeenhanced@req@packages}{lscape}
+\DeclareKeys{%
+ pdflscape .code = {
+ \renewcommand*{\@lscapeenhanced@req@packages}{lscape,pdflscape}
+ },
+ pdflscape .usage = load,
+ pdflscape .value_forbidden:n = true
+}
+\newif\if@lscapeenhanced@lscape \@lscapeenhanced@lscapetrue
+\DeclareKeys{%
+ lscape .if = @lscapeenhanced@lscape,
+ lscape.usage = general,
+}
+\ExplSyntaxOff
+\ProcessKeyOptions\relax
+\expandafter\RequirePackage\expandafter{\@lscapeenhanced@req@packages}
+\RequirePackage{xpatch}
+\xpatchcmd{\landscape}{\textheight=\vsize}{%
+ \if@lscapeenhanced@lscape
+ \@lscapeenhanced@textheight=\vsize
+ \let\@lscapeenhanced@outputpage\@outputpage
+ \def\@outputpage{%
+ \@lscapeenhanced@outputpage\global\@colht\@lscapeenhanced@textheight
+ }%
+ \else
+ \textheight=\vsize
+ \fi
+}{%
+ \PackageInfo{lscapeenhanced}{\string\landscape\space patched to make
+ \string\textheight\space change optional}%
+}{%
+ \PackageWarning{lscapeenhanced}{Cannot patch \string\landscape!\MessageBreak
+ Maybe you are using a unsupported lscape version}%
+ \@lscapeenhanced@lscapefalse
+}
+\newlength{\@lscapeenhanced@textheight}
+\endinput
+%%
+%% End of file `lscapeenhanced.sty'.
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index c9fc1008b14..8425c47729f 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -511,7 +511,7 @@ my @TLP_working = qw(
logoetalab logpap logreq lollipop
longdivision longfbox longfigure longmath longnamefilelist loops
lparse lpform lpic lplfitch lps
- lroundrect lsc
+ lroundrect lsc lscapeenhanced
lshort-bulgarian lshort-chinese lshort-czech lshort-dutch lshort-english
lshort-estonian lshort-finnish lshort-french lshort-german lshort-italian
lshort-japanese lshort-korean lshort-mongol lshort-persian
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 88682ebba6d..1f7cd53974a 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -3334,6 +3334,7 @@ my $core_latex = "$Master/texmf-dist/tex/latex";
'listings' => 'latex', # requires interaction
'lmake' => 'latex', # requires interaction
'lni' => 'tex --8bit',
+ 'lscapeenhanced' => 'tex',
'ltxcmds' => 'etex',
'lua-typo' => 'etex',
'lua-ul' => 'etex-answer-y', # https://github.com/latex3/latex2e/issues/558
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index 1193ec63775..7c3e331e9de 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -834,6 +834,7 @@ depend longfigure
depend longnamefilelist
depend loops
depend lsc
+depend lscapeenhanced
depend lstaddons
depend lstfiracode
depend lt3graph
diff --git a/Master/tlpkg/tlpsrc/lscapeenhanced.tlpsrc b/Master/tlpkg/tlpsrc/lscapeenhanced.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/lscapeenhanced.tlpsrc