[latexrefman] it switches from one encoding to another with the @code{\selectfont} or @code{\fontencoding} command

Hefferon, Jim S. jhefferon at smcvt.edu
Wed Sep 15 15:42:18 CEST 2021


My copy of the Companion says (edition 1, p 203) "The second argument contains any code (such as definitions) to be executed each time NFSS switches from one encoding to another using the \fontencoding command."  On p 188, it says "Font selection in NFSS is done in two steps * Some or all attributes are changed using the low-level commands \fontencoding ... * The font corresponding to this new setting is selected by calling the \selectfont command."

So the wording seems right to me, but if these is any change it seems to me to involve omitting the mention of \selectfont.

Jim

...........................................................
Why are they not in jail?

________________________________________
From: Vincent Belaïche <vincent.belaiche at gmail.com>
Sent: Wednesday, September 15, 2021 8:57
To: Karl Berry
Cc: Hefferon, Jim S.; latexrefman
Subject: Re: [latexrefman] it switches from one encoding to another with the @code{\selectfont} or @code{\fontencoding} command

⚠ External Sender ⚠


Any feedback (I will replace « or » by « and » in my next commit to
[en], last notice before doing that by end of this week, ok we can
still undo if I am wrong) ?

  V.

Le lun. 6 sept. 2021 à 11:41, Vincent Belaïche
<vincent.belaiche at gmail.com> a écrit :
>
> Dear Karl,
> I did some experiment (attached). If you pass options to fontenc in
> the order OT1, T1, the two last rows will output <|> instead of ¡—¿.
> This shows that without \selectfont the encoding is not activated.
>
> Le dim. 5 sept. 2021 à 00:16, Karl Berry <karl at freefriends.org> a écrit :
> >
> >     My understanding is the \fontencoding does no immediate switching as
> >     such,
> >
> > Yes it does. Maybe not at the user level, I'm not sure what the
> > visible result is, but in the code the switch is made in \fontencoding.
> >
> >     it just sets the encoding to which the next \selectfont will
> >     switch. So ``or'' should be replaced by ``and''.
> >
> > No it shouldn't.
> >
> > When I look at the actual definition of \fontencoding (in ltfssbas.dtx),
> > the "text-setting" commands from \DeclareFontEncoding are executed:
> >
> > \DeclareRobustCommand\fontencoding[1]{%
> > ..
> >   \csname T@\f at encoding\endcsname
> > ..
> > }
> >
> > The \csname T@\f at encoding\endcsname cs is where the "text-setting"
> > commands were saved.
> >
> > At a glance, I do not see them being executed as being part of
> > \selectfont.
> >
> > So I suggest doing some experiments to find out the actual facts.
> > Failing that, I suggest leaving it alone. -k



More information about the latexrefman mailing list.