summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/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/doc/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/doc/latex')
-rw-r--r--Master/texmf-dist/doc/latex/dashrulex/README.md7
-rw-r--r--Master/texmf-dist/doc/latex/dashrulex/dashrulex.pdfbin0 -> 54472 bytes
-rw-r--r--Master/texmf-dist/doc/latex/dashrulex/dashrulex.tex81
3 files changed, 88 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/dashrulex/README.md b/Master/texmf-dist/doc/latex/dashrulex/README.md
new file mode 100644
index 00000000000..c0e441ac99a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/dashrulex/README.md
@@ -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
diff --git a/Master/texmf-dist/doc/latex/dashrulex/dashrulex.pdf b/Master/texmf-dist/doc/latex/dashrulex/dashrulex.pdf
new file mode 100644
index 00000000000..71e4597be0d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/dashrulex/dashrulex.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/dashrulex/dashrulex.tex b/Master/texmf-dist/doc/latex/dashrulex/dashrulex.tex
new file mode 100644
index 00000000000..1d4ce592b96
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/dashrulex/dashrulex.tex
@@ -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@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@isvalue\splitmarg{#2}{#3}}
+ \cnltx@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@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