[latex3-commits] [latex3/mathtools] master: Added \xLongleftarrow and \xLongrightarrow as requested in #51 (7fd80d2)
github at latex-project.org
github at latex-project.org
Thu Jan 18 16:52:05 CET 2024
Repository : https://github.com/latex3/mathtools
On branch : master
Link : https://github.com/latex3/mathtools/commit/7fd80d27d1caaa677f2dbe4a5dc7d71a8d07df96
>---------------------------------------------------------------
commit 7fd80d27d1caaa677f2dbe4a5dc7d71a8d07df96
Author: daleif <daleif at github.com>
Date: Thu Jan 18 16:52:05 2024 +0100
Added \xLongleftarrow and \xLongrightarrow as requested in #51
>---------------------------------------------------------------
7fd80d27d1caaa677f2dbe4a5dc7d71a8d07df96
ANNOUNCEMENT | 1 +
mathtools.dtx | 47 ++++++++++++++++++++++++++++++++++++++++++++---
2 files changed, 45 insertions(+), 3 deletions(-)
diff --git a/ANNOUNCEMENT b/ANNOUNCEMENT
index 9d6327e..9ca51a1 100644
--- a/ANNOUNCEMENT
+++ b/ANNOUNCEMENT
@@ -8,6 +8,7 @@ For mathtools.dtx v1.30
* Added a default \MT_active_colon_false: for when centercolon=true has
never been executed (#49)
* Gave \DeclarePairedDelimiter... support for the empty scaler (dot) (#41)
+* Added \xLongrightarrow and \xLongleftarrow (requested in #51)
Announcement release 2022/06/29
diff --git a/mathtools.dtx b/mathtools.dtx
index 552891c..0318510 100644
--- a/mathtools.dtx
+++ b/mathtools.dtx
@@ -1185,6 +1185,24 @@ colorlinks,
% A & \xlongrightarrow[b]{a} B & A & \xlongleftarrow[b]{a} B \\
% A & \xlongrightarrow[below]{above} B & A & \xlongleftarrow[below]{above} B \\
% \end{align*}
+%% \begin{codesyntax}
+% \SpecialUsageIndex{\xLongrightarrow}
+% \cs{xLongrightarrow}\oarg{sub}\marg{sup}\texttt{~~~~}
+% \SpecialUsageIndex{\xLongleftarrow}
+% \cs{xLongleftarrow}\oarg{sub}\marg{sup}\texttt{~~~~}
+% \end{codesyntax}
+% \FeatureRequest{quarkQuark {\footnotesize (issue \#51)}}{added 2024}%
+% Similar to \cs{xRight/Leftarrow} but based on the \emph{long}
+% versions. For short arguments it stays the same length as the
+% \cs{long...} base arrow.
+% \begin{align*}
+% A & \xLongrightarrow B & A & \Longleftarrow B \\
+% A & \xLongrightarrow[b]{a} B & A & \xLongleftarrow[b]{a} B \\
+% A & \xLongrightarrow[below]{above} B & A & \xLongleftarrow[below]{above} B \\
+% \end{align*}
+
+%
+%
%
% \subsubsection{Braces and brackets}
%
@@ -2038,8 +2056,8 @@ colorlinks,
% are used we internally convert them into their \cs{...l} and
% \cs{...r} variants. Therefore if you define your own manual
% scalers, remember to also have -l and -r variants.
-%
-% \paragraph{New from version 1.30.} You can now use »\verb|.|« (dot)
+% \\
+% \emph{New from version 1.30.} You can now use »\verb|.|« (dot)
% as an empty delimiter, for macros what only have a delimiter on one
% side.\footnote{The syntax is borrowed from
% \cs{left.}\cs{frac\{1\}\{2\}}\cs{right}\cs{rvert} where the dot marks an empty
@@ -3815,8 +3833,31 @@ colorlinks,
\arrowfill@{\mapstochar\relbar}\relbar\rightarrow}
% \end{macrocode}
% \end{macro}
-% \end{macro}
+% \end{macro}
+% 2024 (v1.30): Added \verb+\xLongrightarrow+ and \verb+\xLongleftarrow+. Code by muzimuchi on GitHub. I added extra spaces like for |\xRightarrow| above.
+% \begin{macro}{\MT_Longrightarrow_fill:}
+% \begin{macro}{\MT_Longleftarrow_fill:}
+% \begin{macro}{\xLongrightarrow}
+% \begin{macro}{\xLongleftarrow}
+% \begin{macrocode}
+\def\MT_Longrightarrow_fill:{%
+ \arrowfill@\Relbar\Relbar\Longrightarrow}
+\def\MT_Longleftarrow_fill:{%
+ \arrowfill@\Longleftarrow\Relbar\Relbar}
+
+\providecommand*\xLongrightarrow[2][]{%
+ \ext at arrow 0359\MT_Longrightarrow_fill:{#1\ }{#2\ }}
+\providecommand*\xLongleftarrow[2][]{%
+ \ext at arrow 3095\MT_Longleftarrow_fill:{\ #1}{\ #2}}
+
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Underbrackets etc.}
+%
% \begin{macro}{\underbracket}
% \begin{macro}{\MT_underbracket_I:w}
% \begin{macro}{\MT_underbracket_II:w}
More information about the latex3-commits
mailing list.