GeneralIndent not working

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
ivanwest
Posts: 10
Joined: Fri Jul 11, 2008 1:04 am

Indent not working

Post by ivanwest »

Hello all good people,

I have 1 final problem with my thesis. I am not getting indents for my subsections and subsubsections. All is fine with sections.

Here is a snippet of my code that displays the problem.

Code: Select all

\documentclass[10pt]{article}

\setlength{\parindent}{1pc}

\begin{document}

\renewcommand{\thesection}{\Roman{section}}
\renewcommand{\thesubsection}{\Alph{subsection}}
\renewcommand{\thesubsubsection}{\arabic{subsubsection}}

\begin{center}
\section{Background}
\end{center}

This text is fine.\\

\noindent\textit{Just a Seperate Heading (not sectioned)}\\

Also, this text is fine.\\

\subsection{This is a Subsection} 

This is the text that I need indented

\subsubsection{This is a sub subsection}

I also need this text indented

\end{document}
The text after the section does not indent if I remove the centering. ( I want the centering, just mention it for info)

As always, all help is greatly appreciated

Cheers

Ivan

Recommended reading 2024:

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

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

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Indent not working

Post by meho_r »

You need subsections indented or text following subsections? If the latter is needed, then use package "indentfirst" to indent all paragraphs:

Code: Select all

\usepackage{indentfirst}
ivanwest
Posts: 10
Joined: Fri Jul 11, 2008 1:04 am

Re: Indent not working

Post by ivanwest »

meho_r

worked perfectly, thank you for your time

Ivan
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Indent not working

Post by Stefan Kottwitz »

Hi Ivan,

instead of

Code: Select all

\begin{center}
\section{Title}
\end{center}
I recommend to define centered section titles it by titlesec:

Code: Select all

\usepackage{titlesec}
\titleformat{\section}
  {\centering\normalfont\Large\bfseries}{\thesection}{1em}{}
Btw. using titlesec it's also possible to declare indentation after titles, indentfirst wouldn't be needed then.

Stefan
LaTeX.org admin
Post Reply