summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/ibrackets
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/ibrackets')
-rw-r--r--Master/texmf-dist/source/latex/ibrackets/ibrackets.dtx61
1 files changed, 35 insertions, 26 deletions
diff --git a/Master/texmf-dist/source/latex/ibrackets/ibrackets.dtx b/Master/texmf-dist/source/latex/ibrackets/ibrackets.dtx
index 897cb36de81..8e78228310a 100644
--- a/Master/texmf-dist/source/latex/ibrackets/ibrackets.dtx
+++ b/Master/texmf-dist/source/latex/ibrackets/ibrackets.dtx
@@ -20,7 +20,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{ibrackets}
- [2022/12/19 v1.0 .dtx ibrackets file]
+ [2022/12/26 v1.1 .dtx ibrackets file]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -29,10 +29,12 @@
\usepackage[english]{babel}
\usepackage[charter]{mathdesign}
\usepackage{ibrackets}
+\usepackage{sectsty}
+\usepackage{xcolor}
+\definecolor{darkbrown}{rgb}{0.5,0.1,0.1}
+\allsectionsfont{\color{darkbrown}}
\renewcommand\pi{\piup}
-\DeclareMathSymbol{\OB}\mathopen{operators}{091} % open bracket [
-\DeclareMathSymbol{\CB}\mathclose{operators}{093} % close bracket ]
\DisableCrossrefs
%\CodelineIndex
@@ -73,22 +75,26 @@
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \changes{v1.0}{2022/12/19}{Initial version, creating dtx and ins files}
+% \changes{v1.0}{2022/12/19}{Initial version}
+%
+% \changes{v1.1}{2022/12/28}{
+% - A bug correction in the README.md file
+% - Tiny changes in documentation}
%
% \GetFileInfo{ibrackets.sty}
%
-% \title{Intelligent brackets \\ The \textsf{ibrackets} package\thanks{This document
-% corresponds to \textsf{ibrackets}~\fileversion, dated \filedate.}}
+% \title{Intelligent brackets \\ The \textsf{ibrackets} package}
% \author{Antoine Missier \\ \texttt{antoine.missier@ac-toulouse.fr}}
-% \date{December 19, 2022}
+% \date{\filedate, \fileversion}
% \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$.
+% square brackets $]0, +\infty[$, for example in French mathematics.
+% When using these, spacing is often unsuitable,
+% e.g.\@ $x \in \mathclose{]} 0, +\infty\mathopen{[}$.
% This small package redefines brackets symbols $[$ and $]$ for mathematical mode
% to get correct spacing: $x \in ]0, +\infty[$.
%
@@ -96,37 +102,39 @@
% 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 +,
+% when the left bound 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 the left bound 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.
+% these pairs of curly brackets.
%
% \medskip
-% Let us also mention other approaches e.g.\@ |\DeclarePairedDelimiters|, a macro from
+% Let's 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[$|
+% |$x\in]0,\pi[\cup]2\pi, 3\pi[$|
% produce
-% \[ x\in ]0, \pi[ \cup ]2\pi, 3\pi[ \mbox{\quad with \textsf{ibrackets}}, \]
+% \[ 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}}. \]
-
+% \[ x\in\mathclose{]} 0,\pi \mathopen{[}\cup\mathclose{]} 2\pi, 3\pi\mathopen{[}
+% \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
+% Thereby a line break could occur between the two square brackets, but
% it is always possible to transform them
% into delimiters with |\left| and |\right|.
%
@@ -140,7 +148,7 @@
% |$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},
+% \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,
@@ -157,24 +165,23 @@
\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}
-}
+ \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}
-}
+ \gdef]{\futurelet\@next\sm@rtclosebracket}}
\def\sm@rtclosebracket{%
\ifx\@next- \mathopen \else
\ifx\@next+ \mathopen \else
@@ -186,6 +193,7 @@
% to follow an interval with an operation plus or minus.
%
% \begin{thebibliography}{5}
+% % \begin{raggedright}
% \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.
@@ -195,6 +203,7 @@
% v1.21 2018/01/08.
% \bibitem{INT} \emph{The \textsf{interval} package}. Lars Madsen, CTAN,
% v0.4 2019/03/06.
+% \end{raggedright}
% \end{thebibliography}
% \Finale
\endinput