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

%\chapter[figures]{Figures}
\chapter[figures]{Obr�zky}

%\index{figure}
\index{obr�zek}
%\seeindex{picture}{figure}
%\index{floating blocks}
\index{plovouc� objekt}

\Command{\tex{placefigure}}
\Command{\tex{startfiguretext}}
\Command{\tex{setupfigures}}
\Command{\tex{startcombination}}
\Command{\tex{setupfloats}}
\Command{\tex{setupcaptions}}
\Command{\tex{externalfigure}}

%Photographs and pictures can be inserted in your document
%with the following command:
Obr�zky a~fotografie vlo��me do dokumentu n�sleduj�c�m p��kazem:

%\startbuffer
%\placefigure
%   [][fig:church]
%   {Stephanus Church.}
%   {\externalfigure[ma-cb-24][width=.4\textwidth]}
%\stopbuffer
\startbuffer
\placefigure
   [][obr:kostel]
   {Kostel sv.~�t�p�na}
   {\externalfigure[ma-cb-24][width=.4\textwidth]}
\stopbuffer

\typebuffer

%After processing this will come out as
%\in{figure}[fig:church] at the first available place.

Po zpracov�n� se na prvn� dostupn� m�sto vys�z�
\in{obr�zek}[obr:kostel]

\getbuffer

%The command \type{\placefigure} handles numbering and
%vertical spacing before and after your figure. Furthermore
%this command initializes a float mechanism, which means that
%\CONTEXT\ looks whether there is enough space for your
%figure on the page. If not the figure will be placed at
%another location and the text carries on, while the figure
%floats in your document until the optimal location is found.
%You can influence this mechanism within the first bracket
%pair.
P��kaz \type{\placefigure} se postar� o~��slov�n� a~vertik�ln�
odsazen� obr�zku. D�le tento p��kaz inicializuje mechanismus
um�st�n� plovouc�ch objekt�, co� znamen�, �e se \CONTEXT\ pod�v�,
zda je na dan� str�nce pro n� obr�zek dostatek m�sta. Pokud
nen�, bude obr�zek um�st�n na jin� vhodn� m�sto. V~takov�m p��pad�
bude text pokra�ovat a~obr�zek bude proplouvat na��m dokumentem,
dokud pro n�j nebude nalezeno optim�ln� um�st�n�. Tento mechanismus
m��eme ovliv�it parametrem v~prvn� dvojic� z�vorek.

%The command \type{\placefigure} is a predefined example of:
P��kaz \type{\placefigure} je p�eddefinovanou instanc�:

\shortsetup{placefloat}

%The options are described in \in{table}[tab:placefigure].
Zde pou�iteln� parametry jsou popsan� v~\in{tabulce}[tab:placefigure].

%\placetable
  %[here]
  %[tab:placefigure]
  %{Options in \type{\placefigure}.}
%\starttable[|l|l|]
%\HL
%\NC \bf Option \NC \bf Meaning                             \NC\SR
%\HL
%\NC here       \NC put figure at this location if possible \NC\FR
%\NC force      \NC force figure placement here             \NC\MR
%\NC page       \NC put figure on its own page              \NC\MR
%\NC top        \NC put the figure at the top of the page   \NC\MR
%\NC bottom     \NC put the figure at the botom of the page \NC\MR
%\NC left       \NC place figure at the left margin         \NC\MR
%\NC right      \NC place figure at the right margin        \NC\MR
%\NC margin     \NC place figure in the margin              \NC\LR
%\HL
%\stoptable


\placetable
  [here]
  [tab:placefigure]
  {Parametry v p��kazu \type{\placefigure}.}
