summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-04-10 22:45:11 +0000
committerKarl Berry <karl@freefriends.org>2013-04-10 22:45:11 +0000
commit28143e7004b7ca44aa714faba7e3554d4f2b378d (patch)
treeb18199d64a721532cb10b4a6fdf82459870a99f6 /Master
parente533034626aa12a7d01144a888de7aacca481033 (diff)
savetrees (10apr13)
git-svn-id: svn://tug.org/texlive/trunk@29841 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/savetrees/README2
-rw-r--r--Master/texmf-dist/doc/latex/savetrees/savetrees.pdfbin369261 -> 477842 bytes
-rw-r--r--Master/texmf-dist/doc/latex/savetrees/st-sample2e.pdfbin0 -> 105206 bytes
-rw-r--r--Master/texmf-dist/source/latex/savetrees/savetrees.dtx633
-rw-r--r--Master/texmf-dist/source/latex/savetrees/savetrees.ins4
-rw-r--r--Master/texmf-dist/tex/latex/savetrees/savetrees.sty69
6 files changed, 549 insertions, 159 deletions
diff --git a/Master/texmf-dist/doc/latex/savetrees/README b/Master/texmf-dist/doc/latex/savetrees/README
index 3bcd4b17176..e64fe8b7095 100644
--- a/Master/texmf-dist/doc/latex/savetrees/README
+++ b/Master/texmf-dist/doc/latex/savetrees/README
@@ -33,7 +33,7 @@ directory searched by BibTeX (e.g., .../texmf/bibtex/bst/misc/).
Copyright and license
=====================
-Copyright (C) 2011 by Scott Pakin <scott+st@pakin.org>
+Copyright (C) 2013 by Scott Pakin <scott+st@pakin.org>
This file may be distributed and/or modified under the conditions of
the LaTeX Project Public License, either version 1.3c of this license
diff --git a/Master/texmf-dist/doc/latex/savetrees/savetrees.pdf b/Master/texmf-dist/doc/latex/savetrees/savetrees.pdf
index afef30d8119..573bfaedb58 100644
--- a/Master/texmf-dist/doc/latex/savetrees/savetrees.pdf
+++ b/Master/texmf-dist/doc/latex/savetrees/savetrees.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/savetrees/st-sample2e.pdf b/Master/texmf-dist/doc/latex/savetrees/st-sample2e.pdf
new file mode 100644
index 00000000000..d5f93406a71
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/savetrees/st-sample2e.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/savetrees/savetrees.dtx b/Master/texmf-dist/source/latex/savetrees/savetrees.dtx
index 86fbbe9984e..06f3ac51621 100644
--- a/Master/texmf-dist/source/latex/savetrees/savetrees.dtx
+++ b/Master/texmf-dist/source/latex/savetrees/savetrees.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2011 by Scott Pakin <scott+st@pakin.org>
+% Copyright (C) 2013 by Scott Pakin <scott+st@pakin.org>
% ------------------------------------------------------
%
% This file may be distributed and/or modified under the
@@ -22,7 +22,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{savetrees}
%<*package>
- [2011/05/14 v2.0 Pack as much text as possible onto each page]
+ [2013/04/09 v2.1 Pack as much text as possible onto each page]
%</package>
%
%<*driver>
@@ -35,6 +35,7 @@
\usepackage{changepage}
\usepackage{calc}
\usepackage{varioref}
+\usepackage{needspace}
\usepackage[format=hang,justification=raggedright]{subfig}
\usepackage[tracking]{microtype}
\SetExpansion[context=tightcharwidths,stretch=0,shrink=55]{encoding=*,shape=*}{}
@@ -45,13 +46,23 @@
\RecordChanges
\begin{document}
\DocInput{savetrees.dtx}
+ \Needspace{10\baselineskip}
+ \phantomsection\addcontentsline{toc}{section}{Change History}
\PrintChanges
+ \makeatletter
+ \let\orig@index@prologue=\index@prologue
+ \def\index@prologue{%
+ \phantomsection\addcontentsline{toc}{section}{Index}
+ \orig@index@prologue
+ }%
+ \makeatother
+ \Needspace{12\baselineskip}
\PrintIndex
\end{document}
%</driver>
% \fi
%
-% \CheckSum{439}
+% \CheckSum{484}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -201,20 +212,25 @@
%
% ^^A Define a macro that presents "before" and "after" comparisons
% ^^A of a savetrees space-saving technique.
-% \newcommand{\comparisonfigure}[3]{^^A
+% \newcommand{\comparisonfigure}[4][\lipsumtext]{^^A
% \begin{figure}[htbp]
-% \subfloat[\texttt{#1=normal}]{^^A
+% \savebox{\normalbox}{^^A
+% \fbox{^^A
+% \begin{minipage}[t]{0.5\linewidth-0.5cm}^^A
+% #1
+% \end{minipage}}}^^A
+% \subfloat[\texttt{#2=normal}]{^^A
% \rule[-\dp\normalbox]{0pt}{\dp\normalbox}^^A
% \usebox{\normalbox}}^^A
% \hfill
-% \subfloat[\texttt{#1=tight}]{^^A
+% \subfloat[\texttt{#2=tight}]{^^A
% \rule[-\dp\normalbox]{0pt}{\dp\normalbox}^^A
% \fbox{^^A
% \begin{minipage}[t]{0.5\linewidth-0.5cm}^^A
-% #2\lipsumtext#3^^A
+% #3#1#4^^A
% \end{minipage}}}^^A
-% \caption{Effect of the \texttt{#1} option}
-% \label{fig:ex-#1}
+% \caption{Effect of the \texttt{#2} option}
+% \label{fig:ex-#2}
% \end{figure}
% }
%
@@ -247,59 +263,84 @@
% The goal of the \pkgname{savetrees} package is to pack as much text as
% possible onto each page of a \LaTeX{} document. Admittedly, this
% makes the document far less attractive. Nevertheless,
-% \pkgname{savetrees} is a simple way to save paper when printing draft
-% copies of a document. It can also be useful when trying to meet a
-% tight page-length requirement for a conference or journal submission.
-%
-% To use \pkgname{savetrees}, simply place
-%
-% \begin{verbatim}
-% \usepackage{savetrees}
-% \end{verbatim}
-% ^^A
-% \unskip\noindent
-% in your document's preamble. This enables all of the space-saving
-% techniques of which \pkgname{savetrees} is capable and should make
-% your document considerably shorter. The longer the document, the
-% greater the space savings can be expected to be. Often, however,
-% \pkgname{savetrees} makes the document unacceptably ugly; or it may
-% violate some imposed formatting restriction (e.g.,~margin width or
-% paragraph indentation); or, even worse, certain space-saving
-% techniques may be incompatible with the document class or another
-% package and produce a \LaTeX\ error. \pkgname{savetrees} therefore
-% provides the ability to selectively enable and disable space-saving
-% techniques via package options. For example,
-%
-% \begin{verbatim}
-% \usepackage[all=normal,floats=tight,leading=tight,%
-% paragraphs=tight,charwidths=tight,tracking=tight,%
-% wordspacing=tight]{savetrees}
-% \end{verbatim}
-% ^^A
-% \unskip\noindent
-% or, more tersely,
-%
-% \begin{verbatim}
-% \usepackage[all=normal,floats,leading,paragraphs,%
-% charwidths,tracking,wordspacing]{savetrees}
-% \end{verbatim}
-% ^^A
-% \unskip\noindent
-% first turns off \emph{all} of \pkgname{savetrees}'s space-saving
-% techniques then turns on the \pkgoption{floats}, \pkgoption{leading},
-% \pkgoption{paragraphs}, \pkgoption{charwidths}, \pkgoption{tracking},
-% and \pkgoption{wordspacing} techniques, which are all more-or-less
-% ``safe'' techniques. These are described in the following section.
+% \pkgname{savetrees} provides a simple way to save paper when printing
+% draft copies of a document. It can also be useful when trying to meet
+% a tight page-length requirement. For example, consider the difference
+% between
+%
+% \savebox{\normalbox}{^^A
+% \fbox{^^A
+% \begin{minipage}[t]{\linewidth-2cm}^^A
+% \lipsumtext
+% \end{minipage}}^^A
+% }
+% \begin{center}
+% \usebox{\normalbox}
+% \end{center}
+%
+% \noindent
+% and
+%
+% \newlength{\oldwordspacing}
+% \setlength{\oldwordspacing}{\fontdimen2\font}
+% \begin{center}
+% \renewcommand{\baselinestretch}{0.95}^^A
+% \fbox{^^A
+% \rule[-\dp\normalbox]{0pt}{\dp\normalbox}^^A
+% \begin{minipage}[t]{\linewidth-2cm}^^A
+% \begin{microtypecontext}{expansion=tightcharwidths}^^A
+% \SetTracking{encoding=*,shape=*}{-25}^^A
+% \lsstyle
+% \fontdimen2\font=0.75\oldwordspacing
+% \lipsumtext
+% \end{microtypecontext}^^A
+% \end{minipage}}^^A
+% \end{center}
+%
+% The former (default) layout looks nicer, but the latter consumes
+% approximately~10\% less space.
+%
+% \bigskip
+%
+% The easiest way to use \pkgname{savetrees} is simply to place one of
+% the following in your document's preable:
+%
+% \begin{itemize}
+% \item |\usepackage[subtle]{savetrees}|
+% \item |\usepackage[moderate]{savetrees}|
+% \item |\usepackage[extreme]{savetrees}|
+% \end{itemize}
+%
+% The first option, \pkgoption{subtle}, preserves all document layout
+% and merely encourages \LaTeX\ to try harder to pack text onto the page
+% while introducing white space only when absolutely necessary. The
+% second option, \pkgoption{moderate}, additionally reduces paragraph
+% indentation, typesets lists and mathematical displays without
+% indentation or surrounding vertical space, reduces interline spacing,
+% and makes the font slightly narrower, if supported. The third option,
+% \pkgoption{extreme}, which is in fact the default if no package
+% options are specified, turns on all of the space-saving techniques in
+% \pkgname{savetrees}'s repertoire, including using smaller title and
+% section fonts, typesetting the bibliography with a smaller font and no
+% inter-item spacing, and substantially reducing the page margins. For
+% a demonstration of these package options, see the accompanying
+% \href[pdfnewwindow]{st-sample2e.pdf}{\texttt{st-sample2e.pdf}} file,
+% which presents Lamport's ``An Example Document'' typeset both normally
+% and with each of \pkgname{savetrees}'s \pkgoption{subtle},
+% \pkgoption{moderate}, and \pkgoption{extreme} options.
+%
+% The following section describes those and the rest of
+% \pkgname{savetrees}'s space-saving capabilities in more detail.
%
%
% \section{Usage}
%
-% \vref*{tbl:st-options} describes \pkgname{savetrees}'s main package
-% options and summarizes their implementation. Some package options
-% merely load a package or redefine some variables. Others redefine
-% entire environments to consume less space. A few resort to some
-% underhanded \TeX\ trickery to squeeze as much text as possible onto
-% the page.
+% \vrefrange{tbl:st-opts-subt}{tbl:st-opts-ext} describe
+% \pkgname{savetrees}'s main package options and summarize their
+% implementation. Some package options merely load a package or
+% redefine some variables. Others redefine entire environments to
+% consume less space. A few resort to some underhanded \TeX\ trickery
+% to squeeze as much text as possible onto the page.
% \makeatletter
% \@ifundefined{r@sec:savetrees.sty}{^^A
% See the \pkgname{savetrees} source code
@@ -311,13 +352,13 @@
% \pkgname{savetrees} package.
%
% \newlength{\implwidth}
-% \settowidth{\implwidth}{Reassign \texttt{\string\baselinestretch}.}
+% \settowidth{\implwidth}{and \texttt{\string\belowdisplayshortskip}.}
% \begin{table}
% \begin{adjustwidth}{1in-\marginparwidth-\marginparsep}{0pt}
% \centering
% \topcaption{\pkgname{savetrees} package options for enabling/disabling
-% space-saving techniques}
-% \label{tbl:st-options}
+% space-saving techniques (\texttt{subtle})}
+% \label{tbl:st-opts-subt}
% \renewcommand{\arraystretch}{2}
% \begin{tabularx}{\linewidth}{@{}l>{\raggedright}X>{\raggedright\arraybackslash}p{\implwidth}@{}}
% \toprule
@@ -327,16 +368,16 @@
% \pkgoption{paragraphs}
% & Discourage \TeX\ from allowing the last line of a paragraph to
% contain only a single word.
-% & Reassign \texttt{\string\looseness}. \\
+% & Reassign |\looseness|. \\
%
% \pkgoption{floats}
% & Relax float placement (more floats per page, increased ability to
% share pages with text, etc.).
% & Reassign \LaTeXe{} float variables. \\
%
-% \pkgoption{bibnotes}
-% & Ignore \texttt{NOTE} fields in the bibliography.
-% & Pass information to \texttt{savetrees.bst}. \\
+% \pkgoption{mathspacing}
+% & Reduce the amount of space within mathematical expressions.
+% & Reassign |\thinmuskip|, |\medmuskip|, and |\thickmuskip|. \\
%
% \pkgoption{wordspacing}
% & Reduce the amount of space between words.
@@ -346,18 +387,44 @@
% & Reduce the amount of space between characters.
% & Pass options to the \pkgname{microtype} package. \\
%
+% \bottomrule
+% \end{tabularx}
+% \end{adjustwidth}
+% \end{table}
+%
+% \begin{table}
+% \begin{adjustwidth}{1in-\marginparwidth-\marginparsep}{0pt}
+% \centering
+% \topcaption{\pkgname{savetrees} package options for enabling/disabling
+% space-saving techniques (\texttt{moderate})}
+% \label{tbl:st-opts-mod}
+% \renewcommand{\arraystretch}{2}
+% \begin{tabularx}{\linewidth}{@{}l>{\raggedright}X>{\raggedright\arraybackslash}p{\implwidth}@{}}
+% \toprule
+% Option & Space-saving technique & Implementation \\
+% \midrule
+%
+% \pkgoption{bibnotes}
+% & Ignore \texttt{NOTE} fields in the bibliography.
+% & Pass information to |savetrees.bst|. \\
+%
% \pkgoption{charwidths}
% & Allow character glyphs to be drawn slightly narrower than
% normal.
% & Pass options to the \pkgname{microtype} package. \\
%
+% \pkgoption{mathdisplays}
+% & Reduce the amount of vertical space surrounding displayed mathematics.
+% & Reassign |\abovedisplayskip|, |\belowdisplayskip|,
+% |\abovedisplayshortskip|, and |\belowdisplayshortskip|. \\
+%
% \pkgoption{leading}
% & Reduce interline spacing.
-% & Reassign \texttt{\string\baselinestretch}. \\
+% & Reassign |\baselinestretch|. \\
%
% \pkgoption{indent}
% & Decrease paragraph indentation.
-% & Reassign \texttt{\string\parindent}. \\
+% & Reassign |\parindent|. \\
%
% \pkgoption{lists}
% & Remove both indentation and inter-item spacing from the various
@@ -365,61 +432,89 @@
% & Redefine the \texttt{itemize}, \texttt{enumerate}, and
% \texttt{description} environments. \\
%
-% \pkgoption{title}
-% & Typeset the document title with smaller fonts and with less
-% surrounding whitespace.
-% & Redefine \texttt{\string\maketitle}. \\
+% \bottomrule
+% \end{tabularx}
+% \end{adjustwidth}
+% \end{table}
%
-% \pkgoption{sections}
-% & Typeset section titles smaller and with less surrounding whitespace.
-% & Pass options to the \pkgname{titlesec} package. \\
+% \begin{table}
+% \begin{adjustwidth}{1in-\marginparwidth-\marginparsep}{0pt}
+% \centering
+% \topcaption{\pkgname{savetrees} package options for enabling/disabling
+% space-saving techniques (\texttt{extreme})}
+% \label{tbl:st-opts-ext}
+% \renewcommand{\arraystretch}{2}
+% \begin{tabularx}{\linewidth}{@{}l>{\raggedright}X>{\raggedright\arraybackslash}p{\implwidth}@{}}
+% \toprule
+% Option & Space-saving technique & Implementation \\
+% \midrule
%
% \pkgoption{bibliography}
% & Typeset the bibliography in a smaller font and with no inter-item
% spacing.
% & Redefine \texttt{thebibliography}. \\
%
+% \pkgoption{title}
+% & Typeset the document title with smaller fonts and with less
+% surrounding white space.
+% & Redefine |\maketitle|. \\
+%
+% \pkgoption{sections}
+% & Typeset section titles with smaller fonts and with less surrounding
+% white space.
+% & Pass options to the \pkgname{titlesec} package. \\
+%
% \pkgoption{margins}
% & Reduce the page margins.
% & Pass options to the \pkgname{geometry} package. \\
%
-% \pkgoption{all}
-% & Perform all of the above.
-% & \\
-%
% \bottomrule
% \end{tabularx}
% \end{adjustwidth}
% \end{table}
%
-% Each of the options that appears in \ref{tbl:st-options} can be
-% set to either |tight| or |normal|. |tight|, the default, enables the
-% space-saving technique while |normal| disables it. For example,
-% specifying |\usepackage[title=normal]{savetrees}| instructs
-% \pkgname{savetrees} not to modify the font size and spacing used to
-% typeset the document's title. If only a few space-saving techniques
-% should be enabled, it may be more convenient to specify |all=normal|
-% followed by a list of options set to |tight| than to specify |normal|
-% typesetting for a large number of options. The arguments passed to
-% |\usepackage| are processed left-to-right.
-%
-% The options in \ref{tbl:st-options} are presented in roughly
-% decreasing order of subtlety. If \pkgname{savetrees}'s default
-% options produce too hideous a result, try incrementally setting the
-% options at the bottom of the table (excluding \pkgname{all}) to
-% |normal|, and see if that improves the document's appearance while
-% still saving space over the non-\pkgname{savetrees} version. That is,
-% start by including |margins=normal| in the optional argument to
-% |\usepackage|. Then add |bibliography=normal|, then
-% |sections=normal|, and so forth, rebuilding the document and examining
-% the result each time. Alternatively, if you need to save just a small
-% amount of space (e.g.,~if your document is just barely over a maximum
-% page length), specify |all=normal| then incrementally add options from
-% the top of the table downwards: |paragraphs=tight|, then
-% |floats=tight|, then |bibnotes=tight|, and so forth.
-% \ref{sec:gallery} presents examples of some of \pkgname{savetrees}'s
-% space-saving features so you can decide for yourself which are worth
-% the price paid in typesetting elegance.
+% Each of the options that appears in \ref{tbl:st-opts-subt} through
+% \ref{tbl:st-opts-ext} can be set to either |tight| or |normal|.
+% |tight|, the default, enables the space-saving technique while
+% |normal| disables it. For example, specifying
+% |\usepackage[title=normal]{savetrees}| instructs \pkgname{savetrees}
+% not to modify the font size and spacing used to typeset the document's
+% title. The \pkgoption{all} option can be used to set all of
+% \pkgname{savetrees}'s options en~masse to either |tight| or |normal|.
+% For example, if only a few space-saving techniques should be enabled,
+% it may be more convenient to specify |all=normal| followed by a small
+% list of options set to |tight| than to specify |normal| typesetting
+% for a large set of options. The arguments passed to |\usepackage| are
+% processed left-to-right.
+%
+% As convenient shortcuts, the options in \ref{tbl:st-opts-subt} can be
+% enabled as a group by passing the \pkgoption{subtle} option to
+% \pkgname{savetrees}; the options in both \ref{tbl:st-opts-subt} and
+% \ref{tbl:st-opts-mod} can be enabled as a group by passing the
+% \pkgoption{moderate} option to \pkgname{savetrees}; and all of the
+% options in \ref{tbl:st-opts-subt}, \ref{tbl:st-opts-mod}, and
+% \ref{tbl:st-opts-ext} can be enabled as a group by passing the
+% \pkgoption{extreme} option to \pkgname{savetrees}.
+%
+% The options in \ref{tbl:st-opts-subt} through \ref{tbl:st-opts-ext}
+% are presented in roughly decreasing order of subtlety. If you find
+% that \pkgname{savetrees}'s default options---or the
+% \pkgoption{subtle}, \pkgoption{moderate}, and \pkgoption{extreme}
+% meta-options---produce too hideous a result, try incrementally setting
+% to |normal| the options from the bottom of the options list up, and
+% see if doing so improves the document's appearance while still saving
+% space over the non-\pkgname{savetrees} version. That is, start by
+% including |margins=normal| in the optional argument to |\usepackage|.
+% Then add |sections=normal|, then |title=normal|, and so forth,
+% rebuilding the document and examining the result each time.
+% Alternatively, if you need to save just a small amount of space
+% (e.g.,~if your document is just barely over a maximum page length),
+% specify |all=normal| then incrementally add options from the top of
+% the three tables downwards: |paragraphs=tight|, then |floats=tight|,
+% then |mathspacing=tight|, and so forth. \ref{sec:gallery} presents
+% examples of some of \pkgname{savetrees}'s space-saving features so you
+% can decide for yourself which are worth the price paid in typesetting
+% elegance.
%
% Saving space in a document is always a balancing act between document
% aesthetics and the amount of space that can be saved. If you find
@@ -431,9 +526,9 @@
% describes these package options. As an example, \LaTeX's normal line
% height is defined to have a value of~1.0. When \pkgname{savetrees} is
% loaded with |leading=tight| (the default), \ref{tbl:st-refinements}
-% indicates that the line height is reduced to 90\% of that.
-% Additionally including |leadingfraction=0.95| on the |\usepackage| line
-% increases the line height to 95\% of \LaTeX's default---still a space
+% indicates that the line height is reduced to 95\% of that.
+% Additionally including |leadingfraction=0.98| on the |\usepackage| line
+% increases the line height to 98\% of \LaTeX's default---still a space
% reduction but possibly a somewhat less overt one.
%
% \begin{table}
@@ -454,7 +549,7 @@
% \pkgoption{leadingfraction}
% & Fraction of normal line height
% & \pkgoption{leading}
-% & 0.9 \\
+% & 0.95 \\
%
% \pkgoption{marginwidth}
% & Width of the page margins
@@ -483,7 +578,7 @@
% There are a few restrictions on the space-saving techniques that can
% be applied. The \pkgname{tracking} option requires pdf\LaTeX\@. The
% \pkgoption{charwidths} option requires either pdf\LaTeX\ or
-% lua\LaTeX\@. For both options, pdf\LaTeX\ must be in PDF mode, not
+% Lua\LaTeX\@. For both options, pdf\LaTeX\ must be in PDF mode, not
% DVI mode. See the \pkgname{microtype} documentation for additional
% (and possibly more up-to-date) information.
%
@@ -665,18 +760,23 @@
% the typesetting less offensive.
%
% \ref{fig:ex-lists} shows how setting |lists=tight| saves space by
-% reducing the whitespace above, below, and within list environments (in
-% this case, the |itemize| environment). \ref{fig:ex-wordspacing} shows
-% how setting |wordspacing=tight| saves space by typesetting words
-% closer together. \ref{fig:ex-tracking} shows how setting
-% |tracking=tight| saves space by typesetting the characters within a
-% word closer together. \ref{fig:ex-charwidths} shows how setting
-% |charwidths=tight| saves space by narrowing the individual character
-% glyphs without affecting the font's point size (height) or amount of
-% whitespace. Finally, \ref{fig:ex-leading} shows how setting
-% |leading=tight| saves space by removing whitespace between adjacent
-% lines of text. Again, these techniques are shown with their default
-% parameters, which can be adjusted if desired.
+% reducing the white space above, below, and within list environments (in
+% this case, the |itemize| environment). \ref{fig:ex-mathspacing} shows
+% how setting |mathspacing=tight| saves space by typesetting
+% mathematical expressions denser. \ref{fig:ex-mathdisplays} shows how
+% setting |mathdisplays=tight| removes the space around mathematical
+% displays (e.g.,~\texttt{\string\[}\dots\texttt{\string\]} or
+% \texttt{\string\begin\string{equation\string}}\dots\linebreak[0]\texttt{\string\end\string{equation\string}}).
+% \ref{fig:ex-wordspacing} shows how setting |wordspacing=tight| saves
+% space by typesetting words closer together. \ref{fig:ex-tracking}
+% shows how setting |tracking=tight| saves space by typesetting the
+% characters within a word closer together. \ref{fig:ex-charwidths}
+% shows how setting |charwidths=tight| saves space by narrowing the
+% individual character glyphs without affecting the font's point size
+% (height) or amount of white space. Finally, \ref{fig:ex-leading} shows
+% how setting |leading=tight| saves space by removing white space between
+% adjacent lines of text. Again, these techniques are shown with their
+% default parameters, which can be adjusted if desired.
%
% While \ref{fig:ex-lists} through \ref{fig:ex-leading} each illustrate
% a single space-saving technique, \vref{fig:ex-multiple} demonstrates
@@ -708,7 +808,8 @@
% \def\makelabel##1{\hss\llap{##1}}
% \settowidth{\leftmargin}{\labelitemi}^^A
% \addtolength{\leftmargin}{\labelsep}^^A
-% \setlength{\topsep}{4pt plus 1pt minus 2pt}^^A
+% \setlength{\partopsep}{0pt plus 4pt}^^A
+% \setlength{\topsep}{0pt plus 4pt}^^A
% \setlength{\itemsep}{0pt}^^A
% \setlength{\parsep}{0pt}^^A
% \setlength{\listparindent}{1em}^^A
@@ -723,6 +824,47 @@
% \label{fig:ex-lists}
% \end{figure}
%
+% \comparisonfigure[^^A
+% Lorem ipsum dolor sit amet, consectetur adipiscing elit
+% ${\cal H} = T + V$
+% quisque feugiat
+% $T = \frac{p^2}{2m}$
+% lacinia mauris
+% $V = V(q)$
+% ut tincidunt. Etiam ligula dolor
+% ${\cal H} = \sum_i \dot{q_i}
+% \frac{\partial \cal L}{\partial \dot{q_i}} -
+% {\cal L} = \sum_i \dot{q_i} p_i - {\cal L}$
+% eget nulla.
+% ]^^A
+% {mathspacing}
+% {^^A
+% \thinmuskip=0mu plus 3mu
+% \medmuskip=1mu plus 4mu
+% \thickmuskip=2mu plus 5mu
+% }{}
+%
+% \comparisonfigure[^^A
+% Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam dapibus
+% \[
+% \mathrm{d}{\cal L}
+% = \sum_i
+% \left(
+% \frac{\partial {\cal L}}{\partial q_i} \mathrm{d}q_i +
+% p_i \mathrm{d}\dot{q}_i
+% \right) +
+% \frac{\partial {\cal L}}{\partial t} \mathrm{d}t
+% \]
+% tempus dolor ac dignissim. Etiam ligula dolor, varius at rutrum.
+% ]^^A
+% {mathdisplays}
+% {^^A
+% \abovedisplayskip=0pt plus 3pt
+% \belowdisplayskip=0pt plus 3pt
+% \abovedisplayshortskip=0pt plus 3pt
+% \belowdisplayshortskip=0pt plus 3pt
+% }{}
+%
% \newlength{\origwordspacing}
% \setlength{\origwordspacing}{\fontdimen2\font}
% \comparisonfigure{wordspacing}{^^A
@@ -742,9 +884,14 @@
% \end{microtypecontext}^^A
% }
%
-% \comparisonfigure{leading}{\fontsize{10}{10.8}\selectfont}{}
+% \comparisonfigure{leading}{\fontsize{10}{11.4}\selectfont}{}
%
% \begin{figure}[htbp]
+% \savebox{\normalbox}{^^A
+% \fbox{^^A
+% \begin{minipage}[t]{0.5\linewidth-0.5cm}^^A
+% \lipsumtext
+% \end{minipage}}}^^A
% \subfloat[\texttt{all=normal}]{^^A
% \rule[-\dp\normalbox]{0pt}{\dp\normalbox}^^A
% \usebox{\normalbox}}^^A
@@ -755,7 +902,7 @@
% \fbox{^^A
% \begin{minipage}[t]{0.5\linewidth-0.5cm}^^A
% \fontdimen2\font=0.75\origwordspacing
-% \fontsize{10}{10.8}\selectfont
+% \fontsize{10}{11.4}\selectfont
% \begin{microtypecontext}{expansion=tightcharwidths}^^A
% \lsstyle
% \lipsumtext
@@ -820,12 +967,12 @@
% |report|, and |book|) use 2--2.6\,pt.\ lead (inter-line spacing), or
% approximately~20\% of font size. Specifically, they typeset body text
% at 10/12, 11/13.6, or 12/14.5. When |leading=tight|,
-% \pkgname{savetrees} reduces the line spacing to 90\% of normal or an
-% average of about~1.3\,pt.\ less lead than \LaTeX's defaults: 10/10.8,
-% 11/12.24, or 12/13.05. 90\% gives very good compression but still
+% \pkgname{savetrees} reduces the line spacing to 95\% of normal or an
+% average of about~0.67\,pt.\ less lead than \LaTeX's defaults: 10/11.4,
+% 11/12.92, or 12/13.78. 95\% gives very good compression but still
% prevents descenders from running into successive ascenders.
% \begin{macrocode}
-\newcommand*{\st@baselinestretch}{0.9}
+\newcommand*{\st@baselinestretch}{0.95}
% \end{macrocode}
% \end{macro}
%
@@ -864,7 +1011,8 @@
% \subsection{Option processing}
% \label{sec:options}
%
-% \paragraph{Enabling/disabling space-saving techniques}
+% \subsubsection{Enabling/disabling space-saving techniques}
+%
% By default, \pkgname{savetrees} tries to make documents extremely
% dense. However, this also makes them rather ugly. The package
% options defined below let the author specify which space-saving
@@ -943,6 +1091,7 @@
% \begin{macro}{\if@st@tight@sections}
% \begin{macro}{\@st@tight@sectionstrue}
% \begin{macro}{\@st@tight@sectionsfalse}
+% \begin{macro}{\KV@savetrees@sections}
% The \pkgoption{sections} package option enables or disables
% \pkgname{savetrees}'s modifications to section titles by setting
% |\@st@tight@sectionstrue| or |\@st@tight@sectionsfalse|, respectively.
@@ -953,10 +1102,12 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\if@st@tight@margins}
% \begin{macro}{\@st@tight@marginstrue}
% \begin{macro}{\@st@tight@marginsfalse}
+% \begin{macro}{\KV@savetrees@margins}
% The \pkgoption{margins} package option enables or disables
% \pkgname{savetrees}'s modifications to page margins by setting
% |\@st@tight@marginstrue| or |\@st@tight@marginsfalse|, respectively.
@@ -967,10 +1118,12 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\if@st@tight@lists}
% \begin{macro}{\@st@tight@liststrue}
% \begin{macro}{\@st@tight@listsfalse}
+% \begin{macro}{\KV@savetrees@lists}
% The \pkgoption{lists} package option enables or disables
% \pkgname{savetrees}'s modifications to the various list environments
% by setting |\@st@tight@liststrue| or |\@st@tight@listsfalse|,
@@ -982,10 +1135,12 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\if@st@tight@floats}
% \begin{macro}{\@st@tight@floatstrue}
% \begin{macro}{\@st@tight@floatsfalse}
+% \begin{macro}{\KV@savetrees@floats}
% The \pkgoption{floats} package option enables or disables
% \pkgname{savetrees}'s modifications to \LaTeX's float-placement
% parameters by setting |\@st@tight@floatstrue| or
@@ -997,10 +1152,12 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\if@st@tight@indent}
% \begin{macro}{\@st@tight@indenttrue}
% \begin{macro}{\@st@tight@indentfalse}
+% \begin{macro}{\KV@savetrees@indent}
% The \pkgoption{indent} package option enables or disables
% \pkgname{savetrees}'s modifications to paragraph indentation by
% setting |\@st@tight@indenttrue| or |\@st@tight@indentfalse|,
@@ -1012,10 +1169,12 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\if@st@tight@title}
% \begin{macro}{\@st@tight@titletrue}
% \begin{macro}{\@st@tight@titlefalse}
+% \begin{macro}{\KV@savetrees@title}
% The \pkgoption{title} package option enables or disables
% \pkgname{savetrees}'s modifications to title formatting by setting
% |\@st@tight@titletrue| or |\@st@tight@titlefalse|, respectively.
@@ -1026,10 +1185,12 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\if@st@tight@leading}
% \begin{macro}{\@st@tight@leadingtrue}
% \begin{macro}{\@st@tight@leadingfalse}
+% \begin{macro}{\KV@savetrees@leading}
% The \pkgoption{leading} package option enables or disables
% \pkgname{savetrees}'s modifications to interline spacing by setting
% |\@st@tight@leadingtrue| or |\@st@tight@leadingfalse|, respectively.
@@ -1043,10 +1204,12 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\if@st@tight@paragraphs}
% \begin{macro}{\@st@tight@paragraphstrue}
% \begin{macro}{\@st@tight@paragraphsfalse}
+% \begin{macro}{\KV@savetrees@paragraphs}
% The \pkgoption{paragraphs} package option enables or disables
% \pkgname{savetrees}'s modifications to \TeX's paragraph looseness
% (i.e.,~the number of lines by which \TeX\ is instructed to shrink each
@@ -1059,10 +1222,12 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\if@st@tight@charwidths}
% \begin{macro}{\@st@tight@charwidthstrue}
% \begin{macro}{\@st@tight@charwidthsfalse}
+% \begin{macro}{\KV@savetrees@charwidths}
% The \pkgoption{charwidths} package option enables or disables
% \pkgname{savetrees}'s modifications to character width by setting
% |\@st@tight@charwidthstrue| or |\@st@tight@charwidthsfalse|,
@@ -1074,10 +1239,12 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\if@st@tight@tracking}
% \begin{macro}{\@st@tight@trackingtrue}
% \begin{macro}{\@st@tight@trackingfalse}
+% \begin{macro}{\KV@savetrees@tracking}
% The \pkgoption{tracking} package option enables or disables
% \pkgname{savetrees}'s modifications to tracking (spacing between
% letters) by setting |\@st@tight@trackingtrue| or
@@ -1089,10 +1256,12 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\if@st@tight@wordspacing}
% \begin{macro}{\@st@tight@wordspacingtrue}
% \begin{macro}{\@st@tight@wordspacingfalse}
+% \begin{macro}{\KV@savetrees@wordspacing}
% The \pkgoption{wordspacing} package option enables or disables
% \pkgname{savetrees}'s modifications to inter-word spacing by setting
% |\@st@tight@wordspacingtrue| or |\@st@tight@wordspacingfalse|,
@@ -1104,10 +1273,12 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\if@st@tight@bibliography}
% \begin{macro}{\@st@tight@bibliographytrue}
% \begin{macro}{\@st@tight@bibliographyfalse}
+% \begin{macro}{\KV@savetrees@bibliography}
% The \pkgoption{bibliography} package option enables or disables
% \pkgname{savetrees}'s modifications to bibliography formatting by
% setting |\@st@tight@bibliographytrue| or
@@ -1119,10 +1290,12 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\if@st@tight@bibnotes}
% \begin{macro}{\@st@tight@bibnotestrue}
% \begin{macro}{\@st@tight@bibnotesfalse}
+% \begin{macro}{\KV@savetrees@bibnotes}
% The \pkgoption{bibnotes} package option conditionally excludes or
% includes |NOTE| fields when using |savetrees.bst| by setting
% |\@st@tight@bibnotestrue| or |\@st@tight@bibnotesfalse|, respectively.
@@ -1133,12 +1306,53 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\if@st@tight@mathspacing}
+% \begin{macro}{\@st@tight@mathspacingtrue}
+% \begin{macro}{\@st@tight@mathspacingfalse}
+% \begin{macro}{\KV@savetrees@mathspacing}
+% The \pkgoption{mathspacing} package option enables or disables
+% \pkgname{savetrees}'s modifications to horizontal spacing within
+% mathematical expressions by setting |\@st@tight@mathspacingtrue| or
+% |\@st@tight@mathspacingfalse|, respectively.
+% \begin{macrocode}
+\st@define@option{mathspacing}
+% \end{macrocode}
+% \pkgoptiondecl{mathspacing}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\if@st@tight@mathdisplays}
+% \begin{macro}{\@st@tight@mathdisplaystrue}
+% \begin{macro}{\@st@tight@mathdisplaysfalse}
+% \begin{macro}{\KV@savetrees@mathdisplays}
+% The \pkgoption{mathdisplays} package option enables or disables
+% \pkgname{savetrees}'s modifications to vertical spacing surrounding
+% mathematical displays by setting |\@st@tight@mathdisplaystrue| or
+% |\@st@tight@mathdisplaysfalse|, respectively.
+% \begin{macrocode}
+\st@define@option{mathdisplays}
+% \end{macrocode}
+% \pkgoptiondecl{mathdisplays}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Meta options}
%
+% \pkgname{savetrees} provides a large number of package options, which
+% might be overwhelming for a casual user. Here, we define a few ``meta
+% options'' that set multiple, related, package options en masse.
+%
+% \begin{macro}{\KV@savetrees@all}
% \begin{macro}{\st@arg}
% \begin{macro}{\st@arg@num}
-% For the document author's convenience, we define an |all| meta-option
-% that can be used to enable or disable all of \pkgname{savetrees}'s
-% space-saving features at once.
+% Define an \pkgoption{all} meta-option that can be used to enable or
+% disable all of \pkgname{savetrees}'s space-saving features at once.
% \begin{macrocode}
\define@choicekey{savetrees}{all}[\st@arg\st@arg@num]{tight,normal}[tight]{%
\ifnum\st@arg@num=0
@@ -1155,6 +1369,8 @@
\@st@tight@wordspacingtrue
\@st@tight@bibliographytrue
\@st@tight@bibnotestrue
+ \@st@tight@mathspacingtrue
+ \@st@tight@mathdisplaystrue
\else
\@st@tight@sectionsfalse
\@st@tight@marginsfalse
@@ -1169,6 +1385,8 @@
\@st@tight@wordspacingfalse
\@st@tight@bibliographyfalse
\@st@tight@bibnotesfalse
+ \@st@tight@mathspacingfalse
+ \@st@tight@mathdisplaysfalse
\fi
}
\DeclareOptionX{all}[tight]{\KV@savetrees@all{#1}}
@@ -1176,8 +1394,70 @@
% \pkgoptiondecl{all}
% \end{macro}
% \end{macro}
+% \end{macro}
+%
+% \changes{v2.1}{2013/04/07}{Introduced the \textsf{subtle}, \textsf{moderate},
+% and \textsf{extreme} package options}
+%
+% \begin{macro}{\KV@savetrees@subtle}
+% The \pkgoption{subtle} package option turns off all of
+% \pkgname{savetrees}'s space-saving tricks except those that preserve
+% document layout: margins, indentation, font heights, vertical spacing
+% surrounding titles, lists, displays, etc.
+%
+% \begin{macrocode}
+\define@key{savetrees}{subtle}{%
+ \setkeys{savetrees}{%
+ all=normal,
+ paragraphs=tight,
+ floats=tight,
+ mathspacing=tight,
+ wordspacing=tight,
+ tracking=tight
+ }%
+}
+\DeclareOptionX{subtle}{\KV@savetrees@subtle}
+% \end{macrocode}
+% \pkgoptiondecl{subtle}
+% \end{macro}
+%
+% \begin{macro}{\KV@savetrees@moderate}
+% The \pkgoption{moderate} package option includes everything covered by
+% \pkgoption{subtle} but additionally makes the font narrower, removes
+% vertical white space around lists and displays, cuts back on
+% indentation, reduces interline spacing, and drops \texttt{NOTE} fields
+% from the bibliography,
+%
+% \begin{macrocode}
+\define@key{savetrees}{moderate}{%
+ \setkeys{savetrees}{%
+ subtle=yes,
+ charwidths=tight,
+ mathdisplays=tight,
+ lists=tight,
+ indent=tight,
+ leading=tight,
+ bibnotes=tight
+ }%
+}
+\DeclareOptionX{moderate}{\KV@savetrees@moderate}
+% \end{macrocode}
+% \pkgoptiondecl{moderate}
+% \end{macro}
+%
+% \begin{macro}{\KV@savetrees@extreme}
+% The \pkgoption{extreme} package option is simply a synonym for |all=tight|.
+%
+% \begin{macrocode}
+\DeclareOptionX{extreme}{%
+ \setkeys{savetrees}{all=tight}%
+}
+% \end{macrocode}
+% \pkgoptiondecl{extreme}
+% \end{macro}
+%
+% \subsubsection{Parameter tuning}
%
-% \paragraph{Parameter tuning}
% While \pkgname{savetrees} tries to use reasonable defaults for the
% numerical values used by its space-saving techniques, many of these
% parameters can be modified conveniently via package options:
@@ -1245,7 +1525,8 @@
% \end{macrocode}
% \pkgoptiondecl{wordspacingfraction}
%
-% \paragraph{Obsolete options}
+% \subsubsection{Obsolete options}
+%
% \pkgname{savetrees} used to name all of its options
% |normal|\meta{something}. None of these took arguments so the only
% usage model was for \pkgname{savetrees} to turn all space-saving
@@ -1306,7 +1587,7 @@
% \subsection{Section titles}
%
% The \LaTeX{} default is to typeset section titles in a large font and
-% with significant surrounding whitespace. We use the
+% with significant surrounding white space. We use the
% \pkgname{titlesec} package to typeset section titles in the same font
% size as the body text and to leave only a single blank line above and
% below them.
@@ -1346,8 +1627,8 @@
% \subsection{List spacing}
%
% We try to save space in itemized lists, enumerated lists, and
-% description lists by reducing indentation slightly and by eliminating
-% inter-item spacing altogether.
+% description lists by reducing indentation and by eliminating
+% pre-list and inter-item spacing altogether.
%
% \begin{macrocode}
\if@st@tight@lists
@@ -1371,10 +1652,12 @@
{\def\makelabel##1{\hss\llap{##1}}%
% \end{macrocode}
% The following lines have been modified from the original.
+% \changes{v2.1}{2013/04/05}{Reduced vertical space before the list}
% \begin{macrocode}
\settowidth{\leftmargin}{\csname\@itemitem\endcsname}%
\addtolength{\leftmargin}{\labelsep * \@itemdepth}%
- \setlength{\topsep}{4pt plus 1pt minus 2pt}%
+ \setlength{\partopsep}{0pt plus 4pt}%
+ \setlength{\topsep}{0pt plus 4pt}%
\setlength{\itemsep}{0pt}%
\setlength{\parsep}{0pt}%
\setlength{\listparindent}{\st@parindent}%
@@ -1401,10 +1684,12 @@
{\usecounter\@enumctr\def\makelabel##1{\hss\llap{##1}}%
% \end{macrocode}
% The following lines have been modified from the original.
+% \changes{v2.1}{2013/04/05}{Reduced vertical space before the list}
% \begin{macrocode}
\settowidth{\leftmargin}{\csname label\@enumctr\endcsname}%
\addtolength{\leftmargin}{\labelsep * \@enumdepth}%
- \setlength{\topsep}{4pt plus 1pt minus 2pt}%
+ \setlength{\partopsep}{0pt plus 4pt}%
+ \setlength{\topsep}{0pt plus 4pt}%
\setlength{\itemsep}{0pt}%
\setlength{\parsep}{0pt}%
\setlength{\listparindent}{\st@parindent}%
@@ -1421,11 +1706,18 @@
% The |description| environment is a bit simpler than the |itemize| and
% |enumerate| environments; it's a direct application of |list|. All we
% need to do is reduce the left margin from the |list| default of 2\,em
-% to a slightly denser~1\,em.
+% to a slightly denser~1\,pc.
+% \changes{v2.1}{2013/04/05}{Reduced vertical space before and within the list}
% \begin{macrocode}
\renewenvironment{description}{%
- \begin{list}{}{\setlength{\leftmargin}{1em}%
- \labelwidth\z@ \itemindent-\leftmargin
+ \begin{list}{}{\setlength{\leftmargin}{1pc}%
+ \setlength{\itemindent}{-\leftmargin}%
+ \setlength{\partopsep}{0pt plus 4pt}%
+ \setlength{\topsep}{0pt plus 4pt}%
+ \setlength{\itemsep}{0pt}%
+ \setlength{\parsep}{0pt}%
+ \setlength{\labelwidth}{0pt}%
+ \setlength{\listparindent}{\st@parindent}%
\let\makelabel\descriptionlabel}%
}{%
\end{list}
@@ -1486,8 +1778,8 @@
% By default, the document title is typeset in the |\LARGE| font size,
% and the author list and date are typeset |\large|. We redefine
% |\@maketitle| to typeset the title |\large| and everything else in the
-% body font. In addition, we remove the extra whitespace above the
-% title and lessen the whitespace below the title.
+% body font. In addition, we remove the extra white space above the
+% title and lessen the white space below the title.
% \begin{macrocode}
\if@st@tight@title
% \end{macrocode}
@@ -1520,7 +1812,7 @@
%
% \begin{macro}{\baselinestretch}
% A document's page count can be reduced quite significantly by reducing
-% the amount of whitespace between successive lines of text so that's
+% the amount of white space between successive lines of text so that's
% exactly what we do below.
% \begin{macrocode}
\if@st@tight@leading
@@ -1540,7 +1832,7 @@
% However, |\looseness| can be set to a negative number, which
% encourages \TeX\ to shrink the current paragraph by a given number of
% lines. For this technique to work, the paragraph must be relatively
-% long so \TeX\ has enough shrinkable whitespace to work with.
+% long so \TeX\ has enough shrinkable white space to work with.
%
% Unfortunately, |\looseness| applies only to the current paragraph. We
% therefore use |\everypar| to inject |\looseness=-1| into every
@@ -1575,7 +1867,7 @@
% expansion is intended to improve text ``color''---the even balance
% between ink and absence of ink on a page---by subtly expanding or
% narrowing character widths instead of by adding or removing
-% whitespace. \pkgname{savetrees} hijacks this feature as a
+% white space. \pkgname{savetrees} hijacks this feature as a
% space-saving mechanisms by specifying a maximum expansion of~0\% of a
% character's natural width but a maximum contraction of greater
% than~0\%.
@@ -1737,6 +2029,49 @@
% \labelprevcodeline{code:stbn-end}
% \end{macro}
%
+% \subsection{Mathematical expressions}
+% \label{sec:math-exprs}
+%
+% By default, mathematical expressions contain substantial white space
+% around operators, relations, etc. Here, we shave approximately three
+% math units off each of |\thinmuskip|, |\medmuskip|, and
+% |\thickmuskip|. This needs to happen after the |\begin{document}| so
+% that the new values don't get overwritten.
+% \changes{v2.1}{2013/04/06}{Added support for squeezing space out of
+% mathematical expressions}
+%
+% \begin{macrocode}
+\if@st@tight@mathspacing
+ \AtBeginDocument{%
+ \thinmuskip=0mu plus 3mu
+ \medmuskip=1mu plus 4mu
+ \thickmuskip=2mu plus 5mu
+ }
+\fi
+% \end{macrocode}
+%
+%
+% \subsection{Displayed mathematics}
+% \label{sec:math-displays}
+%
+% Displayed mathematical expressions are normally offset from the
+% surrounding text with vertical white space. Here, we set the amount of
+% vertical white space to zero. This needs to happen after the
+% |\begin{document}| so that the new values don't get overwritten.
+% \changes{v2.1}{2013/04/06}{Added support for removing vertical space
+% around displayed mathematics}
+%
+% \begin{macrocode}
+\if@st@tight@mathdisplays
+ \AtBeginDocument{%
+ \abovedisplayskip=0pt plus 3pt
+ \belowdisplayskip=0pt plus 3pt
+ \abovedisplayshortskip=0pt plus 3pt
+ \belowdisplayshortskip=0pt plus 3pt
+ }
+\fi
+% \end{macrocode}
+%
% \begin{macrocode}
%</package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/savetrees/savetrees.ins b/Master/texmf-dist/source/latex/savetrees/savetrees.ins
index 85aa16ed63c..2d75cbaca67 100644
--- a/Master/texmf-dist/source/latex/savetrees/savetrees.ins
+++ b/Master/texmf-dist/source/latex/savetrees/savetrees.ins
@@ -1,5 +1,5 @@
%%
-%% Copyright (C) 2011 by Scott Pakin <scott+st@pakin.org>
+%% Copyright (C) 2013 by Scott Pakin <scott+st@pakin.org>
%%
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3c of this license
@@ -25,7 +25,7 @@
This is a generated file.
-Copyright (C) 2011 by Scott Pakin <scott+st@pakin.org>
+Copyright (C) 2013 by Scott Pakin <scott+st@pakin.org>
This file may be distributed and/or modified under the conditions of
the LaTeX Project Public License, either version 1.3c of this license
diff --git a/Master/texmf-dist/tex/latex/savetrees/savetrees.sty b/Master/texmf-dist/tex/latex/savetrees/savetrees.sty
index f68ae9d79aa..e81721393aa 100644
--- a/Master/texmf-dist/tex/latex/savetrees/savetrees.sty
+++ b/Master/texmf-dist/tex/latex/savetrees/savetrees.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2011 by Scott Pakin <scott+st@pakin.org>
+%% Copyright (C) 2013 by Scott Pakin <scott+st@pakin.org>
%%
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3c of this license
@@ -22,10 +22,10 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{savetrees}
- [2011/05/14 v2.0 Pack as much text as possible onto each page]
+ [2013/04/09 v2.1 Pack as much text as possible onto each page]
\newcommand*{\st@margin@width}{1.5cm}
\newcommand*{\st@parindent}{1em}
-\newcommand*{\st@baselinestretch}{0.9}
+\newcommand*{\st@baselinestretch}{0.95}
\newcommand*{\st@char@shrink}{50}
\newcommand*{\st@cspace@shrink}{-25}
\newcommand*{\st@wspace@factor}{0.8}
@@ -65,6 +65,8 @@
\st@define@option{wordspacing}
\st@define@option{bibliography}
\st@define@option{bibnotes}
+\st@define@option{mathspacing}
+\st@define@option{mathdisplays}
\define@choicekey{savetrees}{all}[\st@arg\st@arg@num]{tight,normal}[tight]{%
\ifnum\st@arg@num=0
\@st@tight@sectionstrue
@@ -80,6 +82,8 @@
\@st@tight@wordspacingtrue
\@st@tight@bibliographytrue
\@st@tight@bibnotestrue
+ \@st@tight@mathspacingtrue
+ \@st@tight@mathdisplaystrue
\else
\@st@tight@sectionsfalse
\@st@tight@marginsfalse
@@ -94,9 +98,37 @@
\@st@tight@wordspacingfalse
\@st@tight@bibliographyfalse
\@st@tight@bibnotesfalse
+ \@st@tight@mathspacingfalse
+ \@st@tight@mathdisplaysfalse
\fi
}
\DeclareOptionX{all}[tight]{\KV@savetrees@all{#1}}
+\define@key{savetrees}{subtle}{%
+ \setkeys{savetrees}{%
+ all=normal,
+ paragraphs=tight,
+ floats=tight,
+ mathspacing=tight,
+ wordspacing=tight,
+ tracking=tight
+ }%
+}
+\DeclareOptionX{subtle}{\KV@savetrees@subtle}
+\define@key{savetrees}{moderate}{%
+ \setkeys{savetrees}{%
+ subtle=yes,
+ charwidths=tight,
+ mathdisplays=tight,
+ lists=tight,
+ indent=tight,
+ leading=tight,
+ bibnotes=tight
+ }%
+}
+\DeclareOptionX{moderate}{\KV@savetrees@moderate}
+\DeclareOptionX{extreme}{%
+ \setkeys{savetrees}{all=tight}%
+}
\DeclareOptionX{marginwidth}{\gdef\st@margin@width{#1}}
\DeclareOptionX{parindent}{\gdef\st@parindent{#1}}
\DeclareOptionX{leadingfraction}{\gdef\st@baselinestretch{#1}}
@@ -164,7 +196,8 @@
{\def\makelabel##1{\hss\llap{##1}}%
\settowidth{\leftmargin}{\csname\@itemitem\endcsname}%
\addtolength{\leftmargin}{\labelsep * \@itemdepth}%
- \setlength{\topsep}{4pt plus 1pt minus 2pt}%
+ \setlength{\partopsep}{0pt plus 4pt}%
+ \setlength{\topsep}{0pt plus 4pt}%
\setlength{\itemsep}{0pt}%
\setlength{\parsep}{0pt}%
\setlength{\listparindent}{\st@parindent}%
@@ -180,15 +213,22 @@
{\usecounter\@enumctr\def\makelabel##1{\hss\llap{##1}}%
\settowidth{\leftmargin}{\csname label\@enumctr\endcsname}%
\addtolength{\leftmargin}{\labelsep * \@enumdepth}%
- \setlength{\topsep}{4pt plus 1pt minus 2pt}%
+ \setlength{\partopsep}{0pt plus 4pt}%
+ \setlength{\topsep}{0pt plus 4pt}%
\setlength{\itemsep}{0pt}%
\setlength{\parsep}{0pt}%
\setlength{\listparindent}{\st@parindent}%
}
\fi}
\renewenvironment{description}{%
- \begin{list}{}{\setlength{\leftmargin}{1em}%
- \labelwidth\z@ \itemindent-\leftmargin
+ \begin{list}{}{\setlength{\leftmargin}{1pc}%
+ \setlength{\itemindent}{-\leftmargin}%
+ \setlength{\partopsep}{0pt plus 4pt}%
+ \setlength{\topsep}{0pt plus 4pt}%
+ \setlength{\itemsep}{0pt}%
+ \setlength{\parsep}{0pt}%
+ \setlength{\labelwidth}{0pt}%
+ \setlength{\listparindent}{\st@parindent}%
\let\makelabel\descriptionlabel}%
}{%
\end{list}
@@ -284,6 +324,21 @@
\else
\newcommand{\savetreesbibnote}[1]{#1}
\fi
+\if@st@tight@mathspacing
+ \AtBeginDocument{%
+ \thinmuskip=0mu plus 3mu
+ \medmuskip=1mu plus 4mu
+ \thickmuskip=2mu plus 5mu
+ }
+\fi
+\if@st@tight@mathdisplays
+ \AtBeginDocument{%
+ \abovedisplayskip=0pt plus 3pt
+ \belowdisplayskip=0pt plus 3pt
+ \abovedisplayshortskip=0pt plus 3pt
+ \belowdisplayshortskip=0pt plus 3pt
+ }
+\fi
\endinput
%%
%% End of file `savetrees.sty'.