texlive[70673] Master: dashrulex (17mar24)
commits+karl at tug.org
commits+karl at tug.org
Sun Mar 17 20:48:22 CET 2024
Revision: 70673
https://tug.org/svn/texlive?view=revision&revision=70673
Author: karl
Date: 2024-03-17 20:48:22 +0100 (Sun, 17 Mar 2024)
Log Message:
-----------
dashrulex (17mar24)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/dashrulex/
trunk/Master/texmf-dist/doc/latex/dashrulex/README.md
trunk/Master/texmf-dist/doc/latex/dashrulex/dashrulex.pdf
trunk/Master/texmf-dist/doc/latex/dashrulex/dashrulex.tex
trunk/Master/texmf-dist/tex/latex/dashrulex/
trunk/Master/texmf-dist/tex/latex/dashrulex/dashrulex.sty
trunk/Master/tlpkg/tlpsrc/dashrulex.tlpsrc
Added: trunk/Master/texmf-dist/doc/latex/dashrulex/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/dashrulex/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/dashrulex/README.md 2024-03-17 19:48:22 UTC (rev 70673)
@@ -0,0 +1,7 @@
+# The dashrulex package
+
+The `dashrulex` package provides a flexible solution for drawing dashed rules in the body, and currently provides two commands `\hdashrule` and `\hanyrule`. It's written in LaTeX3 and can be used as an alternative to the `dashrule` package.
+
+## License
+
+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
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/doc/latex/dashrulex/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/dashrulex/dashrulex.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/dashrulex/dashrulex.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/dashrulex/dashrulex.pdf 2024-03-17 19:47:27 UTC (rev 70672)
+++ trunk/Master/texmf-dist/doc/latex/dashrulex/dashrulex.pdf 2024-03-17 19:48:22 UTC (rev 70673)
Property changes on: trunk/Master/texmf-dist/doc/latex/dashrulex/dashrulex.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/dashrulex/dashrulex.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/dashrulex/dashrulex.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/dashrulex/dashrulex.tex 2024-03-17 19:48:22 UTC (rev 70673)
@@ -0,0 +1,81 @@
+\documentclass[load-preamble+]{cnltx-doc}
+
+\usepackage{setspace,hologo,dashrulex}
+\usepackage[noto]{newtxmath}
+\setcnltx
+ {
+ package = dashrulex,
+ title = the dashrulex package,
+ version = v1.00,
+ date = 2024/03/16,
+ authors = Qu Yi,
+ info = Draw dashed rules,
+ email = toquyi at 163.com,
+ abstract =
+ {
+ The \pkg*{dashrulex} package provides a flexible solution for drawing dashed rules in the body, and currently provides two commands \cs{hdashrule} and \cs{hanyrule}. It's written in \hologo{LaTeX3} and can be used as an alternative to the \pkg*{dashrule} package.
+ },
+ color-scheme = blue,
+ title-format = \huge\bfseries\scshape,
+ listings-options = {numbers = none,gobble = 2,lineskip = 1pt},
+ pre-output = {\parindent = 0em\setstretch{1.3}},
+ before-skip = \smallskipamount,
+ after-skip = \smallskipamount
+ }
+\makeatletter
+\newcommand{\splitmeta}[3][\code{,}]{\meta{#2}#1\meta{#3}}
+\newcommand{\newsplitarg}[4][\splitmeta]
+ {
+ \newcommand{#2}[2]
+ {\code{\textcolor{argument}{#3\textnormal{#1{##1}{##2}}#4}}}
+ }
+\newcommand{\kvsplit}[3]
+ {
+ \item\code{\option{#1}\cnltx at isvalue\splitmarg{#2}{#3}}
+ \cnltx at checkdefault{\hfill\newline}
+ }
+\newsplitarg{\splitoarg}{[}{]}
+\newsplitarg{\splitmarg}{\{}{\}}
+\newsplitarg{\splitdarg}{(}{)}
+\newnote{\newtag}[1][New]{\textcolor{red}{\ding{73}\ #1}}
+\renewcommand{\emph}[1]{\textcolor{red}{#1}}
+\renewcommand{\cnltx at write@lastname}{}
+\makeatother
+
+\begin{document}
+\section{Preface}
+Sometimes it is necessary to draw dashed rules when writing documents, such as guides in the table of contents and indexes, horizontal lines in headers and footers, and even adding horizontal lines after headings. Macro packages such as \pkg*{dashrule} and \pkg*{nccrules} are available to accomplish this. Considering that \pkg*{dashrule} has not been updated for a long time, \pkg*{dashrulex} rewrites it using \hologo{LaTeX3} syntax and enhances it a bit.
+
+\section{User commands}
+\begin{commands}
+ \command{hdashrule}[\oarg{raise}\oarg{leader}\marg{width}\marg{thickness}\marg{dash rules}]
+ The command to draw horizontal dashed rules, based on the \cs{rule} command, and the same as the \cs{rule} command when the dash rules are empty. \meta{raise} is the vertical offset of the rule. \meta{leader} is the alignment of the dashed line fill, which can be empty, \code{c}, or \code{x} (the default), corresponding to the \cs{leaders}, \cs{cleaders}, and \cs{xleaders} commands, respectively. \meta{width} is the length of the dashed rule, which can be set to \cs{fill} to indicate an arbitrarily long distance when you need to fill the entire horizontal center of the plate. \meta{dash rules} is expressed as \splitmeta[\code{|}]{length 1}{length a}\code{,}\splitmeta[\code{|}]{length 2}{length b}\code{,...}, where \meta{length 1} represents the length of the solid line and \meta{length a} represents the length of the empty space, such as \code{5pt|2pt,3pt}, if the empty space is empty, then it is equal to the solid line length.
+ \begin{example}
+ 1X\rule{2cm}{1pt}x \\
+ 2X\hdashrule{2cm}{1pt}{}x \\
+ 3X\hdashrule{2cm}{1pt}{1pt}x \\
+ 4X\hdashrule{4cm}{1pt}{1pt}x \\
+ 5X\hdashrule[0.5ex]{4cm}{1pt}{1pt}x \\
+ 6X\hdashrule[0.5ex]{4cm}{1pt}{3mm}x \\
+ 7X\hdashrule[0.5ex]{4cm}{1mm}{3mm}x \\
+ 8X\hdashrule[0.5ex]{4cm}{1mm}{3mm|3pt}x \\
+ 9X\hdashrule[0.5ex]{4cm}{1mm}{3mm|3pt,1mm|2pt}x
+ \end{example}
+ \command{hanyrule}[\oarg{leader}\marg{width}\marg{symbol list}]
+ This command sets the length of the dotted rule and fills it with arbitrary symbols. \meta{symbol list} can be more than one symbol and they are separated by \textcolor{red}{commas}. Symbols are best packed in boxes of a certain length, as spacing between symbols is not provided.
+ \begin{example}
+ 1X\hanyrule[]{5cm}{\makebox[6pt][l]{$\cdot$}}x \\
+ 2X\hanyrule[c]{5cm}{\makebox[6pt][l]{$\cdot$}}x \\
+ 3X\hanyrule[x]{5cm}{\makebox[6pt][l]{$\cdot$}}x \\
+ 4X\hanyrule[x]{5cm}{\makebox[6pt][c]{$\cdot$}}x \\
+ 5X\hanyrule[x]{5cm}{\makebox[6pt][c]{$\cdot$},\makebox[6pt]{$\circ$}}x
+ \end{example}
+\end{commands}
+
+\section{Known issues}
+Currently only horizontal dashed line drawing is supported, with future plans to support vertical dashed lines, and even box dashed borders and so on.
+
+\appendix
+\nocite{*}
+
+\end{document}
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/doc/latex/dashrulex/dashrulex.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/dashrulex/dashrulex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/dashrulex/dashrulex.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/dashrulex/dashrulex.sty 2024-03-17 19:48:22 UTC (rev 70673)
@@ -0,0 +1,49 @@
+%
+% ***************** THE DASHRULEX PACKAGE *****************
+%
+% Copyright (C) 2024 by Qu Yi <toquyi at 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 at parse@dash{#1}{#4}{##1} }
+ }
+ \skip_horizontal:n {#3}
+ \mbox{}
+ }
+ }
+\NewDocumentCommand{\drx at parse@dash}
+ {mm>{\SplitArgument{1}{|}}m}
+ {\drx at parse@dash at inner{#1}{#2}#3}
+\cs_set_protected:Npn \drx at parse@dash at 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
Property changes on: trunk/Master/texmf-dist/tex/latex/dashrulex/dashrulex.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2024-03-17 19:47:27 UTC (rev 70672)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2024-03-17 19:48:22 UTC (rev 70673)
@@ -242,7 +242,7 @@
custom-bib customdice customenvs cutwin cv cv4tw cvss cweb-latex
cyber cybercic cyklop cyrillic cyrplain
dad dancers dantelogo darkmode
- dashbox dashrule dashundergaps dataref datax datatool
+ dashbox dashrule dashrulex dashundergaps dataref datax datatool
dateiliste datenumber datestamp
datetime datetime2 datetime2-bahasai datetime2-basque
datetime2-breton datetime2-bulgarian datetime2-catalan
Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc 2024-03-17 19:47:27 UTC (rev 70672)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc 2024-03-17 19:48:22 UTC (rev 70673)
@@ -300,6 +300,7 @@
depend darkmode
depend dashbox
depend dashrule
+depend dashrulex
depend dashundergaps
depend dataref
depend datatool
Added: trunk/Master/tlpkg/tlpsrc/dashrulex.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list.