\starttable[|l|l|]
\HL
\NC \bf Parametr \NC \bf Vysv�tlen�                \NC\SR
\HL
\NC here       \NC pokud je to mo�n�, um�sti obr�zek na toto m�sto \NC\FR
\NC force      \NC vynu� um�st�n� obr�zku na tomto m�st�           \NC\MR
\NC page       \NC um�sti obr�zek na zvl�tn� str�nku     \NC\MR
\NC top        \NC um�sti obr�zek k~horn�mu okraji str�nky \NC\MR
\NC bottom     \NC um�sti obr�zek k~doln�mu okraji str�nky \NC\MR
\NC left       \NC um�sti obr�zek k~lev�mu okraji         \NC\MR
\NC right      \NC um�sti obr�zek k~prav�mu okraji        \NC\MR
\NC margin     \NC um�sti obr�zek do margin�lie           \NC\LR
\HL
\stoptable

%The second bracket pair is used for cross-referencing. You can
%refer to this particular figure by typing:
Druh� p�r hranat�ch z�vorek je ur�en pro referen�n� jm�no odkazu. Na
konkr�tn� obr�zek se m��ete odk�zat p��kazem:

%\starttyping
%\in{figure}[fig:church]
%\stoptyping
\starttyping
\in{obr�zek}[obr:kostel]
\stoptyping

%The first brace pair is used for the caption. You can type
%any text you want. If you want no caption and no number, you
%can type \type{{none}}. The figure labels are set up with
%\type{\setupcaptions} and the numbering is (re)set by
%\type{\setupnumbering} (see \in{paragraph}[floatingblocks]).
Prvn� p�r slo�en�ch z�vorek tohoto p��kazu obsahuje popisek
obr�zku. M��eme tam napsat libovoln� text. Pokud si nep�ejeme ��dn�
popisek, ani ��slov�n�, m��eme pou��t \type{{none}}. Popisek 
je form�tov�n pomoc� \type{\setupcaptions} a~nastaven� (p��padn�
vynulov�n�) ��slov�n� se ��d� p��kazem \type{\setupnumbering}
(viz \in{sekce}[floatingblocks]).

%The second brace pair is used for defining the figure and
%addressing the file names of external figures.
Druh� p�r z�vorek je pro vlo�en� vlastn�ho obr�zku. Nej�ast�ji zde
uv�d�me p��kaz pro vlo�en� extern�ho souboru \type{\externalfigure},
viz n��e.

%In the next example you see how
%\inframed[height=1em]{Hasselt} is defined within the last
%brace pair to show you the function of \type{\placefigure{}{}}.
V~n�sleduj�c�m p��kladu vid�me pou�it� funkce
\type{\placefigure{}{}}. V�imn�me si obsahu druh� z�vorky, nutn� pro
vys�zen� \inframed[height=1em]{Hasselt}.

%\startbuffer
%\placefigure
%  {A framed Hasselt.}
%  {\framed{\tfd Hasselt}}
%\stopbuffer
\startbuffer
\placefigure
  {Or�movan� Hasselt}
  {\framed{\tfd Hasselt}}
\stopbuffer

\typebuffer

%This will produce:
Tento p��klad vys�z�:

\getbuffer

%However, your pictures are often created using programs like
%Corel Draw or Illustrator and photos are --- after scanning ---
%improved in packages like PhotoShop. Then the figures are
%available as files. \CONTEXT\ supports all types that are handled
%by the backend driver used. If you use \PDFTEX\ you can insert
%\type {JPG}, \type {PNG} and (pages from) \type {PDF} files as
%well as \METAPOST\ output (\type {MPS} files). Users normally can
%trust \CONTEXT\ to find the best possible file type.
Obr�zky nicm�n� �asto vytv���me v~programech jako Corel Draw
nebo Illustrator. Fotky -- po oskenov�n� -- se obvykle uprav�
v~\GIMP{}u nebo PhotoShopu. Po t�to pr�ci m�me obr�zky ve form�
soubor�. \CONTEXT\ podporuje v�echny form�ty soubor�, se kter�mi
um� nakl�dat ovlada� v~pozad� \CONTEXT u. Pokud pou��v�me \PDFTEX,
m��eme vkl�dat \type{JPG}, \type{PNG} a~jednotliv� str�nky ze 
soubor� \type{PDF} jako� i v�stup \METAPOST{}u, (soubory typu
\type{MPS}). U�ivatel� obvykle mohou \CONTEXT{}u d�v��ovat, �e nalezne
nejlep�� mo�n� form�t souboru.

