Text FormattingNew Line in Title

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
genek
Posts: 5
Joined: Tue Sep 06, 2011 9:22 pm

New Line in Title

Post by genek »

How to make a new line in title? When I use \title{aa\\bb} i have error "\centercr doesn't match its definition"
Last edited by genek on Wed Sep 07, 2011 4:10 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.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

New Line in Title

Post by localghost »

Somehow I can't comprehend the problem.

Code: Select all

\documentclass{article}
\usepackage[T1]{fontenc}

\title{The Title\\\normalsize A Sub-title}
\author{The Author}

\begin{document}
  \maketitle
\end{document}
Perhaps you should give a complete but minimal example that clearly reproduces the problem.


Best regards and welcome to the board
Thorsten
genek
Posts: 5
Joined: Tue Sep 06, 2011 9:22 pm

New Line in Title

Post by genek »

Code: Select all

\documentclass[english, polish, bachelor, a4paper,oneside]{ppciethesis} 

\usepackage[cp1250]{inputenc}
\usepackage{polski}
\usepackage[OT4]{fontenc}

\usepackage{hyperref}
\usepackage{subfig}
\usepackage{float}
\usepackage{amsfonts}
\usepackage{pdfpages}
\usepackage{listings}


\linespread{1,5}




\title{Analizator dynamiki układów\\ w środowisku LabView}


\author{Tomasz Liszyński}
\ppsupervisor{dr~~inż.~Marek Bielecki} % Your supervisor comes here.
\ppyear{2011}

\begin{document}

\bibliographystyle{plplain}

% Front matter starts here
\frontmatter\pagestyle{empty}%
\maketitle

\cleardoublepage%
\Large

\thispagestyle{empty}\vspace*{\fill}
\cleardoublepage

% Blank info page for "karta dyplomowa"
\thispagestyle{empty}\vspace*{\fill}%
\begin{center}Tutaj znajdzie się karta pracy dyplomowej;\\oryginał‚ wstawiamy do wersji dla archiwum PP, w pozostałych kopiach wstawiamy ksero.\end{center}%
\vfill
\cleardoublepage

% Table of contents.
\pagenumbering{Roman}\pagestyle{ppfcmthesis}%
\tableofcontents \cleardoublepage%

\begin{abstract}
W pracy zaprezentowano aplikacje służące do tworzenia i testowania analizatora dynamiki układu w środowisku Labview oraz dokonano analizy otrzymanych charakterystyk.
\end{abstract}

{
\selectlanguage{english}
\begin{abstract}
The follwoing thesis presents the models used for testing dynamics system analyser in the LabView enviroment and analysis of obtained characteristics.
\end{abstract}
}
\cleardoublepage

% Main content of your thesis starts here.
\mainmatter%


\newpage

\input{01-wstep.tex}
\input{01b-cel.tex}
\input{02-przeglad.tex}
\input{03-porownanie.tex}
\input{04-metody.tex}
\input{05-robot.tex}
%\input{06-aplikacja.tex}
%\input{badania.tex}
\input{podsumowanie.tex}








% All appendices and extra material, if you have any.
\cleardoublepage\appendix%
%\input{0a-Opis_zawartosci_plyty.tex}
%\input{0b-Rysunki_techniczne.tex}

\cleardoublepage

\listoffigures \cleardoublepage %lista rysunków na osobnej stronie

% Bibliography (books, articles) starts here.
\bibliography{bibliografia}

% Colophon is a place where you should let others know about copyrights etc.
\ppcolophon
  \end{document}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

New Line in Title

Post by localghost »

It is obvious that you didn't follow the link in my last reply. The example is not minimal for the following reasons [1,2].
  • It uses a non-standard document class which is not present to us.
  • It loads packages which are irrelevant for the problem.
  • It reads external files which are not present to us.
So you better provide a proper minimal example with the used class attached by upload to the forum server or a link where to find it. Otherwise I'm pessimistic about specific help. It should look very similar to the example in my last reply.

[1] View topic: Board Rules — Everybody implicitly read before posting!
[2] View topic: Avoidable mistakes
genek
Posts: 5
Joined: Tue Sep 06, 2011 9:22 pm

New Line in Title

Post by genek »

ok, i made it shorter

Code: Select all

\usepackage[OT4]{fontenc}



\title{1st line\\2nd line}
\author{The Author}

\begin{document}

\maketitle

  \end{document}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: New Line in Title

Post by localghost »

You seem either not able or not willing to follow the instructions about a minimal example. This code snippet which lacks a document class is not compilable. The document class you use is still not available. Sorry, but this way I can't help you with best will in the world.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: New Line in Title

Post by Stefan Kottwitz »

Hi genek,

this code snippet (which is not compilable) works with standard classes such as article, book and report, and produces a new line. Test it yourself.

The problem seems to be in the specific document class you are using. Perhaps provide a link to download that, if it's free (like LaTeX classes usually are).

Stefan
LaTeX.org admin
genek
Posts: 5
Joined: Tue Sep 06, 2011 9:22 pm

Re: New Line in Title

Post by genek »

With book class i have a lot of errors, so these classes probably should stay. Which one of these class isn't standard? Mayby I'll find download link, but as far as i remember I've downloaded it via miktex or led.

Edit: I'll figure it out. t is about ppciethesis, right? Class file attached.
Attachments
ppciethesis.cls
The used document class.
(8.3 KiB) Downloaded 405 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

New Line in Title

Post by Stefan Kottwitz »

Looking at the class and so being able to test it, I see an easy solution: use \protect before \\, such as

Code: Select all

\documentclass[english, polish, bachelor, a4paper,oneside]{ppciethesis}
\usepackage[OT4]{fontenc}
\title{Analizator dynamiki układów\protect\\ w środowisku LabView}
\author{Tomasz Liszyński}
\ppsupervisor{dr~~inż.~Marek Bielecki} % Your supervisor comes here.
\ppyear{2011}
\begin{document}
\maketitle
\end{document}
This code was compilable for me and shows the desired line break in the title.

Stefan
LaTeX.org admin
genek
Posts: 5
Joined: Tue Sep 06, 2011 9:22 pm

Re: New Line in Title

Post by genek »

Thanks, it works
Post Reply