Debian Codegraph @

texmf-dist/source/generic/catcodes/catcodes.tex

raw
1 \ProvidesFile{catcodes.tex}[2015/11/14 documenting catcodes files]
2 \title{\pkg{catcodes}\\---\\``Generic" Switching of Category Codes}
3 % \listfiles
4 { \RequirePackage{makedoc} \ProcessLineMessage{}
5 \renewcommand\mdSectionLevelOne {\string\subsection}
6 \renewcommand\mdSectionLevelTwo {\string\subsubsection}
7 \MainDocParser{\SectionLevelTwoParseInput}
8 \HeaderLines{18} %% 18 2012/08/26
9 \MakeSingleDoc{stacklet.sty}
10 \MakeSingleDoc{actcodes.sty} %% 2012/08/26
11 \MakeSingleDoc{catchdq.sty} %% 2012/09/16
12 }
13 % \RequirePackage[ir]{inputtrc} %% 2015/11/14
14 \documentclass[fleqn]{article}%% TODO paper dimensions!?
15 \input{makedoc.cfg} %% shared formatting settings
16 % \ReadPackageInfos{stacklet}
17 \MDkeywords{Macro programming, category codes, private letters,
18 active characters, double quotes}
19 \newcommand*{\headersec}{%
20 \subsection{Package File Header---\pkg{plainpkg} and Legalese}}
21 \usepackage{ngerman} \originalTeX
22 \usepackage{catchdq} %% try it more often! TODO 2012/11/07
23 \usepackage{langcode} %% 2012/11/07
24 \usepackage{filedate} %% 2012/11/06
25 \sloppy
26 % \flushbottom %% 2012/11/07
27 \begin{document}
28 \maketitle
29 \begin{MDabstract}
30 The 'catcodes' bundle provides small packages for switching
31 category codes, usable both with \LaTeX\ and without. \
32 (i)\enspace \pkg{stacklet.sty} maintains stacks for ``private letters,"
33 needed for 'plainpkg.tex''s minimal framework for ``generic"
34 packages. \
35 (ii)\enspace \pkg{actcodes.sty} deals with ``active characters,"
36 switching their category codes and assigning meanings to
37 ``active-character tokens." \
38 (iii)\enspace
39 %% 2012/09/16:
40 \pkg{catchdq.sty} uses the
41 ``\acro{ASCII} %% 2012/11/06
42 double quote" as an active character
43 for simplified access to typographical double quotes.---These
44 packages are ``generic" in the sense that they should
45 be usable at least both with \LaTeX\ and Plain \TeX,
46 based on 'plainpkg.tex'.
47
48 \MDaddtoabstract{Required Packages}
49 \ctanpkgref{plainpkg}, 'stacklet'
50 \MDaddtoabstract{Related Packages}
51 \ctanpkgref{catoptions}, 'pcatcode' from \ctanpkgref{amsrefs},
52 \ctanpkgref{texapi},
53 \ctanpkgref{csquotes}. %% 2012/09/16
54 \end{MDabstract}
55 \tableofcontents
56 \section{Overview}
57 Sorry, \dots, the abstract and the table of contents
58 must suffice for today (2012-11-07) \TODO
59
60 \section{Shared Features of Usage}
61 %%% rm. 2012/09/17:
62 % \section{General Background---Usage, Required}
63 % The packages of this bundle are part of a certain family of
64 % ``generic" packages: They should work \emph{with} \LaTeX\
65 % as well as \emph{without} \LaTeX, aiming at
66 % ``independency of format"---actully too much now~...
67 % most importantly, they require \ctanpkgref{plainpkg}.
68 %%% rm 2012/09/16:
69 % ,
70 % and the latter's documentation should tell you about
71 % how to use the present packages.
72 %
73 All the packages of the bundle are ``\pkg{plainpkg} packages"
74 in the sense of the
75 \ctanpkgref{plainpkg}\foothttpurlref{ctan.org/pkg/plainpkg}
76 documentation that exhibits details of what is summarized here.
77 Therefore:
78 \pagebreak[2] %% 2012/11/07
79 \begin{itemize}
80 \item All of them require that \TeX\ finds `plainpkg.tex'
81 as well as `stackrel.sty'.
82 \item In order to load `<catcodes>.sty'
83 (where <catcodes> is `stacklet', `actcodes', or `catchdq'),
84 type \ |\usepackage{<catcodes>}| \ within a \LaTeX\ document
85 preamble, \ |\RequirePackage{<catcodes>}| \ in a
86 ``\pkg{plainpkg} package", or \ |\input <catcodes>.sty| \
87 $\dots$ \ or perhaps `\input{<catcodes>.sty}'?
88 \end{itemize}
89
90 \section{'actcodes.sty'---Active Characters}
91 %% intro 2012/11/07:
92 \subsection{Introduction}
93 Active characters can simplify syntax often, i.e., the code
94 may be very pleasant to type and read. But sometimes something
95 may fail. See Section~\ref{sec:actcodes-cmds} for how to cope
96 with possibilities and difficulties.
97 \headersec
98 \input{actcodes.doc}
99
100 \section{'catchdq.sty'---Typographical Double Quotes}
101 %% <- TODO cf. morgan.sty 2012/11/06 ->
102 % \section{'catchdq.sty'---Automatic Typographical Double Quotes by Toggling}
103 % \section{'catchdq.sty'---Proper Double Quotes by Toggling}
104 %% <- morgan.sty 2012/11/06 ->
105 \subsection{Introduction}
106 \catchdqs
107 The 'catchdq' package allows getting typographical double quotes
108 by just using the "\acro{ASCII} double quote" |"|. A more precise overview:
109 \begin{enumerate}
110 \item Typically, "typographical" quotation marks mean distinguishing
111 between "opening" and "closing" quotation marks.
112 Usually, you must enter different characters or commands for
113 the distinction, such as |``| for "opening" and |''| for
114 \emph{closing}---in \emph{English} with \emph{\TeX}.
115 For \emph{English} with \emph{Plain~\TeX}, even |"| suffices for "closing."
116 \item There are much different conventions especially for \emph{German}
117 and \emph{French}. They require different characters or \TeX~commands
118 than for \emph{English}. The packages \ctanpkgref{german},
119 \ctanpkgref{ngerman}, and \ctanpkgref{babel} have dealt with
120 such conventions.
121 \item Understanding the ideas mentioned before has been difficult
122 for a long time, probably because typewriter and computer \emph{keyboards}
123 never have offered the appropriate keys. Rather, they only offered
124 the "\acro{ASCII} double quote" that produced an approximation
125 ("neutral quotation marks")
126 \emph{not} making the difference. Many users and readers
127 have not realized the difference, they have not realized
128 how their screen or printer output differed from double quotes
129 in books and newspapers. Cf.~the
130 \wikienref{Quotation mark}{Wikipedia article}\footnote{%
131 \urlhttpref{en.wikipedia.org/wiki/Quotation mark}}
132 \item The idea of the 'catchdq' package is that the user indeed should
133 not worry about that difference and just type
134 "\acro{ASCII} double quotes", and they should be "converted"
135 into the appropriate typographical quotation marks \emph{automatically}.
136 This should work by "toggling," i.e., the first
137 "\acro{ASCII} double quote" is interpreted as "opening,"
138 the second as "closing," the next one as "opening"~\dots
139 ---Word processors have provided this feature (as an option)
140 as well.
141 \item Language-dependency of the feature currently is managed
142 through the \ctanpkgref{langcode} package.
143 \item The feature may cause problems sometimes.
144 Therefore, explicit switching the feature "on"
145 and "off" is required.
146 \item The \ctanpkgref{csquotes} package addresses the issue
147 in a more comprehensive and perhaps more stable way.
148 \end{enumerate}
149 See Section~\ref{sec:catchdq-cmds} for
150 % the commands provided.
151 % Note that the \ctanpkgref{csquotes}
152 % provides more comprehensive functionality.
153 additional details. %% 2012/11/06
154 \MakeOther\" %% TODO 2012/11/06
155
156 \headersec
157 \input{catchdq.doc}
158
159 \pagebreak
160 \section{'stacklet.sty'---Private Letters}
161 \subsection{Introduction}
162 \catchdqs %% 2012/11/07
163 \uselangcode{en} %% 2012/11/07, \dedqtd above
164 "Private letters" \emph{here} are meant to be
165 characters that belong to the "letter"
166 category only within packages. A package typically provides
167 user commands as well as internal commands, and the latter
168 are characterized by containing funny letters in commands such
169 as `\@gobble.' This is to avoid conflicts.
170 See Section~\ref{sec:stacklet-cmds} for the commands provided.
171 \MakeOther\" %% 2012/11/07
172 \headersec
173 \input{stacklet.doc}
174
175 %% 'filedate' check 2012/11/06:
176 \noNiceVerb
177 \input{fdatechk.tex}
178 \end{document}
179
180 VERSION HISTORY
181
182 2012/08/24 for stacklet v0.1 very first
183 2012/08/26 for stacklet v0.2 increased \HeaderLines, abstract;
184 for actcodes v0.1 added ...
185 2012/09/16f. for catchdq v0.2 added ...
186 2012/09/19 "plainpkg packages", \pagebreaks,
187 Roman numbers in abstract, \headersec
188 2012/09/19 trying ngerman.sty
189
190 UPLOADED with `catcodes' r0.1 2012-09-20
191
192 2012/11/06 supplementing missing word;
193 TODO on catchdq, `filedate' checks,
194 typeset with recent `niceverb';
195 more accurate about `catchdq',
196 long introduction
197 2012/11/07 final formatting, some more info on
198 `stacklet' and `actcodes', TODOs,
199 some \catchdqs, `Overview',
200 2 more \subsec...Intro...
201
202 UPLOADED with `catcodes' r0.1a 2012-11-07
203
204 2015/11/14 for catchdq v0.21 debugging