On scienceforums.net, we've implemented a small LaTeX system to allow you to typeset equations (in other words, cut out all the x^2 stuff and make things easier to read for everyone). The basic principle behind it is this: you have a LaTeX string, and you surround it by [math] [/math] tags. I'll come to the syntax of the actual string in a moment.
For those who can already use LaTeX (and indeed, those who can't), a few things to note. In the system we've implemented, a tex file is created, surrounding the string you input with a \begin{display} environment so there is no need for $, $, \[ etc. Also note that we've included the standard AMS files for you; if anyone wants any special characters, I'm sure we can probably accommodate your needs.
The images are clickable, so you can see the code that was used to make them by clicking.
Now that's all out of the way, onto some examples
Examples
- Indexes (both subscript and superscript) on variables
- A simple function.
- Example of fractions - you can create small fractions by using \tfrac.
- A nice integral.
- a Fourier Transformation, which is rather large.I could go on and on, but I'll go onto explain some of the basic syntax of LaTeX.
Syntax
Functions & General Syntax
Basically put, if you want to write a math equation in LaTeX, you just write it. If you wanted f(x) = 3, then bung that between to math tags and you're done, producing
. Don't worry about extra spaces or carriage returns, because in general LaTeX will ignore them. It does get a little more complex than this, but don't worry about that for now. Remember that any letters you type in will be presumed to be some kind of variable and hence will be italicised.We also have functions to display more complex things like matrices and fractions, and they have the syntax of having a \ before them, usually followed by some kind of argument. For example, \sin will produce the function sin and \frac{num}{denom} will produce a fraction with a specified numerator and denominator. More on these later.
Also remember that LaTeX is case sensitive, so \sigma is NOT the same as \Sigma.
Subscripts and Superscripts
This is perhaps one of the easiest things to do in LaTeX, and one of the most useful. Let's, for the sake of argument, say you wanted to write x2. Then you'd write x^{2}, producing
. Notice that you don't necessarily need the { and } in cases where you only have 1 thing in the index, for example x^2. But it does care if you want to write something like
. Subscripts are done similarly, but you use the _ operator instead of ^. If you want both subscript and superscript, then use the syntax x^{2}_{1} - which is equivalent to x_{1}^{2}.Fractions and functions
As I've mentioned, fractions are generated by using the function \frac{num}{denom}. For example:


If you want smaller fractions, you can use \tfrac, to produce things like
which will fit into a line nicely without having to seperate it.LaTeX has some nice in-built functions like \sin, \cos, etc. I'm not going to write them all down here, but I'll point you to a website at the end of the document that contains them. Likewise, you can write symbols (such as infinity by using \infty) and Greek letters (e.g. \phi, \Sigma, \sigma, etc)
Bracketing
You can get all your usual brackets just by typing them straight in; for instance, (, |, [, etc. However, sometimes they won't be the right size, especially if you want to write something like (1/2)n. You can get around this by using the \left and \right commands, and then placing your favourite brackets after them. For instance, to write (1/2)n, we have:

Integrals, Summations and Limits
Integrals can be produced by using \int, summations by \sum and limits by \lim. You can put limits on them all in the right places by using the normal subscript/superscript commands. For instance:

.Summary
There's a lot more things you can do with LaTeX, and I'll try to add to this as time goes by. Have a look at:
http://www.maths.tcd...ns/LaTeXPrimer/ - the LaTeX primer
http://omega.albany....08/Symbols.html - some symbols that you might find useful.
If you have any questions about the system, send me a PM and I'll try to help
Cheers.

Help
Sign In »
Register Now!


MultiQuote















