0

When i use \lettrine with \justify, the indentation is wrong. Below it's the code used :

\RequirePackage{fix-cm}

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fullpage}
\usepackage{titlesec}
\usepackage{float}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage[document]{ragged2e}
\usepackage[section]{placeins}
\usepackage{amsmath}

\usepackage[headheight=13.3338pt,top=1.5cm,bottom=1cm,margin=2.5cm]{geometry}

\usepackage{lettrine}
\usepackage{oldgerm}
\usepackage{calligra}
\renewcommand{\LettrineFontHook}{\calligra}

\graphicspath{ {img/} }

\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength{\DefaultNindent}{0pt}
\renewcommand{\headrulewidth}{0.1pt}
\renewcommand{\footrulewidth}{0.1pt}
\fancyfoot[C]{\textbf{page \thepage}} 
\usepackage{wrapfig}
\usepackage{xcolor}

\titleformat{\paragraph}
{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titlespacing*{\paragraph}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}

\begin{document}

\maketitle

\justify

\section{Introduction}

    \subsection{test}
        \subsubsection{test}
            \lettrine[lines=2, lhang=0.33, loversize=0.25, findent=1.0em]{M}{ea} culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa.

            Mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa.
            Mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa.
            \begin{verbatim}
Mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa.
            \end{verbatim}
            Mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa.

            Mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa, mea culpa.
\end{document}

When you just remove \justify the indentation is good, but the text isn't properly justify, but when you use \justify the indentation is wrong but the text is properly justify.

So what's wrong ?

2

Justification is the default setting, you should almost never need \justify. In this case the problem is

\usepackage[document]{ragged2e}

which makes the whole document ragged right. Just use

\usepackage{ragged2e}

and remove the \justify

I also added \title{zzz} as your test example otherwise generates an error.

enter image description here

The underlying issue is that if you do want to revert to justification inside a ragged block then the syntax is either \justifying or \begin{justify}..\end{justify} not \justify, just as the standard latex commands for centering are \centering or \begin{center}..\end{center} not \center.

\justify is just the internal implementation of \begin{justify} but that is a list environment and lettrine does not work within a list.

However it is hard to think of any real use for explicit justification in LaTeX as that is the default, and if you switch to ragged right for a specific environment it is very uncommon to need to switch back to justified text within a nested environment.

  • Thanks so i removed \justify and [document] and now i've a justified text. I will now look to remove the automatic indent. – Samix May 30 '17 at 9:49
  • @Samix parskip package perhaps if you want paragraph spacing and no indent – David Carlisle May 30 '17 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.