Text FormattingProblem with paragraph

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
quasar987
Posts: 4
Joined: Tue Jan 13, 2009 6:03 am

Problem with paragraph

Post by quasar987 »

Hello,

My code is the following

Code: Select all

Code, edit and compile here:
\documentclass{slides}
\setlength{\parskip}{4cm}
\usepackage{amsmath,amssymb}
\usepackage[frenchb]{babel}
\newtheorem{mydef}{Definition}
\newtheorem{ce}{Contre-exemple}
\usepackage[T1]{fontenc}
\begin{document}
\begin{slide}
\textbf{Exemples}
\begin{enumerate}
\item Item 1
\item Item 2
\end{enumerate}
Text
\end{slide}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Observe that I wrote "\setlength{\parskip}{4cm}" in the preamble. This, I read, would insure that I get a 4cm spacing between paragraphs. And to tell LaTeX that I want a paragraph at some place, I simple have to leave a blank line. Why then is there not a 4cm space between "Item 2" and "Text"?

Instead, I noticed that when I leave a blank line between "\textbf{Exemples}" and "\begin{enumerate}", a spacing appear between "Exemples" and "Item 1" and between "Item 2" and "Text" (and this, independantly of the existence of a blank line between "\end{enumerate}" and "Text"!). Furthermore, this spacing is as big whether I enter 1cm or 4cm in "\setlength{\parskip}{}".

What is going on?

Thank you.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Problem with paragraph

Post by localghost »

You have chosen the wrong length for modification. The according length here is \itemsep which is - as its name says - the space between to items. Note that this length is normally set variable to enable stretching or upsetting text on a page.


Best regards and welcome to the board
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
quasar987
Posts: 4
Joined: Tue Jan 13, 2009 6:03 am

Re: Problem with paragraph

Post by quasar987 »

Perhaps I have not made it clear what I want.

I tried \itemsep and all I could get out of it is a serparation between the items in my list.

What I want is a separation between the last item in my list and the following paragraph. As it appears in the dvi file, I want a separation between "Item 2" and "Text".
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Problem with paragraph

Post by localghost »

Sorry, obviously a mistake in reading. It seems that such modifications of lengths have no effect in this document class. I only can observe a change when setting the line with the babel package as comment. There are lots of alternative document classes for producing presentations [1]. There you find some classes that let you structure your slides with less restrictions.

[1] The TeX Catalogue OnLine, Top Index - Presentation Slides
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Post Reply