Docfile commited on
Commit
9fe8a1d
·
verified ·
1 Parent(s): fe47056

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +15 -28
index.html CHANGED
@@ -1,38 +1,25 @@
1
  <!DOCTYPE html>
2
- <html>
3
  <head>
4
- <title>Convertisseur Markdown avec support LaTeX avancé</title>
5
- <script src="https://cdn.jsdelivr.net/npm/showdown@1.9.1/dist/showdown.min.js"></script>
6
- <script>
7
- window.MathJax = {
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>Convertisseur de texte en Markdown avec support LaTeX avancé</h2>
23
- <textarea id="inputText" rows="10" cols="50"></textarea>
24
- <br>
25
- <button onclick="convertToMarkdown()">Convertir en Markdown</button>
26
- <div id="markdownOutput"></div>
27
 
28
  <script>
29
- function convertToMarkdown() {
30
- var text = document.getElementById('inputText').value;
31
- var converter = new showdown.Converter();
32
- var markdown = converter.makeHtml(text);
33
- document.getElementById('markdownOutput').innerHTML = markdown;
34
- MathJax.typesetPromise();
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>