diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/ibrackets/README.md | 28 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/ibrackets/ibrackets.pdf | bin | 0 -> 96262 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/ibrackets/ibrackets.dtx | 200 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/ibrackets/ibrackets.ins | 55 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ibrackets/ibrackets.sty | 50 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/ibrackets.tlpsrc | 0 |
8 files changed, 335 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/ibrackets/README.md b/Master/texmf-dist/doc/latex/ibrackets/README.md new file mode 100644 index 00000000000..87ee53c951d --- /dev/null +++ b/Master/texmf-dist/doc/latex/ibrackets/README.md @@ -0,0 +1,28 @@ +# Intelligent brackets - The ibrackets package + + +## Presentation + +This small package provides a new definition of brackets [ and ] as active characters +to get correct blank spaces in mathematical mode when using for open intervals +instead of parenthesis: ]-\infty, 0[ is equivalent to (-\infty, 0). + + +## Installation + +- run LaTeX on ibrackets.ins, you obtain the file ibrackets.sty, +- if then you run pdfLaTeX on ibrackets.dtx you get the file ibrackets.pdf which is also in the archive, +- put the files ibrackets.sty and ibrackets.pdf in your TeX Directory Structure. + + +## Author + +Antoine Missier + +Email: antoine.missier@ac-toulouse.fr + + +## License + +Released under the LaTeX Project Public License v1.3 or later. +See http://www.latex-project.org/lppl.txt diff --git a/Master/texmf-dist/doc/latex/ibrackets/ibrackets.pdf b/Master/texmf-dist/doc/latex/ibrackets/ibrackets.pdf Binary files differnew file mode 100644 index 00000000000..a45c0dc20f3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ibrackets/ibrackets.pdf diff --git a/Master/texmf-dist/source/latex/ibrackets/ibrackets.dtx b/Master/texmf-dist/source/latex/ibrackets/ibrackets.dtx new file mode 100644 index 00000000000..897cb36de81 --- /dev/null +++ b/Master/texmf-dist/source/latex/ibrackets/ibrackets.dtx @@ -0,0 +1,200 @@ +% \iffalse meta-comment +% +% Copyright (C) 2022 by Antoine Missier <antoine.missier@ac-toulouse.fr> +% +% This file 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: +% +% http://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. +% \fi +% +% \iffalse +%<*driver> +\ProvidesFile{ibrackets.dtx} +%</driver> +%<*package> +\NeedsTeXFormat{LaTeX2e}[2005/12/01] +\ProvidesPackage{ibrackets} + [2022/12/19 v1.0 .dtx ibrackets file] +%</package> +%<*driver> +\documentclass{ltxdoc} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[english]{babel} +\usepackage[charter]{mathdesign} +\usepackage{ibrackets} + +\renewcommand\pi{\piup} +\DeclareMathSymbol{\OB}\mathopen{operators}{091} % open bracket [ +\DeclareMathSymbol{\CB}\mathclose{operators}{093} % close bracket ] + +\DisableCrossrefs +%\CodelineIndex +%\RecordChanges +\usepackage{hyperref} +\hypersetup{% + colorlinks, + linkcolor=blue, + citecolor=red, + pdftitle={ibrackets}, + pdfsubject={LaTeX package}, + pdfauthor={Antoine Missier} +} +\MakeShortVerb{"} +\begin{document} +\DocInput{ibrackets.dtx} +%\PrintChanges +%\PrintIndex +\end{document} +%</driver> +% \fi +% +% \CheckSum{49} +% +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% \changes{v1.0}{2022/12/19}{Initial version, creating dtx and ins files} +% +% \GetFileInfo{ibrackets.sty} +% +% \title{Intelligent brackets \\ The \textsf{ibrackets} package\thanks{This document +% corresponds to \textsf{ibrackets}~\fileversion, dated \filedate.}} +% \author{Antoine Missier \\ \texttt{antoine.missier@ac-toulouse.fr}} +% \date{December 19, 2022} +% \maketitle +% +% \section{Introduction} +% +% Open intervals are usually represented with parenthesis $(0, +\infty)$ +% but sometimes we find also +% brackets $]0, +\infty[$, for example in French mathematics. +% In that case the space around them is often unsuitable, e.g.\@ $x \in \CB 0, +\infty\OB$. +% This small package redefines brackets symbols $[$ and $]$ for mathematical mode +% to get correct spacing: $x \in ]0, +\infty[$. +% +% \medskip +% Originally implemented in the \textsf{mismath} package~\cite{MIS} +% and also in \textsf{frenchmath}~\cite{FR} +% since version 2.1, our previous redefinitions produce however incorrect spacing +% when the left boundary of the interval begins with a sign - or +, +% which was then interpreted as a binary operation. Thus blank +% spaces surrounding the sign would have been too large. +% This problem was pointed out by Jean-François Burnol, and +% an easy solution, that has been documented, consisted to nest the operator +% or the left boundary +% within a pair of braces, e.g.\@ |$x \in ]{-}\infty, 0]$|, or use |\left| and |\right| +% or even |\mathopen{]}|. +% +% \medskip +% Inspired by the \textsf{icomma} package~\cite{ICOMMA} of Walter Schmidt, we now provide +% an improved bracket definition that works correctly without +% these pair of brackets. +% +% \medskip +% Let us also mention other approaches e.g.\@ |\DeclarePairedDelimiters|, a macro from +% the \textsf{mathtools} package~\cite{TOOL}, or +% the \textsf{interval} package~\cite{INT} with his +% |\interval| macro. Nevertheless our solution is lighter. +% +% \section{Usage} +% You just have to type intervals in an easy way: +% |$x\in ]0,\pi[ \cup ]2\pi,3\pi[$| +% produce +% \[ x\in ]0, \pi[ \cup ]2\pi, 3\pi[ \mbox{\quad with \textsf{ibrackets}}, \] +% instead of +% \[ x\in \CB 0,\pi \OB \cup \CB 2\pi, 3\pi \OB \mbox{\quad without \textsf{ibrackets}}. \] + +% Generally $[$ and $]$ symbols are not defined anymore as delimiters, +% but as ordinary characters. +% Thereby a line break could occur between the two brackets, but +% it is always possible to transform them +% into delimiters with |\left| and |\right|. +% +% \medskip +% The problem of a sign following the first bracket is solved with this package, +% so the example in the introduction is simply obtained with |$x \in ]-\infty, 0]$| +% which gives $x \in ]-\infty, 0]$. +% +% \medskip +% \emph{However, you don't have to leave a space between the first bracket and the sign}: e.g.\@ +% |$x \in ] -\infty, 0]$| yields $x \in ] -\infty, 0]$ with bad spacing around the +% minus sign. +% Contrariwise, when you want to write algebra on intervals then +% \emph{you must leave a blank space between the second bracket and the} +/- \emph{operations}, +% e.g.\@ |$[a, b] + [c, d]$| yields $[a, b] + [c, d]$ +% but |$[a, b]+ [c, d]$| yields $[a, b]+ [c, d]$. +% To summarize the new behavior of a bracket: it is an ordinary character, +% but an open delimiter when it is immediately followed by a + or - character. +% +% \StopEventually{} +% +% \section{Implementation} +% At |\begin{document}|, we memorize the "\mathcode" of the original brackets, +% in the |\math...bracket| macros, and we make the brackets in math mode active: +% \begin{macrocode} +\AtBeginDocument{% + \mathchardef\mathopenbracket\mathcode`[% + \mathcode`[="8000 + \mathchardef\mathclosebracket\mathcode`]% + \mathcode`]="8000 +% \end{macrocode} +% The active brackets check the next input character. If this is a - or a +, +% the active brackets return |\mathopen| with the saved |\math...bracket| +% so that no space will be added after the bracket; +% otherwise, |\mathord\math...bracket| is returned : +% \begin{macrocode} +} +{\catcode`[=\active + \gdef[{\futurelet\@next\sm@rtopenbracket} +} +\def\sm@rtopenbracket{% + \ifx\@next- \mathopen \else + \ifx\@next+ \mathopen \else + \mathord\fi\fi \mathopenbracket} + +{\catcode`]=\active + \gdef]{\futurelet\@next\sm@rtclosebracket} +} +\def\sm@rtclosebracket{% + \ifx\@next- \mathopen \else + \ifx\@next+ \mathopen \else + \mathord\fi\fi \mathclosebracket} +% \end{macrocode} +% We could have use the internal \TeX\ command |\@ifnextchar| +% to skip blank spaces after the bracket, and look if there is a + or - after, +% but then it would become tricky when you really want +% to follow an interval with an operation plus or minus. +% +% \begin{thebibliography}{5} +% \bibitem{MIS} \emph{\textsf{mismath} -- Miscellaneus mathematical macros}. +% Antoine Missier, CTAN, v2.0 2022/11/11. +% \bibitem{FR} \emph{L'extension \textsf{frenchmath}}. Antoine Missier, CTAN, v2.2 2022/12/15. +% \bibitem{ICOMMA} \emph{The \textsf{icomma} package for \LaTeXe}. +% Walter Schmidt, CTAN, v2.0 2002/03/10. +% \bibitem{TOOL} \emph{The \textsf{mathtool} package}. Morten Høgholm, Lars Madsen, CTAN, +% v1.21 2018/01/08. +% \bibitem{INT} \emph{The \textsf{interval} package}. Lars Madsen, CTAN, +% v0.4 2019/03/06. +% \end{thebibliography} +% \Finale +\endinput diff --git a/Master/texmf-dist/source/latex/ibrackets/ibrackets.ins b/Master/texmf-dist/source/latex/ibrackets/ibrackets.ins new file mode 100644 index 00000000000..05e63feb5b1 --- /dev/null +++ b/Master/texmf-dist/source/latex/ibrackets/ibrackets.ins @@ -0,0 +1,55 @@ +%% +%% Copyright (C) 2022 by Antoine Missier <antoine.missier@ac-toulouse.fr> +%% +%% This file 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: +%% +%% http://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. +%% + +\input docstrip.tex +\keepsilent + +\usedir{tex/latex/ibrackets} + +\preamble + +This is a generated file. + +Copyright (C) 2022 by Antoine Missier <antoine.missier@ac-toulouse.fr> + +This file 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: + + http://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. + +\endpreamble + +\generate{\file{ibrackets.sty}{\from{ibrackets.dtx}{package}}} + +\obeyspaces +\Msg{*************************************************************} +\Msg{* *} +\Msg{* To finish the installation you have to move the following *} +\Msg{* files into a directory searched by TeX: *} +\Msg{* *} +\Msg{* ibrackets.sty *} +\Msg{* *} +\Msg{* To produce the documentation run the file *} +\Msg{* ibrackets.dtx through LaTeX. *} +\Msg{* *} +\Msg{* Happy TeXing! *} +\Msg{* *} +\Msg{*************************************************************} + +\endbatchfile diff --git a/Master/texmf-dist/tex/latex/ibrackets/ibrackets.sty b/Master/texmf-dist/tex/latex/ibrackets/ibrackets.sty new file mode 100644 index 00000000000..f87aa326f5e --- /dev/null +++ b/Master/texmf-dist/tex/latex/ibrackets/ibrackets.sty @@ -0,0 +1,50 @@ +%% +%% This is file `ibrackets.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% ibrackets.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright (C) 2022 by Antoine Missier <antoine.missier@ac-toulouse.fr> +%% +%% This file 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: +%% +%% http://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. +%% +\NeedsTeXFormat{LaTeX2e}[2005/12/01] +\ProvidesPackage{ibrackets} + [2022/12/19 v1.0 .dtx ibrackets file] + +\AtBeginDocument{% + \mathchardef\mathopenbracket\mathcode`[% + \mathcode`[="8000 + \mathchardef\mathclosebracket\mathcode`]% + \mathcode`]="8000 +} +{\catcode`[=\active + \gdef[{\futurelet\@next\sm@rtopenbracket} +} +\def\sm@rtopenbracket{% + \ifx\@next- \mathopen \else + \ifx\@next+ \mathopen \else + \mathord\fi\fi \mathopenbracket} + +{\catcode`]=\active + \gdef]{\futurelet\@next\sm@rtclosebracket} +} +\def\sm@rtclosebracket{% + \ifx\@next- \mathopen \else + \ifx\@next+ \mathopen \else + \mathord\fi\fi \mathclosebracket} +\endinput +%% +%% End of file `ibrackets.sty'. diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 7f6492b630a..8eddf2db543 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -409,7 +409,7 @@ my @TLP_working = qw( hyper hyperbar hypernat hyperref hyperxmp hyph-utf8 hyphen-base hyphenat hyphenex hyplain - ibarra ibycus-babel ibygrk icite icsv + ibarra ibrackets ibycus-babel ibygrk icite icsv identkey idxcmds idxlayout ieeeconf ieejtran ieeepes ieeetran ietfbibs iexec ifallfalse iffont ifmslide ifmtarg ifnextok ifoddpage diff --git a/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc b/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc index d06c05d5d0b..28a29a378ca 100644 --- a/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc @@ -115,6 +115,7 @@ depend hepnames depend hepparticles depend hepthesis depend hepunits +depend ibrackets depend includernw depend interval depend ionumbers diff --git a/Master/tlpkg/tlpsrc/ibrackets.tlpsrc b/Master/tlpkg/tlpsrc/ibrackets.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/ibrackets.tlpsrc |