Processing math: 100%

Tuesday, September 25, 2012

Code Syntax Highlighting Test

This is a test of the code syntax highlighter created by Alex Gorbatchev.

Various Hello World Programs

C++ code

#include <iostream>

int main(void)
{
    using namespace std;
    cout << "hello world" << endl;
}

Java code

public class HelloWorld
{
    public static void main(String[] args)
    {
        System.out.println("hello world");
    }
}

Matlab code

% print numbers 1 through 10
for i = 1:10
    printf('%d ', i);
end
printf('\n');

More Advanced Features

Different starting lines

if(a % 3 == 0)
{
    cout << "a is divisible by 0" << endl;
}

MathJax Test

I'm testing out the new MathJax functionality. This allows me to use TeX, LaTeX or MathML to display math equations. To learn more about MathJax, visit their website: www.mathjax.org

Basic tests

Equation (1) shows a basic relationship. ax5by Equation (2) shows an example of using fractions. a+2a+1

Integrals and differentials

Equation (3) shows an example using integrals. y(t)=0xdt Equation (4) shows an example using differential equations using Newtons dot notation. ¨y˙y+py=q Equation (5) shows Leibniz's differential notation for a PDE (Wave Equation). 2ut2=c22u

Formatting

An in-line equation: x=5. Equation (6) shows an example with parts of the equation highlighted red. x=5