Commit 4c65a129 authored by Matej Čižik's avatar Matej Čižik Committed by Jan Kasprzak
Browse files

istimetables.tex: pridana moznost vypisat nazov odbobia vpravo hore

parent 52b4f8b8
Loading
Loading
Loading
Loading
+18 −6
Original line number Diff line number Diff line
@@ -173,11 +173,23 @@
% uncomment if you want footnotes numbered by symbols
%\renewcommand{\thefootnote}{\fnsymbol{footnote}}

\usepackage{fp}
\newlength{\txtwidth}
\newlength{\sirkastranky}
\sirkastranky=0.85\textwidth
\makeatletter
\newcommand*{\getlength}[1]{\strip@pt#1}
\makeatother
\newcount\res

\newcommand\scaletext[1]{%
\newcommand\scaletext[2]{%
    \ifx&#2&% je empty?
     \sirkastranky=\textwidth%
    \fi
    \settowidth{\txtwidth}{#1}%
    \resizebox{\minof{\txtwidth}{\textwidth}}{!}{#1}%
    \resizebox{\minof{\txtwidth}{\sirkastranky}}{!}{#1}%
    \FPdiv{\res}{\getlength{\sirkastranky}}{\getlength{\txtwidth}}%
    \hfill\ifthenelse{\txtwidth > \sirkastranky}{\scalebox{\res}{#2}}{#2}%
}

\makeatletter
@@ -572,8 +584,8 @@ filecolor= cyan% color of local files links
\newcounter{nofont}
\setcounter{nofont}{0}
\newbox\zahlavi
\setbox\zahlavi=\hbox{
    {\fontsize{20}{0}\textbf{\scaletext{%\scaletowidth{\tmp}%
\setbox\zahlavi=\hbox to 1.05\textwidth{
    {\fontsize{21}{0}\textbf{\scaletext{%\scaletowidth{\tmp}%
    %%% {\saytimetable\ %			%%% adelton
    {\saytimetable %
     \ifx\ttcode\teacher%
@@ -599,7 +611,7 @@ filecolor= cyan% color of local files links
%%%     \ifnum#2>3 \xxx#3\endxxx\,\ldots\else#3\fi, % 
%%%     #4--#5}}}\hfill\setsmalllogo}
     \ifnum#2>3 \xxx#3\endxxx\,\ldots\else#3\fi % %%% adelton
     }}}}
     }}{#5}}}
}
% konec boxu - pokud je vyssi nex max., prestavime ho dle vysky:
\ifdim\ht\zahlavi>\maxlogoheight
@@ -632,7 +644,7 @@ filecolor= cyan% color of local files links
\mbox{\noindent\setsmalllogo\hfill\raisebox{-0.2\logowidth}[0pt][0pt]%
	{\box\zahlavi}\hfill\setsmalllogo}
\fi
\vspace*{-1mm}
\vspace*{-4mm}
% don't typeset room's code in its timetable
\ifnum\value{nofont}=5
   \renewcommand{\ffifth}[1]{}