texlive[53709] Master/texmf-dist: letterswitharrows (7feb20)
commits+karl at tug.org
commits+karl at tug.org
Fri Feb 7 22:49:38 CET 2020
Revision: 53709
http://tug.org/svn/texlive?view=revision&revision=53709
Author: karl
Date: 2020-02-07 22:49:38 +0100 (Fri, 07 Feb 2020)
Log Message:
-----------
letterswitharrows (7feb20)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/letterswitharrows/letterswitharrows.pdf
trunk/Master/texmf-dist/source/latex/letterswitharrows/letterswitharrows.dtx
trunk/Master/texmf-dist/tex/latex/letterswitharrows/letterswitharrows.sty
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/letterswitharrows/README.txt
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/latex/letterswitharrows/README
Deleted: trunk/Master/texmf-dist/doc/latex/letterswitharrows/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/letterswitharrows/README 2020-02-07 21:49:21 UTC (rev 53708)
+++ trunk/Master/texmf-dist/doc/latex/letterswitharrows/README 2020-02-07 21:49:38 UTC (rev 53709)
@@ -1,7 +0,0 @@
-The letterswitharrows package
-Copyright 2019 J. M. Teegen
-
-The letterswitharrows package does provides LaTeX math-mode commands for setting left and right arrows over mathematical symbols, so that the arrows dynamically scale with the symbols.
-While it is possible to set arrows over longer strings of symbols, the focus lies on single characters.
-
-For more information please consult the package documentation in letterswitharrows.pdf
Added: trunk/Master/texmf-dist/doc/latex/letterswitharrows/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/letterswitharrows/README.txt (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/letterswitharrows/README.txt 2020-02-07 21:49:38 UTC (rev 53709)
@@ -0,0 +1,7 @@
+The letterswitharrows package
+Copyright 2019-2020 J. M. Teegen
+
+The letterswitharrows package does provides LaTeX math-mode commands for setting left and right arrows over mathematical symbols, so that the arrows dynamically scale with the symbols.
+While it is possible to set arrows over longer strings of symbols, the focus lies on single characters.
+
+For more information please consult the package documentation in letterswitharrows.pdf
Property changes on: trunk/Master/texmf-dist/doc/latex/letterswitharrows/README.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/letterswitharrows/letterswitharrows.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/letterswitharrows/letterswitharrows.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/letterswitharrows/letterswitharrows.dtx 2020-02-07 21:49:21 UTC (rev 53708)
+++ trunk/Master/texmf-dist/source/latex/letterswitharrows/letterswitharrows.dtx 2020-02-07 21:49:38 UTC (rev 53709)
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
%% File: letterswitharrows.dtx
-%% Copyright 2019 J. Maximilian Teegen
+%% Copyright 2019-2020 J. Maximilian Teegen
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -54,15 +54,16 @@
% \title{The \pkg{letterswitharrows} package}
% \author{Max Teegen\\ \href{mailto:tex at jmteegen.eu}{tex at jmteegen.eu}}
-% \date{2019/11/21}
+% \date{Released 2020-02-04}
% \maketitle
% \begin{documentation}
-% This package does provides math-mode commands for setting left and right arrows over mathematical symbols, so that the arrows dynamically scale with the symbols.
+% This package provides math-mode commands for setting left and right arrows over mathematical symbols, so that the arrows dynamically scale with the symbols.
% Here is a sample: {\large\[
% \vs \le \tv \in \vec{U_{\mathrlap\vr}} \qquad \left\vert \vec{AB} \right\vert = \left\vert \cev{AB} \right\vert \qquad A \mathrel{\arrowoverset*[-2mu]{\between}} B
-% \]} % Somehow embellishments don't work in the documentation!?
+% \]}
+% \iffalse Somehow embellishments don't work in the documentation!? \fi
% While it is possible to set arrows over longer strings of symbols, the focus lies on single characters.
%
% Only \textsc{pdf} output is supported. Output to \textsc{ps} is implemented, but rarely tested.
@@ -132,7 +133,7 @@
% \subsection{Other package options}
% \DescribeOption{pgf}
-% If you specify the \verb|pgf| option, every arrow is drawn as a \verb|pgfpicture|. This requires the \pkg{pgf} package, and slow in its current implementation.
+% If you specify the \verb|pgf| option, every arrow is drawn as a \verb|pgfpicture|. This requires the \pkg{pgf} package.
% \begin{texnote}
% You can set up custom arrow drawing code by redefining \cs{__jmt_lwa_arrow_draw:nnn}.
% The command is expected to draw an arrow with its head at the current position. Its length should be \verb|#1| and it should be drawn at a font size of \verb|#2|pt.
@@ -141,7 +142,8 @@
% \DescribeOption{tweaks}
% Specifying the \verb|tweaks| option applies per-letter scaling adjustments to some of the single-letter shorthands. This is enabled by default.
-% These are specific to Latin Modern Math and subject to be changed on a whim. If you wish a more stable behaviour specify \verb|tweaks=false|
+% These are specific to Latin Modern Math and subject to be changed on a whim. If you wish a more stable behaviour specify \verb|tweaks=false|.
+% This documentation uses \verb|tweaks=false|.
% \end{documentation}
% \begin{implementation}
@@ -151,7 +153,7 @@
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\ProvidesExplPackage {letterswitharrows} {2019-11-21} {} {Draw arrows over math letters.}
+\ProvidesExplPackage {letterswitharrows} {2020-02-04} {} {Draw arrows over math letters.}
\RequirePackage{xparse,l3keys2e,mathtools}
% TODO: I just use mathtools for mathrlap; replace.
@@ -285,6 +287,7 @@
% \end{macro}
% \begin{macro}{\@@_arrow_overset:w,\arrowoverset}
+% \changes{2019/02/04}{2019/02/04}{Subscript spacing adjustments}
% \begin{macrocode}
\cs_new_protected:Npn \@@_arrow_overset:w {
\c_group_begin_token
@@ -291,6 +294,10 @@
\__@@_arrow_overset_aux:w
}
+\cs_new:Nn \__jmt_lwa_bool_convert:n {
+ \IfBooleanTF {#1} {\c_true_bool} {\c_false_bool}
+}
+
% This exp_args is necessary because _ generates the wrong token in expl3 syntax
\exp_args:NNx \NewDocumentCommand \__@@_arrow_overset_aux:w
{s O{0mu} O{1} O{0ex} m t' e{\char_generate:nn {95}{8}} t'} {
@@ -297,8 +304,10 @@
\__@@_arrow_overset:nnnnn
{
#5
- \c_math_superscript_token {
- \scriptscriptstyle\IfBooleanT{#6}{\prime}\IfBooleanT{#8}{\prime}
+ \exp_args:Nf\bool_if:nT{\__jmt_lwa_bool_convert:n{#6} || \__jmt_lwa_bool_convert:n{#8}} {
+ \c_math_superscript_token {
+ \scriptscriptstyle\IfBooleanT{#6}{\prime}\IfBooleanT{#8}{\prime}
+ }
} % TODO: Better positioning etc?
\exp_args:Nf\IfValueT{\use:n#7} {
\c_math_subscript_token {
@@ -311,7 +320,7 @@
\exp_args:Nf\IfValueTF{\use:n#7}{
% TODO: Better way to do this? This is all kinds of wrong.
- \hphantom{\!\c_math_subscript_token{#7}}
+ \hphantom{\c_math_subscript_token{#7}}
} {}
\c_group_end_token
}
@@ -431,21 +440,67 @@
% \end{macrocode}
% \end{macro}
% Some personal-preference tweaks.
+% \changes{2019/02/04}{2019/02/04}{Tweaks for capital letters.}
% \begin{macrocode}
\bool_if:NTF \g_@@_tweak_shortcuts_bool {
- \prop_if_in:NnTF \g_@@_selected_presets_prop {ABC} {
- \cs_set:cpn {vS} {
- \@@_arrow_overset:w[2mu][8/10]{S}
- }
- } {}
- \prop_if_in:NnTF \g_@@_selected_presets_prop {abc} {
- \cs_new:cpn {vell} {
- \@@_arrow_overset:w{\ell}
- }
- \cs_new:cpn {ellv} {
- \@@_arrow_overset:w{\ell}
- }
- } {}
+ \prop_if_in:NnTF \g_@@_selected_presets_prop {ABC} {
+ \int_step_inline:nnn {1} {26} {
+ \cs_set:cpx {v\int_to_Alph:n{#1}} {
+ \exp_not:N\@@_arrow_overset:w[2.5mu][8/10]{\int_to_Alph:n{#1}}
+ }
+ \cs_set:cpx {\int_to_Alph:n{#1}v} {
+ \exp_not:N\@@_arrow_overset:w*[2.5mu][7/10]{\int_to_Alph:n{#1}}
+ }
+ }
+ \cs_set:cpn {vS} {
+ \@@_arrow_overset:w[3mu][7/10]{S}
+ }
+ \cs_set:cpn {vT} {
+ \__jmt_lwa_arrow_overset:w[2mu][8/10]{T}
+ }
+ \cs_set:cpn {Tv} {
+ \__jmt_lwa_arrow_overset:w*[1mu][8/10]{T}
+ }
+ \cs_set:cpn {vU} {
+ \__jmt_lwa_arrow_overset:w[2mu][7/10]{U}
+ }
+ \cs_set:cpn {Uv} {
+ \__jmt_lwa_arrow_overset:w*[2mu][7/10]{U}
+ }
+ \cs_set:cpn {vV} {
+ \__jmt_lwa_arrow_overset:w[2.5mu][7/10]{V}
+ }
+ \cs_set:cpn {Vv} {
+ \__jmt_lwa_arrow_overset:w*[2mu][7/10]{V}
+ }
+ \cs_set:cpn {vX} {
+ \@@_arrow_overset:w[3mu][7/10]{X}
+ }
+ \cs_set:cpn {vY} {
+ \@@_arrow_overset:w[2mu][8/10]{Y}
+ }
+ \cs_set:cpn {Yv} {
+ \__jmt_lwa_arrow_overset:w*[2mu][7/10]{Y}
+ }
+ } {}
+ \prop_if_in:NnTF \g_@@_selected_presets_prop {cAcBcC} {
+ \int_step_inline:nnn {1} {26} {
+ \cs_set:cpx {vc\int_to_Alph:n{#1}} {
+ \exp_not:N\@@_arrow_overset:w[1mu][9/10]{\exp_not:N\mathcal{\int_to_Alph:n{#1}}}
+ }
+ \cs_set:cpx {c\int_to_Alph:n{#1}v} {
+ \exp_not:N\@@_arrow_overset:w*[1.5mu][8/10]{\exp_not:N\mathcal{\int_to_Alph:n{#1}}}
+ }
+ }
+ } {}
+ \prop_if_in:NnTF \g_@@_selected_presets_prop {abc} {
+ \cs_new:cpn {vell} {
+ \@@_arrow_overset:w{\ell}
+ }
+ \cs_new:cpn {ellv} {
+ \@@_arrow_overset:w{\ell}
+ }
+ } {}
} {}
% \end{macrocode}
% \end{implementation}
Modified: trunk/Master/texmf-dist/tex/latex/letterswitharrows/letterswitharrows.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/letterswitharrows/letterswitharrows.sty 2020-02-07 21:49:21 UTC (rev 53708)
+++ trunk/Master/texmf-dist/tex/latex/letterswitharrows/letterswitharrows.sty 2020-02-07 21:49:38 UTC (rev 53709)
@@ -7,7 +7,7 @@
%% letterswitharrows.dtx (with options: `package')
%%
%% File: letterswitharrows.dtx
-%% Copyright 2019 J. Maximilian Teegen
+%% Copyright 2019-2020 J. Maximilian Teegen
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -40,7 +40,7 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\ProvidesExplPackage {letterswitharrows} {2019-11-21} {} {Draw arrows over math letters.}
+\ProvidesExplPackage {letterswitharrows} {2020-02-04} {} {Draw arrows over math letters.}
\RequirePackage{xparse,l3keys2e,mathtools}
\msg_new:nnn {letterswitharrows} {pdf-only} {Only~pdf~output~is~supported.}
@@ -161,13 +161,19 @@
\__jmt_lwa_arrow_overset_aux:w
}
+\cs_new:Nn \__jmt_lwa_bool_convert:n {
+ \IfBooleanTF {#1} {\c_true_bool} {\c_false_bool}
+}
+
\exp_args:NNx \NewDocumentCommand \__jmt_lwa_arrow_overset_aux:w
{s O{0mu} O{1} O{0ex} m t' e{\char_generate:nn {95}{8}} t'} {
\__jmt_lwa_arrow_overset:nnnnn
{
#5
- \c_math_superscript_token {
- \scriptscriptstyle\IfBooleanT{#6}{\prime}\IfBooleanT{#8}{\prime}
+ \exp_args:Nf\bool_if:nT{\__jmt_lwa_bool_convert:n{#6} || \__jmt_lwa_bool_convert:n{#8}} {
+ \c_math_superscript_token {
+ \scriptscriptstyle\IfBooleanT{#6}{\prime}\IfBooleanT{#8}{\prime}
+ }
} % TODO: Better positioning etc?
\exp_args:Nf\IfValueT{\use:n#7} {
\c_math_subscript_token {
@@ -180,7 +186,7 @@
\exp_args:Nf\IfValueTF{\use:n#7}{
% TODO: Better way to do this? This is all kinds of wrong.
- \hphantom{\!\c_math_subscript_token{#7}}
+ \hphantom{\c_math_subscript_token{#7}}
} {}
\c_group_end_token
}
@@ -272,19 +278,64 @@
}
} {}
\bool_if:NTF \g__jmt_lwa_tweak_shortcuts_bool {
- \prop_if_in:NnTF \g__jmt_lwa_selected_presets_prop {ABC} {
- \cs_set:cpn {vS} {
- \__jmt_lwa_arrow_overset:w[2mu][8/10]{S}
- }
- } {}
- \prop_if_in:NnTF \g__jmt_lwa_selected_presets_prop {abc} {
- \cs_new:cpn {vell} {
- \__jmt_lwa_arrow_overset:w{\ell}
- }
- \cs_new:cpn {ellv} {
- \__jmt_lwa_arrow_overset:w{\ell}
- }
- } {}
+ \prop_if_in:NnTF \g__jmt_lwa_selected_presets_prop {ABC} {
+ \int_step_inline:nnn {1} {26} {
+ \cs_set:cpx {v\int_to_Alph:n{#1}} {
+ \exp_not:N\__jmt_lwa_arrow_overset:w[2.5mu][8/10]{\int_to_Alph:n{#1}}
+ }
+ \cs_set:cpx {\int_to_Alph:n{#1}v} {
+ \exp_not:N\__jmt_lwa_arrow_overset:w*[2.5mu][7/10]{\int_to_Alph:n{#1}}
+ }
+ }
+ \cs_set:cpn {vS} {
+ \__jmt_lwa_arrow_overset:w[3mu][7/10]{S}
+ }
+ \cs_set:cpn {vT} {
+ \__jmt_lwa_arrow_overset:w[2mu][8/10]{T}
+ }
+ \cs_set:cpn {Tv} {
+ \__jmt_lwa_arrow_overset:w*[1mu][8/10]{T}
+ }
+ \cs_set:cpn {vU} {
+ \__jmt_lwa_arrow_overset:w[2mu][7/10]{U}
+ }
+ \cs_set:cpn {Uv} {
+ \__jmt_lwa_arrow_overset:w*[2mu][7/10]{U}
+ }
+ \cs_set:cpn {vV} {
+ \__jmt_lwa_arrow_overset:w[2.5mu][7/10]{V}
+ }
+ \cs_set:cpn {Vv} {
+ \__jmt_lwa_arrow_overset:w*[2mu][7/10]{V}
+ }
+ \cs_set:cpn {vX} {
+ \__jmt_lwa_arrow_overset:w[3mu][7/10]{X}
+ }
+ \cs_set:cpn {vY} {
+ \__jmt_lwa_arrow_overset:w[2mu][8/10]{Y}
+ }
+ \cs_set:cpn {Yv} {
+ \__jmt_lwa_arrow_overset:w*[2mu][7/10]{Y}
+ }
+ } {}
+ \prop_if_in:NnTF \g__jmt_lwa_selected_presets_prop {cAcBcC} {
+ \int_step_inline:nnn {1} {26} {
+ \cs_set:cpx {vc\int_to_Alph:n{#1}} {
+ \exp_not:N\__jmt_lwa_arrow_overset:w[1mu][9/10]{\exp_not:N\mathcal{\int_to_Alph:n{#1}}}
+ }
+ \cs_set:cpx {c\int_to_Alph:n{#1}v} {
+ \exp_not:N\__jmt_lwa_arrow_overset:w*[1.5mu][8/10]{\exp_not:N\mathcal{\int_to_Alph:n{#1}}}
+ }
+ }
+ } {}
+ \prop_if_in:NnTF \g__jmt_lwa_selected_presets_prop {abc} {
+ \cs_new:cpn {vell} {
+ \__jmt_lwa_arrow_overset:w{\ell}
+ }
+ \cs_new:cpn {ellv} {
+ \__jmt_lwa_arrow_overset:w{\ell}
+ }
+ } {}
} {}
\endinput
More information about the tex-live-commits
mailing list.