Hypography Science Forums: LaTeX Fomulas: Math v2.0 - Hypography Science Forums

Jump to content

Welcome! You are currently viewing the Hypography Science Forum as a guest. In order to participate in our science discussions, you should register now! Registration is free and you can use your Facebook login if you like.
  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

LaTeX Fomulas: Math v2.0 Rate Topic: -----

#1 User is offline   alexander 

  • Dedicated Smart-ass
  • View blog
  • View gallery
  • Group: Members
  • Posts: 5,656
  • Joined: 04-May 04

Posted 11 May 2006 - 06:56 PM

NOTE: I am in the process of reworking this, it is still a decent reference, but i will be working on it, so expect changes

Intro:
This has been a long coming, endless traps have been setting the math evolutionary progress back throughout time, and you, Physics and Math people have been forced to use simple text equation display techniques to show complex math. Well, be that no longer, as i am about to introduce you to the world that no longer follows the standard text rules, it defies the normal thought, depends only on how far you are willing to take it and has no rivals in the realm of
Microsoft
. I will attempt to teach you how to block the evil force from taking control of you, make you free as in freedom, to be what you want to be and know no limit. And when the forces of evil can no longer hold you down (and i am referring to M$ IE support for CSS 2 and 3), you will enter the new realm of Latex.
how's that for an intro?


Actually, it is quite sad that this hasn't happened any earlier, we are a scientific community, so the need for something like this, has bound to be around from very early on in the game (back when Uncle AL, TeleMad, FreeThinker, Gahd and Tormod ran the "Math and Physics" show). But i do have this to say, the software really hasn't caught up with this until early last year, so i guess it's just been ignored or something. Latex itself is a language, similar to HTML, but with major differences; it is a typesetting language made to be able to generate files that will be printable on many different types of printers. Latex is actually a dialect of Tex that was created by D.E.Knuth, it includes many plugins to the original Tex, including the one that i will describe to you today, one created for math.

So what is the major difference between Math v1.0 and Math v2.0? Well its simply this, say you have an expression, and in Math v1.0 you would write it like such:
f(x)=integral from -infinity to x of (e^(-t^2))/(radical(pi^x))dt
uh, yeah, its kinda hard to follow, and some people would actually need to write it out to understand what is going on.... Wouldn't it be easier if you said just:
f(x)=\int_{-\infty}^x \frac{(e^{-t^2})}{\sqrt{\pi^x}}dt
So, finally arching your attention? I sure hope so, because i am excited as well, and it is not that difficult to write this expression, in latex it looks like this:
f(x)=\int_{-\infty}^x\frac{(e^{-t^2})}{\sqrt{\pi^x}}dt
It may seem a bit much, but trust me, this will be a breeze once you get it.

Basics:

BB Tags Hypography uses a [math] tag to signify the beginning and [/math] tag to signify the end of a latex section of the post. Tags are surrounded by square brackets such as [tag] and respectively [/tag]. I strongly urge you to not forget to close the tags, it is not vital, but it is a good practice, even if you only plan to display an expression

Tex Characters:
Most characters in latex are rendered as the regular characters, such as a-z 0-9 () {} [] * $ % and so forth a-z 0-9 () [] * \$ \%. Some need escaping, such is the case with $ and % in our previous case, escaping means putting a \ in front like \$. But latex introduces some characters that have a meaning and render things differently (for math purposes) such characters would include the underscore (_) and the carat(^). Those characters are used to identify sub and superscript, respectively; for example a_b renders as a_b, a^b renders as a^b. Latex also has a load of characters that are not defined by regular keyboards, they are special characters and follow the following syntax: \name. Things like \alpha, \beta, \gamma, \delta, \pi and many many others are included ftp://tug.ctan.org/p...hensive/SYMLIST
Those character commands are case sensitive, so \delta \deltais different from \Delta \Delta.

to be continued...

Continued

Size:
Latex supports many size options, the new software lets us support all of it, but for simplification reasons, any text you type, enclose it in the \text{} tag, you can actually control color, font and size from within those, but to simplify the size for you:
\tiny \text{\tiny{tiny}}
\small \text{\small{small}}
\normalsize (default)\text{\normalsize{normal}}
\Large \text{\Large{large}}
\LARGE \text{\LARGE{even larger}}
\huge \text{\huge{huge}}

I highly recommend using the default size... its just text

You have probably noticed, but latex in math mode also removes spaces thus not making it ideal to write normal text. Another thing to notice is that it outputs an image, however it is partly so, this image is dynamically generated and actually does not get saved on our server; it only exists in your browser, hence linking to it from other websites may be a bit harder then you'd expect, and if the outside traffic picks up too much, i will have to block anyone from the outside domain to be able to use this program...

Spaces and Styling:

Spaces are not mandatory, however i encourage my readers to use them to avoid confusion, for example you can write \frac{2}{x} and it will render as \frac{2}{x}, however this is fine it still presents a problem, if the fraction is x over 2 then \frac{x}{2} will not work, latex will render the command as fracx and that is not a valid command and hence a problem is due. To avoid confusion i recommend sticking to a good syntax style, such as using popper curly braces and spaces, you can either write that fraction as \frac x2 or using the prototype you should really get used to writing \frac{x}{2} that way you will not have to remember the braces when a complex fraction is due and the fraction or any function for that matter will come out right the first time. On the topic of spaces, i can see that people will ask about newlines and things of that manner. You can actually write text and use newlines and things of that nature. A new line is represented by a \\ and if you needed to write text, you can use the \text{} mode to write it and spaces and such will be used. For example y=\left\lbrace\begin{array}{c c}{2x+5} & \text{if x is less then 1/2} \\ {\pi{x}}^e & \text{if x is more then 1}\end{array}\right. y=\left\lbrace\begin{array}{c c}{2x+5} & \text{if x is less then 1/2} \\ {\pi{x}}^e & \text{if x is more then 1}\end{array}\right. Latex actually provides spacing commands \, \: \; \quad \qquad, those take no arguments and (a\,b\:c\;d\ e\quad f\qquad g) renders as (a\,b\:c\;d\  e\quad  f\qquad  g)

Latex has a couple of fonts, here's how to use them:
\mathnormal - default - \mathnormal{A B C d e f 1 2 3 \delta \Delta \infty \lceil \rceil}
\mathrm - default without italic lower case - \mathrm{A B C d e f 1 2 3 \delta \Delta \infty \lceil \rceil}
\mathit - italic -\mathit{A B C d e f 1 2 3 \delta \Delta \infty \lceil \rceil}
\mathbf - bold - \mathbf{A B C d e f 1 2 3 \delta \Delta \infty \lceil \rceil}
\mathsf - sans serif - \mathsf{A B C d e f 1 2 3 \delta \Delta \infty \lceil \rceil}
\mathtt - mono space - \mathtt{A B C d e f 1 2 3 \delta \Delta \infty \lceil \rceil}
\mathcal - caligraphy - \mathcal{A B C d e f 1 2 3 \delta \Delta \infty \lceil \rceil}
\mathfrak - fraktur - \mathfrak{A B C d e f 1 2 3 \delta \Delta \infty \lceil \rceil}
\mathbb - blackboard bold - \mathbb{A B C d e f 1 2 3 \delta \Delta \infty \lceil \rceil}

you can also choose to bold a symbol (such as a greek symbol)
\boldsymbol
\boldsymbol{\Delta} \Delta

also there are times when latex does not render something quite to your personal spacing specifications, sometimes you need to add or subtract a small space to "nudge" things into place, for this they created a set of spaces for "nudging"

\, 3/18th of a quad
\: 4/18
\; 5/18
\! -3/18

the negative space is handy for places like this:
\left(\begin{array}{c} n \\ r \end{array}\right) = \frac{n!}{r!(n-r)!}
it looks good, but it could look better :)
\left(\!\!\!\begin{array}{c} n \\ r \end{array}\!\!\!\right) = \frac{n!}{r!(n-r)!}


