Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TeX vs LaTeX

21 views
Skip to first unread message

Sébastien Vauban

unread,
Jun 16, 2008, 9:46:02 AM6/16/08
to
Hi (David?),

I am trying to learn a bit more of TeX and LaTeX, and I am
wondering if it is possible to get the plain TeX primitives
highlighted differently (different color) than the LaTeX ones?

For example, seeing that `\em' is a TeX command, and that
`\textem' a LaTeX one helps differentiating the two layers, and
understanding more of its internals.

Best regards,
Seb

--
Sébastien Vauban

Joel J. Adamson

unread,
Jun 16, 2008, 5:02:29 PM6/16/08
to Sébastien Vauban, help-gn...@gnu.org
Sébastien Vauban <zthjws...@spammotel.com> writes:

> Hi (David?),
>
> I am trying to learn a bit more of TeX and LaTeX, and I am
> wondering if it is possible to get the plain TeX primitives
> highlighted differently (different color) than the LaTeX ones?
>
> For example, seeing that `\em' is a TeX command, and that
> `\textem' a LaTeX one helps differentiating the two layers, and
> understanding more of its internals.

Hmmm...AUCTeX does this for me already. Are you using AUCTeX? You
should ;)

Joel

--
Joel J. Adamson
(303) 880-3109
Public key: http://pgp.mit.edu
http://www.unc.edu/~adamsonj
http://trashbird1240.blogspot.com


Sébastien Vauban

unread,
Jun 17, 2008, 5:10:23 AM6/17/08
to
Hi Joel,

>> I am trying to learn a bit more of TeX and LaTeX, and I am
>> wondering if it is possible to get the plain TeX primitives
>> highlighted differently (different color) than the LaTeX
>> ones?
>>
>> For example, seeing that `\em' is a TeX command, and that
>> `\textem' a LaTeX one helps differentiating the two layers,
>> and understanding more of its internals.
>
> Hmmm...AUCTeX does this for me already. Are you using AUCTeX?
> You should ;)

I am using AUCTeX (how could I do without it? ;-)), but it does
not (really) work for me, as you can check with:

--8<---------------cut here---------------start------------->8---
\textem{example} % `font-latex-sedate-face'
\em{example} % `font-latex-italic-face' on `font-latex-sedate-face'
--8<---------------cut here---------------end--------------->8---

The only difference is the italic applied on the same face...

And I just read a message from Ralf:

,----[ http://osdir.com/ml/emacs.auctex.general/2006-01/msg00069.html ]
|
| There is no distinction between LaTeX and non-LaTeX commands.
| It's more like between commands AUCTeX knows and those it
| doesn't know. But this distinction is not consequently followed.
| There are quite a lot commands AUCTeX knows but which are
| colored with `font-latex-sedate-face'.
`----

In fact, it would find it nice, would the LaTeX keywords be
highlighted differently than the TeX ones, or as well from
unknown ones (would I import a ConTeXt document!)...

The same applies for the environments: it'd be nice if the
default ones (`document', for example) would be different than
my own (like `indentated-par').

Peter Dyballa

unread,
Jun 17, 2008, 6:13:18 AM6/17/08
to Sébastien Vauban, emacs list

Am 17.06.2008 um 11:10 schrieb Sébastien Vauban:

> --8<---------------cut here---------------start------------->8---
> \textem{example} % `font-latex-sedate-face'
> \em{example} % `font-latex-italic-face' on `font-latex-sedate-
> face'
> --8<---------------cut here---------------end--------------->8---
>
> The only difference is the italic applied on the same face...


Because \textem{} is neither LaTeX nor TeX but something you might
have invented. I can't find it my LaTeX Companion, second edition,
from January 2005 ...


The is not much sense in distinguishing between so-called "TeX" and
so-called "LaTeX." LaTeX understands TeX quite well. Do you change
your voice or do something else while speaking and using a word that
has its origin in Latin or one that has Celtic or Scandinavian
ancestors or one that has been taken over from English or German?

I think it's possible to work through all available TeX sources on
CTAN and determine the few thousand code words that they get
fontified differently then obvious LaTeX code words.

--
Greetings

Pete

One-Shot Case Study, n.:
The scientific equivalent of the four-leaf clover, from
which it is concluded all clovers possess four leaves
and are sometimes green.

Sébastien Vauban

unread,
Jun 17, 2008, 7:34:12 AM6/17/08
to
Hi Peter,

--8<---------------cut here---------------start------------->8---
\textem{example} % `font-latex-sedate-face'
\em{example} % `font-latex-italic-face' on `font-latex-sedate-face'
--8<---------------cut here---------------end--------------->8---
>>
>> The only difference is the italic applied on the same face...
>
> Because \textem{} is neither LaTeX nor TeX but something you
> might have invented. I can't find it my LaTeX Companion,
> second edition, from January 2005 ...

Weird. Searching on Google for `textem latex' results in
4,930 results, whose two of them are the following:

,----[ Introduction to LaTeX ]
|
| LaTeX provides lots of typestyles. Below is a list of some of
| the styles. To get italics, you can type \textit{italics}:
|
| * \textrm - Roman
| * \textit - Italics
| * \textem - Emphasis (toggles between \it and \rm)
| * \textbf - Boldface
| * \textsl - Slanted
| * \textsf - Sans serif
| * \textsc - Small caps
| * \texttt - Typewriter
`----

or

,----[ a short introduction ]
|
| Marking up text
| Emphasis: {\em ...} or \textem{...}
`----

which clearly shows what I explained: the use of the TeX or of
the LaTeX command.


> The is not much sense in distinguishing between so-called
> "TeX" and so-called "LaTeX." LaTeX understands TeX quite well.

I know, but it would help me learning when I write TeX or when I
write LaTeX. It gives a feeling of what's portable, and what's
not (to or from ConTeXt, for example).


> Do you change your voice or do something else while speaking
> and using a word that has its origin in Latin or one that has
> Celtic or Scandinavian ancestors or one that has been taken
> over from English or German?

No, but sometimes you will say the expression /between quotes/.

And analogies are bad... because you always can show one thing
and its opposite.

Seb

--
Sébastien Vauban

Joost Kremers

unread,
Jun 17, 2008, 7:41:49 AM6/17/08
to
Sébastien Vauban wrote:
> Weird. Searching on Google for `textem latex' results in
> 4,930 results, whose two of them are the following:

but sometimes things change in latex.

> ,----[ Introduction to LaTeX ]
> |
> | LaTeX provides lots of typestyles. Below is a list of some of
> | the styles. To get italics, you can type \textit{italics}:
> |
> | * \textrm - Roman
> | * \textit - Italics
> | * \textem - Emphasis (toggles between \it and \rm)
> | * \textbf - Boldface
> | * \textsl - Slanted
> | * \textsf - Sans serif
> | * \textsc - Small caps
> | * \texttt - Typewriter
> `----

that document is twelve years old.

> or
>
> ,----[ a short introduction ]
> |
> | Marking up text
> | Emphasis: {\em ...} or \textem{...}
> `----

that one's 14 years old.

\textem may have existed at one point, but it doesn't exist anymore. (at
least, *my* latex install doesn't know about it. it throws up an error when
i use it.) use \emph instead, which is what you'll find in any recent
latex-intro.


--
Joost Kremers joostk...@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)

