I have this package lettrex.sty
\NeedsTeXFormat{LaTeX2e}
%
\RequirePackage{%
lettrine,%
ifthen,%
}
%
\setcounter{DefaultLines}{3}
\renewcommand{\DefaultLoversize}{0.07}
%
\DeclareOption{Libertine-Initials}{%
%X \renewcommand{\DefaultOptionsFile}{Libertine-Initials-Lettrinex.cfg}%
\let\OldLettrine\lettrine%
\renewcommand{\lettrine}[3][]{%
\OldLettrine[#1]{\libertineInitialGlyph{#2}}{\MakeLowercase{#3}}%
}%
}
\ProcessOptions\relax%
\endinput
and this config file Libertine-Initials-Lettrinex.cfg
\LettrineOptionsFor{A}{findent=-0.8em,nindent=0.5em,loversize=0.07,slope=0.6em}
When I compile pdflatex testL-In.tex
\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{libertine}
\usepackage{blindtext}
\usepackage[Libertine-Initials]{lettrex}
\begin{document}
\lettrine{A}{is a letter of our alphabet}. \blindtext
\end{document}
then all seems OK. But when I remove the %X
in lettrex.sty
to enable the options for letter 'A', I get this error:
(./testL-In.aux) (./Libertine-Initials-Lettrinex.cfg)
! Missing \endcsname inserted.
<to be read again>
\protect
l.16 \lettrine{A}{is a letter of our alphabet}
. \blindtext
?
(/zfs/texlive/2022/texmf-dist/tex/latex/libertine/T1LinuxLibertineInitialsT-LF.
fd)
! Extra \endcsname.
\@lettrine ...er \ifx \csname l@#2-keys\endcsname
\relax \gdef \l@LOKeys {}\...
l.16 \lettrine{A}{is a letter of our alphabet}
. \blindtext
?
Overfull \hbox (7.46712pt too wide) in paragraph at lines 16--17
[][]\T1/LinuxLibertineT-TLF/m/n/12 . Lorem ip-sum do-lor sit amet, con-sectetue
r
[1{/zfs/texlive/2022/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./testL-In.aux) ){/zfs/texlive/2022/texmf-dist/fonts/enc/dvips/libertine/lbtn_
ncsllp.enc}{/zfs/texlive/2022/texmf-dist/fonts/enc/dvips/libertine/lbtn_vsrqlo.
enc}{/zfs/texlive/2022/texmf-dist/fonts/enc/dvips/libertine/lbtn_76gpa5.enc}</z
fs/texlive/2022/texmf-dist/fonts/type1/public/libertine/LinLibertineIT.pfb></zf
s/texlive/2022/texmf-dist/fonts/type1/public/libertine/LinLibertineT.pfb>
Output written on testL-In.pdf (1 page, 119263 bytes).
Transcript written on testL-In.log.
Finally it does give me the Initial, but what is done wrong here?
\libertineInitialGlyph{#2}
, and that means that lettrine doesn't look up a configuration for A with\csname l@A-keys\endcsname
but tries to find\csname l@\libertineInitialGlyph{A}-keys\endcsname
and that explodes.\libertineInitialGlyph
in pdflatex?