Brackets, Braces and More:

Ofcourse latex supports every imaginable and unimaginable bracet and brace you can ever imagine, from the simple [] () to over and under braces, and more. The curly brackets have their own symbol, as they are used in the syntax, \lbrace and \rbrace will render as [LaTeX Error: Restricted command found (def)] however to actually extend those brackets you can use \left and \right flags to do the job, so with the addition of them \left[\frac{\left(\frac{x+3}{7}\right)+5}{3x+8}\right] \left[\frac{\left(\frac{x+3}{7}\right)+5}{3x+8}\right].

Now as promissed the unimaginable stuff. These things are referred to as math accents, and they include vector signs and things of that nature. So tags like \vec{} \hat{} \tilde{} \dot{} \ddot{} will output as \vec{x} \hat{x} \tilde{x} \dot{x} \ddot{x}. If you need an expression under the sign, the developers have also thought about you, the \widevec \widehat \widetilde do just that \vec{xyz} \hat{xyz} \tilde{xyz}. Not done yet, also available are \underline{} \overline{} that underline and overline text, as well as \overbrace and \underbrace that make horizontal braces as such \overbrace{x+2}. There's more to add though, as the sub and superscript come into play here, using it you can explain expressions such is that a1 a2 .. an are just referred to as ai in the matter, you can write that as \overbrace{a_1,a_2...a_n}^{a_i} \overbrace{a_1,a_2...a_n}^{a_i} with the underbrace remember that you are trying to put stuff under the brace, so use the subscript sign (_) to accomplish the task. Also once again, notice that proper use of brackets is the key, it is easy to make a mistake in the expression, so use the advanced mode preview fearute.
Also available symbols:
\langle and \range \left\langle xyz\right\rangle
\| \left\| xyz\right\|

Common Math Needs:
Matixees, use the \begin{matrix} and \end{matrix} to display one
\left[\begin{matrix} a1,1 & a1,2 & ... & a1,n \\ a2,1 & a2,2 & ... & a2,n \\ ..... & ..... & ..... & ..... \\ am,1 & am,2 & ... & am,n \end{matrix}\right]
\left[\begin{matrix} a1,1 & a1,2 & ... & a1,n \\ a2,1 & a2,2 & ... & a2,n \\ ..... & ..... & ..... & ..... \\ am,1 & am,2 & ... & am,n \end{matrix}\right]

matrix uses no relimiters
pmatrix ()
bmatrix []
Bmatrix {}
vmatrix |
Vmatrix || ||

example:
A_{m,n} = \begin{pmatrix} a_{1,1} & a_{1,2} & \cdots & a_{1,n} \\ a_{2,1} & a_{2,2} & \cdots & a_{2,n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m,1} & a_{m,2} & \cdots & a_{m,n} \end{pmatrix}
A_{m,n} = \begin{pmatrix} a_{1,1} & a_{1,2} & \cdots & a_{1,n} \\ a_{2,1} & a_{2,2} & \cdots & a_{2,n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m,1} & a_{m,2} & \cdots & a_{m,n} \end{pmatrix}

like matrices arrays allow you to space your content horizontally as well as vertically, they also allow you to define the lining for it:

\begin{array}{c|c}
1 & 2 \\
\hline
3 & 4
\end{array}

 \begin{array}{c|c}  1 & 2 \\   \hline  3 & 4 \\ \end{array}

similarly

\begin{array}{c|c||}\hline1 & 2 \\ \hline3 & 4 \\\hline5 & 6 \\\hline\end{array}

or if you get really creative with them:

 \begin{array}{|r|l|} \hline  7C0 & hexadecimal \\  3700 & octal \\ \cline{2-2}  11111000000 & binary \\  \hline \hline  1984 & decimal \\  \hline\end{array}

