Generalwhy does my \parindent not work?

LaTeX specific issues not fitting into one of the other forums of this category.
User avatar
seano
Posts: 12
Joined: Tue Jan 29, 2008 3:38 pm

why does my \parindent not work?

Post by seano »

Maybe I'm just too tired, but I really have no idea why my document, which clearly has

Code: Select all

\setlength\parindent{1cm}
included in the document preamble, still insists on having NO indent.

In case it helps, here's my list of accumulated packages (which are all included before the change to the paragraph indenting):

Code: Select all


\documentclass[12pt,a4paper,twoside,openright,pdftex]{unbthesis}
\usepackage[left=4cm, right=2.5cm, top=2.5cm, bottom=2.5cm]{geometry}
\usepackage{natbib}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amstext}
\usepackage{graphicx}
\usepackage{float}
\usepackage[format=hang,margin=10pt]{caption}
\usepackage{subfig}
\usepackage{fancyhdr}
\usepackage[german, ngerman, english]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{footmisc}
\usepackage{algorithmic}
\usepackage{listings}
\usepackage{fancyvrb}
\usepackage{tabularx}
\usepackage{tabulary}
\usepackage[section,above]{placeins}
\usepackage[smaller,printonlyused]{acronym}
\usepackage{relsize}
Donald E. Knuth said that TeX was intended for the creation of beautiful books.
The plethora of confused, frustrated PhD students trying to use it must therefore be seen as an unintentional side effect.

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

balf
Posts: 158
Joined: Sat Jan 12, 2008 1:11 am

Re: why does my \parindent not work?

Post by balf »

I've just taken a look at unbthesis.cls; I don't understand much of the code, but there seems to be an 'indent' option, which is set by default to 0pt; the option, entitled 'uglification' (!) sets it to 20pt. May be you should try with this option?

Another solution might be to specify your value of \parindent just after \begin{document}.

Regards,
B.A.
User avatar
seano
Posts: 12
Joined: Tue Jan 29, 2008 3:38 pm

Re: why does my \parindent not work?

Post by seano »

Thanks for the quick response, but unfortunately neither of those worked:
I couldn't find anything to do with indent or uglification in my version of unbthesis.cls (I have "Version 1.0 released 2005/11/10")
I also tried changing \oarindent within the document but that had no effect either!?!
Donald E. Knuth said that TeX was intended for the creation of beautiful books.
The plethora of confused, frustrated PhD students trying to use it must therefore be seen as an unintentional side effect.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

why does my \parindent not work?

Post by localghost »

Perhaps the "Electronic Thesis and Dissertation LaTex Class Guide" from the UNB can be of any help.


Best regards
Thorsten
User avatar
seano
Posts: 12
Joined: Tue Jan 29, 2008 3:38 pm

why does my \parindent not work?

Post by seano »

No, no clues there.
Have checked the setspace package too, but that doesn't seem to be the problem either.

The strange thing is that the command \setlength\parindent{1cm} doesn't seem to work anywhere. I have tried it in the preamble, after begin(document) and in the called files.

The response is always the same. Nothing.

@@@@@@@@@@@@@@@

Okay, now I'm confused. This problem doesn't seem to be related to any packages (it still occurs even if I remove them) OR the document style (it still occurs when I use \documentclass{article} or \documentclass{book} or ...)

So, maybe I am asking the wrong question. I want paragraph indents that look like the following. How do I do this?

1.1.1 This is the section heading
This is the first paragraph. It is not indented because that would look silly underneath the section heading. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph.
__________This is the second paragraph. It is indented so that everybody notices that it is a new paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph.
__________This is the third paragraph. It is also indented.This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph.

Obviously the underscore characters shouldn't be there, but even this forum doesn't seem to let me do indenting today!
Donald E. Knuth said that TeX was intended for the creation of beautiful books.
The plethora of confused, frustrated PhD students trying to use it must therefore be seen as an unintentional side effect.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

why does my \parindent not work?

Post by localghost »

seano wrote:1.1.1 This is the section heading
This is the first paragraph. It is not indented because that would look silly underneath the section heading. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph.
__________This is the second paragraph. It is indented so that everybody notices that it is a new paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph.
__________This is the third paragraph. It is also indented.This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph.
How in your opinion should the source code look like to get the paragraphs indented?
User avatar
seano
Posts: 12
Joined: Tue Jan 29, 2008 3:38 pm

why does my \parindent not work?

Post by 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 \\
Which I now realise is, um, not correct :oops:
Now I just need to go through and change them all to \par. Oh well.

Thanks for your patience.
Donald E. Knuth said that TeX was intended for the creation of beautiful books.
The plethora of confused, frustrated PhD students trying to use it must therefore be seen as an unintentional side effect.
balf
Posts: 158
Joined: Sat Jan 12, 2008 1:11 am

Re: why does my \parindent not work?

Post by balf »

A blank line will suffice.

B.A.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

why does my \parindent not work?

Post by localghost »

Leave a blank line between the paragraphs and everything will work fine.

Code: Select all

\section{This is the section heading}
  This is the first paragraph. It is not indented because that would look silly underneath the section heading. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. This is the first paragraph. 

  This is the second paragraph. It is indented so that everybody notices that it is a new paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph. This is the second paragraph.

  This is the third paragraph. It is also indented.This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph. This is the third paragraph.
User avatar
seano
Posts: 12
Joined: Tue Jan 29, 2008 3:38 pm

why does my \parindent not work?

Post by seano »

Yes - I realise this, but I'm not really comfortable about relying on blank lines to define my paragraphs. I'm going to have a document with a LOT of diagrams in it, so the presence or absence of a blank line in the file will not be so obvious.

On the other hand, it's easy to forget to include \par at the end of each paragraph.

Is there a general consensus on what's better? Or is this one of those "personal preference" things?



PS. Yes, it has occurred to me too that I have left a blank space between each line in this post, and no, I didn't do it on purpose. It just happened...
PPS. I am beginning to rethink my personal preference (with regards to paragraph breaks that is!).
PPPS. Cool! It just started snowing. Oops, no, now it's hail. Oh well.
Donald E. Knuth said that TeX was intended for the creation of beautiful books.
The plethora of confused, frustrated PhD students trying to use it must therefore be seen as an unintentional side effect.
Post Reply