LyXUndesired page break on title page

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
Pampateroonie
Posts: 4
Joined: Mon Oct 01, 2012 3:59 pm

Undesired page break on title page

Post by Pampateroonie »

Sorry to piggyback onto the thread, but I'm having a similar problem. I'm also a total noob at Latex/Lyx, so please bear with me. I'm trying to make a title page which has a small graphic at top, then the institution name (standard text), then the title, and then an image which should be at the center of the page. Under the image comes a bit more standard text, centered, and at the bottom standard text at the right.

For some reason everything but the top graphic and the first text is kicked on to page 2. I need it to be all on page 1!! Please....


Code: Select all

%% LyX 2.0.4 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=3cm,bmargin=3cm,lmargin=2.5cm,rmargin=2.5cm}
\usepackage{graphicx}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% A simple dot to overcome graphicx limitations
\newcommand{\lyxdot}{.}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage[T1]{fontenc}
\usepackage{pslatex}
\usepackage{microtype}
\date{}

\makeatother

\usepackage{babel}
\begin{document}
\begin{titlepage}

\begin{flushright}
\begin{figure}[!th]
\raggedleft{}\includegraphics{/home/frank/Documents/small_logo}
\end{figure}

\par\end{flushright}

\begin{center}
HOCHSCHULE FÜR ANGEWANDTE WISSENSCHAFTEN DEPARTEMENT LIFE
SCIENCES UND FACILITY MANAGEMENT INSTITUT UMWELT UND NATÜRLICHE RESSOURCEN
\par\end{center}


\title{Bloob: Micro Boobies for Schmoo Deduction in Arid Zones}

\maketitle
\begin{figure}[!h]
\centering{}\includegraphics{pasted1}
\end{figure}



\author{Yahoo Serious }


\author{Tutorial 2 }


\author{Studienrichtung: Umweltingenieurwesen }


\author{Abgabetermin: Freitag, 14. September 2012, 12.00 Uhr}

\bigskip{}


Fachkorrektoren: 

Dr. Mock, Schmockdibock, Lalaland 

Fritz Frosch, Seedamm, Vaudeville

\end{titlepage}
Last edited by Stefan Kottwitz on Mon Oct 01, 2012 4:13 pm, edited 1 time in total.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Undesired page break on title page

Post by kaiserkarl13 »

Easiest hack here is to change \maketitle to:

Code: Select all

\let\original_newpage\newpage
\let\newpage\relax
\maketitle
\let\newpage\original_newpage
That should (?) solve your problem.

For how I arrived at this, try adding \show\maketitle before your \maketitle command; it contains a \newpage in front of it, hence the page break.
Pampateroonie
Posts: 4
Joined: Mon Oct 01, 2012 3:59 pm

Undesired page break on title page

Post by Pampateroonie »

Thanks! That (sortof) works. Underscores seem to make a mess, I just removed them. The next problem is that this works fine when I compile from Texmaker (using it to edit source - Lyx does not seem to like me editing source directly - or am I doing it wrong??) - but when I import the .tex file into lyx, it reformats that part like this:

Code: Select all

\maketitle
\let\originalnewpage\newpage \let\newpage\relax \let\newpage\originalnewpage
which has Lyx produce the same page-breaky pdf as before. Ugh?



Thanks,
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Undesired page break on title page

Post by scottkosty »

Pampateroonie wrote:Thanks! That (sortof) works. Underscores seem to make a mess, I just removed them. The next problem is that this works fine when I compile from Texmaker (using it to edit source - Lyx does not seem to like me editing source directly - or am I doing it wrong??) - but when I import the .tex file into lyx, it reformats that part like this:

Code: Select all

\maketitle
\let\originalnewpage\newpage \let\newpage\relax \let\newpage\originalnewpage
which has Lyx produce the same page-breaky pdf as before. Ugh?



Thanks,
You're probably not doing anything wrong. LyX has it's own format so whenever it imports a .tex file it converts it to its format. There are a lot of problems with this conversion because of the complexity of TeX. If you would like, you can file a bug report specifying the tex2lyx component here: http://www.lyx.org/trac
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Undesired page break on title page

Post by kaiserkarl13 »

Yes, yes, I'm stupid---you can't use underscores in command names....

The example I wrote myself used \let\newpage\oldpage. Sorry!
Pampateroonie
Posts: 4
Joined: Mon Oct 01, 2012 3:59 pm

Re: Undesired page break on title page

Post by Pampateroonie »

I'm still stumped. There must be a way to do something as seemingly simple as preventing a pagebreak before a \title. In Lyx. I Simply don't have the time right now to do the whole thing the down and dirty way.

Mine can't be the only institution that wants its bloody logo hanging over the title of the paper. On the same page...
Pampateroonie
Posts: 4
Joined: Mon Oct 01, 2012 3:59 pm

Re: Undesired page break on title page

Post by Pampateroonie »

Fixed it! This is what i did:

Top graphic I did by --> insert graphic. No Float.

Made it a \title environment

Made the real title just large standard text


added horizontal space to the left of title to make it align right.


that's it! Thanks to the guy on reddit who figured this out..
bloomy
Posts: 2
Joined: Thu Mar 20, 2014 12:44 am

Undesired page break on title page

Post by bloomy »

I use Lyx. I encountered the same problem. I put a graphic before the title and inserted a page break. So I insert the graphic and the title name and mark them as title.
Then in between the graphic and title name I added TeX code \\[1cm]

So in the source it looks like
\title{\noindent \includegraphics[scale=0.7]{\string"images/logo\string".png}\\[1cm]My Title }

I hope that helps.

Cheers
Steve
Post Reply