| 1 |
/* mitthesis-style.css |
| 2 |
|
| 3 |
v1.working, 2026-01-25 |
| 4 |
Author: John H. Lienhard |
| 5 |
License: MIT License, https://ctan.org/license/mit |
| 6 |
This css code styles the HTML rendering of mitthesis class |
| 7 |
*/ |
| 8 |
|
| 9 |
/* --- Resilience & typography --- */ |
| 10 |
|
| 11 |
*, *::before, *::after { box-sizing: border-box; } |
| 12 |
|
| 13 |
html |
| 14 |
{ |
| 15 |
-webkit-text-size-adjust: 100%; |
| 16 |
text-size-adjust: 100%; |
| 17 |
} |
| 18 |
:root |
| 19 |
{ |
| 20 |
--ui-sans: "Noto Sans", "DejaVu Sans", "Arial Unicode MS", Arial, "Helvetica Neue", Helvetica, sans-serif; |
| 21 |
--math-fallback-regular: "Noto Sans Math", "LeteSansMath", "STIX Two Math", "XITS Math", "Cambria Math", serif; |
| 22 |
--math-fallback-bold: "Noto Sans Math", "LeteSansMath-Bold", "XITSMath", "STIX Two Math", "Cambria Math", serif; |
| 23 |
} |
| 24 |
|
| 25 |
/* These settings partially mimic the default printed page size and width. Aims for sans serif font. */ |
| 26 |
body { |
| 27 |
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; |
| 28 |
font-size: 12pt; |
| 29 |
line-height: 1.2; /* ~14pt leading */ |
| 30 |
margin: 36pt auto; /* ~half-inch margins left/right, centered */ |
| 31 |
max-width: min(75ch, 46rem); /* ~75 characters per line; 46rem ≈ ~92pt*6.1 */ |
| 32 |
hyphens: auto; |
| 33 |
overflow-wrap: anywhere; /* protect narrow columns */ |
| 34 |
hanging-punctuation: first allow-end; /* improve ragged-right when present */ |
| 35 |
} |
| 36 |
|
| 37 |
|
| 38 |
/* Make doc-pagebreak vanish from layout but keep semantics (HTML5+) */ |
| 39 |
|
| 40 |
h1 [role="doc-pagebreak"], |
| 41 |
h2 [role="doc-pagebreak"], |
| 42 |
h3 [role="doc-pagebreak"], |
| 43 |
h4 [role="doc-pagebreak"], |
| 44 |
h5 [role="doc-pagebreak"], |
| 45 |
h6 [role="doc-pagebreak"] |
| 46 |
{ |
| 47 |
display: contents !important; |
| 48 |
margin: 0 !important; |
| 49 |
padding: 0 !important; |
| 50 |
} |
| 51 |
|
| 52 |
|
| 53 |
/* Adjust fonts of title on title page */ |
| 54 |
|
| 55 |
div[data-pdf-se-type="Title"] |
| 56 |
{ |
| 57 |
font-size: 20pt; |
| 58 |
font-weight: 500; /* medium */ |
| 59 |
hyphens: none; |
| 60 |
overflow-wrap: normal; |
| 61 |
word-break: keep-all; |
| 62 |
margin-top: 2em; |
| 63 |
} |
| 64 |
|
| 65 |
div[data-pdf-se-type-original="Author"] span |
| 66 |
{ |
| 67 |
font-size: 14pt; |
| 68 |
} |
| 69 |
|
| 70 |
div[data-pdf-se-type-original="Author"] |
| 71 |
{ |
| 72 |
margin-bottom: 2em; |
| 73 |
} |
| 74 |
|
| 75 |
|
| 76 |
/* Adjust fonts and space of committee page */ |
| 77 |
|
| 78 |
section[data-pdf-se-type-original="Committee_page"] |
| 79 |
{ |
| 80 |
margin-top: 4em; |
| 81 |
} |
| 82 |
|
| 83 |
span[data-pdf-se-type-original="Committee_name"] |
| 84 |
{ |
| 85 |
font-size: 16pt; |
| 86 |
font-weight: 500; /* medium */ |
| 87 |
hyphens: none; |
| 88 |
overflow-wrap: normal; |
| 89 |
word-break: keep-all; |
| 90 |
} |
| 91 |
|
| 92 |
/* For "Thesis Supervisor" and "Thesis Readers" */ |
| 93 |
span[data-pdf-se-type-original="Committee_block_title"] |
| 94 |
{ |
| 95 |
font-size: 14pt; |
| 96 |
font-weight: 500; /* medium */ |
| 97 |
hyphens: none; |
| 98 |
overflow-wrap: normal; |
| 99 |
word-break: keep-all; |
| 100 |
display: inline-block; |
| 101 |
margin-top: 1.3em; |
| 102 |
margin-bottom: 0.3em; |
| 103 |
font-variant: small-caps; |
| 104 |
} |
| 105 |
|
| 106 |
|
| 107 |
/* Adjust fonts and space of abstract page */ |
| 108 |
|
| 109 |
section[data-pdf-se-type-original="Abstract_page"] |
| 110 |
{ |
| 111 |
margin-top: 4em; |
| 112 |
} |
| 113 |
|
| 114 |
div[data-pdf-se-type-original="Abstract_title"] |
| 115 |
{ |
| 116 |
font-size: 16pt; |
| 117 |
font-weight: 500; /* medium */ |
| 118 |
hyphens: none; |
| 119 |
overflow-wrap: normal; |
| 120 |
word-break: keep-all; |
| 121 |
} |
| 122 |
|
| 123 |
div[data-pdf-se-type-original="Abstract_text"] |
| 124 |
{ |
| 125 |
} |
| 126 |
|
| 127 |
div[data-pdf-se-type-original="Abstract_supervisor"] |
| 128 |
{ |
| 129 |
margin-top: 1em; |
| 130 |
} |
| 131 |
div[data-pdf-se-type-original="Abstract_supervisor"] p |
| 132 |
{ |
| 133 |
margin-top: 0.2em; |
| 134 |
margin-bottom: 0.2em; |
| 135 |
} |
| 136 |
|
| 137 |
|
| 138 |
/* Headings H1... */ |
| 139 |
|
| 140 |
/* Heading font weights */ |
| 141 |
|
| 142 |
h1[data-pdf-se-type="H1"], |
| 143 |
h1[data-pdf-se-type-original="chapter"], |
| 144 |
h2[data-pdf-se-type="H2"], |
| 145 |
h3[data-pdf-se-type="H3"], |
| 146 |
h4[data-pdf-se-type="H4"] |
| 147 |
{ |
| 148 |
font-weight: 700; |
| 149 |
} |
| 150 |
|
| 151 |
/* Heading sizes */ |
| 152 |
|
| 153 |
h1[data-pdf-se-type="H1"], |
| 154 |
h1[data-pdf-se-type-original="chapter"] { font-size: 20pt; } |
| 155 |
h2[data-pdf-se-type="H2"] { font-size: 18pt; } |
| 156 |
h3[data-pdf-se-type="H3"] { font-size: 16pt; } |
| 157 |
h4[data-pdf-se-type="H4"] { font-size: 12pt; } |
| 158 |
h5[data-pdf-se-type="H5"] { font-size: 12pt; } |
| 159 |
|
| 160 |
/* Increase vertical space above H1 and H2 headings */ |
| 161 |
|
| 162 |
h1[data-pdf-se-type="H1"], |
| 163 |
h1[data-pdf-se-type-original="chapter"] |
| 164 |
{ |
| 165 |
margin-top: 2em; |
| 166 |
} |
| 167 |
h2[data-pdf-se-type="H2"] |
| 168 |
{ |
| 169 |
margin-top: 1.5em; |
| 170 |
} |
| 171 |
|
| 172 |
/* Keep h5 (\paragraph) inline with text that follows */ |
| 173 |
|
| 174 |
h5[data-pdf-se-type-original="paragraph"] { |
| 175 |
display: inline-block; |
| 176 |
margin-right: 0.5em; |
| 177 |
text-align: left; |
| 178 |
} |
| 179 |
h5[data-pdf-se-type-original="paragraph"] + div[data-pdf-se-type-original="text-unit"] { |
| 180 |
display: inline; |
| 181 |
} |
| 182 |
h5[data-pdf-se-type-original="paragraph"] + div[data-pdf-se-type-original="text-unit"] > p { |
| 183 |
display: inline; |
| 184 |
} |
| 185 |
|
| 186 |
/* Numbered chapter and section titles are composed of two spans. The margin creates space between them. */ |
| 187 |
|
| 188 |
h1[data-pdf-se-type="H1"] > span:first-of-type { margin-inline-end: 0.75em; } |
| 189 |
h2[data-pdf-se-type="H2"] > span:first-of-type, |
| 190 |
h3[data-pdf-se-type="H3"] > span:first-of-type, |
| 191 |
h4[data-pdf-se-type="H4"] > span:first-of-type { margin-inline-end: 0.5em; } |
| 192 |
|
| 193 |
|
| 194 |
/* Math, inline formula wrappers and SVG text inside headings: |
| 195 |
- set math fallback font |
| 196 |
- request bold math face and normal style |
| 197 |
- inherit heading font-size and tighten line-height for math material */ |
| 198 |
:is(h1,h2,h3,h4,h5,h6,[data-pdf-se-type="Heading"]) |
| 199 |
:is( |
| 200 |
math, |
| 201 |
.inline, |
| 202 |
span[data-pdf-se-type="Formula"], |
| 203 |
.formula, |
| 204 |
.math, |
| 205 |
.eq, |
| 206 |
svg text |
| 207 |
) |
| 208 |
{ |
| 209 |
font-family: var(--math-fallback-bold); |
| 210 |
font-weight: 700; |
| 211 |
font-style: normal; |
| 212 |
line-height: 1; |
| 213 |
font-size: inherit; |
| 214 |
} |
| 215 |
|
| 216 |
/* when doing superscripts in a lazy way as $^{-1}$, an empty mrow is created. Fix spacing */ |
| 217 |
|
| 218 |
span[data-pdf-se-type="Formula"].inline:has(math msup > mrow:empty) |
| 219 |
{ |
| 220 |
letter-spacing: -0.1em; |
| 221 |
} |
| 222 |
|
| 223 |
|
| 224 |
/* Tables */ |
| 225 |
|
| 226 |
/* Increase the default separation of all table columns */ |
| 227 |
|
| 228 |
table[data-pdf-se-type="Table"] |
| 229 |
{ |
| 230 |
border-collapse: separate; |
| 231 |
border-spacing: 0; |
| 232 |
} |
| 233 |
|
| 234 |
/* Center data tables only (leave ARIA presentation tables alone) */ |
| 235 |
table[data-pdf-se-type="Table"]:not(.ARIA-role-presentation) |
| 236 |
{ |
| 237 |
margin-left: auto; |
| 238 |
margin-right: auto; |
| 239 |
margin-top: 0.75em; |
| 240 |
margin-bottom: 0.75em; |
| 241 |
} |
| 242 |
|
| 243 |
/* Center captions for non-ARIA data tables only */ |
| 244 |
table[data-pdf-se-type="Table"]:not(.ARIA-role-presentation) + div[data-pdf-se-type="Caption"], |
| 245 |
div[data-pdf-se-type="Caption"] + table[data-pdf-se-type="Table"]:not(.ARIA-role-presentation) |
| 246 |
{ |
| 247 |
text-align: center; |
| 248 |
margin-left: auto; |
| 249 |
margin-right: auto; |
| 250 |
} |
| 251 |
|
| 252 |
table[data-pdf-se-type="Table"] th, |
| 253 |
table[data-pdf-se-type="Table"] td |
| 254 |
{ |
| 255 |
padding: 0; |
| 256 |
} |
| 257 |
|
| 258 |
table[data-pdf-se-type="Table"] th + th, |
| 259 |
table[data-pdf-se-type="Table"] td + td |
| 260 |
{ |
| 261 |
padding-left: 1em; |
| 262 |
} |
| 263 |
|
| 264 |
/* Center all table header cells */ |
| 265 |
|
| 266 |
table[data-pdf-se-type="Table"] th |
| 267 |
{ |
| 268 |
text-align: center; |
| 269 |
} |
| 270 |
|
| 271 |
/* Bold math in table header cells */ |
| 272 |
th math, th math * |
| 273 |
{ |
| 274 |
font-weight: 700 !important; |
| 275 |
font-style: normal !important; /* prevents italics on symbols */ |
| 276 |
/* font-size: 14pt; */ /* seems to match bold text better than 12pt */ |
| 277 |
} |
| 278 |
|
| 279 |
/* Horizontal rules in tables */ |
| 280 |
|
| 281 |
/* Removes any borders from all table cells by default */ |
| 282 |
table:not([role="presentation"]) th, |
| 283 |
table:not([role="presentation"]) td { |
| 284 |
border: none; |
| 285 |
} |
| 286 |
|
| 287 |
|
| 288 |
/* --- Booktabs-style horizontal rules --- */ |
| 289 |
|
| 290 |
/* Colors for table rules (light mode defaults) */ |
| 291 |
:root |
| 292 |
{ |
| 293 |
--table-rule: #8c8c8c; /* body/bottom rule */ |
| 294 |
--table-rule-strong: #808080; /* header/top and mid rule */ |
| 295 |
} |
| 296 |
|
| 297 |
/* Dark-mode overrides */ |
| 298 |
@media (prefers-color-scheme: dark) |
| 299 |
{ |
| 300 |
:root { |
| 301 |
--table-rule: #4f4f4f; /* bottom rule — visible on #121212 */ |
| 302 |
--table-rule-strong: #8a8a8a; /* header rules — brighter */ |
| 303 |
} |
| 304 |
} |
| 305 |
|
| 306 |
/* Ensure no vertical borders */ |
| 307 |
table:not([role="presentation"]) th, |
| 308 |
table:not([role="presentation"]) td |
| 309 |
{ |
| 310 |
border: none; |
| 311 |
} |
| 312 |
|
| 313 |
/* Top rule above the table header row (toprule) */ |
| 314 |
table:not([role="presentation"]) tr:first-child th |
| 315 |
{ |
| 316 |
border-top: 1px solid var(--table-rule-strong); |
| 317 |
padding-top: 0.25em; |
| 318 |
padding-bottom: 0.25em; |
| 319 |
} |
| 320 |
|
| 321 |
/* Mid rule below header (midrule) */ |
| 322 |
table:not([role="presentation"]) th |
| 323 |
{ |
| 324 |
padding-bottom: 0.25em; |
| 325 |
padding-top: 0.25em; |
| 326 |
border-bottom: 1px solid var(--table-rule-strong); |
| 327 |
} |
| 328 |
|
| 329 |
/* Slight increase in separation of non-header rows (readability) */ |
| 330 |
table:not([role="presentation"]) tr > td |
| 331 |
{ |
| 332 |
padding-top: 0.1em; |
| 333 |
} |
| 334 |
|
| 335 |
/* Bottom rule below last body row (bottomrule) */ |
| 336 |
table:not([role="presentation"]) tbody tr:last-child td |
| 337 |
{ |
| 338 |
border-bottom: 1px solid var(--table-rule); |
| 339 |
padding-bottom: 0.25em; |
| 340 |
} |
| 341 |
|
| 342 |
/* Keep any other incidental borders consistent */ |
| 343 |
table:not([role="presentation"]), th, td { |
| 344 |
border-color: var(--table-rule); |
| 345 |
} |
| 346 |
|
| 347 |
/* adjust tables using p{..cm} columns */ |
| 348 |
th div p, td div p |
| 349 |
{ |
| 350 |
margin-top: 0.2em; |
| 351 |
margin-bottom: 0.2em; |
| 352 |
} |
| 353 |
|
| 354 |
/* Special handling of ARIA (presentation) tables */ |
| 355 |
|
| 356 |
/* Keep presentation tables (not data tables) at left margin */ |
| 357 |
.ARIA-role-presentation[data-pdf-se-type="Table"] |
| 358 |
{ |
| 359 |
padding-left: 0; |
| 360 |
border-collapse: collapse; |
| 361 |
} |
| 362 |
|
| 363 |
.ARIA-role-presentation[data-pdf-se-type="Table"] td + td, |
| 364 |
.ARIA-role-presentation[data-pdf-se-type="Table"] th + th |
| 365 |
{ |
| 366 |
padding-left: 0.5em; |
| 367 |
padding-right: 0.5em; |
| 368 |
} |
| 369 |
|
| 370 |
/* Alignments for presentation table holding author, certifier, acceptor on title page */ |
| 371 |
|
| 372 |
div[data-pdf-se-type-original="Title_sig_block"] table.ARIA-role-presentation |
| 373 |
{ |
| 374 |
padding-left: 0; |
| 375 |
border-collapse: collapse; |
| 376 |
margin-top: 1em; |
| 377 |
} |
| 378 |
div[data-pdf-se-type-original="Title_sig_block"] table.ARIA-role-presentation td |
| 379 |
{ |
| 380 |
vertical-align: baseline; |
| 381 |
} |
| 382 |
div[data-pdf-se-type-original="Title_sig_block"] table.ARIA-role-presentation td + td, |
| 383 |
div[data-pdf-se-type-original="Title_sig_block"] table.ARIA-role-presentation th + th |
| 384 |
{ |
| 385 |
padding-left: 0.5em; |
| 386 |
padding-right: 0.5em; |
| 387 |
} |
| 388 |
|
| 389 |
div[data-pdf-se-type-original="Title_sig_block"] table.ARIA-role-presentation tr td span |
| 390 |
{ |
| 391 |
margin-top: 0.5em; |
| 392 |
display: inline-block; |
| 393 |
} |
| 394 |
|
| 395 |
|
| 396 |
/* Captions */ |
| 397 |
|
| 398 |
/* The effectiveness of all this is changed/reduced by loading the caption/subcaption packages */ |
| 399 |
|
| 400 |
/* Let's keep caption labels on the same line as caption text */ |
| 401 |
div[data-pdf-se-type="Caption"] > p[data-pdf-se-type="P"] |
| 402 |
{ |
| 403 |
display: inline; |
| 404 |
/* font-weight: bold; */ /* Would make all caption text bold; change math-fallback below */ |
| 405 |
} |
| 406 |
|
| 407 |
/* boldface labels on captions, with space after label */ |
| 408 |
div[data-pdf-se-type="Caption"] > span[data-pdf-se-type="Lbl"] |
| 409 |
{ |
| 410 |
font-weight: bold; |
| 411 |
} |
| 412 |
div[data-pdf-se-type="Caption"] > span[data-pdf-se-type="Lbl"]::after |
| 413 |
{ |
| 414 |
content: ""; |
| 415 |
display: inline-block; |
| 416 |
width: 0.5em; |
| 417 |
} |
| 418 |
|
| 419 |
/* Math fallback for math/formula-like children and SVG text */ |
| 420 |
div[data-pdf-se-type="Caption"] |
| 421 |
:is( |
| 422 |
math, |
| 423 |
.inline, |
| 424 |
span[data-pdf-se-type="Formula"], |
| 425 |
.formula, |
| 426 |
.math, |
| 427 |
.eq, |
| 428 |
svg text |
| 429 |
) |
| 430 |
{ |
| 431 |
/* font-family: var(--math-fallback-bold); */ |
| 432 |
font-family: var(--math-fallback-regular); |
| 433 |
font-style: normal; |
| 434 |
line-height: inherit; |
| 435 |
} |
| 436 |
|
| 437 |
|
| 438 |
/* Footnotes */ |
| 439 |
|
| 440 |
/* inline footnotes with raised superscript */ |
| 441 |
|
| 442 |
div[data-pdf-se-type-original="footnote"] > span[data-pdf-se-type-original="footnotelabel"] |
| 443 |
{ |
| 444 |
font-weight: normal; |
| 445 |
vertical-align: super; |
| 446 |
font-size: 8pt; |
| 447 |
color: #1f4e79; |
| 448 |
} |
| 449 |
|
| 450 |
div[data-pdf-se-type-original="footnote"] [data-pdf-se-type="Part"] |
| 451 |
{ |
| 452 |
display: contents; |
| 453 |
} |
| 454 |
|
| 455 |
div[data-pdf-se-type-original="footnote"] [data-pdf-se-type="Part"] > p[data-pdf-se-type="P"] |
| 456 |
{ |
| 457 |
display: inline; |
| 458 |
font-size: 10pt; |
| 459 |
font-weight: normal; |
| 460 |
color: #1f4e79; |
| 461 |
} |
| 462 |
|
| 463 |
span[data-pdf-se-type-original="footnotemark"] |
| 464 |
{ |
| 465 |
vertical-align: super; |
| 466 |
font-size: 10pt; |
| 467 |
} |
| 468 |
|
| 469 |
|
| 470 |
/* TOC, LOF, LOT layout */ |
| 471 |
|
| 472 |
/* Baseline: flush all TOC containers */ |
| 473 |
ol[data-pdf-se-type="TOC"] |
| 474 |
{ |
| 475 |
padding-inline-start: 0; |
| 476 |
margin-inline-start: 0em; |
| 477 |
list-style: none; /* override bullets/numbers from inline styles */ |
| 478 |
} |
| 479 |
|
| 480 |
/* Indent any nested TOC level (works with wrapper <li> too) */ |
| 481 |
ol[data-pdf-se-type="TOC"] ol[data-pdf-se-type="TOC"] |
| 482 |
{ |
| 483 |
padding-inline-start: 2em; |
| 484 |
} |
| 485 |
|
| 486 |
/* TOCI items: spacing + no markers */ |
| 487 |
li[data-pdf-se-type="TOCI"] |
| 488 |
{ |
| 489 |
list-style: none; |
| 490 |
margin-inline-start: 0; |
| 491 |
margin-bottom: 0.25em; |
| 492 |
} |
| 493 |
|
| 494 |
|
| 495 |
/* Label spacing inside link */ |
| 496 |
li[data-pdf-se-type="TOCI"] > a > span[data-pdf-se-type="Lbl"] |
| 497 |
{ |
| 498 |
font-weight: 600; |
| 499 |
display: inline-block; |
| 500 |
margin-inline-end: 0.5em; |
| 501 |
align-items: baseline; |
| 502 |
} |
| 503 |
|
| 504 |
/* Ensure a gap between the link and the trailing page number text node */ |
| 505 |
li[data-pdf-se-type="TOCI"] > a::after |
| 506 |
{ |
| 507 |
content: ""; |
| 508 |
display: inline-block; |
| 509 |
width: 0.5em; |
| 510 |
} |
| 511 |
|
| 512 |
/* Ensure 0.5em gap after the entire TOC block */ |
| 513 |
:is(ul, ol)[data-pdf-se-type="TOC"] |
| 514 |
{ |
| 515 |
margin-block-end: 0.5em; |
| 516 |
} |
| 517 |
/* but NOT after nested TOC lists */ |
| 518 |
li > :is(ul, ol)[data-pdf-se-type="TOC"] |
| 519 |
{ |
| 520 |
margin-block-end: 0em; |
| 521 |
} |
| 522 |
|
| 523 |
|
| 524 |
/* Description lists */ |
| 525 |
|
| 526 |
dl.description |
| 527 |
{ |
| 528 |
--hang: 3em; /* hanging width for dd paragraphs */ |
| 529 |
--gap: 0.5em; /* space between label and body */ |
| 530 |
margin: 0; |
| 531 |
padding: 0 0 0 1em; |
| 532 |
} |
| 533 |
|
| 534 |
/* Each LI wrapper: contain float + add spacing between items */ |
| 535 |
dl.description > div |
| 536 |
{ |
| 537 |
display: flow-root; |
| 538 |
margin-bottom: 1em; /* 1em gap between list items */ |
| 539 |
} |
| 540 |
dl.description div:last-child |
| 541 |
{ |
| 542 |
margin-bottom: 0; /* no extra space after final item */ |
| 543 |
} |
| 544 |
|
| 545 |
/* Label floats left; reserve hanging width + gap */ |
| 546 |
dl.description dt |
| 547 |
{ |
| 548 |
float: left; |
| 549 |
font-weight: 700; |
| 550 |
margin: 0 calc(var(--hang) + var(--gap)) 0 0; |
| 551 |
/* optional: prevent wrapping of label text */ |
| 552 |
/* white-space: nowrap; */ |
| 553 |
} |
| 554 |
|
| 555 |
/* Definition follows the float */ |
| 556 |
dl.description dd |
| 557 |
{ margin: 0; } |
| 558 |
|
| 559 |
/* Ignore PDF wrapper divs */ |
| 560 |
dl.description > dd > div |
| 561 |
{ display: contents; } |
| 562 |
|
| 563 |
/* 3em hanging indent for body paragraphs */ |
| 564 |
dl.description dd p |
| 565 |
{ |
| 566 |
margin: 0; |
| 567 |
padding-left: var(--hang); |
| 568 |
text-indent: calc(var(--hang) * -1); |
| 569 |
} |
| 570 |
|
| 571 |
/* Additional paragraphs: same hanging + 1em vertical gap */ |
| 572 |
dl.description dd > div + div > p |
| 573 |
{ |
| 574 |
margin-top: 1em; |
| 575 |
text-indent: 0; |
| 576 |
} |
| 577 |
|
| 578 |
|
| 579 |
/* Special layout for nomenclature list, two column */ |
| 580 |
|
| 581 |
div[data-pdf-se-type-original="Nomenclature_list"] ul[data-pdf-se-type-original="list"] li[data-pdf-se-type="LI"], |
| 582 |
div[data-pdf-se-type-original="Nomenclature_list"] ul[data-pdf-se-type-original="list"] li[data-pdf-se-type="LI"] p[data-pdf-se-type="P"] |
| 583 |
{ |
| 584 |
margin-bottom: 0; |
| 585 |
} |
| 586 |
|
| 587 |
div[data-pdf-se-type-original="Nomenclature_list"] ul[data-pdf-se-type-original="list"] |
| 588 |
{ |
| 589 |
column-count: 2; /* Specifies exactly 2 columns */ |
| 590 |
column-gap: 2em; /* Adds space between columns */ |
| 591 |
} |
| 592 |
|
| 593 |
/* Nomenclature entry heading (e.g., "Greek letters") */ |
| 594 |
ul.list[data-pdf-se-type-original="list"] span[data-pdf-se-type-original="Nomenclature_entry_heading"] |
| 595 |
{ |
| 596 |
font-style: italic; |
| 597 |
margin-top: 0.5em; |
| 598 |
margin-bottom:0.2em; /* some additional space */ |
| 599 |
display: inline-block; |
| 600 |
} |
| 601 |
|
| 602 |
/* Other enumerated and itemized lists (References are "list") */ |
| 603 |
|
| 604 |
/* Label inline with first line, paragraphs preserved */ |
| 605 |
:where(ol[data-pdf-se-type-original="enumerate"], |
| 606 |
ul[data-pdf-se-type-original="list"], |
| 607 |
ul[data-pdf-se-type-original="itemize"]) |
| 608 |
li[data-pdf-se-type="LI"] |
| 609 |
{ |
| 610 |
display: flex; /* put label and body on the same row */ |
| 611 |
align-items: flex-start; /* align label with top of body */ |
| 612 |
column-gap: 0.25em; /* space between label and text */ |
| 613 |
margin-bottom: 0.5em; /* vertical separation between items */ |
| 614 |
} |
| 615 |
|
| 616 |
/* Label stays in the left column */ |
| 617 |
:where(ol[data-pdf-se-type-original="enumerate"], |
| 618 |
ul[data-pdf-se-type-original="list"], |
| 619 |
ul[data-pdf-se-type-original="itemize"]) |
| 620 |
li[data-pdf-se-type="LI"] > span[data-pdf-se-type="Lbl"] |
| 621 |
{ |
| 622 |
flex: 0 0 auto; /* no grow/shrink */ |
| 623 |
} |
| 624 |
|
| 625 |
/* Body flows in the right column; override inline-block from generator */ |
| 626 |
:where(ol[data-pdf-se-type-original="enumerate"], |
| 627 |
ul[data-pdf-se-type-original="list"], |
| 628 |
ul[data-pdf-se-type-original="itemize"]) |
| 629 |
li[data-pdf-se-type="LI"] > [data-pdf-se-type="LBody"] |
| 630 |
{ |
| 631 |
flex: 1 1 auto; |
| 632 |
display: block !important; /* ensures normal block flow */ |
| 633 |
min-width: 0; /* allow wrapping in flex item */ |
| 634 |
} |
| 635 |
|
| 636 |
/* Inner wrappers transparent to layout */ |
| 637 |
:where(ol[data-pdf-se-type-original="enumerate"], |
| 638 |
ul[data-pdf-se-type-original="list"], |
| 639 |
ul[data-pdf-se-type-original="itemize"]) |
| 640 |
li[data-pdf-se-type="LI"] > [data-pdf-se-type="LBody"] > [data-pdf-se-type="Part"] |
| 641 |
{ |
| 642 |
display: contents; |
| 643 |
} |
| 644 |
|
| 645 |
/* Keep paragraphs as blocks so breaks are preserved */ |
| 646 |
:where(ol[data-pdf-se-type-original="enumerate"], |
| 647 |
ul[data-pdf-se-type-original="list"], |
| 648 |
ul[data-pdf-se-type-original="itemize"]) |
| 649 |
li[data-pdf-se-type="LI"] p[data-pdf-se-type="P"] |
| 650 |
{ |
| 651 |
display: block; |
| 652 |
margin: 0 0 0.5em 0; /* paragraph spacing inside the body */ |
| 653 |
} |
| 654 |
|
| 655 |
/* remove any previously added pseudo-space */ |
| 656 |
:where(ol[data-pdf-se-type-original="enumerate"], |
| 657 |
ul[data-pdf-se-type-original="list"], |
| 658 |
ul[data-pdf-se-type-original="itemize"]) |
| 659 |
li[data-pdf-se-type="LI"] > span[data-pdf-se-type="Lbl"]::after |
| 660 |
{ |
| 661 |
content: none; |
| 662 |
} |
| 663 |
|
| 664 |
/* Lists with ragged right (target is Reference list, but this affects all ul.list */ |
| 665 |
ul[data-pdf-se-type-original="list"] li[data-pdf-se-type="LI"] div[data-pdf-se-type="LBody"] p[data-pdf-se-type-original="text"] |
| 666 |
{ |
| 667 |
text-align: left !important ; |
| 668 |
margin-bottom: 0.25em; |
| 669 |
} |
| 670 |
|
| 671 |
|
| 672 |
/* --- Double figure width, but don't exceed 80% of page width --- */ |
| 673 |
|
| 674 |
aside[data-pdf-se-type="Aside"] |
| 675 |
{ |
| 676 |
text-align: center; |
| 677 |
margin-top: 2em; |
| 678 |
} |
| 679 |
|
| 680 |
aside[data-pdf-se-type="Aside"] img |
| 681 |
{ |
| 682 |
display: block !important; |
| 683 |
margin: 1em auto !important; |
| 684 |
width: min(calc(2 * 257px), 80%) !important; /* 257px = original width */ |
| 685 |
height: auto !important; |
| 686 |
} |
| 687 |
|
| 688 |
/* double whatever width attribute is present */ |
| 689 |
@supports (width: attr(width length)) { |
| 690 |
aside[data-pdf-se-type="Aside"] img[width] |
| 691 |
{ |
| 692 |
width: min(calc(2 * attr(width length)), 80%) !important; |
| 693 |
} |
| 694 |
} |
| 695 |
|
| 696 |
/* Figure captions */ |
| 697 |
aside[data-pdf-se-type="Aside"] > div[data-pdf-se-type="Caption"] |
| 698 |
{ |
| 699 |
max-width: 80%; |
| 700 |
margin: 0.5em auto 0; |
| 701 |
text-align: center; |
| 702 |
} |
| 703 |
|
| 704 |
/* Figure text (target is any subcaption text in the figure) */ |
| 705 |
aside[data-pdf-se-type="Aside"] div[data-pdf-se-type-original="text-unit"] > p.justify |
| 706 |
{ |
| 707 |
margin: 0.5em auto 0; |
| 708 |
text-align: center!important; |
| 709 |
} |
| 710 |
|
| 711 |
|
| 712 |
/* --- Dark mode adjustments --- */ |
| 713 |
|
| 714 |
@media (prefers-color-scheme: dark) { |
| 715 |
body { |
| 716 |
color: #e8eaed; |
| 717 |
background: #121212; |
| 718 |
} |
| 719 |
|
| 720 |
/* Headings and captions remain bright */ |
| 721 |
h1, h2, h3, h4, |
| 722 |
div[data-pdf-se-type="Caption"] |
| 723 |
{ |
| 724 |
color: #e8eaed; |
| 725 |
} |
| 726 |
|
| 727 |
hr { border-color: #2b2b2b; } |
| 728 |
|
| 729 |
/* Hyperlinks and cross-references */ |
| 730 |
a[href] { |
| 731 |
color: #82b1ff; /* light blue, accessible on #121212 */ |
| 732 |
text-decoration: underline; |
| 733 |
} |
| 734 |
a[href]:visited { |
| 735 |
color: #b388ff; /* distinct violet for visited links */ |
| 736 |
} |
| 737 |
a[href]:hover, |
| 738 |
a[href]:focus |
| 739 |
{ |
| 740 |
color: #bbdefb; /* even lighter on hover/focus */ |
| 741 |
} |
| 742 |
|
| 743 |
/* Cross-reference links (internal anchors, e.g., [1], Eq. (2)) */ |
| 744 |
a[href^="#"] { |
| 745 |
color: #8ab4f8; /* medium-light blue with strong contrast */ |
| 746 |
} |
| 747 |
|
| 748 |
/* Within captions, tone down slightly for balance */ |
| 749 |
div[data-pdf-se-type="Caption"] a[href] { |
| 750 |
color: #9ec3ff; |
| 751 |
} |
| 752 |
|
| 753 |
/* Keep footnotes legible and distinct */ |
| 754 |
div[data-pdf-se-type-original="footnote"] |
| 755 |
> span[data-pdf-se-type-original="footnotelabel"], |
| 756 |
div[data-pdf-se-type-original="footnote"] |
| 757 |
[data-pdf-se-type="Part"] > p[data-pdf-se-type="P"] |
| 758 |
{ |
| 759 |
color: #9ec3ff; |
| 760 |
} |
| 761 |
|
| 762 |
/* Table borders or lines that might exist */ |
| 763 |
table, th, td { |
| 764 |
border-color: #444; |
| 765 |
} |
| 766 |
} |
| 767 |
|
| 768 |
/* --- Print: layout, breaks, widows/orphans --- */ |
| 769 |
|
| 770 |
@media print { |
| 771 |
@page { |
| 772 |
size: Letter; /* or A4 */ |
| 773 |
margin: 0.5in; /* matches ~36pt intent */ |
| 774 |
} |
| 775 |
body { |
| 776 |
margin: 0; /* @page controls it on print */ |
| 777 |
max-width: none; |
| 778 |
} |
| 779 |
|
| 780 |
/* Avoid splitting key elements across pages */ |
| 781 |
h1, h2, h3, h4, |
| 782 |
[data-pdf-se-type="Figure"], |
| 783 |
table[data-pdf-se-type="Table"], |
| 784 |
figcaption, |
| 785 |
div[data-pdf-se-type="Caption"] |
| 786 |
{ |
| 787 |
break-inside: avoid-page; |
| 788 |
} |
| 789 |
|
| 790 |
/* Widow & orphan control */ |
| 791 |
p, li, dd, blockquote |
| 792 |
{ |
| 793 |
orphans: 2; |
| 794 |
widows: 2; |
| 795 |
} |
| 796 |
} |