How to underline the mathml code in hyper link tags

501 views
Skip to first unread message

Saadi

unread,
Jul 16, 2012, 6:06:45 AM7/16/12
to mathja...@googlegroups.com
How underline mathml code in hyper link tags

I have tried it using css using following code but failed
 a:hover, a:active {
           color: red;
           text-decoration: underline ! important;
        }.

Davide P. Cervone

unread,
Jul 16, 2012, 12:19:14 PM7/16/12
to mathja...@googlegroups.com
If you are using MathJax's HTML-CSS output, then try

.MathJax a:hover, .MathJax a:active {
color: red;
text-decoration: underline ! important;
}

instead. I think that should work for you.

Davide

Saadi

unread,
Jul 18, 2012, 4:06:52 AM7/18/12
to mathja...@googlegroups.com
I have added ur code in the CSS but still underline does not appear. 

I am using this link for executing mathml code
 <script type="text/javascript" src="http://localhost/Test/MathJax.js?config=MML_HTMLorMML-full"></script>

Below is the sample mathml in hyperlink tags

<a href="" target="_blank">
  <?xml version="1.0" encoding="UTF-8"?>

 <semantics>
  <mrow>
   <mi mathvariant="italic">Q6..</mi>
   <msqrt>
    <msup>
     <mn>64x</mn>
     <mn>4</mn>
    </msup>
   </msqrt>
  </mrow>
  <annotation encoding="StarMath 5.0">Q6.. sqrt 64x^4
</annotation>
 </semantics>
</math>  </a>

Davide P. Cervone

unread,
Jul 18, 2012, 9:43:11 AM7/18/12
to mathja...@googlegroups.com
OK, I thought you were using href's within the math itself, while you are putting the link outside the math.  In that case, use

a:hover .MathJax *, a:active .MathJax * {
  color: red;
  text-decoration: underline ! important;

I think that will do it for you (for HTML-CSS output).

Davide

Saadi

unread,
Jul 20, 2012, 3:50:57 AM7/20/12
to mathja...@googlegroups.com
Thankx Davide for ur help. The issue is resolved but i want to ask a question where   .MathJax class is defined? I mean i have search the css files in MathJax but i am unable to find  .MathJax css class? Can u explain how css is applied and it's  working?

Regards
-Saad

Davide P. Cervone

unread,
Jul 20, 2012, 9:25:14 AM7/20/12
to mathja...@googlegroups.com
MathJax creates its own stylesheets dynamically when it runs.  The data for the styles are configurable, and you can find the defaults in the various output jax code.  For example, the styles for ".MathJax" are defined in the MathJax/unpacked/jax/output/HTML-CSS/jax.js file starting at line 196.

Davide

Peter Krautzberger

unread,
Jul 20, 2012, 11:35:34 AM7/20/12
to mathja...@googlegroups.com
Just to add to Davide: docs describe this partially here http://www.mathjax.org/docs/2.0/CSS-styles.html

Peter.
Reply all
Reply to author
Forward
0 new messages