I have seen the command a few times and I want to know what \lettrine
does and whether you have to use a package in order for it to work.
[Tex/LaTex] What does “\lettrine” do
lettrine
Related Solutions
This is implemented very nicely in LyX 2.1, which isn't out yet (and won't be for a while). It's also implemented in 2.0.x but needs to use a couple of tricks. See below for both sets of instructions. You should use 2.0.x because it is stable but the instructions for 2.1 will be useful for when it is released.
I first document 2.1dev (even though I recommend you to use 2.0.x) because it is more intuitive.
Instructions for 2.1dev
This version is not released yet and is considered unstable. Note that if you're using Ubuntu, it's easy to use 2.1dev by using the PPA: http://wiki.lyx.org/LyX/LyXOnUbuntu#toc3
Go to Document > Settings > Modules and add the module "Initials". Then use the "initials" environment. In the initials environment, go to the "Insert" menu and you will see "Initial" and "Rest of Initial". This is documented in the Help > Embedded Objects manual under the section "Initials".
Instructions for 2.0
If you're not using 2.1dev, there is still support for initials. Do the same as above to add the module, and when you go to the Insert menu, insert "Short title". That serves the purpose in this case of "Initial" above. This is documented in the Help > Embedded Objects manual under the section "Initials".
\documentclass{article}
\RequirePackage[demo]{graphicx}
\usepackage{helvet}\renewcommand{\familydefault}{\sfdefault}
\usepackage{lettrine}
\usepackage{wrapfig}
\newcounter{cnt}\setcounter{cnt}{0}
\def\t{\stepcounter{cnt}\thecnt. cat sat on the mat. }
\newdimen\tttaa
\newdimen\tttbb
\renewcommand\thepage{\the\numexpr(\value{page}+1)/2\relax}
\makeatletter
\def\merge@ps{\afterassignment\merge@ps@\tttbb}
\def\merge@ps@{\afterassignment\merge@ps@@\tttaa}
\def\merge@ps@@{%
\afterassignment\reset@WF@ps\dimen@\WF@ps\valign
%\showthe\count@
\ifnum\count@>\@ne
\advance\count@\m@ne
\expandafter\merge@ps
\fi
}
\def\reset@WF@ps{\afterassignment\reset@WF@ps@\dimen@ii}
\def\reset@WF@ps@#1\valign{%
\edef\new@wf@ps{\new@wf@ps
\the\dimexpr\dimen@+\tttbb\relax\space
\the\dimexpr\dimen@ii-\tttbb\relax\space}%
\def\WF@ps{#1}}
\newcommand\wflettrine[3][]{%
\setbox\tw@\hbox{\lettrine[#1]{#2}{#3}\global\let\gtmp\L@parshape}%
\afterassignment\wf@getoffset\count@\gtmp\hoffset
\setbox\WF@box\hbox{\kern-\dimen@\box\WF@box\kern\dimen@}%
\noindent\box\tw@
\def\new@wf@ps{}%
\afterassignment\merge@ps\count@\gtmp
\edef\WF@ps{\new@wf@ps\space\WF@ps}%
\@@parshape\c@WF@wrappedlines\WF@ps\z@\columnwidth}
\def\wf@getoffset{\afterassignment\wf@get@ffset\dimen@}
\def\wf@get@ffset#1\hoffset{}
\makeatother
\begin{document}
%%%%%%%%%%%%%%
\begin{wrapfigure}{r}{0.3\textwidth}
\vspace{1ex}
\includegraphics[width=\linewidth,height=1in]{image}
\end{wrapfigure}
\wflettrine[lines=5]{T}{he cat sat}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
%%%%%%%%%%%%%%
\begin{wrapfigure}{r}{0.3\textwidth}
\vspace{1ex}
\includegraphics[width=\linewidth,height=1in]{image}
\end{wrapfigure}
\wflettrine{T}{he cat sat}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
%%%%%%%%%%%%%%%%%%%%%%%
\lettrine[lines=5]{T}{he cat sat}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
%%%%%%%%%%%%%%%%%%%%%%%
\begin{wrapfigure}{r}{0.3\textwidth}
\vspace{1ex}
\includegraphics[width=\linewidth,height=1in]{image}
\end{wrapfigure}
The cat sat
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\end{document}
Best Answer
From the lettrine package documentation:
A little example: