TransWikia.com

Capital letters and lettrine

TeX - LaTeX Asked by Lamloumi Afif on July 2, 2021

I have a problem with lettrine

lettrine{A}fin

The code above gives me the A and F as capital letters, and I’d like the only A be a capital letter .

How can I do this?

3 Answers

You can set

renewcommand{LettrineTextFont}{normalfont}

MWE:

documentclass{article}
usepackage{lettrine}
renewcommand{LettrineTextFont}{normalfont}
begin{document}
  lettrine[lines=2,lraise=0]{A}{fin} and some text  and some text  and some text  and some text  and some text  and some text  and some text  and some text  and some text  and some text  and some text  and some text  and some text  and some text  and some text  and some text  and some text  and some text  and some text
end{document}

enter image description here

Correct answer by user11232 on July 2, 2021

It depends upon the intent of the original post. It is ambiguous whether Afin is a single word (not in English as far as I know) or whether you intended two separate words A fin.

lettrine{A}{}fin showed above the water swimming menacingly toward our hero.

The lettrine command takes two parameters, one for the first letter of a word, and a second for the rest of the word produced in small caps. If you are working with a single letter word, don't forget to define the second parameter! By simply putting text where the second parameter should be, it seems that latex takes the first character of that text as the second parameter, making it capital.

To avoid this, all you need to do is to provide a proper, empty, second parameter.

Answered by AgilePro on July 2, 2021

%Preamble

   documentclass{article}
     usepackage{lettrine}

%usually the default lettrine command takes two letters in its argument, and capitalize the first.

%error msgs usually surfaces when you specify indent, the first letter wasn't joined to form any word, or it's part of a single word,....be very careful about how you specify the two letters the command takes.

% Alternative, write purposeful style for the variations. Such as: newcommand{styleA}{letterine[]{#1}{#2}} or newcommand{styleB}[2]{lettering[indent=2pt]{ {{#1}{}#2} % for when there is space after first letter or simply lettering{A}{} man bla bla.... without keyval else it will flag it and the results [big{A} man bla bla..]

I found that letterine[2]{#1}{#2} will capitalize the first two letters and part of a word, so make #2 empty!

%%Main Document begin{document} lettrine[lines=2,lraise=0]{#1}{#2} and some text bla bla %Or styA{b}{}la and some text more ... end{document}

Answered by Ibiloye Abiodun Christian on July 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP