Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ st.set_page_config(
|
|
| 19 |
layout="wide",
|
| 20 |
initial_sidebar_state="collapsed"
|
| 21 |
)
|
| 22 |
-
|
| 23 |
# Check if pdflatex is available
|
| 24 |
def is_pdflatex_installed():
|
| 25 |
return shutil.which("pdflatex") is not None
|
|
@@ -967,35 +967,24 @@ def main():
|
|
| 967 |
snippet_to_insert = latex_snippets["table"]
|
| 968 |
button_clicked = True
|
| 969 |
|
|
|
|
| 970 |
# Monaco Editor with LaTeX configuration
|
| 971 |
st.markdown('<div class="monaco-editor-container">', unsafe_allow_html=True)
|
| 972 |
-
|
| 973 |
-
# Create Monaco editor component
|
| 974 |
latex_code = st_monaco(
|
| 975 |
value=st.session_state.latex_code,
|
| 976 |
height=500,
|
| 977 |
language="latex",
|
| 978 |
theme="vs-dark",
|
| 979 |
-
|
| 980 |
-
"scrollBeyondLastLine": False,
|
| 981 |
-
"minimap": {"enabled": True},
|
| 982 |
-
"lineNumbers": "on",
|
| 983 |
-
"tabSize": 2,
|
| 984 |
-
"insertSpaces": True,
|
| 985 |
-
"fontSize": 14,
|
| 986 |
-
"wordWrap": "on",
|
| 987 |
-
"automaticLayout": True,
|
| 988 |
-
"quickSuggestions": True,
|
| 989 |
-
"snippetSuggestions": "inline",
|
| 990 |
-
"folding": True,
|
| 991 |
-
}
|
| 992 |
)
|
| 993 |
|
| 994 |
st.markdown('</div>', unsafe_allow_html=True)
|
| 995 |
|
| 996 |
if latex_code is not None:
|
| 997 |
st.session_state.latex_code = latex_code
|
| 998 |
-
|
| 999 |
# Status bar
|
| 1000 |
render_status_bar()
|
| 1001 |
|
|
|
|
| 19 |
layout="wide",
|
| 20 |
initial_sidebar_state="collapsed"
|
| 21 |
)
|
| 22 |
+
st.code(inspect.getdoc(st_monaco))
|
| 23 |
# Check if pdflatex is available
|
| 24 |
def is_pdflatex_installed():
|
| 25 |
return shutil.which("pdflatex") is not None
|
|
|
|
| 967 |
snippet_to_insert = latex_snippets["table"]
|
| 968 |
button_clicked = True
|
| 969 |
|
| 970 |
+
# Monaco Editor with LaTeX configuration
|
| 971 |
# Monaco Editor with LaTeX configuration
|
| 972 |
st.markdown('<div class="monaco-editor-container">', unsafe_allow_html=True)
|
| 973 |
+
|
| 974 |
+
# Create Monaco editor component - simplified parameters
|
| 975 |
latex_code = st_monaco(
|
| 976 |
value=st.session_state.latex_code,
|
| 977 |
height=500,
|
| 978 |
language="latex",
|
| 979 |
theme="vs-dark",
|
| 980 |
+
key="monaco_editor"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 981 |
)
|
| 982 |
|
| 983 |
st.markdown('</div>', unsafe_allow_html=True)
|
| 984 |
|
| 985 |
if latex_code is not None:
|
| 986 |
st.session_state.latex_code = latex_code
|
| 987 |
+
|
| 988 |
# Status bar
|
| 989 |
render_status_bar()
|
| 990 |
|