I have a problem with description environment. The text exceeds the width of the page
\documentclass[a4paper,twoside,10pt]{report}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}
\usepackage{lmodern}
\usepackage{geometry}
\geometry{hmargin=2.5cm,vmargin=2.5cm}
\begin{document}
\pagestyle{empty}
\chapter{Some small hints}\label{hints}
\section{German Umlauts and other Language Specific Characters}\label{umlauts}
You can type german umlauts like 'ä', 'ö', or 'ü' directly in this file.
\begin{description}
\item [small item:] Lorem ipsum dolor sit amet, consectetur adipiscing elit.
\item [Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse consequat accumsan sodales. Duis pulvinar sagittis porta. Mauris malesuada vehicula turpis,] sed ornare ante. In pulvinar ligula a leo lacinia, vel laoreet tortor auctor. Nullam in tinc] Lorem ipsum dolor sit amet, consectetur adipiscing elit.
\end{description}
\end{document}
this is the output :
Is there a solution to ensure that the text goes to a new line automatically ? thanks
Best Answer
You can do that with
sameline
option from theenumitem
package. Incidentally, I changed the input enncoding toutf8
, as it is more portable to another platform: