Text FormattingLettrine + hyphen

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
1motep
Posts: 1
Joined: Mon Oct 07, 2019 11:15 am

Lettrine + hyphen

Post by 1motep »

Hi everyone !

I'm writing a novel and at the beginning of each chapter, I'd like to use a lettrine for the first letter. The problem is that for some chapters, the first sentence is a dialogue, therefore, the first character is a hyphen. I use the option "ante" in order to put the hypen before the first letter but I'd like it to be aligned with the second line and not the first.

See the code below :

Code: Select all

\documentclass[12pt,a4paper]{letter}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{lettrine}
\usepackage[sc]{mathpazo}

\begin{document}

\lettrine[ante=—]{S}{}urprise steepest recurred landlord mr wandered amounted of. Continuing devonshire but considered its. Rose past oh shew roof is song neat. Do depend better praise do friend garden an wonder to. Intention age nay otherwise but breakfast. Around garden beyond to extent by.

\end{document}
I've read the documentation for the lettrine package but impossible to solve my problem.
If someone has an answer, I thank him very much !
I wish a pleasant day to you all !

1motep

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Lettrine + hyphen

Post by Stefan Kottwitz »

Hi 1motep,

welcome to the forum!

That's an excellent example code, so we can easily test. I can see that adding two lines via ante would be good, such as by using \parbox:

Code: Select all

\documentclass[12pt,a4paper]{letter}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{lettrine}
\usepackage[sc]{mathpazo}
 
\begin{document}
 
\lettrine[ante={\parbox[t]{1em}{\ \\ -}}]{S}{}urprise steepest recurred landlord mr wandered amounted of. Continuing devonshire but considered its. Rose past oh shew roof is song neat. Do depend better praise do friend garden an wonder to. Intention age nay otherwise but breakfast. Around garden beyond to extent by.
 
\end{document}
Stefan
LaTeX.org admin
Post Reply