Mathjax appearance when using remote Mathjax and Elxyer export from LyX to HTML

122 views
Skip to first unread message

Manuel Luque Gallego

unread,
Nov 17, 2012, 9:01:25 AM11/17/12
to mathja...@googlegroups.com
Hi,

I'm  exporting a document from LyX to HTML using the converter Elyxer and setting the HTML pages to use remote Mathjax with the next option of the head section:

<script type="text/javascript"
  src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

The web page is exported correctly and the equations are displayed with Mathjax. However, unfortunately, I find that the font color used by Mathjax is gray, what makes the math text not very readable.
I'd like to use black fonts (as the rest of the web page) to make the web page more readable.

I've contacted to the developer of Elyxer and he mentioned that he could maybe find clues in this group.

I'd appreciate any possible help. Thank you very much in advance.
Manuel.




Davide P. Cervone

unread,
Nov 19, 2012, 9:57:10 AM11/19/12
to mathja...@googlegroups.com
This may be due to CSS in your document.  Can you temporarily disable (e.g., comment out) the loading of CSS files and see if that changes the results?

Can you point us to a URL that exhibits the problem?  I can take a look and see what it up.

Davide

kslowi...@gmail.com

unread,
Mar 28, 2014, 2:51:09 PM3/28/14
to mathja...@googlegroups.com
Hi Manuel,

Sorry for the 2 year delay in reply. Perhaps my reply will help someone else. I had the same problem with gray fonts instead of black fonts.

I solved this problem as follows:

Copy the LyX CSS file to your home directory:

cp $(locate lyx.css) ~/lyx.css

Add a CSS rule to your new lyx.css file:

.Mathjax { color: black; }

Read the source code for elyxer here: http://nongnu.askapache.com//elyxer/elyxer-lyx-C.py
Notice that there exist options "--css" and "--embedcss".

Open LyX > Tools > Preferences > File Handling > Converters > "LyX -> HTML"

Change the "Converter:" line.

Before:

elyxer.py --mathjax remote --directory $$r $$i $$o

After: (I had no success with "~" or "$HOME", so I specify the actual path.)

elyxer.py --embedcss /home/kamil/lyx.css --mathjax remote --directory $$r $$i $$o
Reply all
Reply to author
Forward
0 new messages