GeneralIssue with \parindent

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
User avatar
tripwire45
Posts: 129
Joined: Thu Apr 10, 2008 4:35 am

Issue with \parindent

Post by tripwire45 »

I know this *should work, but it doesn't. I've placed it after \begin{document} and after the \tableofcontents as recommended with no results:

Code: Select all

\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex} 
Whether it's there or not, it simply has no effect and my paragraphs remain indented.

Interestingly, when I try:

Code: Select all

paragraph{} \noindent
the first line is not indented but all the subsequent lines in the paragraph are. I can't figure that one out.

I took a look at a number of resources including this thread:

http://www.latex-community.org/viewtopic.php?f=5&t=909

The example there didn't seem to apply because the solution because the issue in question seemed to be this:
[quote="seano"]Oops. My mistake...
For some reason I've been writing my paragraphs like this:

Code: Select all

Some paragraph text \\
A new paragraph \\
A third paragraph \\
I can do something like *this* and have it work out, but it seems like a kloogie solution and would be very work intensive:

Code: Select all

\noindent texxxxxxxxxxxxxxxxxxxxxxxxxxxxxx texxxxxxxxxxxxxxxxxxxxxxxxxxxxx texxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
texxxxxxxxxxxxxxxxxxxxxxxxxxxxxx texxxxxxxxxxxxxxxxxxxxxxxxxxxxx texxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx texxxxxxxxxxxx
texxxxxxxxxxxxxxxxxxxxxxxxxxxxxx texxxxxxxxxxxxxxxxxxxxxxxxxxxxx texxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx texxxxxxxxxxxx \\

\noindent texxxxxxxxxxxxxxxxxxxxxxxxxxxxxx texxxxxxxxxxxxxxxxxxxxxxxxxxxxx texxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
texxxxxxxxxxxxxxxxxxxxxxxxxxxxxx texxxxxxxxxxxxxxxxxxxxxxxxxxxxx texxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx texxxxxxxxxxxx
texxxxxxxxxxxxxxxxxxxxxxxxxxxxxx texxxxxxxxxxxxxxxxxxxxxxxxxxxxx texxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx texxx \\

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Issue with \parindent

Post by Stefan Kottwitz »

Hi Trip,

try with a smaller example ... can you see the effect here?

Code: Select all

\documentclass[a4paper,10pt]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\begin{document}
\tableofcontents
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
\section{Test}

\blindtext

\blindtext

\blindtext

\end{document}
Stefan
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Issue with \parindent

Post by localghost »

Put the following code to the test.

Code: Select all

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage{blindtext}

\setlength{\parindent}{0pt}

\begin{document}
  \blindtext

  \blindtext
\end{document}
Paragraphs should not be indented. If the problem remains with your code, please post a minimal working example (MWE) that shows the undesired effect.


Best regards
Thorsten¹
User avatar
tripwire45
Posts: 129
Joined: Thu Apr 10, 2008 4:35 am

Issue with \parindent

Post by tripwire45 »

Thanks, Stefan.

Code: Select all

\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
This did the trick.
Post Reply