Text FormattingJustify Headings to left Side

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Justify Headings to left Side

Post by Stefan Kottwitz »

Try this in your preamble:

Code: Select all

\makeatletter
\@centerfalse
\let\orig@makechapterhead\@makechapterhead
\renewcommand*{\@makechapterhead}[1]{%
  \@centertrue
  \orig@makechapterhead{#1}
  \@centerfalse}
\makeatother
This works with the common thesis class, centering chapters while left-justifying the other headings.

I just would not recommend using a class of 1996. Just because the name is "thesis" it's not guaranteed that it's a good thesis style today.

Stefan
LaTeX.org admin

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

mavericky99
Posts: 7
Joined: Sat Sep 17, 2011 6:04 am

Re: Justify Headings to left Side

Post by mavericky99 »

Thanks Steffen for the reply....But i couldn't find a more convincing style for writing my thesis....as I need a 14 font size for headings and a 12 font size for my sections and subsections.... If u have any such suggestion for me pls do tell me....
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Justify Headings to left Side

Post by localghost »

mavericky99 wrote:[…] as I need a 14 font size for headings and a 12 font size for my sections and subsections. […]
Do these demands concern all your headings? What about the font size for chapter headings and the continuous text? Are there any other demands regarding the format of the headings (bold faced, slanted, …)?
mavericky99
Posts: 7
Joined: Sat Sep 17, 2011 6:04 am

Re: Justify Headings to left Side

Post by mavericky99 »

The chapter headings should be CAPITAL-bold-14pt-center aligned...

The section headings must be CAPITAL-Bold-12pt-Left aligned...

The subsection headings must be Lower case-12pt-left aligned...

Running text must be 12pt with 1.5 line spacing....Any suggestions???
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Justify Headings to left Side

Post by localghost »

Here is a complete example document with the desired formatting for the headings and a header added. The commented lines are only suggestions for other heading levels. The setspace package provides appropriate line spacing.

Code: Select all

\documentclass[12pt,a4paper,twoside,english]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{geometry}
\usepackage[pagestyles]{titlesec}
\usepackage{blindtext}
\usepackage[onehalfspacing]{setspace}

\titleformat{\chapter}{\filcenter\normalfont\large\bfseries\MakeUppercase}{\thechapter.}{1em}{\large}
\titleformat{\section}{\filright\normalfont\normalsize\bfseries\MakeUppercase}{\thesection.}{1em}{\normalsize}
\titleformat{\subsection}{\filright\normalfont\normalsize}{\thesubsection.}{1em}{\normalsize}
%\titleformat{\subsubsection}{\filright\normalfont\normalsize}{\thesubsubsection.}{1em}{\normalsize}
%\titleformat{\paragraph}[runin]{\filright\normalfont\normalsize\slshape}{\theparagraph.}{1em}{\normalsize}
%\titleformat{\subparagraph}[runin]{\filright\normalfont\normalsize}{\thesubparagraph.}{1em}{\normalsize}

\titlespacing*{\chapter}{0pt}{50pt}{20pt}

\newpagestyle{main}{%
  \headrule
  \sethead[\thepage][][\thechapter.\quad\chaptertitle]{\thesection.\quad\sectiontitle}{}{\thepage}
}
\pagestyle{main}

\begin{document}
  \blinddocument
\end{document}
As always, the packages babel (with its global language option) and blindtext are not part of the solution. They have only been used to create dummy text.
Post Reply