tlienart / tlienart.github.io

Code for my website, powered by Franklin.jl
https://tlienart.github.io
9 stars 5 forks source link

[CSS] equation number mayhem #33

Closed tlienart closed 5 years ago

tlienart commented 5 years ago

So when using \left and \right, the number gets obviously placed at the top of the right margin which is not great visually.

This fix solves it but breaks other stuff when resizing the window (e.g. convex analysis pt3 IIRC)

.katex-display .katex {
    display: inline-block;
    width:95%; } /* overwrite katex settings */

.katex-display::after {
    counter-increment: eqnum;
    content: "(" counter(eqnum) ")";
    position: relative;
    width:4%;}

@media (max-width: 680px) {
    .katex-display::after {
        float: right;
        /* padding-right: 5px;} */
    }

probably a bit low priority.

Solution above is "always centered" (including for multiple lines) but breaks when resizing. Maybe that's what we want maybe not. Maybe there can be something different if it's multiline or not...

tlienart commented 5 years ago

reposting at Judoc