Denis Schluppeck bio photo

Denis Schluppeck

Neuroscientist, vision, fMRI

Email Twitter

In order to share little snippets of code in news, we want to make sure we have appropriate code highlighting

bash

for i in *.m; do
  echo "${i} might be matlab code?"
done

matlab

figure, plot(rand(100,1), 'linewidth', 2)

latex / TeX

$\frac{1}{n}\sum_i=1^n x_i $

Github gists

Probably a good way to share stuff with people around UoN and elsewhere is to go down the route of gists on github:

And mathjax rendering - may need this sometimes

Inline looks like this: \( x=\frac{1}{n} \) and block rendering like that

\[ \frac{1}{n^{2}} \]

Standard latex matrix definitions look ok:

\[ \begin{bmatrix}a_1 & a_2 \\ b_1 & b_2\end{bmatrix} \]

as does Matrix bold in equations:

\[ \mathbf{A}\mathbf{x} = \mathbf{b} \]

and other assorted beauties:

\[ (A’A)^{-1}, \int_0^\infty \]