There is more then a dozen common math symbols recognized in latex:
\arccos \arccos{\left ( \frac{\pi}{2} \right )}
\arcsin \arcsin{\left ( \frac{\pi}{2} \right )}
\arctan \arctan{(1)}
\arg \arg{\left ( \frac{-1-i}{i} \right )}
\cos \cos{(\pi)}
\cosh \cosh{(x)}
\cot \cot{\left( \frac{3\pi}{2} \right )}
\coth \coth{(x)}=\frac{e^{2x}+1}{e^{2x}-1}
\csc \csc{(y)}
\deg f_m([X])=\deg{f[Y]}
\det_ \Delta_{\overline{a}} \det(A)=\overline{a} \times \overline{c}
\dim \dim{X}=-1
\exp \exp{(x)}=e^x
\gcd_ \gcd{(a,b)}=2 \sum_{k=1}^{a-1} \lfloor kb/a \rfloor +a+b-ab
\hom \hom{(X, Y)}
\inf_ \inf{\{1,2,3\}}=1
\ker \ker{T}:=\{ v \in V: Tv=0_w\}
\lg \lg{(2)}=\log_2{(2)}
\lim_ \lim_{x \to \infty}{(2x+1)}
\liminf_ \liminf_{n \to \infty}{(x_n)}
\limsup_ \limsup_{n \to \infty}{(x_n)}
\ln \ln{(2)}=\log_{e}{(2)}
\log \log{(2)}=\log_{10}{(2)}
\max_ \lim_{0 \to 1}\max{(x, 1-x)}dx=\frac{3}{4}
\min_ \lim_{0 \to 1}\min{(x, 1-x)}dx=\frac{1}{4}
\Pr_ no clue when this is used, if someone figures it out, let me know, i will post example
\sec \sec{(20)}
\sin \sin{\theta} = \cos{\left( \frac{\pi}{2} - \theta \right )}
\sinh \sinh{(x)}=-i \sin{(ix)}
\sup_ \sup{(X_n)}
\tan \tan{(x)}
\tanh \tanh{(x)}=\frac{\sinh(x)}{\cosh(x)}
\infty \infty

Stuff that didn't fit anywhere else
\not can be used with other symbols \not\in \not\in
\cancel [LaTeX Error: Syntax error]
\overset{a}{=} \overset{a}{=}
\underset{a}{=} \underset{a}{=}
\overrightarrow{abc} \overrightarrow{abc}
\overleftarrow{abc} \overleftarrow{abc}
\widetilde{abc} [LaTeX Error: Syntax error]
\widehat{abc} [LaTeX Error: Syntax error]
\overline{abc} \overline{abc}
\underline{abc} \underline{abc}

\subtrack
 \sum_{\substack{   0<i<m \\   0<j<n  }}  P(i,j)

more math stuff:
roots:
\sqrt \sqrt{2}
root of another power
\sqrt[#] \sqrt[5]{2}

\exists - \exists
\forall - \forall
\neg - \neg

brackets:
() \, [] \, \{\} \, || \, \|\| \, \langle\rangle \, \lfloor\rfloor \, \lceil\rceil
() \, [] \, \{\} \, || \, \|\| \, \langle\rangle \, \lfloor\rfloor \, \lceil\rceil

You are free to practice latex in this thread: http://hypography.co...ice-ground.html
PLEASE ASK ALL YOUR QUESTIONS HERE
I will try to answer them as well I can, and eventually others will be able to answer them as well as they can, but it will create only one thread to go to for answers about latex synthax.

Here is a good reference, and this is my reference for some of the things on this page: LaTeX/Mathematics - Wikibooks, collection of open-content textbooks

Thanks for your time, use math v2.0 wisely, and become free in your expression of math...
Peace

~ Sun, number 1 cause of global warming.


Caution: some thinking required when using this product, keep your axons and dendrites inside your head at all times.
2

#2 User is offline   Jay-qu 

  • Ancora Imparo
  • View blog
  • View gallery
  • Group: Members
  • Posts: 5,884
  • Joined: 26-February 05

Posted 11 May 2006 - 10:27 PM

Excellent, so its all \omegaorking now :)
Jay-qu
::Hypography Moderator of..
Chemistry, Physics & Mathematics, Astronomy & Cosmology, Space and Technology & gadgets Forums

