% Translation: 2006-08-26 Petr Tesarik
% Checking:    2006-11-09 zyka
\startcomponent ma-cb-cz-tabulations
\project ma-cb
\product ma-cb-cz
\environment ma-cb-env-cz

%% \chapter[tabulation]{Tabulation / Paragraph formatting}
\chapter[tabulation]{Tabelace / form�tov�n� odstavce}

%% \index{tabulation}
%% \index{tables+running text}
%% \index{columns}
\index{tabelace}
\index{tabulky+odstavcov� text}
\index{sloupce}

\Command{\tex{starttabulate}}
\Command{\tex{definetabulate}}
\Command{\tex{setuptabulate}}
\Command{\tex{NR}}
\Command{\tex{NC}}
\Command{\tex{startchemical}}

%% Sometimes you want to typeset paragraphs in a specific
%% formatted way. This is done with:
N�kdy chceme vys�zet odstavce zform�tovan� ur�it�m p�esn�
dan�m zp�sbem. Toho lze dos�hnout pomoc�:

\shortsetup{starttabulate}

%% The tabulation mechanism is closely related to the
%% table mechanism. You can use the tabulation mechanism
%% in cases you want to type set complete paragraphs within a
%% cell. The tabulation mechanism works fine at a page break.
Technika tabelace je �zce sv�z�na s~technikou tvorby tabulek.
Tabelaci lze vyu��t v~t�ch p��padech, kdy chcete do bu�ky
tabulky vys�zet kompletn� odstavec. Tabelace funguje dob�e
i p�i str�nkov�m zlomu.

%% \startbuffer
%% \starttabulate[|w(1.5cm)B|p(6.0cm)|p|]
%% \NC 1252
%%     \NC Hasselt obtains its city charter from bishop Hendrik
%%         van Vianden.
%%     \NC Hendrik van Vianden was pressed by other towns not
%%         to agree with the charter. It took Hasselt a long
%%         period of time to convince the Bishop. After
%%         supporting the Bishop in a small war against the
%%         Drents, the charter was released. \NC\NR
%% \NC 1350
%%     \NC Hasselt joins the Hanzepact to protect their
%%         international trade.
%%     \NC The Hanzepact was of great importance for merchants
%%         in Hasselt. In those days trading goods were taxed
%%         at every city, highway or rivercrossing. After
%%         joining the Hanzepact duty free routes all over
%%         Europe became available to Hasselt. However
%%         important the Hanzepact was, Hasselt always stayed a
%%         minor member of the pact. \NC\NR
%% \stoptabulate
%% \stopbuffer
\startbuffer
\starttabulate[|w(1cm)B|p(.4\textwidth)|p|]
\NC 1252
    \NC Hasselt z�sk�v� m�stsk� privilegia od biskupa Hendrika
        van Viandena.
    \NC Ostatn� m�sta na Hendrika van Viandena nal�hala,
        aby tato privilegia neschvaloval. Hasseltu trvalo
        dlouho, ne� biskupa p�esv�d�il. Pot�, co biskupovi
        poskytl pomoc v~konfliktu proti Drenthe, byla listina
        vyd�na. \NC\NR
\NC 1350
    \NC Hasselt se p�ipojuje k~Hanze, aby tak ochr�nil sv�j
        mezin�rodn� obchod.
    \NC Hanza m�la pro obchodn�ky v~Hasseltu velik� v�znam.
        Ze zbo�� se tehdy platilo clo v~ka�d�m m�st�,
        na ka�d� silnici nebo most�. Pot�, co se Hasselt
        stal �lenem Hanzy, byly mu k~dispozici nezpoplatn�n�
        cesty po cel� Evrop�. P�es tento velik� v�znam Hanzy
        z�stal Hasselt v�dy jej�m m�n� v�znamn�m �lenem. \NC\NR
\stoptabulate
\stopbuffer

%% A tabulate definition could look like this:
Definice tabelace vypad� n�jak takto:

\typebuffer

%% In this case the first column is 1.5 \Centi \Meter\ wide and
%% is type set bold (\type{B}). The second column has a width
%% of 6 \Centi \Meter\ and is type set like a paragraph. The
%% remaining horizontal space is used up by the last paragraph.
V~tomto p��pad� m� prvn� sloupec ���ku 1 \Centi \Meter\ a
je vys�zen tu�n�m �ezem (\type{B}). Druh� sloupec m� ���ku
40\,\% ���ky odstavce a~je vys�zen jako odstavec. Zb�vaj�c�
horizont�ln� m�sto je vyu�ito posledn�m odstavcem.

%% The example is typeset like this:
Uveden� p��klad se vys�z� takto:

\getbuffer

