1
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
2
\ProvidesPackage{upquote}[2003/08/11 v1.1 Covington's upright-quote
3
modification to verbatim and verb]
5
%% Copyright 2000 Michael A. Covington.
6
%% Copyright 2003 Michael A. Covington, Frank Mittelbach.
8
%% It may be distributed and/or modified under the
9
%% conditions of the LaTeX Project Public License, either version 1.2
10
%% of this license or (at your option) any later version.
11
%% The latest version of this license is in
12
%% http://www.latex-project.org/lppl.txt
13
%% and version 1.2 or later is part of all distributions of LaTeX
14
%% version 1999/12/01 or later.
17
% Problem: Computer Modern Typewriter is the best font for program listings,
18
% *but* it prints ` ' as bent opening and closing single quotes.
19
% Other fonts, and most programming languages, print ` as a grave
20
% accent and ' upright; ' is used both to open and to close quoted
23
% See also M. Covington, "Computer Languages in Type," Journal of
24
% Scholarly Publishing 26.1:34-41 (1994).
26
% Solution: This package switches the typewriter font to Computer Modern
27
% Typewriter (regardless of other fonts in use, so long as this
28
% package is called afterward) and modifies the behavior of
29
% verbatim, verbatim*, verb, and verb* to print ` ' the desired way.
30
% It does not affect \tt, \texttt, etc.
32
% Author: Michael A. Covington
33
% Artificial Intelligence Center
34
% The University of Georgia
35
% http://www.ai.uga.edu/~mc
39
% Covington Innovations (Consulting and Typesetting)
40
% http://www.CovingtonInnovations.com
42
% The modification is done by adding instructions to \@noligs,
43
% which is called by verbatim and verb in order to turn the
44
% characters ` < > , ' - into active characters that merely
45
% print themselves rather than activating ligatures.
47
% What is added is code to redefine ` as grave and ' as upright single quote.
50
% Bug fix, 2000/12/11: previously, '0 (or ' and any digit) would print as a
51
% nonexistent character. (The reason: \char13 or \char18 was combining with
52
% the digit to make \char130, etc.) Fixed by adding curly brackets.
56
%% Rewritten by FMi 2003/06/19
59
% Use textcomp official chars so that change works in various
62
% Extend \@noligs (this also works with the latest listings package
63
% that recognizes that the package was loaded)
65
\RequirePackage{textcomp}
70
\g@addto@macro\@noligs
72
\let'\textquotesingle}