[XeTeX] macro-problem

David Carlisle d.p.carlisle at gmail.com
Tue May 12 17:38:29 CEST 2020


On Tue, 12 May 2020 at 16:16, Herman Grootaers <herman at grootaers-nl.com>
wrote:

> On 05-05-20 08:34, Herman Grootaers wrote:
> > I am flabbergasted with this macro I am setting up. I must miss
> > something from reading the documentation.
> >
> >
> > It is a part of a macro that is much longer, only a conditional
> > partially printing of a header, indexing on a parameter and
> > color-formatting - just the nice things to do in a macro - , but this
> > misbehaves on the typesetting of the main event of the macro.
> >
> >
> > The output is one page long, there are a number of underfull
> > verticals, which are resolved in the final version with all bells and
> > whistles.
> >
> >
> > I hope someone can help me with this strange behaviour.
> >
> >
> > Thanks,
> >
> > Herman Grootaers
> >
> >
> > P.S. Please reply to the channel, I do not like it when someone finds
> > only the question but not the answer.
> >
> Well, I did not find out what went wrong, but changing the call to
> lettrine with a default parameter did the trick I was looking for:
>
>
> \newcommand{\BLAPRNT}[3][4]{\lettrine[lines=#1]{#2}{}#3} in the preamble;
>
> \blaprint{I}{\blatext} in the main body or
>
> \blaprint[2]{I}{\blatext} to change the default number of used lines to
> 2 or the used parameter.
>
>
> It took me a week to dig through google to get the result I wanted. And
> also I sometime have to remind that LaTeX sometimes forgets that the
> \parshape should be 0 as it sometimes keeps holding the lettrine space
> in memory.
>
>
> Thanks.
>
> Herman Grootaers
>
> Your original code was calling \lettrine inside a group which you have
removed here which accounts for the changed behaviour.

in

{Normal call of the package lettrine so 4 lines are used\\
 \lettrine{#2}{}#3}

\lettrine is inside the {} group and the paragraph doesn't end until after
the  group finishes, by which point the \lettrine settings were lost.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/xetex/attachments/20200512/c7d7ffd3/attachment.html>


More information about the XeTeX mailing list.