%% Like in the table mechanism a number of formatting commands
%% and keys are used. A list of these commands and keys are
%% shown in \in{table}[tab:tabularformattingcommands].
Stejn� jako v~tabulk�ch i zde je k~dispozici mnoho form�tovac�ch
povel� a parametr�. Jejich seznam je uveden
v~\in{tabulce}[tab:tabularformattingcommands].

%% \placetable[][tab:tabularformattingcommands]
%%   {Tabular commands.}
%% \starttable[|lT|l|lT|l|]
%% \NC l                 \NC left align
%% \NC I                 \NC \it italic
%% \NC \FR
%% \NC c                 \NC center
%% \NC R                 \NC \sl roman
%% \NC \MR
%% \NC r                 \NC right align
%% \NC S                 \NC \sl slanted
%% \NC \MR
%% \NC i\sl n            \NC spacing left
%% \NC T                 \NC \tt teletype
%% \NC \MR
%% \NC j\sl n            \NC spacing right
%% \NC m                 \NC in||line math
%% \NC \MR
%% \NC k\sl n            \NC spacing around
%% \NC M                 \NC display  math
%% \NC \MR
%% \NC w({\sl d})        \NC 1 line,   fixed width
%% \NC f\tex{command}    \NC font specification
%% \NC \MR
%% \NC p({\sl d})        \NC paragraph, fixed width
%% \NC b\arg{..}         \NC place \type{..} before the entry
%% \NC \MR
%% \NC p                 \NC paragraph, maximum width
%% \NC a\arg{..}         \NC place \type{..} after the entry
%% \NC \MR
%% \NC B                 \NC \bf boldface
%% \NC h\tex{command}    \NC apply \tex{command} on the entry
%% \NC \LR
%% \stoptable
\placetable[][tab:tabularformattingcommands]
  {Povely pro tabelaci.}
\starttable[|lT|l|lT|l|]
\NC l                 \NC zarovn�n� vlevo
\NC I~\NC \it italika
\NC \FR
\NC c                 \NC zarovn�n� na st�ed
\NC R                 \NC \rm antikva
\NC \MR
\NC r                 \NC zarovn�n� vpravo
\NC S~\NC \sl sklon�n�
\NC \MR
\NC i\sl n            \NC odsazen� vlevo
\NC T                 \NC \tt psac� stroj
\NC \MR
\NC j\sl n            \NC odsazen� vpravo
\NC m                 \NC vnit�n� matematick� m�d
\NC \MR
\NC k\sl n            \NC mezera okolo
\NC M                 \NC display matematick� m�d
\NC \MR
\NC w({\sl d})        \NC 1 ��dka,   pevn� ���ka
\NC f\tex{command}    \NC ur�en� �ezu p�sma
\NC \MR
\NC p({\sl d})        \NC odstavec, pevn� ���ka
\NC b\arg{..}         \NC um�stit \type{..} p�ed polo�ku
\NC \MR
\NC p                 \NC odstavec, maxim�ln� ���ka
\NC a\arg{..}         \NC um�stit \type{..} za polo�ku
\NC \MR
\NC B                 \NC \bf tu�n� �ez
\NC h\tex{command}    \NC aplikovat na polo�ku \tex{command}
\NC \LR
\stoptable

%% Another example of paragraph formatting could look like this.
Jin� p��klad form�tov�n� odstavce by mohl vypadat takto:

%% \startbuffer
%% \definetabulate[ChemPar][|l|p|l|]

%% \startChemPar
%% \NC Limekilns
%%     \NC Hasselt has its own limekilns. These were build in 1504
%%         and produced quick lime up to 1956. Nowadays they are a
%%         tourist attraction.
%%     \NC \chemical{CaCO_3,~,GIVES,~,CaO,~,+,~,CO_2} \NC\NR
%% \stopChemPar
%% \stopbuffer
\startbuffer
\definetabulate[ChemOdstavec][|l|p|l|]

\startChemOdstavec
\NC V�penky
    \NC Hasselt ma sv� vlastn� v�penky, kter� byly vystav�ny
        v~roce 1504 a p�len� v�pno se v~nich vyr�b�lo a� do
        roku 1956. Dnes slou�� jako turistick� atrakce.
    \NC \chemical{CaCO_3,~,GIVES,~,CaO,~,+,~,CO_2} \NC\NR
\stopChemOdstavec
\stopbuffer

\typebuffer

%% And it would come out like this:
Vys�z� se to n�sledovn�:

\getbuffer

%% The chemical module is explained in another manual, because
%% not everybody is interested in chemical stuff.
Modul pro chemickou sazbu je vysv�tlen v~jin�m manu�lu, proto�e
ne ka�d� se zaj�m� o~chemii.

%% Here we also introduced the command to define the paragraph
%% layout.
Tak� jsme zde uvedli povel pro definici tabela�n�ho schematu
\type{ChemOdstavec}

\shortsetup{definetabulate}

%% and we also have:
a existuje tak�:

\shortsetup{setuptabulate}

\stopcomponent
