Toutes mes réponses sur les forums
-
AuteurMessages
-
jm.evers
Participant::A small note on mathjax (again…)
I’ve installed mathjax on Leiden wims-mirror and on intranet school servers.
All browsers -except firefox- will now use MathJax for typesetting.
This line of javascript will exclude firefox:<script type="text/javascript"> if (navigator.userAgent.indexOf("Firefox") == -1){ var script = document.createElement("script"); script.type = "text/javascript"; script.src = "mathjax/MathJax.js?config=MML_HTMLorMML-full.js"; document.body.appendChild(script); } </script>
So now -in theory- all browsers could have nice looking mathtypesetting
(the price to pay is ofcourse a faily slow rendering of math)jm.evers
Participant::Well here are some local data from a highschool in the Netherlands:
Approx 50% of our pupils use Chrome at home as default browser (on windows)
The rest is mainly Firefox (>=19) and MSIE (mostly version 9 and 10)Because of MathML in WIMS our school switched from default browser Chrome to Firefox.Our ‘systems administration’ preferred Chrome because it’s light weight and very fast on older pc-systems.
In using MathJax our pupils (and sysadmin) can use their favorite browser and use mathml…and canvas…and svg…and html-inputfields in MathML 🙂
jokejm.evers
Participant::As for canvas and mathml&input
see:
http://wims.math.leidenuniv.nl/canvas/drag_clickfill_mathml.html
jokejm.evers
Participant::Mathjax seems to allow inputfields in mathml as well.
Using a slightly different pseudo latex syntax,
\FormInput[class][value]{name}
see:https://github.com/leathrum/mathjax-ext-contrib/tree/master/forminput
this include is needed for support:http://cs.jsu.edu/mathjax-ext/contrib/forminput/forminput.jsMaybe we should adapt wims_mathml to allow same syntax?
Since google’s browser chromium is -at this point- not supporting native MathML…but advising javascript Mathjax as ‘add on’ for math displa (grrrr)
jokejm.evers
Participant::Hi,
Latex will not -never- support this, however in some cases MathML
(using firefox) can use inputfields anywhere ! in a latex constuct…
An inputfield in MathML using pseudo latex:
\input{size}{id}{style}{value}{readonly}
The value can be read by using something like:
var reply=document.getElementById(‘mathml’+id);
But make sure users use only Mathml & Firefox !!!
kind regards,
jokejm.evers
Participantjm.evers
Participant::There are several options,
I choose ‘scienceprint’
\text{A=wims(exec scienceprint 1234.56789999,3,0)}
\text{B=wims(exec scienceprint 1234.56789999,3,1)}
\text{C=wims(exec scienceprint 1234.56789999,3,2)}
\text{D=wims(exec scienceprint 1234.56789999,3,3)}
\text{E=wims(exec scienceprint 1234.56789999,3,4)}
A=1.23*10^3
B=1.23×10<sup>3</sup>
C=1.23 \times 10^{3}
D=1.23 k
E=<math xmlns= »http://www.w3.org/1998/Math/MathML » display= »inline »><mstyle id= »wims_mathml » mathsize= »110% »><mn>1.23</mn><mo>×</mo><msup><mn>10</mn><mn>3</mn></msup></mstyle></math>kind regards,
joke######from scienceprinc.c #########
WIMS usage:
sci_num = !exec scienceprint number,significance,type
number: a number
significance : desired precision
type (optional args): calc = 0 / html = 1 / latex = 2 / prefix = 3 / mathml = 4default : calc notation : 120000,3 -> 1.20*10^5
type = 0 : calc notation : 120000,3,0 -> 1.20*10^5
type = 1 : html notation : 120000,3,1 -> 1.20×10<sup>5</sup>
type = 2 : latex notation : 120000,3,2 -> 1.20 \times 10^{5}
type = 3 : prefix-notation : 120000,3,3 -> 120.0 k
type = 3 : if -24 > prefix > 24 -> type = 1 (html)
type = 4 : mathml notationmultiple conversion: use space between arguments
scienceprint 120000,4 122900,5 120036,6,3 –> 120.0*10^3,122.90*10^3,120.036 k24 yotta Y
21 zetta Z
18 exa E
15 peta P
12 tera T
9 giga G
6 mega M
3 kilo k2 hecto h
1 deca da
-1 deci d
-2 centi c-3 milli m
-6 micro µ
-9 nano n
-12 pico p
-15 femto f
-18 atto a
-21 zepto z
-24 yocto yjm.evers
Participantjm.evers
Participantjm.evers
Participant::Well, if you are not afraid…and your pupils are no real hackers…and you use an intranet server with no connections outside your local network…and have all compilers installed in a chroot…and you slightly modify wims.cgi…you can -of course- use wims to teach some basic programming !
Just don’t make this server accessible from the internet 🙂
Jokejm.evers
Participant::Hi,
For this to work securely -on a public wims server- you must install the ‘sysmask protection’ system of X.Gang
Otherwise your server would be extremely vulnerable and open for easy hacking.
However: this system & Linux kernel patch will not work on recent linux distributions (kernel patch dated 2005?)
In any case read :http://wims.unice.fr/sysmask/doc/kind regards,
Jokejm.evers
Participant::So it is dependant on the browser, the system or the version. Not on the way to use the table (as css or normally). It is exactly what I wanted to emphasize !
Absolutely not !!!
Using the MathML + input field » together in- one table-cell
- one paragraph
- one div
is your problem.
(assuming you don’t want to work with ‘absolute width/height’)
The only sensible way to force « Mathml + inputfield » in an (optical) horizontal alignment is to use two table-cells in a single row.
<tr><td>MATHML</td><td>INPUTFIELD</td></tr>
Just try it
kind regards,
J.M. Evers
about css ,inputfields and tablesjm.evers
Participantjm.evers
Participant::This works just fine on my system using « Mozilla Firefox 20.0 » and « Opera 12.12 Build 1707 » and « Mozilla SeaMonkey 2.6.1″
\statement{
<table style= »background-color:black; color:white;
padding:2px 2px 2px 2px » >
<tr>
<th>
\(\frac{1}{2} \cdot x )
</th>
<th>
=
\embed{r1}
</th>
</tr>
</table>
}
\answer{}{1}{type=numeric}jm.evers
Participantjm.evers
Participantjm.evers
Participant::Hi,
The wims servers I use :- 2 intranet servers on school
Operating system: OpenSuSE (32bit) LINUX 11.2 using chroot -
2 internet servers
-
Leiden mirror http://wims.math.leidenuniv.nl
Operating system: Gentoo Linux (64 bit)using chroot -
Personal emergency wims server
Operating system: FreeBSD 8.2 (64 bit) using chroot
-
Leiden mirror http://wims.math.leidenuniv.nl
-
Personal computer wims server:
(used for wims testing and devel. on intranet)- Laptop 1 FreeBSD 9.1 (64 bit) using chroot
- Laptop 2 FreeBSD 9.1 (32 bit) using chroot
- Netbook 1 OpenSuSE 12.2 (32 bit) using chroot
- Netbook 2 OpenBSD 5.2 (32 bit) using chroot
jm.evers
Participantjm.evers
Participant::In case of a « panick » just make sure the permissions are set correctly
something like (as root) a
chown -R wims:wims /home/wims
And recompile as user « wims »
(root becomes wims : sudo su wims)
The scripts in /home/wims/bin :
setwrapexec
wrapuid
setchroot
will take care of setting the permissions right after compiling
kind regards,
joke
-
AuteurMessages