
[Sponsors] 
March 15, 2009, 15:58 
Guide: Writing Equations in LaTeX on the CFD Online Forums

#1 
Administrator
Peter Jones
Join Date: Jan 2009
Posts: 677
Rep Power: 10 
This is a brief introduction about how to write equations in the CFD Online discussion forums. The equation functionality is based on LaTeX, a versatile mathematical typesetting system which is often used to write scientific papers and books. With LaTeX mathematical equations are written using normal text and this makes it very suitable for a textbased forum like this. The forum will automatically generate images of the LaTeX codes it finds and display them properly. LaTeX often gives very nice looking formulas. LaTeX can be a bit difficult to get started with, but those who know it tend to like it very much. Here is a simple example to illustrate how it works:A usefull feature in the forum is that the LaTeX code used to write an equation can be seen when you hoover with the pointer over it. If you click on an equation a window will be opened displaying the LaTeX code used to write it. This makes it easy to learn from other people and to copyandpaste equations from other posts.
You can see how all equations on this page have been written either by hoovering over them with the pointer or by clicking on them! LaTeX can be used in two ways:
There is a special LaTeX reference tool avalable in the advanced editor which helps you to find the codes needed to write symbols, relations, operators etc. in LaTeX. To open the LaTeX reference click on the symbol to the right just above the editor window. Below follows a summary of the most commonly used symbols, relations, operators and functions as well as a few other frequently asked questions. To see how these symbols or equations were created just click on the one you are interested in and a window will be opened showing the code used to create it: Symbols Lowercase Greek letters: Capital Greek letters: Operators and relations: Misc: Bracketing  () {} [] You can simply write the brackets you want. To get the correct size of the brackets you sometimes have to use the \left and \right keywords in front of the bracket. For example, just writing parentheses gives , but with \left and \right keywords you would get . Exponents and Subscripts  [math]a_i^n[/math]  [math]x_{i+1}^{2^{n+1}}[/math] Functions  Fractions, Radicals, Integrals, Sums, Limits, ...  [math]\frac{1}{2}[/math]  [math]\sqrt{x+y}[/math]  [math]\sqrt[n]{x}[/math]  [math]\int^\infty_0 f(x) \, dx[/math]  [math]\oint_\Gamma f(x) \, ds[/math]  [math]\sum_{i=1}^{\infty}\frac{1}{i}[/math]  [math]\lim_{x\to\infty}\frac{1}{x}[/math] Trigonometric and Logarithmic Functions Please use these instead of simply typing in "sin". That ensures that the function is typeset properly with the right font and spacing.  [math]\cos^2 x + \sin^2 x = 1[/math]  [math]\tanh(c)[/math]  [math]\log n^2[/math]  [math]\ln(e)[/math] Spacing Sometime you may want to add extra horizontal space between characters. The following codes can be used to add extra space:
, or written more explicitly:


October 30, 2009, 02:51 
test

#2 
New Member
Mohit Madan
Join Date: Oct 2009
Posts: 4
Rep Power: 8 

October 30, 2009, 03:03 

#3 
New Member
Mohit Madan
Join Date: Oct 2009
Posts: 4
Rep Power: 8 

October 30, 2009, 03:04 

#4 
New Member
Mohit Madan
Join Date: Oct 2009
Posts: 4
Rep Power: 8 

October 30, 2009, 03:06 

#5 
New Member
Mohit Madan
Join Date: Oct 2009
Posts: 4
Rep Power: 8 

December 31, 2010, 02:03 
Useful website for generating LaTeX equations

#6 
Senior Member
Real Name :)
Join Date: Jan 2010
Location: United States
Posts: 180
Rep Power: 7 

November 6, 2011, 23:56 

#7 
New Member
Sha Liu
Join Date: Nov 2011
Posts: 1
Rep Power: 0 
cool. i often use mathematica to write equations. then they can be transform to latex form.


April 14, 2013, 16:11 

#8 
New Member
Stefan Bjornsson
Join Date: Apr 2013
Posts: 7
Rep Power: 4 

May 2, 2013, 22:15 

#9 
New Member
zdong
Join Date: Aug 2011
Posts: 15
Rep Power: 6 

June 4, 2013, 20:49 

#10 
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 700
Rep Power: 8 

October 24, 2013, 12:58 

#11 
New Member
Zhengbing
Join Date: Apr 2013
Posts: 20
Rep Power: 4 

May 6, 2014, 21:18 

#12 
New Member
Betta Hwang
Join Date: May 2014
Posts: 6
Rep Power: 3 
why can't I use \^{\circ}C?


May 6, 2014, 21:22 

#13 
New Member
Betta Hwang
Join Date: May 2014
Posts: 6
Rep Power: 3 

December 9, 2014, 07:38 

#14 
Senior Member
Bobi
Join Date: Oct 2012
Posts: 286
Rep Power: 6 
Last edited by babakflame; December 9, 2014 at 08:44. 

January 26, 2015, 10:21 

#15 
New Member
Join Date: Jan 2015
Posts: 12
Rep Power: 2 
Last edited by Gary51075607; January 26, 2015 at 22:01. 

January 29, 2015, 21:51 

#16 
New Member
Join Date: Jan 2015
Location: Beijing,China
Posts: 12
Rep Power: 2 

May 25, 2015, 13:49 

#17 
New Member
Ali Kadar
Join Date: Oct 2014
Location: Delft
Posts: 24
Rep Power: 3 
__________________
A good solution is one which does justice to the inner nature of the problem Cornelius Lanczos in a letter to Albert Einstein on March 9, 1947 Last edited by flowAlways; May 25, 2015 at 17:42. 

June 13, 2015, 10:18 

#18 
New Member
Justin
Join Date: Jan 2015
Posts: 16
Rep Power: 2 
I cannot figure this out. Where is my syntax error?
Here's what I typed between the bracketed math and /math: \alpha\frac{\partial^2x}{\partial \xi^2}2\beta \frac{\partial ^2x}{\partial \xi \partial \eta}+\gamma \frac{\partial ^2x}{\partial\eta^2}=0 \alpha\frac{\partial^2y}{\partial\xi^2}2\beta\frac{\partial^2y}{\partial\xi\partial\eta}+ \gamma\frac{\partial^2y}{\partial\eta^2}=0 Here the images of what displays on the codehogs.com online eqn editor: I don't understand why I'm getting an error on the forum. It's frustrating. 

June 15, 2015, 16:39 

#19 
Administrator
Peter Jones
Join Date: Jan 2009
Posts: 677
Rep Power: 10 
Seems like the LaTeX functionality is broken after the server move on June 5. We will investigate and post a message in this thread once LaTeX is working again.


June 15, 2015, 16:58 

#20 
New Member
Justin
Join Date: Jan 2015
Posts: 16
Rep Power: 2 
Thanks! I ended up posting equations as images obtained from the online LaTeX editor on codecogs.com but I found out I can post a maximum of 10 images.


Tags 
equations, formulas, latex, symbols 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Guide: Getting Started with the CFD Online Discussion Forums  pete  Site Help, Feedback & Discussions  6  July 20, 2015 07:20 
Writting equations on cfdonline.com  Guillermo Marraco  CFDWiki  2  September 11, 2006 18:12 
latex and dvi  Hong  Main CFD Forum  1  March 31, 2000 10:27 
Latex  chaker  Main CFD Forum  3  October 27, 1999 09:19 