Login Register

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using TeX: ∫x2dx∫x2dx\int x^2dx
#1
One can use TeX to write formulas.  It works like usual in TeX texts, only that one does not have to use the usual brackets ($ or $$), but, instead, the more modern \ ( ... \ ) and \ [ ... \ ] brackets.



Inline formulas

To obtain an inline formula, you  can use \ ( ... \ )  bracket, so that
Code:
\(  \tau = \int_\gamma \sqrt{g_{mn}\frac{d\gamma^m}{dt}\frac{d\gamma^n}{dt}} dt \)
gives an inline formula like \(\tau = \int_\gamma \sqrt{g_{mn}\frac{d\gamma^m}{dt}\frac{d\gamma^n}{dt}} dt \) here. 

Note also that the  \ ( ... \ )  brackets work even in thread titles - as you can see in the title of this thread.  But if, in a summary, the formula does not completely fit into the available space and is cutted, it does not work.   


Separate formulas

Instead, to obtain a separate formula, you can use  \ [ ... \ ] brackets, which gives
Code:
\[  \tau = \int_\gamma \sqrt{g_{mn}\frac{d\gamma^m}{dt}\frac{d\gamma^n}{dt}} dt \]
a centered formula on a separate line, as in the following example: 
\[  \tau = \int_\gamma \sqrt{g_{mn}\frac{d\gamma^m}{dt}\frac{d\gamma^n}{dt}} dt, \]
which is also greater than the inline formula, as usual in LaTeX.


How to use TeX on your own homepage:

Mathjax is quite easy to use.  All one needs is to include the following script line into the header of the webpage:  
Code:
<script type="text/javascript"  src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
To find how to put such a line into the headers of this MyBB forum was, in fact, also not that difficult.  I had to look in the Admin CP for templates, and, there, in the templates for the theme, to find under "Ungrouped templates" the headerinclude template.  This is the place where the script line above has to be included.  That's all.

Note: In an earlier version of this post, the link the matjax.org was given as http:// instead of https://. As a consequence, when the site was used via https://, Mathjax did not work.


Forum Jump:


Users browsing this thread: 1 Guest(s)