From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- macros/latex/contrib/upquote/README | 14 ++++ macros/latex/contrib/upquote/upquote.dtx | 127 +++++++++++++++++++++++++++++++ macros/latex/contrib/upquote/upquote.ins | 16 ++++ macros/latex/contrib/upquote/upquote.pdf | Bin 0 -> 172534 bytes macros/latex/contrib/upquote/upquote.sty | 40 ++++++++++ 5 files changed, 197 insertions(+) create mode 100644 macros/latex/contrib/upquote/README create mode 100644 macros/latex/contrib/upquote/upquote.dtx create mode 100644 macros/latex/contrib/upquote/upquote.ins create mode 100644 macros/latex/contrib/upquote/upquote.pdf create mode 100644 macros/latex/contrib/upquote/upquote.sty (limited to 'macros/latex/contrib/upquote') diff --git a/macros/latex/contrib/upquote/README b/macros/latex/contrib/upquote/README new file mode 100644 index 0000000000..d866867712 --- /dev/null +++ b/macros/latex/contrib/upquote/README @@ -0,0 +1,14 @@ + +upquote -- upright-quote and grave-accent glyphs in verbatim + +Authors: Michael A. Covington, Frank Mittelbach, Markus G. Kuhn + +Released under the LaTeX Project Public License v1.3c or later +See http://www.latex-project.org/lppl.txt + +This upquote.sty LaTeX package changes the glyphs used by the \verb +and \verb* macros and the "verbatim" and "verbatim*" environments for +ASCII characters 27 and 60 to the "upright quotation mark" and "grave +accent" ones required by Unicode, ISO 646, ISO 10646, and many other +character set standards. This is particularly useful for typesetting +software source code. diff --git a/macros/latex/contrib/upquote/upquote.dtx b/macros/latex/contrib/upquote/upquote.dtx new file mode 100644 index 0000000000..8fd012d22a --- /dev/null +++ b/macros/latex/contrib/upquote/upquote.dtx @@ -0,0 +1,127 @@ +% \iffalse +%\NeedsTeXFormat{LaTeX2e} +%\ProvidesPackage{upquote} +% [2012/04/19 v1.3 upright-quote and grave-accent glyphs in verbatim] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{upquote} +\usepackage{url} +\DisableCrossrefs +\RecordChanges +\setcounter{secnumdepth}{-1} % suppress part and section numbers +\begin{document} + \DocInput{upquote.dtx} +\end{document} +% +% \fi +% +% \CheckSum{40} +% +%\GetFileInfo{upquote.sty} +% +%\title{\textsf{upquote} -- upright-quote and grave-accent glyphs\linebreak +% in verbatim\thanks{This file describes version \fileversion, +% last revised \filedate.}} +%\author{Michael A. Covington\thanks{Artificial Intelligence Center, +% The University of Georgia, \texttt{http://www.ai.uga.edu/\char126mc/}} , +% Frank Mittelbach, +% Markus G.~Kuhn\thanks{University of Cambridge, Computer Laboratory, +% \texttt{http://www.cl.cam.ac.uk/\char126mgk25/}}} +%\date{\filedate} +% +%\maketitle +% +%\section{Introduction} +% +%By default, the \LaTeX\ \verb+\verb+ macro and \texttt{verbatim} +%environment display ASCII characters 27 and 60 as \texttt{'} and +%\texttt{`}, respectively, in line with how these two characters are +%used to typeset opening and closing quotation marks elsewhere in +%\TeX. However, the character-set standards define character 27 to +%represent a straight single quotation mark \texttt{\char13} and +%character 60 as a grave accent \texttt{\char18}. This is what most +%modern fonts show, and what readers of software source code are now +%likely to expect~\cite{Cov94,Kuh99}. The curly quotation mark +%characters \texttt{`} and \texttt{'} are instead associated with +%Unicode positions U+2018 and U+2019. +% +%\section{Usage} +% +%Add \verb+\usepackage{upquote}+ to the preamble (preferably after any +%packages that change fonts or font encoding), and the behaviour of +%the macros \verb+\verb+ and \verb+\verb*+ and the environments +%\texttt{verbatim} and \texttt{verbatim*} will change such that ASCII +%characters 27 and 60 appear as \texttt{\char13} and \texttt{\char18} +%rather than \texttt{'} and \texttt{`}. This does not affect \verb+\tt+, +%\verb+\texttt+, etc. +% +%When the Computer Modern typewriter font \texttt{cmtt} in Knuth's +%original OT1 encoding is used (i.e., \verb+\encodingdefault=OT1+, +%\verb+\ttdefault=cmtt+), then the two replacement glyphs are taken +%from that same font, where they are already available at positions +%13 and 18. If any other font or font encoding is used, then the +%\texttt{textcomp} package is loaded and its \verb+\textquotesingle+ +%and \verb+\textasciigrave+ macros are used to typeset these characters. +% +%This package loads \texttt{textcomp.sty} only if the use of a +%non-\texttt{cmtt} font or a non-OT1 font encoding was already evident +%at the point where \texttt{upquote.sty} was loaded. If such changes +%happen later, add |\usepackage{textcomp}| yourself. +% +%\StopEventually{ +% \begin{thebibliography}{1} +% \bibitem{Cov94} M.~Covington, \emph{Computer Languages in Type}, +% Journal of Scholarly Publishing, 26.1:34--41, 1994. +% \bibitem{Kuh99} M.~Kuhn, \emph{ASCII and Unicode quotation marks}, +% 1999.\\ \url{http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html} +% \end{thebibliography} +%} +% +% \part{Appendix} +% \appendix +% \section{Implementation} +% +%\changes{v1.0}{2000/12/11}{Fix bug that replaced '0 and `0} +%\changes{v1.1}{2003/06/19}{Switched to textcomp package} +%\changes{v1.2}{2012/04/04}{Use textcomp only with fonts other than the default cmtt with OT1} +%\changes{v1.3}{2012/04/19}{Bug fix: removed two spurious space characters from \@noligs} +% +%We check |\encodingdefault| and |\ttdefault| to see whether the +%glyphs that are already in \texttt{cmtt} as |\char13| +%(\texttt{\char13}) and |\char18| (\texttt{\char18}) can be used, or +%whether textcomp has to be loaded to access such glyphs. +% +% \begin{macrocode} +\newcommand\upquote@cmtt{cmtt} +\newcommand\upquote@OTone{OT1} +\ifx\encodingdefault\upquote@OTone + \ifx\ttdefault\upquote@cmtt\else\RequirePackage{textcomp}\fi +\else + \RequirePackage{textcomp} +\fi +% \end{macrocode} +%The |\@noligs| macro is called by |\verb| and |\begin{verbatim}| to +%turn the characters \texttt{` < > , ' -} into active characters that +%merely print themselves rather than activating ligatures. +% +%This package merely adds code to \verb+\@noligs+ that changes the +%glyphs used for \texttt{`} and \texttt{'}. +% \begin{macrocode} +\begingroup +\catcode`'=\active +\catcode``=\active +\g@addto@macro\@noligs + {\let'\textquotesingle + \let`\textasciigrave + \ifx\encodingdefault\upquote@OTone + \ifx\ttdefault\upquote@cmtt + \def'{\char13 }% + \def`{\char18 }% + \fi\fi} +\endgroup +% \end{macrocode} +%We check |\encodingdefault| and |\ttdefault| again at each invocation +%of |\verb| or |\begin{verbatim}|, such that users can change fonts +%and encodings within a document. +%\Finale diff --git a/macros/latex/contrib/upquote/upquote.ins b/macros/latex/contrib/upquote/upquote.ins new file mode 100644 index 0000000000..98daeac0c9 --- /dev/null +++ b/macros/latex/contrib/upquote/upquote.ins @@ -0,0 +1,16 @@ +\input docstrip.tex +\preamble + +Copyright (C) 2000 by Michael A. Covington +Copyright (C) 2003 by Frank Mittelbach +Copyright (C) 2012 by Markus Kuhn (current maintainer) + +Released under the LaTeX Project Public License v1.3c or later +See http://www.latex-project.org/lppl.txt + +\endpreamble +\keepsilent +\usedir{tex/latex/upquote} +\askforoverwritefalse +\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}} +\endbatchfile diff --git a/macros/latex/contrib/upquote/upquote.pdf b/macros/latex/contrib/upquote/upquote.pdf new file mode 100644 index 0000000000..f6a4e3b5d2 Binary files /dev/null and b/macros/latex/contrib/upquote/upquote.pdf differ diff --git a/macros/latex/contrib/upquote/upquote.sty b/macros/latex/contrib/upquote/upquote.sty new file mode 100644 index 0000000000..6b9d754f2a --- /dev/null +++ b/macros/latex/contrib/upquote/upquote.sty @@ -0,0 +1,40 @@ +%% +%% This is file `upquote.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% upquote.dtx (with options: `package') +%% +%% Copyright (C) 2000 by Michael A. Covington +%% Copyright (C) 2003 by Frank Mittelbach +%% Copyright (C) 2012 by Markus Kuhn (current maintainer) +%% +%% Released under the LaTeX Project Public License v1.3c or later +%% See http://www.latex-project.org/lppl.txt +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{upquote} + [2012/04/19 v1.3 upright-quote and grave-accent glyphs in verbatim] +\newcommand\upquote@cmtt{cmtt} +\newcommand\upquote@OTone{OT1} +\ifx\encodingdefault\upquote@OTone + \ifx\ttdefault\upquote@cmtt\else\RequirePackage{textcomp}\fi +\else + \RequirePackage{textcomp} +\fi +\begingroup +\catcode`'=\active +\catcode``=\active +\g@addto@macro\@noligs + {\let'\textquotesingle + \let`\textasciigrave + \ifx\encodingdefault\upquote@OTone + \ifx\ttdefault\upquote@cmtt + \def'{\char13 }% + \def`{\char18 }% + \fi\fi} +\endgroup +\endinput +%% +%% End of file `upquote.sty'. -- cgit v1.2.3