| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta charset="UTF-8"> |
|
|
| <link rel="stylesheet" |
| href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.5.1/github-markdown-dark.min.css"> |
|
|
| <style> |
| body{ |
| background:#0d1117; |
| } |
| .markdown-body{ |
| max-width:980px; |
| margin:40px auto; |
| padding:45px; |
| } |
| .mermaid svg { |
| max-width: 100%; |
| } |
| </style> |
|
|
| </head> |
|
|
| <body> |
|
|
| <article id="content" class="markdown-body"></article> |
|
|
| <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> |
| <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script> |
|
|
| <script> |
| mermaid.initialize({ |
| startOnLoad:false, |
| theme:"dark", |
| themeVariables:{ |
| background:"#0d1117", |
| primaryColor:"#1f6feb", |
| primaryTextColor:"#c9d1d9", |
| lineColor:"#8b949e", |
| secondaryColor:"#161b22", |
| tertiaryColor:"#21262d" |
| } |
| }); |
| fetch("./context_drift_paper.md") |
| .then(r => r.text()) |
| .then(md => { |
| |
| md = md.replace(/【.*?†.*?】/g, ""); |
| |
| md = md.replace(/\(([A-Za-z0-9_\-\s\\{}=+\cup]+)\)/g, (m,p)=>{ |
| if(p.includes("_") || p.includes("\\") || p.includes("=")) |
| return `$(${p})$`; |
| return m; |
| }); |
| |
| const html = marked.parse(md); |
| document.getElementById("content").innerHTML = html; |
| |
| document.querySelectorAll("code.language-mermaid").forEach(el=>{ |
| const pre = el.parentElement; |
| const div = document.createElement("div"); |
| div.className="mermaid"; |
| div.textContent = el.textContent; |
| pre.replaceWith(div); |
| }); |
| mermaid.init(); |
| |
| MathJax.typeset(); |
| }); |
| </script> |
|
|
| <script> |
| window.MathJax = { |
| tex: { |
| inlineMath: [['$', '$'], ['\\(', '\\)']], |
| displayMath: [['$$','$$']] |
| } |
| }; |
| </script> |
|
|
| <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script> |
|
|
| </body> |
| </html> |