[Tex/LaTex] lettrine with image

lettrine

Working with lettrine in a probably not intended kind leads me to a problem.
When running the following example you can see that the two lines of text are not starting at the same position. Ugly! I hope and believe that there is a workaround to get a smart and LaTeX-like result.

\documentclass{scrartcl}
\usepackage{lettrine}
\usepackage{tikz}
\setlength{\textwidth}{5cm}
\begin{document}
\lettrine{\tikz\fill[red] (0,0) rectangle (1ex,2ex);}{} This is just
a ridiculous test. This is just a ridiculous test. This is just a
ridiculous test. This is just a ridiculous test.
\end{document}

Remark: In my application there is no red rectangle but an opened book as a hint for a literature cross reference.

Best Answer

From the documentation of lettrine:

findent=<dimen> (positive or negative) controls the horizontal gap between the dropped capital and the indented block of text (default=0pt);

nindent=<dimen> shifts all indented lines, starting from the second one, horizontally by <dimen> (this shift is relative to the first line, default=0.5em);

Then the following setting can be used, e.g.:

\documentclass{scrartcl}
\usepackage{lettrine}
\usepackage{tikz}
\setlength{\textwidth}{5cm}
\begin{document}
  \lettrine[
    findent=.5em,
    nindent=0pt
  ]{\tikz\fill[red] (0,0) rectangle (1ex,2ex);}{}% comment line end (space)
  This is just
  a ridiculous test. This is just a ridiculous test. This is just a
  ridiculous test. This is just a ridiculous test.
\end{document}

Result

Related Question