[NTG-context] difference between TeX behavior and ConTeXt

Lars Huttar lars_huttar at sil.org
Wed Nov 26 05:30:51 CET 2008


On 11/25/2008 5:37 PM, Rory Molinari wrote:
> Lars Huttar wrote:
> 
>> Thanks for the explanation.
>> I hope that when the manual is finished it will make this clearer.
>> Currently, the draft chapter says
>> "As will be explained later, the command \rm is used to switch to a
>> roman/serif/regular style"
>> which does not seem to be happening.
> 
> I think it is due to a difference in terminology between (plain) TeX and 
> ConTeXt.
> Knuth uses "roman" to mean "with serifs and not slanted"

Interesting.
As a newbie to typesetting, reading the TeXbook, I certainly wondered
which "axes" Knuth meant 'roman' to refer to... he simply describes it
as 'normal "roman"' and gives a visual example. So far, all I'd gathered
was that it meant "not italic."

Now that you brought up serifs, I read further in the chapter where
Knuth introduces \rm (ch. 4). He eventually makes clear that he does not
contrast roman with sans-serif (nor with slanted!), because he mentions
both slanted roman (p. 13) and the approved use of \rm to be temporarily
defined to mean a sans-serif type (p. 15). Apparently the only thing
roman is contrasted with in Knuth's book is "italic" (i.e. the modified
glyph style of an italic font, regardless of the slant).

Out of curiosity, I looked up 'roman' with regard to typography on
wikipedia. On the disambiguation page for Roman it says "Roman type, an
upright typeface style, contrasted to italic". But on the Roman_type
page it lists both "not-italic" and "with-serif" as (separate) senses of
"roman". Thanks for the tip.


Regardless of the terminology used, though, what is objectively clear is
that \rm has different effects on font settings in ConTeXt than in Plain
TeX. The TeXbook makes clear by example, if not by statement, that one
of the effects of '\rm' must be to make text non-italicized (also
non-slanted).

If it's designed not to do that in ConTeXt -- i.e. the ConTeXt designers
decided to change the semantics of one of the basic control sequences in
TeX, rather than merely providing a different one with new semantics --
you would think one would want that to be prominently documented. (Maybe
some flashing orange lights? :-)

Whereas \rm is not found at all in the command reference at
http://texshow.contextgarden.net/


> while ConTeXt
> uses it to mean just "not sans serif".

I wonder if the command sequence \serif was already taken?
That would certainly be less ambiguous and confusing...


> So something like
> 
> aardvark {\it aardvark {\rm aardvark}}
> 
> is really doing something like:
> 
> - Set "aardvark" in the default face (which is probably an unslanted serif)
> - Switch to the italic "flavor" of the default face, which here means a 
> traditional italic
> - While in the italic flavor, switch to a roman "base".  But we already 
> had a roman "base" so this doesn't change anything: we are still slanted 
> because of the enclosing \it.
> 
> "Roman" and "italic" are on different axes and can be changed independently.

It makes sense for "italicness" and "serifity" to be independently
changeable.
What's discouraging to me as a entrant to the whole TeX world (but an
experienced programmer) is the (apparently undocumented) redefinition of
a well-established control sequence that used to mean "non-italic" to
mean something different (maybe "serif" -- I still don't know for sure).

If I were choosing a TeX macro package at this point, I would definitely
 look for one that kept semantics of basic TeX command sequences
consistent with the intent expressed in the TeXbook... to avoid package
lock-in, as well as to make the learning curve easier and to be able to
use the resources of the whole TeX community.

That being said, I appreciate the design goals of ConTeXt, including the
desire to have independent controls for +/- italic, +/- serif, etc. I'm
also amazed at the energy that Hans still devotes to answering questions
on this mailing list, 18 years after ConTeXt was written! That's dedication.

Sorry if the above sounds too negative. After all, the TeXbook itself
does not make the semantics of \rm obvious.
However, once you dig deep enough it becomes clear that \rm does mean
"switch to a non-italic typeface" in Plain TeX.


> 
> However, things are different if we start off in a sans serif face, like
> 
> \ss aardvark {\it aardvark {\rm aardvark}}
> 
> Now the \it still gives slanted text, but since the "base" is sans serif 
> we don't get the traditional "italic" appearance that corresponds to a 
> roman "base".  The nested \rm now does that.
> 
> (Note: my terminology is all wrong.  "Base" and "flavor" aren't the 
> right terms at all, but I cannot remember the correct terms right now. 
> I would be grateful is someone could correct me.)
> 
> Cheers,
> Rory
> 

Lars



More information about the ntg-context mailing list