[Xerte] Re: Math Symbols
Julian Tenney
Julian.Tenney at nottingham.ac.uk
Mon Jan 24 09:59:32 GMT 2011
After a bit of pre-processing the url that is called is:
latex[1] = 'http://www.forkosh.dreamhost.com/mathtex.cgi?\\png ' + escape(latex[1]) + '#.png';
where latex[1] is the src string, so this returns an image:
http://www.forkosh.dreamhost.com/mathtex.cgi?\png%20e=mc^2#.png
A simple fraction
http://www.forkosh.dreamhost.com/mathtex.cgi?\png%20\frac{1}{3}#.png
the #.png is for flash, otherwise it doesn't know an image is coming back, and won't try and display one, so directly in the browser you can do this:
http://www.forkosh.dreamhost.com/mathtex.cgi?\png%20\frac{1}{3}
It does appear that your '\' is being lost, i.e. not escaped on the way through somewhere.
-----Original Message-----
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Adam Read
Sent: 24 January 2011 08:40
To: Xerte discussion list
Subject: [Xerte] Re: Math Symbols
Cheers Pat.
I'll wait and see if Julian can send a latex URL. For the meantime, let's blame Windows...
---------------------------------------------------
Adam Read
eLearning Technologist
Learning and Quality Unit
University College Plymouth St Mark & St John
Tel: 01752 636700 Ext: 5673 | Room: 114
Please consider the environment before printing this e-mail
-----Original Message-----
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Patrick Lockley
Sent: 21 January 2011 19:20
To: Xerte discussion list
Subject: [Xerte] Re: Math Symbols
Hello,
Xot has always generated one red error when it loads a project. Never sure why.
As for the problem, and by looking at the latex construction it would seem that the \ character isn't being sent properly.
Adam, your server is windows, so it may send it in a different way. Julian could you send Adam a URL with the latex as a string so he can access it directly and see what happens.
Failing that, click on the latex URL in fiddler and some new panels appear on the right hand side. One of those will show exactly what data has been sent.
If these fail, on the rising of the sun on Tuesday morning, look west and I shall appear ________________________________________
From: xerte-bounces at lists.nottingham.ac.uk [xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney [Julian.Tenney at nottingham.ac.uk]
Sent: Friday, January 21, 2011 3:34 PM
To: Xerte discussion list
Subject: [Xerte] Re: Math Symbols
I saw the undefined in there and didn’t like the look of it. Pat knows more about it. It shows you all the requests your machine is making: one of them / some of them will be for the latex images, I wanted to see what they were,
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Adam Read
Sent: 21 January 2011 15:33
To: Xerte discussion list
Subject: [Xerte] Re: Math Symbols
Don’t really get fiddler. Here’s what im getting from my machine
#
Result
Protocol
Host
URL
Body
Caching
Content-Type
Process
Comments
Custom
21
404
HTTP
elearning.net.marjon.ac.uk
/favicon.ico
1,635
text/html
chrome:5796
22
200
HTTP
elearning.net.marjon.ac.uk
/rlo/play.php?template_id=201
1,079
text/html
chrome:5796
23
404
HTTP
elearning.net.marjon.ac.uk
/favicon.ico
1,635
text/html
chrome:5796
24
200
HTTP
elearning.net.marjon.ac.uk
/rlo/USER-FILES/201-aread-Nottingham/data.xml?time=1295623900
363
text/xml
chrome:5796
25
404
HTTP
elearning.net.marjon.ac.uk
/rlo/undefined?t=1295623900687
1,635
text/html
chrome:5796
Adam
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 21 January 2011 15:00
To: Xerte discussion list
Subject: [Xerte] Re: Math Symbols
I want to see what URL is being requested for the latex stuff:
I get this when I try and debug in fiddler – problem?
[cid:image001.png at 01CBB980.AC292080]
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Adam Read
Sent: 21 January 2011 14:44
To: Xerte discussion list
Subject: [Xerte] Re: Math Symbols
It does seem strange
Here my LO running the code below: http://elearning.net.marjon.ac.uk/rlo/play.php?template_id=201
Can anyone else get proper symbols appearing in an LO using John’s code:
<tex src="ax^2 + bx + c"></tex>
<br><br>are given by the formula
<br><tex src="\frac{-b \pm \sqrt{b^2 - 4ac}}{2a} "></tex> <br><br><br>where <br><tex src="a \neq 0"></tex>
Should display like:
[cid:image002.jpg at 01CBB980.AC292080]
Not like this:
[cid:image003.png at 01CBB980.AC292080]
Adam
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 21 January 2011 14:36
To: Xerte discussion list
Subject: [Xerte] Re: Math Symbols
Bit lost then, because those are images returned from a server somewhere. Not sure why the requests from your machine / network for the same thing to the same place return different results…
Post the link to your object so we can run it?
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Adam Read
Sent: 21 January 2011 14:35
To: Xerte discussion list
Subject: [Xerte] Re: Math Symbols
Yep – updated it earlier to fix the gapfill problem.
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 21 January 2011 14:19
To: Xerte discussion list
Subject: [Xerte] Re: Math Symbols
What XMLEngine.swf have you got?
Is it this one?
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Adam Read
Sent: 21 January 2011 14:17
To: Xerte discussion list
Subject: [Xerte] Re: Math Symbols
Hi John
Thanks very much for providing the examples. However, mine still doesn’t seem to want to render special characters.
First example:
[cid:image004.png at 01CBB980.AC292080]
Returns this in Xerte:
[cid:image005.png at 01CBB980.AC292080]
Any ideas?
Adam
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of John Horton
Sent: 21 January 2011 14:06
To: Xerte discussion list
Subject: [Xerte] Re: Math Symbols
Here are some examples:
<tex src="ax^2 + bx + c"></tex>
<br><br>are given by the formula
<br><tex src="\frac{-b \pm \sqrt{b^2 - 4ac}}{2a} "></tex> <br><br><br>where <br><tex src="a \neq 0"></tex>
[cid:image006.png at 01CBB980.AC292080]
<tex src="e^{-i\pi} \;+ \;1 \;=\; 0"></tex>
[cid:image007.png at 01CBB980.AC292080]
<tex src="E = mc^2"></tex>
<br><br>where
<br><tex src="m = \frac{m_0}{\sqrt{1-\frac{v^2}{c^2}}}"></tex>
[cid:image008.png at 01CBB980.AC292080]
<tex src="\frac{1}{c^2}\; \frac{\partial \psi^2}{\partial t^2} \;=\; \nabla^2\psi"></tex>
[cid:image009.png at 01CBB980.AC292080]
This is the general equation where H is the Hamiltonian:
<br><tex src="i\hbar {\partial\Psi(\mathbf{r} ,\,t) \over \partial t} = \hat H \Psi(\mathbf{r},\,t)"></tex>
<br><br>For a single particle in three dimensions it can reduced to:
<tex src="i\hbar\frac{\partial}{\partial t} \Psi(\mathbf{r},\,t) = -\frac{\hbar^2}{2m}\nabla^2\Psi(\mathbf{r},\,t) + V(\mathbf{r})\Psi(\mathbf{r},\,t)"></tex>
[cid:image010.png at 01CBB980.AC292080]
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Fay Cross
Sent: 21 January 2011 13:55
To: Xerte discussion list
Subject: [Xerte] Re: Math Symbols
It’s the $ in your example that seems to be causing the problems I think. This works without them in:
<tex src="\sqrt{2}">
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Adam Read
Sent: 21 January 2011 13:07
To: Xerte discussion list
Subject: [Xerte] Re: Math Symbols
Cheers Julian
A.
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 21 January 2011 13:03
To: Xerte discussion list
Subject: [Xerte] Re: Math Symbols
It’s not my project. I did look at the raw xml, but it has a load of escaped characters in there which make it more difficult to copy / paste into a mail. I have sent your message to the owner of the project.
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Adam Read
Sent: 21 January 2011 12:16
To: Xerte discussion list
Subject: [Xerte] Re: Math Symbols
No chance of seeing the text as it appears in that Xerte LO?!
That document doesn’t really help at the moment as I can’t replicate the examples in Xerte until im sure what to include and what not to!
For example, the document tells you to write:
\documentclass{article}
\begin{document}
The square root of two: $\sqrt{2}$. I can type math!
\end{document}
To output:
[cid:image011.png at 01CBB980.AC292080]
But in Xerte
<tex src="\documentclass{article}
\begin{document}
The square root of two: $\sqrt{2}$. I can type math!
\end{document}
">
Renders:
[cid:image012.png at 01CBB980.AC292080]
And
<tex src="The square root of two: $\sqrt{2}$. I can type math!"> renders:
[cid:image013.png at 01CBB980.AC292080]
<tex src="$\sqrt{2}$"> just renders:
[cid:image014.png at 01CBB980.AC292080]
Any ideas? I could probably work out what I’m missing from that example Nottingham LATEX LO!
---------------------------------------------------
Adam Read
eLearning Technologist
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 21 January 2011 11:55
To: Xerte discussion list
Subject: [Xerte] Re: Math Symbols
http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/
I don’t think there is anything ‘funny’ about the latex service we use. It is a third party service though, but we are working to implementing it ourselves,
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Adam Read
Sent: 21 January 2011 11:45
To: Xerte discussion list
Subject: [Xerte] Re: Math Symbols
Any chance of seeing the LATEX code to generate these equations:
http://www.nottingham.ac.uk/toolkits/play_595
My LO doesn’t seem to want to do fancy graphic ones (e.g. special chars) – do you need to tell latex to load a set of chars? I can get it to render things like e=mc2 but not much else:
[cid:image015.png at 01CBB980.AC292080]
Bl***y maths…
I’ve tried doing
<tex src="\usepackage{amsmath}”> to no avail.
---------------------------------------------------
Adam Read
eLearning Technologist
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 21 January 2011 11:00
To: Xerte discussion list
Subject: [Xerte] Re: Math Symbols
Use latex in text fields
<tex src=”e=mc^2”>
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Adam Read
Sent: 21 January 2011 11:00
To: Xerte discussion list (xerte at lists.nottingham.ac.uk)
Subject: [Xerte] Math Symbols
Hi all
Is anyone using Math / Scientific symbols in Xerte? I’ve had a request for help from a Maths lecturer who needs to use symbols.
I’ve had a go using <sub> and <sup> which works in XOT with “allow subscripts” ticked, and also came across an earlier list post pointing out HTML chars which seem to work, but I also came across some reference to Latex.
Does latex work in XOT? Last I read it seemed some service you chaps used had crashed?
If there is an easier way than using HTML syntax then let me know. I guess another alternative would be to use some other software and save them as images.
Cheers, Adam
---------------------------------------------------
Adam Read
eLearning Technologist
University College Plymouth St Mark & St John, Derriford Road, Plymouth, PL6 8BH
Phone: 01752 636700 Web: www.ucpmarjon.ac.uk<http://www.ucpmarjon.ac.uk>
Principal: Professor Margaret Noble A Church of England College Founded in 1840
University College Plymouth St Mark & St John is a registered charity the trustee
of which is a company limited by guarantee registered in England No. 986239
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
University College Plymouth St Mark & St John, Derriford Road, Plymouth, PL6 8BH
Phone: 01752 636700 Web: www.ucpmarjon.ac.uk<http://www.ucpmarjon.ac.uk>
Principal: Professor Margaret Noble A Church of England College Founded in 1840
University College Plymouth St Mark & St John is a registered charity the trustee
of which is a company limited by guarantee registered in England No. 986239
University College Plymouth St Mark & St John, Derriford Road, Plymouth, PL6 8BH
Phone: 01752 636700 Web: www.ucpmarjon.ac.uk<http://www.ucpmarjon.ac.uk>
Principal: Professor Margaret Noble A Church of England College Founded in 1840
University College Plymouth St Mark & St John is a registered charity the trustee
of which is a company limited by guarantee registered in England No. 986239
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
University College Plymouth St Mark & St John, Derriford Road, Plymouth, PL6 8BH
Phone: 01752 636700 Web: www.ucpmarjon.ac.uk<http://www.ucpmarjon.ac.uk>
Principal: Professor Margaret Noble A Church of England College Founded in 1840
University College Plymouth St Mark & St John is a registered charity the trustee
of which is a company limited by guarantee registered in England No. 986239
University College Plymouth St Mark & St John, Derriford Road, Plymouth, PL6 8BH
Phone: 01752 636700 Web: www.ucpmarjon.ac.uk<http://www.ucpmarjon.ac.uk>
Principal: Professor Margaret Noble A Church of England College Founded in 1840
University College Plymouth St Mark & St John is a registered charity the trustee
of which is a company limited by guarantee registered in England No. 986239
University College Plymouth St Mark & St John, Derriford Road, Plymouth, PL6 8BH
Phone: 01752 636700 Web: www.ucpmarjon.ac.uk<http://www.ucpmarjon.ac.uk>
Principal: Professor Margaret Noble A Church of England College Founded in 1840
University College Plymouth St Mark & St John is a registered charity the trustee
of which is a company limited by guarantee registered in England No. 986239
University College Plymouth St Mark & St John, Derriford Road, Plymouth, PL6 8BH
Phone: 01752 636700 Web: www.ucpmarjon.ac.uk<http://www.ucpmarjon.ac.uk>
Principal: Professor Margaret Noble A Church of England College Founded in 1840
University College Plymouth St Mark & St John is a registered charity the trustee
of which is a company limited by guarantee registered in England No. 986239
University College Plymouth St Mark & St John, Derriford Road, Plymouth, PL6 8BH
Phone: 01752 636700 Web: www.ucpmarjon.ac.uk
Principal: Professor Margaret Noble A Church of England College Founded in 1840
University College Plymouth St Mark & St John is a registered charity the trustee
of which is a company limited by guarantee registered in England No. 986239
_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte
University College Plymouth St Mark & St John, Derriford Road, Plymouth, PL6 8BH
Phone: 01752 636700 Web: www.ucpmarjon.ac.uk
Principal: Professor Margaret Noble A Church of England College Founded in 1840
University College Plymouth St Mark & St John is a registered charity the trustee
of which is a company limited by guarantee registered in England No. 986239
_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte
More information about the Xerte
mailing list