summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-03-17 19:48:22 +0000
committerKarl Berry <karl@freefriends.org>2024-03-17 19:48:22 +0000
commit9cc90d88c282b4e608952238f7187924c08cabbe (patch)
treee097c411a2ca41f9bea5cce3e9023c8703adda6b /Master/texmf-dist/tex/latex
parentbaec0e743a16b0a97f725febabbc98d9b116e430 (diff)
dashrulex (17mar24)
git-svn-id: svn://tug.org/texlive/trunk@70673 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/dashrulex/dashrulex.sty49
1 files changed, 49 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/dashrulex/dashrulex.sty b/Master/texmf-dist/tex/latex/dashrulex/dashrulex.sty
new file mode 100644
index 00000000000..aba9f203d3f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/dashrulex/dashrulex.sty
@@ -0,0 +1,49 @@
+%
+% ***************** THE DASHRULEX PACKAGE *****************
+%
+% Copyright (C) 2024 by Qu Yi <toquyi@163.com>
+%
+% This work may be distributed and/or modified under the
+% conditions of the CC-BY 4.0 License.
+% The latest version of this license is in
+% https://creativecommons.org/licenses/by/4.0/legalcode
+\NeedsTeXFormat{LaTeX2e}[2012/02/12]
+\RequirePackage{xparse}
+\ProvidesExplPackage{dashrulex}{2024/03/16}{1.00}
+ {Customize superscripts and subscripts}
+\DeclareDocumentCommand{\hdashrule}{O{0pt}O{x}mmm}
+ {
+ \tl_if_blank:nTF {#5}
+ { \rule[#1]{#3}{#4} }
+ {
+ \mbox{}
+ \use:c { #2leaders }
+ \hbox:n
+ {
+ \clist_map_inline:nn {#5}
+ { \drx@parse@dash{#1}{#4}{##1} }
+ }
+ \skip_horizontal:n {#3}
+ \mbox{}
+ }
+ }
+\NewDocumentCommand{\drx@parse@dash}
+ {mm>{\SplitArgument{1}{|}}m}
+ {\drx@parse@dash@inner{#1}{#2}#3}
+\cs_set_protected:Npn \drx@parse@dash@inner #1#2#3#4
+ {
+ \IfNoValueTF{#4}
+ {\rule[#1]{#3}{#2}\skip_horizontal:n {#3}}
+ {\rule[#1]{#3}{#2}\skip_horizontal:n {#4}}
+ }
+\NewDocumentCommand{\hanyrule}{O{x}mm}
+ {
+ \mbox{}
+ \use:c { #1leaders }
+ \hbox:n { \clist_map_inline:nn {#3} {##1} }
+ \skip_horizontal:n {#2}
+ \mbox{}
+ }
+\endinput
+%
+% End of file `dashrulex.sty'. \ No newline at end of file