Skip to content

Commit e7498ba

Browse files
committed
prepare for release
1 parent a6a0168 commit e7498ba

File tree

5 files changed

+43
-18
lines changed

5 files changed

+43
-18
lines changed

Diff for: CHANGELOG.rst

+12-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22
Changelog for package kaobook
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
0.9.6 (2021/03/23)
6+
------------------
7+
* Short margin tocs
8+
* Dynamic section-number-width in the margintoc
9+
* Use kvoptions instead of xkeyval
10+
* Slight modification of the page layout so that margin and wide pages
11+
have the same total width
12+
513
0.9.5 (2020/12/30)
6-
------------
14+
------------------
715
* Use \DeclareCiteCommand in kaobiblio.sty (fixes #68)
816
* Support f24paper
917
* Include scrhack
@@ -15,13 +23,13 @@ Changelog for package kaobook
1523
* Set default chapter styles for front-, main-, and back- matter
1624

1725
0.9.0 (2020/12/02)
18-
----------------
26+
------------------
1927
* First official release on GitHub
2028
* Define \hscale and \vscale, and rescale lengths accordingly
2129
* Allow user to choose papersize in the documentclass options
2230

23-
1.3 (2020/02/18)
24-
----------------
31+
Ancient history
32+
---------------
2533
* Add the sidecite command modified to work with BibTeX
2634
* Add an example on how to use the kao_book template with BibTeX
2735
* Add short way to references equations, chapters and sections

Diff for: examples/documentation/chapters/textnotes.tex

+11
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,17 @@ \section{Margintoc}
111111
\chapter{Chapter title}
112112
\end{lstlisting}
113113

114+
As the space in the margin is a valuable resource, we have defined also
115+
the \Command{margintocshort} command, which is roughly equivalent to the
116+
normal \Command{margintoc}, except that it prints another version of the
117+
section title. This version should be shorter than the real section
118+
title and can be specified by the user when creating the section using
119+
the following syntax:
120+
121+
\begin{lstlisting}[style=kaolstplain]
122+
\section[alternative-title-for-toc]{title-as-written-in-text}[alternative-title-for-margintoc]
123+
\end{lstlisting}
124+
114125
\section{Marginlisting}
115126

116127
On some occasions it may happen that you have a very short piece of code

Diff for: examples/minimal_report/main.pdf

35.9 KB
Binary file not shown.

Diff for: kaobook.cls

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22
% kaobook
33
% LaTeX Class
4-
% Version 0.9.5 (2020/12/30)
4+
% Version 0.9.6 (2021/03/23)
55
%
66
% This template originates from:
77
% https://www.LaTeXTemplates.com
@@ -25,10 +25,9 @@
2525
%----------------------------------------------------------------------------------------
2626

2727
\NeedsTeXFormat{LaTeX2e}
28-
\ProvidesClass{kaobook}[2020/12/30 v0.9.5 kaobook]
28+
\ProvidesClass{kaobook}[2021/03/23 v0.9.6 kaobook]
2929
\newcommand{\@baseclass}{scrbook} % Base class name
3030

31-
%\RequirePackage{xkeyval} % Manage class key-value options
3231
\RequirePackage{kvoptions} % Manage class key-value options
3332

3433
\SetupKeyvalOptions{

Diff for: kaohandt.cls

+18-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22
% kaobook
33
% LaTeX Class
4-
% Version 0.9.5 (2020/12/30)
4+
% Version 0.9.6 (2021/03/23)
55
%
66
% This template originates from:
77
% https://www.LaTeXTemplates.com
@@ -25,22 +25,29 @@
2525
%----------------------------------------------------------------------------------------
2626

2727
\NeedsTeXFormat{LaTeX2e}
28-
\ProvidesClass{kaohandt}[2020/12/30 v0.9.5 kaohandt]
29-
30-
\RequirePackage{xkeyval} % Manage class key-value options
31-
28+
\ProvidesClass{kaohandt}[2021/03/23 v0.9.6 kaohandt]
3229
\newcommand{\@classname}{kaohandt} % Class name
3330
\newcommand{\@baseclass}{scrartcl} % Base class name
3431

35-
\newcommand{\@secnumdepth}{2} % Set default numbering depth up to subsections
36-
\DeclareOptionX{secnumdepth}{% % Declare secnumdepth as an option
37-
\renewcommand{\@secnumdepth}{#1}%
32+
\RequirePackage{kvoptions} % Manage class key-value options
33+
34+
\SetupKeyvalOptions{
35+
family = kao,
36+
prefix = kao@
3837
}
3938

4039
% Set the default options
4140
\PassOptionsToClass{a4paper}{\@baseclass}
42-
\DeclareOptionX*{\PassOptionsToClass{\CurrentOption}{\@baseclass}} % Pass through any options to the base class
43-
\ProcessOptionsX\relax % Process the options
41+
42+
% Define kao-specific options
43+
\DeclareStringOption[1]{secnumdepth}
44+
45+
% Pass through any other options to the base class
46+
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\@baseclass}}
47+
48+
\ProcessKeyvalOptions*
49+
\ProcessOptions\relax % Process the options
50+
4451
\LoadClass{\@baseclass} % Load the base class
4552
\input{styles/kao.sty} % Load the code common to all classes
4653

@@ -86,7 +93,7 @@
8693
% NUMBERING
8794
%----------------------------------------------------------------------------------------
8895

89-
\setcounter{secnumdepth}{\@secnumdepth} % Set section numbering depth
96+
\setcounter{secnumdepth}{\kao@secnumdepth} % Set section numbering depth
9097

9198
\counterwithin*{sidenote}{section} % Uncomment to reset the sidenote counter at each section
9299
%\counterwithout{sidenote}{section} % Uncomment to have one sidenote counter for the whole document

0 commit comments

Comments
 (0)