LaTeX forum ⇒ Text FormattingLettrine + hyphen

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

Lettrine + hyphen

Postby 1motep » Mon Oct 07, 2019 12:07 pm

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] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[12pt,a4paper]{letter}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage[english]{babel}
  4. \usepackage{lettrine}
  5. \usepackage[sc]{mathpazo}
  6.  
  7. \begin{document}
  8.  
  9. \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.
  10.  
  11. \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

User avatar
Stefan Kottwitz
Site Admin
Posts: 9445
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Mon Oct 07, 2019 6:21 pm

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] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[12pt,a4paper]{letter}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage[english]{babel}
  4. \usepackage{lettrine}
  5. \usepackage[sc]{mathpazo}
  6.  
  7. \begin{document}
  8.  
  9. \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.
  10.  
  11. \end{document}


Stefan
Site admin


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 8 guests