Skip to content
Snippets Groups Projects
Commit 14fbfdf3 authored by Martin Mareš's avatar Martin Mareš
Browse files

Aktualizace adsmac podle Průvodce v2

parent ef5d235f
Branches
No related tags found
No related merge requests found
% TeX macros for typesetting of the ADS book % (c) 2007--2022 Martin Mareš <mj@ucw.cz>
% (c) 2007--2019 Martin Mares <mj@ucw.cz>
% (c) 2014 Tomas Valla <tom@ucw.cz> % (c) 2014 Tomas Valla <tom@ucw.cz>
% Inicializace luaTeXu, aby umel hledat bitmapove fonty % Inicializace luaTeXu, aby umel hledat bitmapove fonty
...@@ -8,9 +7,10 @@ ...@@ -8,9 +7,10 @@
\input ltluatex.tex \input ltluatex.tex
\input luatex85.sty \input luatex85.sty
\input ucwmac2.tex \input ucwmac2.tex
\input ucw-paper.tex \ucwmodule{paper}
\ucwmodule{verb}
\ucwmodule{ref}
\input lua-ofs.tex \input lua-ofs.tex
\input ucw-verb.tex
\input amssym.tex \input amssym.tex
\input pdf-trans.tex \input pdf-trans.tex
...@@ -31,8 +31,6 @@ ...@@ -31,8 +31,6 @@
% některá makra) % některá makra)
% \modemobi E-book v MOBI (navíc k předchozímu módu) % \modemobi E-book v MOBI (navíc k předchozímu módu)
\let\modeafive=\relax
\newif\ifebook \newif\ifebook
\newif\ifmobi \newif\ifmobi
\newif\ifprint \newif\ifprint
...@@ -88,6 +86,8 @@ ...@@ -88,6 +86,8 @@
\medskipamount=8bp plus 1pt minus 1pt \medskipamount=8bp plus 1pt minus 1pt
\smallskipamount=2bp plus 1pt minus 0.5pt \smallskipamount=2bp plus 1pt minus 0.5pt
\preitemizepenalty=0
\postitemizepenalty=0
\preitemizeskip=0pt \preitemizeskip=0pt
\postitemizeskip=0pt \postitemizeskip=0pt
\interitemskip=\medskipamount \interitemskip=\medskipamount
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
\lefthyphenmin=2 \lefthyphenmin=2
\righthyphenmin=2 \righthyphenmin=2
\automatichyphenmode=2 \automatichyphenmode=2
\hyphenation{Quick-sort hay-stack} \hyphenation{Quick-sort Quick-sor-tu nej-men-ší-ho aby-chom}
%%% Drobnosti %%% %%% Drobnosti %%%
...@@ -158,7 +158,6 @@ ...@@ -158,7 +158,6 @@
% Kaligraficka pismenka % Kaligraficka pismenka
\protected\def\Bb{{\cal B}} \protected\def\Bb{{\cal B}}
\protected\def\Cc{{\cal C}} \protected\def\Cc{{\cal C}}
\protected\def\Uu{{\cal U}}
% Booleovské operace % Booleovské operace
\def\NOT{\cscop{not}} \def\NOT{\cscop{not}}
...@@ -183,17 +182,10 @@ ...@@ -183,17 +182,10 @@
% Transpozice matice % Transpozice matice
\def\T{^{\rm T}} \def\T{^{\rm T}}
% Otočení řetězce
\def\rev{^{\rm R}}
% Rozšířená přechodová funkce
\def\dstar{\delta^*}
% Svislá čárka jako normální operátor (\mid je relační)
\def\alt{\mathop{\mid}}
% Slozitostni tridy % Slozitostni tridy
\protected\def\cc#1{\hbox{\setfonts[LMSans/]\rm #1}} \protected\def\cc#1{\hbox{\setfonts[LMSans/]\rm #1}}
\def\P{\cc{P}}
\def\NP{\cc{NP}}
% Viceznakove identifikatory (funguji jak v textovem, tak matematickem modu) % Viceznakove identifikatory (funguji jak v textovem, tak matematickem modu)
\def\<#1>{\ifmmode\mathchoice \def\<#1>{\ifmmode\mathchoice
...@@ -218,8 +210,8 @@ ...@@ -218,8 +210,8 @@
% ... pokud je za displayed math: % ... pokud je za displayed math:
\def\qedmath{\vskip-\baselineskip\rightline{$\square$}} \def\qedmath{\vskip-\baselineskip\rightline{$\square$}}
% Bit slice % Velmi vhodné místo k lomu stránky (silnější verze \filbreak)
\def\slice#1{\!\left<#1\right>} \def\xfilbreak{\par\vfil\penalty-1000\vfilneg}
% Poznamky pod carou % Poznamky pod carou
\newcount\footcnt \newcount\footcnt
...@@ -251,12 +243,19 @@ ...@@ -251,12 +243,19 @@
% Alias pro rovnítko, když ho potřebujeme použít v rejstříkovém hesle % Alias pro rovnítko, když ho potřebujeme použít v rejstříkovém hesle
\protected\def\equals{=} \protected\def\equals{=}
% Odrážka "(x)" pro \numlist
\def\nparenp{(\nnorm)}
% Break radku % Break radku
\def\\{\hfil\break} \def\\{\hfil\break}
% Značka pro stupeň % Značka pro stupeň
\def\degree{^\circ} \def\degree{^\circ}
% Stupeň vrcholu
\def\degin{\deg^{\rm in}}
\def\degout{\deg^{\rm out}}
% Rozdělitelná pomlčka (pozor, v algoritmech se \= předefinuje na přiřadítko) % Rozdělitelná pomlčka (pozor, v algoritmech se \= předefinuje na přiřadítko)
% Taktéž pozor, že explicitní pomlčky (ať už "-" nebo "\=") potlačují implicitní dělení slov. % Taktéž pozor, že explicitní pomlčky (ať už "-" nebo "\=") potlačují implicitní dělení slov.
\def\={\discretionary{-}{-}{-}} \def\={\discretionary{-}{-}{-}}
...@@ -275,31 +274,10 @@ ...@@ -275,31 +274,10 @@
\def\9{\|9|} \def\9{\|9|}
\def\sp{\hbox{\tentt\char32}} \def\sp{\hbox{\tentt\char32}}
% Gramatiky
\def\grule{\rightarrow}
\def\grev{\Relbar\shortjoinrel\Rightarrow}
\def\grew{\mathrel{\ooalign{\hfil\raise 5pt\hbox{$\scriptstyle *$}\hskip 2pt\hfil\cr\hfil$\grev$\hfil\cr}}}
\def\shortjoinrel{\mathrel{\mkern-7mu}}
% Chomského hierarchie
\def\Ell{{\cal L}}
% Kódování dvojic
\def\pair#1#2{\left<#1,#2\right>}
% Předefinujeme vlnovku, aby byla \protected % Předefinujeme vlnovku, aby byla \protected
\let\plaintilde=~ \let\plaintilde=~
\protected\def~{\plaintilde} \protected\def~{\plaintilde}
% Tabulka operací datové struktury
\def\optable#1{$$
\def\cr{\crcr\noalign{\smallskip}}
\vbox{\halign{
\hbox to 9em{##\hfil}&\vtop{\hsize=0.65\hsize\parindent=0pt\strut ##\unskip\strut}\crcr
#1
\noalign{\vskip-\smallskipamount}
}}$$}
%%% Fonty %%% %%% Fonty %%%
\def\chapfont{\setfonts[LMSansDC/24]} \def\chapfont{\setfonts[LMSansDC/24]}
...@@ -311,29 +289,6 @@ ...@@ -311,29 +289,6 @@
\protected\def\captionfont{\setfonts[LMSans/9]\setmath[//]\fixsetmath\baselineskip=11bp} \protected\def\captionfont{\setfonts[LMSans/9]\setmath[//]\fixsetmath\baselineskip=11bp}
%%% Nepovinné argumenty %%%
% Provedeme-li \def\a{\withoptarg\b}, chová se makro \a takto:
% \a[arg] provede \def\optarg{arg} a expanduje \b
% \a provede \let\optarg=\relax a expanduje \b
\def\withoptarg#1{\let\xoptcall=#1\futurelet\next\xopt}
\def\xopt{\ifx\next[\expandafter\xoptwith\else\let\optarg=\relax\expandafter\xoptcall\fi}
\def\xoptwith[#1]{\def\optarg{#1}\xoptcall}
% Zkratka pro definici maker s nepovinnými argumenty:
% \optdef\makro se chová jako \def\domakro, přičemž \makro samotné je definováno
% jako wrapper volající \domakro pomocí \withoptarg.
\def\optdef#1{%
\edef\xoptname{\expandafter\eatbackslash\string#1}%
\edef#1{\noexpand\withoptarg\csname do\xoptname\endcsname}%
\expandafter\def\csname do\xoptname\endcsname
}
% Trik: \eatbackslash smaže následující backslash kategorie 12
\begingroup\lccode`\+=`\\
\lowercase{\endgroup\def\eatbackslash+{}}
\def\optargorempty{\ifx\optarg\relax\else\optarg\fi}
%%% Sazba algoritmu %%% %%% Sazba algoritmu %%%
...@@ -358,8 +313,8 @@ ...@@ -358,8 +313,8 @@
\itemcount=0 \itemcount=0
} }
\def\typedalgo#1#2{\algoinit {\bo #1\/} \alg{#2}} \def\typedalgo#1#2{\algoinit {\bo #1\/} \alg{#2}}
\def\algo#1{\typedalgo{Algorithm}{#1}\if"#1"\else\rr{algorithm/\alg{#1}}\fi} \def\algo#1{\typedalgo{Algoritmus}{#1}\if"#1"\else\rr{algoritmus/\alg{#1}}\fi}
\def\proc#1{\typedalgo{Procedure}{#1}\if"#1"\else\rr{procedure/\alg{#1}}\fi} \def\proc#1{\typedalgo{Procedura}{#1}\if"#1"\else\rr{procedura/\alg{#1}}\fi}
\def\headlessalgo{\algoinit} \def\headlessalgo{\algoinit}
\def\endalgo{\goodbreak\endlist\endgroup} \def\endalgo{\goodbreak\endlist\endgroup}
\let\endproc=\endalgo \let\endproc=\endalgo
...@@ -385,9 +340,6 @@ ...@@ -385,9 +340,6 @@
% Jmeno algoritmu v textu nebo ve formuli % Jmeno algoritmu v textu nebo ve formuli
\protected\def\alg#1{\leavevmode\hbox{\csc #1}} \protected\def\alg#1{\leavevmode\hbox{\csc #1}}
% Jmena operaci datovych struktur sazime stejne jako jmena algoritmu
\let\op=\alg
%%% Konstrukce pouzivane v algoritmech %%% %%% Konstrukce pouzivane v algoritmech %%%
% Komentar % Komentar
...@@ -466,37 +418,58 @@ ...@@ -466,37 +418,58 @@
\optdef\chapter#1{ \optdef\chapter#1{
\advance\chapcount by 1 \advance\chapcount by 1
\def\chaptername{#1} \def\chaptername{#1}
\separatorpage{\the\chapcount~#1} \separatorpage{\chapnumber~#1}
\seccount=0
\figcount=0
\ifebook\else\footcnt=0\fi
\addid{ch}{\chapnumber}
\addtoc\tocchapter{\chapnumber}{}{#1}
\chapterheading{\chapnumber~~#1}
\def\currentchapter{\chapnumber}
\mark{\currentchapter~#1}
\bigskip
\unparskip
}
\optdef\appendix#1{
\ifnum\chapcount<50 \chapcount=50\fi
\advance\chapcount by 1
\def\chaptername{#1}
\separatorpage{Dodatek \chapnumber\hfil\break #1}
\seccount=0 \seccount=0
\figcount=0 \figcount=0
\ifebook\else\footcnt=0\fi \ifebook\else\footcnt=0\fi
\addid{ch}{\the\chapcount} \addid{ch}{\chapnumber}
\addtoc\tocchapter{\the\chapcount}{}{#1} \addtoc\tocchapter{\chapnumber}{}{#1}
\chapterheading{\the\chapcount~~#1} \chapterheading{\chapnumber~~#1}
\def\currentchapter{\the\chapcount} \def\currentchapter{\chapnumber}
\mark{\currentchapter~#1} \mark{\currentchapter~#1}
\bigskip \bigskip
\unparskip \unparskip
} }
\def\chapnumber{\ifnum\chapcount < 50 \the\chapcount\else A\fi}
\optdef\section#1{ \optdef\section#1{
\goodbreak\bigskip\bigskip \goodbreak\bigskip\bigskip
\advance\seccount by 1 \advance\seccount by 1
\addid{sec}{\the\chapcount.\the\seccount} \addid{sec}{\chapnumber.\secnumber}
\addtoc\tocsection{\the\chapcount.\the\seccount}{}{#1} \addtoc\tocsection{\chapnumber.\secnumber}{}{#1}
\sectionheading{\the\chapcount.\the\seccount~~#1} \sectionheading{\chapnumber.\secnumber~~#1}
\def\currentchapter{\the\chapcount.\the\seccount} \def\currentchapter{\chapnumber.\secnumber}
\mark{\currentchapter~~\chaptername~--~#1} \mark{\currentchapter~~\chaptername~--~#1}
\nobreak\bigskip\unparskip\nobreak \nobreak\bigskip\unparskip\nobreak
} }
\def\secnumber{\the\seccount}
\optdef\sectionstar#1{ \optdef\sectionstar#1{
\goodbreak\bigskip\bigskip \goodbreak\bigskip\bigskip
\advance\seccount by 1 \advance\seccount by 1
\addid{sec}{\the\chapcount.\the\seccount} \addid{sec}{\chapnumber.\secnumber}
\addtoc\tocsection{\the\chapcount.\the\seccount}{*}{#1} \addtoc\tocsection{\chapnumber.\secnumber}{*}{#1}
\sectionheading{\the\chapcount.\the\seccount\kern1pt*~~#1} \sectionheading{\chapnumber.\secnumber\kern1pt*~~#1}
\def\currentchapter{\the\chapcount.\the\seccount} \def\currentchapter{\chapnumber.\secnumber}
\mark{\currentchapter\kern1pt*~~\chaptername~--~#1} \mark{\currentchapter\kern1pt*~~\chaptername~--~#1}
\nobreak\bigskip\unparskip\nobreak \nobreak\bigskip\unparskip\nobreak
} }
...@@ -515,11 +488,13 @@ ...@@ -515,11 +488,13 @@
\def\sectionheading#1{\leftline{\secfont #1}} \def\sectionheading#1{\leftline{\secfont #1}}
\def\subsectionheading#1{\leftline{\subsecfont #1}} \def\subsectionheading#1{\leftline{\subsecfont #1}}
\def\endchapter{
\let\doendchapter=\relax
\ifsinglechapter \ifsinglechapter
\def\endchapter{\csname bye\endcsname} % Avoid problems with \outer \slet{doendchapter}{bye} % Avoid problems with \outer
\else
\let\endchapter\relax
\fi \fi
\doendchapter
}
%%% Cviceni %%% %%% Cviceni %%%
...@@ -536,12 +511,23 @@ ...@@ -536,12 +511,23 @@
\def\endexercises{\endgroup} \def\endexercises{\endgroup}
\def\exnumber{\chapnumber.\secnumber.\the\excount}
\long\def\exwith#1#2{\par \long\def\exwith#1#2{\par
\advance\excount by 1 \advance\excount by 1
\addid{ex}{\the\chapcount.\the\seccount.\the\excount} \addid{ex}{\exnumber}
{\exnumber{#1}#2\par}} {
\exitem{#1}#2
\ifcsname hidx-\exnumber\endcsname
\unskip
\edef\currenthidx{\csname hidx-\exnumber\endcsname}
\parfillskip=0pt\allowbreak\hfill\nobreak {[\ref{hint}{\currenthidx}]}
\fi
\par
}
}
\def\exnumber#1{\>\llap{\hbox to 2.2em{\the\excount\rlap{\kern1pt #1}.\hfil}}} \def\exitem#1{\>\llap{\hbox to 2.2em{\the\excount\rlap{\kern1pt #1}.\hfil}}}
% Cviceni obycejne a tezsi % Cviceni obycejne a tezsi
\optdef\ex{\exwith{}} \optdef\ex{\exwith{}}
...@@ -562,59 +548,22 @@ ...@@ -562,59 +548,22 @@
\long\def\solution##1{\par \>\em{Solution:} ##1} \long\def\solution##1{\par \>\em{Solution:} ##1}
} }
\def\furtherexercises{\section{Further exercises}\initexercises} \def\furtherexercises{\section{Další cvičení}\initexercises}
\def\excmt#1{{\leftskip=0pt\parindent=\normalparindent #1\smallskip}} \def\excmt#1{{\leftskip=0pt\parindent=\normalparindent #1\smallskip}}
%%% Odkazy na kapitoly a jine objekty %%% %%% Odkazy na kapitoly a jiné objekty pomocí ucw-link %%%
% Název aktuálního souboru (v PDF verzi vždy prázdný, v E-bookové se mění)
\def\currentfile{}
% Poridime si soubor, do ktereho budeme zapisovat identifikatory
\newwrite\ids
\def\writeid#1#2{\immediate\write\ids{\string\iddef{#1}{#2}{\currentfile}}}
\def\delayedwriteid#1#2{\write\ids{\string\iddef{#1}{#2}{\currentfile}}}
\def\iddef#1#2#3{\ifcsname id#1\endcsname\immediate\write16{*** Warning: Reference #1 re-defined ***}\else \ifprint
\expandafter\def\csname id#1\endcsname{#2}% \clickablefalse
\expandafter\def\csname ff#1\endcsname{#3}%
\fi}
\immediate\openin\ids=ids.aux
\ifeof\ids
\else
\input ids.aux
\fi
\immediate\closein\ids
\immediate\openout\ids=ids.aux
% Nízkoúrovňové rozhraní na sazbu odkazů: vysází klikací odkaz na identifikátor #1,
% jeho obsah přechroustá makrem #2 (obvykle buď \relax, nebo \relativizeref)
\def\reflink#1#2{\expandafter\ifx\csname id#1\endcsname\relax
{\bo ??}%
\immediate\write16{*** Warning: Reference #1 undefined ***}%
\else
\ifprint\else
\pdfextension startlink\commonlinkargs goto name {#1}\relax
\fi
#2{\csname id#1\endcsname}%
\ifprint\else
\pdfextension endlink\relax
\fi
\fi \fi
}
\pdfvariable linkmargin=1pt
\def\commonlinkargs{height 8pt depth 2pt attr {/C [0 0 0.5] /Border [0 0 2]}}
\def\ref#1{\reflink{#1}\relax} \def\relref#1#2{\reflink{#1}{#2}\relativizeref}
\def\relref#1{\reflink{#1}\relativizeref}
\def\relativizeref#1{{% \def\relativizeref#1{{%
\edef\xx{#1}% \edef\xx{#1}%
\edef\xcs{\expandafter\splitab\xx.}% \edef\xcs{\expandafter\splitab\xx.}%
\edef\thiscs{\the\chapcount.\the\seccount}% \edef\thiscs{\chapnumber.\secnumber}%
\ifx\xcs\thiscs\expandafter\splitc\xx.\else\xx\fi \ifx\xcs\thiscs\expandafter\splitc\xx.\else\xx\fi
}} }}
...@@ -622,46 +571,15 @@ ...@@ -622,46 +571,15 @@
\def\splitab#1.#2.#3.{#1.#2} \def\splitab#1.#2.#3.{#1.#2}
\def\splitc#1.#2.#3.{#3} \def\splitc#1.#2.#3.{#3}
% Pojmenovavani objektu: vola se z maker s nepovinnym argumentem
% jako \addid{prefix identifikatoru}{cislo objektu}
% Nastavuje \currentid buď na ID s prefixem, nebo na \relax
\def\addid#1#2{%
\ifx\optarg\relax
\let\currentid\relax
\else
\edef\currentid{#1\optarg}%
\writeid{\currentid}{#2}%
\ifprint\else
\pdfextension dest name {\currentid} xyz\relax
\fi
\fi
}
% Pojmenovani stranky
\def\pageid#1{\delayedwriteid{page#1}{\the\count0}\ifprint\else\pdfextension dest name {page#1} fit\relax\fi}
% Odkazovani na objekty % Odkazovani na objekty
\def\chapref#1{\ref{ch#1}} \def\chapref{\ref{ch}}
\def\secref#1{\ref{sec#1}} \def\secref{\ref{sec}}
\def\exref#1{\relref{ex#1}} \def\exref{\relref{ex}}
\def\itemref#1{\ref{item#1}} \def\itemref{\ref{item}}
\def\figref#1{\ref{fig#1}} \def\figref{\ref{fig}}
\def\pageref#1{\ref{page#1}}
% Skok na zadané číslo stránky (používá se u odkazů z obsahu a rejstříku, kde čísla stránek známe) % Skok na zadané číslo stránky (používá se u odkazů z obsahu a rejstříku, kde čísla stránek známe)
\def\pagelink#1{\ifprint#1\else\pdfextension startlink\commonlinkargs goto page #1 {/Fit}\relax #1\pdfextension endlink\fi} \def\pagelink#1{\linkpage{#1}{#1}}
% Klikací URL (jestli je budeme používat víc, bylo by hezké umět je zadávat bez escapování speciálnich znaků)
\def\url#1{%
\ifprint\else
\pdfextension startlink\commonlinkargs user {/Subtype/Link /A << /Type/Action /S/URI /URI(#1) >>}\relax
\fi
\xurl #1^^X%
\ifprint\else
\pdfextension endlink\relax
\fi
}
\def\xurl#1:#2#3^^X{{\I #1:#2\ifx#2/\kern-0.1em\fi#3}}
%%% Obrazky %%% %%% Obrazky %%%
...@@ -720,8 +638,8 @@ ...@@ -720,8 +638,8 @@
}} }}
% Popisek obrazku % Popisek obrazku
\def\figcaption#1{\captionfont Obrázek \the\chapcount.\the\figcount: #1} \def\figcaption#1{\captionfont Obrázek \chapnumber.\the\figcount: #1}
\def\newfig{\global\advance\figcount by 1\relax\addid{fig}{\the\chapcount.\the\figcount}} \def\newfig{\global\advance\figcount by 1\relax\addid{fig}{\chapnumber.\the\figcount}}
% Obrazek: \figure{soubor.epdf}{velikost}{popisek} % Obrazek: \figure{soubor.epdf}{velikost}{popisek}
\optdef\figure#1#2#3{\newfig\float{\rawfigure{#1}{#2}}{\figcaption{#3}}{\optargorempty}} \optdef\figure#1#2#3{\newfig\float{\rawfigure{#1}{#2}}{\figcaption{#3}}{\optargorempty}}
...@@ -766,19 +684,17 @@ ...@@ -766,19 +684,17 @@
\def\lemman#1{\s{Lemma (#1):} \sbody} \def\lemman#1{\s{Lemma (#1):} \sbody}
\def\lemmax#1{\s{Lemma~#1:} \sbody} \def\lemmax#1{\s{Lemma~#1:} \sbody}
\def\lemmaxn#1#2{\s{Lemma~#1 (#2):} \sbody} \def\lemmaxn#1#2{\s{Lemma~#1 (#2):} \sbody}
\def\proof{\noindent\em{Důkaz:} } \def\proof{\noindent\em{\kern-0.5pt Důkaz:} }
\def\proofofthm{\noindent\em{Důkaz věty:} } \def\proofofthm{\noindent\em{\kern-0.5pt Důkaz věty:} }
\def\proofoflemma{\noindent\em{Důkaz lemmatu:} } \def\proofoflemma{\noindent\em{\kern-0.5pt Důkaz lemmatu:} }
\def\proofsketch{\noindent\em{Náčrt důkazu:} } \def\proofsketch{\noindent\em{Náznak důkazu:} }
\def\proofidea{\noindent\em{Myšlenka důkazu:} }
\def\defn{\s{Definice:} \sbody} \def\defn{\s{Definice:} \sbody}
\def\obs{\s{Pozorování:} \sbody} \def\obs{\s{Pozorování:} \sbody}
\def\note{\s{Poznámka:} \sbody} \def\rem{\s{Poznámka:} \sbody}
\def\noten#1{\s{Poznámka (#1):} \sbody} \def\remn#1{\s{Poznámka (#1):} \sbody}
\def\cor{\s{Důsledek:} \sbody} \def\corr{\s{Důsledek:} \sbody}
\def\corn#1{\s{Důsledek (#1):} \sbody} \def\nota{\s{Značení:} \sbody}
\def\corx#1{\s{Důsledek #1:} \sbody}
\def\corxn#1#2{\s{Důsledek~#1 (#2):} \sbody}
\def\nota{\s{Notace:} \sbody}
\def\example{\s{Příklad:} \sbody} \def\example{\s{Příklad:} \sbody}
\def\examplen#1{\s{Příklad (#1):} \sbody} \def\examplen#1{\s{Příklad (#1):} \sbody}
\def\examples{\s{Příklady:} \sbody} \def\examples{\s{Příklady:} \sbody}
...@@ -830,7 +746,7 @@ ...@@ -830,7 +746,7 @@
\def\dfr#1#2{\rr{#2}\em{#1}} \def\dfr#1#2{\rr{#2}\em{#1}}
% Definice operace datové struktury % Definice operace datové struktury
\def\opdf#1{\rr{operace/#1=operace/\op{#1}}\op{#1}} \def\opdf#1{\rr{operace/#1=operace/\alg{#1}}\alg{#1}}
% Zápis do souboru % Zápis do souboru
\newwrite\idxfile \newwrite\idxfile
...@@ -856,7 +772,7 @@ ...@@ -856,7 +772,7 @@
\parindent=0pt \parindent=0pt
\leavevmode \leavevmode
\vrule width 0pt height 6pt depth 2pt \vrule width 0pt height 6pt depth 2pt
\setfonts[/7]\baselineskip=8pt \setfonts[/7]\setmath[//]\baselineskip=8pt
\tt #1\par \tt #1\par
\allowbreak \allowbreak
}} }}
...@@ -954,8 +870,8 @@ ...@@ -954,8 +870,8 @@
% Rozměry zrcadla % Rozměry zrcadla
\dimen1=\leftmargin % bot-left x \dimen1=\leftmargin % bot-left x
\dimen2=\bottommargin % bot-left y \dimen2=\bottommargin % bot-left y
\dimen3=\dimexpr\pagewidth-\leftmargin-\rightmargin\relax % width \dimen3=\dimexpr\luatexpagewidth-\leftmargin-\rightmargin\relax % width
\dimen4=\dimexpr\pageheight-\topmargin-\bottommargin\relax % height \dimen4=\dimexpr\luatexpageheight-\topmargin-\bottommargin\relax % height
\ifodd\pageno\else\advance\dimen1 by \evenpageshift\fi \ifodd\pageno\else\advance\dimen1 by \evenpageshift\fi
\ifcropmarks \ifcropmarks
\advance\dimen1 by \cropmargin \advance\dimen1 by \cropmargin
...@@ -979,14 +895,14 @@ ...@@ -979,14 +895,14 @@
0 \tobp{\cropmargin} m \tobp{\dimexpr\cropmargin-\cropgap\relax} \tobp{\cropmargin} l S 0 \tobp{\cropmargin} m \tobp{\dimexpr\cropmargin-\cropgap\relax} \tobp{\cropmargin} l S
\tobp{\cropmargin} 0 m \tobp{\cropmargin} \tobp{\dimexpr\cropmargin-\cropgap\relax} l S \tobp{\cropmargin} 0 m \tobp{\cropmargin} \tobp{\dimexpr\cropmargin-\cropgap\relax} l S
% Bottom right % Bottom right
\tobp{\pagewidth} \tobp{\cropmargin} m \tobp{\dimexpr\pagewidth-\cropmargin+\cropgap\relax} \tobp{\cropmargin} l S \tobp{\luatexpagewidth} \tobp{\cropmargin} m \tobp{\dimexpr\luatexpagewidth-\cropmargin+\cropgap\relax} \tobp{\cropmargin} l S
\tobp{\dimexpr\pagewidth-\cropmargin\relax} 0 m \tobp{\dimexpr\pagewidth-\cropmargin\relax} \tobp{\dimexpr\cropmargin-\cropgap\relax} l S \tobp{\dimexpr\luatexpagewidth-\cropmargin\relax} 0 m \tobp{\dimexpr\luatexpagewidth-\cropmargin\relax} \tobp{\dimexpr\cropmargin-\cropgap\relax} l S
% Top left % Top left
0 \tobp{\dimexpr\pageheight-\cropmargin\relax} m \tobp{\dimexpr\cropmargin-\cropgap\relax} \tobp{\dimexpr\pageheight-\cropmargin\relax} l S 0 \tobp{\dimexpr\luatexpageheight-\cropmargin\relax} m \tobp{\dimexpr\cropmargin-\cropgap\relax} \tobp{\dimexpr\luatexpageheight-\cropmargin\relax} l S
\tobp{\cropmargin} \tobp{\pageheight} m \tobp{\cropmargin} \tobp{\dimexpr\pageheight-\cropmargin+\cropgap\relax} l S \tobp{\cropmargin} \tobp{\luatexpageheight} m \tobp{\cropmargin} \tobp{\dimexpr\luatexpageheight-\cropmargin+\cropgap\relax} l S
% Top right % Top right
\tobp{\pagewidth} \tobp{\dimexpr\pageheight-\cropmargin\relax} m \tobp{\dimexpr\pagewidth-\cropmargin+\cropgap\relax} \tobp{\dimexpr\pageheight-\cropmargin\relax} l S \tobp{\luatexpagewidth} \tobp{\dimexpr\luatexpageheight-\cropmargin\relax} m \tobp{\dimexpr\luatexpagewidth-\cropmargin+\cropgap\relax} \tobp{\dimexpr\luatexpageheight-\cropmargin\relax} l S
\tobp{\dimexpr\pagewidth-\cropmargin\relax} \tobp{\pageheight} m \tobp{\dimexpr\pagewidth-\cropmargin\relax} \tobp{\dimexpr\pageheight-\cropmargin+\cropgap\relax} l S \tobp{\dimexpr\luatexpagewidth-\cropmargin\relax} \tobp{\luatexpageheight} m \tobp{\dimexpr\luatexpagewidth-\cropmargin\relax} \tobp{\dimexpr\luatexpageheight-\cropmargin+\cropgap\relax} l S
Q Q
} }
}} }}
...@@ -994,7 +910,9 @@ ...@@ -994,7 +910,9 @@
\let\background=\relax \let\background=\relax
\ifprint \ifprint
\def\separatorbackground{} \def\separatorbackground{
\pdfliteral page{q 0 0 \tobp{\pagewidth} \tobp{\pageheight} re 0.75 g f Q}
}
\else \else
\def\separatorbackground{ \def\separatorbackground{
\pdfliteral page{q 0 0 \tobp{\pagewidth} \tobp{\pageheight} re 0.769 0.180 0.208 rg f Q} \pdfliteral page{q 0 0 \tobp{\pagewidth} \tobp{\pageheight} re 0.769 0.180 0.208 rg f Q}
...@@ -1093,7 +1011,7 @@ ...@@ -1093,7 +1011,7 @@
\directlua{ \directlua{
require('lua-pdfmeta.lua') require('lua-pdfmeta.lua')
pdfmeta.set_info('Title', 'Úvod do automatů') pdfmeta.set_info('Title', 'Úvod do kryptografie')
pdfmeta.set_info('Author', 'Martin Mareš') pdfmeta.set_info('Author', 'Martin Mareš')
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment