Math formulas like Gauss law $\oint_S \vec{E}\cdot\vec{dS}=\frac q \epsilon_0$ have always been a headache when it came to webpages ( even Moodle does it quite badly).
But MathJax seems to solve a whole lot of different problems, is simple to use, and seems having fulfilled it's task. On the main page, you can see some eye-candy examples, there is a great FAQ, and an indispensable list of implemented LaTeX commands (there is an option of using MathML, but for me, TeX seems much more convenient, and doesn't make me learn a new language). Pay attention: \newcommand IS implemented!
It works in probably any situation you could imagine; in Blogger, you just need to insert
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js">
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>
after the </head> tag in the template HTML code (Design→Edit HTML→Edit Template). Done!
NB! If you want to define some convenient new commands, put the definitions in inline math mode in the beginning of the page, and the new commands will be available in all the formulas.
Leo's stuff
Mostly IT and physics, nothing really important, but maybe useful.
Thursday, July 12, 2012
Friday, February 17, 2012
I proclaim this to be my best peace of code for quite a time
http://pastie.org/private/oxwmqtbis0zaj0dofqrgig
This R code summarizes the results of modelling a cloud of particles. The part I'm actually proud of are lines 47-54. It was fun getting used to the "vector-oriented" paradigm.
This R code summarizes the results of modelling a cloud of particles. The part I'm actually proud of are lines 47-54. It was fun getting used to the "vector-oriented" paradigm.
Tuesday, October 11, 2011
User-assisted syncing
I have written a script, that helps with keeping 2 directories in sync, providing changes are made in both places, and a merge must be made. Git, CVS or analogues proved to be too slow, while rsync and derivatives don`t handle changes in both places at once well. Besides, the latter are automatic, which doesn`t give you much control over what version is being preferred. Also, in case a file gets damaged, you woudn`t know.
It`s a little buggy (doesn`t handle exceptions well), and something will be changed/improved.
Being bref, http://pastie.org/2678717. Follow the updates!
It`s a little buggy (doesn`t handle exceptions well), and something will be changed/improved.
Being bref, http://pastie.org/2678717. Follow the updates!
Subscribe to:
Posts (Atom)