Debian Codegraph @

texmf-dist/doc/latex/combelow/combelow.tex

raw
1 \documentclass{ltxdoc}
2
3 \usepackage{combelow}
4 \usepackage{url}
5 \usepackage{listings}
6 \lstset{numbers=left,numberstyle=\tiny,basicstyle=\ttfamily,language=[LaTeX]TeX,breaklines}
7
8 \begin{document}
9 \title{The \textsf{combelow} package}
10 \author{Gianluca Pignalberi\\\texttt{[email protected]}}
11 \date{02/05/2010~(0.99f)}
12 \maketitle
13
14 \begin{abstract}
15 Standard \LaTeX{} doesn't have the commands necessary to typeset some
16 ``secondary'' diacritic marks used in some European languages. Romanian and
17 Latvian have some letters with a \emph{comma below} (aka comma accent). Up
18 to now, \LaTeX{} users approximated it with the \emph{cedilla} (~\c{}~). From
19 now on they have a proper comma below (~\cb{}~).
20 \end{abstract}
21
22 \section{Introduction}
23 Once I had to typeset a flyer in Romanian. The flyer text had a word
24 containing a `\cb t'. To my big surprise and disappointment, \LaTeX{}
25 wasn't able to produce that glyph with a specific command, and I then
26 approximated it with a cedilla (after reading chapter 40 of \cite{babel}).
27 After asking some Romanians, they told me the flyer was ok, but those answers
28 didn't persuade me: every Romanian newspapers and magazines had a comma below
29 Ts and Ss, not a cedilla.
30
31 I decided to read Unicode books and documents~\cite{Unitables,Ced}, and
32 discovered that \c s and \c t are Turkish strokes. Romanian would rather have
33 the so-called \emph{comma below} (a preferred form for cedilla). I also
34 discovered that Latvian has some other letters with a comma below: g, k, l, n
35 and r. Being `g' a descending letter, its comma below becomes a
36 \emph{turned comma above} (\cb g).
37
38 I thought that using \textsf{utf8x} encoding would allow me to typeset those
39 letters, and their corresponding uppercase versions, once typed with a
40 Unicode editor. I was wrong, and a real command was needed.
41
42 You can find a more in-depth description of the whole work in~\cite{GP09}.
43
44 \section{Usage}
45 After including the package into your document
46 (\verb+\usepackage{combelow}+), you're provided with the command \verb+\cb+
47 that typesets its argument with the proper comma. Table~\ref{tab:cb}
48 summarizes commands and results.
49
50 \begin{table}
51 \centering
52 \begin{tabular}{cc}
53 Command&Result\\
54 \verb+\cb g+&\cb g\\
55 \verb+\cb k+&\cb k\\
56 \verb+\cb l+&\cb l\\
57 \verb+\cb n+&\cb n\\
58 \verb+\cb r+&\cb r\\
59 \verb+\cb s+&\cb s\\
60 \verb+\cb t+&\cb t\\
61 \end{tabular}
62 \caption{Examples of comma below-ed letters}
63 \label{tab:cb}
64 \end{table}
65
66 \section{Properties and known issues}
67 A lot of Romanian printed matter show comma below-ed letters with a comma
68 below slightly smaller than the actual font size. The package isn't able yet
69 to manage a comma below less than the current font size.
70
71 If you want to put the comma accent below a two or more bytes Unicode
72 character, you have to surround it with braces, just as you would do with
73 other standard accents.
74
75 The biggest drawback is that the package doesn't allow hyphenation and loses
76 kerning information too.
77
78 \section{The code}
79 \begin{lstlisting}
80 \NeedsTeXFormat{LaTeX2e}
81 \ProvidesPackage{combelow}[2010/05/02 v0.99f comma below command]
82 \def\@commafont{\check@mathfonts
83 \fontsize\sf@size\z@\selectfont}
84 \DeclareRobustCommand{\cb}[1]{{%
85 \setbox\z@\hbox{#1}%
86 \ifdim\dp\z@<.1\ht\z@\ooalign{\unhbox\z@\crcr\hidewidth\lower.3ex\hbox{\@commafont,}\hidewidth}%
87 \else\ooalign{\unhbox\z@\crcr\hidewidth\raise.5ex\hbox{\@commafont`}\hidewidth}%
88 \fi}}%
89 \endinput
90 \end{lstlisting}
91 That's all: it stacks a comma (typeset in a smaller font) under a character
92 without descendant (with no depth), while stacks an open single quote over a
93 descending character (with a significant depth, since some Times fonts have no
94 descendant, while being deeper than 0).
95
96 \bibliographystyle{plain}
97 \bibliography{combelow}
98
99 \appendix
100 \section{Changes}
101 \textbf{2009/04/21} \textbf{v0.1}
102
103 \vspace{.5em}
104 \noindent
105 \begin{itemize}
106 \item Initial version, not released. Could only typeset g, k, l, n, r, s
107 and t with comma below, and the corresponding uppercase letters.
108 \end{itemize}
109
110 \vspace{.5em}
111 \noindent
112 \textbf{2009/04/30} \textbf{v0.2}
113
114 \vspace{.5em}
115 \noindent
116 \begin{itemize}
117 \item Not released. Could typeset every not descending letters with comma
118 below, but only g among descending letters.
119 \end{itemize}
120
121 \vspace{.5em}
122 \noindent
123 \textbf{2009/08/23} \textbf{v0.99a, b, c, d}
124
125 \vspace{.5em}
126 \noindent
127 \begin{itemize}
128 \item Can typeset all letters with comma below, recognizing descendents and
129 positioning the comma according to them (wrong turned comma above for italics
130 and slanted characters in 0.99a; wrong vertical position in 0.99c). Since all
131 of these versions are contemporary, I've just released 0.99d.
132 \end{itemize}
133
134 \vspace{.5em}
135 \noindent
136 \textbf{2009/10/19} \textbf{v0.99d bug fix}
137
138 \begin{itemize}
139 \item Fixed a problem with fonts like Times. Thanks to Enrico Gregorio.
140 \end{itemize}
141
142 \vspace{.5em}
143 \noindent
144 \textbf{2009/11/10} \textbf{v0.99e}
145
146 \begin{itemize}
147 \item Now the comma is finally smaller than the current font. Thanks to Enrico
148 Gregorio for providing me with the necessary code.
149 \end{itemize}
150
151 \vspace{.5em}
152 \noindent
153 \textbf{2010/05/02} \textbf{v0.99f}
154
155 \begin{itemize}
156 \item Constantin Gubceac (Gub\v{c}ek) sent me a lot of scanned samples of
157 Romanian books, so that I could realize how close the comma has to be to the
158 corresponding letters. Thanks to his help this newer version puts the comma
159 closer.
160 \end{itemize}
161 \end{document}