Text FormattingTitle Page Templates

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Title Page Templates

Post by Cham »

I think I got the right titlepage for my book. I need your opinion on it, and I may add some small refinements :

Code: Select all

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
% Définition du document selon le format UTF8, afin d'utiliser tous les accents :
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
% Marges du document :
\usepackage{anysize}
\marginsize{1.5in}{1in}{0.5in}{0.5in}

\newcommand*{\titre}{\begingroup
\newlength{\drop}
\setlength{\drop}{0.1\textheight}
\centering
\settowidth{\unitlength}{\Huge\scshape La matière et l'espace\hspace{3pt}-temps}
\vspace*{\baselineskip}
\rule{\unitlength}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt}
\rule{\unitlength}{0.4pt}\\[\baselineskip]
{\Huge\scshape La matière et l'espace\hspace{3pt}-temps}\\[\baselineskip]
{\itshape théorie classique des champs relativistes}\\[0.2\baselineskip]
\rule{\unitlength}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt}
\rule{\unitlength}{1.6pt}\\[\baselineskip]
{\Large\scshape Martin Charest}\par
\vfill
{\large\scshape Montréal}\\[\baselineskip]
{\small\scshape 2011}\par
\vspace*{\drop}
\endgroup}

\begin{document}

\begin{titlepage}
\titre
\end{titlepage}

\end{document}
Is it possible to add a subtle light gray background to the whole page, or a gray rectangular shape excluding the margins ? How can it be done on the code above ?

I may also try adding some picture below the author's name, some kind of relativistic curvy frame or something (an apple ?).

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Title Page Templates

Post by Cham »

I need help to simplify the gray shading defined in the code below. I had to cheat in some ways with that part of the code that I don't understand very well :oops:

Code: Select all

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}

\usepackage{tikz}
% Colors :
\usepackage{xcolor}
\definecolor{mycolor1}{RGB}{160,160,160}
\definecolor{mycolor2}{RGB}{220,220,220}

% Margins
\usepackage{anysize}
\marginsize{1.5in}{1in}{0.5in}{0.5in}

\newcommand*{\titre}{\begingroup
\newlength{\drop}
\setlength{\drop}{0.1\textheight}
\centering
\settowidth{\unitlength}{\Huge\scshape La matière et l'espace\hspace{3pt}-temps}
\vspace*{\baselineskip}
\rule{\unitlength}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt}
\rule{\unitlength}{0.4pt}\\[\baselineskip]
{\Huge\scshape\color{white} La matière et l'espace\hspace{3pt}-temps}\\[\baselineskip]
{\itshape théorie classique des champs relativistes}\\[0.2\baselineskip]
\rule{\unitlength}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt}
\rule{\unitlength}{1.6pt}\\[\baselineskip]
{\Large\scshape Martin Charest}\par
\vfill
{\large\scshape Montréal}\\[\baselineskip]
{\small\scshape 2011}\par
\vspace*{\drop}
\endgroup}

\begin{document}

\begin{titlepage}

%-------------------------------
% Part which I don't understand very well.  TOO BE OPTIMIZED !
\begin{tikzpicture}[remember picture,overlay]
	\node [xshift=\paperwidth/2,yshift=\paperheight/2] at (current page.south west)[minimum width=2\paperwidth,minimum height=\paperheight,top color=mycolor1,bottom color=mycolor2]{};
\end{tikzpicture}
%-------------------------------

\titre
\end{titlepage}

\end{document}
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Title Page Templates

Post by Cham »

I think I got it right this time. :D

What you guys think of this title page ?
PageTitre.pdf
(39.45 KiB) Downloaded 413 times

Code: Select all

\documentclass[letterpaper]{book}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{tikz}
\usepackage{xcolor}
\definecolor{mycolor1}{RGB}{110,120,180}
\definecolor{mycolor2}{RGB}{240,240,240}
\usepackage{anysize}
\marginsize{1.5in}{1in}{0.5in}{0.5in}

\newcommand*{\titre}{\begingroup
\newlength{\drop}
\setlength{\drop}{0.1\textheight}
\centering
\settowidth{\unitlength}{\Huge\scshape La matière et l'espace\hspace{3pt}-temps}
\vspace*{\baselineskip}
\rule{\unitlength}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt}
\rule{\unitlength}{0.4pt}\\[\baselineskip]
{\Huge\scshape\color{white} La matière et l'espace\hspace{3pt}-temps}\\[\baselineskip]
{\large\itshape théorie classique des champs relativistes}\\[0.2\baselineskip]
\rule{\unitlength}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt}
\rule{\unitlength}{1.6pt}\\[4\baselineskip]
{\Large\scshape Martin Charest}\par
\vfill
{\large\scshape Montréal, 2011}\par
\endgroup}

\begin{document}

\begin{titlepage}

