Skip to content

Commit

Permalink
Decrease font size for text (but not code)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonlindholm committed Jun 4, 2020
1 parent 8260ca3 commit 3ad3b65
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 25 deletions.
1 change: 0 additions & 1 deletion content/geometry/chapter.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ \section{Geometric primitives}
\kactlimport{Point.h}
\kactlimport{lineDistance.h}
\kactlimport{SegmentDistance.h}
\columnbreak
\kactlimport{SegmentIntersection.h}
\kactlimport{lineIntersection.h}
\kactlimport{sideOf.h}
Expand Down
2 changes: 1 addition & 1 deletion content/kactl.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\documentclass[10pt, a4paper, notitlepage]{report}
\documentclass[9pt, a4paper, notitlepage]{extreport}
\usepackage{kactlpkg}
\kactlcontentdir{content}

Expand Down
45 changes: 23 additions & 22 deletions content/tex/kactlpkg.sty
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}

\newcommand{\enablecolors}{
\lstset{basicstyle=\scriptsize\ttfamily\color{mygreen}}
\lstset{basicstyle=\footnotesize\ttfamily\color{mygreen}}
\lstset{commentstyle=\color{darkgray}\normalfont\itshape}
\lstset{keywordstyle=\color{myblue}}
\lstset{identifierstyle=\color{black}}
Expand All @@ -57,9 +57,9 @@

\renewcommand{\maketitle}[2]{
\begin{center}
{\LARGE \@title}\\
{\Large \@subtitle{} version #2}\\[0.1cm]
{\LARGE \textsc{#1}}
{\Huge \@title}\\
{\huge \@subtitle{} version #2}\\[0.1cm]
{\Huge \textsc{#1}}
\end{center}
}

Expand Down Expand Up @@ -122,39 +122,40 @@

\parindent \z@ \raggedright \normalfont
\interlinepenalty\@M
{\underline{\Large \bfseries #1} }
{\underline{\huge \bfseries #1} }
\ifnum \c@secnumdepth >\m@ne
{\Large\bfseries (\thechapter) \par\nobreak }
{\huge\bfseries (\thechapter) \par\nobreak }
\fi
\startcontents[chapters]
}

\renewcommand\section{\@startsection {section}{1}{\z@}%
{-0.5ex \@plus -1ex \@minus -.2ex}%
{.4ex}%
{\normalfont\large\bfseries}}
{\normalfont\LARGE\bfseries}}

\renewcommand\subsection{\@startsection{subsection}{2}{\z@}
{1ex\@plus -1ex \@minus -.3ex}
{.2ex}
{\normalfont\bfseries}}
{\normalfont\large\bfseries}}

\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}
{1ex\@plus -1ex \@minus -.3ex}
{1ex \@plus .2ex}
{\normalfont\normalsize\bfseries}}
{\normalfont\large\bfseries}}

% Styles for local toc
\titlecontents{localsection}[1.5em]{\footnotesize}{}
{\footnotesize}{\titlerule*[0.8em]{.}\contentspage}
\titlecontents{localsubsection}[3.8em]{\footnotesize}{}
{\footnotesize}{\titlerule*[0.8em]{.}\contentspage}
\titlecontents{localsection}[1.5em]{\small}{}
{\small}{\titlerule*[0.8em]{.}\contentspage}
\titlecontents{localsubsection}[3.8em]{\small}{}
{\small}{\titlerule*[0.8em]{.}\contentspage}

% Styles for main toc
\renewcommand{\chaptermark}[1]{\markboth{\emph{ #1}}{}}
\renewcommand{\cftbeforetoctitleskip}{-50pt}
\renewcommand{\cftbeforetoctitleskip}{-45pt}
\renewcommand{\cftaftertoctitleskip}{10pt}
\renewcommand{\cftbeforechapskip}{10pt}
\renewcommand{\cftbeforechapskip}{11pt}
\renewcommand\cftchapfont{\large\bfseries}
\renewcommand{\cftdotsep}{4.5}

% Proper carets and tildes
Expand All @@ -179,7 +180,7 @@
\lstset{tabsize=2}
\lstset{showstringspaces=false}
\lstset{breaklines=true}
\lstset{basicstyle=\scriptsize\ttfamily}
\lstset{basicstyle=\footnotesize\ttfamily}
\lstset{commentstyle=\normalfont\itshape}
\lstset{literate={^}{\caret}{1} {~}{\tilde}{1}}
\lstset{emptylines=*1}
Expand All @@ -201,14 +202,14 @@
\strut % Magic
\vspace{3cm}\\
\includegraphics[width=3cm]{\@unilogo}\\
{\Huge \@unilong\\}
{\fontsize{25}{30}\selectfont \@unilong\\}
{\fontsize{60}{60}\selectfont \@teamname\\}
\vspace{0.5cm}
{\Large \@teammembers\\}
{\huge \@teammembers\\}
\vfill
{\huge \@contestname}\\
{\fontsize{21}{25}\selectfont \@contestname}\\
\vspace{0.5cm}
{\Large \@contestdate}\\
{\huge \@contestdate}\\
\vspace{1cm}
\end{center}
\clearpage
Expand Down Expand Up @@ -247,7 +248,7 @@
\setboolean{hasleftcaption}{false}
\myneedspace{3\baselineskip}
\penalty-100
#2
{\large #2}
\immediate\write18{rm -f \@builddir/kactl.tmp} % Don't include old kactl.tmp on failure.
\immediate\write18{python2 content/tex/preprocessor.py -i "\@kactldir/#2" -o \@builddir/kactl.tmp #1}
\immediate\input{\@builddir/kactl.tmp}
Expand Down Expand Up @@ -324,7 +325,7 @@


\newcommand{\codeheader}[2]{
{\par\noindent\scriptsize{\textbf{#1:} #2\par}}
{\par\noindent\footnotesize{\textbf{#1:} #2\par}}
}

\long\def\@makecaption#1#2{
Expand Down
2 changes: 1 addition & 1 deletion content/various/chapter.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ \section{Misc. algorithms}
\kactlimport{TernarySearch.h}
\kactlimport{LIS.h}

\newpage % the rest fits nicely on one page
\section{Dynamic programming}
\kactlimport{KnuthDP.h}
\newpage % the rest fits nicely on one page
\kactlimport{DivideAndConquerDP.h}

\section{Debugging tricks}
Expand Down
Binary file modified kactl.pdf
Binary file not shown.

0 comments on commit 3ad3b65

Please sign in to comment.