texlive[65312] Master: ibrackets (19dec22)

commits+karl at tug.org commits+karl at tug.org
Mon Dec 19 22:57:23 CET 2022


Revision: 65312
          http://tug.org/svn/texlive?view=revision&revision=65312
Author:   karl
Date:     2022-12-19 22:57:22 +0100 (Mon, 19 Dec 2022)
Log Message:
-----------
ibrackets (19dec22)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/ibrackets/
    trunk/Master/texmf-dist/doc/latex/ibrackets/README.md
    trunk/Master/texmf-dist/doc/latex/ibrackets/ibrackets.pdf
    trunk/Master/texmf-dist/source/latex/ibrackets/
    trunk/Master/texmf-dist/source/latex/ibrackets/ibrackets.dtx
    trunk/Master/texmf-dist/source/latex/ibrackets/ibrackets.ins
    trunk/Master/texmf-dist/tex/latex/ibrackets/
    trunk/Master/texmf-dist/tex/latex/ibrackets/ibrackets.sty
    trunk/Master/tlpkg/tlpsrc/ibrackets.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/ibrackets/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ibrackets/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/ibrackets/README.md	2022-12-19 21:57:22 UTC (rev 65312)
@@ -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 at ac-toulouse.fr
+
+
+## License
+
+Released under the LaTeX Project Public License v1.3 or later. 
+See http://www.latex-project.org/lppl.txt


Property changes on: trunk/Master/texmf-dist/doc/latex/ibrackets/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/ibrackets/ibrackets.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/ibrackets/ibrackets.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ibrackets/ibrackets.pdf	2022-12-19 00:47:38 UTC (rev 65311)
+++ trunk/Master/texmf-dist/doc/latex/ibrackets/ibrackets.pdf	2022-12-19 21:57:22 UTC (rev 65312)

Property changes on: trunk/Master/texmf-dist/doc/latex/ibrackets/ibrackets.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/ibrackets/ibrackets.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/ibrackets/ibrackets.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/ibrackets/ibrackets.dtx	2022-12-19 21:57:22 UTC (rev 65312)
@@ -0,0 +1,200 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2022 by Antoine Missier <antoine.missier at 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 at 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 at rtopenbracket}
+}
+\def\sm at rtopenbracket{%
+  \ifx\@next- \mathopen \else
+  \ifx\@next+ \mathopen \else
+    \mathord\fi\fi \mathopenbracket}
+    
+{\catcode`]=\active
+  \gdef]{\futurelet\@next\sm at rtclosebracket}
+}
+\def\sm at 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


Property changes on: trunk/Master/texmf-dist/source/latex/ibrackets/ibrackets.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/ibrackets/ibrackets.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/ibrackets/ibrackets.ins	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/ibrackets/ibrackets.ins	2022-12-19 21:57:22 UTC (rev 65312)
@@ -0,0 +1,55 @@
+%%
+%% Copyright (C) 2022 by Antoine Missier <antoine.missier at 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 at 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

Added: trunk/Master/texmf-dist/tex/latex/ibrackets/ibrackets.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/ibrackets/ibrackets.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/ibrackets/ibrackets.sty	2022-12-19 21:57:22 UTC (rev 65312)
@@ -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 at 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 at rtopenbracket}
+}
+\def\sm at rtopenbracket{%
+  \ifx\@next- \mathopen \else
+  \ifx\@next+ \mathopen \else
+    \mathord\fi\fi \mathopenbracket}
+
+{\catcode`]=\active
+  \gdef]{\futurelet\@next\sm at rtclosebracket}
+}
+\def\sm at rtclosebracket{%
+  \ifx\@next- \mathopen \else
+  \ifx\@next+ \mathopen \else
+    \mathord\fi\fi \mathclosebracket}
+\endinput
+%%
+%% End of file `ibrackets.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/ibrackets/ibrackets.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	2022-12-19 00:47:38 UTC (rev 65311)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2022-12-19 21:57:22 UTC (rev 65312)
@@ -409,7 +409,7 @@
     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

Modified: trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc	2022-12-19 00:47:38 UTC (rev 65311)
+++ trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc	2022-12-19 21:57:22 UTC (rev 65312)
@@ -115,6 +115,7 @@
 depend hepparticles
 depend hepthesis
 depend hepunits
+depend ibrackets
 depend includernw
 depend interval
 depend ionumbers

Added: trunk/Master/tlpkg/tlpsrc/ibrackets.tlpsrc
===================================================================


More information about the tex-live-commits mailing list.