fix(math): add KaTeX CDN and fallback for radical SVG overflow
KaTeX renders square roots using a 400em-wide SVG that relies on CSS `overflow: hidden` to clip to the correct length. Without the KaTeX stylesheet, this SVG extends across the entire page. Changes: - Add KaTeX CDN stylesheet link to base.html for fonts and layout - Add .katex-display local margin/overflow overrides - Add .hide-tail svg max-width fallback for file:// CORS blocking The CDN provides full KaTeX styling when accessible. The SVG constraint serves as a fallback when CDN is blocked (e.g., local file:// access).
This commit is contained in:
1
docs/templates/base.html
vendored
1
docs/templates/base.html
vendored
@@ -7,6 +7,7 @@
|
||||
<title>{{ title }} | {{ config.title }}</title>
|
||||
<link rel="canonical" href="{{ base_url }}{{ page_path }}" />
|
||||
<link rel="stylesheet" href="{{ prefix }}/style.css" />
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.css" crossorigin="anonymous" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user