From 022ecad12921815d7836230953b959498fab9d77 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 18 Feb 2011 00:13:23 +0000 Subject: newverbs 1.2+ (16feb11) git-svn-id: svn://tug.org/texlive/trunk@21441 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/newverbs/newverbs.sty | 26 +++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'Master/texmf-dist/tex/latex/newverbs') diff --git a/Master/texmf-dist/tex/latex/newverbs/newverbs.sty b/Master/texmf-dist/tex/latex/newverbs/newverbs.sty index 9e0f3520413..4c856f47d88 100644 --- a/Master/texmf-dist/tex/latex/newverbs/newverbs.sty +++ b/Master/texmf-dist/tex/latex/newverbs/newverbs.sty @@ -24,9 +24,9 @@ %% This work consists of the files newverbs.dtx and newverbs.ins %% and the derived file newverbs.sty. %% -%% $Id: newverbs.dtx 2086 2011-01-27 21:49:52Z martin $ +%% $Id: newverbs.dtx 2161 2011-02-16 16:19:38Z martin $ \ProvidesPackage{newverbs} - [2010/04/13 v1.1 Define new 'verb' commands and short verb. characters] + [2011/02/16 v1.2 Define new 'verb' commands and short verb. characters] \newcommand*\newverbcommand{\new@verbcommand\newcommand} \newcommand*\renewverbcommand{\new@verbcommand\renewcommand} \newcommand*\provideverbcommand{\new@verbcommand\providecommand} @@ -35,9 +35,31 @@ \begingroup \newverbcommand@settings \def\verb@egroup{\verb@orig@egroup#4\endgroup}% + \def\newverbs@txend{#4\endgroup} #3\verb }% } +\def\newverbs@tabularxsupport{% + \begingroup + \def\orig@TX@vb##1{\def\@tempa####1##1{\toks@{####1}\edef\@tempa{\the\toks@}% + \expandafter\TX@v\meaning\@tempa\\ \\\ifnum0=`{\fi}}\@tempa!} + \ifx\TX@vb\orig@TX@vb + \endgroup + \PackageInfo{newverbs}{Patching 'TX@vb' macro of the 'tabularx' package.}% + \def\TX@vb##1{\def\@tempa####1##1{\toks@{####1}\edef\@tempa{\the\toks@}% + \expandafter\TX@v\meaning\@tempa\\ \\\ifnum0=`{\fi}\newverbs@txend}\@tempa!} + \else + \endgroup + \PackageWarning{newverbs}{Couldn't patch 'TX@vb' macro of the 'tabularx' package. Definition unknown.}% + \fi + \let\newverbs@tabularxsupport\relax +} +\def\newverbs@txend{} +\@ifpackageloaded{tabularx}{% + \newverbs@tabularxsupport +}{% + \AtBeginDocument{\@ifpackageloaded{tabularx}{\newverbs@tabularxsupport}{}}% +} \def\newverbcommand@settings{% \let\verb@orig@egroup\verb@egroup \let\verbbox\@tempboxa -- cgit v1.2.3