summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/fonts/cmsrb/cmsrb-doc-SR.tex
blob: 92482f225adf4f1ccfcc698f1dd1f8de8d657bdb (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
\documentclass{article}

\usepackage[OT2, T1, T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[serbianc]{babel}

\usepackage{cmsrb}

\input glyphtounicode.tex
\pdfgentounicode=1

\usepackage{fancyvrb}
\usepackage{tabularx}

\newcommand\textcmsuper[1]{{\fontencoding{T2A}\fontfamily{cmr}\selectfont #1}}
\newcommand{\example}[1]{{\fontencoding{T2A}\selectfont #1} & \textcmsuper{#1}}

\newcommand\otinput[1]{{\fontencoding{T1}\selectfont \verb"#1"} & {\fontencoding{OT2}\selectfont #1}}

\DeclareTextSymbolDefault{\dj}{T1}

\begin{document}
	\title{Пакет \texttt{cmsrb}}
	\author{Урош Стефановић\footnote{\texttt{urostajms@gmail.com}}}
	\date{\today. в1.1}
	\maketitle
	
	\section{Зашто \textsf{cmsrb}?}
	
	Пакет \textsf{cm-super} обезбеђује одличну подршку за ћирилицу у разним језицима, али код њега постоји проблем са курзивним облицима (италиком) неких слова за српски и македонски језик. Пакет \textsf{cmsrb} садржи исправан облик курзивних слова \verb|б|, \verb|г|, \verb|д|, \verb|п| и \verb|т|. Такође, овај пакет доноси одређена побољшања у словима и акцентима који се користе у српском језику.
	
	\section{Карактеристике пакета}
	
	Фонтови \textsf{cmsrb} су проширење \textit{Computer Modern} фонтова за српски и македонски језик за \TeX{} (\LaTeX). Подржана кодирања су \textit{T1}, \textit{TS1}, \textit{T2A}, \textit{X2} и \textit{OT2}. Подржани стилови фонта су серифни, санс-серифни и непропорционални, за величину 10\textit{pt}.
	
	Овај пакет је једноставан за коришћење: само је потребно да ставимо
	\begin{verbatim}
	\usepackage{cmsrb}
	\end{verbatim}
	у преамбулу документа.
	
	\begin{table}[h!]
		\newcolumntype{C}{>{\centering\arraybackslash}X}%
		\begin{tabularx}{\textwidth}{|C C|C C|C C|}
			\hline
			cmsrb & cm-super & cmsrb & cm-super & cmsrb & cm-super  \\ \hline
			\hline
			\example{\textit{бгдпт}} & \example{\textbf{\textit{бгдпт}}} & \example{ђћ} \\ \hline
			\example{\={а}} & \example{\textsc{\={а}\f{и}}} & \example{\textit{đ\textbf{đ}}} \\ \hline
		\end{tabularx}
		\caption{Неке \textsf{cm-super} и \textsf{cmsrb} разлике.}\label{t2}
	\end{table}
	
	\section{Карактеристике \textit{OT2} кодирања}
	
	Кодирање \textit{OT2} је измењено како би подржало правилно пребацивање из латинице у ћирилицу у српском језику. Према томе, \textsf{ts}, \textsf{kh}, \textsf{ch} и сличне лигатуре су уклоњене из кодирања (види табелу~\ref{t1}). Али потребно је да учитамо пакет \textsf{cmsrb} \textit{након} пакета \textsf{fontenc}, иначе ће команде \verb|\'c| и \verb|\'C| да дају погрешан резултат.
	
	Ипак, није препоручљиво коришћење \textit{OT2} кодирања; бољи избор за српски језик је \textit{T2A} кодирање и \textit{utf8} унос. Кодирање \textit{OT2} је добар избор ако већ имамо документ написан латиницом — тада ће бити једноставно пребацити га у ћирилицу.
	
	\begin{table}
	\newcolumntype{C}{>{\centering\arraybackslash}X}%
	\begin{tabularx}{\textwidth}{|C C|C C|C C|C C|}
	\hline
	Улаз & Излаз & Улаз & Излаз & Улаз & Излаз & Улаз & Излаз \\ \hline
	\hline
	\otinput{A} & \otinput{B} & \otinput{C} & \otinput{D} \\ \hline
	\otinput{E} & \otinput{F} & \otinput{G} & \otinput{H} \\ \hline
	\otinput{I} & \otinput{J} & \otinput{K} & \otinput{L} \\ \hline
	\otinput{M} & \otinput{N} & \otinput{O} & \otinput{P} \\ \hline
	\otinput{Q} & \otinput{R} & \otinput{S} & \otinput{T} \\ \hline
	\otinput{U} & \otinput{V} & \otinput{W} & \otinput{X} \\ \hline
	\otinput{Y} & \otinput{Z} & \otinput{\#} & \otinput{} \\ \hline
	\hline
	\otinput{a} & \otinput{b} & \otinput{c} & \otinput{d} \\ \hline
	\otinput{e} & \otinput{f} & \otinput{g} & \otinput{h} \\ \hline
	\otinput{i} & \otinput{j} & \otinput{k} & \otinput{l} \\ \hline
	\otinput{m} & \otinput{n} & \otinput{o} & \otinput{p} \\ \hline
	\otinput{q} & \otinput{r} & \otinput{s} & \otinput{t} \\ \hline
	\otinput{u} & \otinput{v} & \otinput{w} & \otinput{x} \\ \hline
	\otinput{y} & \otinput{z} & \otinput{+} & \otinput{} \\ \hline
	\hline
	\otinput{C1} & \otinput{D1} & \otinput{D2} & \otinput{D3} \\ \hline
	\otinput{E0} & \otinput{E1} & \otinput{E2} & \otinput{I0} \\ \hline
	\otinput{I1} & \otinput{J1} & \otinput{J2} & \otinput{L1} \\ \hline
	\otinput{N0} & \otinput{N1} & \otinput{P1} & \otinput{P2} \\ \hline
	\otinput{Z1} & \otinput{\v{C}} & \otinput{\'C} & \otinput{\DJ} \\ \hline
	\otinput{\v{S}} & \otinput{\v{Z}} & \otinput{LJ} & \otinput{Lj} \\ \hline
	\otinput{NJ} & \otinput{Nj} & \otinput{D\v{Z}} & \otinput{D\v{z}} \\ \hline
	\hline
	\otinput{c1} & \otinput{d1} & \otinput{d2} & \otinput{d3} \\ \hline
	\otinput{e0} & \otinput{e1} & \otinput{e2} & \otinput{i0} \\ \hline
	\otinput{i1} & \otinput{j1} & \otinput{j2} & \otinput{l1} \\ \hline
	\otinput{\i} & \otinput{n1} & \otinput{p1} & \otinput{p2} \\ \hline
	\otinput{z1} & \otinput{\v{c}} & \otinput{\'c} & \otinput{\dj} \\ \hline
	\otinput{\v{s}} & \otinput{\v{z}} & \otinput{lj} & \otinput{} \\ \hline
	\otinput{nj} & \otinput{} & \otinput{d\v{z}} & \otinput{} \\ \hline
	\hline
	\otinput{\char20} & \otinput{\char21} & \otinput{\char28} & \otinput{\char29} \\ \hline
	\otinput{\'G} & \otinput{\'K} & \otinput{\'g} & \otinput{\'k} \\ \hline
	\end{tabularx}
	\caption{Кодирање \textit{OT2} за пакет \textsf{cmsrb}.}\label{t1}
	\end{table}

    \section{Примери}
    
    \noindent\textbf{Пример 1: }
    \begin{Verbatim}
    \documentclass{article}
    \usepackage[OT2,T1]{fontenc}
    \usepackage[serbian]{babel}
    \usepackage{cmsrb}
    \newcommand{\test}%
    {Ljubazni fenjerd\v zija \v ca\dj avog lica ho\'ce da mi poka\v ze \v stos.}
    \begin{document}
    \test \\
    \fontencoding{OT2}\selectfont \test
    \end{document}
    \end{Verbatim}
    
    \noindent\textbf{Резултат 1:} \\
    \indent Ljubazni fenjerd\v zija \v ca\dj avog lica ho\'ce da mi poka\v ze \v stos. \\
    {\fontencoding{OT2}\selectfont Ljubazni fenjerd\v zija \v ca\dj avog lica ho\'ce da mi poka\v ze \v stos.}\\[1cm]
    
    \noindent\textbf{Пример 2: }
    \begin{Verbatim}
	\documentclass{article}
	\usepackage[OT2,T1]{fontenc}
	\usepackage[utf8]{inputenc}
	\usepackage[serbian]{babel}
	\usepackage{cmsrb}
	\newcommand{\test}%
	{Ljubazni fenjerdžija čađavog lica hoće da mi pokaže štos.}
	\begin{document}
	\textit{\test} \\
	\fontencoding{OT2}\selectfont \textit{\test}
	\end{document}
    \end{Verbatim}
    
    \noindent\textbf{Резултат 2:} \\
    \indent \textit{Ljubazni fenjerd\v zija \v ca\dj avog lica ho\'ce da mi poka\v ze \v stos.} \\
    {\fontencoding{OT2}\selectfont \textit{Ljubazni fenjerd\v zija \v ca\dj avog lica ho\'ce da mi poka\v ze \v stos.}}\\[1cm]
    
    \fontencoding{T2A}\selectfont
    
    \noindent\textbf{Пример 3: }
    \begin{Verbatim}
    \documentclass{article}
    \usepackage[T2A]{fontenc}
    \usepackage[utf8]{inputenc}
    \usepackage[serbianc]{babel}
    \usepackage{cmsrb}
    \DeclareTextSymbolDefault{\dj}{T1}
    \begin{document}
    \textit{Ljubazni fenjerdžija čađavog lica hoće da mi pokaže štos.\\
    Љубазни фењерџија чађавог лица хоће да ми покаже штос.}
    \end{document}
    \end{Verbatim}
    
    \noindent\textbf{Резултат 3:} \\
    \indent {\textit{Ljubazni fenjerdžija čađavog lica hoće da mi pokaže štos.\\ Љубазни фењерџија чађавог лица хоће да ми покаже штос.}}
    
    \section{Историја верзија}
    
    \subsection*{1.1}
    
    \begin{itemize}
    	\item Неколико \verb|.map| фајлова спојено у један.
    \end{itemize}
	
\end{document}