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 need to center vertically the start of the section. Here is my code:

\documentclass{article}

\usepackage[english]{babel}
\usepackage{sectsty}

\let\stdsection\section
\renewcommand\section{\newpage\stdsection} %starts each section on a new page
\sectionfont{\raggedleft}                  %section title to the right


\begin{document}
   \section{Introduction} Some text here
   \section{Materials and Methods} More text here
   \section{Conclusion} Finish!!!
\end{document}
share|improve this question
1  
Welcome to TeX.SX! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). –  Jubobs May 24 '13 at 0:12
    
What exactly do you mean with "the start of the section"? Do you want to have the titles centered? If this is so, simply change \sectionfont{\raggedleft} to \sectionfont{\centering}. –  Gonzalo Medina May 24 '13 at 0:14
    
I want the page of the start of each section to start at about 1/4 from the top. Thanks,Natalia –  user31168 May 24 '13 at 0:17
    
Thanks, sorry for the mistake, but I actually want a vertical alignment... –  user31168 May 24 '13 at 0:20
    
No problem. Perhaps you could also edit the title of your question to reflect the fact that you want vertical alignment? –  Gonzalo Medina May 24 '13 at 0:40
show 1 more comment

1 Answer

up vote 2 down vote accepted

Here's a solution using the titlesec package instead of sectsty (change the length .35\textheight according to your needs); notice that now the sections start in a new page using \sectionbreak and that this command also adds the vertical spacing:

\documentclass{article}
\usepackage[english]{babel}
\usepackage{titlesec}

\titleformat*{\section}{\raggedleft\Large\bfseries}
\newcommand{\sectionbreak}{\clearpage\vspace*{.35\textheight}}

\begin{document}
\section{Introduction} Some text here
\section{Materials and Methods} More text here
\section{Conclusion} Finish!!!
\end{document}
share|improve this answer
    
perfect!! thanks!! –  user31168 May 24 '13 at 0:45
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.