diff options
author | Karl Berry <karl@freefriends.org> | 2010-11-19 23:49:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-11-19 23:49:18 +0000 |
commit | fb9bb69fbc53a537a078c6182710a0fd30cb7eb4 (patch) | |
tree | c0adcbd980fcf745ccb51933c5d57caa862b7d1b /Master/texmf-dist/tex/latex/csquotes | |
parent | bd4b67d661b2d502c97e0765532750f0634542de (diff) |
csquotes 5.1 (19nov10)
git-svn-id: svn://tug.org/texlive/trunk@20497 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/csquotes')
-rw-r--r-- | Master/texmf-dist/tex/latex/csquotes/csq-compat.def | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/csquotes/csquotes.cfg | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/csquotes/csquotes.def | 24 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/csquotes/csquotes.sty | 160 |
4 files changed, 122 insertions, 68 deletions
diff --git a/Master/texmf-dist/tex/latex/csquotes/csq-compat.def b/Master/texmf-dist/tex/latex/csquotes/csq-compat.def index c530a7e89a0..a4ab6a1cdb3 100644 --- a/Master/texmf-dist/tex/latex/csquotes/csq-compat.def +++ b/Master/texmf-dist/tex/latex/csquotes/csq-compat.def @@ -1,7 +1,7 @@ -% $Id: csq-compat.def,v 5.0c 2010/09/21 18:17:28 lehman stable $ +% $Id: csq-compat.def,v 5.1 2010/11/19 15:15:40 lehman stable $ \ProvidesFile{csquotes.def} -[\csq@rcsid $Id: csq-compat.def,v 5.0c 2010/09/21 18:17:28 lehman stable $ +[\csq@rcsid $Id: csq-compat.def,v 5.1 2010/11/19 15:15:40 lehman stable $ csquotes backwards compatibility] \def\csq@getversion#1{% diff --git a/Master/texmf-dist/tex/latex/csquotes/csquotes.cfg b/Master/texmf-dist/tex/latex/csquotes/csquotes.cfg index 616515b3f13..81795a7a39e 100644 --- a/Master/texmf-dist/tex/latex/csquotes/csquotes.cfg +++ b/Master/texmf-dist/tex/latex/csquotes/csquotes.cfg @@ -1,4 +1,4 @@ -% $Id: csquotes.cfg,v 5.0c 2010/09/21 18:17:28 lehman stable $ +% $Id: csquotes.cfg,v 5.1 2010/11/19 15:15:40 lehman stable $ \ProvidesFile{csquotes.cfg} diff --git a/Master/texmf-dist/tex/latex/csquotes/csquotes.def b/Master/texmf-dist/tex/latex/csquotes/csquotes.def index ce1a04725ef..f5588da47d4 100644 --- a/Master/texmf-dist/tex/latex/csquotes/csquotes.def +++ b/Master/texmf-dist/tex/latex/csquotes/csquotes.def @@ -1,14 +1,13 @@ -% $Id: csquotes.def,v 5.0c 2010/09/21 18:17:28 lehman stable $ +% $Id: csquotes.def,v 5.1 2010/11/19 15:15:40 lehman stable $ \ProvidesFile{csquotes.def} -[\csq@rcsid $Id: csquotes.def,v 5.0c 2010/09/21 18:17:28 lehman stable $ +[\csq@rcsid $Id: csquotes.def,v 5.1 2010/11/19 15:15:40 lehman stable $ csquotes generic definitions] % Set defaults -\ExecuteQuoteOptions{autostyle=tryonce,autopunct,maxlevel=2} +\ExecuteQuoteOptions{autostyle=tryonce,autopunct,maxlevel=2,threshold=3,thresholdtype=lines} \SetBlockEnvironment{quote} -\SetBlockThreshold{3} \SetCiteCommand{\cite} % Predefined backend styles @@ -25,7 +24,7 @@ [0.025em] {\quotesinglbase} {\textquoteright} -\DeclareQuoteStyle[guillements*]{croatian}% verified +\DeclareQuoteStyle[guillemets*]{croatian}% verified {\guillemotleft} {\guillemotright} [0.025em] @@ -370,21 +369,6 @@ \DeclareQuoteGlyph{EU1}{"2039}% = angle quot. mark, left-pointing single = \guilsinglleft \DeclareQuoteGlyph{EU1}{"203A}% = angle quot. mark, right-pointing single = \guilsinglright -\DeclareQuoteGlyph{U}{"0022}% = neutral quot. mark, double = \textquotedbl -\DeclareQuoteGlyph{U}{"0027}% = neutral quot. mark, single = \textquotesingle -\DeclareQuoteGlyph{U}{"00AB}% = angle quot. mark, left-pointing double = \guillemotleft -\DeclareQuoteGlyph{U}{"00BB}% = angle quot. mark, right-pointing double = \guillemotright -\DeclareQuoteGlyph{U}{"2018}% = comma quot. mark, single turned = \textquoteleft -\DeclareQuoteGlyph{U}{"2019}% = comma quot. mark, single = \textquoteright -\DeclareQuoteGlyph{U}{"201A}% = comma quot. mark, low single = \quotesinglbase -\DeclareQuoteGlyph{U}{"201B}% = comma quot. mark, single reversed = n.a. -\DeclareQuoteGlyph{U}{"201C}% = comma quot. mark, double turned = \textquotedblleft -\DeclareQuoteGlyph{U}{"201D}% = comma quot. mark, double = \textquotedblright -\DeclareQuoteGlyph{U}{"201E}% = comma quot. mark, low double = \quotedblbase -\DeclareQuoteGlyph{U}{"201F}% = comma quot. mark, double reversed = n.a. -\DeclareQuoteGlyph{U}{"2039}% = angle quot. mark, left-pointing single = \guilsinglleft -\DeclareQuoteGlyph{U}{"203A}% = angle quot. mark, right-pointing single = \guilsinglright - % Unicode (for LuaTeX) \DeclareQuoteGlyph{EU2}{"0022}% = neutral quot. mark, double = \textquotedbl \DeclareQuoteGlyph{EU2}{"0027}% = neutral quot. mark, single = \textquotesingle diff --git a/Master/texmf-dist/tex/latex/csquotes/csquotes.sty b/Master/texmf-dist/tex/latex/csquotes/csquotes.sty index 9faf582a3c8..9d412cc83ff 100644 --- a/Master/texmf-dist/tex/latex/csquotes/csquotes.sty +++ b/Master/texmf-dist/tex/latex/csquotes/csquotes.sty @@ -1,4 +1,4 @@ -% $Id: csquotes.sty,v 5.0c 2010/09/21 18:17:28 lehman stable $ +% $Id: csquotes.sty,v 5.1 2010/11/19 15:15:40 lehman stable $ % Copyright (c) 2003-2010 Philipp Lehman. % @@ -18,11 +18,11 @@ \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{csquotes} -[\csq@rcsid $Id: csquotes.sty,v 5.0c 2010/09/21 18:17:28 lehman stable $ +[\csq@rcsid $Id: csquotes.sty,v 5.1 2010/11/19 15:15:40 lehman stable $ context-sensitive quotations] \def\csq@version$#1: #2.#3 ${#2#3} -\edef\csq@version{\csq@version$Revision: 5.0 $} +\edef\csq@version{\csq@version$Revision: 5.1 $} %% Compatibility and requirements @@ -86,11 +86,12 @@ %% General -\newtoggle{csq@temp} +\newtoggle{csq@tempsw} \newtoggle{csq@quiet} \newtoggle{csq@active} \newtoggle{csq@block} \newtoggle{csq@parbox} +\newtoggle{csq@parthreshold} \newbool{csdisplay} \newcount\csq@reset @@ -223,6 +224,15 @@ \let\csq@noline\@gobble \AtBeginDocument{\let\csq@noline\@empty} +\protected\def\csq@logdebug#1{% + \begingroup + \def\MessageBreak{^^J(csquotes) \@spaces\@spaces\@spaces\space}% + \set@display@protect + \immediate\write\m@ne{Package csquotes Debug: #1\on@line.}% + \endgroup} + +\let\csq@debug\@gobble + % Errors \protected\def\csq@errormark{% @@ -284,7 +294,7 @@ \protected\def\csq@err@gleft{% \csq@err@mismatch{% - Still \the\csq@qlevel\space quote\ifnum\csq@qlevel>\@ne s\fi + Still \number\csq@qlevel\space quote\ifnum\csq@qlevel>\@ne s\fi \space open. If you continue, I will write a summary\MessageBreak of all previously opened groups to the transcript file}% \showgroups} @@ -312,7 +322,7 @@ \protected\def\csq@err@nbquote{% \csq@mismatch{% - You have nested a block quotation. Block quotation + You have nested a \@backslashchar blockquote. Block quotation commands\MessageBreak may only be used on quotation level 0}}% \protected\def\csq@err@patch#1{% @@ -379,7 +389,7 @@ \ifnum\csq@qlevel>\z@ \csq@mismatch{% Level 1 quote invalid at this point. - The current level is \the\csq@qlevel}% + The current level is \number\csq@qlevel}% \advance\csq@qlevel\@ne \let\csq@oqmark\csq@eqerror \else @@ -395,7 +405,7 @@ \ifnum\csq@qlevel>\@ne \csq@mismatch{% Level 2 quote invalid at this point. - The current level is \the\csq@qlevel}% + The current level is \number\csq@qlevel}% \advance\csq@qlevel\@ne \let\csq@iqmark\csq@eqerror \else @@ -431,8 +441,8 @@ \def\csq@qopen{% \ifnum\csq@qlevel>\csq@maxlvl \csq@mismatch{% - Level \the\csq@qlevel\space quote invalid at this point. - The maximum level is \the\csq@maxlvl}% + Level \number\csq@qlevel\space quote invalid at this point. + The maximum level is \number\csq@maxlvl}% \else \csq@resetstyle \csq@init @@ -632,7 +642,10 @@ \let\csq@setsfcodes\relax} \def\csq@ifsfcodes{% - \ifnumequal\csq@sf@question{\sfcode`\?}} + \ifnumequal\csq@sf@question + {\ifcsdef{csq@sfactor@\the\sfcode`\?} + {\csuse{csq@sfactor@\the\sfcode`\?}} + {\sfcode`\?}}} \def\csq@setfrcodes{% \ifnum\sfcode`\A=\@m @@ -1133,52 +1146,84 @@ \long\def\csq@bquote@i#1#2#3#4#5#6{% \begingroup - \@blockquote@prehook - \@fileswfalse - \let\csq@bslash\\% - \let\csq@newline\newline - \togglefalse{csq@temp}% + \blockquote@prehook + \togglefalse{csq@tempsw}% \setbox\@tempboxa=\vbox{% - \def\par{% - \global\toggletrue{csq@temp}\@par}% - \def\\{% - \global\toggletrue{csq@temp}% - \let\\\csq@bslash\\}% - \def\newline{% - \global\toggletrue{csq@temp}% - \let\newline\csq@newline\newline}% - \parfillskip\z@\@plus 1fil\relax\parindent\z@ - \vrule\@height1\baselineskip\@width\z@ #1#6#5#2}% - \ifdim\ht\@tempboxa>\csq@tshold\baselineskip - \toggletrue{csq@temp}% - \fi - \iftoggle{csq@temp} + \csuse{csq@bcount@\csq@thresholdtype}% + \parindent\z@ + \blockquote@parsehook + #1#6#5#2\endgraf\expandafter}\expandafter + \@tempcnta\number\prevgraf\relax + \iftoggle{csq@tempsw} + {\csq@debug{% + \@backslashchar blockquote has \number\@tempcnta\space + \csq@thresholdtype\space and manual breaks.\MessageBreak + Setting as display}} + {\ifnumgreater\@tempcnta\csq@tshold + {\toggletrue{csq@tempsw}} + {}% + \csq@debug{% + \@backslashchar blockquote has \number\@tempcnta\space + \csq@thresholdtype. Threshold is \number\csq@tshold.\MessageBreak + Setting \iftoggle{csq@tempsw}{as display}{inline}}}% + \blockquote@posthook + \iftoggle{csq@tempsw} {\aftergroup\@firstoftwo} {\aftergroup\@secondoftwo}% - \@blockquote@posthook \endgroup \csq@bquote@iii\csq@bquote@ii{#1}{#2}{#3}{#4}{#5}{#6}} -\newrobustcmd*{\BlockquoteDisable}{% - \gappto\@blockquote@prehook} - -\newcommand*{\@blockquote@prehook}{% +\def\csq@bcount@lines{% + \iftoggle{csq@parthreshold} + {\def\par{\global\toggletrue{csq@tempsw}\@normalcr\relax}% + \let\newline\par + \let\\\par} + {}% + \parfillskip\z@\@plus1fil\relax} + +\def\csq@bcount@words{% + \iftoggle{csq@parthreshold} + {\def\par{\global\toggletrue{csq@tempsw}\space}% + \let\newline\par + \let\\\par} + {\let\par\space + \let\newline\space + \let\\\space}% + \let\nobreakspace\space + \let~\space + \hsize\z@ + \hyphenpenalty\@M + \exhyphenpenalty\csq@splitcomp + \relpenalty\@M + \binoppenalty\@M + \let\allowbreak\relax + \hfuzz\maxdimen} + +\newcommand*{\blockquote@prehook}{% \def\@elt##1{\global\value{##1}\the\value{##1}\relax}% \edef\csq@tempa{\cl@@ckpt}% \let\@elt\relax + \@fileswfalse} + +\newcommand*{\blockquote@posthook}{% + \csq@tempa} + +\newcommand*{\blockquote@parsehook}{% \let\csq@nbgobble\@gobble \let\csq@bquote\@gobblefive \let\csq@warnorerr\@gobblethree \let\csq@error\@gobbletwo \let\csq@warning\@gobble \let\csq@info\@gobble + \def\textelp{\@ifstar\@gobble\@gobble}% + \let\textins\textelp \let\marginpar\@gobbletwo@optarg \let\label\@gobble \let\index\@gobble \let\glossary\@gobble} -\newcommand*{\@blockquote@posthook}{% - \csq@tempa} +\newrobustcmd*{\BlockquoteDisable}{% + \gappto\blockquote@parsehook} \let\csq@nbgobble\@firstofone @@ -2204,12 +2249,12 @@ % Special styles \DeclareQuoteStyle{debug} - {\textbf{[\the\csq@qlevel]}} - [\textbf{[\the\csq@qlevel]}] - {\textbf{[\the\csq@qlevel]}} - {\textbf{[\the\csq@qlevel]}} - [\textbf{[\the\csq@qlevel]}] - {\textbf{[\the\csq@qlevel]}} + {\textbf{[\number\@quotelevel]}} + [\textbf{[\number\@quotelevel]}] + {\textbf{[\number\@quotelevel]}} + {\textbf{[\number\@quotelevel]}} + [\textbf{[\number\@quotelevel]}] + {\textbf{[\number\@quotelevel]}} \DeclareQuoteStyle{fallback} {\textbf{?}} @@ -2231,6 +2276,11 @@ {\csq@info{Disabling strict warnings}% \let\csq@warnorerr\csq@warning@loose}} +\define@key{csq}{debug}[true]{% + \ifstrequal{#1}{true} + {\let\csq@debug\csq@logdebug} + {\let\csq@debug\@gobble}} + \define@key{csq}{autopunct}[true]{% \ifstrequal{#1}{true} {\let\csq@autopunct\csq@allpunct} @@ -2268,14 +2318,34 @@ {\csq@err@opt{maxlevel=#1}} {\csq@maxlvl#1\relax}} +\define@key{csq}{threshold}{% + \SetBlockThreshold{#1}} + +\define@key{csq}{thresholdtype}[lines]{% + \ifcsdef{csq@bcount@#1}% + {\def\csq@thresholdtype{#1}} + {\csq@err@opt{thresholdtype=#1}}} + +\define@key{csq}{parthreshold}[true]{% + \settoggle{csq@parthreshold}{#1}} + +\define@key{csq}{splitcomp}[true]{% + \ifstrequal{#1}{true} + {\let\csq@splitcomp\z@} + {\let\csq@splitcomp\@M}} + +\define@key{csq}{csdisplay}[true]{% + \setbool{csdisplay}{#1}} + \define@key{csq}{version}{% \ifdef\csq@getversion {} {\input{csq-compat.def}}% \csq@getversion{#1}} -\define@key{csq}{csdisplay}[true]{% - \setbool{csdisplay}{#1}} +% Initialize + +\setkeys{csq}{thresholdtype=lines,parthreshold,splitcomp=false} %% Initial setup |