mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Lounge (https://www.mersenneforum.org/forumdisplay.php?f=7)
-   -   LATex Documents (https://www.mersenneforum.org/showthread.php?t=5221)

Numbers 2005-12-28 09:14

LATex Documents
 
Does anyone here know how to produce their own LaTex documents?

I keep getting the error message that my control sequence is undefined, but the sequence in question is: \documentclass(article)
How is that [I]undefined[/I], I thought that was the standard way to do it.

paulunderwood 2005-12-28 09:40

You've got

[CODE] \documentclass(article)[/CODE]

and I think it should be

[CODE] \documentclass{article}[/CODE]

i.e. use braces instead of parentheses

HTH

Numbers 2005-12-28 10:18

Sorry, it's not that, I actually tried braces first.

with:
[quote]\documentclass{article}
\begin{document}
My text starts here...[/quote]
with braces in both cases, I get:
[quote]This is TeX, Version 3.141592 <MiKTeX 2.4>
<cow.txt
! Undefined control sequence.
1.1 \documentclass
[color=white].....................[/color]<article>
?[/quote]
If I type Help, I get a message explaining what "undefined control sequence" means, and a reassurance that if I'm sure it is correct I can proceed. When I do that, I get the words [I]article[/I] and [I]document[/I] inserted before my text begins. So the first line looks like this:
[quote]article document My text starts here...[/quote]

Weird, or what?

xilman 2005-12-28 10:21

[QUOTE=Numbers]Weird, or what?[/QUOTE]
This may be a silly question, but here goes: are you running LaTeX on your input file? I've managed to type "tex foo.tex" before now when I meant "latex foo.tex" and got bizarre error messages similar to yours.


Paul

Numbers 2005-12-28 10:42

As could be expected from you Paul, that was not a silly question at all.
To be honest I only downloaded the software yesterday and am still very much feeling my way around. From the manual I got the command: texify foo.txt, with the results I described. Changing that to: Latex foo.txt as you suggest did the trick.
Thank you very much indeed.

Mystwalker 2005-12-28 23:47

AFAIK, there seems to be a difference between tex and latex. One of them (I don't remember which) also doesn't work for me...

ewmayer 2005-12-29 00:21

[QUOTE=Mystwalker]AFAIK, there seems to be a difference between tex and latex. One of them (I don't remember which) also doesn't work for me...[/QUOTE]
Although the analogy is not perfect, I like to think of Tex/LaTex along similar lines as C/C++ - the former is a subset of the latter, with the latter containing many things that (supposedly) make the former easier to use. In the case of Tex/LaTex, macro-style things like document classes are typically LaTex, although I strongly urge any user to get the [url=http://www.amazon.com/gp/product/0201529831/104-3496175-1101546?v=glance&n=283155]LaTex manual[/url] for more details on this and many other issues.

Mystwalker 2005-12-29 00:30

You're right!
LaTeX does work, but not tex.

btw.:
I can really recommend WinEdt for LaTeX when using Windows. I've heard that TeXnicCenter is good as well...

Numbers 2005-12-31 09:33

[QUOTE=Mystwalker]I can really recommend WinEdt for LaTeX when using Windows. I've heard that TeXnicCenter is good as well...[/QUOTE]
I use TexAid (free download). It's an upgraded version of the Equation Editor in Word, and allows you to pick symbols from a pallette to create your expressions. Then you just paste that into your LaTex document and it formats it all for you. Very useful, but obviously not an aid to learning LaTex.

ewmayer's point about the manual is good. With the free download I got a user's guide that seems to have just five answers. So it doesn't matter what question you ask you always get one of these five answers!

And when you use the programme (LaTex), if you make a mistake you get these really friendly error messages that say things like, "Why don't you try reading the manual?"

What manual, I ask.


All times are UTC. The time now is 11:30.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.