blockquote spacing and math font sizing

This commit is contained in:
Alexander 2025-06-21 11:51:45 -04:00
parent 23fa0e33d8
commit f2b91323a4
4 changed files with 14 additions and 9 deletions

View file

@ -240,3 +240,9 @@ code, pre code {
font-family: "Mono";
font-size: calc(0.84 * var(--base-font-size));
}
math {
color: black;
font-family: "Math";
font-size: calc(0.96 * var(--base-font-size));
}

View file

@ -63,6 +63,13 @@ h6 {
margin-top: 1em;
}
/* This must be above the hn+* rules */
blockquote > p {
margin-top: 0.7em;
margin-bottom: 0.7em;
}
h1+*,
h2+*,
h3+*,
@ -175,15 +182,8 @@ hr {
}
math[display="block"] {
margin-top: 0.5em;
margin-bottom: 0.5em;
position: relative;
left: 0;
right: auto;
text-align: left;
}
math {
color: black;
font-family: "Math";
}

View file

@ -9,7 +9,6 @@
<link rel="stylesheet" href="/css/looks.css">
<link rel="stylesheet" href="/css/code.css">
<link rel="icon" type="image/png" href="/assets/favicon.png">
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.22/dist/katex.min.css" integrity="sha384-5TcZemv2l/9On385z///+d7MSYlvIEw9FuZTIdZ14vJLqWphw7e7ZPuOiCHJcFCP" crossorigin="anonymous"> -->
<script>
const class_ = `font-${window.devicePixelRatio >= 1.3 ? 'hidpi' : 'lodpi'}`;
document.documentElement.className = class_;

View file

@ -141,5 +141,5 @@ action = "replace_element"
[widgets.math-display]
widget = "preprocess_element"
selector = "span.math.display"
command = "sed -E 's/^\\\\\\[(.*)\\\\\\]$/\\1/' | katex -d --fleqn --format mathml"
command = "sed -E 's/^\\\\\\[(.*)\\\\\\]$/\\1/' | katex -d --fleqn --format mathml | awk '{print \"<p>\" $0 \"</p>\"}'"
action = "replace_element"