Debian Codegraph @

texmf-dist/doc/latex/asmejour/asmejour-style.css

raw symbols SCIP
1 /* asmejour-style.css
2
3 v1.00, 2025-11-29
4 Author: John H. Lienhard
5 License: MIT License, https://ctan.org/license/mit
6 This css code styles the HTML rendering of asmejour class
7 */
8
9
10 /* --- Resilience & typography --- */
11
12 *, *::before, *::after { box-sizing: border-box; }
13
14 html
15 {
16 -webkit-text-size-adjust: 100%;
17 text-size-adjust: 100%;
18 }
19
20 :root
21 {
22 --ui-sans: "Noto Sans", "DejaVu Sans", "Arial Unicode MS", Arial, "Helvetica Neue", Helvetica, sans-serif;
23 --math-fallback: "Noto Sans Math", "LeteSansMath-Bold", "STIX Two Math", "XITS Math", "Cambria Math", serif;
24 }
25
26
27 /* These settings partially mimic the default printed page size and width. Aims for sans serif font. */
28 body {
29 font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
30 font-size: 12pt;
31 line-height: 1.2; /* ~14pt leading */
32 margin: 36pt auto; /* ~half-inch margins left/right, centered */
33 max-width: min(75ch, 46rem); /* ~75 characters per line; 46rem ≈ ~92pt*6.1, steadier across fonts */
34 hyphens: auto;
35 overflow-wrap: anywhere; /* protect narrow columns */
36 hanging-punctuation: first allow-end; /* improve ragged-right when present */
37 }
38
39
40 /* Adjust fonts of title, prevent hyphenation */
41
42 div[data-pdf-se-type="Title"]
43 {
44 font-size: 20pt;
45 font-weight: 700; /* bold */
46 hyphens: none;
47 overflow-wrap: normal;
48 word-break: keep-all;
49 }
50
51
52 /* Reduce paragraph spacing inside Author_Block only, leave space under */
53
54 div[data-pdf-se-type-original="Author_Block"] p
55 {
56 margin-top: 0.2em;
57 margin-bottom: 0.2em;
58 }
59
60 div[data-pdf-se-type-original="Author_Block"] {
61 margin-bottom: 1em;
62 }
63
64
65
66 /* Heading font weights */
67
68 h1[data-pdf-se-type="H1"],
69 h1[data-pdf-se-type-original="chapter"],
70 h2[data-pdf-se-type="H2"],
71 h3[data-pdf-se-type="H3"],
72 h4[data-pdf-se-type="H4"]
73 {
74 font-weight: 700;
75 }
76
77 /* Heading sizes */
78
79 h1[data-pdf-se-type="H1"],
80 h1[data-pdf-se-type-original="chapter"] { font-size: 18pt; }
81 h2[data-pdf-se-type="H2"] { font-size: 16pt; }
82 h3[data-pdf-se-type="H3"] { font-size: 14pt; }
83 h4[data-pdf-se-type="H4"] { font-size: 12pt; }
84
85 /* Numbered section titles are composed of two spans. The margin creates space between them. */
86
87 h1[data-pdf-se-type="H1"] > span:first-of-type { margin-inline-end: 0.75em; }
88 h2[data-pdf-se-type="H2"] > span:first-of-type,
89 h3[data-pdf-se-type="H3"] > span:first-of-type,
90 h4[data-pdf-se-type="H4"] > span:first-of-type { margin-inline-end: 0.5em; }
91
92 /* Increase vertical space above H1 headings */
93
94 h1[data-pdf-se-type="H1"],
95 h1[data-pdf-se-type-original="chapter"]
96 {
97 margin-top: 2em;
98 }
99
100
101 /* Tables */
102
103 /* Increase the default separation of all table columns */
104
105 table[data-pdf-se-type="Table"]
106 {
107 border-collapse: separate;
108 border-spacing: 0;
109 }
110
111 /* Center data tables only (leave ARIA presentation tables alone) */
112 table[data-pdf-se-type="Table"]:not(.ARIA-role-presentation)
113 {
114 margin-left: auto;
115 margin-right: auto;
116 margin-top: 0.75em;
117 margin-bottom: 0.75em;
118 }
119
120 /* Center captions for non-ARIA data tables only */
121 table[data-pdf-se-type="Table"]:not(.ARIA-role-presentation) + div[data-pdf-se-type="Caption"],
122 div[data-pdf-se-type="Caption"] + table[data-pdf-se-type="Table"]:not(.ARIA-role-presentation)
123 {
124 text-align: center;
125 margin-left: auto;
126 margin-right: auto;
127 }
128
129 /* Figure captions */
130 aside[data-pdf-se-type="Aside"] > div[data-pdf-se-type="Caption"]
131 {
132 max-width: 80%;
133 margin: 0.5em auto 0;
134 text-align: center;
135 }
136
137 table[data-pdf-se-type="Table"] th,
138 table[data-pdf-se-type="Table"] td
139 {
140 padding: 0;
141 }
142
143 table[data-pdf-se-type="Table"] th + th,
144 table[data-pdf-se-type="Table"] td + td
145 {
146 padding-left: 0.5em;
147 }
148
149 /* Make all table header cells centered */
150
151 table[data-pdf-se-type="Table"] th
152 {
153 text-align: center;
154 }
155
156 /* Bold math in table header cells */
157 th math
158 {
159 font-weight: 700 !important;
160 font-style: normal !important; /* prevents italics on symbols */
161 font-size: 14pt; /* seems to match bold text better than 12pt, test across browsers */
162 }
163
164
165 /* Keep presentation tables (not data tables) at left margin */
166 .ARIA-role-presentation[data-pdf-se-type="Table"]
167 {
168 padding-left: 0;
169 border-collapse: collapse;
170 }
171
172 .ARIA-role-presentation[data-pdf-se-type="Table"] td + td,
173 .ARIA-role-presentation[data-pdf-se-type="Table"] th + th
174 {
175 padding-left: 0.5em;
176 padding-right: 0.5em;
177 }
178
179
180
181 /* Caption rules for div[data-pdf-se-type="Caption"] only */
182
183 /* 1) Base caption container styling (UI sans, fall back to math; bold; preserve layout) */
184 div[data-pdf-se-type="Caption"]
185 {
186 font-family: var(--ui-sans), var(--math-fallback) !important;
187 font-weight: 700 !important; /* caption text is bold */
188 font-style: normal !important;
189 line-height: inherit;
190 text-align: inherit; /* preserve existing alignment rules */
191 }
192
193 /* 2) Force math fallback + bold for math/formula-like children and SVG text */
194 div[data-pdf-se-type="Caption"]
195 :is(
196 math,
197 math *,
198 .inline,
199 span[data-pdf-se-type="Formula"],
200 .formula,
201 .math,
202 .eq,
203 svg text
204 )
205 {
206 font-family: var(--math-fallback) !important;
207 font-weight: 700 !important;
208 font-style: normal !important;
209 line-height: 1 !important;
210 }
211
212 /* Keep caption label and text on same line, with a gap between them */
213 div[data-pdf-se-type="Caption"]
214 {
215 display: inline-flex;
216 flex-wrap: wrap;
217 gap: 0.5em;
218 align-items: baseline;
219 }
220
221 /* Keep the label unwrapped and give a small gap to the following paragraph */
222 div[data-pdf-se-type="Caption"] > [data-pdf-se-type="Lbl"]
223 {
224 white-space: nowrap; /* prevent label from breaking to next line */
225 flex: 0 0 auto; /* don't let label grow or shrink */
226 margin-right: 0.5em; /* spacing between label and text */
227 }
228
229 /* Make the caption paragraph a flexible item that can wrap.
230 Use min-width:0 so it may shrink in a flex container. Remove default p margin. */
231 div[data-pdf-se-type="Caption"] > p[data-pdf-se-type="P"],
232 div[data-pdf-se-type="Caption"] > .caption-text
233 {
234 flex: 1 1 0%;
235 min-width: 0;
236 margin: 0;
237 }
238
239
240 /* ---------- List of Tables / Figures (TOC & TOCI formatting) ---------- */
241
242 ol[data-pdf-se-type="TOC"]
243 {
244 list-style: none;
245 margin: 0.5em 0 1em 0;
246 padding: 0 0 0 3em; /* same left indent as References (3em) */
247 }
248
249 /* Each entry on its own line */
250 li[data-pdf-se-type="TOCI"]
251 {
252 display: block;
253 margin-bottom: 0.25em;
254 }
255
256 /* Space between label (e.g., "1") and the caption text */
257 li[data-pdf-se-type="TOCI"] > a > span[data-pdf-se-type="Lbl"]::after
258 {
259 content: " ";
260 margin-right: 0.5em; /* gap between label number and entry title */
261 }
262
263 /* Space between link text and trailing page number */
264 li[data-pdf-se-type="TOCI"] > a::after
265 {
266 content: " ";
267 margin-right: 0.5em; /* gap before page number */
268 }
269
270 /* Links inherit normal text color and style */
271 ol[data-pdf-se-type="TOC"] a[data-pdf-se-type="Link"]
272 {
273 text-decoration: none;
274 color: inherit;
275 }
276 ol[data-pdf-se-type="TOC"] a[data-pdf-se-type="Link"]:hover
277 {
278 text-decoration: underline;
279 }
280
281 /* Make doc-pagebreak vanish from layout but keep semantics (HTML5+) */
282 h1 [role="doc-pagebreak"],
283 h2 [role="doc-pagebreak"],
284 h3 [role="doc-pagebreak"],
285 h4 [role="doc-pagebreak"],
286 h5 [role="doc-pagebreak"],
287 h6 [role="doc-pagebreak"]
288 {
289 display: contents !important;
290 margin: 0 !important;
291 padding: 0 !important;
292 }
293
294
295 /* Math in section headings */
296
297 /* Style MathML identifiers, numbers, and text elements in section headings as bold sans-serif */
298
299 /* ---------- Consolidated heading rules (preserve heading font, supply math fallback) ---------- */
300
301 /* Math, inline formula wrappers and SVG text inside headings:
302 - force math fallback font
303 - request bold math face and normal style
304 - inherit heading font-size and tighten line-height for math material */
305 :is(h1,h2,h3,h4,h5,h6,[data-pdf-se-type="Heading"])
306 :is(
307 math,
308 math *,
309 .inline,
310 span[data-pdf-se-type="Formula"],
311 .formula,
312 .math,
313 .eq,
314 svg text
315 )
316 {
317 font-family: var(--math-fallback) !important;
318 font-weight: 700 !important;
319 font-style: normal !important;
320 line-height: 1 !important;
321 font-size: inherit !important;
322 }
323
324 /* Global Math sizing: increase math size by default, overridden by the header rule above */
325 math
326 {
327 font-size: 14pt;
328 }
329
330 @supports (font-size: clamp(1em, 2vw, 2em))
331 {
332 math {
333 font-size: clamp(1.1em, 1em + 0.25vw, 1.17em);
334 }
335 }
336
337 /* don't upscale math in captions */
338 :is(caption, figcaption, div[data-pdf-se-type="Caption"]) math
339 {
340 font-size: inherit;
341 }
342
343
344 /* Footnotes */
345
346 /* inline footnotes with raised superscript */
347
348 div[data-pdf-se-type-original="footnote"] > span[data-pdf-se-type-original="footnotelabel"]
349 {
350 font-weight: normal;
351 vertical-align: super;
352 font-size: 10pt;
353 color: #1f4e79;
354 }
355
356 div[data-pdf-se-type-original="footnote"] [data-pdf-se-type="Part"]
357 {
358 display: contents;
359 }
360
361 div[data-pdf-se-type-original="footnote"] {
362 margin-bottom: 1em;
363 line-height: 14pt;
364 }
365
366 div[data-pdf-se-type-original="footnote"] [data-pdf-se-type="Part"] > p[data-pdf-se-type="P"]
367 {
368 display: inline;
369 font-size: 10pt;
370 font-weight: normal;
371 color: #1f4e79;
372 }
373
374 span[data-pdf-se-type-original="footnotemark"]
375 {
376 vertical-align: super;
377 font-size: smaller;
378 }
379
380 /* If another footnote follows immediately, remove the extra gap (target: author footnotes) */
381
382 div[data-pdf-se-type-original="footnote"]
383 + div[data-pdf-se-type-original="footnote"]
384 {
385 margin-top: -1em;
386 }
387
388
389 /* Description lists */
390
391 /* Description lists */
392 dl.description
393 {
394 --hang: 3em; /* hanging width for dd paragraphs */
395 --gap: 0.5em; /* space between label and body */
396 margin: 0;
397 padding: 0;
398 }
399
400 /* Each LI wrapper: contain float + add spacing between items */
401 dl.description > div
402 {
403 display: flow-root;
404 margin-bottom: 1em; /* 1em gap between list items */
405 }
406 dl.description > div:last-child
407 {
408 margin-bottom: 0; /* no extra space after final item */
409 }
410
411 /* Label floats left; reserve hanging width + gap */
412 dl.description dt
413 {
414 float: left;
415 font-weight: 700;
416 margin: 0 calc(var(--hang) + var(--gap)) 0 0;
417 /* optional: prevent wrapping of label text */
418 /* white-space: nowrap; */
419 }
420
421 /* Definition follows the float */
422 dl.description dd { margin: 0; }
423
424 /* Ignore PDF wrapper divs */
425 dl.description dd > div { display: contents; }
426
427 /* 3em hanging indent for body paragraphs */
428 dl.description dd p
429 {
430 margin: 0;
431 padding-left: var(--hang);
432 text-indent: calc(var(--hang) * -1);
433 }
434
435 /* Additional paragraphs: same hanging + 1em vertical gap */
436 dl.description dd p + p { margin-top: 1em; }
437
438
439
440 /* Reference list adjustments (may affect other lists) */
441
442 /* Flatten wrappers so label and reference text stay on the same line */
443 ul[data-pdf-se-type-original="list"] li[data-pdf-se-type="LI"] > [data-pdf-se-type="LBody"],
444 ul[data-pdf-se-type-original="list"] li[data-pdf-se-type="LI"] > [data-pdf-se-type="LBody"] > [data-pdf-se-type="Part"]
445 {
446 display: contents !important;
447 }
448
449 /* Keep first paragraph inline; later paragraphs break normally */
450 ul[data-pdf-se-type-original="list"] li[data-pdf-se-type="LI"] p[data-pdf-se-type="P"]
451 {
452 display: inline;
453 margin: 0;
454 }
455 ul[data-pdf-se-type-original="list"] li[data-pdf-se-type="LI"] p[data-pdf-se-type="P"] + p
456 {
457 display: block;
458 margin-top: 0.5em;
459 }
460
461 /* Add a space after each reference label */
462 ul[data-pdf-se-type-original="list"] li[data-pdf-se-type="LI"] > span[data-pdf-se-type="Lbl"]::after
463 {
464 content: " ";
465 }
466
467 /* Reference block spacing — 1 em total, no hanging indent */
468 ul[data-pdf-se-type-original="list"] li[data-pdf-se-type="LI"]
469 {
470 list-style: none;
471 margin: 0 0 1em 0; /* increase bottom gap */
472 padding: 0; /* remove hanging indent */
473 text-indent: 0; /* ensure flush left */
474 }
475
476
477 /* Nomenclature list — reduce item spacing (may affect other lists) */
478
479 ul.list[data-pdf-se-type-original="list"] li[data-pdf-se-type="LI"]
480 {
481 margin-bottom: 0.25em; /* tighter vertical spacing */
482 }
483
484 /* Flatten converter wrappers (already done in References css above) */
485
486 /* Keep labels inline with their text — fixed 0.5em space */
487 ul.list[data-pdf-se-type-original="list"]
488 li[data-pdf-se-type="LI"] > span[data-pdf-se-type="Lbl"]::after
489 {
490 content: "";
491 display: inline-block;
492 width: 0.5em;
493 }
494
495
496 /* Other enumerated and itemized lists */
497
498 /* Label inline with first line, paragraphs preserved */
499 :where(ol[data-pdf-se-type-original="enumerate"],
500 ul[data-pdf-se-type-original="itemize"])
501 li[data-pdf-se-type="LI"]
502 {
503 display: flex; /* put label and body on the same row */
504 align-items: flex-start; /* align label with top of body */
505 column-gap: 0.5em; /* space between label and text */
506 margin-bottom: 0.25em; /* vertical separation between items */
507 }
508
509 /* Label stays in the left column */
510 :where(ol[data-pdf-se-type-original="enumerate"],
511 ul[data-pdf-se-type-original="itemize"])
512 li[data-pdf-se-type="LI"] > span[data-pdf-se-type="Lbl"]
513 {
514 flex: 0 0 auto; /* no grow/shrink */
515 }
516
517 /* Body flows in the right column; override inline-block from generator */
518 :where(ol[data-pdf-se-type-original="enumerate"],
519 ul[data-pdf-se-type-original="itemize"])
520 li[data-pdf-se-type="LI"] > [data-pdf-se-type="LBody"]
521 {
522 flex: 1 1 auto;
523 display: block !important; /* ensures normal block flow */
524 min-width: 0; /* allow wrapping in flex item */
525 }
526
527 /* Inner wrappers transparent to layout */
528 :where(ol[data-pdf-se-type-original="enumerate"],
529 ul[data-pdf-se-type-original="itemize"])
530 li[data-pdf-se-type="LI"] > [data-pdf-se-type="LBody"] > [data-pdf-se-type="Part"]
531 {
532 display: contents;
533 }
534
535 /* Keep paragraphs as blocks so breaks are preserved */
536 :where(ol[data-pdf-se-type-original="enumerate"],
537 ul[data-pdf-se-type-original="itemize"])
538 li[data-pdf-se-type="LI"] p[data-pdf-se-type="P"]
539 {
540 display: block;
541 margin: 0 0 0.25em 0; /* paragraph spacing inside the body */
542 }
543
544 /* remove any previously added pseudo-space */
545 :where(ol[data-pdf-se-type-original="enumerate"],
546 ul[data-pdf-se-type-original="itemize"])
547 li[data-pdf-se-type="LI"] > span[data-pdf-se-type="Lbl"]::after
548 {
549 content: none;
550 }
551
552 /* when doing superscripts in a lazy way as $^{-1}$, an empty mrow is created. Fix spacing */
553
554 span[data-pdf-se-type="Formula"].inline:has(math msup > mrow:empty)
555 {
556 letter-spacing: -0.1em;
557 }
558
559
560 /* --- Double figure width, but don't exceed 80% of page width --- */
561
562 aside[data-pdf-se-type="Aside"]
563 {
564 text-align: center;
565 }
566
567 aside[data-pdf-se-type="Aside"] img
568 {
569 display: block !important;
570 margin: 1em auto !important;
571 width: min(calc(2 * 257px), 80%) !important; /* 257px = original width */
572 height: auto !important;
573 }
574
575 /* for generality, double whatever width attribute is present */
576 @supports (width: attr(width length)) {
577 aside[data-pdf-se-type="Aside"] img[width]
578 {
579 width: min(calc(2 * attr(width length)), 80%) !important;
580 }
581 }
582
583 /* caption alignment */
584 aside[data-pdf-se-type="Aside"] > div[data-pdf-se-type="Caption"]
585 {
586 max-width: 80%;
587 margin: 0.5em auto 0;
588 text-align: center;
589 }
590
591
592 /* --- Dark mode adjustments --- */
593
594 @media (prefers-color-scheme: dark) {
595 body {
596 color: #e8eaed;
597 background: #121212;
598 }
599
600 /* Headings and captions remain bright */
601 h1, h2, h3, h4,
602 div[data-pdf-se-type="Caption"]
603 {
604 color: #e8eaed;
605 }
606
607 hr { border-color: #2b2b2b; }
608
609 /* Hyperlinks and cross-references */
610 a[href] {
611 color: #82b1ff; /* light blue, accessible on #121212 */
612 text-decoration: underline;
613 }
614 a[href]:visited {
615 color: #b388ff; /* distinct violet for visited links */
616 }
617 a[href]:hover,
618 a[href]:focus
619 {
620 color: #bbdefb; /* even lighter on hover/focus */
621 }
622
623 /* Cross-reference links (internal anchors, e.g., [1], Eq. (2)) */
624 a[href^="#"] {
625 color: #8ab4f8; /* medium-light blue with strong contrast */
626 }
627
628 /* Within captions, tone down slightly for balance */
629 div[data-pdf-se-type="Caption"] a[href] {
630 color: #9ec3ff;
631 }
632
633 /* Keep footnotes legible and distinct */
634 div[data-pdf-se-type-original="footnote"]
635 > span[data-pdf-se-type-original="footnotelabel"],
636 div[data-pdf-se-type-original="footnote"]
637 [data-pdf-se-type="Part"] > p[data-pdf-se-type="P"]
638 {
639 color: #9ec3ff;
640 }
641
642 /* Table borders or lines that might exist */
643 table, th, td {
644 border-color: #444;
645 }
646 }
647
648 /* --- Print: layout, breaks, widows/orphans --- */
649
650 @media print {
651 @page {
652 size: Letter; /* or A4 */
653 margin: 0.5in; /* matches ~36pt intent */
654 }
655 body {
656 margin: 0; /* @page controls it on print */
657 max-width: none;
658 }
659
660 /* Avoid splitting key elements across pages */
661 h1, h2, h3, h4,
662 [data-pdf-se-type="Figure"],
663 table[data-pdf-se-type="Table"],
664 figcaption,
665 div[data-pdf-se-type="Caption"]
666 {
667 break-inside: avoid-page;
668 }
669
670 /* Widow & orphan control */
671 p, li, dd, blockquote
672 {
673 orphans: 2;
674 widows: 2;
675 }
676 }