LaTeX images changed to an odd color
I recently switched to the confit theme, and in the preview the images were great: black text with a white background. Once I applied the theme, however, they became red with a gray-background, and are entirely illegible.
How can I fix this problem? I have custom CSS available, if there is a CSS way to fix it.
The blog I need help with is jeremykun.com.
I believe I have discovered where the problem is originating from. The background for the theme is automatically applied to the latex image *source* attribute. I.e., when I change the theme colors, the latex image link becomes, e.g.
What needs to happen (and I don’t know where this should happen) is that the bg and fg parts need to be taken from the right places. Right now it appears fg comes from the link hover color… an awkward choice… and the bg from the background color. I want it to always be white bg and black fg.
From googling around, it appears this is a commonly voiced bug by fellow math bloggers. It would be nice if WordPress fixed it once and for all.
I have custom CSS available, if there is a CSS way to fix it.
CSS is theme specific and since you say you have the Custom Design upgrade, I’ll ask to have this moved to the CSS Customization forum where you can hopefully get some assistance.
Thanks for reporting this!
This is not a CSS issue even though it’s (sort of) tied to CSS. I’m actually not sure whether it should be fixed in the LaTeX code or in the code that generates custom colors for each theme. I have posted it as an issue for the theme team to review the next time they are working on Confit, and someone will post back here with an update as soon as there is more information on the issue.
My css fix involved fixing the background and link hover colors to what I wanted for the LaTeX, and then manually adding in CSS to override the generated styles for the background colors of the remaining regions.
It’s not pretty, but it works.
I was referring to custom CSS entered in the Appearance → Themes → Customize → CSS panel. Is that where you fixed it? Or were you referring to the bg parameter in the URL example you posted before? http://s0.wp.com/latex.php?latex=n&bg=EEEEEE&fg=680148&s=0
That is where I fixed it, but the url parameter thing should be considered a bug in how the theme constructs latex images from the theme colors. I can detail how I fixed it, but it’s not the cleanest solution and I doubt it is stable across browsers.
Agreed. I think an update should be in LaTeX and not made via CSS. I made a note in the issue report, and now we’ll need to wait for a reply back from them. Someone should reply here as soon as we have more info.
Thanks! Even with the bugs (there is another bug about how LaTeX images are switched to display: block on the mobile theme), WordPress is by far the best free option for math bloggers.
WordPress is by far the best free option for math bloggers.
I love that!
Even with the bugs (there is another bug about how LaTeX images are switched to display: block on the mobile theme)
Sounds like that should be reported separately. I went ahead and tested some equations using LaTeX on the mobile theme and was able to reproduce the problem. I used Safari’s Develop > User Agent > iPhone option to take a screenshot of your post http://jeremykun.com/2013/07/05/reservoir-sampling/ to use as an example. For reference, here are the steps I reported:
Steps to reproduce:
- Open any WordPress.com blog
- Go to Posts > Add New and add some math equations using LaTeX inline inside a paragraph, see http://en.support.wordpress.com/latex/
- Publish the post
- Go to Appearance > Mobile and make sure the “Enable mobile theme” is set to “Yes”
- Expected: math equations to display inline in the mobile theme like they do in the blog itself
- Actual: math equations in the mobile theme are block elements instead of inline & the spacing is off
Someone should reply back here about that issue too, once it has been reviewed.
I had started an additional thread for that topic, but with no response. See https://en.forums.wordpress.com/topic/mobile-themes-break-lines-for-every-latex-image?replies=4#post-1346388
Gotcha. Left a comment there as well.
The block level LaTeX elements issue in the mobile theme has been fixed. Yay!
The topic ‘LaTeX images changed to an odd color’ is closed to new replies.