Text Formattinghow to not have indent at the beginning of chapters?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
clemens
Posts: 77
Joined: Fri Jun 26, 2009 11:57 am

how to not have indent at the beginning of chapters?

Post by clemens »

Hello,

I am a complete beginner using memoir class and I would like not to have paragraph indent at the beginning of each chapter and sub-chapter and section.
How do I do it?
Cheers

P.s I am using Lyx with TexLive and Xetex

Recommended reading 2024:

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

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

fatra2
Posts: 126
Joined: Fri May 01, 2009 1:43 pm

how to not have indent at the beginning of chapters?

Post by fatra2 »

Have you tried something like:

Code: Select all

\setlength{\parindent}{0}
in the preamble???

Cheers
clemens
Posts: 77
Joined: Fri Jun 26, 2009 11:57 am

Re: how to not have indent at the beginning of chapters?

Post by clemens »

Thank you for your message.
If I do as you suggest it tells me it is not an accepted value. Anyhow my problem is not having indents but having them in the paragraphs that start chapters or sections.
I found out that with the \noindent command I can remove the indent on a specific paragraph, but I was wondering if there was a command to put in the preamble by which all the paragrapsh after a chapter or section name don't have indent.
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

how to not have indent at the beginning of chapters?

Post by meho_r »

In the command mentioned above you have to specify an unit, e.g., 0cm, or 0mm etc.

Code: Select all

\setlength{\parindent}{0mm}
However, it will not solve your problem.

Default behaviour of memoir class is that first paragraphs after sectioning (chapter, section, subsection etc.) is not indented. Since you have problem with this I presume you're using babel and some other language than english. Some languages are really keen to keep first paragraph not indented. However, you may try one solution, using titlesec package:

Code: Select all

\usepackage[noindentafter]{titlesec}
Option noindentafter should prevent indenting of the first paragraph. If this doesn't work, try another titlesec ability, setting spacing manually (pp. 27 of titlesec manual):

Code: Select all

\titlespacing*{\section}{0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}
You should follow the pattern and define spacing for chapter, subsection etc. If this doesn't work, then some low-level commands may be needed. I hope some of LaTeX gurus here will help you with that.

BTW, if you're using LyX, pay attention that it sometimes specifies additional languages even if you want only one. While testing above codes, I changed language couple of times ending with both languages specified and LyX switched them couple of times in text. It may be normal behaviour, but just to mention in case you get some unexpected behaviour: check language, and check it in source ("Complete Source" in LyX) ;)
clemens
Posts: 77
Joined: Fri Jun 26, 2009 11:57 am

Re: how to not have indent at the beginning of chapters?

Post by clemens »

Wow, Meho_r, you are really a great source of knowledge.
Thank you for the detailed instructions and for all the help kindly provided.
Cheers :)
Post Reply