Why is my latex "blacked out" on my blog?

  • Author
    Posts
  • #1013292

    onanel
    Member

    How do I correct my LaTeX on my blog?

    $latex CO_2$

    Is that correct?

    The blog I need help with is thehexagonlavish.wordpress.com.

    #1013336

    justjennifer
    Moderator

    There are a very limited number of folks who use and can help out with LaTeX questions. Unfortunately I am not one of them.

    You did see the LaTeX support doc? http://en.support.wordpress.com/latex/ There are a couple of reference docs at the very bottom which might help.

    #1013337

    justpi
    Member

    That’s an oversight in the CSS of the theme (the vertical alignment is also bad). You should post about this in the Themes forum, which is monitored by the WP theme team.

    #1013338

    1tess
    Moderator Emeritus

    I’ll move this thread to the Themes Forum…

    #1013339

    justpi
    Member

    Ah, past perfect simple future tense…

    One of the major problems encountered in time travel is not that of becoming your own father or mother. […] The major problem is simply one of grammar, and the main work to consult in this matter is Dr. Dan Streetmentioner’s Time Traveler’s Handbook of 1001 Tense Formations. It will tell you, for instance, how to describe something that was about to happen to you in the past before you avoided it by time-jumping forward two days in order to avoid it. The event will be descibed differently according to whether you are talking about it from the standpoint of your own natural time, from a time in the further future, or a time in the further past and is futher complicated by the possibility of conducting conversations while you are actually traveling from one time to another with the intention of becoming your own mother or father. Most readers get as far as the Future Semiconditionally Modified Subinverted Plagal Past Subjunctive Intentional before giving up;

    (Douglas Adams, Hitchhiker’s Guide to the Galaxy)

    #1013340

    1tess
    Moderator Emeritus

    LOL
    Nature hath framed strange fellows in her time.
    our friend William

    #1013348

    onanel
    Member

    Thank you all for your replies. I appreciate the effort so far.

    #1013349

    1tess
    Moderator Emeritus

    Well, the thread is still modlooked. We volunteers cannot help.

    Please be patient until a staff person can help. There are quite a few posts which have pending needs for attention from staff.

    #1013357

    justjennifer
    Moderator

    I’ve re-added the tag since it seems to have disappeared.

    LaTeX problem still evident on this post http://thehexagonlavish.wordpress.com/2012/09/14/you-wanna-go-to-mars/

    #1013358

    This LaTeX code is correct:

    $latex CO_2$

    I tried it in a WordPress.com test blog using the Enterprise theme, and it worked fine there. I then changed the theme to Sight, which caused the LaTeX to be blacked out. This is definitely a problem with the theme, like justpi said.

    If you don’t want to change your theme, there’s a temporary work-around. Click on the Text tab in the WordPress visual editor and enter this HTML:

    CO<sub>2</sub>

    It will render the chemical formula for carbon dioxide correctly in the Sight theme.

    Fred Chapman (Math PhD and LaTeX Lover)

    #1013359

    timethief
    Member

    I flagged this thread with “staff attn – Themes Staff” as it appears to have slipped their notice.

    #1013361

    justjennifer
    Moderator

    And I see that someone has re-added the modlook tag to get Staff assistance. Thank you.

    #1013362

    Hi,

    Thanks for the report, and I’m sorry for the hassle. We’ll take a closer look and reply to this forum thread with updates.

    #1013363

    justjennifer
    Moderator

    @onanel – does this earlier forum post help at all (look towards the bottom at ardpete’s replies to mathgarage). https://en.forums.wordpress.com/topic/how-do-i-type-latex-in-my-blog?replies=19 (sorry if not, I’m rather clutching at straws here)

    @bryanvillarin-Can you ask someone from the Theme team have a look at this? If it is, as Panos’ mentioned above two weeks ago, a problem with the CSS, perhaps there is a simple fix? Thanks.

    #1013364

    justjennifer, the problem in the other forum discussion you mentioned was that mathgarage used the wrong syntax to invoke LaTeX processing in WordPress. The standard LaTex syntax is $ ... $ but WordPress changes that to $latex ... $. onanel is already using the correct LaTeX syntax for WordPress. This is purely a CSS issue.

    Fred

    #1013365

    I was inspecting the CSS on onanel‘s blog. LaTeX on WordPress renders formulas as images using a PHP script. Here’s the code being used to generate the chemical formula for carbon dioxide:

    http://s0.wp.com/latex.php?latex=CO_2&bg=27292a&fg=000000&s=0

    The call to latex.php includes a parameter bg which specifies the background color for the image. Changing the parameter to use white as the background color produces the desired result:

    http://s0.wp.com/latex.php?latex=CO_2&bg=ffffff&fg=000000&s=0

    The alignment of the image is a separate issue and needs to be solved by tweaking the theme’s CSS.

    Fred

    #1013366

    justjennifer
    Moderator

    Thanks for answering Fred, appreciated.

    Apparently, then, we will have to wait until the Theme team corrects this.

    #1013367

    Here’s the CSS which fixes the alignment problem for LaTeX in the Sight theme:

    ‘img.latex {
    border: none;
    vertical-align: -20%;
    }’

    #1013368

    Jennifer, you are very welcome! -Fred

    #1013369

    Whoops, that CSS code didn’t render the way I intended. Let me try again.

    img.latex {
    border: none;
    vertical-align: -20%;
    }

The topic ‘Why is my latex "blacked out" on my blog?’ is closed to new replies.