diff options
author | Karl Berry <karl@freefriends.org> | 2024-02-01 21:06:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-02-01 21:06:33 +0000 |
commit | e9f9fa8d67e7d15e100a1c9780cd40c2ece4b6b9 (patch) | |
tree | 986a35b15f2ed53327f9c2646710a02136325022 /Master/texmf-dist/tex/latex/leftindex | |
parent | 0fc752e8c17b491e0e8626854e2185f925bccd62 (diff) |
leftindex (1feb24)
git-svn-id: svn://tug.org/texlive/trunk@69660 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/leftindex')
-rw-r--r-- | Master/texmf-dist/tex/latex/leftindex/leftindex.sty | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/leftindex/leftindex.sty b/Master/texmf-dist/tex/latex/leftindex/leftindex.sty index fdd7a6a822b..406c7a973e5 100644 --- a/Master/texmf-dist/tex/latex/leftindex/leftindex.sty +++ b/Master/texmf-dist/tex/latex/leftindex/leftindex.sty @@ -1,9 +1,9 @@ \RequirePackage{xparse,mathtools} -\ProvidesExplPackage{leftindex}{2020/08/25}{0.1beta}{} +\ProvidesExplPackage{leftindex}{2024/01/31}{0.2beta}{} %---------------------------------------------------------------- % leftindex -- left indices with better spacing -% Version: 0.1beta +% Version: 0.2beta % Maintained by Sebastian Ørsted % E-mail: sorsted@gmail.com % Released under the LaTeX Project Public License v1.3c or later @@ -35,7 +35,7 @@ \manualleftindex { #2 } { #1 } { #3 } { #4 } } { - \manualleftindex { #5 } { #1 } { #3 } { #4 } + \manualleftindex { #1 } { #1 } { #3 } { #4 } } } { @@ -44,6 +44,27 @@ #5 } +\DeclareDocumentCommand\LeftIndex { o o E{^_}{{}{}} } +{ + % #1 = slanting phantom + % #2 = height phantom + % #3 = left superscript + % #4 = left subscript + \IfValueTF {#1} + { + \IfValueTF{#2} + { + \manualleftindex { #2 } { #1 } { #3 } { #4 } + } + { + \manualleftindex { #1 } { #1 } { #3 } { #4 } + } + } + { + \manualleftindex { } { } { #3 } { #4 } + } +} + \ExplSyntaxOn \cs_new_protected:Npn\leftindex_kern_horizontal:n#1 @@ -131,13 +152,13 @@ \box_wd:N \l__leftindex_subscript_temp_box } } + \mathop{} \leftindex_kern_horizontal:n { \dim_max:nn { \l__leftindex_width_of_superscript_dim } { \l__leftindex_width_of_subscript_dim } } - \mathop{} \mathopen{ \vphantom { #2 } } \tl_if_blank:nF { #4 } { |