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

\textsuperscript, \textsubscript?

3,890 views
Skip to first unread message

Rick Schumeyer

unread,
Apr 2, 1997, 3:00:00 AM4/2/97
to

I know the command \textsuperscript exists, but is there an analogous
command for subscripts? \textsubscript does not work. Or do I have
to use math mode?

--
Rick Schumeyer
schu...@asel.udel.edu

Young U. Ryu

unread,
Apr 2, 1997, 3:00:00 AM4/2/97
to


Rick Schumeyer <schu...@kansas.asel.udel.edu> wrote in article
<5hub12$6...@kansas.asel.udel.edu>...

> I know the command \textsuperscript exists, but is there an analogous
> command for subscripts? \textsubscript does not work. Or do I have
> to use math mode?
>

In latex.ltx, \textsuperscript is defined as:

\DeclareRobustCommand*\textsuperscript[1]{%
\@textsuperscript{\selectfont#1}}
\def\@textsuperscript#1{%
{\m@th\ensuremath{^{\mbox{\fontsize\sf@size\z@#1}}}}}

For \textsubscript, you can do:

\DeclareRobustCommand*\textsubscript[1]{%
\@textsubscript{\selectfont#1}}
\def\@textsubscript#1{%
{\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}

Put it in a file with extension .sty and use it as a package
or in your document somewhere between \documentclass and \begin{document}.
In the second case, wrap it with \makeatletter and \makeatother.

Young

David Carlisle

unread,
Apr 2, 1997, 3:00:00 AM4/2/97
to Rick Schumeyer

schu...@kansas.asel.udel.edu (Rick Schumeyer) writes:

>
> I know the command \textsuperscript exists, but is there an analogous
> command for subscripts? \textsubscript does not work. Or do I have
> to use math mode?
>

Serious question, what are you all doing with these subscripts?

\textsuperscript was added to be able to go 4\testsuperscript{th}
and to do footnote markers in the current text (not math) font.

At the time no one could see any possible use for \textsubscript so
it was not added to save making latex bigger than necessary.

Now it seems about once a fortnight someone asks why \textsubscript
is missing.

Is this really a non-mathematical use, or are you just loking for a
shorthand for $_x$ ????????

David

Juergen Schlegelmilch

unread,
Apr 7, 1997, 3:00:00 AM4/7/97
to

On 02 Apr 1997, David Carlisle <carl...@klopfer.zdv.uni-mainz.de> wrote:
>Serious question, what are you all doing with these subscripts?
[ deletions ]

>Is this really a non-mathematical use, or are you just loking for a
>shorthand for $_x$ ????????

I for one use it to typeset product names (e.g. O\textsubscript{2},
which is an database, or SIGMA\textsubscript{DBMS} which is a research
project). The usage of $_2$ looks like a misusage of math mode to me,
I would then ratther use $\textrm{O}_2$ but this introduces unnecessarily
math mode into my document; since the T1 encoding has no counterpart in
math mode, I want to restrict math mode to where it is really necessary
to avoid loading CM fonts.

Juergen
--
+-----------------------------------------------------------------------------+
Dipl.-Inf. Juergen Schlegelmilch University of Rostock
email: schl...@Informatik.Uni-Rostock.de Computer Science Department
http://www.informatik.uni-rostock.de/~schlegel Database Research Group
Tel: ++49 381 498 3402 18051 Rostock
Fax: ++49 381 498 3426 Germany
+-----------------------------------------------------------------------------+

Stefan Schulz

unread,
Apr 8, 1997, 3:00:00 AM4/8/97
to


>\textsuperscript was added to be able to go 4\testsuperscript{th}
>and to do footnote markers in the current text (not math) font.

>At the time no one could see any possible use for \textsubscript so
>it was not added to save making latex bigger than necessary.

>Now it seems about once a fortnight someone asks why \textsubscript
>is missing.

>Is this really a non-mathematical use, or are you just loking for a
>shorthand for $_x$ ????????

I write chemistry papers, and use formulas like C$_{10}$H$_{22}$ quite often.
This becomes difficult to format when used in chapter headings in bold or in
italisc. Therefore I would very muchj appreciate a command like
\textsubscript in latex2e.

Unfornately, the poor chemists are always the last somebody thinks of
(sigh, just a joke). Therefore, many major chemistry journals now require
manuscripts to be prepared in winword or wordstar.

Best wishes
Stefan Schulz
ssc...@chemie.uni-hamburg.de

J%org Knappen

unread,
Apr 8, 1997, 3:00:00 AM4/8/97
to

Stefan Schulz schrieb:

!>Is this really a non-mathematical use, or are you just loking for a
!>shorthand for $_x$ ????????
!
!I write chemistry papers, and use formulas like C$_{10}$H$_{22}$ quite often.
!This becomes difficult to format when used in chapter headings in bold or in
!italisc. Therefore I would very muchj appreciate a command like
!\textsubscript in latex2e.
!
!Unfornately, the poor chemists are always the last somebody thinks of
!(sigh, just a joke). Therefore, many major chemistry journals now require
!manuscripts to be prepared in winword or wordstar.

What I find really striking, is that there are at least three TeX or LaTeX
packages out there to handle the chemical _artwork_ (like ring structures and all
that), but I don't know any package handling the _basics_ of chemical formula
(like reaction equations or formulae of the type C$_{10}$H$_{22}$) in a sensible
way. It was long ago proposed, that a special _math version_ (in LaTeX2e speak)
could handle this appropriately, but no one ever bothered to sort out how it has
to look and/or to implement it.

But of course, with rings and all that you can better show off -- the macho
attitude strikes here!

--J"org Knappen

Robin Fairbairns

unread,
Apr 8, 1997, 3:00:00 AM4/8/97
to

In article <5id3b8$trq$1...@kralle.zdv.Uni-Mainz.DE>,

J%org Knappen <kna...@iphcip1.Physik.Uni-Mainz.DE> wrote:
>What I find really striking, is that there are at least three TeX or
>LaTeX packages out there to handle the chemical _artwork_ (like ring
>structures and all that), but I don't know any package handling the
>_basics_ of chemical formula (like reaction equations or formulae of
>the type C$_{10}$H$_{22}$) in a sensible way. It was long ago
>proposed, that a special _math version_ (in LaTeX2e speak) could
>handle this appropriately, but no one ever bothered to sort out how
>it has to look and/or to implement it.

There is indeed a distinct paucity of packages to do that sort of
thing. I once picked up a Donald Arseneau contribution (to c.t.t)
along those lines, but resurrecting it recently I found it didn't
really do what I want (which includes isotopic species and excitation
levels and the like ... I'm really supporting physicists). What's
more, it was couched in 2.09-isms.

Perhaps Donald (who once said "I'm sooo much smarter now" ;-) has got
a more recent version?

>But of course, with rings and all that you can better show off -- the macho
>attitude strikes here!

Donald, of course, doesn't need to pretend to be more macho than he
is: we all know how much he can do ;-)
--
Robin (Campaign for Real Radio 3) Fairbairns r...@cl.cam.ac.uk
U of Cambridge Computer Lab, Pembroke St, Cambridge CB2 3QG, UK
Home page: http://www.cl.cam.ac.uk/users/rf/robin.html

Ulrich Schmitt, Phys. Chem., ETH Zurich

unread,
Apr 8, 1997, 3:00:00 AM4/8/97
to

In article <5id3b8$trq$1...@kralle.zdv.Uni-Mainz.DE>,
kna...@iphcip1.Physik.Uni-Mainz.DE (J%org Knappen) writes:
>Stefan Schulz schrieb:
> [...]

>!I write chemistry papers, and use formulas like C$_{10}$H$_{22}$ quite often.
>!This becomes difficult to format when used in chapter headings in bold or in
>!italisc. Therefore I would very muchj appreciate a command like
>!\textsubscript in latex2e.

One could also try to avoid formulae in titles, chapter or section
headings ... (And this is also what is done in most standard text books
on chemistry (and similarly in mathematics and physics) as far as I know).

> [...]


> but I don't know any package handling the _basics_ of chemical formula
>(like reaction equations or formulae of the type C$_{10}$H$_{22}$) in a
> sensible way.

> [...]

Do we really need another package? What is wrong with writing
C$_{10}$H$_{22}$ ?
And there is quite a variety of arrows and harpoons for expressing
reaction equations (also together with \stackrel).

I am very happy with LaTeX for chemistry (at least for physical
chemistry where I am).

Regards,
------------------------------------------------------------------------
Ulrich Schmitt | E-Mail: sch...@ir.phys.chem.ethz.ch
Laboratorium fur Phys. Chemie |
ETH Zurich (Zentrum) | Phone: +41 1 632 4440
CH-8092 Zurich, Switzerland | Fax: +41 1 632 1021
------------------------------------------------------------------------

Robin Fairbairns

unread,
Apr 8, 1997, 3:00:00 AM4/8/97
to

In article <5ida4m$iih$1...@elna.ethz.ch>,

Ulrich Schmitt, Phys. Chem., ETH Zurich <sys...@ir.phys.chem.ethz.ch> wrote:
>Do we really need another package? What is wrong with writing
>C$_{10}$H$_{22}$ ?

\usepackage{times}
\begin{document}

... C$_{10}$H$_{22}$ ...

typesets C and H in Times, 0, 1 and 2 in Computer Modern. Something
different needs to be done in all but the most trivial cases.

Peter Schmitt

unread,
Apr 8, 1997, 3:00:00 AM4/8/97
to

>Stefan Schulz writes:
>
>I write chemistry papers, and use formulas like C$_{10}$H$_{22}$ quite often.

>This becomes difficult to format when used in chapter headings in bold or in
>italisc. Therefore I would very muchj appreciate a command like
>\textsubscript in latex2e.
>
( repeating a suggestion I made in answer to a similar request a few
weeks ago : )
If you have to write a lot of formulas you can make your live easier
by defining a `chemical' environment where digits always
(automagically) produce subscripts:
e.g., like this:

\begingroup
\def\dodigits{\do0\do1\do2\do3\do4\do5\do6\do7\do8\do9}
\def\do#1{\catcode`#1 \active}\dodigits
\gdef\dodigits{\do0\do1\do2\do3\do4\do5\do6\do7\do8\do9}
\endgroup
\def\dosub #1{\catcode`#1 \active \edef#1{$_\string#1$}}
\catcode`\| \active
\def |{\bgroup\let|\egroup \let\do\dosub \dodigits }

This makes | an active character and allows you to write:
|H20 H12C4 H0123456789A|

(between the two |'s the 10 digits are made active to produce subscripts)

Remarks:
-- As given above, the meaning of digits between |...| is defined
anew with each use of |.
If one does not mind to have fixed meaning for active digits in the
background (normally, there should be no conflict) the can be defined
once, and (the first) | only is used to make digits active.
-- If $_1$ etc. ( that is the result of the code )
is not satisfactory (because of font choice)
it can be replaced by $_{\hbox{1}}$ or $_{\textrm{1}}$ or a mathchoice,
or whatever will produce the desired font.
(One even could avoid the math $ $ and use \lower instead.)

Peter

mcbane DOT 2 osu DOT edu

unread,
Apr 8, 1997, 3:00:00 AM4/8/97
to

In <5id651$j...@lyra.csx.cam.ac.uk>, r...@cl.cam.ac.uk (Robin Fairbairns) writes:
>In article <5id3b8$trq$1...@kralle.zdv.Uni-Mainz.DE>,
>J%org Knappen <kna...@iphcip1.Physik.Uni-Mainz.DE> wrote:
>>What I find really striking, is that there are at least three TeX or
>>LaTeX packages out there to handle the chemical _artwork_ (like ring
>>structures and all that), but I don't know any package handling the

>>_basics_ of chemical formula (like reaction equations or formulae of
>>the type C$_{10}$H$_{22}$) in a sensible way.

>


>There is indeed a distinct paucity of packages to do that sort of
>thing. I once picked up a Donald Arseneau contribution (to c.t.t)
>along those lines, but resurrecting it recently I found it didn't
>really do what I want (which includes isotopic species and excitation
>levels and the like ... I'm really supporting physicists). What's
>more, it was couched in 2.09-isms.
>
>Perhaps Donald (who once said "I'm sooo much smarter now" ;-) has got
>a more recent version?
>

I have a version of Donald Arsenau's package dated June 7, 1996, and I know
from private correspondence that he has updated it a little
since then. Certainly it's no longer "couched in 2.09-isms."

It does several nice things: it lets you put symbols both above and
below reaction arrows (a major pain in ordinary LaTeX),
defines \eqnarray-like environments for
reactions, and saves typing a fair number of $ signs by letting
you type $\ch C_6H_{12}O_6$ to produce a nicely typeset formula.
It also provides a nice mechanism for attaching units to
numbers in text or math mode.

I would be willing to send my copy to people who ask, but
I think it would be much better for folks to ask Donald
directly (or for him to post it again). I think he considers
it still under development, and so has not put it on CTAN,
but I certainly have found it of sufficient quality to be quite
useful.

Best,
George.
--
George C. McBane mcba...@osu.edu
Department of Chemistry
Ohio State University
Columbus, OH 43210

Stephan &

unread,
Apr 8, 1997, 3:00:00 AM4/8/97
to

In article <yduwwql...@klopfer.zdv.uni-mainz.de>,

David Carlisle <carl...@klopfer.zdv.uni-mainz.de> writes:
>
>schu...@kansas.asel.udel.edu (Rick Schumeyer) writes:
>
>>
>> I know the command \textsuperscript exists, but is there an analogous
>> command for subscripts? \textsubscript does not work. Or do I have
>> to use math mode?
>>
>
>Serious question, what are you all doing with these subscripts?
>

Here, we are indexing Axioms with subscripts.
So, the t-norm axioms (for instance) are mostly written
A$_1$, ..., A$_4$, which is wrong, because the numbers should
be from the text font.

regards
Stephan

--
Stephan Lehmke leh...@ls1.informatik.uni-dortmund.de
Department of Computer Science 1 Tel. +49 231 755 6434
University of Dortmund FAX 6555
D-44221 Dortmund, Germany

Donald Arseneau

unread,
Apr 8, 1997, 3:00:00 AM4/8/97
to

In article <5id651$j...@lyra.csx.cam.ac.uk>, r...@cl.cam.ac.uk (Robin Fairbairns) writes...

>thing. I once picked up a Donald Arseneau contribution (to c.t.t)
>along those lines, but resurrecting it recently I found it didn't
>really do what I want (which includes isotopic species and excitation
>levels and the like ... I'm really supporting physicists). What's
>more, it was couched in 2.09-isms.

That would be some ad-hoc isotope macros I did. The chemistry macros are
more of an ongoing development. On and on. They've gone from plain to
L2.09 to L2e, and I even use them :-). The constructed arrow symbols are
specific to computer modern though. The dchem package does:

% simple chemical symbols -- upright math
% roman subscripts,
% displayed reactions,
% extensible labelled reaction arrows of various types (computer modern),
% new arrow "fill" types
% units on numbers
% miscellaneous symbols like "\saturn" for standard state
% tagging for physical state
% adjusted sub/super-script positions (better than in TeXbook)

What would be nice is using a real text-only font for chemistry,
but that is impossible to do well; providing even rough skewchar
kerning for the font would be a better solution.

Chemists also need a chemistry oriented interface to a commutative-
diagram package for building reaction mechanisms. There are already
a few chemistry interfaces to drawing packages (XyMTeX -> xypic) to
draw chemical structures.

Donald Arseneau as...@reg.triumf.ca

Donald Arseneau

unread,
Apr 8, 1997, 3:00:00 AM4/8/97
to

In article <5id3b8$trq$1...@kralle.zdv.Uni-Mainz.DE>, kna...@iphcip1.Physik.Uni-Mainz.DE (J%org Knappen) writes...

>What I find really striking, is that there are at least three TeX or LaTeX
>packages out there to handle the chemical _artwork_ (like ring structures)
>but I don't know any package handling the _basics_ of chemical formula

I have such macros descended from the very first TeX macros I ever
wrote, and which are now "working" in L2e and CM. I distributed a test
version last summer of "dchem.sty". I was particularly interested on
opinions for input syntax, but got nothing much back. The syntax for
in-line formulas is $\ch C_3H_8$ and I feel that is quite cumbersome.
(The even more verbose \begin{reaction} is somehow more acceptable.)
What I would really like is to move towards a standard chemistry input
syntax for LaTeX3, and to make these macros operate under that system.
[more on that below]

Some people like to type numbers without any "_" for subscripts.
This causes way more trouble than it is worth -- it is easy to type
_ before the numbers; what is hard is typing a half-dozen $ in each
formula. The "trouble" comes from all the other uses that numbers have
in a chemical equation.

Under dchem, the chemistry font is a math font; \ch is basically just
\fam=0. I know, people want to use fonts without math metrics, but
those metrics are exactly what give decent subscript positioning!
CH$_3$CF$_3$ does *not* give decent positioning, particularly when
subscripts are lower than normal.

I did get useful information about how dchem's arrows failed in Mathtimes
and Lucida math, but have not acted on it. I did fix some bugs in the
Fall, and recently handled AMSmath which redefines the basic plain TeX
macro \mathsm@sh (8@5t@rd5!).

At some point long ago I had some correspondence with a Christopher
from Ottawa who was heading the LaTeX3 Working Group on chemistry, but
we had hardly any exchange and his e-address went bad. And of course,
George Greenwade was also abducted by aliens. Is there any activity in
this program?

Donald Arseneau as...@reg.triumf.ca

Ulrich Schmitt, Phys. Chem., ETH Zurich

unread,
Apr 9, 1997, 3:00:00 AM4/9/97
to

In article <8APR1997...@reg.triumf.ca>, as...@reg.triumf.ca
(Donald Arseneau) writes:
> [...]

>Some people like to type numbers without any "_" for subscripts.
>This causes way more trouble than it is worth -- it is easy to type
>_ before the numbers; what is hard is typing a half-dozen $ in each
>formula.
> [...]

Instead of C$_6$H$_{12}$O$_6$ one may also write $\rm C_6H_{12}O_6$
which requires less $ characters and is a bit easier to read,
and similarly for a displayed reaction equation for instance
\[ \rm H_2 + O_2 \rightarrow 2 H_2O \]

Ulrich Schmitt, Phys. Chem., ETH Zurich

unread,
Apr 9, 1997, 3:00:00 AM4/9/97
to

In article <5ifm3j$d60$1...@elna.ethz.ch> I wrote

>\[ \rm H_2 + O_2 \rightarrow 2 H_2O \]
This should be
\[ \rm 2 H_2 + O_2 \rightarrow 2 H_2O \]
for a correctly balanced equation, of course.

Stefan Schulz

unread,
Apr 9, 1997, 3:00:00 AM4/9/97
to

>One could also try to avoid formulae in titles, chapter or section
>headings ... (And this is also what is done in most standard text books
>on chemistry (and similarly in mathematics and physics) as far as I know).

Sure, but there are occasions:
Example: Tetrahedron, experimental part, requires bold italics as heading
for the described compound. Isotopically labelled, you get subscripts in
headings

\textbf{\emph{[5,5,5,6,6-D$_5$]-(\emph{Z})-3-hexenol}}

Stefan Schulz
ssc...@chemie.uni-hamburg.de

Donald Arseneau

unread,
Apr 9, 1997, 3:00:00 AM4/9/97
to

In article <sschulz.7...@chemie.uni-hamburg.de>,
ssc...@chemie.uni-hamburg.de (Stefan Schulz) quoted...

>>One could also try to avoid formulae in titles, chapter or section
>>headings ...
>Sure, but there are occasions:

I've said it before, but I think that section titles should use
\bf\boldmath (in the section comman) in all but the most extreme
situations. (Extreme cases where bold-math would be confusing
should not arise anyway because such math should no go in a title.)

Donald Arseneau as...@reg.triumf.ca

Soren Sandmann Pedersen

unread,
Apr 9, 1997, 3:00:00 AM4/9/97
to

>What I find really striking, is that there are at least three TeX or LaTeX

>packages out there to handle the chemical _artwork_ (like ring structures and all
>that), but I don't know any package handling the _basics_ of chemical formula


>(like reaction equations or formulae of the type C$_{10}$H$_{22}$) in a sensible

I have in fact created (half) a package that handles chemical formulas
in a sensible way. I have not uploaded it to CTAN since it is not finished.

The idea of this package is that you write for example |C2H5OH| and
get the equavialent of $\mathrm{C}_2\mathrm{H}_5O<very thin space>H|$.

I anyone is interested in a preliminary version of this package,
please mail me.

Soeren Sandmann

--
Soeren Sandmann (e-mail: sand...@daimi.aau.dk)

Andreas Aemissegger

unread,
Apr 10, 1997, 3:00:00 AM4/10/97
to

On 8 Apr 1997 21:29 PST, as...@reg.triumf.ca (Donald Arseneau) wrote:

>In article <5id3b8$trq$1...@kralle.zdv.Uni-Mainz.DE>, kna...@iphcip1.Physik.Uni-Mainz.DE (J%org Knappen) writes...

>>What I find really striking, is that there are at least three TeX or LaTeX

>>packages out there to handle the chemical _artwork_ (like ring structures)

>>but I don't know any package handling the _basics_ of chemical formula

IMHO just XyMTeX and PPCHTeX allow the drawing of structural formulas
in an suitable way. The other packages I know (chemtex and chemstruct)
are useless due to their very limited functions.

Drawing lots of large structures using one of the packages sometimes
is really a pain. And it's impossible to draw arrows for electron
rearrangements. The fastest and most convenient way is to draw
everything with an structure editor and export it as eps :-(

>
>I have such macros descended from the very first TeX macros I ever
>wrote, and which are now "working" in L2e and CM. I distributed a test
>version last summer of "dchem.sty". I was particularly interested on
>opinions for input syntax, but got nothing much back. The syntax for
>in-line formulas is $\ch C_3H_8$ and I feel that is quite cumbersome.
>(The even more verbose \begin{reaction} is somehow more acceptable.)
>What I would really like is to move towards a standard chemistry input
>syntax for LaTeX3, and to make these macros operate under that system.
>[more on that below]

Are there some useful things like an expandable equilibrium arrow
(harpoons)? Maybe you could repost the macros here or send me a copy?
*Thanks*

I use the chemsym package to typeset formulas. It defines for every of
the first 109 elements a command (eg \H for hydrogen). What I like
very much is that I don't have to worry about math or text mode. It's
possible to type \H_2\O and you always get the elements in roman.
Settting the right values for \fontdimen.. avoids that one subscript
is printed lower than the other in formulas like Cr_2O_7^{2-}. The
only ugly thing is, that if there is no sub- or superscript there is
an extra space of 0.1em added between the elements. But it's no
problem to avoid this of course (or are chemical formulas really set
that way?)

Of course it's just the hard way to define 109 symbols for the
elements. But at least it's the best solution for this problem I saw
so far. And if I know what elements I have to use, I can just delete
the others.

>Some people like to type numbers without any "_" for subscripts.
>This causes way more trouble than it is worth -- it is easy to type
>_ before the numbers; what is hard is typing a half-dozen $ in each

>formula. The "trouble" comes from all the other uses that numbers have
>in a chemical equation.

Typing numbers without "_" is maybe ok as long as there are just
subscripts. But as soon as there are superscripts (what ions tend to
have) things get worse. Or are the superscripts still set using "^"?
"_" and "^" make the whole formula clearly arranged for somebody who
uses LaTeX for writing chemical reports.

[snip]

Andreas
a...@bluewin.ch
Hope this helps...

Andreas
a...@bluewin.ch

***********************************************
* Chemists never die, they just fail to react.*
***********************************************

Hartmut Schirmer

unread,
Apr 10, 1997, 3:00:00 AM4/10/97
to Donald Arseneau

Donald Arseneau wrote:
> I have such macros descended from the very first TeX macros I ever
> wrote, and which are now "working" in L2e and CM. I distributed a test
> version last summer of "dchem.sty". I was particularly interested on
> opinions for input syntax, but got nothing much back. The syntax for
> in-line formulas is $\ch C_3H_8$ and I feel that is quite cumbersome.

IMHO \chemical[options/style]{formular} would make the code much more
readable. If <formular> sticks to math mode commands only, emulating the
macro without the whole package should be quite easy.

Hartmut
--
Hartmut Schirmer | Phone: +49-431-77572-709 FAX:-703
Automatisierungs- & Regelungstech. | h...@techfak.uni-kiel.de
Technische Fakult"at, | http://www.techfak.uni-kiel.de/~hsc
Kaiserstr. 2, 24143 Kiel, Germany | PGP key via WWW, Key ID:6D84AEC1

Robin Fairbairns

unread,
Apr 10, 1997, 3:00:00 AM4/10/97
to

In article <334c3083...@news.bluewin.ch>,

Andreas Aemissegger <a...@bluewin.ch> wrote:
>IMHO just XyMTeX and PPCHTeX allow the drawing of structural formulas
>in an suitable way. The other packages I know (chemtex and chemstruct)
>are useless due to their very limited functions.

I agree. It may (just) be because chemtex (dated 1991 on the
archives) and chemstruct (dated 1989) are a trifle old.

We had the devil's own job getting the PPCHTeX paper through the
TUGboat production process. I don't suppose we'ld have stood a chance
in hell with a 1989 implementation of TeX.

C. Michael McCallum

unread,
Apr 10, 1997, 3:00:00 AM4/10/97
to

I have been using Donald's macros for both chemistry and physics
things for over a year, and I think they work quite well, even with
changing the font to psfonts (like Times and \usepackage{mathptm}).

(Donald did you get my feedback the last time you asked for it...?)

The $\ch C_3H_6 ...$ format may seem cumbersome to those who
haven't used it, but it is fairly clear, and the elimination of
all the extra $'s helps. I don't think anything like "$\chemistry...$"
would be any better.

The times that I have wanted/needed to include structures, I have
used XyMTeX, which worked fairly well, but required time to fine-tune
just where the picture went.

I don't know how it works with mathtimes, as I only someday hope to
be able to afford the necessary packages.

I don't mean to put pressure on Donald to either polish up or release
his packages, but I do think they are well suited to be included in
LaTeX3.

Cheers,

Mike
--

C. Michael McCallum
(fix email address when replying!!)
mmcc...@uop.edu | My wife says I never
(209) 946-2393 Voice | listen to her.
(209) 946-2607 Fax | ...at least that's
http://dogbert.cop.uop.edu/mccallum | what I think she said.

Oliver Schurr

unread,
Apr 10, 1997, 3:00:00 AM4/10/97
to

Hi Folks

Let me put my $0.02 here as well, partly because I'm a chemist and I had
my share of problems (and solutions ) with type setting chemical formulas.

Andreas Aemissegger (a...@bluewin.ch) wrote:


: On 8 Apr 1997 21:29 PST, as...@reg.triumf.ca (Donald Arseneau) wrote:

: >In article <5id3b8$trq$1...@kralle.zdv.Uni-Mainz.DE>, kna...@iphcip1.Physik.Uni-Mainz.DE
(J%org Knappen) writes...
: >>What I find really striking, is that there are at least three TeX or LaTeX
: >>packages out there to handle the chemical _artwork_ (like ring structures)
: >>but I don't know any package handling the _basics_ of chemical formula

: IMHO just XyMTeX and PPCHTeX allow the drawing of structural formulas


: in an suitable way. The other packages I know (chemtex and chemstruct)
: are useless due to their very limited functions.

: Drawing lots of large structures using one of the packages sometimes


: is really a pain. And it's impossible to draw arrows for electron
: rearrangements. The fastest and most convenient way is to draw
: everything with an structure editor and export it as eps :-(

I always fell back on real chemistry software to draw structure formulas
and then import them into TeX. I did that for my diplom thesis using
bm2font which is a truly outstanding program. Of course it is not
device-independent and therefore TeX-purist tend to dislike that. In my
case I did not have a PS printer and I could use 300 dpi fonts for
previewing and printing (many thanks to emTeX and its fabulous previewer).

Of course that does not solve the problems with sub and superscripts at
the same atom and their placement ...this still needs fiddling with
\fontdimen.

--
Oliver Schurr
Department of Chemistry
Georgetown University
Washington, DC 20057

Robin Fairbairns

unread,
Apr 11, 1997, 3:00:00 AM4/11/97
to

In article <1997Apr10.091133.21570@guvax>,

Oliver Schurr <sch...@gusun.georgetown.edu> wrote:
>I always fell back on real chemistry software to draw structure formulas
>and then import them into TeX.

But structural formulae aren't the problem. There are (as others have
pointed out) good solutions, even within TeX, for them, quite apart
from the many (no doubt excellent) commercial offerings.

>I did that for my diplom thesis using
>bm2font which is a truly outstanding program. Of course it is not
>device-independent and therefore TeX-purist tend to dislike that.

I don't suppose I'm really a purist[*], but I reckon bm2font isn't
nearly as device-dependent as a lot of things...

[*] But I've read articles by people who are purists (or at least
eccentrics, which is a distinction that rather blurs itself into the
other in my eyes) which recommend bm2font as the best thing since
sliced bread.

Axel Kielhorn

unread,
Apr 11, 1997, 3:00:00 AM4/11/97
to

Andreas Aemissegger (a...@bluewin.ch) wrote:

: I use the chemsym package to typeset formulas. It defines for every of


: the first 109 elements a command (eg \H for hydrogen). What I like
: very much is that I don't have to worry about math or text mode. It's
: possible to type \H_2\O and you always get the elements in roman.
: Settting the right values for \fontdimen.. avoids that one subscript
: is printed lower than the other in formulas like Cr_2O_7^{2-}. The
: only ugly thing is, that if there is no sub- or superscript there is
: an extra space of 0.1em added between the elements. But it's no
: problem to avoid this of course (or are chemical formulas really set
: that way?)

I never had problems with this extra space. There is only one thing
where I disliked it: the OH group. After defining an \OH command this is
no longer a problem.

--
Axel Kielhorn

I love the thought of coming at home with you
Even if I know you can fake it.
(The original version which is never played on BBC)

Mehrab Mehrvar

unread,
Apr 14, 1997, 3:00:00 AM4/14/97
to

Hi dear TexPerts:
I have downloaded the package "ChemTex" which is written to write
chemistry reactions and so on, BUT I DO NOT know how to use it.
And I do not have any clue how to write commands inside the input text.
I need to write many reaction mechanisms which involves pentagonal,
hexagonal, .. rings as well. Also, I need to draw long chain molecules
as well. By the way, I am using EmTex in Windows95 environment. All
your help would be very much appreciated. Thank you very much.
Hope to hear you dears very soon.
Regards,

--
Mehrab Mehrvar,
Chemical Engineering Department,
University of Waterloo,
Waterloo, Ontario, Canada N2L 3G1. email: mmeh...@novice.uwaterloo.ca

Mehrab Mehrvar

unread,
Apr 14, 1997, 3:00:00 AM4/14/97
to

Hi dear TexPerts:
When I print my postscriot output created by latex (emtex) on win95 by
an NEC laser printer 600 dpi, the quality of the output is not
satisfactory and it seems it has low resolution. When I print another
text written by microsoft Word, the printout is really excellent and it
is like a boldface. WOuld you please help me how can I speed up the
quality of my output file (PS file) in EmTex on win 95???
Or how can I make sure I have 600dpi resolution or how can I change it
to 600 dpi???
Any help is really appreciated.
Regards,

---

Ulrich Schmitt, Phys. Chem., ETH Zurich

unread,
Apr 14, 1997, 3:00:00 AM4/14/97
to

In article <33524D...@novice.uwaterloo.ca>,

Mehrab Mehrvar <mmeh...@novice.uwaterloo.ca> writes:
>Hi dear TexPerts:
> I have downloaded the package "ChemTex" which is written to write
>chemistry reactions and so on, BUT I DO NOT know how to use it.
> [...]

There is good documentation, at least there was, when I downloaded the
package 5 years ago.
This is from the CHEMTEX.README file:
----------------------------------------------------------------------
The macros were provided by
Roswitha Haas, and published by Haas and O'Kane, Comput. Chem.
(1987) 11:251-271, and should be acknowledged by users who produce
finished manuscripts. Use the macros by adding chemtex to the document
style options; for example,
\documentstyle[chemtex,12point]{report}
To get a copy of the manual, latex and print the CHEMDOC TeX file
It is 58 pages long.
Files belonging to CHEMTEX macro.
CHAP3A TEX K1
APPDC TEX K1
APPDB TEX K1
CHAP6B TEX K1
CHAP6C TEX K1
CHAP6D TEX K1
CHAP4 TEX K1
CHAP6A TEX K1
CHEMTEX TEX K1
----------------------------------------------------------------------

Regards,

David Kastrup

unread,
Apr 15, 1997, 3:00:00 AM4/15/97
to Mehrab Mehrvar

Mehrab Mehrvar <mmeh...@novice.uwaterloo.ca> writes:

> When I print my postscriot output created by latex (emtex) on win95 by
> an NEC laser printer 600 dpi, the quality of the output is not
> satisfactory and it seems it has low resolution. When I print another
> text written by microsoft Word, the printout is really excellent and it
> is like a boldface. WOuld you please help me how can I speed up the
> quality of my output file (PS file) in EmTex on win 95???
> Or how can I make sure I have 600dpi resolution or how can I change it
> to 600 dpi???

Read the documentation of your dvi driver. You might need to specify
a different resolution and METAFONT mode.


--
David Kastrup Phone: +49-234-700-5570
Email: d...@neuroinformatik.ruhr-uni-bochum.de Fax: +49-234-709-4209
Institut für Neuroinformatik, Universitätsstr. 150, 44780 Bochum, Germany

David Kastrup

unread,
Apr 15, 1997, 3:00:00 AM4/15/97
to Mehrab Mehrvar

Mehrab Mehrvar <mmeh...@novice.uwaterloo.ca> writes:

> I have downloaded the package "ChemTex" which is written to write
> chemistry reactions and so on, BUT I DO NOT know how to use it.

Read the documentation coming with it. However, I have found xymtex
easier to use. You can get it from CTAN under the LaTeX2.09 specific
tree.

> I need to write many reaction mechanisms which involves pentagonal,
> hexagonal, .. rings as well. Also, I need to draw long chain molecules
> as well.

Pedro Quaresma de Almeida

unread,
Apr 15, 1997, 3:00:00 AM4/15/97
to

David Kastrup <d...@mailhost.neuroinformatik.ruhr-uni-bochum.de> writes:

>
> Mehrab Mehrvar <mmeh...@novice.uwaterloo.ca> writes:
>
> > When I print my postscriot output created by latex (emtex) on win95 by
> > an NEC laser printer 600 dpi, the quality of the output is not
> > satisfactory and it seems it has low resolution. When I print another
> > text written by microsoft Word, the printout is really excellent and it
> > is like a boldface. WOuld you please help me how can I speed up the
> > quality of my output file (PS file) in EmTex on win 95???
> > Or how can I make sure I have 600dpi resolution or how can I change it
> > to 600 dpi???
>
> Read the documentation of your dvi driver. You might need to specify
> a different resolution and METAFONT mode.
>

If you are using dvips (if not you must change to it 8-)) you must say

dvips -D600 myteste.tex
^
|

Sets the resolution to 600dpi.

Or you can change dvips configuration file "config.ps"

from
...
% Default resolution.
D 300
...

to
...
% Default resolution.
D 600
...


--
At\'e breve
===========

Pedro Quaresma de Almeida
Departamento de Matem\'atica
Faculdade de Ci\^encias e Tecnologia
Universidade de Coimbra
P-3000 COIMBRA, PORTUGAL
e-mail: pe...@mat.uc.pt
url: http://www.mat.uc.pt/~pedro/

Andreas Aemissegger

unread,
Apr 15, 1997, 3:00:00 AM4/15/97
to

On Mon, 14 Apr 1997 15:29:27 GMT, Mehrab Mehrvar
<mmeh...@novice.uwaterloo.ca> wrote:

>Hi dear TexPerts:


> I have downloaded the package "ChemTex" which is written to write
>chemistry reactions and so on, BUT I DO NOT know how to use it.

>And I do not have any clue how to write commands inside the input text.

>I need to write many reaction mechanisms which involves pentagonal,
>hexagonal, .. rings as well. Also, I need to draw long chain molecules

>as well. By the way, I am using EmTex in Windows95 environment. All
>your help would be very much appreciated. Thank you very much.
>Hope to hear you dears very soon.
>Regards,
>
>--

>Mehrab Mehrvar,
>Chemical Engineering Department,
>University of Waterloo,
>Waterloo, Ontario, Canada N2L 3G1. email: mmeh...@novice.uwaterloo.ca

Maybe you should better download XyMTeX (CTAN:
macros/latex209/contrib/xymtex/). It's the best package you can get
for drawing chemical structures using LaTeX. The capabilities of
ChemTeX are very limited due to the used macro programming. There is,
just as an example, no way to draw sixrings as chairs (sometimes quite
important for reaction mechanisms, isn't it?). Learn the manual by
heart (127p !!!).

For an overview see: Fujita, Comput. Chem., 18, 109 (1994)

If you really want to use ChemTeX: it comes with a manual (a file
called chemdoc.tex)! Print it out! All the commands are described
there. And have a look at the sourcecode of the manual.


Hope this helps...

Andreas
a...@bluewin.ch

************************************************
* Chemists never die, they just fail to react. *

************************************************

Stuart Pook

unread,
Apr 16, 1997, 3:00:00 AM4/16/97
to

Since we are talking about bm2font. How to I get it to generate one
.tex file, one .tfm file and a pile of .pk files from one .gif? I
would like to able to create one .dvi file that I can view at various
different resolutions. I don't see why when I convert the same .gif at
various different resolutions that the .tex and .tfm files have to be
different. Can it not use the biggest resolution to choose the number
of characters and then create lots of .pk files?

Stuart

Robin Fairbairns

unread,
Apr 17, 1997, 3:00:00 AM4/17/97
to

In article <m2wwq4z...@mailhost.neuroinformatik.ruhr-uni-bochum.de>,
David Kastrup <d...@mailhost.neuroinformatik.ruhr-uni-bochum.de> wrote:

>
>Mehrab Mehrvar <mmeh...@novice.uwaterloo.ca> writes:
>
>> I have downloaded the package "ChemTex" which is written to write
>> chemistry reactions and so on, BUT I DO NOT know how to use it.
>
>Read the documentation coming with it. However, I have found xymtex
>easier to use. You can get it from CTAN under the LaTeX2.09 specific
>tree.

Not no longer you don't. The production of the LaTeX Graphics
Companion included a review of things that still existed only in
nominally 2.09 forms, and moving them to the LaTeX tree if
appropriate.

xymtex is now in macros/latex/contrib/other/xymtex

I support David's suggestion that it should used in place of the aged,
aged ChemTeX, though...

0 new messages