2

I have an indentation problem that I finally solved adding \usepackage{enumitem} but I can't understand the reasons why the problem happened in the first place and got solved using enumitem. I nailed it to the following MWE :

\documentclass[varwidth]{standalone}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{verbatim}

\begin{document}
some text

\begin{itemize}
  \item an item
\end{itemize}

some more text

\begin{verbatim}
some verbatim
\end{verbatim}

\end{document}

which renders as

base rendered image with everything

but I don't want any indentation on the some text line. Actually if I remove the french babel package, I get the desired output but as I'm writing in french, I would rather keep that :

result without french

Now if I remove the itemize part in the middle I also get the desired indentation on the first line but maybe that's because everything gets indented and the standalone is automatically cropped.

result without itemize

but I would rather keep that itemize, and when I remove the verbatim part, everything gets indented

result without verbatim

I'm therefore not really capable to predict what happens here. I tried removing indentation using \noindent or \setlength{\parindent}{0pt} without success. I finally managed to get the desired output by adding the package enumitem, but I can't really determine what happened.

solution adding enumitem

8
  • Add \frenchbsetup{IndentFirst=false} right after ``babel`
    – pluton
    May 3, 2020 at 23:06
  • Thanks for your proposal. I however don't see a difference in the output. May 3, 2020 at 23:14
  • and if you add \section{title section} right after \begin{document}?
    – pluton
    May 3, 2020 at 23:25
  • the section title gets the same indentation as some text in the first image May 3, 2020 at 23:29
  • 1
    however it seems like including the package enumitem solves the problem. May 3, 2020 at 23:31

0

You must log in to answer this question.

Browse other questions tagged .