summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-04-17 03:01:32 +0000
committerNorbert Preining <norbert@preining.info>2024-04-17 03:01:32 +0000
commit5e39b1cb205459cadf7e418c73567bf999923ce7 (patch)
treed679843a5c3b555a21dfab4f10c60eb59fa54510 /macros/latex/contrib
parent9800bfd04f16cdf2663b542883c67de4d0926b21 (diff)
CTAN sync 202404170301
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/graphics-def/README.md2
-rw-r--r--macros/latex/contrib/graphics-def/luatex.def17
-rw-r--r--macros/latex/contrib/graphics-def/pdftex.def17
-rw-r--r--macros/latex/contrib/litesolution/doc/litesolution.pdfbin542691 -> 551913 bytes
-rw-r--r--macros/latex/contrib/litesolution/doc/litesolution.tex198
-rw-r--r--macros/latex/contrib/litesolution/doc/schrodinger.pdfbin0 -> 1996 bytes
-rw-r--r--macros/latex/contrib/litesolution/tex/litesolution.cls311
-rw-r--r--macros/latex/contrib/lscapeenhanced/LICENSE.md19
-rw-r--r--macros/latex/contrib/lscapeenhanced/README.md154
-rw-r--r--macros/latex/contrib/lscapeenhanced/lscapeenhanced.dtx420
-rw-r--r--macros/latex/contrib/lscapeenhanced/lscapeenhanced.pdfbin0 -> 261243 bytes
11 files changed, 876 insertions, 262 deletions
diff --git a/macros/latex/contrib/graphics-def/README.md b/macros/latex/contrib/graphics-def/README.md
index c159d2e89b..2fb6a0a73e 100644
--- a/macros/latex/contrib/graphics-def/README.md
+++ b/macros/latex/contrib/graphics-def/README.md
@@ -1,7 +1,7 @@
LaTeX support for color and graphics
====================================
-Release 2022-09-22
+Release 2024-04-13
This bundle contains the 'engine-dependent' part of support for
color and graphics in LaTeX2e (the code here will also function
diff --git a/macros/latex/contrib/graphics-def/luatex.def b/macros/latex/contrib/graphics-def/luatex.def
index b32506d055..5c12096218 100644
--- a/macros/latex/contrib/graphics-def/luatex.def
+++ b/macros/latex/contrib/graphics-def/luatex.def
@@ -3,7 +3,7 @@
%% Hans Hagen, Heiko Oberdiek and
%% Martin Schr\"oder
%% Copyright (C) 2016-2018 LaTeX3 project and Heiko Oberdiek
-%% Copyright (C) 2018-2022 LaTeX3 project
+%% Copyright (C) 2018-2024 LaTeX3 project
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -20,7 +20,7 @@
%% https://github.com/latex3/graphics-def/issues
%%
\ProvidesFile{luatex.def}
- [2022/09/22 v1.2d Graphics/color driver for luatex]
+ [2024/04/13 v1.2e Graphics/color driver for luatex]
\def\GPT@space{ }
\def\c@lor@arg#1{%
\dimen@#1\p@
@@ -651,9 +651,8 @@
}
% Load package epstopdf if
% a) LaTeX is running (plain TeX users are on their own),
-% b) and shell escape is enabled (possibly restricted),
-% c) and \DoNotLoadEpstopdf either does not exist or is not \relax,
-% d) and neither pst-pdf nor pdftricks is loaded (by \begin{document}).
+% b) and \DoNotLoadEpstopdf either does not exist or is not \relax,
+% c) and neither pst-pdf nor pdftricks is loaded (by \begin{document}).
%
% In other words, by default .eps files will be automatically
% converted to .pdf files when outputting pdf. This can be wrong!
@@ -661,6 +660,10 @@
% \newcommand{\DoNotLoadEpstopdf}{}
% before even the \documentclass line of your document.
%
+% Earlier versions did not load epstopdf if shell escape was disabled.
+% Now load, for better error reporting and to allow inclusion of pre-existing
+% converted files: see gh/38
+%
% More information about the epstopdf run will be in the .log file;
% see http://ctan.org/pkg/epstopdf-pkg for more info about the
% epstopdf package itself. In turn, it calls the epstopdf script
@@ -680,11 +683,9 @@
\@ifpackageloaded{pst-pdf}{}{%
\@ifpackageloaded{pdftricks}{}{%
\@ifpackageloaded{graphics}{%
- \ifnum\directlua{tex.sprint(status.shell_escape)}>0 %
- % only add .eps to file extension list if epstopdf is loaded
\edef\Gin@extensions{\Gin@extensions,.eps}%
\RequirePackage{epstopdf-base}[2009/07/12]%
- \fi}{}
+ }{}
}% pdftricks not loaded
}% pst-pdf not loaded
\fi
diff --git a/macros/latex/contrib/graphics-def/pdftex.def b/macros/latex/contrib/graphics-def/pdftex.def
index 35eb376cfd..0c2afa3608 100644
--- a/macros/latex/contrib/graphics-def/pdftex.def
+++ b/macros/latex/contrib/graphics-def/pdftex.def
@@ -3,7 +3,7 @@
%% Hans Hagen, Heiko Oberdiek and
%% Martin Schr\"oder
%% Copyright (C) 2016-2018 LaTeX3 project and Heiko Oberdiek
-%% Copyright (C) 2018-2022 LaTeX3 project
+%% Copyright (C) 2018-2024 LaTeX3 project
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -20,7 +20,7 @@
%% https://github.com/latex3/graphics-def/issues
%%
\ProvidesFile{pdftex.def}
- [2022/09/22 v1.2b Graphics/color driver for pdftex]
+ [2024/04/13 v1.2c Graphics/color driver for pdftex]
\def\GPT@space{ }
\def\c@lor@arg#1{%
\dimen@#1\p@
@@ -652,9 +652,8 @@ E \else
}
% Load package epstopdf if
% a) LaTeX is running (plain TeX users are on their own),
-% b) and shell escape (\write18) is enabled (possibly restricted),
-% c) and \DoNotLoadEpstopdf either does not exist or is not \relax,
-% d) and neither pst-pdf nor pdftricks is loaded (by \begin{document}).
+% b) and \DoNotLoadEpstopdf either does not exist or is not \relax,
+% c) and neither pst-pdf nor pdftricks is loaded (by \begin{document}).
%
% In other words, by default .eps files will be automatically
% converted to .pdf files when outputting pdf. This can be wrong!
@@ -662,6 +661,10 @@ E \else
% \newcommand{\DoNotLoadEpstopdf}{}
% before even the \documentclass line of your document.
%
+% Earlier versions did not load epstopdf if shell escape was disabled.
+% Now load, for better error reporting and to allow inclusion of pre-existing
+% converted files: see gh/38
+%
% More information about the epstopdf run will be in the .log file;
% see http://ctan.org/pkg/epstopdf-pkg for more info about the
% epstopdf package itself. In turn, it calls the epstopdf script
@@ -681,11 +684,9 @@ E \else
\@ifpackageloaded{pst-pdf}{}{%
\@ifpackageloaded{pdftricks}{}{%
\@ifpackageloaded{graphics}{%
- \ifnum\pdfshellescape>0 %
- % only add .eps to file extension list if epstopdf is loaded
\edef\Gin@extensions{\Gin@extensions,.eps}%
\RequirePackage{epstopdf-base}[2009/07/12]%
- \fi}{}
+ }{}
}% pdftricks not loaded
}% pst-pdf not loaded
\fi
diff --git a/macros/latex/contrib/litesolution/doc/litesolution.pdf b/macros/latex/contrib/litesolution/doc/litesolution.pdf
index 448aadb3bb..a5550aae17 100644
--- a/macros/latex/contrib/litesolution/doc/litesolution.pdf
+++ b/macros/latex/contrib/litesolution/doc/litesolution.pdf
Binary files differ
diff --git a/macros/latex/contrib/litesolution/doc/litesolution.tex b/macros/latex/contrib/litesolution/doc/litesolution.tex
index aa674fb100..821a84006b 100644
--- a/macros/latex/contrib/litesolution/doc/litesolution.tex
+++ b/macros/latex/contrib/litesolution/doc/litesolution.tex
@@ -1,164 +1,150 @@
-\documentclass[ans]{litesolution}
-\newenvironment{abstract}
- {\small\setstretch{2}\begin{center}\textbf{Abstract}\par}{\end{center}}
-\begin{document}
+\documentclass[ans,mtpro2]{litesolution}
+
+\usepackage[listings]{tcolorbox}
-\chapterfont{Chiron Sung HK}
-\chapterimage{Beautiful-realities}
-\chapter{The \pkg{LiteSolution} Template}
+\cover{schrodinger}
+\title{\sffamily The \pkg{LiteSolution} Class}
+\subtitle{\sffamily\scshape Hangzhou Dianzi University}
+\bioinfo{\scshape\sffamily Mingyu Hsia, \href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com} | \today, Version 2.1a}
+\coverdecoration{$\Psi=\displaystyle\int\e^{\frac i\hbar\int\ab(\frac{R}{16\pi G}-\frac14F^2+\overline\psi i\cancel D\psi-\lambda\varphi\overline\psi\psi+\abs{D\varphi}^2-V(\varphi))}$}
-\begin{center}
- Hsia Mingyu, \href{https://www.hdu.edu.cn}{Hangzhou Dianzi University}
+\begin{document}
- \href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com}
+\maketitle
- \today, Version 2.0a
-\end{center}
+\chapterimage{\UPFadingImage[trim={0 {.9\paperheight} 0 0},clip]{Beautiful-realities}}
-\begin{abstract}
- This is the document for \pkg{LiteSolution} template, which provides a lite design of the solution of test paper.
-\end{abstract}
+\chapter{An Introduction to the \pkg{LiteSolution} Class}
\section{Introduction}
+
+This is the document for \pkg{litesolution} template, which provides a lite design of the solution of test paper.
+
\subsection{The purpose of this template}
-This template provides a fresh design for typesetting solutions of midterm or final exam, textbooks and other exercises. Welcome to feedback bugs or ideas via email \href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com} or \href{https://github.com/xiamyphys/litesolution}{GitHub}.
-\subsection{Installing \pkg{LiteSolution} and loading it}
-For portable version, simply download latest \verb|litesolution.cls| file from \href{https://github.com/xiamyphys/LiteSolution}{GitHub} or \href{https://ctan.org/pkg/litesolution}{CTAN} and save it under your working directory. This way of installation is simple and convenient, but you have to manually update \verb|.cls| now and then.
+This template provides a fresh design for typesetting solutions of exams, textbooks or other exercises. Welcome to feedback bugs or ideas via email \href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com} or \href{https://github.com/xiamyphys/litesolution}{GitHub}.
+
+\subsection{Installing \pkg{Litesolution} and loading it}
+
+Simply download \verb|litesolution.cls| file from \href{https://github.com/xiamyphys/LiteSolution}{GitHub} or \href{https://ctan.org/pkg/litesolution}{CTAN} and save it under your working directory. However, I strongly suggest to use terminal to install and update all packages to the latest version
-However, I strongly suggest that you should use terminal/cmd to implement the commands to update all the packages (and install this package) to the latest version or switch to portable version instead
\begin{verbatim}
sudo tlmgr update --self --all
\end{verbatim}
-If you are in some areas with awful Internet environment (such as a), you can choose proper mirror source or use other means\footnote{Please comply with local network regulations.}. To learn more, please refer to \href{https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my \hologo{TeX} distribution?}
+To learn more, please refer to \href{https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my \hologo{TeX} distribution?}
\subsection{Compatibility}
The test environments are macOS + Mac\hologo{TeX} 2024 / Overleaf and they all work fine for \hologo{pdfLaTeX} and \hologo{XeLaTeX} compilers. Windows, Linux and Unix platforms compatibility unknown.
-\clearpage
+\section{Global Options of \pkg{Litesolution}}
-\section{Global options of \pkg{LiteSolution}}
\begin{verbatim}
- \documentclass[options]{litesolution}
+ \documentclass[<options>]{litesolution}
\end{verbatim}
+
\subsection{The \mode{answer} option}
-This option has two modes, \mode{ans} and \mode{noans}, which can show and hide answers respectively. After you enabled the \mode{noans} mode, the contents in the environment \cmd{solution}, the command \cmd{ans} and the answers of choice questions will be replaced with an area of the same blank size as the original contents.
+
+This option has two modes, \mode{ans} and \mode{noans}, which can show or hide answers. After the \mode{noans} mode is enabled, the environment \cmd{solution} will be deactivated and contents in command \cmd{ans} will be hidden.
\subsection{The \mode{counter} option}
+
This option has two modes, \mode{separate} and \mode{continuous}, which can make the page number between chapters be reset or continuous.
-\section{Commands of \pkg{LiteSolution}}
-\subsection{The \cmd{chapterimage} command}
+\section{Cover Configurations}
+
+\subsection{The cover page configurations}
+
\begin{verbatim}
- \chapterimage {⟨image path⟩}
+ \cover{<image name>} \title{<title>} \subtitle{<vertical subtitle>}
+ \bioinfo{<bioinfo on bottom>} \coverdecoration{<above contents>}
\end{verbatim}
-This command can assign the title background image for each subsequent chapter.
+The same as the \pkg{book} class, the macro title could not be omitted, or it will return an error. The following is the cover configurations of this document
-\subsection{The \cmd{chapterfont} command}
\begin{verbatim}
- \chapterfont [⟨font features⟩] {⟨font name⟩}
+ \title{\sffamily The \pkg{litesolution} Class}
+ \subtitle{\sffamily\scshape Hangzhou Dianzi University}
+ \bioinfo{\scshape\sffamily Mingyu Hsia, \href{mailto:xiamyphys@gmail.com}
+ {\ttfamily xiamyphys@gmail.com} | \today, Version 2.1a}
+ \coverdecoration{$\Psi=\displaystyle\int\e^{\frac i\hbar
+ \int\ab(\frac{R}{16\pi G}-\frac14F^2+\overline\psi i\cancel D\psi
+ -\lambda\varphi\overline\psi\psi+\abs{D\varphi}^2-V(\varphi))}$}
+ \cover{schrodinger}
\end{verbatim}
-This command can assign the title font for each chapter and the default font of the title is \emph{Songti SC} in Chinese and \emph{Libertinus} in English. This command is \emph{only available with \hologo{XeLaTeX} compiler}.
+\subsection{The chapter head configurations}
-\subsection{The \cmd{ans} command}
\begin{verbatim}
- \ans {⟨contents⟩}
+ \chapterimage {<insert image macro>}
\end{verbatim}
-
-This command can underline the answer, and if mode \mode{noans} is enabled, the answer will disappear, leaving only a horizontal line the same width as the answer.
-\subsection{The \cmd{solute} command}
+This command can assign the format of the image at every chapters begin and you can adjust the format of the image with the \pkg{fadingimage} package.
+
+\section{Preset Commands}
+
+\subsection{The \cmd{ans} command}
+
\begin{verbatim}
- \solute {⟨number⟩}
+ \ans {<contents>}
\end{verbatim}
+
+This command can underline the answer, and if mode \mode{noans} is enabled, the answer will be hidden.
-This command can create a fixable answer box when the mode \mode{noans} is enabled.
+\subsection{The \cmd{solute} command}
-\subsection{The \cmd{watermark} command}
\begin{verbatim}
- \watermark {⟨image path⟩}
+ \solute {<number>} \solute* {<contents>}
\end{verbatim}
-This command can add watermark to the document.
+This command can create a fixable answer box when the mode \mode{noans} is enabled.
\subsection{Other preset commands}
+
This template provides the same math commands as \S 1.5 of the template \pkg{LiteBook} described additionly.
-\section{Environments of \pkg{LiteSolution}}
-\subsection{The \cmd{choice} environment}
-\begin{tcblisting}{sidebyside,colback=cmdcolor!5,colframe=cmdcolor!80}
-\begin{problem}[Keywords]
- You can add keywords to the problem.
+\section{Preset \pkg{amsthm} Environments}
+
+\subsection{The \cmd{problem} environment}
+
+\begin{tcblisting}{sidebyside,colback=DarkGreen!5,colframe=DarkGreen!80}
+\begin{problem}\leavevmode
+\begin{tasks}(2)
+ \task Choice A \task[\true] Choice B
+ \task Choice C \task Choice D
+\end{tasks}
\end{problem}
\end{tcblisting}
-\subsection{The \cmd{solution} environment}
-\begin{tcblisting}{colback=moducolor!5,colframe=moducolor!80}
-\begin{solution}\leavevmode
- \begin{tasks}(4)
- \task Choice A \task[\small\faIcon{check-square}.] Choice B
- \addtocounter{task}{1} \task Choice C \task Choice D
- \end{tasks}
+\subsection{The \cmd{solution} and \cmd{note} environment}
+
+\begin{minipage}{.48\textwidth}
+\begin{tcblisting}{sidebyside,colback=MidnightBlue!5,colframe=MidnightBlue!80}
+\begin{solution}
+ B is correct.
\end{solution}
\end{tcblisting}
-
-\subsection{The \cmd{note} environment}
-\begin{tcblisting}{sidebyside,colback=pkgcolor!5,colframe=pkgcolor!80}
+\end{minipage}
+\hfill
+\begin{minipage}{.48\textwidth}
+\begin{tcblisting}{sidebyside,colback=DarkRed!5,colframe=DarkRed!80}
\begin{note}
- Please note that...
+ We note that.
\end{note}
-\end{tcblisting}
+\end{tcblisting}
+\end{minipage}
+
+\appendix
+\def\thesection{Appendix \Alph{section}}
+
+\section{An Introduction to The \pkg{notebeamer} Class}
+
+This class provides an easy way to input Beamers on note papers and make notebook quickly. It's optimized for Goodnotes' default paper size and there won't have difference between papers.
+
+In the future, this class will be redesigned to a package that optimized for the \pkg{litesolution} class.
+
+\section{An Introduction to The \pkg{fadingimage} Package}
-\section{Version History}
-This template is used to type the midterm and final exam solutions of \emph{College Physics}. Initially, I used the \href{https://github.com/Azure1210/VividBooK}{\pkg{VividBooK}} template for layout. However, this template is too bloated and many functions \& designs are excess and need to be redesigned, so I started developing the \pkg{LiteSolution} template.
-
-\subsection*{Update Announcements}
-\textbf{Version 0.1b -- 2023/07/06}
-\begin{itemize}
- \item Support page number remaking between chapters.
- \item Added \cmd{watermark} command.
-\end{itemize}
-
-\vskip1ex\hrule\vskip1ex
-
-\textbf{Version 1.0a -- 2023/11/15}
-\begin{itemize}
- \item Redesigned the \cmd{chapterimage} part, include the layout and the code.
- \item Redesigned the \cmd{choice} and \cmd{solution} environments, keywords are optional and supports star (*) key.
- \item Replaced the \cmd{exercise} environment with the \cmd{problem} environment, supports adding only keywords or points.
- \item Added the \cmd{note} environment and some custom commands.
-\end{itemize}
-
-\vskip1ex\hrule\vskip1ex
-
-\textbf{Version 1.2a -- 2023/12/13}
-\begin{itemize}
- \item Fixed the bug that the gap around the chapter image.
- \item Added some commands for matrices.
- \item Redesigned the \cmd{chapterfont} command.
- \item Redesigned the \cmd{proof} environment.
- \item Supports to adjust the height of solution box when output the exam paper without answer.
- \item Fixed the bug that warnings of the packages \pkg{xeCJK} and \pkg{fontspec}.
-\end{itemize}
-
-\vskip1ex\hrule\vskip1ex
-
-\textbf{Version 1.3a -- 2023/03/08}
-\begin{itemize}
- \item Added the mode \mode{tcolorbox}, which you can choose whether the tcolorbox breakable or not.
- \item This version separate the chapterimage part to a single \verb|titleimage.sty| file, which will be posted on \nolinkurl{ctan.org} soon to make this template more maintainable.
-\end{itemize}
-
-\vskip1ex\hrule\vskip1ex
-
-\textbf{Version 2.0a -- \today}
-\begin{itemize}
- \item This version redesigned the whole template and simplified the code, replaced the \pkg{tcolorbox} design with \pkg{amsthm} to accelerate compile.
- \item Redesigned the chapter title.
- \item Supports the \hologo{pdfLaTeX} compiler.
-\end{itemize}
+This package provides three commands for adding fading full width picture at the top or bottom of a page.
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/litesolution/doc/schrodinger.pdf b/macros/latex/contrib/litesolution/doc/schrodinger.pdf
new file mode 100644
index 0000000000..c9278e8113
--- /dev/null
+++ b/macros/latex/contrib/litesolution/doc/schrodinger.pdf
Binary files differ
diff --git a/macros/latex/contrib/litesolution/tex/litesolution.cls b/macros/latex/contrib/litesolution/tex/litesolution.cls
index 7706372a48..ecba593464 100644
--- a/macros/latex/contrib/litesolution/tex/litesolution.cls
+++ b/macros/latex/contrib/litesolution/tex/litesolution.cls
@@ -1,25 +1,26 @@
-%% ****************************************************************************************************
-%% Copyright 2024 by Mingyu Hsia <xiamyphys@gmail.com> *
-%% *
-%% This work may be distributed and/or modified under * ***** * * *
-%% the conditions of the LaTeX Project Public License * ** * * *** * * *
-%% * * ** * * * ** *
-%% http://www.latex-project.org/lppl.txt * * * * ***** ** *
-%% * * ** * * * * *
-%% either version 1.3c of this license or any later ***** ** * * *** * * *
-%% version. *
-%% *
-%% This work has the LPPL maintenance status `maintained'. *
-%% *
-%% The Current Maintainer of this work is Mingyu Hsia. *
-%% *
-%% This work consists of the files litesolution.cls, *
-%% and README.md. *
-%% available at https://github.com/xiamyphys/LitSolution *
-%% ****************************************************************************************************
+%% ***********************************************************
+%% Copyright 2024 by Mingyu Hsia <xiamyphys@gmail.com> *
+%% *
+%% This work may be distributed and/or modified under *
+%% the conditions of the LaTeX Project Public License *
+%% *
+%% http://www.latex-project.org/lppl.txt *
+%% *
+%% either version 1.3c of this license or any later *
+%% version. *
+%% *
+%% This work has the LPPL maintenance status `maintained'. *
+%% *
+%% The Current Maintainer of this work is Mingyu Hsia. *
+%% *
+%% This work consists of the files litesolution.cls, *
+%% and README.md. *
+%% available at https://github.com/xiamyphys/LitSolution *
+%% ***********************************************************
% !Mode:: "TeX:UTF-8"
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{litesolution}[2024/03/11 v2.0a LiteSolution document class]
+\PassOptionsToPackage{svgnames}{xcolor}
+\ProvidesClass{litesolution}[2024/04/17 v2.1a LiteSolution document class]
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
\SetupKeyvalOptions{family=LITE, prefix=LITE@, setkeys=\kvsetkeys}
@@ -29,6 +30,10 @@
\DeclareVoidOption{ans}{\ekv{answer=ans}}
\DeclareVoidOption{noans}{\ekv{answer=noans}}
+\DeclareStringOption[newtx]{math}
+\DeclareVoidOption{newtx}{\ekv{math=newtx}}
+\DeclareVoidOption{mtpro2}{\ekv{math=mtpro2}}
+
\DeclareStringOption[separate]{counter}
\DeclareVoidOption{separate}{\ekv{counter=separate}}
\DeclareVoidOption{continuous}{\ekv{counter=continuous}}
@@ -37,149 +42,177 @@
\ProcessKeyvalOptions*\relax
\LoadClass[letterpaper,11pt,openany]{book}
-\RequirePackage{geometry,anyfontsize,setspace,enumitem,booktabs,tabularx,diagbox,multicol,multirow}
-\geometry{margin= 1 in}
-\setstretch{1.25}
-
-\RequirePackage{graphics,graphicx}
-\graphicspath{{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}}
-
-\RequirePackage{indentfirst}
-\setlength{\parindent}{2ex}
-
-\RequirePackage[labelsep=period,labelfont={bf,sf},font=small]{caption}
+\RequirePackage{geometry,setspace,datetime,caption,booktabs,multicol,diagbox,paracol,float,enumitem}
\RequirePackage[nokeyprefix]{refstyle}
\newref{fig}{name={\sffamily\bfseries Figure~}}
\newref{tab}{name={\sffamily\bfseries Table~}}
+\geometry{margin = 1in}
+\linespread{1.3}
+\ddmmyyyydate
+\captionsetup{labelsep=period,labelfont={bf,sf},font=small}
+\AtBeginEnvironment{figure}{\vspace*{-1ex}}
+\AfterEndEnvironment{figure}{\vspace*{-2ex}}
+\AtBeginEnvironment{paracol}{\nointerlineskip}
+\AfterEndEnvironment{paracol}{\nointerlineskip}
+\columnratio{.64}
+\setlist[enumerate]{itemsep=.5ex}
+\setlist[itemize]{itemsep=.5ex}
+
+\RequirePackage{graphics,graphicx,wallpaper}
+\graphicspath{{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}}
-\RequirePackage{lipsum,hologo}
-\hologoFontSetup{general=\sffamily}
\RequirePackage{ifxetex}
\ifXeTeX
- \RequirePackage[quiet]{xeCJK}
- \RequirePackage[quiet,no-math]{fontspec}
- \RequirePackage{zhlipsum}
- \NewDocumentCommand\chapterfont{ o m }{
- \setCJKfamilyfont{chapterfont}[#1]{#2}
- \gdef\@chapterfont[#1]{#2}
- }
-\else
- \def\chapterfont#1{}
- \def\CJKfamily#1{}
+ \RequirePackage[quiet]{xeCJK}
+ \RequirePackage{zhlipsum}
+ \setlength{\parindent}{2em}
\fi
-\def\chapterimage#1{\gdef\@chapterimage{#1}}
-\def\@makechapterhead#1{%
- {\UPFadingImage[trim={0 {.9\paperheight} 0 0},clip]{\@chapterimage}
- \parindent \z@ \centering \normalfont
- \ifnum \c@secnumdepth >\m@ne
- \par\nobreak
- \fi
- \interlinepenalty\@M
- \ifcsname @chapterfont\endcsname\CJKfamily{chapterfont}\fi
- \normalsize \bfseries \ifXeTeX\else\sffamily\fi \huge #1\par\nobreak
- \vskip 20\p@\normalfont\normalsize
- }}
+\ifdefstring{\LITE@math}{mtpro2}{%
+ \RequirePackage{amssymb}
+ \let\Bbbk\relax
+ \RequirePackage[mtpscr,mtpccal,mtpfrak]{mtpro2}
+ \RequirePackage[mono=false]{libertine}
+}{\relax}
-\def\@makeschapterhead#1{%
- {\parindent \z@ \centering
- \normalfont
- \interlinepenalty\@M
- \huge \bfseries \sffamily #1\par\nobreak
- \vskip 40\p@
+\ifdefstring{\LITE@math}{newtx}{%
+ \RequirePackage[libertine,mono=false]{newtx}
+}{\relax}
+\let\openbox\relax\def\hmmax{0}\def\bmmax{0}
+\RequirePackage{amsthm,mdframed,physics2,bm,fixdif,derivative,cancel,extarrows,siunitx,xfrac,nicematrix}
+\usephysicsmodule{ab,braket,diagmat,doubleprod,xmat,ab.legacy,op.legacy}
+\RequirePackage[e]{esvect}
+\AtBeginDocument{%
+ \def\i{\mathrm i}
+ \def\e{\mathrm e}
+ \def\T{\mathsf T}
+ \let\leq\leqslant\let\geq\geqslant
+ \setlength{\abovedisplayskip}{9pt}
+ \setlength{\belowdisplayskip}{9pt}
+}
+
+\RequirePackage[hidelinks]{hyperref}
+\RequirePackage{fontawesome5}
+\AddToHook{cmd/faIcon/before}{%
+ \begingroup\fontsize{\fpeval{\f@size*.8}}{0}\selectfont
+}
+\AddToHook{cmd/faIcon/after}{\endgroup}
+
+\RequirePackage{circuitikz,pgfplots,fadingimage}
+\usetikzlibrary{arrows,tikzmark,patterns,calc,fadings,angles,quotes,intersections,}
+\tikzset{>=stealth',
+every picture/.append style={%
+ line join=round,line cap=round,thick
}}
-\setlength{\headheight}{14pt}
-\def\thesection{\arabic{section}}
+\pgfplotsset{compat=1.8}
+\ctikzset{capacitors/width=0.12,capacitors/height=0.3}
+\NewDocumentCommand\length{ O{} m m m m m }{%
+ \node [#1] at ($.5*($#3+#2$)$) {#4}#6
+ \draw [->|,thick] ($.5*($#3+#2+#5$)$) -- #3#6
+ \draw [->|,thick] ($.5*($#3+#2-#5$)$) -- #2#6
+}
+\NewDocumentCommand\wall{ m m m }{
+ \fill [pattern=north east lines] #1 rectangle #2#3
+ \draw [very thick,line cap=butt] let \p1=#1, \p2=#2 in (\x1,\y1) (\x2,\y2) (\x1,\y1) -- (\x2,\y1)#3
+}
-\RequirePackage{datetime}
-\yyyymmdddate
+\RequirePackage{tasks,lipsum,hologo,qrcode}
+\settasks{label=\sffamily\Alph*.,label-width=1.25em,item-indent=2em,label-offset=.25em}
+\hologoFontSetup{general=\sffamily}
+\def\pkg#1{\textcolor{DarkGreen}{\textsf{#1}}}
+\def\mode#1{\textcolor{Indigo}{\textsf{#1}}}
+\def\cmd#1{\textcolor{MidnightBlue}{\texttt{\string#1}}}
+
+\def\subtitle#1{\gdef\@subtitle{#1}}
+\def\bioinfo#1{\gdef\@bioinfo{#1}}
+\def\coverdecoration#1{\gdef\@coverdecoration{#1}}
+\def\cover#1{\gdef\@cover{#1}}
+\renewcommand*\maketitle{
+ \newgeometry{margin = 0in}
+ \tikz[remember picture,overlay]{
+ \fill [MidnightBlue!10] (current page.north west) rectangle (current page.south east);
+ \fill [white,opacity=.5] ($(current page.south west)+(.2*\paperwidth,.6*\paperheight)$) rectangle (current page.south east);
+ \fill [white,opacity=.5] ($(current page.south west)+(.3*\paperwidth,.7*\paperheight)$) rectangle (current page.south east);
+ \ifcsname @cover\endcsname
+ \node [opacity=.5] at ($(current page.south west)+(.65*\paperwidth,.3*\paperheight)$) {\includegraphics[height=.3\paperheight]{\@cover}};
+ \foreach \a in {0,1,...,50}
+ \fill [pattern=checkerboard,pattern color=MidnightBlue!10!white!50!white!50] ($(current page.south west)+(.3*\paperwidth,0)$) rectangle ++ (.7*\paperwidth,.6\paperheight);
+ \fi
+ \node [darkgray] at ($(current page.south west)+(.65*\paperwidth,.65*\paperheight)$) {\Huge\bfseries\@title};
+ \ifcsname @subtitle\endcsname
+ \node [rotate=90,gray!60] at ($(current page.south west)+(.25*\paperwidth,.3*\paperheight)$) {\huge\bfseries\@subtitle};
+ \fi
+ \ifcsname @coverdecoration\endcsname
+ \node[opacity=0.5,scale=2,color=MidnightBlue!40,rotate=15] at ($(current page.center)+(0,.35*\paperheight)$) {\@coverdecoration};
+ \fi
+ \ifcsname @bioinfo\endcsname
+ \node [gray!40] at ($(current page.south)+(.15*\paperwidth,.075*\paperheight)$) {\large\@bioinfo};
+ \fi
+ }\restoregeometry
+}
+
+\def\chapterimage#1{\gdef\@chapterimage{#1}}
+\def\@makechapterhead#1{%
+ \setcounter{section}{0}
+ \setcounter{problem}{0}
+ \setcounter{page}{1}{\centering
+ \ifcsname @chapterimage\endcsname
+ \@chapterimage
+ \fi\leavevmode\vskip-42\p@
+ \parindent \z@ \normalfont
+ \interlinepenalty\@M
+ \huge \bfseries #1\par\nobreak
+ \vskip 26\p@}}
+
+\def\mailto#1{\href{mailto:#1}{\ttfamily #1}}
+\def\thesection{\arabic{section}}
+\def\ans#1{\underline{~#1~}}
+\AddToHook{cmd/section/before}{\setcounter{problem}{0}}
-\def\watermark#1{\RequirePackage{wallpaper}\CenterWallPaper{0.5}{#1}}
\RequirePackage{fancyhdr}
-\def\sectionmark#1{\markright{#1}{}}
-\def\chaptermark#1{\markboth{#1}{}}
\pagestyle{fancy}
- \fancyhead[OL]{\scshape\sffamily\nouppercase\rightmark}
- \fancyhead[OR]{\thepage}
- \fancyhead[EL]{\thepage}
- \fancyhead[ER]{\scshape\sffamily\nouppercase\leftmark}
- \lfoot{}\cfoot{}\rfoot{}
-
-\RequirePackage[most]{tcolorbox}
-\RequirePackage{circuitikz,fontawesome5}
-\usetikzlibrary{arrows,tikzmark,patterns,calc}
-\RequirePackage{fadingimage}
-\tikzset{>=stealth',
-every picture/.append style={
- line join=round,
- line cap=round,
- thick
- }
-}
-\RequirePackage{pgfplots}
-\pgfplotsset{compat=1.9}
-\definecolor{headrulecolor}{HTML}{640125}
+ \let\oldheadrule\headrule
+ \renewcommand{\headrule}{{\color{gray}\oldheadrule}}
+ \renewcommand{\headrulewidth}{1pt}\cfoot{}
+ \fancyhead[OL]{\textsc{\color{darkgray}\nouppercase\leftmark}}
+ \fancyhead[OR]{\color{darkgray}\sffamily\thepage}
+ \fancyhead[ER]{\textsc{\color{darkgray}\nouppercase\rightmark}}
+ \fancyhead[EL]{\color{darkgray}\sffamily\thepage}
+ \setlength{\headheight}{14pt}
\RequirePackage{comment}
-\ifdefstring{\LITE@answer}{ans}{
- \def\solutionname{\small\faIcon{check-square}\normalsize~Solution}
+\ifdefstring{\LITE@answer}{ans}{%
\def\ans#1{\underline{~#1~}}
- \def\choiceans#1{~#1~}
- \def\solute#1{\relax}
+ \def\s@solute#1{\relax}\def\@solute#1{\relax}
+ \AtBeginDocument{%
+ \excludecomment{draft}
+ \let\enddraft\relax}
+ \def\true{%
+ \addtocounter{task}{1}%
+ \faIcon{check-circle}}
}{\relax}
-\ifdefstring{\LITE@answer}{noans}{
- \def\solutionname{\small\faIcon{pen-square}\normalsize~Answer}
+\ifdefstring{\LITE@answer}{noans}{%
\def\ans#1{\underline{\phantom{#1}}}
\def\choiceans#1{\phantom{#1}}
- \def\solute#1{\begin{draft}\leavevmode\vspace*{#1ex}\end{draft}}
- \AtBeginDocument{
- \excludecomment{solution}
- \let\endsolution\relax
+ \def\s@solute#1{\begin{draft}#1\end{draft}}
+ \def\@solute#1{\begin{draft}\leavevmode\vspace*{#1ex}\end{draft}}
+ \AtBeginDocument{%
+ \excludecomment{solution}\excludecomment{note}
+ \let\endsolution\relax\let\endnote\relax}
+ \def\true{%
+ \addtocounter{task}{1}%
+ \thetask
}
}{\relax}
-
-\definecolor{pkgcolor}{HTML}{006E54}
-\definecolor{moducolor}{HTML}{4D5AAF}
-\definecolor{cmdcolor}{HTML}{19727F}
-\RequirePackage[colorlinks,linkcolor=teal,urlcolor=pkgcolor]{hyperref}
-\def\pkg#1{\texorpdfstring{\textcolor{pkgcolor}{
- \href{https://ctan.org/pkg/#1}{\textsf{#1}}}}{“#1”}}
-\def\mode#1{\texorpdfstring{\textcolor{moducolor}{\textsf{#1}}}{“#1”}}
-\def\cmd#1{\texorpdfstring{\textcolor{cmdcolor}{\textsf{#1}}}{“#1”}}
-\NewDocumentCommand{\titlelogo}{ o m }{
- \leavevmode@ifvmode
- \IfNoValueTF{#1}{
- \lower\dimexpr\f@size\p@*1/10\hbox{\includegraphics[height={\f@size\p@}]{#2}}
- }{
- \lower\dimexpr\f@size\p@*1/10\hbox{\href{#1}{\includegraphics[height={\f@size\p@}]{#2}}}
- }
-}
-\pdfstringdefDisableCommands{%
- \def\titlelogo#1{<#1>}%
-}
-
-\AtBeginDocument{
- \setlength{\abovedisplayskip}{3pt}
- \setlength{\belowdisplayskip}{3pt}
-}
-\def\hmmax{0}\def\bmmax{0}
-\RequirePackage{amsmath,amssymb,amsthm,mathrsfs,tasks}
-\settasks{label=\Alph*.}
-\RequirePackage[libertine,mono=false]{newtx}
-\RequirePackage[e]{esvect}
-\RequirePackage{physics2,bm,fixdif,derivative,cancel,extarrows,siunitx,nicefrac,nicematrix}
-\usephysicsmodule{ab,braket,diagmat,doubleprod,xmat,ab.legacy,op.legacy}
-\RequirePackage[e]{esvect}
-\def\i{\mathrm i}\def\e{\mathrm e}\def\T{\mathsf T}
+\def\solute{\@ifstar\s@solute\@solute}
\newtheoremstyle{tags}{3pt}{3pt}{}{}{}{}{.5em}
- {\bfseries \thmname{#1} \thmnumber{#2}. \hfill \thmnote{\normalfont\small\faIcon{rss}\normalsize~#3}\\\leavevmode}
+ {\bfseries \thmname{#1} \thmnumber{#2}. \hfill \thmnote{\normalfont\faIcon{rss}~#3}\\\leavevmode}
\theoremstyle{tags}
-\newtheorem{problem}{\sffamily\scshape\color{pkgcolor}\small\faIcon{pen-square}\normalsize~Problem}[chapter]
-\def\theproblem{\arabic{problem}}
-
\theoremstyle{definition}
-\newtheorem*{solution}{\sffamily\scshape\color{moducolor}\solutionname}
-\newtheorem*{draft}{\sffamily\scshape\color{moducolor}\solutionname}
-\newtheorem*{note}{\sffamily\scshape\color{cmdcolor}\small\faIcon{info-circle}\normalsize~Note} \ No newline at end of file
+\newtheorem{problem}{\scshape\sffamily\color{DarkGreen}\faIcon{pen-square}~\scshape Problem}[chapter]
+\def\theproblem{\arabic{problem}}
+\newtheorem*{solution}{\scshape\sffamily\color{MidnightBlue}\faIcon{check-square}~\scshape Solution}
+\newtheorem*{draft}{\scshape\sffamily\color{MidnightBlue}\faIcon{check-square}~\scshape Solution}
+\newtheorem*{note}{\scshape\sffamily\color{DarkRed}\faIcon{info-circle}~\scshape Note} \ No newline at end of file
diff --git a/macros/latex/contrib/lscapeenhanced/LICENSE.md b/macros/latex/contrib/lscapeenhanced/LICENSE.md
new file mode 100644
index 0000000000..1863f2f61a
--- /dev/null
+++ b/macros/latex/contrib/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/macros/latex/contrib/lscapeenhanced/README.md b/macros/latex/contrib/lscapeenhanced/README.md
new file mode 100644
index 0000000000..d60cb80e9b
--- /dev/null
+++ b/macros/latex/contrib/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/macros/latex/contrib/lscapeenhanced/lscapeenhanced.dtx b/macros/latex/contrib/lscapeenhanced/lscapeenhanced.dtx
new file mode 100644
index 0000000000..91192b5d08
--- /dev/null
+++ b/macros/latex/contrib/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/macros/latex/contrib/lscapeenhanced/lscapeenhanced.pdf b/macros/latex/contrib/lscapeenhanced/lscapeenhanced.pdf
new file mode 100644
index 0000000000..27b0cacc0c
--- /dev/null
+++ b/macros/latex/contrib/lscapeenhanced/lscapeenhanced.pdf
Binary files differ