diff options
author | Norbert Preining <norbert@preining.info> | 2022-07-31 03:01:27 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-07-31 03:01:27 +0000 |
commit | 0d7064c66024537b237407f8b36413b055cf9a9a (patch) | |
tree | 51b6aa534418af1b4b49ccd1dffa32165100b8fe /macros/latex/contrib/bxenclose | |
parent | ab0990ca5f58ea10d38cc1760dbcbbd832626f40 (diff) |
CTAN sync 202207310301
Diffstat (limited to 'macros/latex/contrib/bxenclose')
-rw-r--r-- | macros/latex/contrib/bxenclose/LICENSE | 27 | ||||
-rw-r--r-- | macros/latex/contrib/bxenclose/README.md | 60 | ||||
-rw-r--r-- | macros/latex/contrib/bxenclose/bxenclose.sty | 126 |
3 files changed, 0 insertions, 213 deletions
diff --git a/macros/latex/contrib/bxenclose/LICENSE b/macros/latex/contrib/bxenclose/LICENSE deleted file mode 100644 index 49f803e083..0000000000 --- a/macros/latex/contrib/bxenclose/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -$BK\%=%U%H%&%'%"$O(B MIT $B%i%$%;%s%9$N2<$GG[I[$5$l$^$9!#(B -$BCx:n8"$O:n<T$G$"$k!VH,EP(B $B?rG7!JJLL>(B ZR$B!K!W$KB0$7$^$9!#(B -$B$^$?K\%=%U%H%&%'%"$OL5J]>Z$G$9!#(B - -This software is distributed under the MIT License. - -The MIT License - -Copyright (c) 2016 Takayuki YATO (aka. "ZR") - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/macros/latex/contrib/bxenclose/README.md b/macros/latex/contrib/bxenclose/README.md deleted file mode 100644 index e60047f76d..0000000000 --- a/macros/latex/contrib/bxenclose/README.md +++ /dev/null @@ -1,60 +0,0 @@ -BXenclose Package -================= - -LaTeX: To enclose the document body with some pieces of code - -The package enables authors to designate in the preamble to make the -document body enclosed with the given pieces of code. As is known, -there are already various mechanisms provided by LaTeX kernel or -packages that attach “hooks” at the beginning and end of documents. -This package tries harder to win the race, that is, place the given -code as close to the real document body as possible. - -### System requirement - - * TeX format: LaTeX. - * TeX engine: Anything. - * Dependent packages: None. - -### Installation - - - `*.sty` → $TEXMF/tex/latex/BXenclose - -### License - -This package is distributed under the MIT License. - -The bxenclose Package ---------------------- - -### Package Loading - - \usepackage{bxenclose} - -No options are available. - -### Usage - -This package defines the following single command: - - \enclosebodywith{<begin>}{<end>} - -This command makes the document body enclosed with `<begin>` and -`<end>`. That is, `<begin>` is executed immediately before the body -text (probably after other “begin-document hooks” provided by LaTeX -itself and other packages) and `<end>` is executed immediately after -the body text (probably before other “end-document hooks”). - -Note that both `<begin>` and `<end>` code are treated as part of the -document body. In particular, `<begin>` code cannot contain any -preamble-restricted commands (such as `\listfiles`). - -Revision History ----------------- - - * Version 0.2 〈2016/04/01〉 - - The first public version. - --------------------- -Takayuki YATO (aka. "ZR") -http://zrbabbler.sp.land.to/ diff --git a/macros/latex/contrib/bxenclose/bxenclose.sty b/macros/latex/contrib/bxenclose/bxenclose.sty deleted file mode 100644 index 75acfa0ce6..0000000000 --- a/macros/latex/contrib/bxenclose/bxenclose.sty +++ /dev/null @@ -1,126 +0,0 @@ -% bxenclose.sty - -%% package declaration -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{bxenclose}[2016/04/01 v0.2] -\def\bxew@pkgame{bxenclose} - -%--------------------------------------- main - -%% \bxew@begin@body@hook -% Things to be prepended to the document body. -\let\bxew@begin@body@hook\@empty -%% \bxew@end@body@hook -% Things to be appended to the document body. -\let\bxew@end@body@hook\@empty - -% The insertion of \bxew@begin@body@hook is realized by appending -% the token to \document macro. But of course there are dozens of -% packages that do the same thing, and in order to "win the race" -% and put \bxew@begin@body@hook immediately before the actual body -% content, I need to postpone the patching to \document as late as -% possible. Hence comes my tactics, where the patching will be done -% in invocation of "\begin{document}", just before expanding the -% \document macro. - -%%<*> \enclosebodywith{<begin>}{<end>} -\@onlypreamble\enclosebodywith -\newcommand\enclosebodywith[2]{% - \begingroup - \ifx\bxew@patch@begin\@undefined\else - \bxew@patch@begin - \fi - \toks@\expandafter{\bxew@begin@body@hook}% - \toks\tw@{#1}% - \xdef\bxew@begin@body@hook{% - \the\toks@\the\toks\tw@}% - \toks@\expandafter{\bxew@end@body@hook}% - \toks\tw@{#2}% - \xdef\bxew@end@body@hook{% - \the\toks\tw@\the\toks@}% - \endgroup -} - -%% \bxew@patch@begin -% Patches to \begin macro. Specifically, it prepends -% "\bxew@begin@hook{#1}" to \begin. -\def\bxew@patch@begin{% - \global\let\bxew@patch@begin\@undefined % one-shot - \begingroup - \toks@\expandafter{\begin{##1}}% - \edef\bxew@tempa{\gdef\noexpand\begin####1{% - \noexpand\bxew@begin@hook{####1}\the\toks@}}% - \bxew@tempa - \endgroup -} - -%% \bxew@unpatch@begin -% Revokes the patch of \bxew@patch@begin. That is, it removes -% "\bxew@begin@hook{#1}" from \begin macro. -\def\bxew@unpatch@begin{% - \global\let\bxew@unpatch@begin\@undefined % one-shot - \begingroup - % check the target - \long\def\bxew@tempa##1\bxew@begin@hook##2##3\bxew@end{% - \def\bxew@tempa{##2}}% - \expandafter\bxew@tempa\begin{}\bxew@begin@hook!\bxew@end - \ifx\bxew@tempa\@empty % if target is there - \long\def\bxew@tempa##1\bxew@begin@hook##2{##1}% - \toks@\expandafter\expandafter\expandafter - {\expandafter\bxew@tempa\begin{##1}}% - \edef\bxew@tempa{\gdef\noexpand\begin####1{\the\toks@}}% - \bxew@tempa - \fi % if not there, then do nothing - \endgroup -} - -%% \bxew@begin@hook{<envname>} -% The patch attached to \begin. When "\begin{document}" -% is called, this macro patches to \document, before -% \document is expanded. -\def\bxew@begin@hook#1{% - \begingroup - \def\bxew@tempa{#1}\def\bxew@tempb{document}% - \ifx\bxew@tempa\bxew@tempb % if it is \begin{document} - % just in case unpatching failed - \global\let\bxew@begin@hook\@gobble % neutralize - \bxew@unpatch@begin - \bxew@patch@document - \fi - \endgroup -} - -%% \bxew@patch@document -% Appends something and \bxew@begin@body@hook to \document macro. -\def\bxew@patch@document{% - \begingroup - \global\let\bxew@patch@document\@undefined % one-shot - \g@addto@macro\document{% - \bxew@patch@enddocument - % and \bxew@begin@body@hook will come last - \let\reserved@a\bxew@begin@body@hook - \global\let\bxew@begin@body@hook\@undefined - \reserved@a}% - \endgroup -} - -% Just like \bxew@begin@body@hook, prepending \bxew@end@body@hook -% to \enddocument need to be deferred as much as possible. So I -% decided to patch \enddocument just before executing the -% \bxew@begin@body@hook macro. - -%% \bxew@patch@enddocument -% Prepends \bxew@end@body@hook to \enddocument. -\def\bxew@patch@enddocument{% - \global\let\bxew@patch@enddocument\@undefined % one-shot - \begingroup - \toks@\expandafter{\enddocument}% - \toks\tw@{\bxew@end@body@hook - \global\let\bxew@end@body@hook\@undefined}% - \xdef\enddocument{\the\toks\tw@\the\toks@}% - \endgroup -} - -%--------------------------------------- done -\endinput -%% EOF |