\begin{tikzpicture}[remember picture,overlay]
	\node [xshift=\paperwidth/2,yshift=\paperheight/2] at (current page.south west)[minimum width=\paperwidth,minimum height=\paperheight,top color=mycolor1,bottom color=mycolor2]{};
\end{tikzpicture}\\[3\baselineskip]

\titre
\end{titlepage}

\end{document}
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Re: Title Page Templates

Post by Cham »

How can I add a thin vertical gray line all over the page (from top to bottom), at 0.5 inch from the left of the paper ? Any idea ?
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Title Page Templates

Post by Cham »

Please guys, I need help with three other things. I'm pretty some of them are easy to do, but I don't know how :

The following code works great and the result is very nice. However :

1. I need to add a thin vertical gray line from top to bottom, at 0.5 inch of the left side of the paper. This would be used as a reference to fold the book cover.

2. The picture defined in the code below should have exactly the same width as the title.

3. The picture should be at the same vertical space between the author's name, than the name is from the bottom line of the title. In other words : the author's name should be centered between the title's bottom line and the picture.

Please, any help on this would be greatly appreciated.

Code: Select all

\documentclass[letterpaper]{book}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{tikz}
\usepackage{xcolor}
\definecolor{mycolor1}{RGB}{110,120,180}
\definecolor{mycolor2}{RGB}{240,240,240}
% Margins :
\usepackage{anysize}
\marginsize{1.5in}{1in}{0.5in}{0.5in}
% Graphics :
\usepackage{graphicx}
\usepackage{here}

\newcommand*{\titre}{\begingroup
\newlength{\drop}
\setlength{\drop}{0.1\textheight}
\centering
\settowidth{\unitlength}{\Huge\scshape La matière et l'espace\hspace{3pt}-temps}
\vspace*{\baselineskip}
\rule{\unitlength}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt}
\rule{\unitlength}{0.4pt}\\[\baselineskip]
{\Huge\scshape\color{white} La matière et l'espace\hspace{3pt}-temps}\\[\baselineskip]
{\large\itshape théorie classique des champs relativistes}\\[0.2\baselineskip]
\rule{\unitlength}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt}
\rule{\unitlength}{1.6pt}\\[4\baselineskip]
{\Large\scshape Martin Charest}\\[4\baselineskip]

	\begin{figure}[H]
		\centering
		\fbox{\includegraphics[width=12cm]{logo.jpg}}
	\end{figure}

\vfill
{\large\scshape Montréal, 2011}\par
\endgroup}

\begin{document}

\begin{titlepage}

\begin{tikzpicture}[remember picture,overlay]
	\node [xshift=\paperwidth/2,yshift=\paperheight/2] at (current page.south west)[minimum width=\paperwidth,minimum height=\paperheight,top color=mycolor1,bottom color=mycolor2]{};
\end{tikzpicture}\\[3\baselineskip]

\titre
\end{titlepage}

\end{document}
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Title Page Templates

Post by Cham »

I think I've solved the #2 and #3 issues from my last post above. I'm yet unable to add a thin vertical line through the whole page, on the left side. Please help ! :oops:

Code: Select all

\documentclass[letterpaper]{book}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{tikz}
\usepackage{xcolor}
\definecolor{mycolor1}{RGB}{110,120,180}
\definecolor{mycolor2}{RGB}{240,240,240}
% Margins :
\usepackage{anysize}
\marginsize{1.5in}{1in}{0.5in}{0.5in}
% Graphics :
\usepackage{graphicx}
\usepackage{here}

\newlength{\gnat}
\settowidth{\gnat}{\Huge\scshape La matière et l'espace\hspace{3pt}-temps}

\newcommand*{\titre}{\begingroup
\newlength{\drop}
\setlength{\drop}{0.1\textheight}
\centering
\settowidth{\unitlength}{\Huge\scshape La matière et l'espace\hspace{3pt}-temps}
\vspace*{\baselineskip}
\rule{\unitlength}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt}
\rule{\unitlength}{0.4pt}\\[\baselineskip]
{\Huge\scshape\color{white} La matière et l'espace\hspace{3pt}-temps}\\[\baselineskip]
{\large\itshape théorie classique des champs relativistes}\\[0.2\baselineskip]
\rule{\unitlength}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt}
\rule{\unitlength}{1.6pt}\\[4\baselineskip]
{\Large\scshape Martin Charest}\\[3\baselineskip]

	\begin{figure}[H]
		\centering
		\fbox{\includegraphics[width=\gnat]{logo.jpg}}
	\end{figure}

\vfill
{\large\scshape Montréal, 2011}\par
\endgroup}

\begin{document}

\begin{titlepage}

\begin{tikzpicture}[remember picture,overlay]
	\node [xshift=\paperwidth/2,yshift=\paperheight/2] at (current page.south west)[minimum width=\paperwidth,minimum height=\paperheight,top color=mycolor1,bottom color=mycolor2]{};
\end{tikzpicture}\\[3\baselineskip]

\titre
\end{titlepage}

\end{document}
Post Reply