summaryrefslogtreecommitdiff
path: root/language/maltese/maltese.dtx
blob: 4c2adcfb913838c29ea7f8646754c191e1a1deb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
% \iffalse meta-comment
%
% Copyright (C) 2005 by Paulseph-John Farrugia <paulseph@hotmail.com>
% -------------------------------------------------------
% 
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.2
% of this license 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.2 or later is part of all distributions of LaTeX 
% version 1999/12/01 or later.
%
% \fi
%
% \iffalse
%<*driver>
\ProvidesFile{maltese.dtx}
%</driver>
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{maltese}[2003/11/24 v1.3 Maltese input support]
%
%<package>\RequirePackage{ucs}
%
%<*driver>
\documentclass{ltxdoc}
\usepackage{maltese}
\usepackage{url}
\EnableCrossrefs         
\CodelineIndex
\RecordChanges
\begin{document}
  \DocInput{maltese.dtx}
  \PrintChanges
  \PrintIndex
\end{document}
%</driver>
% \fi
%
% \CheckSum{92}
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
%
% \changes{v1.0}{2003/03/03}{Initial version}
% \changes{v1.1}{2003/09/19}{Resolved bug when using unicode characters 126 and 127 in a tabbing environment}
% \changes{v1.2}{2003/11/24}{Barred h definition changed}
%
% \GetFileInfo{skeleton.dtx}
%
% \DoNotIndex{\newcommand,\newenvironment}
%
%
% \newcommand{\sample}{{\mH}{\mi}nja {\mc}-{\mc}awla {\mz}-{\mz}{\my}ira li q{\mi}{\my}da ti{\mg}ri fil-{\mh}amrija.}
% 
%
% \title{The \textsf{Maltese} package}
% \author{Paulseph-John Farrugia \\ \url{paulseph@hotmail.com}}
%
% \maketitle
%
% \section{Introduction}
%
% This package is intended to facilitate the input of Maltese
% characters with special diacritics (\mc, \mC, \mg, \mG, \mh, \mH,
% \my, \mY, \mi, \mI, \mz, \mZ) in {\LaTeXe}.
%
% \section{Requirements}
%
% This package requires the following \emph{ucs} package to be already available.
% 
% \section{Installation}
% 
% To install, simply copy the available \emph{maltese.sty} package
% file to an appropriate path for the {\LaTeXe} distribution being
% used and refresh the system as necessary. (Refer to the local
% guide for further details.)
%
% \section{Usage}
% 
% The package provides the commands given in Table
% \ref{tbl:commands}. The commands for \emph{\my} and \emph{\mi} are
% not simply shorthand, but are intended to prevent hyphenation to
% occur within these characters.
%
% \begin{table}
% \begin{center}
% \begin{tabular}{ccc}
% \hline \textbf{Long Form} & \textbf{Short Form} & \textbf{Result} \\ \hline
% \verb!\maltesec! & \verb!\mc! & \mc \\ \hline
% \verb!\malteseC! & \verb!\mC! & \mC \\ \hline
% \verb!\malteseg! & \verb!\mg! & \mg \\ \hline
% \verb!\malteseG! & \verb!\mG! & \mG \\ \hline
% \verb!\malteseh! & \verb!\mh! & \mh \\ \hline
% \verb!\malteseH! & \verb!\mH! & \mH \\ \hline
% \verb!\maltesey! & \verb!\my! & \my \\ \hline
% \verb!\malteseY! & \verb!\mY! & \mY \\ \hline
% \verb!\maltesei! & \verb!\mi! & \mi \\ \hline
% \verb!\malteseI! & \verb!\mI! & \mI \\ \hline
% \verb!\maltesez! & \verb!\mz! & \mz \\ \hline
% \verb!\malteseZ! & \verb!\mZ! & \mZ \\ \hline
% \end{tabular}
% \end{center}
% \caption{\textbf{maltese} package commands\label{tbl:commands}}
% \end{table}
% 
% The following are samples in various styles of the default font:
% 
% \begin{quote}
% 
% \sample
% 
% \textbf{\sample}
% 
% \textit{\sample}
% 
% \textbf{\textit{\sample}}
% 
% \textsl{\sample}
% 
% \end{quote}
% 
% \section{Notes}
% 
% The package provides good results with the default {\LaTeXe}
% font. However, some characters may not look right with typewriter
% text or if a different font, such as \emph{times}, is loaded.
% 
% \section{Acknowledgements}
% 
% Thanks go to Dominique Unruh (\url{dominique@unruh.de}), author of
% the \emph{ucs} package, for kindly providing the current
% definitions for \emph{\mh} and \emph{\mH}. Thanks to Sinclair Calleja for testing
% and helping with debugging.
%
% \StopEventually{}
%
% \section{Implementation}
%
% Redefine h@bar to safeguard from tabbing environment.
%
%    \begin{macrocode}
\let\h@bar=\=
%    \end{macrocode}
%
% Define barred h lower and upper case.
%
%    \begin{macrocode}
\DeclareUnicodeCharacter{"126}{\leavevmode\rlap{\h@bar{\empty}}H\llap{\h@bar{\empty}}}
\DeclareUnicodeCharacter{"127}{\leavevmode\rlap{\h@bar{\empty}}h}
%    \end{macrocode}
%
% Declare shortcuts.
%
%    \begin{macrocode}
\newcommand{\mc}{\unichar{"10B}}
\newcommand{\mC}{\unichar{"10A}}
\newcommand{\mg}{\unichar{"121}}
\newcommand{\mG}{\unichar{"120}}
\newcommand{\mh}{\unichar{"127}}
\newcommand{\mH}{\unichar{"126}}
\newcommand{\mz}{\unichar{"17C}}
\newcommand{\mZ}{\unichar{"17B}}
\newcommand{\my}{{g\mh}}
\newcommand{\mY}{{G\mh}}
\newcommand{\mi}{{ie}}
\newcommand{\mI}{{Ie}}
%    \end{macrocode}
%
% Declare longer named versions.
%
%    \begin{macrocode}
\newcommand{\maltesec}{\mc}
\newcommand{\malteseC}{\mC}
\newcommand{\malteseg}{\mg}
\newcommand{\malteseG}{\mG}
\newcommand{\malteseh}{\mh}
\newcommand{\malteseH}{\mH}
\newcommand{\maltesez}{\mz}
\newcommand{\malteseZ}{\mZ}
\newcommand{\maltesey}{\my}
\newcommand{\malteseY}{\mY}
\newcommand{\maltesei}{\mi}
\newcommand{\malteseI}{\mI}
%    \end{macrocode}
%
% \begin{macro}{\maltesetext}
% A utility macro to wrap Maltese text with a font that will correctly
% display the non-Latin characters.
%    \begin{macrocode}
\newcommand{\maltesetext}[1]{\bgroup\fontfamily{cmr}\selectfont#1\egroup}
%    \end{macrocode}
% \end{macro}
%
% \Finale
\endinput