Update index.html
Browse files- index.html +15 -28
index.html
CHANGED
@@ -1,38 +1,25 @@
|
|
1 |
<!DOCTYPE html>
|
2 |
-
<html>
|
3 |
<head>
|
4 |
-
<
|
5 |
-
<
|
6 |
-
<
|
7 |
-
|
8 |
-
loader: {load: ['[tex]/ams']},
|
9 |
-
tex: {
|
10 |
-
packages: {'[+]': ['ams']},
|
11 |
-
inlineMath: [['\\(', '\\)']],
|
12 |
-
displayMath: [['$$', '$$']]
|
13 |
-
},
|
14 |
-
svg: {
|
15 |
-
fontCache: 'global'
|
16 |
-
}
|
17 |
-
};
|
18 |
-
</script>
|
19 |
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
20 |
</head>
|
21 |
<body>
|
22 |
-
<h2>
|
23 |
-
<
|
24 |
-
<
|
25 |
-
<
|
26 |
-
<div id="markdownOutput"></div>
|
27 |
|
28 |
<script>
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
}
|
36 |
</script>
|
37 |
</body>
|
38 |
</html>
|
|
|
1 |
<!DOCTYPE html>
|
2 |
+
<html lang="fr">
|
3 |
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Éditeur LaTeX avec MathJax</title>
|
7 |
+
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
9 |
</head>
|
10 |
<body>
|
11 |
+
<h2>Entrez votre LaTeX ci-dessous</h2>
|
12 |
+
<input type="text" id="latex-input" placeholder="Entrez votre LaTeX ici" size="50">
|
13 |
+
<button onclick="renderLatex()">Afficher</button>
|
14 |
+
<div id="output" style="margin-top: 20px; border: 1px solid #ccc; padding: 10px;"></div>
|
|
|
15 |
|
16 |
<script>
|
17 |
+
function renderLatex() {
|
18 |
+
var input = document.getElementById('latex-input').value;
|
19 |
+
var output = document.getElementById('output');
|
20 |
+
output.innerHTML = `\\(${input}\\)`; // Utilisez des backticks pour le template string
|
21 |
+
MathJax.typesetPromise(); // Demande à MathJax de rafraîchir le rendu
|
22 |
+
}
|
|
|
23 |
</script>
|
24 |
</body>
|
25 |
</html>
|