Discussion:
TeX vs LaTeX
Sébastien Vauban
2008-06-16 13:46:02 UTC
Permalink
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
2008-06-16 21:02:29 UTC
Permalink
Post by Sébastien Vauban
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
2008-06-17 09:10:23 UTC
Permalink
Hi Joel,
Post by Sébastien Vauban
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').

Best regards,
Seb
--
Sébastien Vauban
Peter Dyballa
2008-06-17 10:13:18 UTC
Permalink
Post by 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
2008-06-17 11:34:12 UTC
Permalink
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---
Post by Peter Dyballa
Post by Sébastien Vauban
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.
Post by Peter Dyballa
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).
Post by Peter Dyballa
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
2008-06-17 11:41:49 UTC
Permalink
Post by Sébastien Vauban
Weird. Searching on Google for `textem latex' results in
but sometimes things change in latex.
Post by Sébastien Vauban
,----[ Introduction to LaTeX ]
|
| LaTeX provides lots of typestyles. Below is a list of some of
|
| * \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.
Post by Sébastien Vauban
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 ***@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
Sébastien Vauban
2008-06-17 11:52:31 UTC
Permalink
Hi Joost,
Post by Joost Kremers
Post by Sébastien Vauban
Weird. Searching on Google for `textem latex' results in
but sometimes things change in latex.
Post by Sébastien Vauban
,----[ Introduction to LaTeX ]
|
| LaTeX provides lots of typestyles. Below is a list of some of
|
| * \textem - Emphasis (toggles between \it and \rm)
`----
that document is twelve years old.
Post by Sébastien Vauban
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
2008-06-17 12:21:22 UTC
Permalink
Post by Joost Kremers
Post by Sébastien Vauban
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.
--
Joost Kremers ***@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
Peter Dyballa
2008-06-17 14:07:39 UTC
Permalink
Post by 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
2008-06-17 23:16:19 UTC
Permalink
Post by Sébastien Vauban
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)

Continue reading on narkive:
Loading...