Text FormattingRemoving line break in itemize/enumerate environment

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
drorata
Posts: 8
Joined: Mon Jul 14, 2008 9:29 am

Removing line break in itemize/enumerate environment

Post by drorata »

Dear all,

Consider the following example:

Code: Select all

\begin{itemize}
	\item First item
	\item Second item
	\item \begin{definition}[A definition]
			The definition's body
		\end{definition}
\end{itemize}
This results in a line break right after the last bulletin, and before the definition's title.

How can I avoid this line break?

Thanks and have a nice evening,
Dror
Ubuntu 8.04 + Kile 3.5.10 + TeXLive. Question?

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

Removing line break in itemize/enumerate environment

Post by localghost »

Try the paralist package.


Best regards
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
drorata
Posts: 8
Joined: Mon Jul 14, 2008 9:29 am

Removing line break in itemize/enumerate environment

Post by drorata »

By just adding paralist nothing changed. Having look at the package manual didn't help. Do you know to direct me to the exact solution?

I'm attaching a minimal example:

Code: Select all

\documentclass{article}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\begin{document}
	Example
	
	\begin{itemize}
		\item Item 1
		\item Item 2
		\item \begin{theorem}[Th. name]
		      	Here's the problem
		      \end{theorem}
		\item Item 3
	\end{itemize}
\end{document}
Note that I (think that I) need the amsthm package. Without it, problem disappears. Is there a way to enjoy all beauty simultaneously?
Ubuntu 8.04 + Kile 3.5.10 + TeXLive. Question?
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Removing line break in itemize/enumerate environment

Post by localghost »

Ah, now I see. All the theorem environments are internally based on the trivlist environment. This list environment has fixed predefined parameters. At the moment I have no idea how to solve that. Perhaps someone else can help.
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
g4167
Posts: 2
Joined: Mon Nov 28, 2022 12:59 am

Removing line break in itemize/enumerate environment

Post by g4167 »

Did you ever fix that?
Post Reply