% Translation: jaih
% Checking:    2006-11-14 zyka
\startcomponent ma-cb-cz-fonts
\project ma-cb
\product ma-cb-cz
\environment ma-cb-env-cz

%\chapter{Fonts and font switches}
\chapter{P�smo a p�ep�na�e font�}

%\section{Introduction}
\section{�vod}

%\index{Computer Modern Roman}
\index{Computer Modern}
\index{Lucida Bright}
\index{AMS}
%\index{\cap{PS}--fonts}
\index{\cap{PS}--fonty}
\seeindex{p�smo}{font}

%The default font in \CONTEXT\ is the {\em Computer Modern
%Roman} (\type{cmr}). You can also use Lucida Bright
%(\type{lbr}) as a full alternative and symbols of the {\em
%American Mathematical Society} (\type{ams}). Standard
%PostScript fonts (\type{pos}) are also available.
Implicitn� font v~\CONTEXT{}u je {\em Computer Modern Roman}
(\type{cmr}). M��ete tak� pou��t font Lucida Bright (\type{lbr})
a~symboly {\em American Mathematical Society} (\type{ams}).
Dostupn� jsou PostScriptov� fonty (\type{pos}) a~mnoh� dal��.

%\section{Fontstyle and size}
\section{�ezy p�sma a jejich velikost}

%\index{font+style}
\index{font+�ez}
%\index{font+size}
\index{font+velikost}
\index{font+Computer Modern}

\Command{\tex{setupbodyfont}}
\Command{\tex{switchtobodyfont}}

%You select the font family, style and size for a document
%with:
Rodinu, �ez a~velikost fontu pro cel� dokument vybereme
pomoc�:

\shortsetup{setupbodyfont}

%If you typed \type{\setupbodyfont[sansserif,9pt]}
%{\switchtobodyfont[ss,9pt] in the setup area of the input
%file your text would look something like this.}
Pokud pou�ijeme \type{\setupbodyfont[cmr,sansserif,9pt]}
{\switchtobodyfont[cmr,ss,9pt] v~�vodn� deklara�n� oblasti
vstupn�ho souboru, text by m�l vypadat asi takto.}%

%For changes in mid-document and on section level you
%should use:
Pro zm�nu uprost�ed dokumentu, nebo na �rovni sekce, bychom
m�li pou��t:

\shortsetup{switchtobodyfont}

%% \startbuffer
%% On November 10th (one day before Saint Martensday) the youth of
%% Hasselt go from door to door to sing a special song and they
%% accompany themselves with a {\em foekepot}. They won't leave
%% before you give them some money or sweets. The song goes like this:

%% \startnarrower
%% \switchtobodyfont[small]
%% \startlines
%% Foekepotterij, foekepotterij,
%% Geef mij een centje dan ga'k voorbij.
%% Geef mij een alfje dan blijf ik staan,
%% 'k Zal nog liever naar m'n arrenmoeder gaan.
%% Hier woont zo'n rieke man, die zo vulle g\egrave ven kan.
%% G\egrave f wat, old wat, g\egrave f die arme stumpers wat,
%% 'k Eb zo lange met de foekepot elopen.
%% 'k Eb gien geld om brood te kopen.
%% Foekepotterij, foekepotterij,
%% Geef mij een centje dan ga'k voorbij.
%% \stoplines
%% \stopnarrower
%% \stopbuffer
\startbuffer
10.\,listopadu (jeden den p�ed dnem svat�ho Martina) chod� omladina
m�sta Hasselt d�m od domu a zp�v� zvl�tn� p�se� ur�enou jen pro tuto
p��le�itost. Sv�j zp�v doprov�z� na n�stroj {\em foekepot}. Neodejdou,
dokud jim ned�te n�jak� pen�ze, nebo sladkosti. P�se� zn� asi takto:

\startnarrower
\switchtobodyfont[small]
\startlines
Foekepotterij, foekepotterij,
Geef mij een centje dan ga'k voorbij.
Geef mij een alfje dan blijf ik staan,
'k Zal nog liever naar m'n arrenmoeder gaan.
Hier woont zo'n rieke man, die zo vulle g\egrave ven kan.
G\egrave f wat, old wat, g\egrave f die arme stumpers wat,
'k Eb zo lange met de foekepot elopen.
'k Eb gien geld om brood te kopen.
Foekepotterij, foekepotterij,
Geef mij een centje dan ga'k voorbij.
\stoplines
\stopnarrower
\stopbuffer

\typebuffer

