Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using the titlesec package to better define my section headings. I have a question about it: How can I make the titles already centered in the middle of the page? I have them centered (at the top of the page) at the moment with the following code :

\titleformat{\section}
{\normalfont\Large\bfseries\centering}{\thesection}{1em}{}
share|improve this question
    
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Jubobs Mar 7 '13 at 10:42
add comment

1 Answer

up vote 4 down vote accepted

Is that what you want?

\documentclass{article}

\usepackage{titlesec}
\usepackage{lipsum}
\usepackage[
            showframe,
            ]{geometry}

\titleformat{\section}
{\vspace*{\fill}\centering\normalfont\Large\bfseries}
{\thesection}
{1em}
{\Large}
[\vspace*{\fill}\newpage]

\begin{document}
  \section{First of all}

    \lipsum[1]

  \section{Second of all}

    \lipsum[2]
\end{document}

enter image description here

share|improve this answer
    
Yes!! Thanks a ton! –  Anava Jain Mar 7 '13 at 19:30
    
The most useful answer that solved your problem should be accepted by clicking the tick/checkmark symbol to the left of the answer. This shows other people that this is "the correct answer" in your opinion and assigns points to the answerer and also you. The question will then be handled as "done" which is important for the housekeeping of the site. However, new answers can still be added and the question asker can accept a different answer at any time. –  Jubobs Mar 7 '13 at 19:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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