summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-07-04 23:06:08 +0000
committerKarl Berry <karl@freefriends.org>2010-07-04 23:06:08 +0000
commit8cb156bb991f25949dbb5dd83a06cfc81fa417bd (patch)
tree305404df1077fc974d5dd4a6c432f6a860353ea3 /Master
parentc771a14f26b294657e2236b705a7dc8ea9688bfd (diff)
new latex package drs (3jul10)
git-svn-id: svn://tug.org/texlive/trunk@19232 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/drs/README13
-rw-r--r--Master/texmf-dist/doc/latex/drs/drsdoc.pdfbin0 -> 102882 bytes
-rw-r--r--Master/texmf-dist/doc/latex/drs/drsdoc.tex236
-rw-r--r--Master/texmf-dist/tex/latex/drs/drs.sty278
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/collection-pictures.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/drs.tlpsrc0
7 files changed, 529 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/drs/README b/Master/texmf-dist/doc/latex/drs/README
new file mode 100644
index 00000000000..8f36d385ffc
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/drs/README
@@ -0,0 +1,13 @@
+The package drs.sty draws Discourse Representation Structures (DRSs). It can draw
+embedded DRSs, if-then conditions and quantificational “duplex conditions” (with
+a properly scaled connecting diamond). Formatting parameters allow the user to
+control the appearance and placement of DRSs, and of DRS variables and conditions.
+
+Author: Alexis Dimitriadis
+
+The package may be distributed and/or modified unter the conditions of the
+LaTeX Project Public License, either version 1.3 of this license or (at your option)
+any later version.
+
+The latest version of the LaTeX Project Public License can be found at this URL:
+http://www.latex-project.org/lppl.txt
diff --git a/Master/texmf-dist/doc/latex/drs/drsdoc.pdf b/Master/texmf-dist/doc/latex/drs/drsdoc.pdf
new file mode 100644
index 00000000000..fa6abe25973
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/drs/drsdoc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/drs/drsdoc.tex b/Master/texmf-dist/doc/latex/drs/drsdoc.tex
new file mode 100644
index 00000000000..22583599088
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/drs/drsdoc.tex
@@ -0,0 +1,236 @@
+\documentclass[11pt]{article}
+
+% 10 Jun 2010: Added memoir/array compatibility, switched to pict2e, changed some flags.
+% Updated documentation to describe the new features.
+
+% 17 Feb 2004: Corrected some typos in documentation
+
+\usepackage{drs,pict2e}
+\usepackage{times}
+
+\chardef\BS=`\\ % It only works in \tt font
+
+\def\ctt#1{{\texttt{\BS #1}}} % \ctt command --> \command (in tt)
+\def\citem[#1 #2]{\item[\ctt{#1}{\textsl{#2}}]} % header of command plus argument
+
+\advance\textheight by 0.7in
+\advance\textwidth by 0.8 in
+\advance\oddsidemargin by -0.4in
+\topmargin=-0.3in
+
+\begin{document}
+
+\begin{center}
+{\bfseries Drs.sty, a \LaTeX\ package for Discourse Representation Structures}
+\\[6pt]
+Alexis Dimitriadis \\[6pt]
+Version 1.1\\[6pt]
+June 10, 2010 \\[1.5ex]
+\end{center}
+
+\noindent
+This package draws Discourse Representation Structures (DRSs). It can draw
+embedded DRSs, if-then conditions and quantificational ``duplex conditions''
+(with a properly scaled connecting diamond). Formatting parameters allow the
+user to control the appearance and placement of DRSs, and of DRS variables and
+conditions.
+
+You should use this package together with \emph{pict2e.sty,} which allows better diagonal lines to be drawn. It is not automatically loaded by \emph{drs.sty,} but will be utilized if it you do load it.
+
+\section{History}
+
+This package is derived from the DRS macros in the style \emph{covington.sty,}
+written by Michael A. Covington. I am grateful to him for allowing
+modification and redistribution of his code. The present style retains the
+basic design (command syntax, use of the \verb|tabular| environment to
+construct the DRSs) and is intended to be backward compatible. It
+adds commands for duplex conditions and logical connectives, formatting
+options, better spacing, and an absurdly elaborate algorithm for calculating
+the size of the diamond used in duplex conditions.
+
+Please direct suggestions, bug reports, or other comments to Alexis
+Dimitriadis, \emph{a.dimitriadis} \emph{@uu.nl.}
+As usual,
+I cannot promise this package will do what you want it to, but I will
+try to help if there is a problem.
+
+
+\section{Box-building commands}
+These commands can be embedded in each other as desired.
+
+\begin{description}
+\citem [drs \{variables\}\{conditions\}]~
+
+ Typesets a DRS in a box according to the formatting options in
+effect (see below). Conditions should be separated by \verb|\\|. If the
+variables argument is completely empty (given as \verb|{}|), no space is
+provided for variables at the top of the box. To leave an empty line, give a
+space as the list of variables (\verb|{ }| or \verb|{~}|).
+
+\begin{verbatim}
+\drs{x y}{Jones(x) \\ Ulysses(y) \\ x owns y}
+\end{verbatim}
+\drs{x y}{Jones(x) \\ Ulysses(y) \\ x owns y}
+
+\newpage
+\citem[drs* \{variables\}\{conditions\}]~
+
+Top-level DRSs are positioned on the page according to a number of formatting
+parameters (see next section). To generate a DRS without the extra spacing,
+define it using \verb|\drs*| rather than \verb|\drs|.
+
+\citem[ifdrs \{lvar\}\{lcond\}\{rvar\}\{rcond\}]
+
+Forms two DRSs joined by an arrow. This command is just a special case of \verb|\condrs|.
+
+\begin{verbatim}
+\drs{x}{Jones(x) \\
+ \ifdrs{y}{donkey(y)\\x owns y}
+ {z w}{z = x\\ w = y\\ z feeds w}}
+\end{verbatim}
+
+\drs{x}{Jones(x) \\
+ \ifdrs{y}{donkey(y)\\x owns y} {z w}{z = x\\ w = y\\ z feeds w}}
+%If Jones owns a donkey, he feeds it.
+
+\citem[condrs \{lvar\}\{lcond\}\{connective\}\{rvar\}\{rcond\}]~
+
+Connects two DRSs with the middle argument, presumably a logical connective
+like \verb|$\vee$| or \verb|$\wedge$|. (You must manually switch to math mode
+if it's needed). This is provided as a separate
+command because the spacing needs certain adjustments. The connective is always put in size \verb|\large|, which is appropriate for normal-sized text. If the text of your DRS is in a different size, manually resize the connective to be one step larger; for example,
+\verb|{\LARGE $\vee$}| if the DRS text is \verb|\Large|.
+
+\citem[qdrs \{lvar\}\{lcond\}\{quantifier\}\{qvar\}\{rvar\}\{rcond\}]~\par
+
+Forms a duplex condition. The arguments \emph{quantifier} and \emph{qvar} are
+placed in the diamond connecting the left and right DRSs, which is sized to
+fit them. The \emph{quantifier} argument may contain newlines (\verb|\\|), if necessary.
+
+\begin{verbatim}
+\drs{X}{ the lawyers(X) \\
+ \qdrs{x}{x $\in$ X}
+ {every}{x}
+ {y}{secretary(y) \\ x hired y}}
+\end{verbatim}
+\drs{X}{ the lawyers(X) \\
+ \qdrs{x}{x $\in$ X} {every}{x} {y}{secretary(y) \\ x hired y}}
+
+\citem[negdrs \{variables\}\{conditions\}]~
+
+Produces a DRS preceded by the negation symbol.
+
+\citem[drsdiamond \{quantifier\}\{variable\}] ~
+
+Produces the
+automatically scaling diamond used by \verb|\qdrs|. Perhaps it is useful to call it
+directly for specialized uses. An absurdly fancy scaling algorithm
+draws a diamond of the right size and places the text at the right height.
+The algorithm is optimized for cases where the variable is narrower than the
+quantifier text, but works well for a variety of shapes, including multi-line
+quantifier names (use {\tt \BS\BS} to break lines, as in: {\tt
+at~least\BS\BS one}). If it does the wrong thing
+for you, try padding the text with non-breaking spaces (\verb|~|).
+
+\end{description}
+
+\noindent
+For compatibility with the \emph{covington.sty} macros, the following commands
+are also supported:
+
+\begin{description}
+\citem[sdrs \{sentence\}\{variables\}\{conditions\}] ~
+
+Just like \verb|\drs|, but
+the first argument is a sentence to be displayed above the DRS.
+
+\citem[alifdrs \{lvar\}\{lcond\}\{rvar\}\{rcond\}]~
+
+Just like \verb|\ifdrs|, but shifted to the left so that the conditions in it,
+if left-adjusted, will line up with unembedded DRS conditions.
+
+\end{description}
+
+\section{Formatting parameters}
+
+The following commands may be redefined to control the appearance of the DRS
+boxes.
+
+\begin{description}
+
+\citem[drscondfont ] The font used for the DRS conditions. Default:
+\verb|\rm|. If necessary, it can be redefined to a macro that takes an argument, e.g.:
+
+ \verb|\renewcommand\drscondfont[1]{\emph{#1}}|
+
+ The font properties selected with this macro (e.g., italics) will also apply to the DRS variables, except as overridden by \verb|\drsvarfont|.
+
+\citem[drsvarfont ] Additional font settings used for the DRS variables. This macro modifies the font style already in effect from \verb|\drscondfont|. Default:
+ \verb|\it|. If necessary, it can be redefined to a macro that takes an argument.
+
+\citem[drsseparator ] The separator between variables and conditions. By
+default it is \verb|\hline|, but can be redefined to suppress the line (or to draw
+other line styles, if appropriate). To suppress the line, put the following
+in the preamble of your document:
+
+\verb|\renewcommand\drsseparator{\relax}|
+
+\citem[drsalignment ] Alignment of the contents of the DRS, in the form of a
+\{tabular\} alignment parameter. The default is {\tt c} (centered) but can be
+changed to {\tt l} (or even {\tt r} if you wish).
+
+\citem[drsboxalignh ] Horizontal alignment of the top-level DRS box in the surrounding text.
+You can ask for left-aligned ({\tt l}) or centered boxes. The default is {\tt c.}
+
+\citem[drsboxalignv ] Vertical alignment of the top-level DRS box with the
+baseline of the text. The default is {\tt c} (centered on the baseline); {\tt t} and
+{\tt b} are also available. Embedded DRS boxes are always centered on the
+baseline.
+
+\citem[drsarraystretch ] This parameter gives the value of
+\verb|\arraystretch| used when making DRS boxes. Undefined by default, which
+is equivalent to the value~\emph{1.0.} You can change it to other numbers (without a dimension) to stretch or compress linespacing.
+
+\citem[drslinewidth ] The thickness of the lines used to draw the DRS boxes. The default is the current value of \verb|\arrayrulewidth| (which controls the width of table borders), normally 0.4pt. If you redefine this you should definitely load the package \emph{pict2e.sty} (recommended anyway), which will allow LaTeX to set the diagonal lines of the quantifier diamond to the same thickness.
+
+\end{description}
+
+
+\subsection{Compatibility with \emph{covington.sty}}
+
+Although this package should accept DRSs written for the \emph{covington.sty}
+macros, the appearance of the output is not the same by default. To match
+that style, specify the following formatting parameters:
+
+\begin{itemize}
+\item[]
+\begin{verbatim}
+\renewcommand\drscondfont{\it}
+\renewcommand\drsalignment{l}
+\renewcommand\drsboxalignh{l}
+\end{verbatim}
+\end{itemize}
+
+
+\section{Other packages}
+
+I recommend that you use \emph{drs.sty} in conjunction with \emph{pict2e.sty,}
+which improves \LaTeX's picture drawing capabilities. Your DRS diamonds will look a lot
+better if you do. \emph{Drs.sty} is also compatible with \emph{eepic.sty,} which has similar
+function but only works for DVI output (with PostScript enhancements). \emph{Drs.sty} will not
+automatically load either package, but will take advantage of their capabilities if one is loaded.
+
+I have tried to make \emph{drs.sty} work well with doublespacing. Because of
+shortcomings of the doublespacing macros, the boxes might still be placed
+too close to each other. Perhaps some day this will be corrected in future versions
+of \emph{setspace.sty} (but I requested the fix years ago, so don't hold your breath). Until then, I have provided a work-around which you
+can use if you are using \emph{setspace.sty.} Place the command
+\verb|\drshacksetspace| in your document preamble, somewhere after both packages
+have been included, to redefine certain \emph{setspace} internals so that
+boxes can be properly spaced. This is turned off by default since it
+is a hack and might cause unexpected problems.
+
+Starting with version 1.1, \emph{drs.sty} is compatible with \emph{memoir.cls} and the reimplementation of the \emph{tabular} and \emph{array} environments used by \emph{memoir} and \emph{array.sty.} However, the extra column types these provide cannot be used with \emph{drs} commands. Only {\tt c, l} and {\tt r} are accepted.
+
+\end{document}
+
diff --git a/Master/texmf-dist/tex/latex/drs/drs.sty b/Master/texmf-dist/tex/latex/drs/drs.sty
new file mode 100644
index 00000000000..2a9fdd18fd9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/drs/drs.sty
@@ -0,0 +1,278 @@
+%%%
+%%% Macros to typeset Discourse Representation Structures (DRSs).
+%%% Based on DRS macros in covingtn.sty
+%%%
+%%% Written by Alexis Dimitriadis (a.dimitriadis at uu.nl)
+%%%
+%%% This package may be used, distributed and modified unter the terms of the
+%%% LaTeX Project Public License, either version 1.3 of this license or (at your
+%%% option) any later version.
+%%%
+%%% The latest version of the LaTeX Project Public License can be found at this URL:
+%%% http://www.latex-project.org/lppl.txt
+
+\ProvidesPackage {drs}
+ [2010/06/10 typeset Discourse Representation Structures v. 1.1b]
+
+
+% REVISION HISTORY
+%
+% 2010/06/10 v. 1.1 Small modifications for compatibility with memoir and array.sty.
+% Thanks to Alan Munn and Antonio Fortin for reporting the problem.
+% Added robustness enhancements, pict2e support, and LPPL license.
+%
+% 2004/02/17 Corrected some typos in documentation
+%
+% 2000/06/15 v. 1.0 Original stable version
+
+
+
+%% This package draws Discourse Representation Structures (DRSs). It can draw
+%% embedded DRSs, if-then conditions and quantificational ``duplex
+%% conditions'' (with a properly scaled connecting diamond). Formatting
+%% parameters allow the user to control the appearance and placement of DRSs,
+%% and of DRS variables and conditions.
+
+% \drs typesets a DRS in box notation a la Kamp.
+% \drs* Same, but typeset as a ``partial'' drs (centered on the
+% baseline, and with no extra spacing above or below)
+%
+% Arguments:
+% 1. List of discourse variables
+% 2. List of conditions separated by \\
+%
+% Example: \drs{X}{donkey(X)\\green(X)}
+%
+% Example: \drs{}{purple(X,Y)} (no variables line)
+%
+% Example: \drs{X}
+% {named(X,`Pedro') \\
+% \drs{Y}{donkey(Y)\\owns(X,Y)}~~
+% {\large $\Rightarrow$}~
+% \drs{~}{feeds(X,Y)}
+% }
+
+% \ifdrs forms 2 DRSes joined with a big arrow.
+% Usually used for DRSes nested within another.
+%
+% Example: \ifdrs{X}{donkey(X)\\hungry(X)}
+% {~}{feeds(Pedro,X)}
+
+% \qdrs Form a ``duplex condition'' representing a quantifier.
+%
+% Example: \qdrs{}{man(x)}{every}{x}{y}{mother-of(x, y)\\
+% loves(x, y)}
+
+% \negdrs forms a DRS preceded by the negation symbol.
+%
+% Example: \negdrs{X}{donkey(X)\\green(X)}
+
+% \sdrs like \drs but first argument is a sentence
+% to be displayed above the drs.
+%
+% Example: \sdrs{A donkey is green.}{X}{donkey(X)\\green(X)}
+
+% \alifdrs is like \ifdrs but shifted to the left so that an
+% embedded `if' structure will line up with ordinary
+% DRS conditions.
+
+% memoir-compatible definitions; if you use article.cls, \it and \rm also work
+\def\drsvarfont{\normalfont\itshape} % Font for variables
+\def\drscondfont{\normalfont\rmfamily} % Font for conditions
+
+\let\drsseparator=\hline % Separator between variables and conditions
+
+\let\drsalignment=c % Alignment of material in boxes (l/c/r)
+
+\let\drsboxalignh=c % Horizontal alignment of top-level DRS box in page
+\let\drsboxalignv=c % Vertical alignment (with the baseline: t/c/b)
+
+% \def\drsarraystretch{1} % undefined by default: value for \arraystretch
+
+\edef\drslinewidth{\the\arrayrulewidth} % Line thickness: Start with default for tabular
+
+\newcount\@drslevel \@drslevel=0
+
+\def\drs@strut{{\large\strut}}
+
+
+% \drs* gives a ``partial DRS'' (treated as if it appears inside another DRS)
+% \drs begins a group that's ended by \@drs
+\newcommand{\drs}{\bgroup
+ \@drs@set@align
+ \@ifstar{\advance\@drslevel by 1 \relax} \relax
+ \expandafter\@drs\@drs@cleanalign }
+
+% These contortions are required because memoir and array will not accept a macro
+% as a column alignment specifier. Simpler solutions would be possible if we KNEW whether
+% \drsalignment has been set with \def/renewcommand or with \let. Restricting the user is
+% ugly, so we \def a macro from what we're given.
+%
+\def\@drs@set@align{%
+ \def\@drs@cleanalign{c}% a default, in case of bad values
+ % \expandafter is needed in case \drsalignment was \def'ed; with \let, it's harmless
+ \expandafter\ifx \drsalignment c\def\@drs@cleanalign{c}\fi
+ \expandafter\ifx \drsalignment l\def\@drs@cleanalign{l}\fi
+ \expandafter\ifx \drsalignment r\def\@drs@cleanalign{r}\fi }
+
+\newcommand{\@drs}[3]
+{\advance\@drslevel by 1 \relax
+ \leavevmode
+ \ifnum\@drslevel>1
+ \let\drsboxalignv=c% Embedded boxes should be centered on the baseline
+ \else % Alignment options for top-level boxes only:
+ \expandafter\ifx \drsboxalignh c\hbox{}\hfil \fi \fi
+ % \expandafter is needed if \drsboxalignh was \def'ed; with \let, it's harmless
+ \arrayrulewidth=\drslinewidth
+ \@ifundefined{drsarraystretch} {} {\edef\arraystretch{\drsarraystretch}}%
+ \begin{tabular}[\drsboxalignv]{|@{}r@{}|}
+ \ifnum\@drslevel>1\noalign{\vskip 0.7ex}\fi %% ??
+ \hline
+ \drscondfont
+ {\begin{tabular}[b]{#1}
+ % Do not allocate space for variables if none are given
+ \def\@tempa{#2}\ifx\@tempa\empty \else
+ \drs@strut
+ \drsvarfont {\ignorespaces #2\strut\relax }\\
+ \drsseparator % Spacing is the same whether this is \hline or \relax
+ \fi
+ \drs@strut % extra space above and below (text) condition
+ \strut % A failsafe, in case the user selected a large font
+ \ignorespaces #3 % do not place \relax here! It confuses the next test
+ % End line unless the user already did
+ \ifvmode \else \\ \fi
+ % (can't vspace here or the line will come out wrong)
+ \end{tabular}}%
+ \vrule height 0pt width 0pt depth \baselinestretch\dp\strutbox
+ \drs@strut % extra space above and below (text) conditions
+ \\[2pt] \hline
+ \ifnum\@drslevel>1\noalign{\vskip 0.7ex}\fi % extra for embedded DRSs
+ \end{tabular}\egroup} % close the \bgroup in \drs
+
+
+% Connect two DRSs with the middle argument (presumably a logical connective).
+% This is worth providing because centering would separate DRSs from the
+% connectives, unless everything is enclosed in an mbox as we do here.
+\newcommand\condrs[5]
+ {\mbox{\let\drsboxalignv=c\drs{#1}{#2}{\large\ \ {#3}\ \ }\drs{#4}{#5}}}
+
+\newcommand{\ifdrs}[4]{\condrs{#1}{#2}{$\Rightarrow\!\,$}{#3}{#4}}
+
+\newcommand{\qdrs}[6]
+ {\mbox{\let\drsboxalignv=c\drs{#1}{#2}\drsdiamond{#3}{#4}\drs{#5}{#6}}}
+
+\newcommand{\negdrs}[2]
+ {\mbox{{\large $\neg$ }\drs{#1}{#2}~}} % offset by a ~ for better centering
+
+% like \ifdrs but shifted to the left so that an embedded `if' structure will
+% line up with ordinary DRS conditions. (Useful for left-aligned DRSs only).
+\newcommand{\alifdrs}[4]
+ {\mbox{$\!\!\!$\ifdrs{#1}{#2}{#3}{#4}}}
+
+% A DRS with the associated sentence.
+\newcommand{\sdrs}[3]
+{\begin{tabular}{l}
+\mbox{\it #1} \\
+~ \\
+\drs{#2}{#3}
+\end{tabular}}
+
+
+
+\newbox\@drsbox
+
+% Draw a diagonal square (diamond) containing a quantifier and variable.
+%
+% Ridiculously complicated diamond algorithm: fit the smallest diamond around
+% the _trapezoid_ enclosing a longer top line and a short variable at the
+% bottom. Special-case boxes with really, really wide top part.
+%
+% Syntax: \drsdiamond{quantifier}{variable}
+\newcommand{\drsdiamond}[2]{{%
+ \setbox\@drsbox\hbox{\def\baselinestretch{1}\@currsize
+ \begin{tabular}{@{}c@{}}
+ \drscondfont {#1}\\\drsvarfont {~#2~\null}\end{tabular}}%
+ % Compute the necessary dimensions
+ \@tempcnta=\ht\@drsbox \relax
+ \advance\@tempcnta by \dp\@drsbox \relax
+ \edef\@H{\the\@tempcnta}% % height
+ %
+ \@tempcnta=\wd\@drsbox
+ \edef\@boxdims{(\the\@tempcnta,\@H)}% % box dimensions
+ \divide\@tempcnta by 2
+ \edef\@A{\the\@tempcnta}% % 1/2 top width
+ %
+ % Measure the bottom line separately so we can pretend we're a trapezoid
+ \setbox\@tempboxa\hbox{ \drsvarfont{#2 }}%
+ \@tempcnta=\wd\@tempboxa
+ \divide\@tempcnta by 2
+ \edef\@B{\the\@tempcnta}% % 1/2 bottom row width
+ %
+ \@tempcnta=\@H
+ \advance\@tempcnta by \@B
+ \ifnum \@A > \@tempcnta % Angle is less than 45 degrees: center on top part
+ % start over: measure just the top part
+ \setbox\@tempboxa\hbox{\def\baselinestretch{1}\@currsize
+ \begin{tabular}{@{}c@{}}\drscondfont{#1}\end{tabular}}%
+ \@tempcnta=\ht\@tempboxa
+ \advance\@tempcnta by \dp\@tempboxa
+ \divide\@tempcnta by 2
+ \edef\@topH{\the\@tempcnta}% % HALF the height of the top part
+ \advance\@tempcnta by \@A
+ \edef\@D{\the\@tempcnta}%
+ \advance\@tempcnta by -\@H
+ \advance\@tempcnta by \@topH
+ \edef\@boxcoords{(\@topH,\the\@tempcnta)}%
+ \else % Angle over 45: diamond goes across all corners
+ \advance \@tempcnta by \@A\relax \divide \@tempcnta by 2
+ \edef\@D{\the\@tempcnta}%
+ \advance\@tempcnta by -\@A
+ \edef\@boxcoords{(\the\@tempcnta,\@B)}%
+ \fi
+ %
+ \@tempcnta=\@D
+ \multiply\@tempcnta by 2
+ \edef\@twoD{\the\@tempcnta}%
+ %
+ \unitlength=1sp % ``scaled points,'' like the counter values
+ \linethickness{\drslinewidth}% only effective if pict2e.sty is loaded
+ % If eepic is loaded, match our lines to the DRS borders
+ \@ifundefined{allinethickness}\relax{\allinethickness{\the\arrayrulewidth}}%
+ \parbox[c]{\@twoD sp}{{\vskip 2pt%
+ \begin{picture}(\@twoD,\@twoD)
+ \put(0,\@D){\line(1,-1)\@D}
+ \put(0,\@D){\line(1,1)\@D}
+ \put(\@twoD,\@D){\line(-1,1)\@D}
+ \put(\@twoD,\@D){\line(-1,-1)\@D}
+ % change \makebox to \framebox to see the placement
+ \expandafter\put\@boxcoords{\expandafter\makebox\@boxdims{\box\@drsbox}}
+ \end{picture}\vskip 2pt}}}}
+
+
+% BETTER DOUBLE SPACING: by default, tall material can come arbitrarily close
+% to the previous line. Calling \drshacksetspace redefines setspace.sty
+% internals, causing it to adjust TeX formatting parameters that force a
+% portion of each line to stay empty. This really should be part of
+% setspace.sty.
+
+% setspace.sty redefines the footnotes, but they do not call setstretch, alas.
+% So the spacing will still be incorrect in footnotes.
+
+\def\drshacksetspace{\@ifundefined{setstretch}\relax {%
+ % Ensure that HALF of the lineskip above the normal (singlespacing) value
+ % will stay empty
+ \def\adj@lineskip{%
+ \@tempdima=\baselinestretch\baselineskip
+ \advance\@tempdima by -\setspace@singlespace\baselineskip
+ \divide\@tempdima by 2
+ \lineskiplimit=\@tempdima
+ \lineskip=\lineskiplimit
+ \ifdim\@tempdima=0pt \lineskip=1pt\fi}%
+ % Arrange to recompute lineskip whenever spacing changes
+ \renewcommand{\setstretch}[1]
+ {\def\baselinestretch{##1}\@currsize\adj@lineskip}%
+ % Now run setstretch in case it's already been invoked (at the preamble)
+ \expandafter\expandafter
+ \expandafter\setstretch\expandafter{\baselinestretch}}}
+
+\endinput
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 350cf9abaea..0d2e7070113 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -106,7 +106,7 @@ my @TLP_working = qw(
dnaseq doc-pictex docmfp docmute doi doipubmed
dot2texi dotarrow dotseqn dottex
doublestroke dox dozenal dpfloat dprogress drac draftcopy
- draftwatermark dramatist dratex drv dtk dtxgallery
+ draftwatermark dramatist dratex drs drv dtk dtxgallery
dtxtut duerer-latex duotenzor dvdcoll dviasm dviincl dvipdfmx-def
dvipsconfig dyntree
ean13isbn easy easylist
diff --git a/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc b/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
index 703670c97bd..15130ebac5f 100644
--- a/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
@@ -16,6 +16,7 @@ depend doc-pictex
depend dottex
depend dot2texi
depend dratex
+depend drs
depend duotenzor
depend eepic
depend epspdf
diff --git a/Master/tlpkg/tlpsrc/drs.tlpsrc b/Master/tlpkg/tlpsrc/drs.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/drs.tlpsrc