Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9188967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:08:21+00:00 2026-06-17T20:08:21+00:00

I have many different MathJax formulas that are going to be dynamically moved around

  • 0

I have many different MathJax formulas that are going to be dynamically moved around different lists on the webpage. I am trying to control this with JQuery and the append attribute.

In my script file I have various arrays of formulas and then a function that lists the formulas in the array inside of a specified div using .append. Here’s the code:

function listArray(array,div){
  for(var i=0; i<array.length; i++){
    $('#'+div).append('<li>'+array[i]); 
  }
};

I am having the problem that MathJax typesets the math before this script runs and so the appended formulas don’t display in TeX. Here is an example Fiddle:

http://jsfiddle.net/T8m64/92/

Does anyone know of a good fix for this? I have tried reading some of the documentation on re-typesetting MathJax, but I don’t really follow it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T20:08:22+00:00Added an answer on June 17, 2026 at 8:08 pm

    There are two problems with your fiddle example. First, the array of math expressions loses the backslashes, because these are used as escape characters in the javascript strings. You need to double them:

    var jax = ['\\(\\mathbb{Q}\\)','\\(\\mathbb{Z}\\)'];
    

    Second, you need to tell MathJax to process the mathematics once you have added it to the page. Use

    MathJax.Hub.Queue(["Typeset",MathJax.Hub,div]);
    

    after appending the math in order to do that.

    Version 120 of you fiddle shows a working version.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have many different small classes which have a few fields each, e.g. this:
In my application I have many different JSP forms with multiple stages, that is
I have looked at many different peoples answers to this problem but they only
I want to submit a form that have many checkboxes with different values, using
i have hundreds of [mostly different] files in many different directories that all have
I have many layers in the Documents that will be displayed on different user
We have a content delivery system that delivers many different content types to devices.
I have many different csv files that I would like to convert in to
I have articles on my site that have many different tags. At the moment
I'm building a search page that will have many different search parameters that the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.