# Community

cancel
Showing results for
Did you mean:
Community Champion

## Is there an easier way to change the title of an equation other than to write the equation, go to HTML editor and change the title?

I'm not sure how many of you  have noticed, but if you write an equation in the equation editor, and save, when you scroll over the equation, you get a lightbox.  This lightbox has the LATex code for the equation.  I know how to change the title in HTML editing, but I've now written over 200 equations in 1 class, and forgot about changing the lightboxes until just now.  Is there an easy way, or do I have to go through all 200 equations and change the titles?

Tags (3)
4 Replies
Community Champion

If I am understanding correctly, this has little to do with mathematics and more to do with HTML editing. I'm not completely sure because I'm unfamiliar with the term "lightbox." I think you are talking about the tooltip that pops up when people hover over the equation as shown in this figure.

It is controlled by the contents of the title attribute of the img element. Here's what the equation above looks like when you edit it. Canvas has inserted the MathML code and some other things. (I also removed the hostname from the src attribute and manually broke the lines for spacing purposes).

<p><img   class="equation_image"   title="x=\dfrac{-b\pm\sqrt{b^2-4ac}}{2a}"  src="/equation_images/x%253D%255Cdfrac%257B-b%255Cpm%255Csqrt%257Bb%255E2-4ac%257D%257D%257B2a%257D"   alt="LaTeX: x=\dfrac{-b\pm\sqrt{b^2-4ac}}{2a}"   data-equation-content="x=\dfrac{-b\pm\sqrt{b^2-4ac}}{2a}"   data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;  &lt;mi&gt;x&lt;/mi&gt;  &lt;mo&gt;=&lt;/mo&gt;  &lt;mstyle displaystyle=&quot;true&quot; scriptlevel=&quot;0&quot;&gt;    &lt;mfrac&gt;      &lt;mrow&gt;        &lt;mo&gt;&amp;#x2212;&lt;!-- &minus; --&gt;&lt;/mo&gt;        &lt;mi&gt;b&lt;/mi&gt;        &lt;mo&gt;&amp;#x00B1;&lt;!-- &plusmn; --&gt;&lt;/mo&gt;        &lt;msqrt&gt;          &lt;msup&gt;            &lt;mi&gt;b&lt;/mi&gt;            &lt;mn&gt;2&lt;/mn&gt;          &lt;/msup&gt;          &lt;mo&gt;&amp;#x2212;&lt;!-- &minus; --&gt;&lt;/mo&gt;          &lt;mn&gt;4&lt;/mn&gt;          &lt;mi&gt;a&lt;/mi&gt;          &lt;mi&gt;c&lt;/mi&gt;        &lt;/msqrt&gt;      &lt;/mrow&gt;      &lt;mrow&gt;        &lt;mn&gt;2&lt;/mn&gt;        &lt;mi&gt;a&lt;/mi&gt;      &lt;/mrow&gt;    &lt;/mfrac&gt;  &lt;/mstyle&gt;&lt;/math&gt;" /></p>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

You will need to edit every place that the equations occur by going into the HTML and modifying it directly. You can edit all of the title attributes on that page at one time, though.

I'm not sure why you need to do this. Perhaps to improve the tip to say "Quadratic Formula" instead of providing the formula? But there isn't going to be any easy way to automate that. Perhaps if you had some other data source set up with names somewhere else you could write a computer program that would download a page, edit it, and write it back (I've done this using the Canvas API), but in most cases, I wouldn't have a clue what the title should be without looking at the equation.

Community Champion

You understood my question correctly.  The lightbox is what Canvas calls the tooltip.  If you notice what comes up when you typed in the Quadratic equation, you'll get the LaTex code.  Since we are utilizing lightboxes (tooltips) in our classes, we didn't want this code to come up and confuse students.  I did change some of the titles, as you suggested.  I was just hoping for an easier way, than going back through 200+ codes in the questions, but I guess I'll do that.  Thanks for your help.

Community Champion

One benefit of letting people see the LaTeX is that then they get to use it when they turn in stuff. I had my college algebra class turn in their homework using essay questions and the equation editor last summer. I don't have evidence one way or the other, but I hope that them mousing over what I typed allowed them to see how it was done.

If you are trying to remove all of the titles completely and you have a text editor that supports regular expressions, you could do a search/replace for a title=".*?" and replace it with nothing. I've done that by copying the HTML from Canvas into an editor, cleaning it up, then copying it back. I'm not sure if it still does or not, but at one time Dreamweaver had the ability to search and replace for attributes within certain elements.

Community Coach

Hello  @9927744 ...