summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/quoting
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-01-29 22:39:23 +0000
committerKarl Berry <karl@freefriends.org>2014-01-29 22:39:23 +0000
commit4e4505c50983a9ff5f1b1f4269326cf97f121a90 (patch)
tree95e43f9a68ed4577112dc4850b4fefd7d3268ab6 /Master/texmf-dist/source/latex/quoting
parent6d56f935e68d3edbe7afc8613d516999443019fb (diff)
quoting (29jan14)
git-svn-id: svn://tug.org/texlive/trunk@32818 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/quoting')
-rw-r--r--Master/texmf-dist/source/latex/quoting/quoting.dtx40
1 files changed, 30 insertions, 10 deletions
diff --git a/Master/texmf-dist/source/latex/quoting/quoting.dtx b/Master/texmf-dist/source/latex/quoting/quoting.dtx
index e96027cd215..8ea2c69696e 100644
--- a/Master/texmf-dist/source/latex/quoting/quoting.dtx
+++ b/Master/texmf-dist/source/latex/quoting/quoting.dtx
@@ -2,7 +2,7 @@
%
% This is file `quoting.dtx'.
%
-% Copyright (C) 2011--2012 by Thomas Titz <thomas.titz@chello.at>
+% Copyright (C) 2011--2014 by Thomas Titz <thomas.titz@chello.at>
%
% Permission is granted to distribute and/or modify this work under the
% terms of the LaTeX Project Public License (LPPL), version 1.3c or
@@ -50,7 +50,7 @@
%
% \fi
%
-% \CheckSum{168}
+% \CheckSum{169}
%
% \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
@@ -76,7 +76,7 @@
% \DoNotIndex{\ifbool,\item,\@M,\NeedsTeXFormat,\newbool,\newcommand}
% \DoNotIndex{\newenvironment,\newlength,\par,\ProvidesPackage,\relax}
% \DoNotIndex{\RequirePackage,\setlength,\z@}
-% \DoNotIndex{\else,\fi,\ifcase,\ifcsname,\or}
+% \DoNotIndex{\do,\else,\fi,\ifcase,\ifcsname,\or}
%
% \title{The \quo/ package\thanks{This document corresponds to
% \quo/~\fileversion, dated \filedate.}}
@@ -337,7 +337,7 @@
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{quoting}
- [2012/02/21 v0.1b Consolidated environment for displayed text]
+ [2014/01/28 v0.1c Consolidated environment for displayed text]
% \end{macrocode}
% We require the packages \textsf{kvoptions} (to conveniently specify
% options as key--value pairs) and \textsf{etoolbox} (e.g. for length
@@ -369,21 +369,29 @@
\setkeys{quo}{indentfirst=auto}
% \end{macrocode}
% \end{macro}
+%
+% \changes{v0.1c}{2014/01/28}{Options \textsf{font} and \textsf{font+}
+% now work if a class (e.g. \textsf{scrbook}, \textsf{scrreprt}) or
+% another package uses \texttt{\textbackslash let\textbackslash
+% do\textbackslash relax}}
+%
% \begin{macro}{\quotingfont}
% The \textsf{keyval} command |\define@key| is used to define the keys
% \textsf{font} and \textsf{font+}. With the help of |\docsvlist|
% (provided by \textsf{etoolbox}), we convert their comma-separated list
% of values to commands and use these commands to define |\quotingfont|
-% resp. to append its definition.
+% resp. to append its definition. We use |\def\do| so that the options
+% will also work if a class (e.g. \textsf{scrbook}, \textsf{scrreprt})
+% or another package uses |\let\do\relax|.
% \begin{macrocode}
\newcommand*{\quotingfont}{}
\define@key{quo}{font}{%
\def\quotingfont{}%
- \renewcommand*{\do}[1]{\appto{\quotingfont}{\csname ##1\endcsname}}%
+ \def\do##1{\appto{\quotingfont}{\csname ##1\endcsname}}%
\docsvlist{#1}%
}
\define@key{quo}{font+}{%
- \renewcommand*{\do}[1]{\appto{\quotingfont}{\csname ##1\endcsname}}%
+ \def\do##1{\appto{\quotingfont}{\csname ##1\endcsname}}%
\docsvlist{#1}%
}
% \end{macrocode}
@@ -592,8 +600,16 @@
\quotingfont
\quo@begintext\ignorespaces
% \end{macrocode}
-% At the end of \quo/ (and having typeset the replacement text of
-% \textsf{endtext}), the following actions are taken:
+%
+% \changes{v0.1c}{2014/01/28}{\quo/ is now permitted to close with a
+% list environment plus a blank line}
+%
+% At the end of \quo/, we typeset the replacement text of
+% \textsf{endtext}. (We also remove any preceding space if we are in
+% horizontal mode; this does not apply if, e.g., the \quo/ environment
+% closes with a list environment like \textsf{itemize} or
+% \textsf{enumerate} plus a blank line.) After that, the following
+% actions are taken:
% \begin{itemize}
%
% \item The \LaTeX\ kernel switch |@endpe| is set to false (so that
@@ -609,7 +625,11 @@
% \end{itemize}
% \begin{macrocode}
}{%
- \unskip\quo@endtext
+ \ifbool{hmode}{%
+ \unskip
+ }{%
+ }%
+ \quo@endtext
\endlist
\boolfalse{@endpe}%
\ifbool{quo@noorphanafter}{%