summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/combelow
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/combelow
Initial commit
Diffstat (limited to 'macros/latex/contrib/combelow')
-rw-r--r--macros/latex/contrib/combelow/README26
-rw-r--r--macros/latex/contrib/combelow/combelow.bib30
-rw-r--r--macros/latex/contrib/combelow/combelow.pdfbin0 -> 106218 bytes
-rw-r--r--macros/latex/contrib/combelow/combelow.sty23
-rw-r--r--macros/latex/contrib/combelow/combelow.tex161
5 files changed, 240 insertions, 0 deletions
diff --git a/macros/latex/contrib/combelow/README b/macros/latex/contrib/combelow/README
new file mode 100644
index 0000000000..c67b65e262
--- /dev/null
+++ b/macros/latex/contrib/combelow/README
@@ -0,0 +1,26 @@
+This is the README file for combelow package.
+
+combelow: comma below (accent)
+
+combelow provides you with a command that typesets comma belowed characters.
+
+Author:
+-------
+Gianluca Pignalberi (g.pignalberi@freesoftwaremagazine.com)
+
+Copyright: 2009--2010 by Gianluca Pignalberi
+----------
+This program can be redistributed and/or modified under the terms
+of the LaTeX Project Public License Distributed from CTAN
+archives in directory macros/latex/base/lppl.txt.
+
+Installation:
+-------------
+Copy combelow.sty in a suitable directory under texmf/tex/latex, and
+combelow.pdf and this README in the corresponding directory under
+texmf/doc/latex, then run texhash (check your system to locate the texmf tree).
+
+Usage:
+------
+To add a comma below (accent) to a character, call it x, just write \cb x in
+your document.
diff --git a/macros/latex/contrib/combelow/combelow.bib b/macros/latex/contrib/combelow/combelow.bib
new file mode 100644
index 0000000000..b397c63ed1
--- /dev/null
+++ b/macros/latex/contrib/combelow/combelow.bib
@@ -0,0 +1,30 @@
+@article{babel,
+ title = "{Babel, a multilingual package for use with \LaTeX's standard
+ document classes}",
+ author = "Johannes Braams",
+ year = "2006",
+ note = "{\url{http://www.ctan.org}}",
+}
+
+@misc{Ced,
+ author = "Wikipedia",
+ title = "{Cedilla}",
+ note = "{\url{http://en.wikipedia.org/wiki/Cedilla}}",
+ year = "2009",
+}
+
+@misc{Unitables,
+ author = "{Unicode Consortium}",
+ title = "{Code charts}",
+ note = "{\url{http://www.unicode.org/charts}}",
+ year = "2009",
+}
+
+@article{GP09,
+ author = "Gianluca Pignalberi",
+ title = "{\textsf{combelow}: abbasso i segni diacritici di serie B}",
+ journal = "ArsTeXnica",
+ number = "8",
+ year = "2009",
+ month = "October",
+}
diff --git a/macros/latex/contrib/combelow/combelow.pdf b/macros/latex/contrib/combelow/combelow.pdf
new file mode 100644
index 0000000000..a8eb3f1ae1
--- /dev/null
+++ b/macros/latex/contrib/combelow/combelow.pdf
Binary files differ
diff --git a/macros/latex/contrib/combelow/combelow.sty b/macros/latex/contrib/combelow/combelow.sty
new file mode 100644
index 0000000000..2a52e35c32
--- /dev/null
+++ b/macros/latex/contrib/combelow/combelow.sty
@@ -0,0 +1,23 @@
+%% This is file combelow.sty
+%% Copyright (C) 2009 by Gianluca Pignalberi
+%% (g.pignalberi@freesoftwaremagazine.com)
+%%
+%% this file may be distributed and/or modified under the conditions of the
+%% LaTeX Project Public License, either version 1.3a or
+%% (at your option) any later version. The latest version of this
+%% license is in http://www.latex-project.org/lppl.txt
+%% and version 1.3a or later is part of all distributions of LaTeX
+%% version 2004/10/01 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{combelow}[2010/05/02 v0.99f comma below command]
+\def\@commafont{\check@mathfonts
+ \fontsize\sf@size\z@\selectfont}
+\DeclareRobustCommand{\cb}[1]{{%
+\setbox\z@\hbox{#1}%
+\ifdim\dp\z@<.1\ht\z@\ooalign{\unhbox\z@\crcr\hidewidth\lower.3ex\hbox{\@commafont,}\hidewidth}%
+\else\ooalign{\unhbox\z@\crcr\hidewidth\raise.5ex\hbox{\@commafont`}\hidewidth}%
+\fi}}%
+\endinput
+%%
+%% End of file `combelow.sty'.
diff --git a/macros/latex/contrib/combelow/combelow.tex b/macros/latex/contrib/combelow/combelow.tex
new file mode 100644
index 0000000000..e0716f39ef
--- /dev/null
+++ b/macros/latex/contrib/combelow/combelow.tex
@@ -0,0 +1,161 @@
+\documentclass{ltxdoc}
+
+\usepackage{combelow}
+\usepackage{url}
+\usepackage{listings}
+\lstset{numbers=left,numberstyle=\tiny,basicstyle=\ttfamily,language=[LaTeX]TeX,breaklines}
+
+\begin{document}
+\title{The \textsf{combelow} package}
+\author{Gianluca Pignalberi\\\texttt{g.pignalberi@freesoftwaremagazine.com}}
+\date{02/05/2010~(0.99f)}
+\maketitle
+
+\begin{abstract}
+Standard \LaTeX{} doesn't have the commands necessary to typeset some
+``secondary'' diacritic marks used in some European languages. Romanian and
+Latvian have some letters with a \emph{comma below} (aka comma accent). Up
+to now, \LaTeX{} users approximated it with the \emph{cedilla} (~\c{}~). From
+now on they have a proper comma below (~\cb{}~).
+\end{abstract}
+
+\section{Introduction}
+Once I had to typeset a flyer in Romanian. The flyer text had a word
+containing a `\cb t'. To my big surprise and disappointment, \LaTeX{}
+wasn't able to produce that glyph with a specific command, and I then
+approximated it with a cedilla (after reading chapter 40 of \cite{babel}).
+After asking some Romanians, they told me the flyer was ok, but those answers
+didn't persuade me: every Romanian newspapers and magazines had a comma below
+Ts and Ss, not a cedilla.
+
+I decided to read Unicode books and documents~\cite{Unitables,Ced}, and
+discovered that \c s and \c t are Turkish strokes. Romanian would rather have
+the so-called \emph{comma below} (a preferred form for cedilla). I also
+discovered that Latvian has some other letters with a comma below: g, k, l, n
+and r. Being `g' a descending letter, its comma below becomes a
+\emph{turned comma above} (\cb g).
+
+I thought that using \textsf{utf8x} encoding would allow me to typeset those
+letters, and their corresponding uppercase versions, once typed with a
+Unicode editor. I was wrong, and a real command was needed.
+
+You can find a more in-depth description of the whole work in~\cite{GP09}.
+
+\section{Usage}
+After including the package into your document
+(\verb+\usepackage{combelow}+), you're provided with the command \verb+\cb+
+that typesets its argument with the proper comma. Table~\ref{tab:cb}
+summarizes commands and results.
+
+\begin{table}
+\centering
+\begin{tabular}{cc}
+Command&Result\\
+\verb+\cb g+&\cb g\\
+\verb+\cb k+&\cb k\\
+\verb+\cb l+&\cb l\\
+\verb+\cb n+&\cb n\\
+\verb+\cb r+&\cb r\\
+\verb+\cb s+&\cb s\\
+\verb+\cb t+&\cb t\\
+\end{tabular}
+\caption{Examples of comma below-ed letters}
+\label{tab:cb}
+\end{table}
+
+\section{Properties and known issues}
+A lot of Romanian printed matter show comma below-ed letters with a comma
+below slightly smaller than the actual font size. The package isn't able yet
+to manage a comma below less than the current font size.
+
+If you want to put the comma accent below a two or more bytes Unicode
+character, you have to surround it with braces, just as you would do with
+other standard accents.
+
+The biggest drawback is that the package doesn't allow hyphenation and loses
+kerning information too.
+
+\section{The code}
+\begin{lstlisting}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{combelow}[2010/05/02 v0.99f comma below command]
+\def\@commafont{\check@mathfonts
+ \fontsize\sf@size\z@\selectfont}
+\DeclareRobustCommand{\cb}[1]{{%
+\setbox\z@\hbox{#1}%
+\ifdim\dp\z@<.1\ht\z@\ooalign{\unhbox\z@\crcr\hidewidth\lower.3ex\hbox{\@commafont,}\hidewidth}%
+\else\ooalign{\unhbox\z@\crcr\hidewidth\raise.5ex\hbox{\@commafont`}\hidewidth}%
+\fi}}%
+\endinput
+\end{lstlisting}
+That's all: it stacks a comma (typeset in a smaller font) under a character
+without descendant (with no depth), while stacks an open single quote over a
+descending character (with a significant depth, since some Times fonts have no
+descendant, while being deeper than 0).
+
+\bibliographystyle{plain}
+\bibliography{combelow}
+
+\appendix
+\section{Changes}
+\textbf{2009/04/21} \textbf{v0.1}
+
+\vspace{.5em}
+\noindent
+\begin{itemize}
+\item Initial version, not released. Could only typeset g, k, l, n, r, s
+and t with comma below, and the corresponding uppercase letters.
+\end{itemize}
+
+\vspace{.5em}
+\noindent
+\textbf{2009/04/30} \textbf{v0.2}
+
+\vspace{.5em}
+\noindent
+\begin{itemize}
+\item Not released. Could typeset every not descending letters with comma
+below, but only g among descending letters.
+\end{itemize}
+
+\vspace{.5em}
+\noindent
+\textbf{2009/08/23} \textbf{v0.99a, b, c, d}
+
+\vspace{.5em}
+\noindent
+\begin{itemize}
+\item Can typeset all letters with comma below, recognizing descendents and
+positioning the comma according to them (wrong turned comma above for italics
+and slanted characters in 0.99a; wrong vertical position in 0.99c). Since all
+of these versions are contemporary, I've just released 0.99d.
+\end{itemize}
+
+\vspace{.5em}
+\noindent
+\textbf{2009/10/19} \textbf{v0.99d bug fix}
+
+\begin{itemize}
+\item Fixed a problem with fonts like Times. Thanks to Enrico Gregorio.
+\end{itemize}
+
+\vspace{.5em}
+\noindent
+\textbf{2009/11/10} \textbf{v0.99e}
+
+\begin{itemize}
+\item Now the comma is finally smaller than the current font. Thanks to Enrico
+Gregorio for providing me with the necessary code.
+\end{itemize}
+
+\vspace{.5em}
+\noindent
+\textbf{2010/05/02} \textbf{v0.99f}
+
+\begin{itemize}
+\item Constantin Gubceac (Gub\v{c}ek) sent me a lot of scanned samples of
+Romanian books, so that I could realize how close the comma has to be to the
+corresponding letters. Thanks to his help this newer version puts the comma
+closer.
+\end{itemize}
+\end{document}