Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

My prof writes papers with harvmac, which is apparently incompatible with LaTeX. Fine, I switch to tex. Now TeX gives me Undefined control sequence when I type \usepackage{amsmath}.

There's gotta be some equivalent to \usepackage (I've tried \usepackage{amsmath.sty} but it doesn't work).

Or maybe I'm completely hosed because amsmath/harvmac are fundamentally incompatible?

share|improve this question
2  
when trying to read about latex vs tex, I was googling 'latex vs ' and the auto completion suggested 'latex vs memory foam'. Naturally I thought that 'memory foam' was a new typesetting tools, that I just had not heard about before... I was disappointed –  Hans-Peter E. Kristiansen Jan 20 '12 at 11:37
add comment

3 Answers

up vote 14 down vote accepted

The \usepackage macro is part of LaTeX, not part of plain TeX, and this is why you get an undefined control sequence error here. You will need to \input the appropriate files

\input amstex %
\input harvmac %
Some text here
$$ y = mx + c $$
\bye
share|improve this answer
    
Is amstex very different from amsmath? –  4tran Jan 20 '12 at 9:25
2  
@4tran AMSMath was derived from AMSTeX, although that was a long time ago and I don't know what the coverage of the two is now like. However, a bigger issue may be that plain TeX is not the same as LaTeX: for example, you'll notice that my example does not look like a standard LaTeX demo document. –  Joseph Wright Jan 20 '12 at 10:03
    
I noticed that they're different - which is why I'm pulling my hairs out. Apparently tex can't even handle empty lines inside of {} - gives me some crap about paragraph ending before expected grrr. –  4tran Jan 20 '12 at 10:34
1  
@4tran: That's exactly the same in LaTeX (which is of course based on TeX). If you have empty lines they are turned into a paragraph break, which is not allowed in normal, i.e. not-long, macros (defined with \def without preceding \long, or with \newcommand*). –  Martin Scharrer Jan 20 '12 at 11:34
3  
@4tran -- when amsmath was developed based on ams-tex, the original syntax was modified only in the most "obvious" places, like changing \align...\endalign to \begin{align}...\end{align}. however, since then, amsmath has been upgraded to use latex syntax for environments where ams-tex had one command with a (possibly complicated) argument. as far as i know, there is no good free ams-tex documentation. ask your professor to borrow his copy of joy of tex by michael spivak; that's the definitive manual. –  barbara beeton Jan 20 '12 at 14:00
show 1 more comment

You can hardly expect something as fundamentally a part of LaTeX as \usepackage to continue working when you drop to plain TeX (apparently the "extended plain" format eplain brings some of it back). Plain is a very minimal format and the only way to load "packages" is using \input; i.e. \input harvmac. For the AMS package, you should try \input amstex.

share|improve this answer
2  
The \input primitive does not use LaTeX {...} syntax: you want \input harvmac. –  Joseph Wright Jan 20 '12 at 8:45
    
eplain supports loading some LaTeX packages with \usepackage –  morbusg Jan 20 '12 at 8:46
add comment

I think you have to use ams-tex but I have to admit, I'm not a TeXpert (don't use it).

\input amstex.tex

$a = b$.
\bye
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.