Debian Codegraph @

texmf-dist/source/latex/bosisio/quotes.dtx

raw
1 %\iffalse % MetaComment
2 %%
3 %% + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
4 %% | Copyright(C) 1997-2010 by F. Bosisio |
5 %% | |
6 %% | This program can be redistributed and/or modified under |
7 %% | the terms of the LaTeX Project Public License, either |
8 %% | version 1.3 of this license or (at your option) any later |
9 %% | version. The latest version of this license is in |
10 %% | http://www.latex-project.org/lppl.txt |
11 %% | and version 1.3 or later is part of all LaTeX distributions |
12 %% | version 2005/12/01 or later. |
13 %% | |
14 %% | This work has the LPPL maintenance status `maintained'. |
15 %% | The Current Maintainer of this work is F. Bosisio. |
16 %% | |
17 %% | This work consists of files quotes.dtx and quotes.html |
18 %% | and of the derived files quotes.sty and quotes.pdf. |
19 %% | |
20 %% | E-mail: [email protected] |
21 %% | CTAN location: macros/latex/contrib/bosisio/ |
22 %% + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
23 %%
24 %% If you make any improvment, find any bug or have
25 %% any suggestion, please let me know about it.
26 %%
27 %<*package,driver>
28 %\fi
29 %
30 \def\FileName{quotes}
31 %\iffalse % MetaComment
32 %</package,driver>
33 %<*package>
34 %\fi
35 \def\fileversion{2.2}
36 \def\filedate{1997/12/20}
37 \def\docdate{2005/04/09}
38 \def\filedescr{Commands to use double quotes (FB)}
39 %
40 %\iffalse % MetaComment
41 %</package>
42 %<*dtx>
43 %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
44 % This section is the installation driver
45 %
46 \def\batchfile{\FileName.dtx}
47 %
48 \input docstrip
49 %
50 \keepsilent
51 % \askforoverwritefalse
52 %
53 \generateFile{\FileName.sty}{f}{\from{\FileName.dtx}{package}}
54 %
55 \generateFile{\FileName.drv}{f}{\from{\FileName.dtx}{driver}}
56 %
57 \Msg{******************************************************}
58 \Msg{*}
59 \Msg{* To produce the documentation run the}
60 \Msg{* file `\FileName.drv' through LaTeX.}
61 \Msg{*}
62 \Msg{******************************************************}
63 %
64 \endbatchfile
65 %
66 % End of the installation driver
67 %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
68 %</dtx>
69 %
70 % This section is the documentation driver
71 %
72 %<+driver>\documentclass[12pt,a4paper]{ltxdoc}
73 %<+driver> \EnableCrossrefs
74 %<+driver> \CodelineIndex
75 %<+driver> \RecordChanges
76 %<+driver> %\OnlyDescription % Uncomment not to see the implementation
77 %<+driver>\begin{document}
78 %<+driver> \DocInput{\FileName.dtx}
79 %<+driver> \newpage
80 %<+driver> \PrintIndex
81 %<+driver> \PrintChanges
82 %<+driver>\end{document}
83 %
84 % End of the documentation driver
85 %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
86 %<*package>
87 %\fi
88 %
89 % \changes{v0.1}{4 May 1997}{First release (basic accents-command)}
90 % \changes{v0.2}{20 August 1997}{Added double-quotes and extended-chars}
91 % \changes{v1.0}{5 September 1997}{Documentation added}
92 % \changes{v1.1}{7 November 1997}{Fixed a bug in the options}
93 % \changes{v2.0}{20 December 1997}{Separated from package ``quotes''}
94 % \changes{v2.1}{5 March 1999}{Added copyright notice and changed addresses}
95 % \changes{v2.2}{9 April 2005}{Usage of the double-quote character (") avoided}
96 %
97 % \MakeShortVerb{\|}
98 %
99 % \title{Package \texttt{\FileName}\thanks{This is version \fileversion,
100 % last revised \filedate; documentation date \docdate}}
101 % \author{F. Bosisio\\\normalsize E-mail: \texttt{[email protected]}}
102 % \date{\filedate}
103 % \maketitle
104 %
105 % \begin{abstract}
106 % Documentation for the package \texttt{\FileName}.
107 % \end{abstract}
108 %
109 % \section{Introduction}
110 % This package simplifies the use of double-quotes.
111 %
112 % \section{Double quotes}
113 %
114 % With this package, the character `` |"| '' generates the correct
115 % double-quote, i.e. the sequence $<<$| " text " |$>>$
116 % generates $<<$ `` |text| '' $>>$, so that this character
117 % can be used both for opening and closing the double-quotes
118 % (provided that it is \emph{always} used).
119 %
120 % \StopEventually{}
121 % \newpage
122 % \section{Implementation}
123 %
124 % \begin{macrocode}
125 %%
126 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
127 \ProvidesPackage{\FileName}[\filedate\space v\fileversion\space\filedescr]
128 % \end{macrocode}
129 %
130 % \begin{macro}{Quotes}
131 % The command ``|\@VIRGOLETTE|'' is defined to print an open or close
132 % double-quotes alternatively, so that they are always right.
133 % Moreover, the double-quotes are always printed in upright-shape,
134 % since they looks better.
135 %
136 % \begin{macrocode}
137 %%
138 \newif\if@virgolette\@virgolettefalse
139 %%
140 \newcommand{\@VIRGOLETTE}{%
141 \if@virgolette%
142 \@virgolettefalse%
143 \textup{''}%
144 \else%
145 \@virgolettetrue%
146 \textup{``}%
147 \fi%
148 }
149 % \end{macrocode}
150 % Then the character `` |"| '' is associated to the command
151 % ``|\@VIRGOLETTE|'' just defined, so that you just have to type
152 % this character in order to get the right double-quotes.
153 % This trick has been adapted from the |doc| package, but
154 % perhaps it may be done in a better way.
155 % \begin{macrocode}
156 \@makeother " %% Can this command be eliminated ?
157 \begingroup
158 \catcode`\~\active \lccode`\~`\"%
159 \lowercase{%
160 \global\expandafter\let
161 \csname ac\string\"\endcsname~%
162 \gdef~{\@VIRGOLETTE}}%
163 \endgroup
164 \global\catcode`\"\active
165 %
166 % \end{macrocode}
167 % \end{macro}
168 %
169 %\iffalse % MetaComment
170 %<*package>
171 %\fi
172 %
173 % \CheckSum{43}
174 % \Finale
175 %
176 \endinput
177