summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/newverbs/README9
-rw-r--r--Master/texmf-dist/doc/latex/newverbs/newverbs.pdfbin181707 -> 211449 bytes
-rw-r--r--Master/texmf-dist/source/latex/newverbs/newverbs.dtx76
-rw-r--r--Master/texmf-dist/tex/latex/newverbs/newverbs.sty15
4 files changed, 55 insertions, 45 deletions
diff --git a/Master/texmf-dist/doc/latex/newverbs/README b/Master/texmf-dist/doc/latex/newverbs/README
index f9d2b484d6b..e7ffaa68a0a 100644
--- a/Master/texmf-dist/doc/latex/newverbs/README
+++ b/Master/texmf-dist/doc/latex/newverbs/README
@@ -1,10 +1,11 @@
The 'newverbs' LaTeX package
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-This package allows the definition of \verb variants which add TeX code before and after the verbatim text (e.g. quotes or \fbox{}).
-When used together with the 'shortvrb' package it allows the definition of short verbatim characters which use this variants
-instead of the normal \verb.
+This package allows the definition of \verb variants which add TeX code before
+and after the verbatim text (e.g. quotes or \fbox{}). When used together with
+the 'shortvrb' package it allows the definition of short verbatim characters
+which use this variants instead of the normal \verb.
-Copyright (c) 2010 by Martin Scharrer <martin@scharrer-online.de>
+Copyright (c) 2010-2011 by Martin Scharrer <martin@scharrer-online.de>
WWW: http://latex.scharrer-online.de/
diff --git a/Master/texmf-dist/doc/latex/newverbs/newverbs.pdf b/Master/texmf-dist/doc/latex/newverbs/newverbs.pdf
index 8dc3088953b..4bfb2cf10b2 100644
--- a/Master/texmf-dist/doc/latex/newverbs/newverbs.pdf
+++ b/Master/texmf-dist/doc/latex/newverbs/newverbs.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/newverbs/newverbs.dtx b/Master/texmf-dist/source/latex/newverbs/newverbs.dtx
index e1d8ef78ff9..43c55b93057 100644
--- a/Master/texmf-dist/source/latex/newverbs/newverbs.dtx
+++ b/Master/texmf-dist/source/latex/newverbs/newverbs.dtx
@@ -1,6 +1,6 @@
% \iffalse
%<*copyright>
-%% Copyright (c) 2010 by Martin Scharrer <martin@scharrer-online.de>
+%% Copyright (c) 2010-2011 by Martin Scharrer <martin@scharrer-online.de>
%% WWW: http://latex.scharrer-online.de/
%%
%% This work may be distributed and/or modified under the
@@ -20,18 +20,18 @@
%</copyright>
%<*!copyright>
%
-%% $Id: newverbs.dtx 1816 2010-04-05 18:03:28Z martin $
+%% $Id: newverbs.dtx 2086 2011-01-27 21:49:52Z martin $
%
%<*driver>
\ProvidesFile{newverbs.dtx}
%</driver>
%<package>\ProvidesPackage{newverbs}
%<*package|driver>
- [2010/04/05 v1.0 Define new 'verb' commands and short verb. characters]
+ [2010/04/13 v1.1 Define new 'verb' commands and short verb. characters]
%</package|driver>
%
%<*driver>
-\documentclass{ltxdoc}
+\documentclass{ydoc}
\usepackage{hyperref}
\usepackage{xcolor}
@@ -40,12 +40,9 @@
\usepackage{shortvrb}
\MakeSpecialShortVerb{\qverb}{\"}
-
%\EnableCrossrefs
%\CodelineIndex
%\RecordChanges
-\providecommand*{\pkg}{\texttt}
-\providecommand*{\optstar}{\textcolor{gray}{\texttt{*}}}
\begin{document}
\DocInput{newverbs.dtx}
%\PrintChanges
@@ -54,7 +51,7 @@
%</driver>
% \fi
%
-% \CheckSum{58}\relax
+% \CheckSum{65}\relax
%
% \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
@@ -74,6 +71,7 @@
%
%
% \changes{v1.0}{2010/04/05}{Initial version}
+% \changes{v1.1}{2010/04/13}{Added usage of 'csquotes' macros if loaded.}
%
% \DoNotIndex{\newcommand,\newenvironment,\providecommand}
%
@@ -91,35 +89,36 @@
%
% \section{Usage}
%
-% \subsection{Defining new variants of \texorpdfstring{\cs{verb}}{'verb'}}
+% \subsection{Defining new variants of \cs{verb}}
%
-% \DescribeMacro\newverbcommand
-% \DescribeMacro\renewverbcommand
-% \DescribeMacro\provideverbcommand
+% \DescribeMacro\newverbcommand {<\textbackslash macro>}{<code before>}{<code after>}
+% \DescribeMacro\renewverbcommand {<\textbackslash macro>}{<code before>}{<code after>}
+% \DescribeMacro\provideverbcommand {<\textbackslash macro>}{<code before>}{<code after>}
% This macros allow the definition of \cs{verb} variants. The verbatim content is processed using \cs{verb}, but the
% variants can add \TeX\ code before and after it.
-% The syntax is \cs{\ldots verbcommand}\marg{macro}\marg{code before}\marg{code after}.
-% The three definition macros use |\newcommand*|, |\renewcommand*| and |\providecommand*| internal to define \meta{macro}, respectively.
+% The three definition macros use |\newcommand*|, |\renewcommand*| and |\providecommand*| internally to define \meta{macro}, respectively.
% Afterwards \meta{macro} can be used like \cs{verb}. The star version of \meta{macro} will use \cs{verb}|*|.
%
% See the implementation of \cs{qverb} in section~\ref{sec:impl} for an example.
%
%
-% \subsection{Provided \texorpdfstring{\cs{verb}}{'verb'} variants}
+% \subsection{Provided \cs{verb} variants}
%
% Two \cs{verb} variants are provided (i.e. with \cs{provideverbcommand}) by default.
%
-% \DescribeMacro\qverb
+% \DescribeMacro\qverb<char><verbatim material><char>
% This macro adds quote characters around the verbatim material.
% Two macros are used to insert the quotes: \cs{qverbbeginquote} (`) and \cs{qverbendquote} (').
-% They can be redefined by the user if required.
+% They can be redefined by the user if required. If the \pkg{csquotes} package was loaded beforehand
+% the above macros use its macros \cs{openinnerquote} and \cs{closeinnerquote} to take advantage of the language
+% dependent quotation marks. See the manual of \pkg{csquotes} for more details.
%
-% Using \cs{qverb}\meta{char}\meta{verbatim material}\meta{char} is equal to \\
-% \cs{qverbbeginquote}\cs{verb}\meta{char}\meta{verbatim material}\meta{char}\cs{qverbbeginquote}, or\\
-% |`|\cs{verb}\meta{char}\meta{verbatim material}\meta{char}|'|\\
+% Using \Macro\qverb<char><verbatim material><char> is equal to \\
+% \Macro\qverbbeginquote\AlsoMacro\verb<char><verbatim material><char>\AlsoMacro\qverbendquote, or\\
+% \MacroArgs'`'\AlsoMacro\verb<char><verbatim material><char>''
% when the default definition of the quote macros is used.
%
-% \DescribeMacro\fverb
+% \DescribeMacro\fverb<char><verbatim material><char>
% This macro adds a frame (|\fbox{}|) around the verbatim text (|\fverb+$&^_%$+| $\to$ \fverb+$&^_$+).
% A \TeX\ box is used to store the content first, then the box is framed.
% The user can define similar command using the following code:\\
@@ -128,16 +127,16 @@
% \hspace*{10em}|{\end{lrbox}\mycommand{\usebox{\verbbox}}}|}\\
% The temporary box \cs{verbbox} is only provided inside a |\...verbcommand|.
%
-% \subsection{Using \texorpdfstring{\cs{verb}}{'verb'} variants with short verbatim character}
+% \subsection{Using \cs{verb} variants with short verbatim character}
%
-% \DescribeMacro\MakeSpecialShortVerb
+% \DescribeMacro\MakeSpecialShortVerb*{<\textbackslash macro>}{\textbackslash\meta{char}}
% This package also defines a special version of the \cs{MakeShortVerb} macro from the \pkg{shortvrb} package.
-% The orignal command \cs{MakeShortVerb}\optstar|{\|\meta{char}|}| changes the meaning of \meta{char} so that
-% \meta{char}\meta{verbatim material}\meta{char} is a shorter alternative to
-% \cs{verb}\optstar\meta{char}\meta{verbatim material}\meta{char}.
+% The orignal command \Macro\MakeShortVerb*{\textbackslash\meta{char}} changes the meaning of \meta{char} so that
+% \MacroArgs<char><verbatim material><char>\ is a shorter alternative to
+% \Macro\verb*<char><verbatim material><char>.
%
-% The new macro \cs{MakeSpecialShortVerb}\optstar\marg{\cs{verb} variant}|{\|\meta{char}|}| does the same, but
-% instead of \cs{verb}\optstar\ it uses a \meta{\cs{verb} variant} which needs to be defined using \cs{newverbcommand}.
+% The new macro \Macro\MakeSpecialShortVerb*{\textbackslash\meta{verb variant}}{\textbackslash\meta{char}} does the same, but
+% instead of \Macro\verb*\relax\relax\ it uses a \MacroArgs'\'<verb variant>*\relax which needs to be defined using \cs{newverbcommand}.
% The package \pkg{shortvrb} must be loaded by the user in order to make this macro work. It is not loaded automatically by \pkg{newverbs}.
%
% The special meaning of \meta{char} can be removed using \pkg{shortvrb}'s \cs{DeleteShortVerb}, i.e.\ the same way as for
@@ -153,7 +152,7 @@
% \section{Compatibility with other verbatim packages}
% The compatibility with other verbatim packages is not tested yet. This package relies on the normal internal definition of \cs{verb}
% and \cs{MakeShortVerb}. Any package which changes these might break this package.
-% Users which encounter incapabilities should not hesitate to contact the package author (with details!).
+% Users which encounter incompatibilities should not hesitate to contact the package author (with details!).
%
% \StopEventually{}
% \section{Implementation}
@@ -176,9 +175,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\new@verbcommand}
-% Depending on |#1| a macro given by |#2| is (re-)defined/provided.
-% The code given by |#3| and |#4| is placed before and after the verb command.
+% \begin{macro}{\new@verbcommand}[4]{underlying definition macro}{macro to define}{code before}{code after}
% The trailing code is inserted by patching \cs{verb@egroup} which is called by \cs{verb}
% after the verbatim content.
% \begin{macrocode}
@@ -196,7 +193,7 @@
% \begin{macro}{\newverbcommand@settings}
% Some settings required for all new \cs{verb}-like commands.
% The original end group macro from \cs{verb} is saved away.
-% Also the temp box a is provided with a user friendly name.
+% Also the `temp box a' is provided with a user friendly name.
% \begin{macrocode}
\def\newverbcommand@settings{%
\let\verb@orig@egroup\verb@egroup
@@ -217,9 +214,16 @@
% \begin{macro}{\qverbbeginquote}
% \begin{macro}{\qverbendquote}
% This macros insert the actual quotes. They can be redefined by the user to contain the required quotes.
+% If available the quoting macros of \pkg{csquotes} are used.
+% \changes{v1.1}{2010/04/13}{Added usage of 'csquotes' macros if loaded.}
% \begin{macrocode}
-\def\qverbbeginquote{`}
-\def\qverbendquote{'}
+\@ifundefined{openinnerquote}{%
+ \def\qverbbeginquote{`}%
+ \def\qverbendquote{'}%
+}{%
+ \def\qverbbeginquote{\openinnerquote}%
+ \def\qverbendquote{\closeinnerquote}%
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -236,7 +240,7 @@
%
% \subsection{Make Special Short Verbatim Characters}
%
-% \begin{macro}{\MakeSpecialShortVerb}
+% \begin{macro}{\MakeSpecialShortVerb}[1]{verbatim macro}
% Uses the definition of \cs{MakeShortVerb} from \pkg{shortvrb} except with \cs{verb} replaced with the first argument.
% The second argument is then read by \cs{@MakeShortVerb}.
% \begin{macrocode}
diff --git a/Master/texmf-dist/tex/latex/newverbs/newverbs.sty b/Master/texmf-dist/tex/latex/newverbs/newverbs.sty
index 904aa1e99be..9e0f3520413 100644
--- a/Master/texmf-dist/tex/latex/newverbs/newverbs.sty
+++ b/Master/texmf-dist/tex/latex/newverbs/newverbs.sty
@@ -6,7 +6,7 @@
%%
%% newverbs.dtx (with options: `package')
%%
-%% Copyright (c) 2010 by Martin Scharrer <martin@scharrer-online.de>
+%% Copyright (c) 2010-2011 by Martin Scharrer <martin@scharrer-online.de>
%% WWW: http://latex.scharrer-online.de/
%%
%% This work may be distributed and/or modified under the
@@ -24,9 +24,9 @@
%% This work consists of the files newverbs.dtx and newverbs.ins
%% and the derived file newverbs.sty.
%%
-%% $Id: newverbs.dtx 1816 2010-04-05 18:03:28Z martin $
+%% $Id: newverbs.dtx 2086 2011-01-27 21:49:52Z martin $
\ProvidesPackage{newverbs}
- [2010/04/05 v1.0 Define new 'verb' commands and short verb. characters]
+ [2010/04/13 v1.1 Define new 'verb' commands and short verb. characters]
\newcommand*\newverbcommand{\new@verbcommand\newcommand}
\newcommand*\renewverbcommand{\new@verbcommand\renewcommand}
\newcommand*\provideverbcommand{\new@verbcommand\providecommand}
@@ -43,8 +43,13 @@
\let\verbbox\@tempboxa
}
\provideverbcommand{\qverb}{\qverbbeginquote}{\qverbendquote}
-\def\qverbbeginquote{`}
-\def\qverbendquote{'}
+\@ifundefined{openinnerquote}{%
+ \def\qverbbeginquote{`}%
+ \def\qverbendquote{'}%
+}{%
+ \def\qverbbeginquote{\openinnerquote}%
+ \def\qverbendquote{\closeinnerquote}%
+}
\newverbcommand{\fverb}
{\setbox\verbbox\hbox\bgroup\color@setgroup}
{\color@endgroup\egroup\fbox{\box\verbbox}}