From 1720309de72694c4e699af26b975c1afd1239ca7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 14 Sep 2011 22:23:29 +0000 Subject: nicetext 0.44 (14sep11) git-svn-id: svn://tug.org/texlive/trunk@23956 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/nicetext/niceverb.sty | 28 +++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'Master/texmf-dist/tex/latex/nicetext/niceverb.sty') diff --git a/Master/texmf-dist/tex/latex/nicetext/niceverb.sty b/Master/texmf-dist/tex/latex/nicetext/niceverb.sty index 2c4e0a7a9d1..8f88e1e46ce 100644 --- a/Master/texmf-dist/tex/latex/nicetext/niceverb.sty +++ b/Master/texmf-dist/tex/latex/nicetext/niceverb.sty @@ -1,5 +1,5 @@ \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{niceverb}[2011/08/20 v0.43 +\ProvidesPackage{niceverb}[2011/09/09 v0.44 minimize doc markup (UL)] %% Copyright (C) 2009-2011 Uwe Lueck, @@ -157,7 +157,11 @@ \verb@eol@error %% TODO change message 2009/04/09 }{\string\NVerb \string#1}} %% 2009/04/11: about `etc.' [preceding a box!? 2010/03/14] -\newcommand*{\niceverb_normal_egroup}{\egroup \ifmmode\else\@\fi} +\newcommand*{\niceverb_normal_egroup}{% + \egroup +%% 2011/09/09 adding `\niceverb_maybe_rq' for `\AddQuotes': + \niceverb_maybe_rq + \ifmmode\else\@\fi} \@ifdefinable\niceverb_egroup {\let\niceverb_egroup\niceverb_normal_egroup} %% @@ -196,6 +200,7 @@ \expandafter\expandafter\expandafter \lq_double_decide_ii \else \endgroup + \niceverb_maybe_qs %% 2011/09/09 \expandafter\expandafter\expandafter \NVerb \expandafter\expandafter\expandafter \'% \fi @@ -632,6 +637,22 @@ %% the ampersand in single (non-verbatim) quotes. % TODO \qtdverb!? alternative meaning for \LQverb!? 2010/03/06 % rather rare, & takes less space 2010/03/09 +%% |\AddQuotes| automatically surrounds code with single quotes. +%% I have so often felt that it was a design mistake +%% to drop them (2011/09/09): +\newcommand*{\AddQuotes}{% + \let\niceverb_maybe_qs\niceverb_add_qs} +\newcommand*{\niceverb_add_qs}{% +%% In a math display, quotes are suppressed even with `\AddQuotes': + \ifmmode\else + `\let\niceverb_maybe_rq\niceverb_rq + \fi} +\@ifdefinable\niceverb_maybe_rq{\let\niceverb_maybe_rq\relax} +\newcommand*{\niceverb_rq}{'\let\niceverb_maybe_rq\relax} +%% You can undo this by |\DontAddQuotes|: +\newcommand*{\DontAddQuotes}{\let\niceverb_maybe_qs\relax} +%% The default will be the behaviour that we had before: +\DontAddQuotes %% |\dqtd{}| can be used for enclosing in \emph{double} quotes %% with the dangerous `\nvAllRightQuotesSansSerif' (see above). \newcommand*{\dqtd}[1]{``#1"} @@ -804,3 +825,6 @@ v0.43 2011/05/09 \gt, \lt 2011/06/20 \MakeActiveLetHere in \nice_maybe_meta_verb !!! 2011/06/27 2011/05/27 undone 2011/08/20 `r0.42', `v0.43' +with nicetext RELEASE r0.43 +v0.44 2011/09/09 \AddQuotes, \DontAddQuotes + -- cgit v1.2.3