Tag Archives: blog

General Tutorial

Equations...

Turns out that my web provider now provides a SQL and PHP server with my base package and this was all the incentive I needed to give a self hosted WordPress blog a whirl.  To get a basic blog system up and running literally took me 5 minutes with the free WordPress software and using the export function I was quickly able to copy the few posts over from my free WordPress blog.

Now I have my own hosted service this presents me with several advantages over the free wordpress accounts, but there are two in particular that are attractive to me.  The first one is that I can now embed proper equations into a blog post using LaTeX and MathML by linking it into my equation editor MathType...

By adding in the 'LaTeX for WordPress' plug in for the hosted WordPress, I can now copy equations straight from MathType and paste them directly into my blog by following this procedure.

1.) Open MathType and prepare your equation.

2.) Go to MathType -> Preferences -> Cut and copy preferences; and then select MathML or TeX; then LaTeX 2.09 and later

Click

3.) Highlight the equation in MathType 6.7d and then right click and select copy or press (⌘ + C)

4.) Find the position in your blog post where you want the equation to appear, then paste (⌘ + V)

Following this means that I can embed equations like the one below pretty easily, the only downside that I've found is that if you've colour coded your equation in MathType, none of this formatting will carry over when pasting, but the equations should work and be visible in any browser, certainly the main three and on the iPhones and Android devices that I've worked on so far.

{F_d} = \overbrace {\sum\limits_{j \ge 1} {{\gamma _{G,j}}{\rm{ }}{G_{k,j}}} }^{{\rm{Permanent}}} + \overbrace {{\gamma _p}{\rm{ }}P}^{{\rm{Prestress}}} + \overbrace {{\gamma _{Q,{\rm{ }}1}}{\rm{ }}{Q_{k,{\rm{ }}1}}}^{{\rm{Leading}}{\rm{ Variable}}} + \overbrace {\sum\limits_{i > 1} {{\gamma _{Q,{\rm{ }}i}}{\rm{ }}{\psi _{0,{\rm{ }}i}}{\rm{ }}{Q_{k,{\rm{ }}i}}} }^{{\rm{Other Variable Actions}}}

With minimal tweaking and a little trial and error with the LaTeX code I was able to apply some colour tags to get the equation to look the same as it does in my lecture notes.

{F_d} = \overbrace {\sum\limits_{j \ge 1} {{\gamma _{G,j}}{\rm{ }}{G_{k,j}}} }^{{\rm{\color{Red} {Permanent}}}} + \overbrace {{\gamma _p}{\rm{ }}P}^{{\rm{\color{Red}{Prestress}}}} + \overbrace {{\gamma _{Q,{\rm{ }}1}}{\rm{ }}{Q_{k,{\rm{ }}1}}}^{{\rm{\color{Red}{Leading}{\rm{\color{Red}{ Variable}}}}}} + \overbrace {\sum\limits_{i > 1} {{\gamma _{Q,{\rm{ }}i}}{\rm{ }}{\psi _{0,{\rm{ }}i}}{\rm{ }}{Q_{k,{\rm{ }}i}}} }^{{\rm{\color{Red}{Other Variable Actions}}}}

This might initially appear to be quite a minor thing, but I've found that colour coding my notes like this really helps the students follow the equations when I'm talking them through various parts of the equations and so I was keen to keep the high quality formatting on my blog.  One thing that I have noticed however though is that the equations appear much much sharper on mobile devices and Apple machines, whereas on windows machines they appear slightly pixelated.

As to the second advantage this is that I can now embed Wolfram Mathematica CDF files into my blog directly, which will help me share some of my examples with anyone interested in my research.  I'll write another blog post on this over the next few days...

General

Growing pains?

I've toyed with the idea of installing WordPress onto my own webspace for several years, but the barrier has always been the same: I don't have a SQL database on my domain. Today I logged into to manage my account and I've discovered that my provider has now added SQL databases in as standard for my package which is great news.

The time for this couldn't be better either, as I've been tinkering with some Mathematica scripts lately and I can now embed them within blog posts etc, except that for this to work I need to have a way of getting iFrame tags to work... which can't be done on the free version of WordPress.

If I was to upgrade though, then this could be embedded quite easily, indeed Mathematica can publish specifically into WordPress if needed.  If I can get me head around this, then I'm likely to delete this blog and recreate elsewhere as part of sharing my research.  It'll be really interesting to see how it comes together, although in fairness I shouldn't get too excited as I've a habit of tinkering which usually means I'll tinker and then break my hosted blog somehow!