4

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?

1
  • 2
    The code should be lettrine{A}{fin}` : \lettrine takes two arguments, the lettrine itself, and the part in small caps. – Bernard Nov 8 '14 at 8:51
7

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

1

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.

3
  • This is not recommended except for perhaps an ad hoc usage. The problem with this solution (qua general solution) is that it tries to circumvent the interface provided by the package, which means that, if you should change your mind about how you want the "lettrine" to work, you need to go back and edit every instance where you used the \lettrine command. – jon Apr 5 '15 at 16:21
  • I assume this is the case of a single letter word, and if so, this is FAR better solution than redefining lettrine globally. Thanks for the question, clarified the answer. – AgilePro Apr 5 '15 at 16:41
  • 1
    Actually (esp. since the OP is from Tunisia), I assume(d) the word is French: afin (e.g., afin de ...). I also always used the lettrine for a whole opening phrase or so. I never thought about only wanting to use it for the first word (which I suppose is entirely possible). – jon Apr 5 '15 at 16:52
0

%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}

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.