diff options
author | Karl Berry <karl@freefriends.org> | 2007-05-09 13:15:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-05-09 13:15:05 +0000 |
commit | 5a221313b82fe5e9fc9db7db3e17ba4985f470f4 (patch) | |
tree | 9f6ba3c1ad6de63dfee9dfd98e107ae18ad1df2b /Master/texmf-dist | |
parent | 8f0b3a4f2a7707d2fe6401235979e0fb092c8a53 (diff) |
new package leading (6may07)
git-svn-id: svn://tug.org/texlive/trunk@4267 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/leading/README | 12 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/leading/README.txt | 12 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/leading/dtx-style.sty | 113 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/leading/leading.pdf | bin | 0 -> 88903 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/leading/leading.dtx | 329 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/leading/leading.ins | 71 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/leading/leading.sty | 40 | ||||
-rw-r--r-- | Master/texmf-dist/tpm/leading.tpm | 32 |
8 files changed, 609 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/leading/README b/Master/texmf-dist/doc/latex/leading/README new file mode 100644 index 00000000000..7b5609063ba --- /dev/null +++ b/Master/texmf-dist/doc/latex/leading/README @@ -0,0 +1,12 @@ +___________________ +The LEADING package +v0.2 + +Defines the \leading{<length>} command to set the +leading of the document to the length specified. In +contrast with \linespread{<ratio>}, which is less +useful in most cases. + +______________ +Will Robertson +2007 diff --git a/Master/texmf-dist/doc/latex/leading/README.txt b/Master/texmf-dist/doc/latex/leading/README.txt new file mode 100644 index 00000000000..7b5609063ba --- /dev/null +++ b/Master/texmf-dist/doc/latex/leading/README.txt @@ -0,0 +1,12 @@ +___________________ +The LEADING package +v0.2 + +Defines the \leading{<length>} command to set the +leading of the document to the length specified. In +contrast with \linespread{<ratio>}, which is less +useful in most cases. + +______________ +Will Robertson +2007 diff --git a/Master/texmf-dist/doc/latex/leading/dtx-style.sty b/Master/texmf-dist/doc/latex/leading/dtx-style.sty new file mode 100644 index 00000000000..ca82efdc80b --- /dev/null +++ b/Master/texmf-dist/doc/latex/leading/dtx-style.sty @@ -0,0 +1,113 @@ +\ProvidesPackage{dtx-style} + +\errorcontextlines=999 + +\def\@dotsep{1000} +\setcounter{tocdepth}{2} +\setlength\columnseprule{0.4pt} +\renewcommand\tableofcontents{\relax + \begin{multicols}{2}[\section*{\contentsname}]\relax + \@starttoc{toc}\relax + \end{multicols}} + +\setcounter{IndexColumns}{2} +\renewenvironment{theglossary} + {\small\list{}{} + \item\relax + \glossary@prologue\GlossaryParms + \let\item\@idxitem \ignorespaces + \def\pfill{\hspace*{\fill}}} + {\endlist} + +\usepackage[svgnames]{xcolor} +\usepackage{calc,enumitem,fancyvrb,graphicx,\jobname} + +\usepackage[osf,sc]{mathpazo} +\linespread{1.069} % A bit more space between lines +\frenchspacing % Remove ugly extra space after punctuation + +\definecolor{niceblue}{rgb}{0.2,0.4,0.8} +\newenvironment{example}[1] + {\VerbatimEnvironment + \def\Options{#1}% + \begin{VerbatimOut}[gobble=4]{\examplefilename}} + {\end{VerbatimOut}\relax + \typesetexample} + +\def\theCodelineNo{\textcolor{niceblue}{\sffamily\tiny\arabic{CodelineNo}}} + +\let\examplesize\normalsize +\let\auxwidth\relax + +\newlength\examplewidth\newlength\verbatimwidth +\newlength\exoutdent \newlength\exverbgap +\setlength\exverbgap{1em} +\setlength\exoutdent{-0.15\textwidth} +\newsavebox\verbatimbox +\edef\examplefilename{\jobname.example} + +\newcommand\typesetexample{\relax + \smallskip + \noindent + \begin{minipage}{\linewidth} + \color{niceblue} + \hrulefill\par + \edef\@tempa{[gobble=0,fontsize=\noexpand\scriptsize,\Options]}% + \begin{lrbox}{\verbatimbox}\relax + \expandafter\BVerbatimInput\@tempa{\examplefilename}% + \end{lrbox} + \begin{list}{}{\setlength\itemindent{0pt} + \setlength\leftmargin\exoutdent + \setlength\rightmargin{0pt}}\item + \ifx\auxwidth\relax + \setlength\verbatimwidth{\wd\verbatimbox}% + \else + \setlength\verbatimwidth{\auxwidth}% + \fi + \begin{minipage}[c]{\textwidth-\exoutdent-\verbatimwidth-\exverbgap} + \catcode`\%=14\centering\input\examplefilename\relax + \end{minipage}\hfill + \begin{minipage}[c]{\verbatimwidth} + \usebox\verbatimbox + \end{minipage} + \end{list} + \par\noindent\hrulefill + \end{minipage} + \smallskip} + +\newcommand*\setverbwidth[1]{\def\auxwidth{#1}} + +\newcommand*\name[1]{{#1}} +\newcommand*\pkg[1]{\textsf{#1}} +\newcommand*\feat[1]{\texttt{#1}} +\newcommand*\opt[1]{\texttt{#1}} + +\newcommand*\note[1]{\unskip\footnote{#1}} + +\let\latin\textit +\def\eg{\latin{e.g.}} +\def\Eg{\latin{E.g.}} +\def\ie{\latin{i.e.}} +\def\etc{\@ifnextchar.{\latin{etc}}{\latin{etc.}\@}} + +\def\STIX{\textsc{stix}} +\def\MacOSX{Mac~OS~X} +\def\ascii{\textsc{ascii}} +\def\OMEGA{Omega} + +\makeatletter +\newcounter{argument} +\g@addto@macro\endmacro{\setcounter{argument}{0}} +\newcommand*\darg[1]{% + \stepcounter{argument}% + {\ttfamily\char`\#\theargument~:~}#1\par\noindent\ignorespaces} +\newcommand*\doarg[1]{% + \stepcounter{argument}% + {\ttfamily\makebox[0pt][r]{[}\char`\#\theargument]:~}#1\par\noindent\ignorespaces} +\makeatother +\newcommand\codeline[1]{\par\noindent\hspace{2\parindent}#1\par\noindent\ignorespaces} + +\newcommand\unichar[2]{\textsc{\MakeLowercase{u+#1: #2}}} + +\setlength\parindent{2em} + diff --git a/Master/texmf-dist/doc/latex/leading/leading.pdf b/Master/texmf-dist/doc/latex/leading/leading.pdf Binary files differnew file mode 100644 index 00000000000..0a9618658d2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/leading/leading.pdf diff --git a/Master/texmf-dist/source/latex/leading/leading.dtx b/Master/texmf-dist/source/latex/leading/leading.dtx new file mode 100644 index 00000000000..0c23d28fee5 --- /dev/null +++ b/Master/texmf-dist/source/latex/leading/leading.dtx @@ -0,0 +1,329 @@ +% \iffalse meta-comment +% +% Copyright 2005 by Will Robertson <wspr81@gmail.com> +% +% Distributable under the LaTeX Project Public License, +% version 1.3c or higher (your choice). The latest version of +% this license is at: http://www.latex-project.org/lppl.txt +% +% This work is "maintained" (as per LPPL maintenance status) +% by Will Robertson. +% +% This work consists of the file leading.dtx +% and the derived files leading.sty and leading.pdf. +% +% +%<*internalbatchfile> +\begingroup +%</internalbatchfile> +%<*batchfile> +\input docstrip.tex +\keepsilent +\preamble + + __________________________________ + Copyright (C) 2007 Will Robertson + + License information appended. + + +\endpreamble +\postamble + +Copyright (C) 2007 by Will Robertson <wspr81@gmail.com> + +Distributable under the LaTeX Project Public License, +version 1.3c or higher (your choice). The latest version of +this license is at: http://www.latex-project.org/lppl.txt + +This work is "maintained" (as per LPPL maintenance status) +by Will Robertson. + +This work consists of the file \jobname.dtx + and the derived files \jobname.sty and \jobname.pdf. + +\endpostamble +\askforoverwritefalse +\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}} +\generate{\file{\jobname.ins}{\from{\jobname.dtx}{batchfile}}} +\nopreamble\nopostamble +\generate{\file{dtx-style.sty}{\from{\jobname.dtx}{dtx-style}}} +\generate{\file{README.txt}{\from{\jobname.dtx}{readme}}} +\Msg{*************************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* file into a directory searched by TeX:} +\Msg{*} +\Msg{* leading.sty} +\Msg{*} +\Msg{* To produce the documentation run the file leading.dtx} +\Msg{* through LaTeX. Have fun!} +\Msg{*} +\Msg{*************************************************************} +%</batchfile> +%<batchfile>\endbatchfile +%<*internalbatchfile> +\endgroup +\immediate\write18{makeindex -s gind.ist -o \jobname.ind \jobname.idx} +\immediate\write18{makeindex -s gglo.ist -o \jobname.gls \jobname.glo} +%</internalbatchfile> +% +%<*driver> +\documentclass{ltxdoc} +\EnableCrossrefs +\CodelineIndex +\RecordChanges +%\OnlyDescription +\usepackage{dtx-style} +\begin{document} + \nonstopmode + \DocInput{\jobname.dtx} +\end{document} +%</driver> +% +%<*readme> +___________________ +The LEADING package +v0.2 + +Defines the \leading{<length>} command to set the +leading of the document to the length specified. In +contrast with \linespread{<ratio>}, which is less +useful in most cases. + +______________ +Will Robertson +2007 +%</readme> +% +% \fi +% +% \GetFileInfo{\jobname.sty} +% \CheckSum{0} +% \makeatletter +% +% \title{Giving leading a number} +% \author{Will Robertson} +% \date{\filedate \qquad \fileversion} +% +% \maketitle +% +% \noindent +% \LaTeX\ defines two methods of specifying \emph{leading}\footnote{Pronounced to rhyme with `sledding'; the word arises from the spacers of lead used to separate lines of text in traditional metal press typesetting}, or the distance between successive lines of text: +% \codeline {\cmd\linespread\marg{ratio to font size} , and} +% \codeline {\cmd\renewcommand\cmd\baselinestretch\marg{ratio to original value} .} +% (I've got no idea what the difference between the two methods actually is.) +% +% For example, in the \pkg{pracjourn} class, +% a font size and leading of 12\,pt/15.5\,pt was chosen, which required the preamble declaration +% |\linespread{1.069}|, as $12\times 1.069\approx15.5$. +% +% But this is not how most people define the typesetting of their paragraphs. +% Instructions don't come from the designer: ``make the leading 1.069 times the font size''. +% That's just silly. Instead, it's common to see ``give me a leading of 15.5\,pt''. And indeed, that's how +% \LaTeX's \cmd\fontsize\ command works. +% +% This package defines the \cmd\leading\marg{length} command, +% which sets the leading immediately to the \meta{length} specified. Here's an example:\bigskip +% +% \noindent +% \begin{minipage}[t]{0.49\linewidth} +% \leading{11pt}|\leading{11pt}|\\\small +%Upon observing him more closely, I perceived that he wore a black silk +%apron over his small-clothes; and this was a thing which I thought very +%odd. Before I had time to make any remark, however, upon so singular a +%circumstance, he interrupted me with a second \emph{``ahem!''} +% \end{minipage}\hfill +% \begin{minipage}[t]{0.49\linewidth} +% \leading{13pt}|\leading{5mm}|\\\small +%Upon observing him more closely, I perceived that he wore a black silk +%apron over his small-clothes; and this was a thing which I thought very +%odd. Before I had time to make any remark, however, upon so singular a +%circumstance, he interrupted me with a second \emph{``ahem!''} +% \end{minipage} +% +% \bigskip\noindent +% Because \cmd\leading\ uses \cmd\linespread\ internally, the results +% of |\leading{15.5pt}| in a 12\,pt document and |\linespread{1.069}| +% are identical. But because \cmd\leading\ uses a fixed length, if the +% font size of the document changes then its value will need to be +% adjusted. This isn't a problem in general, however, because it is common +% for different ratios of linespread to be used for different absolute +% font sizes anyway. +% +% \StopEventually{} +% \clearpage +% \part{The \pkg{\jobname} package} +%\iffalse +%<*package> +%\fi +% This is the package. +% \begin{macrocode} +\ProvidesPackage{leading} + [2007/05/06 v0.2 Define leading length] +% \end{macrocode} +% +% \PrintChanges +% +% \begin{macrocode} +\RequirePackage{calc} +% \end{macrocode} +% +% \begin{macro}{\leading} +% \darg{Leading (or `baselineskip') length} +% This is the whole package. Not much to it, really. +% \begin{macrocode} +\newcommand\leading[1]{% + \begingroup + \normalfont + \@tempdima=\f@size pt\relax + \@tempdimb=#1\relax + \setlength\@tempdimc{1pt*\ratio{\@tempdimb}{\@tempdima}}% + \global\@tempdimc\@tempdimc + \endgroup + \linespread{\strip@pt\@tempdimc}\normalfont} +% \end{macrocode} +% \end{macro} +% +%\iffalse +%</package> +%\fi +% +% \clearpage +% +% \PrintIndex +% +% \Finale +% +% \iffalse +% +%<*dtx-style> +% \begin{macrocode} +\ProvidesPackage{dtx-style} + +\errorcontextlines=999 + +\def\@dotsep{1000} +\setcounter{tocdepth}{2} +\setlength\columnseprule{0.4pt} +\renewcommand\tableofcontents{\relax + \begin{multicols}{2}[\section*{\contentsname}]\relax + \@starttoc{toc}\relax + \end{multicols}} + +\setcounter{IndexColumns}{2} +\renewenvironment{theglossary} + {\small\list{}{} + \item\relax + \glossary@prologue\GlossaryParms + \let\item\@idxitem \ignorespaces + \def\pfill{\hspace*{\fill}}} + {\endlist} + +\usepackage[svgnames]{xcolor} +\usepackage{calc,enumitem,fancyvrb,graphicx,\jobname} + +\usepackage[osf,sc]{mathpazo} +\linespread{1.069} % A bit more space between lines +\frenchspacing % Remove ugly extra space after punctuation + +\definecolor{niceblue}{rgb}{0.2,0.4,0.8} +\newenvironment{example}[1] + {\VerbatimEnvironment + \def\Options{#1}% + \begin{VerbatimOut}[gobble=4]{\examplefilename}} + {\end{VerbatimOut}\relax + \typesetexample} + +\def\theCodelineNo{\textcolor{niceblue}{\sffamily\tiny\arabic{CodelineNo}}} + +\let\examplesize\normalsize +\let\auxwidth\relax + +\newlength\examplewidth\newlength\verbatimwidth +\newlength\exoutdent \newlength\exverbgap +\setlength\exverbgap{1em} +\setlength\exoutdent{-0.15\textwidth} +\newsavebox\verbatimbox +\edef\examplefilename{\jobname.example} + +\newcommand\typesetexample{\relax + \smallskip + \noindent + \begin{minipage}{\linewidth} + \color{niceblue} + \hrulefill\par + \edef\@tempa{[gobble=0,fontsize=\noexpand\scriptsize,\Options]}% + \begin{lrbox}{\verbatimbox}\relax + \expandafter\BVerbatimInput\@tempa{\examplefilename}% + \end{lrbox} + \begin{list}{}{\setlength\itemindent{0pt} + \setlength\leftmargin\exoutdent + \setlength\rightmargin{0pt}}\item + \ifx\auxwidth\relax + \setlength\verbatimwidth{\wd\verbatimbox}% + \else + \setlength\verbatimwidth{\auxwidth}% + \fi + \begin{minipage}[c]{\textwidth-\exoutdent-\verbatimwidth-\exverbgap} + \catcode`\%=14\centering\input\examplefilename\relax + \end{minipage}\hfill + \begin{minipage}[c]{\verbatimwidth} + \usebox\verbatimbox + \end{minipage} + \end{list} + \par\noindent\hrulefill + \end{minipage} + \smallskip} + +\newcommand*\setverbwidth[1]{\def\auxwidth{#1}} + +\newcommand*\name[1]{{#1}} +\newcommand*\pkg[1]{\textsf{#1}} +\newcommand*\feat[1]{\texttt{#1}} +\newcommand*\opt[1]{\texttt{#1}} + +\newcommand*\note[1]{\unskip\footnote{#1}} + +\let\latin\textit +\def\eg{\latin{e.g.}} +\def\Eg{\latin{E.g.}} +\def\ie{\latin{i.e.}} +\def\etc{\@ifnextchar.{\latin{etc}}{\latin{etc.}\@}} + +\def\STIX{\textsc{stix}} +\def\MacOSX{Mac~OS~X} +\def\ascii{\textsc{ascii}} +\def\OMEGA{Omega} + +\makeatletter +\newcounter{argument} +\g@addto@macro\endmacro{\setcounter{argument}{0}} +\newcommand*\darg[1]{% + \stepcounter{argument}% + {\ttfamily\char`\#\theargument~:~}#1\par\noindent\ignorespaces} +\newcommand*\doarg[1]{% + \stepcounter{argument}% + {\ttfamily\makebox[0pt][r]{[}\char`\#\theargument]:~}#1\par\noindent\ignorespaces} +\makeatother +\newcommand\codeline[1]{\par\noindent\hspace{2\parindent}#1\par\noindent\ignorespaces} + +\newcommand\unichar[2]{\textsc{\MakeLowercase{u+#1: #2}}} + +\setlength\parindent{2em} + +% \end{macrocode} +%</dtx-style> +%\fi +% +% \typeout{*************************************************************} +% \typeout{*} +% \typeout{* To finish the installation you have to move the following} +% \typeout{* file into a directory searched by TeX:} +% \typeout{*} +% \typeout{* \space\space\space leading.sty} +% \typeout{*} +% \typeout{*************************************************************} +% +\endinput +
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/leading/leading.ins b/Master/texmf-dist/source/latex/leading/leading.ins new file mode 100644 index 00000000000..272dc67de35 --- /dev/null +++ b/Master/texmf-dist/source/latex/leading/leading.ins @@ -0,0 +1,71 @@ +%% +%% This is file `leading.ins', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% leading.dtx (with options: `batchfile') +%% +%% __________________________________ +%% Copyright (C) 2007 Will Robertson +%% +%% License information appended. +%% +\input docstrip.tex +\keepsilent +\preamble + + __________________________________ + Copyright (C) 2007 Will Robertson + + License information appended. + +\endpreamble +\postamble + +Copyright (C) 2007 by Will Robertson <wspr81@gmail.com> + +Distributable under the LaTeX Project Public License, +version 1.3c or higher (your choice). The latest version of +this license is at: http://www.latex-project.org/lppl.txt + +This work is "maintained" (as per LPPL maintenance status) +by Will Robertson. + +This work consists of the file \jobname.dtx + and the derived files \jobname.sty and \jobname.pdf. + +\endpostamble +\askforoverwritefalse +\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}} +\generate{\file{\jobname.ins}{\from{\jobname.dtx}{batchfile}}} +\nopreamble\nopostamble +\generate{\file{dtx-style.sty}{\from{\jobname.dtx}{dtx-style}}} +\generate{\file{README.txt}{\from{\jobname.dtx}{readme}}} +\Msg{*************************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* file into a directory searched by TeX:} +\Msg{*} +\Msg{* leading.sty} +\Msg{*} +\Msg{* To produce the documentation run the file leading.dtx} +\Msg{* through LaTeX. Have fun!} +\Msg{*} +\Msg{*************************************************************} +\endbatchfile +%% +%% Copyright (C) 2007 by Will Robertson <wspr81@gmail.com> +%% +%% Distributable under the LaTeX Project Public License, +%% version 1.3c or higher (your choice). The latest version of +%% this license is at: http://www.latex-project.org/lppl.txt +%% +%% This work is "maintained" (as per LPPL maintenance status) +%% by Will Robertson. +%% +%% This work consists of the file leading.dtx +%% and the derived files leading.sty and leading.pdf. +%% +%% +%% End of file `leading.ins'. diff --git a/Master/texmf-dist/tex/latex/leading/leading.sty b/Master/texmf-dist/tex/latex/leading/leading.sty new file mode 100644 index 00000000000..4fd77db9410 --- /dev/null +++ b/Master/texmf-dist/tex/latex/leading/leading.sty @@ -0,0 +1,40 @@ +%% +%% This is file `leading.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% leading.dtx (with options: `package') +%% +%% __________________________________ +%% Copyright (C) 2007 Will Robertson +%% +%% License information appended. +%% +\ProvidesPackage{leading} + [2007/05/06 v0.2 Define leading length] +\RequirePackage{calc} +\newcommand\leading[1]{% + \begingroup + \normalfont + \@tempdima=\f@size pt\relax + \@tempdimb=#1\relax + \setlength\@tempdimc{1pt*\ratio{\@tempdimb}{\@tempdima}}% + \global\@tempdimc\@tempdimc + \endgroup + \linespread{\strip@pt\@tempdimc}\normalfont} +%% +%% Copyright (C) 2007 by Will Robertson <wspr81@gmail.com> +%% +%% Distributable under the LaTeX Project Public License, +%% version 1.3c or higher (your choice). The latest version of +%% this license is at: http://www.latex-project.org/lppl.txt +%% +%% This work is "maintained" (as per LPPL maintenance status) +%% by Will Robertson. +%% +%% This work consists of the file leading.dtx +%% and the derived files leading.sty and leading.pdf. +%% +%% +%% End of file `leading.sty'. diff --git a/Master/texmf-dist/tpm/leading.tpm b/Master/texmf-dist/tpm/leading.tpm new file mode 100644 index 00000000000..a65bb85b646 --- /dev/null +++ b/Master/texmf-dist/tpm/leading.tpm @@ -0,0 +1,32 @@ +<!DOCTYPE rdf:RDF SYSTEM "../../support/tpm.dtd"> +<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:TPM="http://texlive.dante.de/"> + <rdf:Description about="http://texlive.dante.de/texlive/Package/leading.zip"> + <TPM:Name>leading</TPM:Name> + <TPM:Type>Package</TPM:Type> + <TPM:Date>2007/05/09 13:14:27</TPM:Date> + <TPM:Version></TPM:Version> + <TPM:Creator>karl</TPM:Creator> + <TPM:Title>The leading package.</TPM:Title> + <TPM:Description></TPM:Description> + <TPM:Author></TPM:Author> + <TPM:Size>105435</TPM:Size> + <TPM:License></TPM:License> + <TPM:Build/> + <TPM:RunFiles size="2260"> +texmf-dist/tex/latex/leading/leading.sty +texmf-dist/tpm/leading.tpm + </TPM:RunFiles> + <TPM:DocFiles size="92575"> +texmf-dist/doc/latex/leading/README +texmf-dist/doc/latex/leading/README.txt +texmf-dist/doc/latex/leading/dtx-style.sty +texmf-dist/doc/latex/leading/leading.pdf + </TPM:DocFiles> + <TPM:SourceFiles size="11734"> +texmf-dist/source/latex/leading/leading.dtx +texmf-dist/source/latex/leading/leading.ins + </TPM:SourceFiles> + <TPM:Provides>Package/leading</TPM:Provides> + </rdf:Description> +</rdf:RDF> + |