texlive[67945] Master: floatrowbytocbasic (16aug23)
commits+karl at tug.org
commits+karl at tug.org
Wed Aug 16 21:43:47 CEST 2023
Revision: 67945
http://tug.org/svn/texlive?view=revision&revision=67945
Author: karl
Date: 2023-08-16 21:43:47 +0200 (Wed, 16 Aug 2023)
Log Message:
-----------
floatrowbytocbasic (16aug23)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/libexec/ctan2tds
trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/floatbytocbasic/
trunk/Master/texmf-dist/doc/latex/floatbytocbasic/LICENSE.md
trunk/Master/texmf-dist/doc/latex/floatbytocbasic/README.md
trunk/Master/texmf-dist/doc/latex/floatbytocbasic/floatbytocbasic.pdf
trunk/Master/texmf-dist/source/latex/floatbytocbasic/
trunk/Master/texmf-dist/source/latex/floatbytocbasic/floatbytocbasic.dtx
trunk/Master/texmf-dist/tex/latex/floatbytocbasic/
trunk/Master/texmf-dist/tex/latex/floatbytocbasic/floatbytocbasic.sty
trunk/Master/tlpkg/tlpsrc/floatbytocbasic.tlpsrc
Added: trunk/Master/texmf-dist/doc/latex/floatbytocbasic/LICENSE.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/floatbytocbasic/LICENSE.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/floatbytocbasic/LICENSE.md 2023-08-16 19:43:47 UTC (rev 67945)
@@ -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.
+
+----------------------------------------------------------------------------
Property changes on: trunk/Master/texmf-dist/doc/latex/floatbytocbasic/LICENSE.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/floatbytocbasic/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/floatbytocbasic/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/floatbytocbasic/README.md 2023-08-16 19:43:47 UTC (rev 67945)
@@ -0,0 +1,152 @@
+# Package `floatbytocbasic`
+
+Copyright © 2008–2023 Markus Kohm
+
+Release: 2023-08-16 v1.0
+
+License: LPPL 1.3c
+
+KOMA presents the `floatbytocbasic` package to extend the functionality of
+package [`float`](https://ctan.org/pkg/float). The `floatbytocbasic`
+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.
+
+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
+`floatbytocbasic` is such an enhancement package. It provides additional
+features of using package [`tocbasic`](https://ctan.org/pkg/tocbasic) by
+patching package [`float`](https://ctan.org/pkg/float).
+
+# 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/floatbytocbasic). This consists in:
+
+* `floatbytocbasic.dtx`
+* `README.md`
+* `LICENSE.md`
+* `floatbytocbasic.pdf`
+
+If distributors also want to distribute `floatbytocbasic.sty`, they can
+unpack it using
+
+ tex floatbytocbasic.dtx
+
+Note, that you have to use `tex` not `latex`, `pdflatex`, `xelatex` or
+`lualatex`!
+
+Note also, that a legal distribution consists at least in:
+
+* `floatbytocbasic.dtx`
+* `README.md`
+
+The following files are optionally, but must not be distributed without the
+previous ones:
+
+* `LICENSE.md`
+* `floatbytocbasic.sty`
+* `floatbytocbasic.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
+`floatbytocbasic` only run the same command from within the
+`floatbytocbasic` 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 floatbytocbasic
+
+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
+`floatbytocbasic` 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.
Property changes on: trunk/Master/texmf-dist/doc/latex/floatbytocbasic/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/floatbytocbasic/floatbytocbasic.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/floatbytocbasic/floatbytocbasic.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/floatbytocbasic/floatbytocbasic.pdf 2023-08-16 19:41:08 UTC (rev 67944)
+++ trunk/Master/texmf-dist/doc/latex/floatbytocbasic/floatbytocbasic.pdf 2023-08-16 19:43:47 UTC (rev 67945)
Property changes on: trunk/Master/texmf-dist/doc/latex/floatbytocbasic/floatbytocbasic.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/floatbytocbasic/floatbytocbasic.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/floatbytocbasic/floatbytocbasic.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/floatbytocbasic/floatbytocbasic.dtx 2023-08-16 19:43:47 UTC (rev 67945)
@@ -0,0 +1,542 @@
+% \iffalse meta-comment
+% ======================================================================
+% floatbytocbasic.dtx
+% Copyright © 2008–2023 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.
+%
+% The Current Maintainer and author of this work is Markus Kohm.
+%
+% This work consists of the file `floatbytocbasic.dtx' and `README.md'.
+%
+% The recommended way to install `floatbytocbasic' is to use
+% the package manager of your TeX distribution.
+% ======================================================================
+%
+%<*dtx>
+\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
+\ProvidesFile{floatbytocbasic.dtx}
+%</dtx>
+%<*dtx|package>
+%<package>\ProvidesPackage{floatbytocbasic}
+ [2023-08-16 v1.0
+%<dtx> sources and unpack driver of
+ improved float package using tocbasic]
+%</dtx|package>
+%<*dtx>
+\ifx\documentclass\undefined
+ \input docstrip.tex
+ \generate{%
+ \file{floatbytocbasic.sty}{%
+ \from{floatbytocbasic.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}
+ at online{pkg:float,
+ author={Anselm Lingnau},
+ title={\pkg*{float} --- Improved interface for floating objects},
+ version={1.3d},
+ date={2001-11-08},
+ url={https://ctan.org/pkg/float},
+ urldate={2023-07-14},
+ note={Improves the interface for defining floating objects such as figures
+ and tables. Introduces the boxed float, the ruled float and the
+ plaintop float. You can define your own floats and improve the
+ behaviour of the old ones.},
+}
+ at manual{pkg:float:manual,
+ author={Anselm Lingnau},
+ date={2001-11-08},
+ title={An Improved Environment for Floats},
+ url={http://mirrors.ctan.org/macros/latex/contrib/float/float.pdf},
+ urldate={2023-07-14},
+ abstract={This style option improves the interface for defining floating
+ objects such as figures and tables in \LaTeX. It adds the notion
+ of a ‘float style’ that governs appearance of floats. New kinds of
+ floats may be defined using \cs{newfloat} command analogous to
+ \cs{newtheorem}. This style option also incorporates the
+ functionality of David Carlisle’s style option \pkg{here}, giving
+ floating environments a \texttt{[H]} option which means ‘PUT IT
+ HERE’ (as opposed to the standard \texttt{[h]} option which means
+ ‘You may put it here if you like’).},
+}
+ at 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}.},
+}
+ at 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 = {},
+}
+ at 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.},
+}
+ at 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.},
+}
+ at online{pkg:tocbasic,
+ author={Markus Kohm},
+ version={3.41},
+ date={2023-07-07},
+ title={\pkg*{tocbasic} --- Management of tables/lists of contents (and the
+ like)},
+ url={https://ctan.org/pkg/tocbasic},
+ urldate={2023-07-14},
+ note={The package provides means to create specialised ``table of
+ contents''-like lists of features of a document.},
+}
+ at 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},
+}
+ at 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:float,pkg:koma-script,pkg:tocbasic}
+ \DocInput{floatbytocbasic.dtx}
+\end{document}
+%</dtx>
+%\fi
+%
+% \changes{v0.1}{2023/06/01}{start of \KOMAScript{} spin-off}
+% \changes{v1.0}{2023/08/19}{first package release}
+%
+% \GetFileInfo{floatbytocbasic.dtx}
+% \title{Improving Package \pkg{float} Using
+% \href{https://komascript.de/}{\KOMAScript} Package \pkg{tocbasic}}
+% \author{\href{mailto:komascript at gmx.info}{Markus Kohm}}
+% \date{Version \filedate{} \fileversion}
+% \maketitle
+% \begin{abstract}
+% Package \pkg*{floatbytocbasic} has started as hack module of the
+% \KOMAScript{} package \pkg*{scrhack} years ago to fix an issue when using
+% package \pkg{float} with \KOMAScript~3. This became necessary because
+% package \pkg{float} still depends on an interface once proposed by the
+% \KOMAScript{} author, but which has long since failed to meet
+% requirements. Unfortunately, this problem could not be solved in dialog
+% with the author of \pkg{float}. Although \pkg*{floatbytocbasic} still
+% loads the \pkg{float} package, it then changes some internal commands to
+% use and optimally support the \KOMAScript{} package \pkg{tocbasic}. On the
+% one hand, the user interface of \pkg{float} remains usable unchanged, but
+% at the same time the package benefits from many possibilities of
+% \pkg{tocbasic}.
+% \end{abstract}
+%
+% \tableofcontents
+%
+%\iffalse
+%<*doc>
+%\fi
+\section{Why should I use this package instead of
+ \texorpdfstring{\pkg{float}}{float} only if I use a \KOMAScript{} class or
+ \KOMAScript{} package \texorpdfstring{\pkg{tocbasic}}{tocbasic}?}
+\label{sec:whywithkomascript}
+
+The main symptom of using a deprecated interface to \KOMAScript{} by package
+\pkg{float}, namely the use of \cs{float at listhead} and
+\cs{float at addtolists}, are corresponding warnings when using one of the
+\KOMAScript{} classes at the same time, for example:
+\begin{verbatim}
+ Class scrbook Warning: \float at addtolists detected!
+ (scrbook) Implementation of \float at addtolist became
+ (scrbook) deprecated in KOMA-Script v3.01 2008/11/14 and
+ (scrbook) has been replaced by several more flexible
+ (scrbook) features of package `tocbasic`.
+ (scrbook) Since Version 3.12 support for deprecated
+ (scrbook) \float at addtolist interface has been
+ (scrbook) restricted to only some of the KOMA-Script
+ (scrbook) features and been removed from others.
+ (scrbook) Loading of package `scrhack' may help to
+ (scrbook) avoid this warning, if you are using a
+ (scrbook) a package that still implements the
+ (scrbook) deprecated \float at addtolist interface.
+\end{verbatim}
+or
+\begin{verbatim}
+ Class scrbook Warning: \float at listhead detected!
+ (scrbook) Implementation of \float at listhead became
+ (scrbook) deprecated in KOMA-Script v3.01 2008/11/14 and
+ (scrbook) has been replaced by several more flexible
+ (scrbook) features of package `tocbasic`.
+ (scrbook) Maybe implementation of \float at listhead will
+ (scrbook) removed from KOMA-Script soon.
+ (scrbook) Loading of package `scrhack' may help to
+ (scrbook) avoid this warning, if you are using a
+ (scrbook) a package that still implements the
+ (scrbook) deprecated \float at listhead interface.
+\end{verbatim}
+
+If you know, that the issue is because of loading package \pkg{float} you can
+avoid it using \pkg{floatbytocbasic} as explained in \autoref{sec:howtouse}.
+
+\section{Why should I use this package instead of
+ \texorpdfstring{\pkg{float}}{float} only if I don't use a \KOMAScript{}
+ class or package?}
+\label{sec:whywithoutkomascript}
+
+Package \pkg{float} does not check if a file extension or environment already
+has been defined when using \cs{newfloat}. So several definitions of float
+environments either with the same name or the same file extension could happen
+by accident. Package \pkg*{floatbytocbasic} adds test to avoid such
+issues. Alternatively you can force the definition or do the definition only
+if needed. See description of \cs{deffloat}, \cs{renewfloat} and
+\cs{providefloat} in \autoref{sec:howtouse} for more information.
+
+Package \pkg{tocbasic} provides several additional features, e.g.:
+\begin{itemize}
+\item automatic handling of language switching using \pkg{babel},
+\item optional numbered heading for a list/table of contents,
+\item optional adding an entry to the table of contents for a list/table of
+ contents even if the heading is not numbered,
+\item easy configuration of entries to a list/table of contents.
+\end{itemize}
+Several more features can be added by the class or other packages. See section
+about \pkg*{tocbasic} in the \KOMAScript{} manual, either
+\autocite{pkg:koma-script:manual:en} or \autocite{pkg:koma-script:manual:de}.
+
+\section{How to use \texorpdfstring{\pkg*{floatbytocbasic}}{floatbytocbasic}}
+\label{sec:howtouse}
+
+In the document preamble of your document you just can replace
+\begin{verbatim}
+ \usepackage{float}
+\end{verbatim}
+by
+\begin{verbatim}
+ \usepackage{floatbytocbasic}
+\end{verbatim}
+to load package \pkg*{floatbytocbasic}. This does still also load package
+\pkg{float} but additionally patches several commands of \pkg{float} to avoid
+the issues shown in \autoref{sec:whywithkomascript}.
+
+If you want you can alternatively also load both packages explicitly, either
+\pkg{float} before \pkg{floatbytocbasic} or---if you
+want---\pkg{floatbytocbasic} before \pkg{float}. This is also useful, if you
+use a package, that uses \pkg*{float} itself. In this case, you always should
+load \pkg{floatbytocbasic} \emph{before} the package, that uses
+\pkg{float}. Otherwise it is very likely that for some new float environments
+the enhancements of \pkg*{floatbytocbasic} will not be used. Only if
+\pkg*{floatbytocbasic} is loaded before the first use of \cs{newfloat} can it
+be ensured that the definition of the new sliding environments is really done
+with the help of \pkg{tocbasic} and thus its extended user interface is used.
+
+When using a class that uses \pkg{float}, the correct operation can be ensured
+with
+\begin{verbatim}
+ \AddToHook{package/float/after}{\RequirePackage{floatbytocbasic}}
+\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{float}{\RequirePackage{floatbytocbasic}}
+\end{verbatim}
+also before \cs{documentclass}. This would require the \KOMAScript{} package
+\pkg{scrlfile}\nocite{pkg:scrlfile}.
+
+\begin{description}
+ \item[Note:] You \emph{should not} load \pkg*{float} after loading package
+ \pkg*{floatrow}. However, if you do, \pkg{floatrowbytocbasic} will be
+ loaded automatically.
+\end{description}
+
+The user interface of \pkg*{floatbytocbasic} is the same as of \pkg{float},
+see \autocite{pkg:float:manual}. Following we document only the differences.
+
+\DescribeCommand{\newfloat}
+\DescribeCommand{\providefloat}
+\DescribeCommand{\renewfloat}
+\DescribeCommand{\deffloat}
+See \autocite[section~2]{pkg:float:manual} for the basic usage of \cs{newfloat}.
+The command takes three mandatory arguments and an optional one; it is of
+the form:
+\begin{quote}
+ \cs{newfloat}\marg{type}\marg{placement}\marg{ext}\oarg{within}
+\end{quote}
+\pkg{floatbytocbasic} adds the registration of the file extension \meta{ext},
+which is the third argument. The main problem here is to decide what to do, if
+\meta{ext} already has been registered. Package \pkg{float} simply does not
+care for this case. It does neither report an error nor a warning, but just
+redefine the float \meta{type} and reuses the auxiliary file extension
+\meta{ext}. Because of the ``\texttt{new}'' in the name of the command, we
+have decided to do it a little bit different. If the owner of the \meta{ext}
+is \texttt{float}, it is assumed, that using the same auxiliary file is
+intended and only an info is written to the \file{log}-file. Otherwise an
+error is reported. But we also decided to define three new commands:
+\begin{quote}\raggedright
+ \cs{deffloat}\marg{type}\marg{placement}\marg{ext}\oarg{within}\\
+ \cs{providefloat}\marg{type}\marg{placement}\marg{ext}\oarg{within}\\
+ \cs{renewfloat}\marg{type}\marg{placement}\marg{ext}\oarg{within}
+\end{quote}
+\cs{deffloat} also does not care for already existing \meta{type} environment
+or already registered \meta{ext}. \cs{providefloat} does not overwrite
+existing \meta{type} environment or already registered \meta{ext} for other
+owners but \texttt{float}. \cs{renewfloat} does overwrite only already
+existing \meta{type} environment with registered \meta{ext}. There are also
+cases like defined \cs{\meta{type}} but not \cs{end\meta{type}} or not defined
+environment \meta{type} but registered \meta{ext}. But there are no special
+commands to handle these. If users need to take care for these cases, they can
+test for definition using the \LaTeX{} kernel macro \cs{@ifundefined} and the
+\pkg{tocbasic} command \cs{Ifattoclist}, described in the \KOMAScript{} user
+manuals \autocite{pkg:koma-script:manual:en}
+resp. \autocite{pkg:koma-script:manual:de}.
+%
+% \iffalse
+%</doc>
+% \fi
+%
+% \MaybeStop{\printbibliography[heading=bibintoc]\PrintIndex}
+%
+% \iffalse
+%<*package>
+% \fi
+% \section{Implementation}
+%
+% \pkg{floatbytocbasic} depend on \KOMAScript{} package \pkg{tocbasic}. So we
+% load it already before everything else. We use this package also to require
+% at least \KOMAScript{} 3.41, which is one version before the intended
+% spin-off.
+% \begin{macrocode}
+\@ifpackageloaded{floatrow}{%
+ \PackageWarning{floatbytocbasic}{%
+ package incompatible with package floatrow.\MessageBreak
+ Automatically using floatrowbytocbasic%
+ }%
+ \RequirePackage{floatrowbytocbasic}%
+ \endinput
+}{}
+\RequirePackage{tocbasic}[2023/07/07]
+% \end{macrocode}
+%
+% We also load package \pkg{float}, because we reuse most of the code:
+% \begin{macrocode}
+\RequirePackage{float}
+% \end{macrocode}
+%
+% As often as possible, we do not redefine macors of \pkg{float}, but patch
+% them using \pkg{xpatch}\nocite{pkg:xpatch}:
+% \begin{macrocode}
+\RequirePackage{xpatch}
+% \end{macrocode}
+%
+% We also use the new document command interface. So if the \LaTeX{} kernel is
+% too old, we require \pkg{xparse}:
+% \begin{macrocode}
+\@ifundefined{NewDocumentCommand}{%
+ \RequirePackage{xparse}%
+}{}
+% \end{macrocode}
+%
+% \begin{command}{\deffloat}
+% Basicly \cs{deffloat} is \cs{newfloat} of \pkg{float}:
+% \begin{macrocode}
+\@ifundefined{NewCommandCopy}{\let\deffloat\newfloat}{%
+ \NewCommandCopy\deffloat\newfloat
+}
+% \end{macrocode}
+% But we also have to take care, that a not yet registered \meta{ext} has to
+% be registered.
+% \begin{description}
+% \item[Note:] We do not need to setup feature \texttt{chapteratlist}, because
+% classes like the \KOMAScript{} classes should use
+%\begin{verbatim}
+% \AtAddToTocList[float]{\setuptoc{\@currext}{chapteratlist}}
+%\end{verbatim}
+% to implement such features.
+% \end{description}
+% \begin{macrocode}
+\xpretocmd\deffloat{%
+ \Ifattoclist{#3}{%
+ \let\reserved at a\relax
+ \owneroftoc[\def\reserved at a]{#3}\relax
+ \@ifundefined{reserved at a}{}{%
+ \Ifstr{\reserved at a}{float}{%
+ \PackageInfo{floatbytocbasic}{%
+ reusing file extension `#3' for\MessageBreak
+ float type `#1'%
+ }%
+ }{%
+ \PackageWarning{floatbytocbasic}{%
+ reusing file extension `#3' of owner\MessageBreak
+ `\reserved at a' for float `#1'\MessageBreak
+ not recommended%
+ }%
+ }%
+ }%
+ }{\addtotoclist[float]{#3}}%
+}{}{%
+ \PackageError{floatbytocbasic}{incompatible definition of
+ \string\newfloat}{%
+ Package `floatbytocbasic' depends on the original definition of package
+ `float'.\MessageBreak
+ Some changes to that definition are tolerated.\MessageBreak
+ \@ifundefined{deffloat}%
+ {But it seems the definition is completely missing!}%
+ {But the current definition is incompatible!}%
+ \MessageBreak
+ Make sure, you have installed the original package `float' as referred
+ by\Messagebreak
+ section ``References'' of the manual.%
+ }%
+}
+% \end{macrocode}
+% \end{command}
+%
+% \begin{command}{\newfloat,\providefloat,\renewfloat}
+% \cs{newfloat} and \cs{renewfloat} similar to \cs{newcommand} and
+% \cs{renewcommand} do some tests and maybe report an error, before
+% (nevertheless) defining the float.
+% \begin{macrocode}
+\RenewDocumentCommand{\newfloat}{mmmo}{%
+ \@tempswatrue
+ \Ifattoclist{#3}{%
+ \let\reserved at a\relax
+ \owneroftoc[\def\reserved at a]{#3}\relax
+ \@ifundefined{reserved at a}{}{%
+ \Ifstr{\reserved at a}{float}{}{%
+ \PackageError{floatbytocbasic}{%
+ reusing `#3' of owner `\reserved at a' not allowed%
+ }{%
+ Each file extension should be used only once.\MessageBreak
+ Reusing is only allowed with the same owner/category.\MessageBreak
+ You, the class, or another package already uses `#3'.\MessageBreak
+ \@eha
+ }%
+ \@tempswafalse
+ }%
+ }%
+ }{}%
+ \if at tempswa
+ \expandafter\@ifdefinable\csname #1\endcsname{%
+ \IfValueTF{#4}{%
+ \deffloat{#1}{#2}{#3}[#4]%
+ }{%
+ \deffloat{#1}{#2}{#3}%
+ }%
+ }%
+ \fi
+}
+\NewDocumentCommand{\providefloat}{mmmo}{%
+ \@ifundefined{#1}{%
+ \newfloat{#1}{#2}{#3}[#4]%
+ }{}%
+}
+\NewDocumentCommand{\renewfloat}{mmmo}{%
+ \@ifundefined{#1}{%
+ \@latex at error{Environment #1 undefined}\@ehc
+ \removefromtoclist{#3}%
+ }{%
+ \Ifattoclist{#3}{%
+ \removefromtoclist{#3}%
+ }{%
+ \PackageError{floatbytocbasic}{extension `#3' not yet registered}{%
+ I can only renew floats with already registered
+ extensions.\MessageBreak
+ \@ehc
+ }%
+ }%
+ }%
+ \expandafter\let\csname #1\endcsname\relax
+ \expandafter\let\csname end#1\endcsname\relax
+ \newfloat{#1}{#2}{#3}[#4]%
+}
+% \end{macrocode}
+% \end{command}
+%
+% \begin{command}{\listof}
+% This command is redefined using a complete new definition using
+% \pkg{tocbasic}'s \cs{listoftoc}.
+% \begin{macrocode}
+\renewcommand*\listof[2]{%
+ \@ifundefined{ext@#1}{%
+ \PackageError{floatbytocbasic}{unknown float type `#1'}\@eha
+ }{%
+ \@ifundefined{l@#1}{\expandafter\let\csname l@#1\endcsname\l at figure
+ \@ifundefined{l@#1}{%
+ \DeclareTOCStyleEntry[level=1,numwidth=2.3em,indent=1.5em]
+ {default}{#1}%
+ }{}%
+ }{}%
+ \listoftoc[{#2}]{\csname ext@#1\endcsname}%
+ }%
+}%
+% \end{macrocode}
+% \end{command}
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
+% \PrintChanges
+%
+% \endinput
+% Local Variables:
+% mode: doctex
+% ispell-local-dictionary: "en_US"
+% eval: (flyspell-mode 1)
+% TeX-master: t
+% End:
Property changes on: trunk/Master/texmf-dist/source/latex/floatbytocbasic/floatbytocbasic.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/floatbytocbasic/floatbytocbasic.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/floatbytocbasic/floatbytocbasic.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/floatbytocbasic/floatbytocbasic.sty 2023-08-16 19:43:47 UTC (rev 67945)
@@ -0,0 +1,145 @@
+%%
+%% This is file `floatbytocbasic.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% floatbytocbasic.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 floatbytocbasic.sty.
+%%
+%% For distribution of the original source see the terms
+%% for copying and modification in the file floatbytocbasic.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{floatbytocbasic}
+ [2023-08-16 v1.0
+ improved float package using tocbasic]
+\@ifpackageloaded{floatrow}{%
+ \PackageWarning{floatbytocbasic}{%
+ package incompatible with package floatrow.\MessageBreak
+ Automatically using floatrowbytocbasic%
+ }%
+ \RequirePackage{floatrowbytocbasic}%
+ \endinput
+}{}
+\RequirePackage{tocbasic}[2023/07/07]
+\RequirePackage{float}
+\RequirePackage{xpatch}
+\@ifundefined{NewDocumentCommand}{%
+ \RequirePackage{xparse}%
+}{}
+\@ifundefined{NewCommandCopy}{\let\deffloat\newfloat}{%
+ \NewCommandCopy\deffloat\newfloat
+}
+\xpretocmd\deffloat{%
+ \Ifattoclist{#3}{%
+ \let\reserved at a\relax
+ \owneroftoc[\def\reserved at a]{#3}\relax
+ \@ifundefined{reserved at a}{}{%
+ \Ifstr{\reserved at a}{float}{%
+ \PackageInfo{floatbytocbasic}{%
+ reusing file extension `#3' for\MessageBreak
+ float type `#1'%
+ }%
+ }{%
+ \PackageWarning{floatbytocbasic}{%
+ reusing file extension `#3' of owner\MessageBreak
+ `\reserved at a' for float `#1'\MessageBreak
+ not recommended%
+ }%
+ }%
+ }%
+ }{\addtotoclist[float]{#3}}%
+}{}{%
+ \PackageError{floatbytocbasic}{incompatible definition of
+ \string\newfloat}{%
+ Package `floatbytocbasic' depends on the original definition of package
+ `float'.\MessageBreak
+ Some changes to that definition are tolerated.\MessageBreak
+ \@ifundefined{deffloat}%
+ {But it seems the definition is completely missing!}%
+ {But the current definition is incompatible!}%
+ \MessageBreak
+ Make sure, you have installed the original package `float' as referred
+ by\Messagebreak
+ section ``References'' of the manual.%
+ }%
+}
+\RenewDocumentCommand{\newfloat}{mmmo}{%
+ \@tempswatrue
+ \Ifattoclist{#3}{%
+ \let\reserved at a\relax
+ \owneroftoc[\def\reserved at a]{#3}\relax
+ \@ifundefined{reserved at a}{}{%
+ \Ifstr{\reserved at a}{float}{}{%
+ \PackageError{floatbytocbasic}{%
+ reusing `#3' of owner `\reserved at a' not allowed%
+ }{%
+ Each file extension should be used only once.\MessageBreak
+ Reusing is only allowed with the same owner/category.\MessageBreak
+ You, the class, or another package already uses `#3'.\MessageBreak
+ \@eha
+ }%
+ \@tempswafalse
+ }%
+ }%
+ }{}%
+ \if at tempswa
+ \expandafter\@ifdefinable\csname #1\endcsname{%
+ \IfValueTF{#4}{%
+ \deffloat{#1}{#2}{#3}[#4]%
+ }{%
+ \deffloat{#1}{#2}{#3}%
+ }%
+ }%
+ \fi
+}
+\NewDocumentCommand{\providefloat}{mmmo}{%
+ \@ifundefined{#1}{%
+ \newfloat{#1}{#2}{#3}[#4]%
+ }{}%
+}
+\NewDocumentCommand{\renewfloat}{mmmo}{%
+ \@ifundefined{#1}{%
+ \@latex at error{Environment #1 undefined}\@ehc
+ \removefromtoclist{#3}%
+ }{%
+ \Ifattoclist{#3}{%
+ \removefromtoclist{#3}%
+ }{%
+ \PackageError{floatbytocbasic}{extension `#3' not yet registered}{%
+ I can only renew floats with already registered
+ extensions.\MessageBreak
+ \@ehc
+ }%
+ }%
+ }%
+ \expandafter\let\csname #1\endcsname\relax
+ \expandafter\let\csname end#1\endcsname\relax
+ \newfloat{#1}{#2}{#3}[#4]%
+}
+\renewcommand*\listof[2]{%
+ \@ifundefined{ext@#1}{%
+ \PackageError{floatbytocbasic}{unknown float type `#1'}\@eha
+ }{%
+ \@ifundefined{l@#1}{\expandafter\let\csname l@#1\endcsname\l at figure
+ \@ifundefined{l@#1}{%
+ \DeclareTOCStyleEntry[level=1,numwidth=2.3em,indent=1.5em]
+ {default}{#1}%
+ }{}%
+ }{}%
+ \listoftoc[{#2}]{\csname ext@#1\endcsname}%
+ }%
+}%
+\endinput
+%%
+%% End of file `floatbytocbasic.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/floatbytocbasic/floatbytocbasic.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2023-08-16 19:41:08 UTC (rev 67944)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2023-08-16 19:43:47 UTC (rev 67945)
@@ -341,7 +341,7 @@
fixltxhyph fixmath fixme fixmetodonotes fixpdfmag fiziko
fjodor
flabels flacards flagderiv flashcards flashmovie flexipage flipbook flippdf
- float floatflt floatrow
+ float floatbytocbasic floatflt floatrow floatrowbytocbasic
flowchart flowfram fltpoint
fmp fmtcount
fn2end fnbreak fncychap fncylab fnpara fnpct fnspe fntproof fnumprint
Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds 2023-08-16 19:41:08 UTC (rev 67944)
+++ trunk/Master/tlpkg/libexec/ctan2tds 2023-08-16 19:43:47 UTC (rev 67945)
@@ -3199,6 +3199,8 @@
'fei' => 'tex',
'fge' => 'latex', # requires interaction
'fixdif' => 'etex-answer-y',
+ 'floatbytocbasic' => 'etex',
+ 'floatrowbytocbasic' => 'etex',
'fontsize' => 'latex',
'g-brief' => 'latex', # requires interaction
'gbt7714' => 'xelatex',
Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc 2023-08-16 19:41:08 UTC (rev 67944)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc 2023-08-16 19:43:47 UTC (rev 67945)
@@ -527,8 +527,10 @@
depend flexipage
depend flipbook
depend flippdf
+depend floatbytocbasic
depend floatflt
depend floatrow
+depend floatrowbytocbasic
depend flowfram
depend fmp
depend fmtcount
Added: trunk/Master/tlpkg/tlpsrc/floatbytocbasic.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list.