TransWikia.com

Why Does Merely Invoking a Package in the Preamble Alter the Output?

TeX - LaTeX Asked on August 18, 2021

My subsequent question is something I encountered today and is related to the post:

On Sizing and Positioning Drop Caps

Using the code

documentclass[12pt]{article}
usepackage{color}
usepackage{lettrine}
usepackage{lipsum}
%usepackage{accanthis}
input GoudyIn.fd
newcommand*initfamily{usefont{U}{GoudyIn}{xl}{n}}
begin{document}
large
lettrine[lines=3]{color{blue}{initfamily{W}}}{color{blue}hy} does this strange thing happen when a package is merely added to the preamble and never invoked? lipsum[2]
end{document}

produces the output

enter image description here

Whereas, merely adding the package accanthis to the preamble:

documentclass[12pt]{article}
usepackage{color}
usepackage{lettrine}
usepackage{lipsum}
usepackage{accanthis}
input GoudyIn.fd
newcommand*initfamily{usefont{U}{GoudyIn}{xl}{n}}
begin{document}
large
lettrine[lines=3]{color{blue}{initfamily{W}}}{color{blue}hy} does this strange thing happen when a package is merely added to the preamble and never invoked? lipsum[2]
end{document}

produces

enter image description here

I emphasize that I never called for the said font within the document, yet the output was changed anyway.

Does anyone have an explanation? Or better still, can relate how I may prevent such an occurrence from happening until I call for it in the document?

Finally, I remark that I have encountered similar problems before, but today I have a specific short example to relate. (This may explain, in part, the drop cap problem I posted yesterday On Sizing and Positioning Drop Caps although I do not know for certain what font was used to produce the paragraph containing the larger drop cap that I want to imitate.)

Thank you.

One Answer

Others have pointed out why this happens. As for your question about preventing it from happening, you could just save the value of rmdefault before loading accanthis and restore it afterwards:

letsavedrmdefaultrmdefault
usepackage{accanthis}
letrmdefaultsavedrmdefault

You can still switch to Accanthis using accanthis, e.g.,

This is in Latin/Computer Modern Roman.
{accanthis This is in Accanthis.}
This is Latin/Computer Modern Roman.

Correct answer by David Purton on August 18, 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