"I don't think much of a man who is not wiser today than he was yesterday."
-Abraham Lincoln

Physics Guides - Physics Resources and help
0

#3 User is offline   Qfwfq 

  • Exhausted Gondolier
  • View blog
  • Group: Members
  • Posts: 6,239
  • Joined: 18-February 05
  • LocationTrying to float on an ocean of hydrogen.

Posted 11 May 2006 - 10:41 PM

You mean the alignment is better now?
testing, X^5 one two three...
now, how does that look?

Huge! How do we get sizes right?
Inutil insegnà al mus, si piart timp, in plui si infastidìs la bestie.

Hypography Forum PITA......... er, Administrator. :hihi:
0

#4 User is offline   alexander 

  • Dedicated Smart-ass
  • View blog
  • View gallery
  • Group: Members
  • Posts: 5,656
  • Joined: 04-May 04

Posted 12 May 2006 - 12:50 AM

you should use a small case x, that or use \norm before the expression, i will explain more later, when i write up another section of the tutorial, but you can set size with:
\Large \Large large text
\normalsize \normalsize normal text
\small \small small text
~ Sun, number 1 cause of global warming.


Caution: some thinking required when using this product, keep your axons and dendrites inside your head at all times.
0

#5 User is offline   Qfwfq 

  • Exhausted Gondolier
  • View blog
  • Group: Members
  • Posts: 6,239
  • Joined: 18-February 05
  • LocationTrying to float on an ocean of hydrogen.

Posted 12 May 2006 - 11:29 PM

Great, thanx, but woudn't it be better for \norm [LaTeX Error: Syntax error] to be the default?

:)
Inutil insegnà al mus, si piart timp, in plui si infastidìs la bestie.

Hypography Forum PITA......... er, Administrator. :hihi:
0

#6 User is offline   Tormod 

  • Hypographer
  • View blog
  • View gallery
  • Group: Members
  • Posts: 14,103
  • Joined: 11-February 02
  • LocationOslo, Norway

Posted 13 May 2006 - 12:14 AM

Sticking this and rewriting the title slightly.
:) Your Friendly Neighborhood Administrator - Please help us by reporting bugs and problems via our Bug Tracker!

Please try out our new Creativity Forums!

Science is not only compatible with spirituality; it is a profound source of spirituality.
- Carl Sagan
0

#7 User is offline   alexander 

  • Dedicated Smart-ass
  • View blog
  • View gallery
  • Group: Members
  • Posts: 5,656
  • Joined: 04-May 04

Posted 13 May 2006 - 04:12 PM

Finally, finished, please post what you want to see in the tutorial and i will add it. Also, Math v2.0 was a catchy name for this stuff, but i guess you made it make more sense...

I just made a practice thread in testing section quick link:
Click here to enter the LaTeX test area
You can use it to practice latex if you would choose to do so, however, and i emphasize this, ASK YOUR QUESTIONS HERE PLEASE, so anyone looking for an answer will have only one thread to refer to.
Thank you for your attention...
~ Sun, number 1 cause of global warming.


Caution: some thinking required when using this product, keep your axons and dendrites inside your head at all times.
0

#8 User is offline   alexander 

  • Dedicated Smart-ass
  • View blog
  • View gallery
  • Group: Members
  • Posts: 5,656
  • Joined: 04-May 04

Posted 13 May 2006 - 04:34 PM

I attempted to spellcheck the text, it should be mostly ok, so dont point fingers and say "he does not use spellcheck", however you will still not see proper gramar, so pbtt
~ Sun, number 1 cause of global warming.


Caution: some thinking required when using this product, keep your axons and dendrites inside your head at all times.
0

#9 User is offline   Zerg 

  • Curious
  • Group: Members
  • Posts: 3
  • Joined: 22-May 06

Posted 22 May 2006 - 02:42 AM

