Problem to interpret latex block separated by html tags with jaxedit

12 views
Skip to first unread message

Emmanuel Vieillard-Baron

unread,
May 10, 2018, 9:48:38 AM5/10/18
to JaxEdit Users
Thanks for this application. It is the good addition to mathjax. 
Is it possible to use it into a web page splited up into  different blocks of latex separated  by html tag?

My web page looks like:

<body>
Latex
html tags
Latex
html tags
Latex
html tags
 ....
</body>


I have tried two things:

The first one:
------------------------------------------------------------

<textarea id="source" style="display:none;">

Latex

html tags

Latex

html tags

</textarea>


<div id="result"></div>

<script type="text/javascript">

var latex =document.getElementById("source").value;

var result =document.getElementById("result");

typejax.updater.init(latex, latex.length, result);

</script>

-------------------------------------------------------------

but in this case html tags are not well interpreted.


The second one:

------------------------------------------------------------

<textarea id="source1" style="display:none;">

Latex

/textarea>

<div id="result1"></div>

html tags

<textarea id="source2" style="display:none;">

Latex

</textarea>

<div id="result2"></div>

html tags

<textarea id="source3" style="display:none;">

Latex

</textarea>

<div id="result3"></div>

html tags


<script type="text/javascript">

var latex =document.getElementById("source1").value;

var result =document.getElementById("result1");

typejax.updater.init(latex, latex.length, result);

var latex =document.getElementById("source2").value;

var result =document.getElementById("result2");

typejax.updater.init(latex, latex.length, result);

var latex =document.getElementById("source3").value;

var result =document.getElementById("result3");

typejax.updater.init(latex, latex.length, result);

</script>

-------------------------------------------------------------


In this case, the first latex block is well interpreted but it is not the case of the followings ones when their number is equal or more than two. I have put an example in the attached file.


Thanks in advance for your help.

Manu.


test.htm
Reply all
Reply to author
Forward
0 new messages