difference between TeX behavior and ConTeXt
Hello, I've been reading through the TeXbook to solidify the foundations for TeX programming. In an exercise on roman and italic text, ConTeXt seems to behave differently from what the book specifies (Plain TEX) at a fairly fundamental level. Exercise 4.1 says, "Explain how to typeset a roman word in the midst of an italicized sentence." I wrote, and the solution in the appendix says, {\it Explain how to typeset a\/ {\rm roman} word in the midst of an italicized sentence.} But when I typeset this using texexec, the word "roman" appears in italic, just like the rest of the sentence. I tried this on both Windows XP and Ubuntu Linux, with both PDFTex and Xetex engines. On Windows I'm using ConTeXt minimal, and on Linux I'm using ConTeXt from the TeXLive 2008 CD. The result is the same in all cases: all the text is italicized. Does this difference in behavior represent a known "feature" of ConTeXt? If so, is it a difference in the defined behavior of \rm? When I put \show\rm in the .tex file to display the definition of the \rm macro, and run texexec, I get: > \rm=\protected macro: ->\setcurrentfontstyle {rm}. l.7 \show\rm By contrast, according to http://webpages.charter.net/davidlha/.trm/trmi.html, "Plain TeX defines \rm to be `\fam=0 \tenrm'." So clearly the definition of the \rm macro is different in ConTeXt than it is in Plain TeX. I could understand ConTeXt possibly changing the details of \rm's definition, e.g. a change in default font family; but it would really be surprising to find that the logic of \rm's behavior has been changed. Please help me understand if this is a bug or if there is a design principle of ConTeXt that I should be aware of... Thanks, Lars
On Tue, 25 Nov 2008, Lars Huttar wrote:
Hello,
I've been reading through the TeXbook to solidify the foundations for TeX programming. In an exercise on roman and italic text, ConTeXt seems to behave differently from what the book specifies (Plain TEX) at a fairly fundamental level.
I could understand ConTeXt possibly changing the details of \rm's definition, e.g. a change in default font family; but it would really be surprising to find that the logic of \rm's behavior has been changed.
Please help me understand if this is a bug or if there is a design principle of ConTeXt that I should be aware of...
It is a design decision. See the chapter of typography (http://context.aanhet.net/svn/contextman/context-reference/en/co-typography....) in the new manual (under preparation). Aditya
On 11/25/2008 3:27 PM, Aditya Mahajan wrote:
On Tue, 25 Nov 2008, Lars Huttar wrote:
Hello,
I've been reading through the TeXbook to solidify the foundations for TeX programming. In an exercise on roman and italic text, ConTeXt seems to behave differently from what the book specifies (Plain TEX) at a fairly fundamental level.
I could understand ConTeXt possibly changing the details of \rm's definition, e.g. a change in default font family; but it would really be surprising to find that the logic of \rm's behavior has been changed.
Please help me understand if this is a bug or if there is a design principle of ConTeXt that I should be aware of...
It is a design decision. See the chapter of typography (http://context.aanhet.net/svn/contextman/context-reference/en/co-typography....) in the new manual (under preparation).
Aditya
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. The explanation of \em shows that ConTeXt's \em has different behavior from Plain TeX's \it (especially when nesting styles), but doesn't say that \it or \rm have changed behavior. Lars
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" while ConTeXt uses it to mean just "not sans serif". 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. 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
The explanation of \em shows that ConTeXt's \em has different behavior from Plain TeX's \it (especially when nesting styles), but doesn't say that \it or \rm have changed behavior.
Lars ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
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
On Tue, Nov 25 2008, Lars Huttar wrote:
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? :-)
Hello Lars, It's in chapter 5 of the user manual (without flashing orange lights): http://www.pragma-ade.com/general/manuals/cont-eni.pdf or http://www.pragma-ade.com/general/manuals/cont-enp.pdf Cheers, Peter -- http://pmrb.free.fr/contact/
Dnia Tue, Nov 25, 2008 at 10:30:51PM -0600, Lars Huttar napisał(a):
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).
Hi, and welcome to the TeX world;). Me not being an experienced programmer, but (some kind) of more or less experienced TeX user, I'd add the following. In general, there are three 'mainstream' TeX macropackages: plain TeX (say, plus AMSTeX), LaTeX and ConTeXt. It seems that the majority of the TeX world uses LaTeX; most people, when they say "TeX", mean essentially "LaTeX". LaTeX is a a big beast, and if you are new to TeX _and_ don't want to submit papers to math/cs journals (which are seldom aware of ConTeXt, I'm afraid), learning LaTeX may not be exactly what you want. There is also a very small minority using plain TeX (including Knuth, who doesn't use LaTeX; he was once asked why, and said: "I'm afraid of large systems";)). The TeXbook is about two things: plain TeX and using the TeX engine itself. Then there is another minority (but growing, I believe) of ConTeXt users. For example, I am a plain-to-LaTeX and then (after 5 years or so) LaTeX-to-ConTeXt convert (still using LaTeX when writing papers which I want to submit somewhere, though, and plain TeX when doing something really atypical). It is probably true that plain TeX is weird and "incomplete" in a sense. What \rm means in plain TeX is: "switch to upright, serif font in 10pt size". It _might_ be modified (in the TeXbook spirit) to, e.g., "switch to upright, serif font in _current_ size" - but please note that plain TeX itself has _no_ notion of "current size" (or, in other words, "current size" in plain TeX is fixed at 10pt). What Knuth mentions in the TeXbook is that you might want to write some macros to introduce something like a flexible "current size" - he even shows how to do it in Appendix E - but it is no longer plain vanilla TeX then! So what you did was to extrapolate plain TeX's meaning of \rm to a situation outside plain TeX itself (although in Knuthian spirit). So, everything I said above is trivial when applied just to \rm, but I wanted to try to explain the differences between plain TeX, LaTeX and ConTeXt. So to finish this explanation, I would say the following: * Plain TeX is a DIY thing. Cross-references, automatic numbering of chapters etc., bibliographies, including graphics, etc., etc. - forget it, it just isn't there. This is very fine if you're doing something really unusual (and this happens from time to time) and don't need such features, but you want to _exactly_ know what is happening where: plain TeX is small and easy to grasp (at least, when compared to LaTeX or ConTeXt). * LaTeX is what they call a "document preparation system", but that's a lie. LaTeX is a "scientific paper/monograph preparation system"; you _may_ typeset a cookbook, a school test, or a software manual in LaTeX, but it is a (sometimes small, sometimes big) pain. It is just not the best tool. Of course, it flexible, extensible, even Turing complete, so you can do everything - but it is sometimes like simulating recursion in BASIC using arrays as a stack: possible, but no-one would like to do it. The popularity of LaTeX caused, however, the situation when there is a LaTeX package for everything (and sometimes even three of them, each with different set of features and bugs...), so the pain is (usually) not that big, but still sometimes writing stuff in LaTeX is not very comfortable. * ConTeXt is something much more universal than LaTeX - without the scientific bias - but probably less stable than LaTeX, less documented and with smaller userbase (but: smaller does not mean less active nor less helpful!). The flexibility of plain TeX, LaTeX and ConTeXt is obviously similar (well, with ConTeXt actually bigger since the advent of luatex), but it is sometimes _very_ different in terms of easiness (and level of frustration), sometimes with LaTeX having more wtf per minute and sometimes ConTeXt. It seems, however, that Hans considered much more special cases when writing ConTeXt, so many thing are more natural in ConTeXt than in LaTeX (where even simplest things sometimes need an external package - for example, changing the style of enumerations).
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.
As said - almost no-one uses plain TeX. Both LaTeX and ConTeXt claim to be "built on top of plain TeX", but in both cases it does _not_ mean "saving the meaning of each and every plain TeX command" (and that is clearly stated in both sources!).
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.
That's right. I would add one more point: if everyone called the software of ConTeXt quality "beta", then Windows would be pre-alpha and a typical GNU/Linux probably something between alpha and beta.
Sorry if the above sounds too negative. After all, the TeXbook itself does not make the semantics of \rm obvious.
Well, it does, but _not_ in the context of changing sizes/styles/etc...
However, once you dig deep enough it becomes clear that \rm does mean "switch to a non-italic typeface" in Plain TeX.
I'll stress it again: no. In plain TeX, it means "switch to cmr10 at 10pt", full stop. Greets -- Marcin Borkowski (http://mbork.pl) Walka trwa! Nie przeciw ciału i krwi, lecz przeciw złym siłom. Naszym ogniem Miłość Boga, naszym mieczem wierność Jego! Walka trwa! (Izaiash)
Marcin Borkowski wrote:
Me not being an experienced programmer, but (some kind) of more or less experienced TeX user, I'd add the following.
... makes a nice 'about tex systems' page for the wiki ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 11/26/2008 2:41 AM, Marcin Borkowski wrote:
Dnia Tue, Nov 25, 2008 at 10:30:51PM -0600, Lars Huttar napisał(a):
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).
Hi,
and welcome to the TeX world;).
Me not being an experienced programmer, but (some kind) of more or less experienced TeX user, I'd add the following.
I appreciate your time and the explanations, from an experienced TeX user. (To all) please pardon the frustration apparent in my previous email, from a TeX and especially ConTeXt newbie.
It is probably true that plain TeX is weird and "incomplete" in a sense. What \rm means in plain TeX is: "switch to upright, serif font in 10pt size".
This is good to know. However what I'm getting at is not just its concrete definition (implementation) in Plain TeX, but its general intent. The reason I ask that question is this: Knuth makes clear in TeXbook ch. 4 that \rm and other macros are intended to be redefined according to the needs of the book section. Therefore \rm is not intended to remain defined always specifically as "switch to upright, serif font in 10pt size". But it is *not* intended that \rm be defined to mean "reduce the left margin to the dimension provided by the following argument", or even "switch to italic, serif font in 10pt size". Sure you could define \rm to mean anything, but your end users would string you up. Somewhere between those extremes is an intended consistency of meaning for \rm. If it were not so, macro packages would be gibberish, intelligible to the executing processor but intractable for humans. My contention is that the intended "invariant" of \rm semantics, communicated in TeXbook (e.g. exercise 4.2 and the bottom of p. 15), is that of "not italic".
[helpful orientation on the major macro packages snipped]
(and level of frustration), sometimes with LaTeX having more wtf per minute
I had not heard of that metric before. :-)
That's right. I would add one more point: if everyone called the software of ConTeXt quality "beta", then Windows would be pre-alpha and a typical GNU/Linux probably something between alpha and beta.
Except perhaps the documentation. I have yet to find a reference that clearly describes what \rm is to do in ConTeXt. One responder pointed to http://www.pragma-ade.com/general/manuals/cont-eni.pdf. The closest thing to a definition of \rm there that I could find is on p. 111: "The command \rm is used to switch to a roman/serif/regular style,..." These three terms are not explicitly defined; they are given as names of styles in an illustrative table above. One may apparently assume that the meaning "serif" style here actually is intended to mean that the typeface has serifs (not a trivial assumption: see 'regular'). However the examples of serif/regular/roman in the illustrative table are also all non-italic, and the word "regular" in typography usually (as far as I can tell... please enlighten) means "upright" in contrast to italic. Yet apparently \rm does not switch to "regular" (if that means or includes "upright") in ConTeXt.
Sorry if the above sounds too negative. After all, the TeXbook itself does not make the semantics of \rm obvious.
Well, it does, but _not_ in the context of changing sizes/styles/etc...
Again, I think we're talking about two different things: the original macro definition in Plain TeX, vs. the communicated intended invariant meaning over redefinitions of \rm in various "formats" (Knuth's term which I take to mean macro packages or something like that).
However, once you dig deep enough it becomes clear that \rm does mean "switch to a non-italic typeface" in Plain TeX.
I'll stress it again: no. In plain TeX, it means "switch to cmr10 at 10pt", full stop.
See previous comment. But even in plain TeX, "switch to cmr10 at 10pt" *does* include switching to a non-italic typeface, which is what I meant here. I didn't mean that in plain TeX \rm means *only* "switch to a non-italic typeface." Sorry that wasn't clear. And the jolt here with ConTeXt is that the meaning of \rm no longer includes "switch to a non-italic typeface", and that this change is not clearly documented. Lars
On 11/26/2008 7:43 AM, Lars Huttar wrote: ...
and the word "regular" in typography usually (as far as I can tell... please enlighten) means "upright" in contrast to italic.
I now see that "regular" (apparently less often) can refer to weight: "not bold or light". Still, the point remains. Lars
Lars Huttar wrote:
Except perhaps the documentation. I have yet to find a reference that clearly describes what \rm is to do in ConTeXt. One responder pointed to http://www.pragma-ade.com/general/manuals/cont-eni.pdf. The closest thing to a definition of \rm there that I could find is on p. 111: "The command \rm is used to switch to a roman/serif/regular style,..."
In his first reply to your message, Aditya posted the link to the new manual chapter on "Typography". This chapter and the following one "Fonts" are planned to be the definitive answer to all questions regarding fonts and font selection in ConTeXt. If you believe the text could be improved even further beyond the changes already made compared to the manual at Pragma ADE, please tell us how (for sure, the meaning of the macro \rm is not going to change!). We all want the manual to be as good as humanly possible, but it is often quite hard to write at beginners' level when you have advanced past that point yourself. If you can find a good (or at least better) way to express what \rm,\ss,\tt,\hw and \cg do compared to the current prose in co-typography, please post it. Just keep in mind that the manual has to remain independant, so texts that presuppose knowledge of plain TeX and/or LaTeX are not acceptable except as a side/footnote. Best wishes, Taco
On 11/26/2008 8:11 AM, Taco Hoekwater wrote:
Lars Huttar wrote:
Except perhaps the documentation. I have yet to find a reference that clearly describes what \rm is to do in ConTeXt. One responder pointed to http://www.pragma-ade.com/general/manuals/cont-eni.pdf. The closest thing to a definition of \rm there that I could find is on p. 111: "The command \rm is used to switch to a roman/serif/regular style,..."
In his first reply to your message, Aditya posted the link to the new manual chapter on "Typography". This chapter and the following one "Fonts" are planned to be the definitive answer to all questions regarding fonts and font selection in ConTeXt.
If you believe the text could be improved even further beyond the changes already made compared to the manual at Pragma ADE, please tell us how (for sure, the meaning of the macro \rm is not going to change!).
Understood. :-)
We all want the manual to be as good as humanly possible, but it is often quite hard to write at beginners' level when you have advanced past that point yourself.
Understood too.
If you can find a good (or at least better) way to express what \rm,\ss,\tt,\hw and \cg do compared to the current prose in co-typography, please post it. Just keep in mind that the manual has to remain independant, so texts that presuppose knowledge of plain TeX and/or LaTeX are not acceptable except as a side/footnote.
Thank you for being willing to take input to improve the documentation. My #1 wish would be a reference section where \rm is described unambiguously. So, for example, it would be very helpful to have it at http://texshow.contextgarden.net/, since that is presented on the ConTeXt garden wiki as a "ConTeXt command reference", "for all user-commands that can be used in ConTeXt" (cc'ing Patrick Gundlach for this reason). I see instructions there for commenting on a command, but no way to request addition of a command. In any case, an unambiguous description would be, instead of switch to a roman/serif/regular style [p. 3 of new manual chapter on typography] something like this: switch to a serif style (if that's what \rm means in ConTeXt -- I still don't know for sure). The word "regular" is ambiguous, as it commonly contrasts with "italic" but sometimes with "bold". (And should I infer now that it sometimes contrasts with sans-serif?) Similarly, "roman" can have multiple meanings. To Knuth it meant "non-italic". As far as I'm aware, the term "serif style" is unambiguous. (But I'm not a professional typographer.) Table 1.2 lists "\rm serif, regular, roman, rm" but does not say whether all the words in the right column are supposed to be synonyms for the same typeface attribute, or constitute a collection of different attributes. It appears that some of them are the internal names of styles? (the last one in each row), while others may be merely descriptive. It would be helpful to have headers on the columns in this table so that the reader knows what the data in each column indicates. If everything in the right column is a command sequence in ConTeXt (perhaps it's a defined font), it would be helpful to know that. The first column could have the header "Command", matching the table caption. The second column header depends on what the stuff in the second column is. If it's intended to be merely a natural-language description of what the command in the first column does, I think it could be clarified as follows: Command / Switch to style / Internal style name \rm / serif / rm \ss / sans serif (a.k.a. "support") / ss \tt / typewriter (monospaced) / tt \hw / handwritten / hw \cg / calligraphic / cg none / / mm I put the "Internal style name" column in there for completeness, but it's not clear to me whether this is the meaning that was intended, nor why a user would want to know about internal style names already... but maybe that's just me. Another place I would change it is p.4 under 1.3.1: "Examples of styles within a family are: ‘roman’, ‘sans serif’ and ‘teletype’" could be clarified as "Examples of styles within a family are: ‘roman’ (which in ConTeXt means ‘serif’), ‘sans serif’ and ‘teletype’". Thanks... your hard work and thick skin are appreciated. :-) Lars
Lars Huttar wrote:
something like this:
switch to a serif style
(if that's what \rm means in ConTeXt -- I still don't know for sure).
\rm in ConTeXT means: switch to the internal style group named "rm" (and likewise for \ss -> "ss" etc.) Whether "rm" points to a group of fonts that actually have serifs attached to the glyph shapes depends totally on the specific typescript that is being used in the document (usually they will, and I think all the predefined typescripts are set up that way, but that is not a requirement at all). The basic idea is that the style "rm" switches to the font set used for the main portion of the text. "ss" is the style for supporting texts, like section heads and headers/footers. "tt" is useful for fixed-width text, (this gets it own special group because it is very often needed in manuals). "hw", and "cg" are variations for different forms of supporting texts, these are rarely used. Does it make more sense now? Best wishes, Taco
On 11/27/2008 3:57 AM, Taco Hoekwater wrote:
Lars Huttar wrote:
something like this:
switch to a serif style
(if that's what \rm means in ConTeXt -- I still don't know for sure).
\rm in ConTeXT means: switch to the internal style group named "rm" (and likewise for \ss -> "ss" etc.)
Whether "rm" points to a group of fonts that actually have serifs attached to the glyph shapes depends totally on the specific typescript that is being used in the document (usually they will, and I think all the predefined typescripts are set up that way, but that is not a requirement at all).
The basic idea is that the style "rm" switches to the font set used for the main portion of the text. "ss" is the style for supporting texts, like section heads and headers/footers. "tt" is useful for fixed-width text, (this gets it own special group because it is very often needed in manuals). "hw", and "cg" are variations for different forms of supporting texts, these are rarely used.
Does it make more sense now?
Thank you, that helps a lot. I understand now that \rm is more abstract than I'd initially thought... more powerful but also harder to predict. Nevertheless useful generalizations can be made (as you showed) that are helpful in learning the system. I think it would be worthwhile to explain that in the manual you are writing (if it doesn't already... sorry, I'm on a tight deadline now and can't recheck!)... that the style "rm" switches to the font set used for the main portion of the text, which typically is a serif font. I think it would also be helpful to note that this switch does not (normally?) affect italicization, because some TeX-world users will be coming in with wrong expectations regarding "rm" and italics. Best wishes, Lars
Lars Huttar wrote:
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."
you should keep in mind that plain tex is not meant as general puspose macro package but as base under Don Knuths own book related styles for instance, there is no general font system, just a bunch of definitions related to computer modern and math; also there is some math setup, some register management, some structure commands and a bit of tabular stuff at that time i think that the general idea was that one would write a style for each book (or series) and that a plain like package can be used as basis context is (like latex, lamstex, inrstex, amstex, ...) a more generic and configurable macro package both methods (dedicated vs generic) have their (dis)advantages
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 --
not in tex, since tex itself has no macros defined, but in plain tex Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 11/25/2008 3:21 PM, Lars Huttar wrote: ....
When I put \show\rm in the .tex file to display the definition of the \rm macro, and run texexec, I get:
\rm=\protected macro: ->\setcurrentfontstyle {rm}. l.7 \show\rm By contrast, according to http://webpages.charter.net/davidlha/.trm/trmi.html, "Plain TeX defines \rm to be `\fam=0 \tenrm'." So clearly the definition of the \rm macro is different in ConTeXt than it is in Plain TeX.
P.S. The same TeX reference reports, "This switch plus the assignments made by Plain TeX are what makes `${\rm text }$' typeset `text' in roman instead of in italics [154]." where [154] refers to the page number in the TeXbook. The latter says "The control sequence \rm is an abbreviation for '\fam=0 \tenrm'; thus, \rm causes \fam to become zero, and it makes \tenrm the "current font." In horizontal mode, the \fam value is irrelevant and the current font governs the typesetting of letters; ... [stuff about math mode, which doesn't seem to apply to this situation]." FWIW.
Hi,
On Tue, 25 Nov 2008 14:29:09 -0700, Lars Huttar
P.S. The same TeX reference reports,
Be careful, PlainTeX is a macropaackage, just as ConTeXt is. One must distinguish PlainTeX commands from the TeX (and pdftex/luaTeX) primitives. Although some PlainTeX commands work similarly to the ConTeXt counterparts, you can rarely assume this. There are lots and lots more examples. Better to just treat them as very distinct macropackages, with a few commonly USED command names in common, but used to MENTION different things. Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department of Philosophy Colorado State University Fort Collins, CO 80523
On 11/25/2008 10:15 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
Hi,
On Tue, 25 Nov 2008 14:29:09 -0700, Lars Huttar
wrote: P.S. The same TeX reference reports,
Be careful, PlainTeX is a macropaackage, just as ConTeXt is. One must distinguish PlainTeX commands from the TeX (and pdftex/luaTeX) primitives. Although some PlainTeX commands work similarly to the ConTeXt counterparts, you can rarely assume this. There are lots and lots more examples. Better to just treat them as very distinct macropackages, with a few commonly USED command names in common, but used to MENTION different things.
Ah... thanks... Lars
participants (8)
-
Aditya Mahajan
-
Hans Hagen
-
Idris Samawi Hamid ادريس سماوي ح امد
-
Lars Huttar
-
Marcin Borkowski
-
Peter Münster
-
Rory Molinari
-
Taco Hoekwater