forked from ESCOMP/CTSM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation: Add CSS to improve the look of equations
This comes from altMITgcm/MITgcm#12, which I found in a link from readthedocs/sphinx_rtd_theme#383. This right-aligns the equation numbers, and only makes the link image visible if your mouse is hovering above a given equation.
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* Make equation numbers float to the right */ | ||
.eqno { | ||
margin-left: 5px; | ||
float: right; | ||
} | ||
/* Hide the link... */ | ||
.math .headerlink { | ||
display: none; | ||
visibility: hidden; | ||
} | ||
/* ...unless the equation is hovered */ | ||
.math:hover .headerlink { | ||
display: inline-block; | ||
visibility: visible; | ||
/* Place link in margin and keep equation number aligned with boundary */ | ||
margin-right: -0.7em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,3 +180,6 @@ | |
'section': '%s', | ||
} | ||
numfig_secnum_depth = 2 | ||
|
||
def setup(app): | ||
app.add_stylesheet('css/custom.css') |