6
6
/* fonts */
7
7
--headings-font-family : "Noto Sans" , sans-serif;
8
8
--text-font-family : "Noto Serif" , serif;
9
- --math-font-family : "STIX Two Math" , "Cambria Math" , "Noto Serif" , serif;
10
- --math-caligraphic-font-family : "Lucida Calligraphy" , "Zapf Chancery" , "URW Chancery L" ;
9
+ --math-font-family : "STIX Two Math" , "Cambria Math" , math;
10
+ /* Should we do anything special for caligraphic?
11
+ e.g. "Lucida Calligraphy","Zapf Chancery","URW Chancery L", TeX Gyre Termes...*/
12
+ --math-caligraphic-font-family : "STIX Two Math" , "Cambria Math" , math;
11
13
--code-font-family : "Noto Sans Mono" , monospace;
12
14
/* default color theme is light */
13
15
--background-color : white;
@@ -170,10 +172,6 @@ section.ltx_indent_first > .ltx_title+.ltx_para>.ltx_p { text-indent:2em!importa
170
172
display : block;
171
173
}
172
174
173
- /* TODO: need to pick+deploy some math fonts... */
174
- /* math.ltx_Math, semantics, mrow, mpadded, mover, munder, mi, mn, mo, msup, msub, msqrt, munder, mtext, mfrac, mmultiscripts, msubsup {
175
- background-color: white;
176
- } */
177
175
math ,
178
176
mjx-container {
179
177
font-family : var (--math-font-family );
@@ -291,6 +289,13 @@ span.ltx_personname > br.ltx_break + span {
291
289
span .ltx_personname > .ltx_break + .ltx_break {
292
290
display : none;
293
291
}
292
+ /* The person name metadata is not the best place to do math-based scripted "dagger" marks.
293
+ The precise sizing tricks for PDF don't really work well in HTML. Ignore them.
294
+ see arXiv:2006.13760 */
295
+ .ltx_personname math mtext [mathsize ] {
296
+ font-size : inherit !important ;
297
+ }
298
+
294
299
/* also avoid paragraphs that just contain a break, our CSS margins can be trusted. */
295
300
.ltx_para > .ltx_break : first-child : last-child {
296
301
display : none;
@@ -1457,6 +1462,18 @@ foreignObject .ltx_text {
1457
1462
.ltx_minipage > .ltx_graphics {
1458
1463
max-width : 100% ;
1459
1464
}
1465
+ /* minipages need some dedicated work (ar5iv#83),
1466
+ but for now we can accommodate with a bit of special-case padding; */
1467
+ .ltx_flex_size_2 .ltx_tabular .ltx_minipage {
1468
+ margin : 1rem ;
1469
+ }
1470
+ .ltx_flex_size_3 .ltx_tabular .ltx_minipage {
1471
+ margin : 0.66rem ;
1472
+ }
1473
+ .ltx_flex_size_4 .ltx_tabular .ltx_minipage {
1474
+ margin : 0.5rem ;
1475
+ }
1476
+
1460
1477
.ltx_listing {
1461
1478
display : block;
1462
1479
max-width : var (--main-width );
@@ -1816,7 +1833,6 @@ dl.ltx_description dl.ltx_description dd {
1816
1833
1817
1834
/*======================================================================
1818
1835
Misc */
1819
- /* .ltx_verbatim*/
1820
1836
.ltx_verbatim {
1821
1837
text-align : left;
1822
1838
font-size : 90% ;
@@ -1843,4 +1859,49 @@ merror.ltx_ERROR {
1843
1859
}
1844
1860
mjx-merror {
1845
1861
background-color : var (--background-color ) !important ;
1862
+ }
1863
+
1864
+ /*======================================================================
1865
+ Fine-tuning for the state of MathML in 2023
1866
+
1867
+ When a formula starts approaching half the line in horizontal width,
1868
+ today's "text-align: justify" tends to fail pretty miserably
1869
+ (adding large wells of whitespace),
1870
+ as we have no way of reflowing/breaking the formula.
1871
+ Meanwhile, "text-align: left" remains reliable in its simplicity.
1872
+
1873
+ We us a latexml-specific heuristic of "7 mrows" for formulas of this quality.
1874
+ An example is item 2.9 in section 2.6 of arXiv:2105.10386 */
1875
+ .ltx_item : has (> .ltx_para > .ltx_p > math mrow : nth-of-type (7 )),
1876
+ .ltx_p : has (> math mrow : nth-of-type (7 )) {
1877
+ text-align : left;
1878
+ }
1879
+
1880
+ /* see discussion at github.com/w3c/mathml-core/issues/39 */
1881
+ mfrac > * {
1882
+ font-size : inherit;
1883
+ padding : 0.1em ;
1884
+ }
1885
+
1886
+ /*======================================================================
1887
+ Fixes for known markup Bugs
1888
+
1889
+ B1. We have certain semi-supported bindings where a bibliography will be detected, but a paper
1890
+ will also mark it manually as e.g. \section{Bibliography}.
1891
+ (see arXiv:astro-ph/0001001)
1892
+ Detect: A section with only a title (no content) as a previous sibling to a bibliography
1893
+ Resolution: hide the extra section element. */
1894
+ .ltx_section : has (> .ltx_title_section : only-child ): has (+ .ltx_bibliography ) {
1895
+ display : none;
1896
+ }
1897
+
1898
+ /* B2. Bibitems whose bib blocks are entirely empty are better hidden (maybe?)
1899
+ best avoided entirely in latexml
1900
+ .ltx_bibitem:not(:has(> .ltx_bibblock > *)) {
1901
+ display: none;
1902
+ } */
1903
+
1904
+ /* B3. ltx_parbox having too narrow widths in tables (see ar5iv#191) */
1905
+ .ltx_th .ltx_parbox , .ltx_tr .ltx_parbox {
1906
+ width : initial !important ;
1846
1907
}
0 commit comments