summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/GS1/rule-D.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/GS1/rule-D.dtx')
-rw-r--r--Master/texmf-dist/source/latex/GS1/rule-D.dtx128
1 files changed, 128 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/GS1/rule-D.dtx b/Master/texmf-dist/source/latex/GS1/rule-D.dtx
new file mode 100644
index 00000000000..817583b77f8
--- /dev/null
+++ b/Master/texmf-dist/source/latex/GS1/rule-D.dtx
@@ -0,0 +1,128 @@
+% \iffalse meta-comment
+%
+%% File: rule-D.dtx Copyright (C) 2012 Markus Kohm
+%%
+%% It may be distributed and/or modified under the conditions of the
+%% LaTeX Project Public License (LPPL), either version 1.3c of this
+%% license or (at your option) any later version. The latest version
+%% of this license is in the file
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This file is part of the "GS1 bundle" (The Work in LPPL)
+%% and all files in that bundle must be distributed together.
+%%
+%% The released version of this bundle is available from CTAN.
+%%
+%% -------------------------------------------------------------------------
+%
+%<*driver|package>
+\RequirePackage{l3names}
+\GetIdInfo$Id: rule-D.dtx 3 2012-07-27 10:33:18Z mjk $
+ {rule functions for LaTeX3}
+%</driver|package>
+%<*driver>
+\documentclass{l3doc}
+\begin{document}
+ \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \title{^^A
+% The \pkg{rule-D} Package\\
+% Rule Functions\thanks
+% {^^A
+% This file describes v\ExplFileVersion,
+% last revised \ExplFileDate.^^A
+% }^^A
+% }
+%
+% \author{^^A
+% Markus Kohm\thanks
+% {^^A
+% E-mail: \href{mailto:komascript@gmx.info}{komascript@gmx.info}^^A
+% }^^A
+% }
+%
+% \date{Released \ExplFileDate}
+%
+% \maketitle
+%
+% \begin{documentation}
+% At \LaTeXe{} you have command \cmd{\rule} to make horizontal and vertical
+% rules and even boxes. Currently there's no L3 command for this. This
+% module provides two new L3 functions for rules. The ``-D'' in the module
+% name indicates, that currently the implementation uses deprecated
+% functions like \cmd{\tex_vrule:D}. Nevertheless, the new rule functions
+% aren't declared to be deprecated.
+%
+% This package has been made only, because \pkg{GS1} needs such rule
+% functions. So maybe it's simply a helper package for \pkg{GS1}.
+%
+%
+% \begin{function}{\rule:nn , \rule:nnn}
+% \begin{syntax}
+% "\rule:nnn" \Arg{dimexpr_{raise}} \Arg{dimexpr_{width}}^^A
+% \Arg{dimexpr_{height}}
+% "\rule:nn" \Arg{dimexpr_{width}} \Arg{dimexpr_{height}}
+% \end{syntax}
+% Draw a rule of width \meta{dimexpr_{width}}, height
+% \meta{dimexpr_{height}} and raise it by \meta{dimexpr_{raise}}. It the
+% \meta{dimex_{raise}} has not been given, the rule will be drawn at the
+% base line.
+% \end{function}
+%
+% \end{documentation}
+%
+% \begin{implementation}
+%
+% \section{\pkg{rule-D} implementation}
+% \label{sec:rule-D:implementation}
+%
+%\iffalse meta-comment
+%<*package>
+%\fi
+%
+% First of all we have to setup package information:
+% \begin{macrocode}
+\ProvidesExplPackage
+ {rule-D} {\ExplFileDate} {\ExplFileVersion}
+ {experimental~L3~rule~functions}
+% \end{macrocode}
+%
+% We need the stable kernel of L3:
+% \begin{macrocode}
+\RequirePackage{expl3}
+% \end{macrocode}
+%
+% \begin{macro}{\rule:nn , \rule:nnn}
+% \begin{macrocode}
+\cs_new:Npn \rule:nn #1#2
+ {
+ \rule:nnn { \c_zero_dim } { #1 } { #2 }
+ }
+\cs_new:Npn \rule:nnn #1#2#3
+ {
+ \leavevmode
+ \hbox:n
+ {
+ \tex_vrule:D width \dim_eval:n { #2 }
+ height \dim_eval:n { #1 + #3 }
+ depth -\dim_eval:n { #1 }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%\iffalse meta-comment
+%</package>
+%\fi
+%
+% \end{implementation}
+%
+% \PrintIndex
+%
+\endinput
+%
+% end of file