Sébastien Vauban

unread,
Jun 17, 2008, 7:52:31 AM6/17/08
to
Hi Joost,

>> Weird. Searching on Google for `textem latex' results in
>> 4,930 results, whose two of them are the following:
>
> but sometimes things change in latex.
>
>> ,----[ Introduction to LaTeX ]
>> |
>> | LaTeX provides lots of typestyles. Below is a list of some of
>> | the styles. To get italics, you can type \textit{italics}:
>> |

>> | * \textem - Emphasis (toggles between \it and \rm)

>> `----
>
> that document is twelve years old.
>
>> or
>>
>> ,----[ a short introduction ]
>> |
>> | Marking up text
>> | Emphasis: {\em ...} or \textem{...}
>> `----
>
> that one's 14 years old.
>
> \textem may have existed at one point, but it doesn't exist
> anymore. (at least, *my* latex install doesn't know about it.
> it throws up an error when i use it.) use \emph instead, which
> is what you'll find in any recent latex-intro.

OK, you're right. Thanks for pointing that out!!

But that doesn't change the essence of my question... ;-)

Seb

--
Sébastien Vauban

Joost Kremers

unread,
Jun 17, 2008, 8:21:22 AM6/17/08
to
Sébastien Vauban wrote:
>>> or
>>>
>>> ,----[ a short introduction ]
>>> |
>>> | Marking up text
>>> | Emphasis: {\em ...} or \textem{...}
>>> `----
>>
>> that one's 14 years old.

actually, that one's only four years old, my mistake. (or the author's,
because i was already using latex in 2004 and i don't think \textem still
existed then...)

the reason for the namechange (\textem --> \emph) probably lies in the fact
that this command toggles between italic and upright shapes, while the
other \textxx commands choose a shape/weight unconditionally.

> But that doesn't change the essence of my question... ;-)

i seem to remember reading on comp.text.tex once that some tex commands are
redefined in latex, so that they behave slightly differently when used in
latex than when used in tex. (the point being that you should avoid using
tex commands in latex unless you *really* know what you're doing.)

the general consensus is that you should use either tex or latex, and not
mix them. so distinguishing between the two types of commands probably
isn't a high priority for many people, which means it isn't implemented in
tex/latex modes or auctex. certainly with auctex it isn't impossible to
configure the system to do what you want, but you'd probably have to quite
a lot of customisation. personally, i don't think it's worth the effort.

Peter Dyballa

unread,
Jun 17, 2008, 10:07:39 AM6/17/08
to Joost Kremers, Sébastien Vauban, help-gn...@gnu.org

Am 17.06.2008 um 14:21 schrieb Joost Kremers:

> the general consensus is that you should use either tex or latex,
> and not
> mix them. so distinguishing between the two types of commands probably
> isn't a high priority for many people, which means it isn't
> implemented in
> tex/latex modes or auctex. certainly with auctex it isn't
> impossible to
> configure the system to do what you want, but you'd probably have
> to quite
> a lot of customisation. personally, i don't think it's worth the
> effort.


Right. I am pretty sure I never use TeX in a LaTeX document to be
compiled into PDF – why should I, what could I get? The use of TeX
primitives sometimes cannot be avoided in CLS (or STY) files. And
those who are able to do the latter don't need reminders.

The LaTeX Companion is a good orientation for LaTeX users.

--
Greetings

Pete

Never be led astray onto the path of virtue


Marcel Korpel

unread,
Jun 17, 2008, 7:16:19 PM6/17/08
to help-gn...@gnu.org
2008/6/16 Sébastien Vauban <zthjws...@spammotel.com>:

> For example, seeing that `\em' is a TeX command, and that
> `\textem' a LaTeX one

To be a nitpicker: actually, `\em' is also a LaTeX command and not a
plain TeX command. ;)

Kind regards,
Marcel (plain TeX user)


0 new messages