From 73d955d9fba24cf9bcbd63546263ad52357ee5bc Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 19 Jul 2021 20:21:04 +0000 Subject: letterswitharrows (19jul21) git-svn-id: svn://tug.org/texlive/trunk@59993 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/latex/letterswitharrows/README.txt | 6 +++--- .../latex/letterswitharrows/letterswitharrows.pdf | Bin 455408 -> 494439 bytes .../latex/letterswitharrows/letterswitharrows.dtx | 23 ++++++++++++++++----- .../latex/letterswitharrows/letterswitharrows.sty | 15 ++++++++++---- 4 files changed, 32 insertions(+), 12 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/letterswitharrows/README.txt b/Master/texmf-dist/doc/latex/letterswitharrows/README.txt index 41ebce705d6..1a4d4d98fc7 100644 --- a/Master/texmf-dist/doc/latex/letterswitharrows/README.txt +++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/letterswitharrows/letterswitharrows.pdf b/Master/texmf-dist/doc/latex/letterswitharrows/letterswitharrows.pdf index 89edac58623..ae959a886fa 100644 Binary files a/Master/texmf-dist/doc/latex/letterswitharrows/letterswitharrows.pdf and b/Master/texmf-dist/doc/latex/letterswitharrows/letterswitharrows.pdf differ diff --git a/Master/texmf-dist/source/latex/letterswitharrows/letterswitharrows.dtx b/Master/texmf-dist/source/latex/letterswitharrows/letterswitharrows.dtx index 8d54dd6294f..1b2820bd826 100644 --- a/Master/texmf-dist/source/latex/letterswitharrows/letterswitharrows.dtx +++ b/Master/texmf-dist/source/latex/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=| 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/Master/texmf-dist/tex/latex/letterswitharrows/letterswitharrows.sty b/Master/texmf-dist/tex/latex/letterswitharrows/letterswitharrows.sty index edecd094b38..a22a7cabd4a 100644 --- a/Master/texmf-dist/tex/latex/letterswitharrows/letterswitharrows.sty +++ b/Master/texmf-dist/tex/latex/letterswitharrows/letterswitharrows.sty @@ -38,9 +38,10 @@ + \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} \msg_new:nnn {letterswitharrows} {pdf-only} {Only~pdf~output~is~supported.} @@ -56,7 +57,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__jmt_lwa_line_width}~w~ q~ \dim_to_decimal:n{#3#2pt/10}~0~0~1~0~0~cm~ 1~0~0~1~-1~0~cm~ @@ -65,8 +66,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__jmt_lwa_line_width}~w~ \dim_to_decimal:n{#3#1}~0~l~S~ Q } @@ -74,7 +78,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__jmt_lwa_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~ @@ -93,7 +97,7 @@ \cs_new:Nn \__jmt_lwa_arrow_draw_pgf:nnn { \begin{pgfpicture} - \pgfsetlinewidth{#2pt/30} + \pgfsetlinewidth{#2pt*\fp_use:c{g__jmt_lwa_line_width}/10} \pgfsetarrowsstart {Computer~Modern~Rightarrow[width=#2pt*2/10,length=#2pt/10,sharp]} % \pgfsetarrowsstart{\tl_use:N \g__jmt_lwa_pgf_arrow_style_tl} @@ -124,6 +128,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} @@ -227,6 +232,8 @@ presets .initial:n = {abc, ABC, cAcBcC}, tweaks .bool_set:N = \g__jmt_lwa_tweak_shortcuts_bool, tweaks .initial:n = {true}, + linewidth .fp_set:N = \g__jmt_lwa_line_width, + linewidth .initial:n = {.3}, } \ProcessKeysPackageOptions{letterswitharrows} -- cgit v1.2.3