Skip to content

Commit 37d5afe

Browse files
committed
Added customizable title page
1 parent 64ebd5e commit 37d5afe

File tree

7 files changed

+80
-7
lines changed

7 files changed

+80
-7
lines changed

assets/sample-bg.png

1.29 MB
Loading

assets/title-page.pdf

158 KB
Binary file not shown.

main.pdf

1.33 MB
Binary file not shown.

main.tex

+33-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717

1818
\begin{document}
1919

20-
\maketitle
20+
%\maketitle
21+
\input{notextitle}
2122

2223
\chapter{Introduction}
2324

@@ -202,9 +203,38 @@ \section{Custom boxes}
202203
$ mpicc 01-mpi-collectives.c -o 01-mpi-collectives.o\end{lstlisting}
203204
\end{terminal}
204205

205-
\texttt{Hello there}
206+
\chapter{The title page}
206207

207-
%\fontfamily{cascadia-code}\selectfont{AAA}
208+
NoTeX also offers the possibility of having a custom title page. Clearly, you are free to edit it to your liking. The template comes with some pre-defined values, and has the following structure:
209+
210+
\begin{center}
211+
\begin{tikzpicture}
212+
\node [inner sep=0pt] at (centerpoint) {
213+
\setlength{\fboxsep}{0pt}
214+
\setlength{\fboxrule}{0.5pt}
215+
\fbox{\includegraphics[width=0.5\linewidth]{assets/title-page.pdf}}
216+
};
217+
\draw[red!60, thick, <-] (6.25, 8.15) -- (2.5, 8.15) node[anchor=east]{Header};
218+
\draw[red!60, thick, <-] (4.5, 4.5) -- (2.5, 4.5) node[anchor=east]{Cover};
219+
\draw[red!60, thick, <-] (6, 1.14) -- (2.5, 1.14) node[anchor=east]{Subtitle};
220+
221+
\draw[red!60, thick, <-] (9, 6.65) -- (12.75, 6.65) node[anchor=west]{Title};
222+
\draw[red!60, thick, <-] (9, 1.35) -- (12.75, 1.35) node[anchor=west]{Author};
223+
\draw[red!60, thick, <-] (8.5, -0.05) -- (12.75, -0.05) node[anchor=west]{Footer};
224+
\end{tikzpicture}
225+
\end{center}
226+
227+
You can edit the following parts by renewing the commands with the \verb|\renewcommand| command:
228+
\begin{itemize}
229+
\item \textbf{header}: renew \verb|\titleheader| with what you want to put into the header. You can put anything you'd like, images included;
230+
\item \textbf{title}: renew \verb|\titlecourse| with the name of the course that would go on the title. Only text is allowed, any other item will result in unknown behaviour;
231+
\item \textbf{cover}: renew \verb|\titlecover| with the path of the image you want to replace. Only paths are allowed, any other item will result in unknown behaviour;
232+
\item \textbf{author}: renew \verb|\titleauthor| with your name. Only text is allowed, any other item will result in unknown behaviour;
233+
\item \textbf{subtitle}: renew \verb|\titlesubtitle| with the subtitle that you desire. Only text is allowed, any other item will result in unknown behaviour;
234+
\item \textbf{footer}: renew \verb|\titlefooter| with anything you want to put into the footer. You can put anything you'd like, images included.
235+
\end{itemize}
236+
237+
If you don't like the title page, you are free to edit it or to add your own version. If you want a more "classic" title page, you can use the \verb|\title|, \verb|\author| and all the other standard commands provided by \LaTeX.
208238

209239
\chapter{The \texttt{notexmacros} package}
210240

notex.cls

+15-3
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
\RequirePackage[T1]{fontenc} % Package for font encoding
3838
\RequirePackage{fouriernc} % Package with the font
3939
\RequirePackage{courier} % Package with code font
40-
%\RequirePackage{cascadia-code}
41-
%\RequirePackage[nottdefault]{sourcecodepro}
4240

4341
\RequirePackage{amsmath} % Package for math symbols
4442
\RequirePackage{amssymb} % Package for symbols
@@ -103,6 +101,21 @@
103101

104102
% --- Commands ---
105103

104+
% Title page
105+
\newcommand{\titleheader}{
106+
{\Large \textbf{\textsc{Your University}}}
107+
\linebreak
108+
{\large \textsc{Your Course}}
109+
110+
\vspace{0.05cm}
111+
{\normal \textsc{Xth Year, Xth Semester}}
112+
}
113+
\newcommand{\titlecourse}{Course Title}
114+
\newcommand{\titlecover}{assets/sample-bg.png}
115+
\newcommand{\titleauthor}{Your Name}
116+
\newcommand{\titlesubtitle}{Course taught by prof. X X}
117+
\newcommand{\titlefooter}{\textsc{Your footer}}
118+
106119
% Class related
107120
\newcommand{\maincol}[2]{ \definecolor{maindoccol}{#1}{#2} }
108121
\newcommand{\marleft}{25mm}
@@ -112,7 +125,6 @@
112125

113126
\newcommand{\sectionname}{Section}
114127

115-
116128
\renewcommand*\ttdefault{lmtt}
117129

118130
% Remove indent from beginning of lines

notexmacros.sty

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
\NeedsTeXFormat{LaTeX2e}
2-
\ProvidesPackage{notexmacros}[2024 ElBi21 LaTeX package with custom macros]
2+
\ProvidesPackage{notexmacros}[2024-25 ElBi21 - LaTeX package with custom macros]
33

44
%%% Needed Measures and Commands %%%%%%%%%%%%%%
55

notextitle.tex

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
\begin{titlepage}
2+
\begin{center}
3+
\titleheader
4+
\vspace{0.75cm}
5+
6+
\hrule
7+
\vspace{2cm}
8+
{\huge \textbf{\textsc{\titlecourse}}}
9+
\linebreak
10+
11+
\vspace{1.5cm}
12+
\begin{tikzpicture}
13+
\begin{scope}
14+
\clip [rounded corners=.5cm] (0, 0) rectangle coordinate (centerpoint) (15, 7.5cm);
15+
\node [inner sep=0pt] at (centerpoint) {\includegraphics[width=\linewidth]{\titlecover}};
16+
\end{scope}
17+
\end{tikzpicture}
18+
\vspace{2.5cm}
19+
20+
\hrule
21+
22+
\vspace{1.5cm}
23+
{\Large \textsc{Notes by \titleauthor}}
24+
\linebreak
25+
{\large \textsc{\titlesubtitle}}
26+
\linebreak
27+
28+
\vspace{2cm}
29+
\titlefooter
30+
\end{center}
31+
\end{titlepage}

0 commit comments

Comments
 (0)