%In \in{figure}[fig:canals] you see a photo and a graphic
%combined into one figure.
Na \in{obr�zku}[fig:canals] vid�me fotografii a vektorovou grafiku
kombinovanou do jednoho obr�zku.

%\startbuffer
%\placefigure
%  [here,force]
%  [fig:canals]
%  {The Hasselt Canals.}
%  {\startcombination[2*1]
%     {\externalfigure[ma-cb-03][width=.4\textwidth]}
%         {a bitmap picture}
     %{\externalfigure[gracht][width=.4\textwidth]}
%     {\externalfigure[ma-cb-00][width=.4\textwidth]}
%         {a vector graphic}
%   \stopcombination}
%\stopbuffer
\startbuffer
\placefigure
  [here,force]
  [fig:canals]
  {Hasseltsk� kan�ly.}
  {\startcombination[2*1]
     {\externalfigure[ma-cb-03][width=.4\textwidth]}
         {oskenovan� obr�zek}
     {\externalfigure[ma-cb-00][width=.4\textwidth]}
         {vektorov� grafika}
   \stopcombination}
\stopbuffer

\getbuffer

%You can produce this figure by typing something like:
Tento obr�zek m��eme vys�zet pomoc� k�du podobn�ho tomuto:

\typebuffer

%In this figure two pictures are combined with:
V~tomto jednom plovouc�m objektu jsou dva obr�zky kombinov�ny pomoc�:

\shortsetup{startcombination}

%The \type{\startcombination} $\cdots$
%\type{\stopcombination} pair is used for combining two
%pictures in one figure. You can type the number of pictures
%within the bracket pair. If you want to display one picture
%below the other you would have typed \type{[1*2]}. You can
%imagine what happens when you combine 6~pictures as
%\type{[3*2]} (\type{[rows*columns]}).
Dvojice p��kaz� \type{\startcombination} $\cdots$ \type{\stopcombination}
je u��v�na pro kombinaci dvou obr�zk� do jednoho plovouc�ho
objektu. Pomoc� hranat�ch z�vorek m��eme ovlivnit vys�zen� v�t��ho 
mno�stv� obr�zk�. Jeden obr�zek pod druh�m se vys�z� pomoc� 
\type{[1*2]}. M��eme si p�edstavit, co se stane, kdy� zkombinujeme
6~obr�zk� pomoc� \type{[3*2]} (\type{[��dky*sloupce]}).

%The examples shown above are enough for creating illustrated
%documents. Sometimes however you want a more integrated
%layout of the picture and the text. For that purpose
%you can use:
Uveden� p��klady jsou dosta�uj�c� pro vytv��en� 
ilustrovan�ch dokument�. Nicm�n� n�kdy je pot�eba 
v�ce ovlivnit uspo��d�n� obr�zku a~textu. Pro tento 
��el m��ete pou��t:

\shortsetup{startframedtext}

%Figure and table texts are already predefined:
M�sto slova framed m��eme pou��t d��ve definovan� r�movan�
objekt. Obr�zek (figure) a~tabulka (table) jsou ji� p�eddefinovan�,
jak je vid�t z~n�sleduj�c�ho p��kladu kombinuj�c�ho obr�zek s~textem.

