Skip to content

Commit 8582098

Browse files
committed
Now with title page.
1 parent c7ca48f commit 8582098

File tree

3 files changed

+130
-6
lines changed

3 files changed

+130
-6
lines changed
+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
\NeedsTeXFormat{LaTeX2e}
2+
\ProvidesPackage{imperialmathnotes}[2021/04/03 Imperial College London Course Notes in Mathematics title page.]
3+
4+
\RequirePackage{fontspec}
5+
\setsansfont{TeX Gyre Heros}
6+
\RequirePackage[british]{babel}
7+
\RequirePackage[utf8]{inputenc}
8+
\RequirePackage[absolute]{textpos}
9+
\RequirePackage{xcolor}
10+
\RequirePackage{graphicx}
11+
\RequirePackage{etoolbox}
12+
\RequirePackage[
13+
type={CC},
14+
modifier={by},
15+
version={4.0},
16+
]{doclicense}
17+
\RequirePackage{fmtcount}
18+
\RequirePackage{hyperref}
19+
\RequirePackage{titling}
20+
21+
\newcounter{volcnt}
22+
\setcounter{volcnt}{0}
23+
\newcommand{\imperialmathnotesvolume}[1]{\setcounter{volcnt}{#1}}
24+
\newcommand{\editions}{}
25+
\newcommand{\edition}[1]{\listadd{\editions}{#1}}
26+
\makeatletter
27+
\providecommand\subtitle[1]{\renewcommand\thesubtitle{#1}}
28+
\newcommand\thesubtitle{\@latex@error{No \noexpand\subtitle given}\@ehc}
29+
\makeatother
30+
31+
\setlength{\TPHorizModule}{1mm}
32+
\setlength{\TPVertModule}{\TPHorizModule}
33+
\textblockorigin{0mm}{0mm}
34+
35+
36+
\definecolor{imperialblue}{cmyk}{1,.61,0,.45}
37+
38+
\newcommand{\imperialmathnotestitlepages}{
39+
\clearpage
40+
\thispagestyle{empty}
41+
\newcounter{edcnt}
42+
\setcounter{edcnt}{0}
43+
\renewcommand*{\do}[1]{\stepcounter{edcnt}
44+
\ifdefined\thisedition
45+
\renewcommand{\thisedition}{\Ordinalstring{edcnt} edition}
46+
\else
47+
\newcommand{\thisedition}{}
48+
\fi
49+
}
50+
\dolistloop{\editions}
51+
52+
\begin{textblock}{70}(17.5,17.5)
53+
\noindent\includegraphics[width=70mm]{imperial.pdf}
54+
\end{textblock}
55+
\begin{textblock}{210}(0,279)
56+
\noindent\rule{210mm}{.5mm}
57+
\end{textblock}
58+
\begin{textblock}{30}(190,-5)
59+
{\color{imperialblue}
60+
\noindent\rule[-5mm]{21mm}{300mm}}
61+
\end{textblock}
62+
\begin{textblock}{210}(17.5,284.5)
63+
{\sffamily\fontsize{25}{30}\selectfont
64+
\noindent Course Notes in Mathematics}
65+
\end{textblock}
66+
\begin{textblock}{30}(185,284.5)
67+
{\sffamily\fontsize{25}{30}\selectfont\centering\color{white}\bfseries
68+
\thevolcnt
69+
70+
}
71+
%\rule{15mm,297mm}
72+
\end{textblock}
73+
\begin{textblock}{175}(17.5,74.25)
74+
\setlength{\parskip}{2ex}
75+
{\sffamily\fontsize{25}{30}\selectfont\noindent\thetitle}
76+
77+
{\sffamily\fontsize{17}{20}\selectfont\noindent\thesubtitle
78+
\vspace{\parskip}
79+
80+
\noindent\Large\theauthor
81+
\vspace{7\parskip}
82+
83+
\noindent{\itshape\thisedition}}
84+
\end{textblock}
85+
86+
\mbox{}
87+
\pagebreak
88+
89+
\begin{textblock}{175}[0,1](17.5,282.5)
90+
{
91+
\hypersetup{urlcolor=imperialblue}
92+
\sffamily\fontsize{12}{14}\selectfont
93+
\setcounter{edcnt}{0}
94+
\renewcommand*{\do}[1]{\stepcounter{edcnt}\noindent\Ordinalstring{edcnt} edition: ##1
95+
\vspace{1ex}
96+
97+
}
98+
\dolistloop{\editions}
99+
\vspace{2ex}
100+
\noindent\copyright\ \theauthor
101+
\doclicenseThis
102+
}
103+
\end{textblock}
104+
\mbox{}
105+
\setcounter{page}{0}
106+
\thispagestyle{empty}
107+
\clearpage
108+
}

‎doc/source/conf.py

+22-6
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
master_doc = 'index'
5858

5959
# General information about the project.
60-
project = u'Object oriented programming in Python for mathematicians'
60+
project = u'Object oriented programming'
6161
author = u'David A. Ham'
6262
copyright = u'2019-2021, David A. Ham'
6363

@@ -71,7 +71,7 @@
7171
# The short X.Y version.
7272
version = '2021.0'
7373
# The full version, including alpha/beta/rc tags.
74-
release = '2021.0'
74+
release = ''
7575

7676
# The language for content autogenerated by Sphinx. Refer to documentation
7777
# for a list of supported languages.
@@ -226,7 +226,9 @@
226226

227227
latex_additional_files = [
228228
'_themes/finite_element/static/dialog-right.png',
229-
'_themes/finite_element/static/dialog-wrong.png'
229+
'_themes/finite_element/static/dialog-wrong.png',
230+
'_static/imperialmathnotes.sty',
231+
'images/Imperial.pdf'
230232
]
231233

232234
latex_elements = {
@@ -236,8 +238,15 @@
236238
# The font size ('10pt', '11pt' or '12pt').
237239
'pointsize': '11pt',
238240

241+
'babel': r'\usepackage[british]{babel}',
242+
'maketitle': r'\imperialmathnotestitlepages',
243+
239244
# Additional stuff for the LaTeX preamble.
240245
'preamble': r'''\setcounter{MaxMatrixCols}{20}
246+
\usepackage{imperialmathnotes}
247+
\subtitle{in Python for mathematicians}
248+
\imperialmathnotesvolume{2}
249+
\edition{2021}
241250
\newcommand{\currentsummary}{}
242251
\newcommand{\sphinxdetailssummary}[1]{
243252
\renewcommand{\currentsummary}{#1}}
@@ -266,9 +275,16 @@
266275
\renewcommand{\currentsphinxclass}{}
267276
}
268277
''',
269-
'releasename': 'Edition',
270-
'sphinxsetup': 'VerbatimColor={HTML}{FAFAFA}, VerbatimBorderColor={HTML}{c6c9cb}, \
271-
InnerLinkColor={HTML}{c52b03}, OuterLinkColor={HTML}{e55d05}'
278+
'releasename': '',
279+
'sphinxsetup': 'VerbatimColor={HTML}{FAFAFA}, \
280+
VerbatimBorderColor={HTML}{c6c9cb}, \
281+
InnerLinkColor={HTML}{c52b03}, \
282+
OuterLinkColor={HTML}{e55d05}, \
283+
noteBorderColor={HTML}{7a9eec}, \
284+
hintBorderColor={HTML}{7a9eec}, \
285+
warningBorderColor={HTML}{fbc2c4}, \
286+
warningBgColor={HTML}{fbe3e4}, \
287+
TitleColor={cmyk}{1,.61,0,.45}'
272288
}
273289

274290
# Grouping the document tree into LaTeX files. List of tuples

‎doc/source/images/Imperial.pdf

3.47 KB
Binary file not shown.

0 commit comments

Comments
 (0)