Hi guys,I thought it would be really cool to have a feature where a variable is highlighted whenever a user hovers over it. For example if MathJax renders "y=x+2" then when I hover over x with my cursor, a dialogue pops up explaining what x is. Is this possible? I'm thinking there may be a solution where I put each variable (x and y) in a separate div and render them separately with MathJax but rendering variables separately messes up the spacing. Would be great to hear back if anyone has ideas!
--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
For simple things, maction's tooltips should be sufficient
adding the necessary attributes and hooking into those should work
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
Hello.
Can you share your code that is very useful ?-- Christophe BAL Enseignant Agrégé de Mathématiques Programmeur Python Amateur
<equation-ui-idea1.PNG><equation-ui-idea2.PNG>
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<equation-ui-idea1.PNG><equation-ui-idea2.PNG>
--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-users+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<equation-ui-idea1.PNG><equation-ui-idea2.PNG>
--
You received this message because you are subscribed to a topic in the Google Groups "MathJax Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mathjax-users/qg-qn1qzI04/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mathjax-users+unsubscribe@googlegroups.com.
<equation-ui-idea1.PNG><equation-ui-idea2.PNG>
--
You received this message because you are subscribed to a topic in the Google Groups "MathJax Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mathjax-users/qg-qn1qzI04/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mathjax-user...@googlegroups.com.
--
--
--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-users+unsubscribe@googlegroups.com.
<!DOCTYPE html><html><head><title>MathJax hover handler</title><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_CHTML"></script></head><body>This is math inline \(\class{hover}{x}+\class{hover}{y}=1\) and displayed\[\class{hover}{x}+\class{hover}{y}\over\class{hover}{1-z^2}\]<script>(function () {var uncolor;function UNCOLOR() {if (uncolor) {uncolor();uncolor = null;}}document.body.onmouseover = function (event) {var target = (event || window.event).target;while (target && target.isMathJax) {if (target.classList.contains('hover')) {UNCOLOR();if (target.style) {target.style.color = target.style.fill = "red";uncolor = function () {target.style.color = target.style.fill = ''};} else {target.setAttribute('mathcolor','red');uncolor = function () {target.removeAttribute('mathcolor')};}return;}target = target.parentNode;}UNCOLOR();};document.body.onmouseout = UNCOLOR;})()</script></body></html>
<html><head><title>MathJax hover handler</title><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_CHTML"></script>
<style>.colored.red {color: red}.colored.blue {color: blue}.colored.purple {color:purple}</style></head><body>This is math inline \(\class{hover red}{x}+\class{hover blue}{y}=1\) and displayed\[\class{hover red}{x}+\class{hover blue}{y}\over\class{hover purple}{1-z^2}\]
<script>(function () {var uncolor;function UNCOLOR() {if (uncolor) {uncolor();uncolor = null;}}document.body.onmouseover = function (event) {var target = (event || window.event).target;while (target && target.isMathJax) {if (target.classList.contains('hover')) {UNCOLOR();
target.className += " colored";uncolor = function () {target.className = target.className.replace(/ colored/,'')};
return;}target = target.parentNode;}UNCOLOR();};document.body.onmouseout = UNCOLOR;})()</script></body></html>
On Apr 3, 2018, at 12:35 PM, Thiago Brevidelli <thiago.brevi...@gmail.com> wrote:Davide, is there a way to not only detect the mouseover event, but also know over which element is the mouse? For example, an implementation of your script (the UNCOLOR one) which colors each hover element a different color? Coloring then like this:
This is math inline \(\class{hover}{x}+\class{hover}{y}=1\) and displayed\[\class{hover}{x}+\class{hover}{y}\over\class{hover}{1-z^2}\]
Thanks for the attention!