Aligning left

  • Marc van Dort

    Marc van Dort - 2010-11-04

    Hi there,

    First off I want to thank you for creating such an awesome LaTeX renderer. It works perfectly and it was very easy to install, even implementing it on a phpbb forum didn't take longer than a couple minutes.

    I do have one issue however. By default, the div's containing math are centered, but because the layout of our forum is pretty wide this doesn't really improve readability. Therefore I would like to align the equations on the left. I tried to add align='left', but this didn't work. I couldn't find a css file or anything, so I was wondering, where can I change this?

    Thanks in advance!

    Kind regards,

  • Davide P. Cervone

    Thanks for your kind comments.

    FYI, there is a phpBB plugin for jsMath already, in case that is of use to you.

    As for the left justification, you could do that by adding

    jsMath.styles = {
      'div.typeset': {
        'text-align': 'left',
        margin: '1em 0 1em 2em'

    to your jsMath/easy/load.js file (just above the "do not modify below this" comment).  This will align displayed math to the left, and give it 1em above and below, and 2em indentation from the left (nothing extra at the right).  Change these to suit your needs.

    Hope that does it.



Log in to post a comment.