Skip to content

Commit

Permalink
Scale down non-mathescape math in CSS instead of scaling up monospace
Browse files Browse the repository at this point in the history
The default ratio between normal and monospace font size is actually quite nice.
  • Loading branch information
henrikt-ma committed Oct 8, 2020
1 parent bc43367 commit bcc97b4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions css/MLS.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ a:hover { text-decoration: underline; }
.ltx_th { font-weight:normal; }

/* Compensate for default font size ratio 13:16 for monospace to normal.
* 16/13 = 1.2307..., and due to the way we mix inline code with MathJax math, even this is on the small side.
* 16/13 = 1.2307...
* When inline code is displayed side by side with MathJax math, even this is on the small side, but when the
* MathJax math is inside the inline code (using mathescape), the math is scaled down with the text.
* Hence, rather than scaling up the monospace font, it seems better to scale down the math that isn't doesn't have
* font set to monospace (the font probably only matters for font size selection in the case of math content).
* 13/16 = 0.8125
*/
.ltx_font_typewriter { font-size:123%; }
/*.ltx_font_typewriter { font-size:123%; }*/
.ltx_Math { font-size: 81.25%; }
.ltx_font_typewriter .ltx_Math { font-size: 100%; }

0 comments on commit bcc97b4

Please sign in to comment.