Science Forums: Quick LaTeX Tutorial - Science Forums

Jump to content

Welcome to ScienceForums.Net!

Welcome to ScienceForums.Net! We welcome science discussion at all levels — from beginners to researchers, covering topics from biology to computer science, and much more. Registration is fast and free, and allows you to post on the forums, so register now and join the discussions!
  
After you've registered, come in and introduce yourself, or visit the forum index. If you need any help  registering, posting, or if you just have some questions about our site, please feel free to contact us at staff at scienceforums dot net.

  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Create a ScienceForums.Net Blog!
Guest Message © 2012 DevFuse
  • 8 Pages +
  • « First
  • 6
  • 7
  • 8
  • You cannot start a new topic
  • You cannot reply to this topic

Quick LaTeX Tutorial Rate Topic: -----

#141 the tree 


Primate
Only some of the logic notation appears to work:

All rendering okay:
\forall p \exists q, p \therefore q, p=\not q, p \neg q.

Not rendering:
[LaTeX Error: Syntax error], [LaTeX Error: Syntax error].
0

#142 Cap'n Refsmmat 


Icon
Mr. Wizard
\and and \or aren't symbols in LaTeX. You can use \wedge and \vee though.

p \wedge q, p \vee q
Cap'n Refsmmat
SFN Administrator

Get in the chatroom!
0

#143 the tree 


Primate
Strange, they appear on the Wikipedia LaTeX guide - maybe they are using an obscure package.
0

#144 Cap'n Refsmmat 


Icon
Mr. Wizard
I think Wikipedia uses a bunch of the AMS packages by default. I could add some to our package list if you find out what we need.
Cap'n Refsmmat
SFN Administrator

Get in the chatroom!
0

#145 shyvera 


Quark
One thing that hasn’t been mentioned in this thread so far is formatting colors in LaTeX.

\color{red}{\rm red}

\color{blue}{\rm blue}

\color{green}{\rm green}

\color{yellow}{\rm yellow}

\color{black}{\rm black}

\color{white}{\rm white}

—–—Vera—–—
0

#146 khaled 


Meson
I have learned LaTeX because in my college i have to write reports and papers in LaTeX,

test:

|x| = \{ \begin{matrix} \color{red}{-X}&\color{red}{if X<0}\\ \color{blue}{X}&\color{blue}{if X>0}\\ \end{matrix}
0

#147 the tree 


Primate

khaled said:

I have learned LaTeX because in my college i have to write reports and papers in LaTeX,

test: [math]|x| = \{ \begin{matrix} \color{red}{-X}&\color{red}{if X<0}\\ \color{blue}{X}&\color{blue}{if X>0}\\ \end{matrix}[/math]


In that case you might want to use \mbox around plain text such as 'if', and use the \cases notation rather than trying to hack your way around a matrix.

f(x) = \begin{cases}\ln(1-x)  & \mbox{if} \; x<0 \\1           & \mbox{if} \; 0\leq x < c \\x^2       &  \mbox{otherwise}\end{cases}

See how that looks neater both in terms of code and output?
0

#148 murshid 


Quark
Why doesn't the factorial sign work in LaTex here? for example, \frac{1}{2} works, but when I use factorial sign after the '2' in the denominator, I get an error message: \frac{1}{2!}
.
0

#149 Cap'n Refsmmat 


Icon
Mr. Wizard
2!

Should be fixed now. It was a bug in how the software handled exclamation marks -- I didn't realize IPB escapes them to their HTML entities.
Cap'n Refsmmat
SFN Administrator

Get in the chatroom!
0

#150 csmyth3025 


Atom
Pardon the interuption, but I was trying to use LaTeX in the astronomy and cosmology section and it didn't seem to work. I'm just testing a short script here;

[LaTeX Error: Syntax error]

Quote

[ math]\frac{2\times\pi\times8.8\times10^8 m}{8834s}\eq\frac{625900 m}{s}[/math ]

I inserted the spaces after the beginning and before the ending brackets so that the quoted section would appear as the original script I wrote.

Well...obviously I'm doing something wrong. The equation I'm trying to write is:

(2*pi*8.8*10^8 m)/(8834 s)=625900 m/s

Can anyone tell me what I'm doing wrong?

Chris
"It is difficult to say what is impossible, for the dream of yesterday is the hope of today and the reality of tomorrow." (Robert Goddard - from his high school graduation oration, "On Taking Things for Granted", June 1904)

0

#151 murshid 


Quark

View Postcsmyth3025, on 12 July 2011 - 08:44 AM, said:

Pardon the interuption, but I was trying to use LaTeX in the astronomy and cosmology section and it didn't seem to work. I'm just testing a short script here;

[LaTeX Error: Syntax error]


Try this:


[math]\frac{2\times\pi\times8.8\times10^8 m}{8834s} = 625900 m/s[/math]


\frac{2\times\pi\times8.8\times10^8 m}{8834s} = 625900 m/s

or this:

[math]\frac{2\times\pi\times8.8\times10^8 m}{8834s} = 625900 m{s}^{-1}[/math]


\frac{2\times\pi\times8.8\times10^8 m}{8834s} = 625900 m{s}^{-1}

This post has been edited by murshid: 12 July 2011 - 09:01 AM

0

#152 csmyth3025 


Atom
\frac{2\times\pi\times8.8\times10^8\,m}{8834\,s}=\frac{625900\,m}{s}=625,900\,m/s=625.9\,km/s

Quote

[ math]\frac{2\times\pi\times8.8\times10^8\,m}{8834\,s}=\frac{625900\,m}{s}=625,900\,m/s=625.9\,km/s[/math ]


It seems that what tripped me up is the use of "\eq" for the equals symbol instead of just inserting "=" in the script. Also, it's easier to read the equation if I use "\," before "m" and "s". I remember reading in one of the tutorial pages that spaces between characters are ignored.

Thanks for the help.

Chris
"It is difficult to say what is impossible, for the dream of yesterday is the hope of today and the reality of tomorrow." (Robert Goddard - from his high school graduation oration, "On Taking Things for Granted", June 1904)

0

#153 Cap'n Refsmmat 


Icon
Mr. Wizard
You can also use \mbox{} for the m/s. Click on the equation to see the code used to make it:

625,900 \, \mbox{m/s}
Cap'n Refsmmat
SFN Administrator

Get in the chatroom!
0

#154 NXJim 


Lepton
Èíòåðåñíî .
0

Share this topic:


  • 8 Pages +
  • « First
  • 6
  • 7
  • 8
  • 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