TransWikia.com

How does one implement drop caps in plain TeX?

TeX - LaTeX Asked by C j on February 23, 2021

How might one implement a simple drop cap in plain TeX without additional packages?

One Answer

Here's a very basic approach showing two possibilities; the first one using hangindent and the second one (more flexible), parshape:

fontlettrine=cmssdc10 at 30pt
fontscfont=cmcsc10
hsize=24pc

noindent{lettrine L}

vskip-2.15baselineskiphangindent=1.8pc hangafter-2 noindent{scfont orem} ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac,
adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget,
consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque 
habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut 
leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. 
Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium
quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum.

vskipbaselineskip

noindent{lettrine L}

vskip-2.15baselineskipparshape 3 1pc 23pc 1.5pc 22.5pc 0pc 24pc noindent{scfont orem} ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac,
adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget,
consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque 
habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut 
leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. 
Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium
quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum.

bye

enter image description here

Answered by Gonzalo Medina on February 23, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP