Browse Source

Podsložka na TeX

jk-bakalarka
Jiří Kalvoda 8 months ago
parent
commit
bf46105db8
  1. 29
      src/formatitko/tex/formatitko.tex
  2. 23
      src/formatitko/tex/table_of_contents.tex
  3. 18
      src/formatitko/tex/table_of_contents_pictures.tex

29
src/formatitko/formatitko.tex → src/formatitko/tex/formatitko.tex

@ -76,9 +76,18 @@
\fncount=1
\def\fnmark{\superscript{\the\fncount}}
\def\fn#1{\footnote\fnmark{#1}\advance\fncount by 1}
\def\section#1#2{\vfil\eject{\parskip1em\settextsize{20}\bf #1\kern 1em #2}}
\def\subsection#1#2{{\parskip1em\settextsize{18}\bf #1\kern 1em #2}}
\def\subsubsection#1#2{{\parskip1em\settextsize{16}\bf #1\kern 1em #2}}
\def\section#1#2{
\vfil\eject{\parskip1em\settextsize{20}\bf #1\kern 1em #2}
\addtoc\tocsection{#1}{}{#2}
}
\def\subsection#1#2{
{\parskip1em\settextsize{18}\bf #1\kern 1em #2}
\addtoc\tocsubsection{#1}{}{#2}
}
\def\subsubsection#1#2{
{\parskip1em\settextsize{16}\bf #1\kern 1em #2}
\addtoc\tocsubsubsection{#1}{}{#2}
}
\def\subsubsubsection#1#2{{\parskip1em\settextsize{14}\bf #1\kern 1em #2}}
\def\subsubsubsubsection#1#2{{\parskip1em\settextsize{12}\bf #1\kern 1em #2}}
\def\subsubsubsubsubsection#1#2{{\parskip1em\settextsize{10}\bi #1\kern 1em #2}}
@ -191,3 +200,17 @@
}}}
}}
% Obsah a odkazy
\newwrite\tocfile
\immediate\openout\tocfile=toc-new.aux
% Voláme: \addtoc\tocmacro{number}{asterisks}{title}
\long\def\addtoc#1#2#3#4{
\edef\brum{
\write\tocfile{\string#1{\noexpand\the\noexpand\count0}{#2}{#3}{#4}}
}
\brum
}

23
src/formatitko/tex/table_of_contents.tex

@ -0,0 +1,23 @@
{
\def\pagelink#1{#1}
\def\toclink#1#2{%
#2
}
\def\stdskip{\vskip 3pt}
\def\tocsection#1#2#3#4{
\line{\settextsize{14}\bf\hbox to 2em{#2\hfil}#4~\hfil\pagelink{#1}}\stdskip
}
\def\tocsubsection#1#2#3#4{
\line{\bf\hskip 1.5cm \hbox to 3em{#2\hfil}#4~\hfil\pagelink{#1}}\stdskip
}
\def\tocsubsubsection#1#2#3#4{
\line{\bf\hskip 3cm \hbox to 4em{#2\hfil}#4~\hfil\pagelink{#1}}\stdskip
}
\def\tocpicture#1#2#3#4{}
\vskip 1cm
\input toc.aux
}

18
src/formatitko/tex/table_of_contents_pictures.tex

@ -0,0 +1,18 @@
{
\def\pagelink#1{#1}
\def\toclink#1#2{%
#2
}
\def\stdskip{\vskip 3pt}
\def\tocsection#1#2#3#4{}
\def\tocsubsection#1#2#3#4{}
\def\tocsubsubsection#1#2#3#4{}
\def\tocpicture#1#2#3#4{
\line{\hbox to 2em{#2\hfil}#4~\hfil\pagelink{#1}}\stdskip
}
\vskip 1cm
\input toc.aux
}
Loading…
Cancel
Save