
[Sponsors] 
Guide: Writing Equations in LaTeX on the CFD Online Forums 

LinkBack  Thread Tools  Search this Thread  Display Modes 
March 15, 2009, 14:58 
Guide: Writing Equations in LaTeX on the CFD Online Forums

#1 
Administrator
Peter Jones
Join Date: Jan 2009
Posts: 682
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, 01:51 
test

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

October 30, 2009, 02:03 

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

October 30, 2009, 02:04 

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

October 30, 2009, 02:06 

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

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

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

November 6, 2011, 22: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: 13 

May 2, 2013, 22:15 

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

June 4, 2013, 20:49 

#10 
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17 

October 24, 2013, 12:58 

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

May 6, 2014, 21:18 

#12 
New Member
Betta Hwang
Join Date: May 2014
Posts: 6
Rep Power: 11 
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: 11 

December 9, 2014, 06:38 

#14 
Senior Member
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15 
Last edited by babakflame; December 9, 2014 at 07:44. 

January 26, 2015, 09:21 

#15 
New Member
Join Date: Jan 2015
Posts: 14
Rep Power: 11 
Last edited by Gary51075607; January 26, 2015 at 21:01. 

January 29, 2015, 20:51 

#16 
New Member
Join Date: Jan 2015
Location: Shanghai,China
Posts: 13
Rep Power: 11 

May 25, 2015, 13:49 

#17 
New Member
Ali Kadar
Join Date: Oct 2014
Location: Delft
Posts: 25
Rep Power: 11 
__________________
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: 28
Rep Power: 11 
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. 

May 22, 2018, 11:35 

#19 
Senior Member
Mehdi Asghari
Join Date: Feb 2010
Posts: 127
Rep Power: 16 
Last edited by Asghari_M; May 26, 2018 at 15:44. 

May 26, 2018, 10:36 
Is the bold letters & fonts in Latex possible.?

#20 
Senior Member
Mehdi Asghari
Join Date: Feb 2010
Posts: 127
Rep Power: 16 
Hi all,
Is it possible to use bold fonts in the Latex Thanks for any answer. 

Tags 
equations, formulas, latex, symbols 
Thread Tools  Search this Thread 
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  8  July 29, 2016 05:00 
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 