Debian Codegraph @

texmf-dist/doc/fonts/cmsrb/cmsrb.tex

raw
1 \documentclass{article}
2
3 \usepackage[OT2, TS1, X2, ECMSRB1, ECMSRB2, T2A, T1]{fontenc}
4 \usepackage[utf8]{inputenc}
5 \usepackage[a4paper,top=2.0cm,left=3cm,right=2.5cm,bottom=2cm,includefoot,includehead]{geometry}
6
7 \usepackage{cmsrb}
8 \usepackage{cmupint}
9 \let\enint\intop
10
11 \usepackage{amssymb}
12
13 \input glyphtounicode.tex
14 \pdfgentounicode=1
15
16 \usepackage{fancyvrb}
17 \usepackage{tabularx}
18
19 \newcommand\textcmsuper[1]{{\fontencoding{T2A}\fontfamily{cmr}\selectfont #1}}
20 \newcommand{\example}[1]{{\fontencoding{T2A}\selectfont #1} & \textcmsuper{#1}}
21
22 \newcommand\otinput[1]{{\fontencoding{T1}\selectfont \verb"#1"} & {\fontencoding{OT2}\selectfont #1}}
23 \newcommand\ecminput[1]{{\fontencoding{T1}\selectfont \verb"#1"} & {\fontencoding{ECMSRB1}\selectfont #1} & {\fontencoding{ECMSRB2}\selectfont #1}}
24
25 \DeclareTextSymbolDefault{\dj}{T1}
26
27 \newcounter{primer}
28 \newcounter{rezultat}
29 \newenvironment{primer}{\VerbatimEnvironment\refstepcounter{primer}\par\medskip
30 \noindent\textbf{Example~\theprimer: }
31 \begin{Verbatim}
32 }{\end{Verbatim}\medskip}
33 \newenvironment{rezultat}{\refstepcounter{rezultat}\par\medskip
34 \noindent\textbf{Result~\therezultat: }\\ }{\medskip}
35
36 \makeatletter
37 \newcommand{\manuallabel}[2]{\def\@currentlabel{#2}\label{#1}}
38 \makeatother
39
40 \usepackage{fonttable}
41
42 \begin{document}
43 \title{The \texttt{cmsrb} package}
44 \author{Uroš Stefanović\footnote{\texttt{[email protected]}}}
45 \date{\today{} v4.0}
46 \maketitle
47
48 \section{Why \textsf{cmsrb}?}
49
50 The \textsf{cm-super} package provides great support for Cyrillic script in various languages, but there's a problem with italic variants of some letters for Serbian and Macedonian. The \textsf{cmsrb} package includes the correct shapes for italic letters \verb|\cyrg|, \verb|\cyrd|, \verb|\cyrp|, \verb|\cyrt| and letter \verb|\cyrb|. This package also has some improvements in letters and accents used in Serbian language.
51
52 \section{Package Features}
53
54 The \textsf{cmsrb} fonts are the extensions of the Computer Modern fonts for Serbian and Macedonian languages for \TeX{} (\LaTeX). Support files are provided for \texttt{T1}, \texttt{TS1}, \texttt{T2A}, \texttt{X2} and \texttt{OT2} encodings, but also for the experimental \texttt{ECMSRB1} and \texttt{ECMSRB2} encodings. Supported font styles are serif, sans-serif and mono, for size 10pt.
55
56 This package is very simple to use: just put
57 \begin{verbatim}
58 \usepackage{cmsrb}
59 \end{verbatim}
60 in preamble of the document.
61
62 \begin{table}[h!]
63 \newcolumntype{C}{>{\centering\arraybackslash}X}%
64 \begin{tabularx}{\textwidth}{|C C|C C|C C|}
65 \hline
66 cmsrb & cm-super & cmsrb & cm-super & cmsrb & cm-super \\ \hline
67 \hline
68 \example{\textit{бгдпт}} & \example{\textbf{\textit{бгдпт}}} & \example{ђћ} \\ \hline
69 \example{б\textbf{б}\textit{б}\textsl{б}} & \example{\={а}\textsc{\={а}\f{и}}} & \example{\textit{đ\textbf{đ}}} \\ \hline
70 \end{tabularx}
71 \caption{Some \textsf{cm-super} and \textsf{cmsrb} differences.}\label{t2}
72 \end{table}
73
74 \section{OT2 Features}
75
76 The \texttt{OT2} encoding is modified to match the rules of Latin to Cyrillic transcription in Serbian language. Therefore, the \textsf{ts}, \textsf{kh}, \textsf{ch} and similar ligatures are removed from the encoding (see Table~\ref{t1}).
77
78 In \texttt{OT2} encoding Macedonian letters {\fontencoding{T2A}\selectfont Ѓ} and {\fontencoding{T2A}\selectfont Ќ} are added, with Montenegrin letters {\fontencoding{T2A}\selectfont\CYRSJE} and {\fontencoding{T2A}\selectfont\CYRZJE}, and also some orthographic symbols are included.
79
80 However, it is not recommended to use the \texttt{OT2} encoding; better choice for Serbian language is \texttt{T2A} encoding and utf8 input. One can use \texttt{OT2} encoding if they already have a document written in Latin---in which case it would be easy to transcribe it to Cyrillic.
81
82 \begin{table}
83 \newcolumntype{C}{>{\centering\arraybackslash}X}%
84 \begin{tabularx}{\textwidth}{|C C|C C|C C|C C|}
85 \hline
86 Input & Output & Input & Output & Input & Output & Input & Output \\ \hline
87 \hline
88 \otinput{A} & \otinput{B} & \otinput{C} & \otinput{D} \\ \hline
89 \otinput{E} & \otinput{F} & \otinput{G} & \otinput{H} \\ \hline
90 \otinput{I} & \otinput{J} & \otinput{K} & \otinput{L} \\ \hline
91 \otinput{M} & \otinput{N} & \otinput{O} & \otinput{P} \\ \hline
92 \otinput{Q} & \otinput{R} & \otinput{S} & \otinput{T} \\ \hline
93 \otinput{U} & \otinput{V} & \otinput{W} & \otinput{X} \\ \hline
94 \otinput{Y} & \otinput{Z} & \otinput{\#} & \otinput{} \\ \hline
95 \hline
96 \otinput{a} & \otinput{b} & \otinput{c} & \otinput{d} \\ \hline
97 \otinput{e} & \otinput{f} & \otinput{g} & \otinput{h} \\ \hline
98 \otinput{i} & \otinput{j} & \otinput{k} & \otinput{l} \\ \hline
99 \otinput{m} & \otinput{n} & \otinput{o} & \otinput{p} \\ \hline
100 \otinput{q} & \otinput{r} & \otinput{s} & \otinput{t} \\ \hline
101 \otinput{u} & \otinput{v} & \otinput{w} & \otinput{x} \\ \hline
102 \otinput{y} & \otinput{z} & \otinput{+} & \otinput{} \\ \hline
103 \hline
104 \otinput{C1} & \otinput{D1} & \otinput{D2} & \otinput{D3} \\ \hline
105 \otinput{E0} & \otinput{E1} & \otinput{E2} & \otinput{I0} \\ \hline
106 \otinput{I1} & \otinput{J1} & \otinput{J2} & \otinput{L1} \\ \hline
107 \otinput{N0} & \otinput{N1} & \otinput{P1} & \otinput{P2} \\ \hline
108 \otinput{Z1} & \otinput{\v{C}} & \otinput{\'C} & \otinput{\DJ} \\ \hline
109 \otinput{\v{S}} & \otinput{\v{Z}} & \otinput{LJ} & \otinput{Lj} \\ \hline
110 \otinput{NJ} & \otinput{Nj} & \otinput{D\v{Z}} & \otinput{D\v{z}} \\ \hline
111 \hline
112 \otinput{c1} & \otinput{d1} & \otinput{d2} & \otinput{d3} \\ \hline
113 \otinput{e0} & \otinput{e1} & \otinput{e2} & \otinput{i0} \\ \hline
114 \otinput{i1} & \otinput{j1} & \otinput{j2} & \otinput{l1} \\ \hline
115 \otinput{\i} & \otinput{n1} & \otinput{p1} & \otinput{p2} \\ \hline
116 \otinput{z1} & \otinput{\v{c}} & \otinput{\'c} & \otinput{\dj} \\ \hline
117 \otinput{\v{s}} & \otinput{\v{z}} & \otinput{lj} & \otinput{} \\ \hline
118 \otinput{nj} & \otinput{} & \otinput{d\v{z}} & \otinput{} \\ \hline
119 \hline
120 \otinput{\char20} & \otinput{\char21} & \otinput{\char28} & \otinput{\char29} \\ \hline
121 \otinput{\'G} & \otinput{\'K} & \otinput{\'g} & \otinput{\'k} \\ \hline
122 \otinput{\'S} & \otinput{\'Z} & \otinput{\'s} & \otinput{\'z} \\ \hline
123 \end{tabularx}
124 \caption{\texttt{OT2} encoding in \textsf{cmsrb} package.}\label{t1}
125 \end{table}
126
127 \begin{primer}
128 \documentclass{article}
129 \usepackage{cmsrb}
130 \usepackage[OT2,T1]{fontenc}
131 \usepackage[serbian]{babel}
132 \newcommand{\test}%
133 {Ljubazni fenjerd\v zija \v ca\dj avog lica ho\'ce da mi poka\v ze \v stos.}
134 \begin{document}
135 \test \\
136 \fontencoding{OT2}\selectfont \test \\
137 Akcenti: \'a\`a\C a\f a\=a\^a\"a\u a
138 \end{document}
139 \end{primer}
140
141 \begin{rezultat}
142 \indent {\fontencoding{T1}\selectfont Ljubazni fenjerd\v zija \v ca\dj avog lica ho\'ce da mi poka\v ze \v stos.} \\
143 {\fontencoding{OT2}\selectfont Ljubazni fenjerd\v zija \v ca\dj avog lica ho\'ce da mi poka\v ze \v stos. \\ Akcenti: \'a\`a\C a\f a\=a\^a\"a\u a}
144 \end{rezultat}
145
146 \begin{primer}
147 \documentclass{article}
148 \usepackage{cmsrb}
149 \usepackage[OT2,T1]{fontenc}
150 \usepackage[utf8]{inputenc}
151 \usepackage[serbian]{babel}
152 \newcommand{\test}%
153 {Ljubazni fenjerdžija čađavog lica hoće da mi pokaže štos.}
154 \begin{document}
155 \textit{\test} \\
156 \fontencoding{OT2}\selectfont \textit{\test}
157 \end{document}
158 \end{primer}
159
160 \begin{rezultat}
161 \indent{\fontencoding{T1}\selectfont \textit{Ljubazni fenjerd\v zija \v ca\dj avog lica ho\'ce da mi poka\v ze \v stos.}} \\
162 {\fontencoding{OT2}\selectfont \textit{Ljubazni fenjerd\v zija \v ca\dj avog lica ho\'ce da mi poka\v ze \v stos.}}
163 \end{rezultat}
164
165 \section{T1 Features}
166
167 The \texttt{T1} encoding now support conversion from Cyrillic to Latin script (see Example~\ref{prim:t1}).
168
169 On the position 208 now is the letter Đ (\texttt{U+0110}) instead of the letter {\fontencoding{TS1}\selectfont \DH} (\texttt{U+00D0}), which enable copying and searching in the Serbian or Croatian Latin text.
170
171 \fontencoding{T2A}\selectfont
172 \begin{primer}
173 \documentclass{article}
174 \usepackage{cmsrb}
175 \usepackage[T2A,T1]{fontenc}
176 \usepackage[utf8]{inputenc}
177 \usepackage[serbian]{babel}
178 \begin{document}
179 Љубазни фењерџија чађавог лица хоће да ми покаже штос.
180 \end{document}
181 \end{primer}
182 \manuallabel{prim:t1}{\theprimer}
183 \fontencoding{T1}\selectfont
184
185 \begin{rezultat}
186 \indent Ljubazni fenjerdžija čađavog lica hoće da mi pokaže štos.
187 \end{rezultat}
188
189 \section{T2A Features}
190
191 The Cyrillic letters {\fontencoding{T2A}\selectfont\texttt{Ј}} and {\fontencoding{T2A}\selectfont\texttt{ј}} are not supported in the \texttt{T2A} encoding, so they are placed instead of the Latin letters \texttt{J} and \texttt{j}.
192 This give us the better results in the Cyrillic text, but that also means this Latin letter are not present in the \texttt{T2A} encoding, so be carefull during searching and copying Latin text in this encoding.
193
194 The letters {\fontencoding{X2}\selectfont \char"81, \char"89, \char"86, \char"91, \char"A1, \char"A9, \char"A6, \char"B1} are removed from the \texttt{T2A} encoding, and on their places now are the letters {\fontencoding{T2A}\selectfont \char"81, \char"89, \char"86, \char"91, \char"A1, \char"A9, \char"A6, \char"B1}.
195
196 \fontencoding{T2A}\selectfont
197 \begin{primer}
198 \documentclass{article}
199 \usepackage{cmsrb}
200 \usepackage[T2A]{fontenc}
201 \usepackage[utf8]{inputenc}
202 \usepackage[serbianc]{babel}
203 \DeclareTextSymbolDefault{\dj}{T1}
204 \begin{document}
205 \textit{Ljubazni fenjerdžija čađavog lica hoće da mi pokaže štos.\\
206 Љубазни фењерџија чађавог лица хоће да ми покаже штос.} \\
207 Акценти: \'{и}\`{и}\C{и}\f{и}\={и}\^{и}\"{и}\u{и}
208 \end{document}
209 \end{primer}
210
211 \begin{rezultat}
212 \indent {\textit{Ljubazni fenjerdžija čađavog lica hoće da mi pokaže štos.\\ Љубазни фењерџија чађавог лица хоће да ми покаже штос.} \\ Акценти: \'{и}\`{и}\C{и}\f{и}\={и}\^{и}\"{и}\u{и}}
213 \end{rezultat}
214
215 \begin{primer}
216 \documentclass{article}
217 \usepackage{cmsrb}
218 \usepackage[T2A]{fontenc}
219 \usepackage[utf8]{inputenc}
220 \usepackage[serbianc]{babel}
221 \begin{document}
222 \textit{абвгдђѓежз\'{з}ѕијклљмнњопрс\'{с}тћќуфхцчџш}
223 \end{document}
224 \end{primer}
225
226 \begin{rezultat}
227 \indent {\textit{абвгдђѓежз\'{з}ѕијклљмнњопрс\'{с}тћќуфхцчџш}}
228 \end{rezultat}
229 \fontencoding{T1}\selectfont
230
231 \section{TS1 Features}
232
233 In the \texttt{TS1} encoding we can find the letter {\fontencoding{TS1}\selectfont \DH} (\texttt{U+00D0}), which is removed from the \texttt{T1} encoding.
234 Also, in the \texttt{TS1} encoding now are the letters {\fontencoding{T2A}\selectfont б, г, д, п, т} with Russian italic shape.
235
236 \fontencoding{T2A}\selectfont
237 \begin{primer}
238 \documentclass{article}
239 \usepackage{cmsrb}
240 \usepackage[TS1,T2A]{fontenc}
241 \usepackage[utf8]{inputenc}
242 \usepackage[serbianc]{babel}
243 \begin{document}
244 \textit{бгдпт} \fontencoding{TS1}\selectfont \textit{бгдпт \DH}
245 \end{document}
246 \end{primer}
247
248 \begin{rezultat}
249 \indent \textit{бгдпт} {\fontencoding{TS1}\selectfont \textit{бгдпт \DH}}
250 \end{rezultat}
251 \fontencoding{T1}\selectfont
252
253 \section{Math}
254
255 The \textsf{cmsrb} package load default Computer Modern math fonts, but load only fonts with size lower or equal 10pt, for better visual effect.
256 If the option \textsf{math} is used, then the package \textsf{cmupint} will be loaded, and the integral sign will be changed from $\enint$ to $\int$ (upright integral is traditionally used in Serbian language, with \verb|\limits| option).
257 Also, in Serbian language is better to use the symbols $\leqslant$ and $\geqslant$ than the symbols $\leq$ и $\geq$. If the \textsf{math} option is used the package \textsf{amssymb} will be loaded and this symbols will be changed (also $\nleqslant$ and $\ngeqslant$ will be used).
258
259 We use this option like this:
260 \begin{verbatim}
261 \usepackage[math]{cmsrb}
262 \end{verbatim}
263
264 \begin{primer}
265 \documentclass{article}
266 \usepackage{cmsrb}
267 \newcommand{\ud}{\,\mathrm{d}}
268 \begin{document}
269 $$ \int_0^1 e^x\ud x \geq 0 $$
270 \end{document}
271 \end{primer}
272
273 \begin{rezultat}
274 $$ \enint\nolimits_0^1 e^x\,\mathrm{d} x \geq 0 $$
275 \end{rezultat}
276
277 \begin{primer}
278 \documentclass{article}
279 \usepackage[math]{cmsrb}
280 \newcommand{\ud}{\,\mathrm{d}}
281 \begin{document}
282 $$ \int_0^1 e^x\ud x \geq 0 $$
283 \end{document}
284 \end{primer}
285
286 \begin{rezultat}
287 $$ \int_0^1 e^x\,\mathrm{d} x \geqslant 0 $$
288 \end{rezultat}
289
290 \section{Experimental encodings}
291
292 The encodings \texttt{ECMSRB1} and \texttt{ECMSRB2} are created for this package only. They are similar to \texttt{OT2} encoding, but they contain specific ligatures and accents (see Table~\ref{t3}). For the complete list of characters used in this encodings see Tables on Pages~\pageref{ecs1} and \pageref{ecs2}. The purposes of this encodins are writting Serbian text using only \texttt{ASCII} characters, and making simple conversions from Latin to Cyrillic.
293
294 \begin{table}[h!]
295 \newcolumntype{C}{>{\centering\arraybackslash}X}%
296 \begin{tabularx}{\textwidth}{|C C C|C C C|C C C|}
297 \hline
298 Input & \texttt{ECMSRB1} & \texttt{ECMSRB2} & Input & \texttt{ECMSRB1} & \texttt{ECMSRB2} &Улаз & \texttt{ECMSRB1} & \texttt{ECMSRB2} \\ \hline
299 \hline
300 \ecminput{CX} & \ecminput{CY} & \ecminput{DX} \\ \hline
301 \ecminput{DY} & \ecminput{EY} & \ecminput{GY} \\ \hline
302 \ecminput{KY} & \ecminput{LJ} & \ecminput{LY} \\ \hline
303 \ecminput{NJ} & \ecminput{NY} & \ecminput{SX} \\ \hline
304 \ecminput{SXY} & \ecminput{ZX} & \ecminput{ZY} \\ \hline
305 \ecminput{ZXY} & \ecminput{\EZH} & \ecminput{} \\ \hline
306 \hline
307 \ecminput{Cx} & \ecminput{Cy} & \ecminput{Dx} \\ \hline
308 \ecminput{Dy} & \ecminput{Ey} & \ecminput{Gy} \\ \hline
309 \ecminput{Ky} & \ecminput{Lj} & \ecminput{Ly} \\ \hline
310 \ecminput{Nj} & \ecminput{Ny} & \ecminput{Sx} \\ \hline
311 \ecminput{Sxy} & \ecminput{Zx} & \ecminput{Zy} \\ \hline
312 \ecminput{Zxy} & \ecminput{} & \ecminput{} \\ \hline
313 \hline
314 \ecminput{cx} & \ecminput{cy} & \ecminput{dx} \\ \hline
315 \ecminput{dy} & \ecminput{ey} & \ecminput{gy} \\ \hline
316 \ecminput{ky} & \ecminput{lj} & \ecminput{ly} \\ \hline
317 \ecminput{nj} & \ecminput{ny} & \ecminput{sx} \\ \hline
318 \ecminput{sxy} & \ecminput{zx} & \ecminput{zy} \\ \hline
319 \ecminput{zxy} & \ecminput{\ezh} & \ecminput{} \\ \hline
320 \hline
321 \ecminput{\`a} & \ecminput{\'a} & \ecminput{\^a} \\ \hline
322 \ecminput{\T a} & \ecminput{\D a} & \ecminput{\H a} \\ \hline
323 \ecminput{\r a} & \ecminput{\R a} & \ecminput{\v a} \\ \hline
324 \ecminput{\u a} & \ecminput{\U a} & \ecminput{\=a} \\ \hline
325 \ecminput{\b a} & \ecminput{\.a} & \ecminput{\d a} \\ \hline
326 \ecminput{\c a} & \ecminput{\k a} & \ecminput{\"a} \\ \hline
327 \ecminput{\C a} & \ecminput{\~a} & \ecminput{\f a} \\ \hline
328 \end{tabularx}
329 \caption{Encodings \texttt{ECMSRB1} and \texttt{ECMSRB2} for the package \textsf{cmsrb}.}\label{t3}
330 \end{table}
331
332 \begin{primer}
333 \documentclass{article}
334 \usepackage{cmsrb}
335 \usepackage[ECMSRB1]{fontenc}
336 \usepackage[serbian]{babel}
337 \begin{document}
338 Ljubazni fenjerdxija cxadyavog lica hocye da mi pokazxe sxtos.
339 \end{document}
340 \end{primer}
341
342 \begin{rezultat}
343 \indent {\fontencoding{ECMSRB1}\selectfont Ljubazni fenjerdxija cxadyavog lica hocye da mi pokazxe sxtos.}
344 \end{rezultat}
345
346 \begin{primer}
347 \documentclass{article}
348 \usepackage{cmsrb}
349 \usepackage[ECMSRB2]{fontenc}
350 \usepackage[serbian]{babel}
351 \begin{document}
352 Ljubazni fenjerdxija cxadyavog lica hocye da mi pokazxe sxtos.
353 \end{document}
354 \end{primer}
355
356 \begin{rezultat}
357 \indent {\fontencoding{ECMSRB2}\selectfont Ljubazni fenjerdxija cxadyavog lica hocye da mi pokazxe sxtos.}
358 \end{rezultat}
359
360
361 \section{Version history}
362
363 \subsection*{4.0}
364
365 \begin{itemize}
366 \item All options are removed, the option \textsf{math} is added.
367 \item Fixed encodings \texttt{T1}, \texttt{T2A}, \texttt{TS1}, \texttt{OT2}.
368 \item Letter {\fontencoding{T2A}\selectfont\textsf{б}} is significantly improved in all styles.
369 \item Experimental encodings \texttt{ECMSRB1} and \texttt{ECMSRB2} are added.
370 \end{itemize}
371
372 \subsection*{3.1}
373
374 \begin{itemize}
375 \item Bugs fixed.
376 \item Options \textsf{noint} and \textsf{nosymb} are active.
377 \item Symbols $\leq$, $\geq$, $\nleq$, $\ngeq$ are changed.
378 \end{itemize}
379
380 \subsection*{3.0}
381
382 \begin{itemize}
383 \item Letter б is modificated.
384 \item Cyrillic to Latin conversion is added.
385 \item Math fonts are changed (\textsf{nomath} option is active).
386 \item Upright integral sign is added.
387 \end{itemize}
388
389 \subsection*{2.0}
390
391 \begin{itemize}
392 \item Added support for the letters {\fontencoding{OT2}\selectfont \'g, \'k, \'s, \'z}.
393 \end{itemize}
394
395 \subsection*{1.1}
396
397 \begin{itemize}
398 \item The separate \verb|.map| files merged into one.
399 \end{itemize}
400
401 \pagebreak
402
403 \appendix
404
405 \section{Encoding ECMSRB1}\label{ecs1}
406
407 \fonttable{ecmsrb1cmsrbrr}
408
409 \pagebreak
410
411 \section{Encoding ECMSRB2}\label{ecs2}
412
413 \fonttable{ecmsrb2cmsrbrr}
414
415 \end{document}