%Notice that \type{\startnarrower} $\cdots$
%\type{\stopnarrower} is also used as a begin and end of the
%fontswitch. The function of \type{\startlines} and
%\type{\stoplines} in this example is obvious.
Poznamenejme je�t�, �e \type{\startnarrower} $\cdots$
\type{\stopnarrower} se tak� u��v� jako za��tek a~konec
p�epnut� fontu. Funkce \type{\startlines} a~\type{\stoplines} 
v~tomto p��kladu je z�ejm�.

\start
\getbuffer
\stop

%If you want an overview of the available font family you can
%type:
Pokud chceme z�skat p�ehled dostupn�ch druh� fontu zvolen� rodiny,
zkusme vys�zet:

\startbuffer
\showbodyfont[cmr]
\stopbuffer

\typebuffer

\getbuffer

%\section{Style and size switch in commands}
\section{P�ep�na�e �ezu a velikosti v~parametrech p��kaz�}

%In a number of commands one of the parameters is
%\type{character} to indicate the desired typestyle. For
%example:
%netusim, co je mineno tim "character" :(
% VZ: me too
V mnoha p��kazech jeden z~parametr� indikuje po�adovan�
styl sazby. Nap��klad:

\startbuffer
\setuphead[chapter][style=\tfd]
\stopbuffer

\typebuffer

%In this case the character size for chapters is indicated with
%a command \type{\tfd}. But instead of a command you could
%use the predefined options that are related to the actual
%typeface:
V~tomto p��pad� je velikost p�sma nadpisu kapitol nastavena na
\type{\tfd}. M�sto takov�hoto p��kazu bychom ale m�li
pou��vat p�eddefinovan� volby, kter� se vztahuj� k~aktu�ln�mu
druhu fontu:

\startbuffer
normal  bold  slanted  boldslanted  type  mediaeval
small  smallbold  smallslanted  smallboldslanted smalltype
capital cap
\stopbuffer

\typebuffer

%\section{Local font style and size}
\section{Lok�ln� �ez p�sma a jeho velikost}

\index{font}
\index{font+sklon�n�}
\index{font+kurzivn�}
\index{font+bezpatkov�}
\index{font+tu�n�}
\index{font+velikost}
\index{kurziva}
\seeindex{italika}{kurziva}

\Command{\tex{rm}}
\Command{\tex{ss}}
\Command{\tex{tt}}
\Command{\tex{sl}}
\Command{\tex{bf}}
\Command{\tex{tfa}}
\Command{\tex{tfb}}
\Command{\tex{tfc}}
\Command{\tex{tfd}}

%In the running text (local) you can change the {\em
%typestyle} into roman, sans serif and teletype with
%\type{\rm}, \type{\ss} and \type{\tt}.
V~b�n�m textu m��eme m�nit {\em styl p�sma} na 
roman, bezpatkov� a~neproporcion�ln� (strojopisn�) pomoc� p��kaz�
\type{\rm}, \type{\ss} a~\type{\tt}.

%You can change the {\em typeface} like italic and boldface
%with \type{\sl} and \type{\bf}.
{\em �ez p�sma}, jako kurz�va, sklon�n� nebo tu�n�, m��eme m�nit  
pomoc� \type{\it}, \type{\sl} a~\type{\bf}.

%The {\em typesize} is available from 4pt to 12pt and is
%changed with \type{\switchtobodyfont}.
{\em Velikost p�sma} lze m�nit v~rozmez� od 4pt do 12pt
a~nastavuje se pomoc� \type{\switchtobodyfont}.

%The actual style is indicated with \type{\tf}. If you want
%to change into a somewhat greater size you can type
%\type{\tfa}, \type{\tfb}, \type{\tfc} and \type{\tfd}. An
%addition of \type{a}, \type{b}, \type{c} and \type{d} to
%\type{\sl}, \type{\it} and \type{\bf} is also allowed.
Aktu�ln� styl je v~p��kazu p�ednastaven pomoc� \type{\tf}.
Pokud chceme zv�t�it velikost p�sma, pou�ijeme 
\type{\tfa}, \type{\tfb}, \type{\tfc} a~\type{\tfd}. 
P��ponu \type{a}, \type{b}, \type{c} a~\type{d} lze
p�id�vat tak� k~p��kaz�m \type{\it}, \type{\sl}
nebo \type{\bf}.

%\startbuffer
%{\tfc Mintage}

%In the period from {\tt 1404} till {\tt 1585} Hasselt had its own
%{\sl right of coinage}. This right was challenged by other cities,
%but the {\switchtobodyfont[7pt] bishops of Utrecht} did not honour
%these {\slb protests}.
%\stopbuffer

\startbuffer
{\tfc Ra�ba minc�}

V obdob� od roku {\tt 1404} do {\tt 1585} vlastnil Hasselt 
{\sl pr�vo ra�en� minc�}. Proti t�to v�sad� Hasseltu
ostatn� m�sta protestovala, ale 
{\switchtobodyfont[7pt] biskup z Utrechtu} tyto protesty
nevysly�el.
\stopbuffer

\typebuffer

%The curly braces indicate begin and end of style or size
%switches.
Slo�en� z�vorka indikuje za��tek a konec oblasti, kter� 
je ovlivn�na p�ep�na�em stylu nebo velikosti.

\getbuffer

%\section{Redefining fontsize}
\section{P�edefinov�n� velikosti fontu}

%\index{fontsize}
\index{velikost fontu}

\Command{\tex{definebodyfont}}

%For special purposes you can define your own fontsize.
Ve zvl�tn�ch p��padech m��eme definovat svou vlastn�
velikost fontu.

\shortsetup{definebodyfont}

%A definition could look like this:
Tato definice by m�la vypadat asi takto:

\startbuffer
\definebodyfont[10pt][rm][tfe=Regular at 36pt]

{\tfe Hasselt!}
\stopbuffer

\typebuffer

%Now \type{\tfe} will produce 36pt characters saying:
Nyn� p��kaz \type{\tfe} vys�z� velikost� 36pt n�pis:
{\hbox{\getbuffer}}

%\section{Small caps}
\section{Kapit�lky}

%\index{small caps}
\index{kapit�lky}

%\Command{\tex{kap}}
\Command{\tex{cap}}

%Abbreviations like \PDF\ (\infull{PDF}) are printed in
%pseudo small caps. A small capital is somewhat smaller than
%the capital of the actual typeface. Pseudo small caps are
%produced with:
Zkratky jako \PDF\ (\infull{PDF}) jsou ti�t�ny pomoc� 
mal�ch kapit�lek. Mal� kapit�lky jsou o~n�co men��,
ne� po��te�n� p�smena v�t v~aktu�ln�m fontu 
a~mohou b�t vys�zeny pomoc�:

%\shortsetup{kap}
\shortsetup{cap}

%If you compare \type{PDF}, \type{\kap{PDF}} and \type{\sc pdf}:
Pokud porovn�me \type{PDF}, \type{\cap{PDF}} a~\type{\sc pdf}

\bgroup
\cbox{
  \hfil
  PDF, \cap{PDF} a~{\sc pdf}%
  \hfil
  \switchtobodyfont[cmr]%
  PDF, \cap{PDF} a~{\sc pdf} \rlap{(Computer Modern Roman)}%
  \hfil
}%
\egroup

%you can see the difference. The command \type{\sc} shows the
%real small caps. The reason for using pseudo small caps
%instead of real small caps is just a matter of taste.
% VZ (2006-11-14)
m��eme vid�t z�eteln� rozd�l. P��kaz \type{\sc} vytv���
skute�n� kapit�lky (mus� existovat jako samostatn� font), zat�mco
pseudokapit�lky \type{\cap} jsou vytvo�eny geometrickou deformac�
verz�lek.

\section{Zv�razn�n�}

%\index{emphasized}
\index{zv�razn�n�}

\Command{\tex{em}}

%To emphasize words consistently throughout your document
%you use:
Pro jednotn� zv�razn�n� slov v~dokumentu pou��v�me p��kaz:

\starttyping
\em
\stoptyping

%Empasized words appear in a slanted style.
Zv�razn�n� slova se implicitn� vys�z� sklon�n�m stylem.

%\startbuffer
%If you walk through Hasselt you should {\bf \em watch out} for
%{\em Amsterdammers}. An {\em Amsterdammer} is {\bf \em not} a
%person from Amsterdam but a little stone pilar used to separate
%sidewalk and road. A pedestrian should be protected by these
%{\em Amsterdammers} against cars but more often people get hurt
%from tripping over them.
%\stopbuffer
\startbuffer
P�i proch�zce Hasseltem bychom m�li {\bf \em d�vat pozor}
na {\em Amsterodamy}. Slovem {\em Amsterodamy} {\bf \em nejsou}
m�n�ni obyvatel� Amsterodamu, ale mal� kamenn� pil��e,
odd�luj�c� chodn�k od silnice. Jsou zam��leny jako ochrana chodc� 
p�ed proj��d�j�c�mi auty, ale ve skute�nosti se lid� �ast�ji
zran�, kdy� o~n� zakopnou.
\stopbuffer

\typebuffer

\getbuffer

%{\em An emphasize within an emphasize is {\em normal} again
%and a boldface emphasize looks like {\bf this or \em this}}.
Pokud n�co dvakr�t zd�razn�me, vys�z� se to op�t nezd�razn�n�.

%\section{Teletype / verbatim}
\section{Strojopis alias re�im verbatim}

\index{verbatim}
\index{strojopis}
\index{font+neproporcion�ln�}

\Command{\tex{starttyping}}
\Command{\tex{type}}
\Command{\tex{setuptyping}}
\Command{\tex{setuptype}}

%If you want to display typed text and want to keep your
%line breaking exactly as it is you use:
Pokud si p�ejeme zobrazit text p�esn� tak, jak jsme ho uvedli
do vstupn�ho souboru, s~ukon�en�m ��dek p�esn� tam, 
kde jste pou�ili ENTER, pou�ijeme:

\shortsetup{starttyping}

%In the text you can use:
V~textu m��eme pou��t:

\shortsetup{type}

%The curly braces enclose the text you want in teletype.
%You have to be careful with \type{\type} because the
%line breaking mechanism does not work anymore.
Slo�en� z�vorky ohrani�uj� strojopisn� text. Sestavujme jej opatrn�,
proto�e v~n�m ji� nefunguje b�n� mechanismus zalamov�n� ��dk�.

%You can set up the `typing' with:
Nastaven� re�imu verbatim m��eme prov�d�t pomoc�:

\shortsetup{setuptyping}
\shortsetup{setuptype}

%\page

%\section{Encodings}
\section[sec:encodings]{K�dov�n� znak�}

\index{k�dov�n�+vstupn�}
\index{k�dov�n�+fontu}
\index{k�dov�n�+d�l�n� slov}
\index{typescript}

\Command{\tex{usetypescript}}
\Command{\tex{setupbodyfont}}
\Command{\tex{enableregime}}
\Command{\tex{showpatterns}}

Ka�d� font je p�ipraven v~jednom nebo v�ce k�dov�n�ch. P�i zaveden�
fontu pomoc� fontov�ch defini�n�ch tabulek, tzv. {\tt typescript�}, je
nutn� toto k�dov�n� specifikovat. Pro k�dov�n� \type{ec}, pou��van� v~Evrop�
nej�ast�ji, vypad� na�ten� p�sma Computer Modern takto:
 
\startbuffer
\usetypescript[modern][ec]
\setupbodyfont[modern,10pt,rm]
\stopbuffer
\typebuffer

Typ k�dov�n� fontu vol�me podle toho, v~jak�m k�dov�n� m�me vzory
d�len� slov v~pou�it�m jazyce. Toto k�dov�n� se dov�me zaps�n�m
\type{\showpatterns}, viz \in{tabulka}[tab:showpatterns].

\placetable[here][tab:showpatterns]
  {V�pis p��kazu \type{\showpatterns}.}
  {\showpatterns}

P��pravu fontu se spr�vn�m k�dov�n�m i~s~p�edgenerov�n�m typescript�
lze sv��it progr�mku \type{texfont}.

Pokud n� editor pracuje v~jin�m k�dov�n�, ne� je k�d fontu, pak je
nutn� text p�ek�dovat. O~to se postar� \CONTEXT, pokud vstupn� k�dov�n�
na�eho dokumentu uvedeme v~hranat� z�vorce p��kazu:

\shortsetup{enableregime}

%% Nej�ast�j��mi vstupn�mi k�dov�n�mi jsou
%% \startitemize[columns,three]
%%   \item \type{Latin1 (iso-8859-1)}
%%   \item \type{Latin5 (iso-8859-5)}
%%   \item \type{iso-8859-7}
%%   \item \type{viscii}

%%   \item \type{Latin2 (iso-8859-2)}
%%   \item \type{cp1251}
%%   \item \type{cp1253}
%%   \item \type{mac}

%%   \item \type{cp1250}
%%   \item \type{cyr}
%%   \item \type{grk}
%%   \item \type{UTF8}
%% \stopitemize

%% %This section is stil to be filled.
%% \startcolor[red]
%%   Tato sekce se teprve vyr�b�.
%% \stopcolor

\stopcomponent
