Docfile commited on
Commit
8f54db9
·
verified ·
1 Parent(s): 2b85178

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py CHANGED
@@ -114,9 +114,25 @@ class GeminiClient:
114
  logger.error(f"Erreur lors de l'analyse de l'image: {e}")
115
  raise
116
 
 
117
  def setup_latex_display():
118
  """Configure l'affichage LaTeX dans Streamlit"""
119
  st.markdown("""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  <style>
121
  /* Styles de base pour LaTeX */
122
  .katex {
 
114
  logger.error(f"Erreur lors de l'analyse de l'image: {e}")
115
  raise
116
 
117
+
118
  def setup_latex_display():
119
  """Configure l'affichage LaTeX dans Streamlit"""
120
  st.markdown("""
121
+ <script>
122
+ window.MathJax = {
123
+ tex: {
124
+ inlineMath: [['$', '$'], ['\\\\(', '\\\\)']],
125
+ displayMath: [['$$', '$$'], ['\\\\[', '\\\\]']],
126
+ processEscapes: true,
127
+ macros: {
128
+ R: "{\\\\mathbb{R}}",
129
+ N: "{\\\\mathbb{N}}",
130
+ Z: "{\\\\mathbb{Z}}",
131
+ vecv: ["\\\\begin{pmatrix}#1\\\\\\\\#2\\\\\\\\#3\\\\end{pmatrix}", 3]
132
+ }
133
+ }
134
+ };
135
+ </script>
136
  <style>
137
  /* Styles de base pour LaTeX */
138
  .katex {