Releases: QuantEcon/quantecon-book-theme
v0.20.3
Fix h5 heading size hierarchy
Fixed
- h5 headings appearing larger than h4 (#381) —
h5had no dedicated CSS rule, so it inherited the browser default size and "PT Serif" (a visually larger serif font) whileh4used the more compact "Source Sans Pro" at1.2rem. Added explicith5styling (1rem, Source Sans Pro, weight 900) to restore the correct heading size hierarchy.
CI
v0.20.2
Fix emphasis color on textual citation "et al." text
Fixed
- Emphasis color on "et al." in textual citations (#378) — the v0.20.1 fix only targeted
<em>inside<a class="reference">links. Withbibtex_reference_style: author_year, sphinxcontrib-bibtex places<em>et al.</em>as a sibling of the link, not a child. Addedspan:has(> a.reference) > emCSS selector to handle this structure across all theme variants (light, dark, gruvbox).
v0.20.1
Fix emphasis color on citation reference links
Fixed
- Emphasis color applied to "et al." in citation links (#366) — added
a.reference emCSS overrides so<em>tags inside sphinxcontrib-bibtex citation reference links inherit color and font-weight from the parent anchor instead of the theme's emphasis styling. Applied across light, dark, and gruvbox color schemes.
Changed
- Relaxed
sphinxcontrib-bibtexupper bound (#366) — updated docs dependency from<=2.5.0to<3, allowing compatibility with the 2.6.x series (latest 2.6.5).
CI
v0.20.0
Language Switcher for Multilingual Site Support
What's New
Language Switcher for Multilingual Sites
A new globe icon dropdown in the bottom toolbar enables users to switch between translated versions of a lecture site. The switcher:
- Only renders when 2+ languages are configured via
html_theme_options - Supports keyboard navigation, click-outside-to-close, and dark mode
- Is fully accessible with ARIA roles and labels
- Has zero impact on existing sites (no configuration required)
SEO hreflang Tags
Automatically injects <link rel="alternate" hreflang="..."> meta tags in <head> for all configured languages, improving search engine discovery of translated content.
Configuration Example
sphinx:
config:
html_theme_options:
languages:
- code: en
name: English
url: https://python-programming.quantecon.org
- code: fa
name: فارسی
url: https://quantecon.github.io/lecture-python-programming.fa
- code: zh-cn
name: 中文
url: https://quantecon.github.io/lecture-python-programming.zh-cn
current_language: enInfrastructure Documentation
New developer guide covering three hosting options (GitHub Pages, subdomains, reverse proxy) for deploying translated lecture sites.
Other Changes
- Renamed
lecture-python-programming.mysttolecture-python-programmingacross CI workflows, tox config, Playwright config, and documentation.
Full Changelog: v0.19.0...v0.20.0
v0.19.0
myst-nb 1.4+ compatibility and inline code styling
What's Changed
Changed
sticky_contentsnow defaults toTrue(#371) — the sticky right-hand table of contents with scroll spy is now enabled by default. To revert, setsticky_contents: Falseinhtml_theme_options.- Increased CSS specificity for custom code highlighting (#373) — ensures custom token colors are not overridden by pydata-sphinx-theme's Pygments rules.
Added
data-themeattribute on<html>(#373) — sets the standarddata-themeattribute for compatibility withmyst-nb1.4.0+. Resolves dark code cell backgrounds appearing on light-themed sites for users with OS dark mode enabled.inline_literal_boxtheme option (#373) — controls whether inline code literals display with background box/border styling (default:False).--qe-literal-colorCSS variable (#373) — inline code literal color integrated into the text color scheme system:- Seoul256:
#af5f5f(muted rust) /#d78787(soft rose dark) - Gruvbox:
#9d0006(dark red) /#fb4934(bright red dark) - None: inherits text color
- Seoul256:
Fixed
- Dark code cells with myst-nb 1.4+ (#373) — fixed
myst-nb1.4.0 falling through to OS preference for dark mode detection.
CI
- Bump
actions/upload-pages-artifactfrom 3 to 4 (#370) - Bump
actions/upload-artifactfrom 6 to 7 (#369)
Full Changelog: v0.18.0...v0.19.0
v0.18.0
Dark Theme Overhaul
What's Changed
Complete Dark Theme Overhaul (#365)
A ground-up rewrite of the dark theme for a modern, consistent, and readable experience.
Changed
- Replaced ad-hoc grays (
#222/#333/#444) with a cohesive navy-charcoal palette (#1a1a2ebackground,#252540surfaces,#d4d4e4text,#6cb6fflinks) - Images now use subtle opacity reduction instead of aggressive CSS inversion
- CSS custom properties — all 16 palette colors declared as overridable
--qe-dark-*custom properties; downstream projects can now customize colors without duplicating selectors
Added
- Dark mode syntax highlighting — complete token colors for all ~40 Pygments syntax classes using a VS Code Dark+ inspired palette
- FOUC prevention — early inline script applies dark mode class before first paint, eliminating the flash of white on page load
- Dark mode documentation — new "Dark Mode" section in
configure.mdcovering palette, syntax highlighting, admonitions, image handling, and CSS customization with full reference table of all overridable custom properties - Dark mode coverage for unstyled elements — modals, admonitions (type-specific accents), homepage elements, collapse/toggle bars, tooltips, autodoc, footnotes, and non-QuantEcon project overrides
Fixed
- Double logo in dark theme — when a dedicated dark logo is configured, both light and dark logos were shown
- Page header unreadable in dark mode — title link, authors, "Last changed" button, and changelog dropdown used
#444text on dark backgrounds - Unreadable table text in dark mode — table rows used
#333text on dark backgrounds - Indistinguishable links in dark mode — all links were
#fff, same as body text - Inline code light border in dark mode — code spans retained light-theme borders
- Sidebar search white in dark mode — search input area remained white
- Toolbar border in dark mode — toolbar border remained light gray
- Syntax highlighting gaps — only 3 of ~40 token types had dark mode overrides
- Stderr warnings in dark mode — updated to use amber accents matching the new palette
Full Changelog: v0.17.1...v0.18.0
v0.17.1
Bug Fixes
Fixed
- Horizontal scrollbar on sticky TOC (#363) — added
overflow-x: hiddento the sticky "On this page" sidebar to prevent an unwanted horizontal scrollbar when long section titles wrap - npm security vulnerabilities (#364) — resolved 9 dependency vulnerabilities (5 high, 3 moderate, 1 low) via
npm audit fix, updating webpack, node-forge, qs, lodash, cross-spawn, ajv, and nanoid
v0.17.0
Sticky TOC & Color Scheme System
Breaking Changes
- Removed individual color options —
emphasis_color,emphasis_color_dark,strong_color,strong_color_dark,definition_color,definition_color_darkhave been replaced by the newcolor_schemeoption. Migrate to the built-inseoul256scheme or acustom_color_scheme.cssfile.
Added
- Sticky table of contents with scroll highlighting (#350, #133)
sticky_contentsoption enables a fixed-position RHS TOC that tracks scroll position- Scroll spy highlights the currently visible section
- Auto-expand subsections show the active hierarchy (
contents_autoexpand) - Copy section link: hover over any TOC entry to copy the full URL with anchor
- Back to top button appears after scrolling down 300px
- New
scrollspy.jsmodule withrequestAnimationFramethrottling
- CI:
/update-snapshotscommand (#362) for regenerating Playwright visual baselines
Changed
- Text color scheme system (#360) — new
color_schemetheme option (seoul256,gruvbox,none)- Seoul256 palette: dark teal/dark amber (light), medium-light teal/light amber-gold (dark)
- Gruvbox palette: earthy aqua/warm orange (light), light aqua/bright orange (dark)
- Custom override via
custom_color_scheme.cssin project_static/
Fixed
- Math equation visual test stability (#361) — regenerated stale snapshots, increased tolerance
Full Changelog: v0.16.0...v0.17.0
v0.16.0
Customizable Emphasis and Bold Text Colors
What's New
Customizable Emphasis and Bold Text Colors (#355, #356)
Six new html_theme_options allow per-site color customization of typography elements:
emphasis_color/emphasis_color_dark— italic (<em>) textstrong_color/strong_color_dark— bold (<strong>/<b>) textdefinition_color/definition_color_dark— definition list (<dt>) elements
Each supports light and dark mode independently, with CSS custom properties and SCSS fallbacks. Server-side validation prevents CSS injection.
Example configuration:
html_theme_options = {
"emphasis_color": "#d9534f",
"strong_color": "#0056b3",
"definition_color": "#2e7d32",
}See the configuration docs for full details.
Bug Fixes
- Math equation visual test stability (#357) — replaced fixed timeout with
MathJax.startup.promisefor reliable rendering detection - Update-snapshots workflow — added
continue-on-errorto handle missing snapshot exits gracefully
Dependency Updates
- Bump codecov/codecov-action from 5.5.1 to 5.5.2 (#351)
- Bump actions/upload-artifact from 5 to 6 (#352)
Full Changelog: v0.15.1...v0.16.0
v0.15.1
Fixed
- Notebook launch URLs with
path_to_docs(#345)- Fixed bug where
path_to_docsprefix was incorrectly included in notebook URLs - When docs are in a subdirectory (e.g.,
lectures/) but notebooks are in a flat repo structure, launch buttons (Colab, JupyterHub, Binder) now generate correct URLs - Added comprehensive test coverage including backward compatibility tests
- Fixed bug where
- Visual regression test stability (#350)
- Fixed flaky MathJax visual regression test by using
maxDiffPixelsinstead ofmaxDiffPixelRatio - Handles minor rendering variations across different environments
- Fixed flaky MathJax visual regression test by using