Skip to content
Snippets Groups Projects
Commit f526217e authored by Tomáš Nováček's avatar Tomáš Nováček
Browse files

New paragraph document class option

parent 8681e768
No related branches found
No related tags found
1 merge request!30[v1.3.4] Paragraph heading via documentclass option
Pipeline #451126 passed
...@@ -12,7 +12,7 @@ Recommended template for theses submitted at [Faculty of Information Technology] ...@@ -12,7 +12,7 @@ Recommended template for theses submitted at [Faculty of Information Technology]
   
Version Version
-------- --------
1.3.3, built 22. 6. 2024. The whole changelog can be found in the [Changelog file](changelog.md). 1.3.4, built 25. 6. 2024. The whole changelog can be found in the [Changelog file](changelog.md).
   
   
Bugs and support Bugs and support
......
...@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. ...@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/). and this project adheres to [Semantic Versioning](http://semver.org/).
   
# [1.3.4] - 25. 6. 2024
Added support for paragraphs as the deepest level of headings.
### Added
- Added "paragraph" option for document class. If passed, it styles the paragraph command as another level of heading, adds number to it and shows it in ToC. Use with care! Normally, it is considered unwise to use it, since its too deep.
# [1.3.3] - 22. 6. 2024 # [1.3.3] - 22. 6. 2024
Fixed warning about header height. Update of arara compilation settings. Fixed warning about header height. Update of arara compilation settings.
......
...@@ -51,10 +51,17 @@ ...@@ -51,10 +51,17 @@
\PassOptionsToPackage{english,main=slovak}{babel} \PassOptionsToPackage{english,main=slovak}{babel}
\def\@ctufitlang{S} \def\@ctufitlang{S}
} }
\DeclareOption{subsubsection}{
\def\@ctufitsecdepth{3}
}
\DeclareOption{paragraph}{
\def\@ctufitsecdepth{4}
}
\PassOptionsToPackage{svgnames}{xcolor} \PassOptionsToPackage{svgnames}{xcolor}
\PassOptionsToPackage{newfloat}{minted} \PassOptionsToPackage{newfloat}{minted}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
\ExecuteOptions{unicode} \ExecuteOptions{unicode}
\ExecuteOptions{subsubsection}
\ProcessOptions\relax \ProcessOptions\relax
   
% main declarations, loading files % main declarations, loading files
...@@ -281,13 +288,13 @@ ...@@ -281,13 +288,13 @@
\def\frontsubsectionfont{\large} \def\frontsubsectionfont{\large}
\def\frontsubsubsectionfont{\bfseries} \def\frontsubsubsectionfont{\bfseries}
   
\setcounter{secnumdepth}{4} % numbering sections; 4: paragraph \setcounter{secnumdepth}{\@ctufitsecdepth} % numbering sections
\newcommand{\stopTOCentries}{ \newcommand{\stopTOCentries}{
\addtocontents{toc}{\protect\setcounter{tocdepth}{-1}} \addtocontents{toc}{\protect\setcounter{tocdepth}{-1}}
} }
   
\newcommand{\resumeTOCentries}{ \newcommand{\resumeTOCentries}{
\addtocontents{toc}{\protect\setcounter{tocdepth}{4}} % table of content depth; 3: paragraph \addtocontents{toc}{\protect\setcounter{tocdepth}{\@ctufitsecdepth}} % table of content depth
} }
% frontmatter headings end % frontmatter headings end
% frontmatter pseudochapters: named part without printing actual chapter heading % frontmatter pseudochapters: named part without printing actual chapter heading
...@@ -416,8 +423,10 @@ ...@@ -416,8 +423,10 @@
\titleformat{\subsubsection} \titleformat{\subsubsection}
{\large\bfseries\color{heading}}{{{\color{black}\thesubsubsection}}}{1em}{}%[\vskip -1em] {\large\bfseries\color{heading}}{{{\color{black}\thesubsubsection}}}{1em}{}%[\vskip -1em]
   
\titleformat{\paragraph} \ifnum\@ctufitsecdepth=4%if paragraph should be also styled
{\bfseries\color{heading}}{{{\color{black}\theparagraph}}}{1em}{}%[\vskip -1em] \titleformat{\paragraph}
{\bfseries\color{heading}}{{{\color{black}\theparagraph}}}{1em}{}%[\vskip -1em]
\fi
} }
%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%
% MAINMATTER SETTINGS END % MAINMATTER SETTINGS END
......
%% This is the ctufit-thesis example file. It is used to produce theses %% This is the ctufit-thesis example file. It is used to produce theses
%% for submission to Czech Technical University, Faculty of Information Technology. %% for submission to Czech Technical University, Faculty of Information Technology.
%% %%
%% This is version 1.3.3, built 22. 6. 2024. %% This is version 1.3.4, built 25. 6. 2024.
%% %%
%% Get the newest version from %% Get the newest version from
%% https://gitlab.fit.cvut.cz/theses-templates/FITthesis-LaTeX %% https://gitlab.fit.cvut.cz/theses-templates/FITthesis-LaTeX
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
% thesis type: bachelor/master/dissertation % thesis type: bachelor/master/dissertation
% colour: bw for black&white OR no option for default colour scheme % colour: bw for black&white OR no option for default colour scheme
% electronic (oneside) or printed (twoside), twoside is default % electronic (oneside) or printed (twoside), twoside is default
% paragraph - if passed, this optional argument sets paragraphs as the deepest level of headers, styles it, numbers it and adds it to Table of Content. Use with care! Normally, it is considered unwise to use it, since its too deep.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[czech,bachelor,unicode,oneside]{ctufit-thesis} \documentclass[czech,bachelor,unicode,oneside]{ctufit-thesis}
   
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment