diff options
author | Karl Berry <karl@freefriends.org> | 2012-08-18 22:39:12 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-08-18 22:39:12 +0000 |
commit | 7187ab3ef2c3ecf2c08bc3b855cdad3e70aa3f34 (patch) | |
tree | 545f8e192f070d3a854442b67e334209c0fc119b /Master/texmf-dist/source/latex/GS1/rule-D.dtx | |
parent | 436942fe5ad78d0938c03cdd50a4e0ebcf544a0b (diff) |
new latex package GS1 (17aug12)
git-svn-id: svn://tug.org/texlive/trunk@27453 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/GS1/rule-D.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/GS1/rule-D.dtx | 128 |
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 |