Text Formatting ⇒ Justify Headings to left Side
-
- Posts: 7
- Joined: Sat Sep 17, 2011 6:04 am
Justify Headings to left Side
can anyone help me making the section, subsection and subsubsections in thesis left justified. Actually they are centered. I want them to be left aligned...I want the chapter names to be center aligned and Section names left aligned.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Justify Headings to left Side
What you want should be the default behaviour. Show with a minimal example what is going wrong. If you are using a document class that is not listed on CTAN (please check that before), attach it to your next post by upload to the forum server.
Best regards and welcome to the board
Thorsten
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Justify Headings to left Side
You could use the titlesec package. Or use features of the document class. However, we only can help you if you would at least tell us the name of that class.
Stefan
Stefan
LaTeX.org admin
-
- Posts: 7
- Joined: Sat Sep 17, 2011 6:04 am
Justify Headings to left Side
I want my thesis to look like the one in the picture. Please help me left align the sections in LaTeX.
Code: Select all
\documentclass[12pt,a4]{thesis}
\usepackage[pdftex]{graphicx}
\usepackage[titletoc]{appendix}
\usepackage[utf8x]{inputenc}
\usepackage{ucs}
\usepackage{amsfonts}
\usepackage{fullpage}
\usepackage{multirow}
\usepackage{tabularx}
\usepackage{rotating}
\usepackage{makeidx}
\usepackage{times}
\usepackage{amsmath}
\usepackage{multicol}
\usepackage{array}
\usepackage{titlesec}
\setcounter{secnumdepth}{3}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\sectionfont{\normalsize\sc\leftmark}
\linespread{1.3}
\normalsize{}
\begin{document}
\chapter{\textbf{INTRODUCTION AND PRELIMINARIES}}
\section{\textbf{INTRODUCTION}}
I want only the introduction section left justified...and chapters centered as above...
\section{\textbf{PRELIMS}}
Left justification as shown in figure....
\end{document}
- Attachments
-
- Untitled.jpg (28.59 KiB) Viewed 34303 times
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Justify Headings to left Side
With the thesis.cls class I know, it can easily be done by adding the nocenter option:
Stefan
Code: Select all
\documentclass[12pt,a4,nocenter]{thesis}
LaTeX.org admin
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Justify Headings to left Side
Stefan's solution would align all headings to the left. And as he already suggested earlier, you can use the titlesec package to get the desired output. Here shown with a standard class.
For details refer to the package manual.
The blindtext package is not part of the solution, It has only been used to create dummy text. In this context you might also drop the babel package and its (global) language option.
Code: Select all
\documentclass[12pt,a4paper,english]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{geometry}
\usepackage[up,bf,raggedright]{titlesec}
\usepackage{blindtext}
\titleformat{\chapter}{\filcenter\normalfont\huge\bfseries}{\thechapter.}{20pt}{\huge}
\titlespacing*{\chapter}{0pt}{50pt}{20pt}
\begin{document}
\blinddocument
\end{document}
The blindtext package is not part of the solution, It has only been used to create dummy text. In this context you might also drop the babel package and its (global) language option.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 7
- Joined: Sat Sep 17, 2011 6:04 am
Re: Justify Headings to left Side
But the problem is I donot want the chapter headings to shift left...I only want the section and subsection headings to shift left...is there a way????
-
- Posts: 7
- Joined: Sat Sep 17, 2011 6:04 am
Re: Justify Headings to left Side
respected sir,
when ever I do what u have said I am getting an error. The log file with the error is attached.
when ever I do what u have said I am getting an error. The log file with the error is attached.
- Attachments
-
- anand.log
- (4.4 KiB) Downloaded 423 times
-
- Posts: 7
- Joined: Sat Sep 17, 2011 6:04 am
Re: Justify Headings to left Side
also sir using \documentclass{12pt, nocenter} has cleared my section headings problem but want u to help me allign the chapter names in the center as I have shown in the figure...I would be greatfull if u give me precise code.....
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Justify Headings to left Side
The titlesec package and the thesis class seem to be incompatible. Is there a special reason why you use this class? If not, think about using another one.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10