I want to use the coloredlettrine
package, which I understand requires a version of the EB Garamond fonts which is newer than that provided by TeX Live 2015. I'm trying to follow the instructions in this answer but am stuck on the very first step ("first install the opentype fonts…").
I downloaded and unzipped EBGaramond-0.016.zip
. Inside is a set of OpenType (.OTF) files. How can I install these? Simply copying these to ~/texmf/fonts/opentype/ebgaramond
and running texhash
, as suggested by the aforementioned answer, doesn't let me compile coloredlettrine.dtx
without font errors. Other answers on TeX.SE (such as this one) suggest using the autoinst
script, but this doesn't work either. That is, running autoinst EBGaramond-InitialsF1.otf
seems to succeed, but compiling coloredlettrine.dtx
still gives me the following error:
$ xelatex coloredlettrine.dtx
This is XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
(./coloredlettrine.dtx
LaTeX2e <2015/01/01>
[...]
kpathsea: Running mktextfm EBGaramondInitialsF1
/home/myusername/opt/texlive/2015/texmf-dist/web2c/mktexnam: Could not map source abbreviation E for EBGaramondInitialsF1.
/home/myusername/opt/texlive/2015/texmf-dist/web2c/mktexnam: Need to update /home/myusername/opt/texlive/2015/texmf-dist/fonts/map/fontname/special.map?
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input EBGaramondInitialsF1
This is METAFONT, Version 2.7182818 (TeX Live 2015) (preloaded base=mf)
kpathsea: Running mktexmf EBGaramondInitialsF1
! I can't find file `EBGaramondInitialsF1'.
<*> ...=1; nonstopmode; input EBGaramondInitialsF1
Please type another input file name
! Emergency stop.
<*> ...=1; nonstopmode; input EBGaramondInitialsF1
Transcript written on mfput.log.
grep: EBGaramondInitialsF1.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input EBGaramondInitialsF1' failed to make EBGaramondInitialsF1.tfm.
kpathsea: Appending font creation commands to missfont.log.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "EBGaramondInitialsF1" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.32 ...BLettrineBackFont{\EBLettrineBackFontname}
?
Minimum non-working example, as requested in the comments:
cd /tmp
wget -OEBGaramond-0.016.zip https://bitbucket.org/georgd/eb-garamond/downloads/EBGaramond-0.016.zip
unzip EBGaramond-0.016.zip
cd EBGaramond-0.016/otf
autoinst EBGaramond-InitialsF1.otf
cd /tmp
git clone https://github.com/raphink/coloredlettrine.git
cd coloredlettrine
xelatex coloredlettrine.ins
xelatex coloredlettrine.dtx
(This uses autoinst
to install the first (and possibly only?) font that coloredlettrine.dtx
seems to want.)
Best Answer
Without knowing your operating system or anything else about your set-up, I can’t say why you’re having trouble installing
coloredlettrine
. But if you’re compiling withxetex
orluatex
, you don’t need to install the fonts inTEXMFHOME
(that’s a big advantage ofxetex
andluatex
), and you can do for yourself whatcoloredlettrine
does.Just install the fonts as system fonts (how you do that depends on your operating system), then do something along these lines, adjusting colors and sizes as desired:
You can use the same technique with other layered fonts you may have, whereas the
coloredlettrine
package works only for EB Garamond. Or rather, you can make the package work for other fonts if you renew a couple of its commands, but it works with two layers only, whereas by handling the overlap yourself you can use as many layers as a typeface has:You can also make your own background tile for EB Garamond, with the help of
\fcolorbox
. Here, I’ve inserted a kern of -2 points, to make up for the 2 point value I’ve assigned to\fboxsep
; otherwise the letter A would not align perfectly with the decorative layer: