5

I'm writing my thesis in Lyx and I'm using the Article layout and I would like my section heading to be centred, always starting on a new page and to have some padding from the top of the page.

I have managed to get the section to be centred and to always start on a new page using this code in the Latex Preamble:

\usepackage{sectsty} 
\sectionfont{\centering} 
\let\stdsection\section
\renewcommand*{\section}{\clearpage\stdsection}

However whats left is that I need to have a vertical space between the section heading and the top of the page and to increase the section heading font size slightly; so to make it easier to understand I want my sections to behave exactly like chapters in the example below:

enter image description here

Also if its possible I would like to increase the size of the section heading.

Anyone can help me out with how to do this? keeping in mind I have just started using Lyx a couple of days ago and I am very inexperienced with it so go easy on me!

Thanks

  • Why are you using this (sections to fake chapters)? It would be better to use a class (book or report, for example) providing proper chapters; the formatting can then be customized using titlesec, for example. – Gonzalo Medina Jul 27 '14 at 0:35
  • 1
    I have no idea to be honest. I think of a thesis like an article so I used the article class. Whats the main differences between article and book? is there any pros and cons for using one or the other? – Mo. Jul 27 '14 at 0:37
  • 1
    Of course there are differences. A thesis is more likely to need proper chapters, each one with sections (some of them possibly with subsections). book offers you \chapter as the main sectional unit (besides \part); article doesn0t have \chapter. Try this simple document \documentclass{book} \begin{document} \chapter{Test chapter} \section{Test section} \subsection{Test subsection} \subsubsection{Test subsubsection} \end{document} and you'll see a big difference in formatting. There are some other differences, but comments are too short to discuss them. – Gonzalo Medina Jul 27 '14 at 0:44
  • Thanks! I just used report and its a lot more like what I'm looking for! You should put your comments in to an answer so I can accept it. – Mo. Jul 27 '14 at 0:56
4

Instead of abusing sections to fake chapters it would be better to use a class (book or report, for example) providing proper chapters; the formatting for the chapter headings can then be easily customized (if required) using the titlesec package, for example.

A thesis is more likely to need proper chapters, each one with sections (some of them possibly with subsections). book or report offer you \chapter as the main sectional unit (besides \part); article doesn't have \chapter. Try this simple document

\documentclass{book} 

\begin{document} 
\chapter{Test chapter} 
\section{Test section} 
\subsection{Test subsection} 
\subsubsection{Test subsubsection} 
\end{document} 

and you'll see a big difference in formatting. There are some other differences; see, for example, the answer to Regarding the `book`, `report`, and `article` document classes: what are the main differences?.

There are also some alternative classes that you could consider using: scrbook, scrreprt or memoir.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.