# Lettrine with fwlw packages

I need combine lettrine with fwlw package.
But if into \NextWordBox is text with lettrined letter, it have to be usual text, without lettrining.

My MWE:

\documentclass{article}
\usepackage{lettrine}
\usepackage{fwlw}
\makeatletter
% just for test
\def\@oddfoot{\hfill\usebox\NextWordBox}%
\let\@evenfoot\@oddfoot%
\makeatother

\begin{document}
Test

\newpage

\lettrine{s}ome test some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test
\end{document}


We have text in foot with lettrined first letter. I need usual text in foot, without lettrinig.

• Did you expect anything different? The first word has a lettrine. – egreg Jul 8 '19 at 16:04
• The documentation of fwfw clearly states that this is what happens. – Ulrike Fischer Jul 8 '19 at 16:05
• @egreg I think about other way (other packet?) instead of fwlw. – Elisey Jul 8 '19 at 17:47
• @Elisey Maybe something can be done with LuaTeX, although I doubt it. TeX doesn't know when a page break will happen until it has already built boxes. – egreg Jul 8 '19 at 17:49

Sorry, you can't.

The package works in the following way: when a page break occurs, TeX has generally accumulated more material than fits in the page.

At this point fwlw enters into action and makes a copy of the page to be produced and of the material starting the next one. The objects so obtained are boxes already in internal representation. One can still work with boxes and that's what fwlw does: in order to get the “last word on the preceding page” it unpacks the page to be shipped out taking only the last line; of this line it will only take what follows the last space. Similarly in order to get the “first word in the next page”.

However, as already remarked, the obtained objects are boxes and there is no longer any reference to macros and TeX primitives: just characters and kerns. This should explain the result you get.

Dirty way: insert unvisible text at out-of-print area
with whole word like \makebox[-1000pt][r]{Some}
fwlw see this word as first on the page.

\documentclass{article}
\usepackage{lettrine}
\usepackage{fwlw}
\makeatletter
\def\@oddfoot{\hfill\usebox\NextWordBox}%
\let\@evenfoot\@oddfoot%
\makeatother

\begin{document}
Test

\newpage

\makebox[-1000pt][r]{Some}\lettrine{s}ome test some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test  some test
\end{document}