summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/letterswitharrows
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-07-20 03:00:52 +0000
committerNorbert Preining <norbert@preining.info>2021-07-20 03:00:52 +0000
commit933416e3a978851a263168f5daad76eea18de483 (patch)
treede9843393e3e985dfd0056c4c5f81836aca76c61 /macros/latex/contrib/letterswitharrows
parent38358cf733cc4815df695ae9c5539f8d7deba8e8 (diff)
CTAN sync 202107200300
Diffstat (limited to 'macros/latex/contrib/letterswitharrows')
-rw-r--r--macros/latex/contrib/letterswitharrows/README.txt6
-rw-r--r--macros/latex/contrib/letterswitharrows/letterswitharrows.dtx23
-rw-r--r--macros/latex/contrib/letterswitharrows/letterswitharrows.pdfbin455408 -> 494439 bytes
3 files changed, 21 insertions, 8 deletions
diff --git a/macros/latex/contrib/letterswitharrows/README.txt b/macros/latex/contrib/letterswitharrows/README.txt
index 41ebce705d..1a4d4d98fc 100644
--- a/macros/latex/contrib/letterswitharrows/README.txt
+++ b/macros/latex/contrib/letterswitharrows/README.txt
@@ -1,7 +1,7 @@
The letterswitharrows package
-Copyright 2019-2020 J. M. Teegen
+Copyright 2019-2021 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.
+The letterswitharrows package 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
+For more information, please consult the package documentation in letterswitharrows.pdf
diff --git a/macros/latex/contrib/letterswitharrows/letterswitharrows.dtx b/macros/latex/contrib/letterswitharrows/letterswitharrows.dtx
index 8d54dd6294..1b2820bd82 100644
--- a/macros/latex/contrib/letterswitharrows/letterswitharrows.dtx
+++ b/macros/latex/contrib/letterswitharrows/letterswitharrows.dtx
@@ -54,7 +54,7 @@
% \title{The \pkg{letterswitharrows} package}
% \author{Max Teegen\\ \href{mailto:tex@jmteegen.eu}{tex@jmteegen.eu}}
-% \date{Released 2020-02-04}
+% \date{Released 2021-07-19}
% \maketitle
@@ -140,6 +140,11 @@
% If \verb|#3| is \verb|-| if the arrow should point rightwards and empty otherwise.
% \end{texnote}
+% \DescribeOption{linewidth}
+% Specifying \verb|linewidth=<value>| as a package option allows you to adjust the line width of the arrows to adjust for the weigth of the maths font you are using.
+% The default value is \verb|linewidth=0.3|.
+
+
% \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|.
@@ -153,7 +158,7 @@
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\ProvidesExplPackage {letterswitharrows} {2020-02-04} {} {Draw arrows over math letters.}
+\ProvidesExplPackage {letterswitharrows} {2021/07/19} {} {Draw arrows over math letters.}
\RequirePackage{xparse,l3keys2e,mathtools}
% TODO: I just use mathtools for mathrlap; replace.
@@ -166,6 +171,7 @@
}
% \end{macrocode}
% The drawing code.
+% \changes{2021/07/10}{2021/07/19}{Implement adjustable linewidth.}
% \begin{macro}{\__@@_arrow_draw_special:nnn,\__@@_arrow_draw_pgf:nnn,\__@@_arrow_left:nn,\__@@_arrow_right:nn}
% \begin{macrocode}
\cs_new:Nn \__@@_arrow_draw_special:nnn % length, font size, sign
@@ -175,7 +181,7 @@
q~
1~J~1~j~
1~0~0~\dim_to_decimal:n{#3#2pt/10}~0~0~cm~
- .3~w~
+ \fp_use:c{g_@@_line_width}~w~
q~
\dim_to_decimal:n{#3#2pt/10}~0~0~1~0~0~cm~
1~0~0~1~-1~0~cm~
@@ -184,8 +190,11 @@
1~0~.25~0~0~-1~c~
S~
Q~
+ Q~
+ q~
0~0~m~
-1~0~0~1~0~0~cm~
+ \fp_use:c{g_@@_line_width}~w~
\dim_to_decimal:n{#3#1}~0~l~S~
Q
}
@@ -193,7 +202,7 @@
\tex_special:D {"~
1~setlinecap~1~setlinejoin~
1~0~0~\dim_to_decimal:n{#3#2pt/10}~0~0~6~array~astore~concat~
- .3~setlinewidth~
+ \fp_use:c{g_@@_line_width}~setlinewidth~
gsave~
\dim_to_decimal:n{#3#2pt/10}~0~0~1~0~0~6~array~astore~concat~
1~0~0~1~-1~0~6~array~astore~concat~
@@ -216,7 +225,7 @@
\cs_new:Nn \__@@_arrow_draw_pgf:nnn {
\begin{pgfpicture}
- \pgfsetlinewidth{#2pt/30}
+ \pgfsetlinewidth{#2pt*\fp_use:c{g_@@_line_width}/10}
\pgfsetarrowsstart
{Computer~Modern~Rightarrow[width=#2pt*2/10,length=#2pt/10,sharp]}
% \pgfsetarrowsstart{\tl_use:N \g_@@_pgf_arrow_style_tl}
@@ -244,6 +253,7 @@
% \end{macro}
% The core functions.
+% \changes{2020/05/08}{2020/05/08}{Reset tabskip. Fixes spacing in aligned environments}
% \begin{macro}{\__@@_arrow_overset_style:Nnncnnn,\__@@_arrow_overset:nnnnn}
% \begin{macrocode}
\cs_new:Npn \__@@_arrow_overset_style:Nnncnnn #1#2#3#4#5#6#7 {
@@ -252,6 +262,7 @@
\vbox:n {
\tex_lineskiplimit:D = \maxdimen
\tex_baselineskip:D = 0pt
+ \tex_tabskip:D = 0pt
\tex_lineskip:D = \dim_eval:n {\l_tmpa_dim * 3/2 + #7}
\tex_halign:D { ## \tex_cr:D
\skip_horizontal:n {\l_tmpa_dim / 2}
@@ -370,6 +381,8 @@
presets .initial:n = {abc, ABC, cAcBcC},
tweaks .bool_set:N = \g_@@_tweak_shortcuts_bool,
tweaks .initial:n = {true},
+ linewidth .fp_set:N = \g_@@_line_width,
+ linewidth .initial:n = {.3},
}
\ProcessKeysPackageOptions{letterswitharrows}
% \end{macrocode}
diff --git a/macros/latex/contrib/letterswitharrows/letterswitharrows.pdf b/macros/latex/contrib/letterswitharrows/letterswitharrows.pdf
index 89edac5862..ae959a886f 100644
--- a/macros/latex/contrib/letterswitharrows/letterswitharrows.pdf
+++ b/macros/latex/contrib/letterswitharrows/letterswitharrows.pdf
Binary files differ