0

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.

4
  • 3
    Loading a font-related package could necessarily change the font. That doesn't seem unreasonable.
    – Werner
    Commented Oct 21, 2020 at 17:17
  • 10
    the package changes the default font, that is by design. Commented Oct 21, 2020 at 17:18
  • Unrelated: maths in $ .. $ aren't rendered in posts here on the site. But even if it were, you should use *text* not $text$ to emphasize text. Commented Oct 21, 2020 at 17:28
  • 1
    A lot of packages set something that can potentially change text, even in stronger ways than changing a font. Load Spanish babel with default options and see any 'n becoming ñ...
    – Rmano
    Commented Oct 22, 2020 at 6:21

1 Answer 1

4

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:

\let\savedrmdefault\rmdefault
\usepackage{accanthis}
\let\rmdefault\savedrmdefault

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.
1
  • Thank you very much. This works perfectly!
    – DDS
    Commented Oct 22, 2020 at 20:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .