Page LayoutMy paragraph and new line indents are of different lengths

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
veyd
Posts: 4
Joined: Fri May 15, 2009 11:11 am

My paragraph and new line indents are of different lengths

Post by veyd »

Hello

I'm having quite an annoying problem in the thesis I'm writing: the indentation lengths of \paragraph and empty lines are different.

Some of the packages I'm using: lscape, subfig, caption, fancyhdr, titlesec, makerobust, changepage.

I realise this may be a bit of a long shot without providing far more details about my document, but is this a known problem with a known solution?

Can the length of a new line indent be controlled independently from \parindent?

Recommended reading 2024:

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

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

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

My paragraph and new line indents are of different lengths

Post by localghost »

I wonder how an empty line can have indentation. But perhaps we are talking about \parindent and \parskip. Be more precise in your description. An important information would be the used document class.


Best regards and welcome to the board
Thorsten
veyd
Posts: 4
Joined: Fri May 15, 2009 11:11 am

My paragraph and new line indents are of different lengths

Post by veyd »

localghost wrote:I wonder how an empty line can have indentation.
Ah yes, poor choice of words. What I meant is the indents of the first line of paragraphs created by (a) the command \paragraph{}; and (b) an empty line in the .tex; are of different lengths.

In my document, the following code

Code: Select all

\paragraph{}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam at urna nec nulla convallis cursus in ac metus.

Sed molestie justo ut nulla suscipit lacinia. Donec molestie rutrum tincidunt. Aenean egestas laoreet mauris, quis eleifend mi aliquam eget.
\paragraph{}
Donec imperdiet turpis sit amet mi faucibus quis fringilla metus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
produces
ex.png
ex.png (19.88 KiB) Viewed 7240 times
The length the indents of the 1st (Lorem...) and 3rd (Donec...) paragraphs is different from the length of the indent of the 2nd paragraph (Sed...).

I'm using the book class.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

My paragraph and new line indents are of different lengths

Post by localghost »

You misunderstood the meaning of the \paragraph command. It is a sectioning command like \chapter and has a mandatory argument. Just write your paragraphs without it and leave a blank line. If you really want to have some additional vertical space between two paragraphs, just use one of the commands \smallskip, \medskip or \bigskip. But indenting of and spacing between paragraphs together makes no sense. Choose one or the other.

Code: Select all

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam at urna nec nulla convallis cursus in ac metus.

Sed molestie justo ut nulla suscipit lacinia. Donec molestie rutrum tincidunt. Aenean egestas laoreet mauris, quis eleifend mi aliquam eget.

\medskip
Donec imperdiet turpis sit amet mi faucibus quis fringilla metus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
veyd
Posts: 4
Joined: Fri May 15, 2009 11:11 am

Re: My paragraph and new line indents are of different lengths

Post by veyd »

Just saw your reply, but have to run out.
Have to think about this... seems I've been doing something wrong for years.
veyd
Posts: 4
Joined: Fri May 15, 2009 11:11 am

My paragraph and new line indents are of different lengths

Post by veyd »

It seems you're right.
localghost wrote:But indenting of and spacing between paragraphs together makes no sense.
This made a lot of sense to me. I did use \paragraph as a sectioning command, to separate topics in my texts. However, the topics didn't warrant titles, so I'd always use \paragraph{} to obtain an indented and spaced paragraph. But apparently, I'm the only one to whom this makes sense, and in years of writing reports, I never noticed.

So, thanks for making me take notice.
Post Reply