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 use a LaTeX template which center aligns all section titles. I want to left align these section titles but I do not know how. I tried

\begin{flushleft}
\section{\textbf{Introduction and Background}}
\end{flushleft}

but it has no effect on the section title (i.e., it is still centered). I tried

\begin{flushleft}
\textbf{Introduction and Background}
\end{flushleft}

and it is left aligned the word "Introduction and Background" but it is no longer a section title and thus the numbering using section number are all messed up.

I am new to LaTeX so please keep it simple.

share|improve this question
    
Welcome to TeX.SX. A tip: If you indent lines by 4 spaces, then they're marked as a code sample. You can also highlight the code and click the "code" button ({}). –  Claudio Fiandrino Sep 1 '12 at 11:36
    
Even when trying to keep it simple, knowing which template you use would be very helpful. :-) –  lockstep Sep 1 '12 at 11:42
    
Possible duplicate and here with centring instead of left align. –  Daryl Sep 1 '12 at 11:49
    
I used the AMS LaTex Article tamplate –  Lawrence Sep 1 '12 at 12:17
    
Thank you very much lockstep! It works –  Lawrence Sep 1 '12 at 12:35

1 Answer 1

\documentclass{amsart}

\makeatletter
\def\specialsection{\@startsection{section}{1}%
  \z@{\linespacing\@plus\linespacing}{.5\linespacing}%
%  {\normalfont\centering}}% DELETED
  {\normalfont}}% NEW
\def\section{\@startsection{section}{1}%
  \z@{.7\linespacing\@plus\linespacing}{.5\linespacing}%
%  {\normalfont\scshape\centering}}% DELETED
  {\normalfont\scshape}}% NEW
\makeatother

\begin{document}

\section{Introduction and Background}

\end{document}

Note that using formatting macros within section titles as in

\section{\textbf{Introduction and Background}}

is not the recommended way to make general changes. You should rather use

\normalfont\scshape\bfseries

in the definition of \section (and make sure to use a font that provides bold small capitals).

Also see What do \makeatletter and \makeatother do?

share|improve this answer

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.