%\startbuffer
%\startfiguretext
%  [left]
%  [fig:citizens]
%  {none}
%  {\externalfigure[ma-cb-18][width=.5\makeupwidth]}
%   Hasselt has always had a varying number of citizens due to
%   economic events. For example the Dedemsvaart was dug around
%   1810. This canal runs through Hasselt and therefore trade
%   flourished. This led to a population growth of almost 40\%
%   within 10~years. Nowadays the Dedemsvaart has no commercial
%   value anymore and the canals have become a tourist
%   attraction. But reminders of these prosperous times can be
%   found everywhere.
%\stopfiguretext
%\stopbuffer
\startbuffer
\startfiguretext
  [left]
  [fig:citizens]
  {none}
  {\externalfigure[ma-cb-18][width=.5\makeupwidth]}
  Po�et obyvatel Hasseltu se odjak�iva m�nil v~z�vislosti
  na ekonomick�ch podm�nk�ch. P��kladem m��e b�t kop�n�
  kan�lu Dedemsvaart kolem roku 1810. Proto�e vedl p��mo
  skrz Hasselt, obchod vzkv�tal. 
  To vedlo k r�stu populace o~t�m�� 40\,\% b�hem 10~let.
  V~sou�asnosti ji� Dedemsvaart nem� obchodn� v�znam;
  zdej�� kan�ly se staly turistickou atrakc�. Ale
  upom�nky na d��v�j�� �asy prosperuj�c�ho obchodu,
  mohou b�t vid�t v�ude.
\stopfiguretext
\stopbuffer

\typebuffer

%is shown in the figure below.
Po vys�zen� uvid�me:

\start
\setuptolerance[verytolerant]
\getbuffer
\stop

%% \shortsetup{externalfigure}

%% %The last curly brace pair encloses the command
%% %\type{\externalfigure}. This command gives you the freedom
%% %to do anything you want with a figure.
%% %\type{\externalfigure} has two bracket pairs. The first is
%% %used for the exact file name without extension, the second
%% %for file formats and dimensions. It is not difficult to
%% %guess what happens if you type:\footnote{See
%% %\at{page}[marginpicture]}.
Posledn� p�r slo�en�ch z�vorek v�t�inou obsahuje p��kaz
\type{\externalfigure}.

\shortsetup{externalfigure}

Tento p��kaz n�m d�v� svobodu vys�zet obr�zek jak�mkoliv zp�sobem 
si budeme p��t. \type{\externalfigure} obsahuje dva p�ry hranat�ch
z�vorek. Prvn� se u��v� pro p�esn� n�zev souboru bez
p��pony, druh� pro po�adovan� rozm�ry a~ev. form�t souboru.
Nen� obt��n� si p�edstavit co zp�sob� vys�zen� 
zdrojov�ho textu:\footnote{Viz \at{stranu}[marginpicture].}

\startbuffer[marginpicture]
\inmargin
  {\externalfigure
     [ma-cb-23]
     [width=\marginwidth]}
\stopbuffer

\typebuffer[marginpicture]

%You can set up the layout of figures with:
Um�st�n� a rozm�ry obr�zku m��eme ovlivnit pomoc�:

\shortsetup{setupfloats}

%You can set up the numbering and the labels with:
M��eme tak� nastavit ��slov�n� obr�zk� a~jejich popisek:

\shortsetup{setupcaptions}

%These commands are typed in the set up area of your input
%file and have a global effect on all floating blocks.
N�sleduj�c� p��kazy pat�� do deklara�n� oblasti vstupn�ho
souboru a maj� tedy vliv na v�echny plovouc� objekty.

%% \startbuffer
%% \setupfloats
%%   [location=right]
%% \setupcaptions
%%   [location=top,
%%    style=boldslanted]

%% \placefigure
%%   {A characteristic view on Hasselt.}
%%   {\externalfigure[ma-cb-12][width=8cm]}
%% \stopbuffer
\startbuffer
\setupfloats
  [location=right]
\setupcaptions
  [location=top,
   style=boldslanted]

\placefigure
  {Typick� obr�zek Hasseltu.}
  {\externalfigure[ma-cb-12][width=8cm]}
\stopbuffer

\typebuffer

{\getbuffer}%

\stopcomponent
