Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Migrate rest of config
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez committed Mar 30, 2022
1 parent b90316d commit 9bc4432
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 28 deletions.
23 changes: 0 additions & 23 deletions src/doc/common/themes/sage-classic/static/mathjax_sage.js_t

This file was deleted.

2 changes: 0 additions & 2 deletions src/doc/common/themes/sage-classic/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,3 @@ linkcolor = #45529B
# Background color for code blocks: very pale yellow
codebgcolor = #FFFFE5

# MathJax settings filled in by conf.py
mathjax_macros =
18 changes: 16 additions & 2 deletions src/sage/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,25 @@ def set_intersphinx_mappings(app, config):
THEBE_DIR, 'static']

# Configure MathJax
# https://docs.mathjax.org/en/latest/options/input/tex.html
mathjax3_config = {
"tex": {
"macros": sage_mathjax_macros()
}
# Add custom sage macros
# http://docs.mathjax.org/en/latest/input/tex/macros.html
"macros": sage_mathjax_macros(),
# Add $...$ as possible inline math
# https://docs.mathjax.org/en/latest/input/tex/delimiters.html#tex-and-latex-math-delimiters
"inlineMath": [["$", "$"], ["\\(", "\\)"]],
# Increase the limit the size of the string to be processed
# https://docs.mathjax.org/en/latest/options/input/tex.html#option-descriptions
"maxBuffer": 50 * 1024,
# Use colorv2 extension instead of built-in color extension
# https://docs.mathjax.org/en/latest/input/tex/extensions/autoload.html#tex-autoload-options
# https://docs.mathjax.org/en/latest/input/tex/extensions/colorv2.html#tex-colorv2
"autoload": {"color": [], "colorv2": ["color"]},
},
}
mathjax_path = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"

mathjax_relative = os.path.basename(MATHJAX_DIR)

Expand Down
1 change: 0 additions & 1 deletion src/sage/misc/sagedoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,6 @@ def __call__(self, obj, output='html', view=True):
</script>
<script type="text/javascript" src="%(static_path)s/jquery.js"></script>
<script type="text/javascript" src="%(static_path)s/doctools.js"></script>
<script type="text/javascript" src="%(static_path)s/mathjax_sage.js"></script>
<link rel="shortcut icon" href="%(static_path)s/favicon.ico" />
<link rel="icon" href="%(static_path)s/sageicon.png" type="image/x-icon" />
</head>
Expand Down

0 comments on commit 9bc4432

Please sign in to comment.