Précédent   Forum des professionnels en informatique > PHP > Langage > Débuter
Débuter Forum d'entraide pour débuter en PHP. Avant de poster -> Cours PHP, FAQ PHP, Outils PHP, etc.
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 27/04/2011, 19h49   #1
Membre habitué
 
Homme
doctorant
Inscription : décembre 2010
Messages : 101
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Activité : doctorant
Secteur : High Tech - Électronique et micro-électronique

Informations forums :
Inscription : décembre 2010
Messages : 101
Points : 138
Points : 138
Par défaut problème de formule en Mathml sur un script PHP

bonjour,

j'aimerai utiliser Mathml pour incruster des equation mathématiques sur mes page web.

pour obtenir mon code Mathml j'utilise un convertisseur online a partir de code Latex.
j'obtiens donc un code comme ça:
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
 
<!-- begin MathToWeb -->
<!-- (your LaTeX) $F(p,q)=\sum_{m=0}^{M-1}\sum_{n=0}^{N-1}f(m,n)e^{j\pi (m+n)}e^{-j\pi 2p\frac{m}{M}}e^{-j\pi 2q\frac{n}{N}}$ -->
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
	<mi>F</mi>
	<mrow>
		<mo maxsize="1.00em">(</mo>
		<mi>p</mi>
		<mo>,</mo>
		<mi>q</mi>
		<mo maxsize="1.00em">)</mo>
	</mrow>
	<mo>=</mo>
	<mstyle displaystyle="true">
		<munderover>
			<mo>&sum;</mo>
			<mrow>
				<mi>m</mi>
				<mo>=</mo>
				<mn>0</mn>
			</mrow>
			<mrow>
				<mi>M</mi>
				<mo>-</mo>
				<mn>1</mn>
			</mrow>
		</munderover>
	</mstyle>
	<mstyle displaystyle="true">
		<munderover>
			<mo>&sum;</mo>
			<mrow>
				<mi>n</mi>
				<mo>=</mo>
				<mn>0</mn>
			</mrow>
			<mrow>
				<mi>N</mi>
				<mo>-</mo>
				<mn>1</mn>
			</mrow>
		</munderover>
	</mstyle>
	<mi>f</mi>
	<mrow>
		<mo maxsize="1.00em">(</mo>
		<mi>m</mi>
		<mo>,</mo>
		<mi>n</mi>
		<mo maxsize="1.00em">)</mo>
	</mrow>
	<msup>
		<mi>e</mi>
		<mrow>
			<mi>j</mi>
			<mi>&pi;</mi>
			<mrow>
				<mo maxsize="1.00em">(</mo>
				<mi>m</mi>
				<mo>+</mo>
				<mi>n</mi>
				<mo maxsize="1.00em">)</mo>
			</mrow>
		</mrow>
	</msup>
	<msup>
		<mi>e</mi>
		<mrow>
			<mo>-</mo>
			<mi>j</mi>
			<mi>&pi;</mi>
			<mn>2</mn>
			<mi>p</mi>
			<mfrac linethickness="1">
				<mi>m</mi>
				<mi>M</mi>
			</mfrac>
		</mrow>
	</msup>
	<msup>
		<mi>e</mi>
		<mrow>
			<mo>-</mo>
			<mi>j</mi>
			<mi>&pi;</mi>
			<mn>2</mn>
			<mi>q</mi>
			<mfrac linethickness="1">
				<mi>n</mi>
				<mi>N</mi>
			</mfrac>
		</mrow>
	</msup>
</mrow>
</math>
<!-- end MathToWeb -->
ensuite j'essaie d'intégrer ce code sur ma page en PHP.

je met donc se code dans ma page. Et l'affichage ne me donne pas du tout la formule attendu.
j'obtiens:
F ( p , q ) = ∑ m = 0 M - 1 ∑ n = 0 N - 1 f ( m , n ) e j π ( m + n ) e - j π 2 p m M e - j π 2 q n N

j'ai essayé plusieurs solution proposé sur la toile mais je n'est pas trouvé la bonne apparemment.

j'ai essayé les déclaration suivante en début de page:

Code :
1
2
3
4
5
6
7
 
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="mathml.xsl"?>
<?xml-stylesheet type="text/xsl" href="pmathml.xsl"?>
<?xml-stylesheet type="text/xsl" href="http://www.w3.org/Math/XSL/mathml.xsl"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
            "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
j'ai l'impression qu'il ne comprend pas le code MAthml et qu'il le lit comme un simple text. Mes déclarations ne doivent pas être bonne

voila, si une âme charitable passe par là, je pourrais enfin m'en sortir.
littledrummer est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 08h24.


 
 
 
 
Partenaires

Hébergement Web