Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions docs/source/_static/announcements.css
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,65 @@
.toctree-wrapper.compound:empty {
display: none;
}

/* Numbered equations: Sphinx's default `float: right` on the equation number
cannot share a line with MathJax's full-width display block, so the number
lands above the equation. Anchor it to the right of the equation instead. */
div.math {
position: relative;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bot comment.

announcements.css is registered in conf.py html_css_files, so it applies to the whole site, not just announcement pages. These new div.math / div.math span.eqno / .yue .math-wrapper rules will therefore change equation layout and spacing on every page with display math (e.g. autoquantize.rst and the guides). The PR body says the rendered output hasn't been checked with a full sphinx-build — please verify those other pages before merge, or scope these rules to the announcement pages.

}

div.math span.eqno {
float: none;
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
}

/* Display equations: shibuya gives `.yue .math-wrapper` a 2rem margin top and
bottom, and MathJax adds its own margin on the container inside it. The
wrapper sets `overflow-x: auto`, so none of it collapses with the
neighbouring paragraph margins and the gap around every equation ends up
oversized. Drop the MathJax margin and set the spacing on the wrapper. */
.yue .math-wrapper {
margin-top: 1rem;
margin-bottom: 1rem;
}

.yue .math-wrapper mjx-container[display="true"] {
margin: 0;
}

.yue strong.local-hessian-result {
color: #76b900;
font-size: 1.15em;
font-weight: 900;
}

.table-header-note {
font-size: 0.75em;
font-weight: 400;
}

.table-note {
font-size: 0.75rem;
line-height: 1.4;
color: var(--sy-c-light);
}

/* A `.table-note` right after a table is that table's caption, so pull it up
against the table. Shibuya gives `.table-wrapper` a 2rem bottom margin; this
margin collapses with the note's own, so the negative value here nets out to
a small gap. The `.yue .table-wrapper +` prefix is needed to outrank the
theme's paragraph spacing, and keeps figure captions on default spacing. */
.yue .table-wrapper + p.table-note {
margin-top: -1.75rem;
}

.table-note strong,
.table-note code,
.table-note .math,
.table-note mjx-container {
font-size: inherit !important;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading