I found this example for over and under brakets useful and thought I should keep it just in case I wanted to use it later.
\[
\overbrace{\rho \Big(
\underbrace{\frac{\partial \mathbf{v}}{\partial t}}_{
\begin{smallmatrix}
\text{Unsteady}\\
\text{acceleration}
\end{smallmatrix}} +
\underbrace{\mathbf{v} \cdot \nabla \mathbf{v}}_{
\begin{smallmatrix}
\text{Convective} \\
\text{acceleration}
\end{smallmatrix}}\Big)}^{\text{Inertia}} =
\underbrace{-\nabla p}_{
\begin{smallmatrix}
\text{Pressure} \\
\text{gradient}
\end{smallmatrix}} +
\underbrace{\mu \nabla^2 \mathbf{v}}_{\text{Viscosity}} +
\underbrace{\mathbf{f}}_{
\begin{smallmatrix}
\text{Other} \\
\text{forces}
\end{smallmatrix}}
\]
The example is from: http://www.physicsforums.com/showthread.php?t=264861
More information about how to do this type of writing is at:
http://en.wikibooks.org/wiki/LaTeX/Advanced_Mathematics
Note:
underbrace and overbrace can also be underbracket and overbracket. See that wiki page above if you want more information of how this works.
Showing posts with label LaTex. Show all posts
Showing posts with label LaTex. Show all posts
Monday, March 19, 2012
LaTex with Gmail?
I was wondering for while, what if I could send latex to other in Gmail and have it be readable?
Other than the fact that I am a scientist and would actually think about doing it, it has a host of problems such as having everyone having it installed to make it look right to everyone. But, one could always use it themselves to make sure the code they are sending and receiving is what they think it is. That is always an issue since LaTex can sometimes get confusing when writing equations.
The link to check out: (it is called GmailTex)
Sunday, March 18, 2012
Using MathJax with blogger
I work with Latex a lot with my job and I have not written anything about it here on my blog since it was difficult to get equations written. Recently though, I found MathJax on the web. But, they do not have any instructions for blogger that I could find.
The first website I could find that had some sort of instructions was:
http://tex.stackexchange.com/questions/13865/how-to-use-latex-on-blogspot
This is not optimal since it says to put the code in by editing the template, and that means you would need to keep modifying the template every time you wanted to change the look of the blog. Instead I added the scrip as a gadget on the side of the page with the title MathJax. It does not display anything; it just loads the script to display equations.
If you have java script enabled these equations should show up as math
Inline:
\( x < x^2 \) if \(x>1\)
Centered:
\[ f(x) \]
You can make this work by adding the following text as a gadget as well:
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js" type="text/javascript">
MathJax.Hub.Config({
extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
inlineMath: [ ['\\(','\\)'] ],
displayMath: [ ["\\[","\\]"] ],
processEscapes: true
},
"HTML-CSS": { availableFonts: ["TeX"] }
});
</script>
You can then turn it off by adding the tags: (how I wrote the code above)
<div class="tex2jax_ignore">
</div>
The first website I could find that had some sort of instructions was:
http://tex.stackexchange.com/questions/13865/how-to-use-latex-on-blogspot
This is not optimal since it says to put the code in by editing the template, and that means you would need to keep modifying the template every time you wanted to change the look of the blog. Instead I added the scrip as a gadget on the side of the page with the title MathJax. It does not display anything; it just loads the script to display equations.
I then added a custom scrip to not use $ or $$ as delimiters and to only use \( \) and \[ \]
If you have java script enabled these equations should show up as math
Inline:
\( x < x^2 \) if \(x>1\)
Centered:
\[ f(x) \]
You can make this work by adding the following text as a gadget as well:
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js" type="text/javascript">
MathJax.Hub.Config({
extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
inlineMath: [ ['\\(','\\)'] ],
displayMath: [ ["\\[","\\]"] ],
processEscapes: true
},
"HTML-CSS": { availableFonts: ["TeX"] }
});
</script>
You can then turn it off by adding the tags: (how I wrote the code above)
<div class="tex2jax_ignore">
</div>
Subscribe to:
Posts (Atom)