LyXUnwanted page break in title page

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
ariel67
Posts: 4
Joined: Wed Nov 30, 2016 1:43 pm

Unwanted page break in title page

Post by ariel67 »

Hello all.
I'm a very new LyX user, and I'm experiencing an unexpected issue with the title page of my document (a kind of lesson textbook). Basically, I need a title page with (from top to bottom) the university logo, the course name, the title, the autor and a date, all centered on the page. The issue concerns the logo and the course name. Wathever I do, LyX breaks the page after the course name and the title. I've use several combinations of styles, even those included in the module that extend the title and preamble properties (sorry, I don't know the English name for this module). And if I try to use a \begin{titlepage} environment, LyX complains saying that my \end{titlepage} is in conflict with its (implicit?) \maketitle. Some ideas to help me ?
Many thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Unwanted page break in title page

Post by Johannes_B »

Welcome,

you have to decide, either let LaTeX do the titlepage for you, which means you can't influence the output, or
do the titlepage from scratch, which isn't very hard.

The wikibook entry on Title creation seems to be a good reference.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
ariel67
Posts: 4
Joined: Wed Nov 30, 2016 1:43 pm

Unwanted page break in title page

Post by ariel67 »

Thank you Johannes.
What do you mean when you say "do the titlepage from the scratch"? Sorry, I don't understand... :oops:
Concerning LaTeX, I have a working code that does exactly what I want. Surely in a less elegant way than the wikibook example, but it works :roll: :

Code: Select all

\begin{titlepage}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\center
\includegraphics[width=4cm]{logoUPSac.png}\\[0.5cm]
\textsc{\Large Master XXXXX}\\[0.5cm] % Major heading such as course name
\newlength{\drop} 
\drop=0.1\textheight
\rule{\textwidth}{1pt}\par % Thick horizontal line
\vspace{2pt}\vspace{-\baselineskip} % Whitespace between lines
\rule{\textwidth}{0.4pt}\par % Thin horizontal line
\vspace{\drop} % Whitespace between the top lines and title
\textcolor{red}{ % Red font color
{\Huge Title 1}\\[0.5\baselineskip] % Title line 1
{\Large \&}\\[0.75\baselineskip] % Title line 2
{\Huge Title 3}} % Title line 3
\vspace{0.25\drop} % Whitespace between the title and short horizontal line
\vspace{\drop} % Whitespace between the thin horizontal line and the author name
{\large \textsc{Author}}\par % Author name
\vspace{5.5cm}
2016/2017
%{\large \today}\\[3cm] % Date, change the \today to a set date if you want to be precise
\vfill % Fill the rest of the page with whitespace
\end{titlepage}
I would like to "translate" this in LyX, but I don't understand how... Is it simply a copy/paste? LyX complains about my \end{titlepage} command...
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Unwanted page break in title page

Post by Johannes_B »

From scratch means without using any template, but knowing the basic LaTeX commands.

Personally, i find your code pretty complicated. A simplified version:

Code: Select all

\documentclass{report}
\usepackage{graphicx}
\usepackage{xcolor}
\begin{document}
\begin{titlepage}
	\centering% NOT center!
	\includegraphics[width=4cm]{example-image-1x1}\\[0.5cm]
	{\Large\scshape Master\medbreak}
	\rule{\textwidth}{1pt}\par % Thick horizontal line
	\vspace{2pt}\vspace{-\baselineskip} % Whitespace between lines
	\rule{\textwidth}{0.4pt}\par % Thin horizontal line
	\vspace{.1\textheight} % Whitespace between the top lines and title
	{\color{red} % Red font color
		{\Huge Title 1\par
		{\Large \&}\par% wrong, but on purpose
		 Title 3\par}
	} 
	\vspace{0.125\textheight} % Whitespace between the title and short horizontal line
	{\large \textsc{Author} \par} % Author name
\vfill
2016/2017
\vfill
\end{titlepage}
\end{document}
I would get rid of the color and the horizontal lines, though.


As to how to include it in LyX: Probably by importing the code for the titlepage. I am not a LyX user, it is too hard for me. It is not aa tool for starters.
You could also use package pdfpages to include the titlepage, as is explained in the wikibook page.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Unwanted page break in title page

Post by scottkosty »

Note that LyX has support for pdfpages. Go to Insert > File > External Material and for Template choose "PDF pages". Not sure if that helps.
Post Reply