From aecf00b6194ca5a39ecd7615c6b2beaa35fdcaae Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 13 Jan 2006 00:10:45 +0000 Subject: upquote git-svn-id: svn://tug.org/texlive/trunk@1432 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/upquote/upquote.sty | 76 +++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/upquote/upquote.sty (limited to 'Master/texmf-dist/tex/latex/upquote') diff --git a/Master/texmf-dist/tex/latex/upquote/upquote.sty b/Master/texmf-dist/tex/latex/upquote/upquote.sty new file mode 100644 index 00000000000..67b4703525a --- /dev/null +++ b/Master/texmf-dist/tex/latex/upquote/upquote.sty @@ -0,0 +1,76 @@ +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\ProvidesPackage{upquote}[2003/08/11 v1.1 Covington's upright-quote + modification to verbatim and verb] + +%% Copyright 2000 Michael A. Covington. +%% Copyright 2003 Michael A. Covington, Frank Mittelbach. +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.2 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% + +% Problem: Computer Modern Typewriter is the best font for program listings, +% *but* it prints ` ' as bent opening and closing single quotes. +% Other fonts, and most programming languages, print ` as a grave +% accent and ' upright; ' is used both to open and to close quoted +% strings. + +% See also M. Covington, "Computer Languages in Type," Journal of +% Scholarly Publishing 26.1:34-41 (1994). + +% Solution: This package switches the typewriter font to Computer Modern +% Typewriter (regardless of other fonts in use, so long as this +% package is called afterward) and modifies the behavior of +% verbatim, verbatim*, verb, and verb* to print ` ' the desired way. +% It does not affect \tt, \texttt, etc. + +% Author: Michael A. Covington +% Artificial Intelligence Center +% The University of Georgia +% http://www.ai.uga.edu/~mc +% +% and +% +% Covington Innovations (Consulting and Typesetting) +% http://www.CovingtonInnovations.com + +% The modification is done by adding instructions to \@noligs, +% which is called by verbatim and verb in order to turn the +% characters ` < > , ' - into active characters that merely +% print themselves rather than activating ligatures. +% +% What is added is code to redefine ` as grave and ' as upright single quote. +% + +% Bug fix, 2000/12/11: previously, '0 (or ' and any digit) would print as a +% nonexistent character. (The reason: \char13 or \char18 was combining with +% the digit to make \char130, etc.) Fixed by adding curly brackets. + + + +%% Rewritten by FMi 2003/06/19 +% +% +% Use textcomp official chars so that change works in various +% encodings +% +% Extend \@noligs (this also works with the latest listings package +% that recognizes that the package was loaded) + +\RequirePackage{textcomp} + +\begingroup +\catcode`'=\active +\catcode``=\active +\g@addto@macro\@noligs + {\let`\textasciigrave + \let'\textquotesingle} +\endgroup + + +\endinput -- cgit v1.2.3