# How to use lettrine with diacritics and makebox?

In \documentclass[titlepage]{octavo} using \usepackage[latin9]{inputenc} I want to use lettrine with a letter containing a diacritic sign from Slovak language:

\lettrine{\v{S}}{}


Which should end as: Š

This works as expected.

The problem occurs when I try to use it with makebox command:

\makebox[.85em][c]{\lettrine{\v{S}}{}}


This will not get compiled, it ends with Missing \endgroup inserted. error. If I remove the diacritics, it works (e.g.: \makebox[.85em][c]{\lettrine{S}{}} works nicely).

\documentclass[titlepage]{octavo}
\usepackage[lmargin=2.75cm]{geometry}
\usepackage{lettrine}
\usepackage[latin9]{inputenc}
\usepackage{tgchorus}
\usepackage[T1]{fontenc}

\begin{document}

% This works
\makebox[.85em][c]{\lettrine{S}{}}alom.

% This does not (comment this out to compile)
\makebox[.85em][c]{\lettrine{\v{S}}{}}alom.

\end{document}


If I omit \makebox command, the layout does not look good:

As compared to one with makebox:

• @ferahfeza sorry, I have updated the question – Milan Nosáľ Jun 10 '19 at 12:41
• Is there a reason you use the \makebox and not just \lettrine directly? – David Purton Jun 10 '19 at 12:57
• @DavidPurton Layout stuff, check the update on the answer – Milan Nosáľ Jun 10 '19 at 13:08
• You can configure lettrine to adjust the spacing however you want. I'll post an answer. – David Purton Jun 10 '19 at 13:09

I would just use lettrine. It has many options to adjust spacing. Check the manual for details.

# MWE

\documentclass[titlepage]{octavo}
\usepackage[lmargin=2.75cm]{geometry}
\usepackage{lettrine}
\usepackage[latin9]{inputenc}
\usepackage{tgchorus}
\usepackage[T1]{fontenc}

\renewcommand{\LettrineTextFont}{}

\begin{document}
\makebox[.85em][c]{\lettrine{S}{}}alom.

\bigskip

\lettrine[findent=0.2em,nindent=0pt]{\v{S}}{alom.}

\bigskip

\lettrine[findent=0.2em,nindent=0pt]{\v{S}}{alom.} This is some long text
designed to go on to the next line in order to see what happens. Usually it
takes a long long time in order to produce text that is long enough.

\end{document}


• Thanks! I'll check it out, and if everything's OK, I'll accept it – Milan Nosáľ Jun 10 '19 at 13:14