Compreendendo lettrine.sty e como configurá-lo

Compreendendo lettrine.sty e como configurá-lo

O código a seguir possui dois parágrafos com uma letra. Por que eles formatam de maneira diferente? O segundo possui o código desejado (com um comando de configuração), mas apenas o primeiro produz a saída desejada (mas seria necessário adicionar uma longa sequência de comandos a cada instância de uso).

Por que isso acontece? Gostaria de ter a saída desejada com o método de configuração do segundo parágrafo. Obrigado desde já por qualquer ajuda. (Estou usando o lettrine ver1.64 conforme incluído no texlive 2014)

\documentclass{book} 
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}     
\usepackage{lettrine}

\LettrineOptionsFor{W}{lines=3,lhang=0.070,findent=.40em,nindent=-0.3em,slope=-0.40em}
\setcounter{DefaultLines}{3}

\begin{document}

\lettrine[lines=3,lhang=0.070,findent=.40em,nindent=-0.3em,slope=-0.40em]{W}{\rm
  hat}
are interactions? At the start of this volume, when we summarized\linebreak
hat relates the Planck units to relativity and to quantum theory,\linebreak e
pointed out that the nature of interactions at Planck scales was still in the
dark. In this chapter ...

\lettrine{W}{\rm hat} are interactions? At the start of this volume, when we
summarized\linebreak hat relates the Planck units to relativity and to quantum
theory,\linebreak e pointed out that the nature of interactions at Planck
scales was still in the dark. In this chapter ...

\end{document}

Responder1

Você tem que adicionar as linhas

\LettrineOptionsFor{W}{lines=3,lhang=0.070,findent=.40em,nindent=-0.3em,slope=-0.40em}

em um arquivo de configuração ( W.cfldigamos) e depois chame

\renewcommand{\DefaultOptionsFile}{W.cfl}

Você pode fazer isso:

\usepackage{filecontents}
\begin{filecontents}{W.cfl}
\LettrineOptionsFor{W}{lines=3,lhang=0.070,findent=.40em,nindent=-0.3em,slope=-0.40em}
\end{filecontents}

\renewcommand{\DefaultOptionsFile}{W.cfl}

no seu arquivo tex. Observe também que \rm(todos os comandos de alteração de fonte de duas letras \bf, como \itetc.) estão obsoletos. Para ter esse efeito você pode usar

\renewcommand{\LettrineTextFont}{\normalfont}

em seu preâmbulo.

Código:

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{lettrine}

\usepackage{filecontents}
\begin{filecontents}{W.cfl}
\LettrineOptionsFor{W}{lines=3,lhang=0.070,findent=.40em,nindent=-0.3em,slope=-0.40em}
\end{filecontents}

\renewcommand{\DefaultOptionsFile}{W.cfl}
\renewcommand{\LettrineTextFont}{\normalfont}

\begin{document}

\lettrine[lines=3,lhang=0.070,findent=.40em,nindent=-0.3em,slope=-0.40em]{W}{hat}
are interactions? At the start of this volume, when we summarized\linebreak
hat relates the Planck units to relativity and to quantum theory,\linebreak e
pointed out that the nature of interactions at Planck scales was still in the
dark. In this chapter ...

\lettrine{W}{hat} are interactions? At the start of this volume, when we
summarized\linebreak hat relates the Planck units to relativity and to quantum
theory,\linebreak e pointed out that the nature of interactions at Planck
scales was still in the dark. In this chapter ...

\end{document}

insira a descrição da imagem aqui

informação relacionada