I started use LaTeX some time ago, it's great!
0

#10 User is offline   Zerg 

  • Curious
  • Group: Members
  • Posts: 3
  • Joined: 22-May 06

Posted 22 May 2006 - 02:49 AM

Yep, LaTeX is great thing. Btw., I found one interesting program few days ago on iosoftware.co.uk and tried its trial. It supports LaTeX and visual editing simultaneosely. Though it doesn't support all Latex features, I found it useful in learning LaTeX.
0

#11 User is offline   alexander 

  • Dedicated Smart-ass
  • View blog
  • View gallery
  • Group: Members
  • Posts: 5,656
  • Joined: 04-May 04

Posted 23 May 2006 - 05:17 PM

there's a bunch of these programs around, the best one i've seen so far was for macs

LaTeX
or go directly here: http://en.wikipedia.org/wiki/LaTeX

under the Editors and IDEs there is a list of programs that will probably make a lot of beginner latex people lives a whole lot easier
~ Sun, number 1 cause of global warming.


Caution: some thinking required when using this product, keep your axons and dendrites inside your head at all times.
0

#12 User is offline   Tim_Lou 

  • Explaining
  • Group: Members
  • Posts: 919
  • Joined: 23-December 03

Posted 28 June 2006 - 04:45 PM

nice,

v{a} for vector... hmm

v{a}


times for cross product

v{a} \times v{a}


hmm, bullet for dot product... nice

\nabla \bullet v{E}=\frac{\rho}{\epsilon_0}



H_2+I_2 \leftrightarrow 2HI
I have mistaken, apologized, and taken the consequences. My only regret, was for how I was bothered by the unchangable.
0

#13 User is offline   Erasmus00 

  • Creating
  • View blog
  • Group: Members
  • Posts: 1,559
  • Joined: 05-June 05

Posted 28 June 2006 - 05:03 PM

Tim_Lou said:

hmm, bullet for dot product... nice





You can use cdot as well. Its a bit smaller.


v{\nabla} \cdot v{E} = 4\pi\rho

-Will
0

#14 User is offline   Farsight 

  • Understanding
  • Group: Members
  • Posts: 423
  • Joined: 11-May 06

Posted 16 November 2006 - 01:54 PM

[LaTeX Error: Syntax error]
0

#15 User is offline   snoopy 

  • Understanding
  • Group: Members
  • Posts: 258
  • Joined: 21-March 07

Posted 21 December 2007 - 03:05 AM

just testing as the testing ground is down

\setlength{\unitlength}{5cm}\begin{picture}(1,1)\put(0,0){\line(0,1){1}}\put(0,0){\line(1,0){1}}\put(0,0){\line(1,1){1}}\put(0,0){\line(1,2){.5}}\put(0,0){\line(1,3){.3333}}\put(0,0){\line(1,4){.25}}\put(0,0){\line(1,5){.2}}\put(0,0){\line(1,6){.1667}}\put(0,0){\line(2,1){1}}\put(0,0){\line(2,3){.6667}}\put(0,0){\line(2,5){.4}}\put(0,0){\line(3,1){1}}\put(0,0){\line(3,2){1}}\put(0,0){\line(3,4){.75}}\put(0,0){\line(3,5){.6}}\put(0,0){\line(4,1){1}}\put(0,0){\line(4,3){1}}\end{picture}



hopefully this will work
0

Share this topic:


  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users


View our Science Quizzes | Science links. About the Hypography Science Forums

Friends

We recommend these stellar sites:

PC Help Forum

ATL - Atlanta Computer Repair

Health Sphere

Sponsors

Hypography?

Hypography [n.]: A combination of "hyperlink" and "bibliography" - ie, a list of links to electronic documents. Comparable to discography and bibliography, but not cartography.

When we launched in May 2000, we wanted to create a site to share science-related content of all kinds on the web. As time passed, our site turned into a pure science forum with lots of cool people.

So we kept the name Hypography and the cool science forum community - and aim to be a friendly place for discussion of science topics of all kinds.