texlive[70395] Master: useclass (4mar24)
commits+karl at tug.org
commits+karl at tug.org
Mon Mar 4 22:11:16 CET 2024
Revision: 70395
https://tug.org/svn/texlive?view=revision&revision=70395
Author: karl
Date: 2024-03-04 22:11:15 +0100 (Mon, 04 Mar 2024)
Log Message:
-----------
useclass (4mar24)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/useclass/
trunk/Master/texmf-dist/doc/latex/useclass/README.md
trunk/Master/texmf-dist/doc/latex/useclass/useclass.pdf
trunk/Master/texmf-dist/source/latex/useclass/
trunk/Master/texmf-dist/source/latex/useclass/useclass.dtx
trunk/Master/texmf-dist/source/latex/useclass/useclass.ins
trunk/Master/texmf-dist/tex/latex/useclass/
trunk/Master/texmf-dist/tex/latex/useclass/useclass.sty
trunk/Master/tlpkg/tlpsrc/useclass.tlpsrc
Added: trunk/Master/texmf-dist/doc/latex/useclass/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/useclass/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/useclass/README.md 2024-03-04 21:11:15 UTC (rev 70395)
@@ -0,0 +1,26 @@
+# The `useclass.sty` Package: Use Classes as Packages
+
+## Introduction
+`useclass` is a package that enables the usage of classes as packages. It was originally designed for the `l3doc` class, which is employed for documenting LaTeX code with numerous useful features. However, employing the `l3doc` class as a package is not convenient when using the developing class as the style for the document. Therefore, this package provides a simple interface for utilizing classes as packages.
+
+## Usage
+Use `\useclass` to load a class with the same usage as `\usepackage`:
+```tex
+\useclass[<options>]{<class>}
+```
+where `<options>` and `<class>` are the options and the name of the loaded class, respectively.
+
+Example:
+```tex
+\usepackage{useclass}
+\useclass[full]{l3doc}
+```
+
+## License
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3
+of this license or (at your option) any later version.
+The latest version of this license is in
+ https://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX
+version 2008 or later.
Property changes on: trunk/Master/texmf-dist/doc/latex/useclass/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/useclass/useclass.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/useclass/useclass.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/useclass/useclass.pdf 2024-03-04 21:10:46 UTC (rev 70394)
+++ trunk/Master/texmf-dist/doc/latex/useclass/useclass.pdf 2024-03-04 21:11:15 UTC (rev 70395)
Property changes on: trunk/Master/texmf-dist/doc/latex/useclass/useclass.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/useclass/useclass.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/useclass/useclass.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/useclass/useclass.dtx 2024-03-04 21:11:15 UTC (rev 70395)
@@ -0,0 +1,250 @@
+% \iffalse meta-comment
+% !TEX program = pdfLaTeX
+%
+% DO NOT REMOVE THE MARK MANUALLY (used in l3build) -> %
+%
+%<*internal>
+\iffalse
+%</internal>
+%<*internal>
+\fi
+\begingroup
+ \def\nameofLaTeXe{LaTeX2e}
+\expandafter\endgroup\ifx\fmtname\nameofLaTeXe\else
+\csname fi\endcsname
+%</internal>
+%<*install>
+\input docstrip
+\keepsilent
+\askforoverwritefalse
+\preamble
+
+ Copyright (C) 2024 by HUANG Yuxi <useclass at hyxi.dev>
+
+ This work may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either
+ version 1.3 of this license or (at your option) any later
+ version. This version of this license is in
+ https://www.latex-project.org/lppl/lppl-1-3c.txt
+ and the latest version of this license is in
+ https://www.latex-project.org/lppl.txt
+ and version 1.3 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 of this work is HUANG Yuxi.
+
+\endpreamble
+\postamble
+
+ This work consists of the files \jobname.dtx
+ and the derived files \jobname.sty and \jobname.ins.
+
+\endpostamble
+
+\generate
+ {
+%</install>
+%<*internal>
+ \usedir{source/latex/useclass}
+ \file{\jobname.ins}{\from{\jobname.dtx}{install}}
+%</internal>
+%<*install>
+ \usedir{tex/latex/useclass}
+ \file{\jobname.sty}{\from{\jobname.dtx}{package}}
+ }
+\endbatchfile
+%</install>
+%<*internal>
+\fi
+%</internal>
+
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesExplPackage{useclass}
+%<package> {2024-03-04}{0.9}{Use Classes as Packages} %
+%<*driver>
+\documentclass{article}
+\usepackage{useclass}
+\useclass[full]{l3doc}
+\usepackage{mdframed}
+
+\providecommand{\pkgname}{\pkg{\jobname}}
+\begin{document}
+ \DocInput{\jobname.dtx}
+ \PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \title{The \pkgname.sty Package: Use Classes as Packages}
+% \author
+% {
+% Huang Yuxi
+% \thanks{
+% \textit{Huang} is his surname.
+% }
+% <^^A
+% \href
+% {mailto:useclass at hyxi.dev}
+% {useclass at hyxi.dev}^^A
+% >
+% }
+% \date{2024-03-04 \quad Version 0.9}
+%
+
+% \maketitle
+%
+%
+%
+% \begin{mdframed}
+% \textsf{TL;DR} \; Use \cs{useclass} to load a class with the same usage as \cs{usepackage}:
+% \begin{verbatim}
+% \usepackage{useclass}
+% \useclass[full]{l3doc}
+% \end{verbatim}
+% \end{mdframed}
+%
+% \tableofcontents
+%
+% \begin{documentation}
+%
+% \section{Introduction}
+%
+% \pkgname{} is a package that enables the usage of classes as packages. It was originally designed for the \cls{l3doc} class, which is employed for documenting \LaTeX{} code with numerous useful features. However, employing the \cls{l3doc} class as a package is not convenient when using the developing class as the style for the document. Therefore, this package provides a simple interface for utilizing classes as packages.
+% The package \pkgname{} was initially released on 2024-03-04, under the LaTeX Project Public License Version 1.3c^^A
+% \footnote{\url{https://www.latex-project.org/lppl/lppl-1-3c.txt}}
+% or later, and is maintained at \url{https://github.com/huangyxi/useclass}.
+%
+% \section{Usage}
+
+%
+% \begin{function}{\useclass}
+% \begin{syntax}
+ % \cs{useclass} \marg{class}
+% \cs{useclass} \oarg{options} \marg{class}
+% \end{syntax}
+% Load class with options, where \meta{options} is the options for the class and \meta{class} is the class name without the extension.
+% \end{function}
+%
+% Example for a \file{dtx} file:
+% \begin{mdframed}
+% \begin{verbatim}
+% % \iffalse
+% \documentclass{article}
+% \usepackage{l3doc}
+% \begin{document}
+% \DocInput{\jobname.dtx}
+% \end{document}
+% % \fi
+% %
+% % \section{Implementation}
+% % \begin{variable}{\l_demo_tl}
+% % \begin{macrocode}
+% \tl_new:N \l_demo_tl
+% % \end{macrocode}
+% % \end{variable}
+% \end{verbatim}
+% \end{mdframed}
+%
+% \end{documentation}
+%
+% \begin{implementation}
+%
+%
+% \section{\pkgname{} Implementation}
+% \begin{macrocode}
+%<@@=useclass>
+%<*package>
+% \end{macrocode}
+%
+%
+% \subsection{Variables}
+%
+% \begin{variable}{\@@_tempa_cs:w}
+% Temporary control sequence.
+% \begin{macrocode}
+\cs_new_eq:NN \@@_tempa_cs:w ?
+% \end{macrocode}
+% \end{variable}
+%
+% \subsection{Helpers}
+%
+% \begin{macro}{\@@_cs_swap:NN}
+% Define a helper function to swap two control sequences.
+% \begin{macrocode}
+\cs_new:Npn \@@_cs_swap:NN #1 #2
+ {
+ \cs_set_eq:NN \@@_tempa_cs:w #1
+ \cs_set_eq:NN #1 #2
+ \cs_set_eq:NN #2 \@@_tempa_cs:w
+ }
+% \end{macrocode}
+% \end{macro}
+% \subsection{Dependences loading}
+% \pkgname{} currently don't have any explicit dependences.
+%
+% \subsection{Patched Macros}
+%
+% \begin{macro}{\@@_LoadClass:n}
+% Patched \cs{LoadClass} to do nothing.
+% \begin{macrocode}
+\cs_new:Npn \@@_LoadClass:n #1 {}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Before Loading Class}
+%
+% \begin{macro}{\@@_use_before:}
+% These are the things to do before loading class.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_use_before:
+ {
+ \@@_cs_swap:NN \LoadClass \@@_LoadClass:n
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Loading Class}
+%
+% \begin{macro}{\@@_use_class:nn}
+% Load class with options.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_use_class:nn #1 #2
+ {
+ \@fileswithoptions\@clsextension[#1]{#2}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{After Loading Class}
+%
+% \begin{macro}{\@@_use_after:}
+% These are the things to do after loading class.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_use_after:
+ {
+ \@@_cs_swap:NN \LoadClass \@@_LoadClass:n
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{User Interface}
+% \begin{macro}{\useclass}
+% Load patch class with options.
+% \begin{macrocode}
+\NewDocumentCommand {\useclass} { O{} m }
+ {
+ \@@_use_before:
+ \@@_use_class:nn {#1} {#2}
+ \@@_use_after:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+
+% \end{implementation}
+% \PrintIndex
Property changes on: trunk/Master/texmf-dist/source/latex/useclass/useclass.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/useclass/useclass.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/useclass/useclass.ins (rev 0)
+++ trunk/Master/texmf-dist/source/latex/useclass/useclass.ins 2024-03-04 21:11:15 UTC (rev 70395)
@@ -0,0 +1,70 @@
+%%
+%% This is file `useclass.ins',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% useclass.dtx (with options: `install')
+%%
+%% Copyright (C) 2024 by HUANG Yuxi <useclass at hyxi.dev>
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any later
+%% version. This version of this license is in
+%% https://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and the latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3 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 of this work is HUANG Yuxi.
+%%
+\input docstrip
+\keepsilent
+\askforoverwritefalse
+\preamble
+
+ Copyright (C) 2024 by HUANG Yuxi <useclass at hyxi.dev>
+
+ This work may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either
+ version 1.3 of this license or (at your option) any later
+ version. This version of this license is in
+ https://www.latex-project.org/lppl/lppl-1-3c.txt
+ and the latest version of this license is in
+ https://www.latex-project.org/lppl.txt
+ and version 1.3 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 of this work is HUANG Yuxi.
+
+\endpreamble
+\postamble
+
+ This work consists of the files \jobname.dtx
+ and the derived files \jobname.sty and \jobname.ins.
+
+\endpostamble
+
+\generate
+ {
+ \usedir{tex/latex/useclass}
+ \file{\jobname.sty}{\from{\jobname.dtx}{package}}
+ }
+\endbatchfile
+
+
+
+ % \cs{useclass} \marg{class}
+
+%%
+%% This work consists of the files useclass.dtx
+%% and the derived files useclass.sty and useclass.ins.
+%%
+%%
+%% End of file `useclass.ins'.
Added: trunk/Master/texmf-dist/tex/latex/useclass/useclass.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/useclass/useclass.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/useclass/useclass.sty 2024-03-04 21:11:15 UTC (rev 70395)
@@ -0,0 +1,64 @@
+%%
+%% This is file `useclass.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% useclass.dtx (with options: `package')
+%%
+%% Copyright (C) 2024 by HUANG Yuxi <useclass at hyxi.dev>
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any later
+%% version. This version of this license is in
+%% https://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and the latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3 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 of this work is HUANG Yuxi.
+%%
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesExplPackage{useclass}
+ {2024-03-04}{0.9}{Use Classes as Packages} %
+
+
+ % \cs{useclass} \marg{class}
+\cs_new_eq:NN \__useclass_tempa_cs:w ?
+\cs_new:Npn \__useclass_cs_swap:NN #1 #2
+ {
+ \cs_set_eq:NN \__useclass_tempa_cs:w #1
+ \cs_set_eq:NN #1 #2
+ \cs_set_eq:NN #2 \__useclass_tempa_cs:w
+ }
+\cs_new:Npn \__useclass_LoadClass:n #1 {}
+\cs_new_protected:Npn \__useclass_use_before:
+ {
+ \__useclass_cs_swap:NN \LoadClass \__useclass_LoadClass:n
+ }
+\cs_new_protected:Npn \__useclass_use_class:nn #1 #2
+ {
+ \@fileswithoptions\@clsextension[#1]{#2}
+ }
+\cs_new_protected:Npn \__useclass_use_after:
+ {
+ \__useclass_cs_swap:NN \LoadClass \__useclass_LoadClass:n
+ }
+\NewDocumentCommand {\useclass} { O{} m }
+ {
+ \__useclass_use_before:
+ \__useclass_use_class:nn {#1} {#2}
+ \__useclass_use_after:
+ }
+
+%%
+%% This work consists of the files useclass.dtx
+%% and the derived files useclass.sty and useclass.ins.
+%%
+%%
+%% End of file `useclass.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/useclass/useclass.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 2024-03-04 21:10:46 UTC (rev 70394)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2024-03-04 21:11:15 UTC (rev 70395)
@@ -898,7 +898,7 @@
uol-physics-report uothesis uowthesis uowthesistitlepage
upca updatemarks uplatex upmendex upmethodology uppunctlm upquote
uptex-base uptex-fonts upzhkinsoku
- uri url urlbst urcls urwchancal usebib ushort uspace uspatent
+ uri url urlbst urcls urwchancal usebib useclass ushort uspace uspatent
ut-thesis utexasthesis utf8add utf8mex utfsym uvaletter
uwa-colours uwa-letterhead uwa-pcf uwa-pif uwmslide uwthesis
vak vancouver variablelm variations varindex varisize
Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc 2024-03-04 21:10:46 UTC (rev 70394)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc 2024-03-04 21:11:15 UTC (rev 70395)
@@ -1443,6 +1443,7 @@
depend upmethodology
depend upquote
depend uri
+depend useclass
depend ushort
depend uspace
depend utf8add
Added: trunk/Master/tlpkg/tlpsrc/useclass.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list.