diff options
Diffstat (limited to 'macros/latex/contrib/dashrulex/dashrulex.tex')
-rw-r--r-- | macros/latex/contrib/dashrulex/dashrulex.tex | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/macros/latex/contrib/dashrulex/dashrulex.tex b/macros/latex/contrib/dashrulex/dashrulex.tex index 1d4ce592b9..acf2025a28 100644 --- a/macros/latex/contrib/dashrulex/dashrulex.tex +++ b/macros/latex/contrib/dashrulex/dashrulex.tex @@ -1,13 +1,13 @@ \documentclass[load-preamble+]{cnltx-doc} -\usepackage{setspace,hologo,dashrulex} +\usepackage{setspace,hologo,dashrulex,tikz} \usepackage[noto]{newtxmath} \setcnltx { package = dashrulex, title = the dashrulex package, - version = v1.00, - date = 2024/03/16, + version = v1.00a, + date = 2024/03/17, authors = Qu Yi, info = Draw dashed rules, email = toquyi@163.com, @@ -49,7 +49,7 @@ Sometimes it is necessary to draw dashed rules when writing documents, such as g \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. + The command to draw horizontal dashed rules, based on the \cs{rule} command, and the same as the \cs{rule} command when the \meta{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 \\ @@ -64,11 +64,21 @@ Sometimes it is necessary to draw dashed rules when writing documents, such as g \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 + \newcommand{\dblelement} + {% + \tikz[color=blue] + { + \draw[line width=0.8mm](0mm,1.1mm)--(3mm,1.1mm); + \draw[line width=0.3mm](0mm,0mm)--(3mm,0mm); + }% + } + 1X\hanyrule[]{5cm}{\makebox[8pt][l]{$\cdot$}}x \\ + 2X\hanyrule[c]{5cm}{\makebox[8pt][l]{$\cdot$}}x \\ + 3X\hanyrule[x]{5cm}{\makebox[8pt][l]{$\cdot$}}x \\ + 4X\hanyrule[c]{5cm}{\makebox[8pt]{$\cdot$}}x \\ + 5X\hanyrule[x]{5cm}{\makebox[8pt]{$\cdot$}}x \\ + 6X\hanyrule[x]{5cm}{\makebox[8pt]{$\cdot$},\makebox[8pt]{$\circ$}}x \\ + 7X\hanyrule[x]{5cm}{\makebox[5mm]{\dblelement}}x \end{example} \end{commands} |