1

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:

Without makebox command

As compared to one with makebox:

enter image description here

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

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}

MWE output

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

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.