| 1 |
<!DOCTYPE html> |
| 2 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 3 |
<head> |
| 4 |
<meta charset="utf-8"/> |
| 5 |
<meta name="generator" content="Docutils 0.17b.dev: http://docutils.sourceforge.net/" /> |
| 6 |
<title>docutils.sty</title> |
| 7 |
<style type="text/css"> |
| 8 |
|
| 9 |
/* Minimal style sheet for the HTML output of Docutils. */ |
| 10 |
/* */ |
| 11 |
/* :Author: Günter Milde, based on html4css1.css by David Goodger */ |
| 12 |
/* :Id: $Id$ */ |
| 13 |
/* :Copyright: © 2015 Günter Milde. */ |
| 14 |
/* :License: Released under the terms of the `2-Clause BSD license`_, */ |
| 15 |
/* in short: */ |
| 16 |
/* */ |
| 17 |
/* Copying and distribution of this file, with or without modification, */ |
| 18 |
/* are permitted in any medium without royalty provided the copyright */ |
| 19 |
/* notice and this notice are preserved. */ |
| 20 |
/* */ |
| 21 |
/* This file is offered as-is, without any warranty. */ |
| 22 |
/* */ |
| 23 |
/* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause */ |
| 24 |
|
| 25 |
/* This CSS2.1_ stylesheet defines rules for Docutils elements without */ |
| 26 |
/* HTML equivalent. It is required to make the document semantic visible. */ |
| 27 |
/* */ |
| 28 |
/* .. _CSS2.1: http://www.w3.org/TR/CSS2 */ |
| 29 |
/* .. _validates: http://jigsaw.w3.org/css-validator/validator$link */ |
| 30 |
|
| 31 |
/* alignment of text and inline objects inside block objects*/ |
| 32 |
.align-left { text-align: left; } |
| 33 |
.align-right { text-align: right; } |
| 34 |
.align-center { clear: both; text-align: center; } |
| 35 |
.align-top { vertical-align: top; } |
| 36 |
.align-middle { vertical-align: middle; } |
| 37 |
.align-bottom { vertical-align: bottom; } |
| 38 |
|
| 39 |
/* titles */ |
| 40 |
h1.title, p.subtitle { |
| 41 |
text-align: center; |
| 42 |
} |
| 43 |
p.topic-title, |
| 44 |
p.sidebar-title, |
| 45 |
p.rubric, |
| 46 |
p.admonition-title, |
| 47 |
p.system-message-title { |
| 48 |
font-weight: bold; |
| 49 |
} |
| 50 |
h1 + p.subtitle, |
| 51 |
h1 + p.section-subtitle { |
| 52 |
font-size: 1.6em; |
| 53 |
} |
| 54 |
h2 + p.section-subtitle { |
| 55 |
font-size: 1.28em; |
| 56 |
} |
| 57 |
p.subtitle, |
| 58 |
p.section-subtitle, |
| 59 |
p.sidebar-subtitle { |
| 60 |
font-weight: bold; |
| 61 |
margin-top: -0.5em; |
| 62 |
} |
| 63 |
p.sidebar-title { |
| 64 |
font-size: larger; |
| 65 |
} |
| 66 |
p.rubric { |
| 67 |
font-size: larger; |
| 68 |
color: maroon; |
| 69 |
} |
| 70 |
a.toc-backref { |
| 71 |
color: black; |
| 72 |
text-decoration: none; } |
| 73 |
|
| 74 |
/* Warnings, Errors */ |
| 75 |
div.system-messages h1, |
| 76 |
span.problematic, |
| 77 |
p.system-message-title { |
| 78 |
color: red; |
| 79 |
} |
| 80 |
|
| 81 |
/* inline literals */ |
| 82 |
span.docutils.literal { |
| 83 |
font-family: monospace; |
| 84 |
white-space: pre-wrap; |
| 85 |
} |
| 86 |
/* do not wraph at hyphens and similar: */ |
| 87 |
.literal > span.pre { white-space: nowrap; } |
| 88 |
|
| 89 |
/* Lists */ |
| 90 |
|
| 91 |
/* compact and simple lists: no margin between items */ |
| 92 |
.simple li, .compact li, |
| 93 |
.simple ul, .compact ul, |
| 94 |
.simple ol, .compact ol, |
| 95 |
.simple > li p, .compact > li p, |
| 96 |
dl.simple > dd, dl.compact > dd { |
| 97 |
margin-top: 0; |
| 98 |
margin-bottom: 0; |
| 99 |
} |
| 100 |
|
| 101 |
/* Table of Contents */ |
| 102 |
div.topic.contents { margin: 0.5em 0; } |
| 103 |
div.topic.contents ul { |
| 104 |
list-style-type: none; |
| 105 |
padding-left: 1.5em; |
| 106 |
} |
| 107 |
|
| 108 |
/* Enumerated Lists */ |
| 109 |
ol.arabic { list-style: decimal } |
| 110 |
ol.loweralpha { list-style: lower-alpha } |
| 111 |
ol.upperalpha { list-style: upper-alpha } |
| 112 |
ol.lowerroman { list-style: lower-roman } |
| 113 |
ol.upperroman { list-style: upper-roman } |
| 114 |
|
| 115 |
dt span.classifier { font-style: italic } |
| 116 |
dt span.classifier:before { |
| 117 |
font-style: normal; |
| 118 |
margin: 0.5em; |
| 119 |
content: ":"; |
| 120 |
} |
| 121 |
|
| 122 |
/* Field Lists and drivatives */ |
| 123 |
/* bold field name, content starts on the same line */ |
| 124 |
dl.field-list > dt, |
| 125 |
dl.option-list > dt, |
| 126 |
dl.docinfo > dt, |
| 127 |
dl.footnote > dt, |
| 128 |
dl.citation > dt { |
| 129 |
font-weight: bold; |
| 130 |
clear: left; |
| 131 |
float: left; |
| 132 |
margin: 0; |
| 133 |
padding: 0; |
| 134 |
padding-right: 0.5em; |
| 135 |
} |
| 136 |
/* Offset for field content (corresponds to the --field-name-limit option) */ |
| 137 |
dl.field-list > dd, |
| 138 |
dl.option-list > dd, |
| 139 |
dl.docinfo > dd { |
| 140 |
margin-left: 9em; /* ca. 14 chars in the test examples */ |
| 141 |
} |
| 142 |
/* start field-body on a new line after long field names */ |
| 143 |
dl.field-list > dd > *:first-child, |
| 144 |
dl.option-list > dd > *:first-child |
| 145 |
{ |
| 146 |
display: inline-block; |
| 147 |
width: 100%; |
| 148 |
margin: 0; |
| 149 |
} |
| 150 |
/* field names followed by a colon */ |
| 151 |
dl.field-list > dt:after, |
| 152 |
dl.docinfo > dt:after { |
| 153 |
content: ":"; |
| 154 |
} |
| 155 |
|
| 156 |
/* Bibliographic Fields (docinfo) */ |
| 157 |
pre.address { font: inherit; } |
| 158 |
dd.authors > p { margin: 0; } |
| 159 |
|
| 160 |
/* Option Lists */ |
| 161 |
dl.option-list { margin-left: 1.5em; } |
| 162 |
dl.option-list > dt { font-weight: normal; } |
| 163 |
span.option { white-space: nowrap; } |
| 164 |
|
| 165 |
/* Footnotes and Citations */ |
| 166 |
dl.footnote.superscript > dd {margin-left: 1em; } |
| 167 |
dl.footnote.brackets > dd {margin-left: 2em; } |
| 168 |
dl > dt.label { font-weight: normal; } |
| 169 |
a.footnote-reference.brackets:before, |
| 170 |
dt.label > span.brackets:before { content: "["; } |
| 171 |
a.footnote-reference.brackets:after, |
| 172 |
dt.label > span.brackets:after { content: "]"; } |
| 173 |
a.footnote-reference.superscript, |
| 174 |
dl.footnote.superscript > dt.label { |
| 175 |
vertical-align: super; |
| 176 |
font-size: smaller; |
| 177 |
} |
| 178 |
dt.label > span.fn-backref { margin-left: 0.2em; } |
| 179 |
dt.label > span.fn-backref > a { font-style: italic; } |
| 180 |
|
| 181 |
/* Line Blocks */ |
| 182 |
div.line-block { display: block; } |
| 183 |
div.line-block div.line-block { |
| 184 |
margin-top: 0; |
| 185 |
margin-bottom: 0; |
| 186 |
margin-left: 40px; |
| 187 |
} |
| 188 |
|
| 189 |
/* Figures, Images, and Tables */ |
| 190 |
.figure.align-left, |
| 191 |
figure.align-left, |
| 192 |
img.align-left, |
| 193 |
object.align-left, |
| 194 |
table.align-left { |
| 195 |
margin-right: auto; |
| 196 |
} |
| 197 |
.figure.align-center, |
| 198 |
figure.align-center, |
| 199 |
img.align-center, |
| 200 |
object.align-center, |
| 201 |
table.align-center { |
| 202 |
margin-left: auto; |
| 203 |
margin-right: auto; |
| 204 |
} |
| 205 |
.figure.align-right, |
| 206 |
figure.align-right, |
| 207 |
img.align-right, |
| 208 |
object.align-right, |
| 209 |
table.align-right { |
| 210 |
margin-left: auto; |
| 211 |
} |
| 212 |
img.align-center, img.align-right, |
| 213 |
object.align-center, object.align-right { |
| 214 |
display: block; |
| 215 |
} |
| 216 |
/* reset inner alignment in figures and tables */ |
| 217 |
.figure.align-left, .figure.align-right, |
| 218 |
figure.align-left, figure.align-right, |
| 219 |
table.align-left, table.align-center, table.align-right { |
| 220 |
text-align: inherit; |
| 221 |
} |
| 222 |
|
| 223 |
/* Sidebar */ |
| 224 |
aside.sidebar { |
| 225 |
width: 30%; |
| 226 |
max-width: 26em; |
| 227 |
float: right; |
| 228 |
clear: right; |
| 229 |
} |
| 230 |
|
| 231 |
/* Text Blocks */ |
| 232 |
blockquote, |
| 233 |
div.topic, |
| 234 |
div.admonition, |
| 235 |
div.system-message, |
| 236 |
pre.literal-block, |
| 237 |
pre.doctest-block, |
| 238 |
pre.math, |
| 239 |
pre.code { |
| 240 |
margin-left: 1.5em; |
| 241 |
margin-right: 1.5em; |
| 242 |
} |
| 243 |
pre.code .ln { color: gray; } /* line numbers */ |
| 244 |
|
| 245 |
/* Tables */ |
| 246 |
table { border-collapse: collapse; } |
| 247 |
td, th { |
| 248 |
border-style: solid; |
| 249 |
border-color: silver; |
| 250 |
padding: 0 1ex; |
| 251 |
border-width: thin; |
| 252 |
} |
| 253 |
td > p:first-child, th > p:first-child { margin-top: 0; } |
| 254 |
td > p, th > p { margin-bottom: 0; } |
| 255 |
|
| 256 |
table > caption { |
| 257 |
text-align: left; |
| 258 |
margin-bottom: 0.25em |
| 259 |
} |
| 260 |
|
| 261 |
table.borderless td, table.borderless th { |
| 262 |
border: 0; |
| 263 |
padding: 0; |
| 264 |
padding-right: 0.5em /* separate table cells */ |
| 265 |
} |
| 266 |
|
| 267 |
/* Document Header and Footer */ |
| 268 |
header { border-bottom: 1px solid black; } |
| 269 |
footer { border-top: 1px solid black; } |
| 270 |
|
| 271 |
/* new HTML5 block elements: set display for older browsers */ |
| 272 |
header, section, footer, aside, nav, main, article, figure { |
| 273 |
display: block; |
| 274 |
} |
| 275 |
|
| 276 |
</style> |
| 277 |
<style type="text/css"> |
| 278 |
|
| 279 |
/* CSS31_ style sheet for the output of Docutils HTML writers. */ |
| 280 |
/* Rules for easy reading and pre-defined style variants. */ |
| 281 |
/* */ |
| 282 |
/* :Author: Günter Milde, based on html4css1.css by David Goodger */ |
| 283 |
/* :Id: $Id$ */ |
| 284 |
/* :Copyright: © 2015 Günter Milde. */ |
| 285 |
/* :License: Released under the terms of the `2-Clause BSD license`_, */ |
| 286 |
/* in short: */ |
| 287 |
/* */ |
| 288 |
/* Copying and distribution of this file, with or without modification, */ |
| 289 |
/* are permitted in any medium without royalty provided the copyright */ |
| 290 |
/* notice and this notice are preserved. */ |
| 291 |
/* */ |
| 292 |
/* This file is offered as-is, without any warranty. */ |
| 293 |
/* */ |
| 294 |
/* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause */ |
| 295 |
/* .. _CSS3: http://www.w3.org/TR/CSS3 */ |
| 296 |
|
| 297 |
|
| 298 |
/* Document Structure */ |
| 299 |
/* ****************** */ |
| 300 |
|
| 301 |
/* "page layout" */ |
| 302 |
body { |
| 303 |
margin: 0; |
| 304 |
background-color: #dbdbdb; |
| 305 |
} |
| 306 |
div.document, |
| 307 |
main { |
| 308 |
line-height:1.3; |
| 309 |
counter-reset: table figure; |
| 310 |
/* avoid long lines --> better reading */ |
| 311 |
/* optimum is 45…75 characters/line <http://webtypography.net/2.1.2> */ |
| 312 |
/* OTOH: lines should not be too short because of missing hyphenation, */ |
| 313 |
max-width: 50em; |
| 314 |
padding: 1px 2%; /* 1px on top avoids grey bar above title (mozilla) */ |
| 315 |
margin: auto; |
| 316 |
background-color: white; |
| 317 |
} |
| 318 |
|
| 319 |
/* Sections */ |
| 320 |
|
| 321 |
/* Transitions */ |
| 322 |
|
| 323 |
hr.docutils { |
| 324 |
width: 80%; |
| 325 |
margin-top: 1em; |
| 326 |
margin-bottom: 1em; |
| 327 |
clear: both; |
| 328 |
} |
| 329 |
|
| 330 |
/* Paragraphs */ |
| 331 |
/* ========== */ |
| 332 |
|
| 333 |
/* vertical space (parskip) */ |
| 334 |
p, ol, ul, dl, li, dd, |
| 335 |
div.line-block, |
| 336 |
div.topic, |
| 337 |
table { |
| 338 |
margin-top: 0.5em; |
| 339 |
margin-bottom: 0.5em; |
| 340 |
} |
| 341 |
p:first-child { margin-top: 0; } |
| 342 |
/* (:last-child is new in CSS 3) */ |
| 343 |
p:last-child { margin-bottom: 0; } |
| 344 |
|
| 345 |
h1, h2, h3, h4, h5, h6, |
| 346 |
dl > dd { |
| 347 |
margin-bottom: 0.5em; |
| 348 |
} |
| 349 |
|
| 350 |
/* Lists */ |
| 351 |
/* ===== */ |
| 352 |
|
| 353 |
/* Separate list entries in compound lists */ |
| 354 |
dl > dd, ol > li, |
| 355 |
|
| 356 |
/* Definition Lists */ |
| 357 |
/* Indent lists nested in definition lists */ |
| 358 |
/* (:only-child is new in CSS 3) */ |
| 359 |
dd > ul:only-child, dd > ol:only-child { padding-left: 1em; } |
| 360 |
|
| 361 |
/* Description Lists */ |
| 362 |
/* styled like in most dictionaries, encyclopedias etc. */ |
| 363 |
dl.description > dt { |
| 364 |
font-weight: bold; |
| 365 |
clear: left; |
| 366 |
float: left; |
| 367 |
margin: 0; |
| 368 |
padding: 0; |
| 369 |
padding-right: 0.5em; |
| 370 |
} |
| 371 |
|
| 372 |
/* Field Lists */ |
| 373 |
|
| 374 |
/* example for custom field-name width */ |
| 375 |
dl.field-list.narrow > dd { |
| 376 |
margin-left: 5em; |
| 377 |
} |
| 378 |
/* run-in: start field-body on same line after long field names */ |
| 379 |
dl.field-list.run-in > dd p { |
| 380 |
display: block; |
| 381 |
} |
| 382 |
|
| 383 |
/* Bibliographic Fields */ |
| 384 |
|
| 385 |
/* generally, bibliographic fields use special definition list dl.docinfo */ |
| 386 |
/* but dedication and abstract are placed into "topic" divs */ |
| 387 |
div.abstract p.topic-title { |
| 388 |
text-align: center; |
| 389 |
} |
| 390 |
div.dedication { |
| 391 |
margin: 2em 5em; |
| 392 |
text-align: center; |
| 393 |
font-style: italic; |
| 394 |
} |
| 395 |
div.dedication p.topic-title { |
| 396 |
font-style: normal; |
| 397 |
} |
| 398 |
|
| 399 |
/* Citations */ |
| 400 |
dl.citation dt.label { |
| 401 |
font-weight: bold; |
| 402 |
} |
| 403 |
span.fn-backref { |
| 404 |
font-weight: normal; |
| 405 |
} |
| 406 |
|
| 407 |
/* Text Blocks */ |
| 408 |
/* =========== */ |
| 409 |
|
| 410 |
/* Literal Blocks */ |
| 411 |
|
| 412 |
pre.literal-block, |
| 413 |
pre.doctest-block, |
| 414 |
pre.math, |
| 415 |
pre.code { |
| 416 |
font-family: monospace; |
| 417 |
} |
| 418 |
|
| 419 |
/* Block Quotes */ |
| 420 |
|
| 421 |
blockquote > table, |
| 422 |
div.topic > table { |
| 423 |
margin-top: 0; |
| 424 |
margin-bottom: 0; |
| 425 |
} |
| 426 |
blockquote p.attribution, |
| 427 |
div.topic p.attribution { |
| 428 |
text-align: right; |
| 429 |
margin-left: 20%; |
| 430 |
} |
| 431 |
|
| 432 |
/* Tables */ |
| 433 |
/* ====== */ |
| 434 |
|
| 435 |
/* th { vertical-align: bottom; } */ |
| 436 |
|
| 437 |
table tr { text-align: left; } |
| 438 |
|
| 439 |
/* "booktabs" style (no vertical lines) */ |
| 440 |
table.booktabs { |
| 441 |
border: 0; |
| 442 |
border-top: 2px solid; |
| 443 |
border-bottom: 2px solid; |
| 444 |
border-collapse: collapse; |
| 445 |
} |
| 446 |
table.booktabs * { |
| 447 |
border: 0; |
| 448 |
} |
| 449 |
table.booktabs th { |
| 450 |
border-bottom: thin solid; |
| 451 |
} |
| 452 |
|
| 453 |
/* numbered tables (counter defined in div.document) */ |
| 454 |
table.numbered > caption:before { |
| 455 |
counter-increment: table; |
| 456 |
content: "Table " counter(table) ": "; |
| 457 |
font-weight: bold; |
| 458 |
} |
| 459 |
|
| 460 |
/* Explicit Markup Blocks */ |
| 461 |
/* ====================== */ |
| 462 |
|
| 463 |
/* Footnotes and Citations */ |
| 464 |
/* ----------------------- */ |
| 465 |
|
| 466 |
/* line on the left */ |
| 467 |
dl.footnote { |
| 468 |
padding-left: 1ex; |
| 469 |
border-left: solid; |
| 470 |
border-left-width: thin; |
| 471 |
} |
| 472 |
|
| 473 |
/* Directives */ |
| 474 |
/* ---------- */ |
| 475 |
|
| 476 |
/* Body Elements */ |
| 477 |
/* ~~~~~~~~~~~~~ */ |
| 478 |
|
| 479 |
/* Images and Figures */ |
| 480 |
|
| 481 |
/* let content flow to the side of aligned images and figures */ |
| 482 |
.figure.align-left, |
| 483 |
figure.align-left, |
| 484 |
img.align-left, |
| 485 |
object.align-left { |
| 486 |
display: block; |
| 487 |
clear: left; |
| 488 |
float: left; |
| 489 |
margin-right: 1em; |
| 490 |
} |
| 491 |
.figure.align-right, |
| 492 |
figure.align-right, |
| 493 |
img.align-right, |
| 494 |
object.align-right { |
| 495 |
display: block; |
| 496 |
clear: right; |
| 497 |
float: right; |
| 498 |
margin-left: 1em; |
| 499 |
} |
| 500 |
/* Stop floating sidebars, images and figures at section level 1,2,3 */ |
| 501 |
h1, h2, h3 { clear: both; } |
| 502 |
|
| 503 |
/* Numbered figures */ |
| 504 |
figure.numbered > figcaption > p:before { |
| 505 |
counter-increment: figure; |
| 506 |
content: "Figure " counter(figure) ": "; |
| 507 |
font-weight: bold; |
| 508 |
} |
| 509 |
|
| 510 |
|
| 511 |
/* Admonitions and System Messages */ |
| 512 |
|
| 513 |
div.admonition, |
| 514 |
div.system-message, |
| 515 |
aside.sidebar { |
| 516 |
border: medium outset; |
| 517 |
margin: 1em 1.5em; |
| 518 |
padding: 0.5em 1em; |
| 519 |
} |
| 520 |
|
| 521 |
div.caution p.admonition-title, |
| 522 |
div.attention p.admonition-title, |
| 523 |
div.danger p.admonition-title, |
| 524 |
div.error p.admonition-title, |
| 525 |
div.warning p.admonition-title, |
| 526 |
div.error { |
| 527 |
color: red; |
| 528 |
} |
| 529 |
|
| 530 |
|
| 531 |
/* Sidebar */ |
| 532 |
|
| 533 |
/* Move right. In a layout with fixed margins, */ |
| 534 |
/* it can be moved into the margin. */ |
| 535 |
div.sidebar, |
| 536 |
aside.sidebar { |
| 537 |
width: 30%; |
| 538 |
max-width: 26em; |
| 539 |
margin-left: 1em; |
| 540 |
margin-right: -2%; |
| 541 |
background-color: #ffffee; |
| 542 |
} |
| 543 |
|
| 544 |
/* Code */ |
| 545 |
|
| 546 |
pre.code { padding: 0.7ex } |
| 547 |
pre.code, code { background-color: #eeeeee } |
| 548 |
pre.code .ln { color: gray; } /* line numbers */ |
| 549 |
/* basic highlighting: for a complete scheme, see */ |
| 550 |
/* http://docutils.sourceforge.net/sandbox/stylesheets/ */ |
| 551 |
pre.code .comment, code .comment { color: #5C6576 } |
| 552 |
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } |
| 553 |
pre.code .literal.string, code .literal.string { color: #0C5404 } |
| 554 |
pre.code .name.builtin, code .name.builtin { color: #352B84 } |
| 555 |
pre.code .deleted, code .deleted { background-color: #DEB0A1} |
| 556 |
pre.code .inserted, code .inserted { background-color: #A3D289} |
| 557 |
|
| 558 |
/* Math */ |
| 559 |
/* styled separately (see math.css for math-output=HTML) */ |
| 560 |
|
| 561 |
/* Epigraph */ |
| 562 |
/* Highlights */ |
| 563 |
/* Pull-Quote */ |
| 564 |
/* Compound Paragraph */ |
| 565 |
/* Container */ |
| 566 |
|
| 567 |
/* Document Header and Footer */ |
| 568 |
|
| 569 |
footer, header { |
| 570 |
font-size: smaller; |
| 571 |
clear: both; |
| 572 |
padding: 0.5em 2%; |
| 573 |
background-color: #ebebee; |
| 574 |
border: none; |
| 575 |
} |
| 576 |
|
| 577 |
/* Inline Markup */ |
| 578 |
/* ============= */ |
| 579 |
|
| 580 |
/* Emphasis */ |
| 581 |
/* em */ |
| 582 |
/* Strong Emphasis */ |
| 583 |
/* strong */ |
| 584 |
/* Interpreted Text */ |
| 585 |
/* span.interpreted */ |
| 586 |
/* Title Reference */ |
| 587 |
/* cite */ |
| 588 |
|
| 589 |
/* Inline Literals */ |
| 590 |
/* possible values: normal, nowrap, pre, pre-wrap, pre-line */ |
| 591 |
/* span.docutils.literal { white-space: pre-wrap; } */ |
| 592 |
|
| 593 |
/* Hyperlink References */ |
| 594 |
a { text-decoration: none; } |
| 595 |
|
| 596 |
/* External Targets */ |
| 597 |
/* span.target.external */ |
| 598 |
/* Internal Targets */ |
| 599 |
/* span.target.internal */ |
| 600 |
/* Footnote References */ |
| 601 |
/* a.footnote-reference */ |
| 602 |
/* Citation References */ |
| 603 |
/* a.citation-reference */ |
| 604 |
|
| 605 |
</style> |
| 606 |
</head> |
| 607 |
<body> |
| 608 |
<main id="docutils-sty"> |
| 609 |
<h1 class="title">docutils.sty</h1> |
| 610 |
|
| 611 |
<!-- %% docutils.sty: macros for Docutils LaTeX output. |
| 612 |
%% |
| 613 |
%% Copyright © 2020 Günter Milde |
| 614 |
%% Released under the terms of the `2-Clause BSD license`, in short: |
| 615 |
%% |
| 616 |
%% Copying and distribution of this file, with or without modification, |
| 617 |
%% are permitted in any medium without royalty provided the copyright |
| 618 |
%% notice and this notice are preserved. |
| 619 |
%% This file is offered as-is, without any warranty. --> |
| 620 |
<p>Helper commands and element definitions for <a class="reference external" href="https://docutils.sourceforge.io/">Docutils</a> LaTeX output.</p> |
| 621 |
<dl class="field-list simple"> |
| 622 |
<dt>Copyright</dt> |
| 623 |
<dd><p>© 2020 Günter Milde</p> |
| 624 |
</dd> |
| 625 |
<dt>Licence</dt> |
| 626 |
<dd><p>Released under the terms of the <a class="reference external" href="https://opensource.org/licenses/BSD-2-Clause">2-Clause BSD license</a></p> |
| 627 |
</dd> |
| 628 |
</dl> |
| 629 |
<section id="changelog"> |
| 630 |
<h2>Changelog</h2> |
| 631 |
<div class="line-block"> |
| 632 |
<div class="line">2020-08-28 first public version for Docutils >= 0.17</div> |
| 633 |
</div> |
| 634 |
</section> |
| 635 |
<section id="requirements"> |
| 636 |
<h2>Requirements</h2> |
| 637 |
<p>None.</p> |
| 638 |
</section> |
| 639 |
<section id="installation"> |
| 640 |
<h2>Installation</h2> |
| 641 |
<p>If possible, get this package from your distribution using its |
| 642 |
installation manager. Alternatively, copy/move/link <span class="docutils literal">docutils.sty</span> |
| 643 |
to a place where LaTeX can find it.</p> |
| 644 |
</section> |
| 645 |
<section id="usage"> |
| 646 |
<h2>Usage</h2> |
| 647 |
<p>The package is intended for use with LaTeX documents generated from |
| 648 |
<a class="reference external" href="https://en.wikipedia.org/wiki/ReStructuredText">reStructuredText</a> sources with <a class="reference external" href="https://docutils.sourceforge.io/">Docutils</a>.</p> |
| 649 |
<p>When generating LaTeX documents, specify this package with the |
| 650 |
<a class="reference external" href="https://docutils.sourceforge.io/docs/user/config.html#stylesheet-latex-writers">“stylesheet”</a> <a class="reference external" href="https://docutils.sourceforge.io/docs/user/config.html">configuration option</a>, e.g.</p> |
| 651 |
<pre class="literal-block">rst2latex --stylesheet=docutils exampledocument.txt</pre> |
| 652 |
<p>The the Docutils <cite>LaTeX writer</cite> will then reference this package |
| 653 |
istead of inserting required definitions into the preamble of |
| 654 |
generated documents (see the <a class="reference external" href="https://docutils.sourceforge.io/docs/user/latex.html">Docutils LaTeX Writer documentation</a> |
| 655 |
for details).</p> |
| 656 |
</section> |
| 657 |
<section id="documentation-generation"> |
| 658 |
<h2>Documentation Generation</h2> |
| 659 |
<p>The bidirectional text <-> code converter <a class="reference external" href="https://repo.or.cz/pylit.git">PyLit</a> and <a class="reference external" href="https://docutils.sourceforge.io/">Docutils</a> |
| 660 |
were used to generate the HTML documentation:</p> |
| 661 |
<pre class="literal-block">#> pylit docutils.sty |
| 662 |
#> rst2html5 docutils.sty.txt docutils.sty.html</pre> |
| 663 |
</section> |
| 664 |
<section id="implementation"> |
| 665 |
<h2>Implementation</h2> |
| 666 |
<section id="identification"> |
| 667 |
<h3>Identification</h3> |
| 668 |
<pre class="literal-block">\NeedsTeXFormat{LaTeX2e} |
| 669 |
\ProvidesPackage{docutils} |
| 670 |
[2020/08/28 macros for Docutils LaTeX output]</pre> |
| 671 |
</section> |
| 672 |
<section id="helpers"> |
| 673 |
<h3>Helpers</h3> |
| 674 |
<p>duclass:</p> |
| 675 |
<pre class="literal-block">% class handling for environments (block-level elements) |
| 676 |
% \begin{DUclass}{spam} tries \DUCLASSspam and |
| 677 |
% \end{DUclass}{spam} tries \endDUCLASSspam |
| 678 |
\ifx\DUclass\undefined % poor man's "provideenvironment" |
| 679 |
\newenvironment{DUclass}[1]% |
| 680 |
{% "#1" does not work in end-part of environment. |
| 681 |
\def\DocutilsClassFunctionName{DUCLASS#1} |
| 682 |
\csname \DocutilsClassFunctionName \endcsname}% |
| 683 |
{\csname end\DocutilsClassFunctionName \endcsname}% |
| 684 |
\fi</pre> |
| 685 |
<p>providelength:</p> |
| 686 |
<pre class="literal-block">% Provide a length variable and set default, if it is new |
| 687 |
\providecommand*{\DUprovidelength}[2]{ |
| 688 |
\ifthenelse{\isundefined{#1}}{\newlength{#1}\setlength{#1}{#2}}{} |
| 689 |
}</pre> |
| 690 |
</section> |
| 691 |
<section id="configuration-defaults"> |
| 692 |
<h3>Configuration defaults</h3> |
| 693 |
<p>See the <a class="reference external" href="https://docutils.sourceforge.io/docs/user/latex.html">Docutils LaTeX Writer documentation</a> for details.</p> |
| 694 |
<p>abstract:</p> |
| 695 |
<pre class="literal-block">\providecommand*{\DUCLASSabstract}{ |
| 696 |
\renewcommand{\DUtitle}[1]{\centerline{\textbf{##1}}} |
| 697 |
}</pre> |
| 698 |
<p>dedication:</p> |
| 699 |
<pre class="literal-block">% special topic for dedications |
| 700 |
\providecommand*{\DUCLASSdedication}{% |
| 701 |
\renewenvironment{quote}{\begin{center}}{\end{center}}% |
| 702 |
}</pre> |
| 703 |
<p>TODO: add em to set dedication text in italics?</p> |
| 704 |
<p>docinfo:</p> |
| 705 |
<pre class="literal-block">% width of docinfo table |
| 706 |
\DUprovidelength{\DUdocinfowidth}{0.9\linewidth}</pre> |
| 707 |
<p>error:</p> |
| 708 |
<pre class="literal-block">\providecommand*{\DUCLASSerror}{\color{red}}</pre> |
| 709 |
<p>highlight_rules:</p> |
| 710 |
<pre class="literal-block">% basic code highlight: |
| 711 |
\providecommand*\DUrolecomment[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}} |
| 712 |
\providecommand*\DUroledeleted[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}} |
| 713 |
\providecommand*\DUrolekeyword[1]{\textbf{#1}} |
| 714 |
\providecommand*\DUrolestring[1]{\textit{#1}}</pre> |
| 715 |
</section> |
| 716 |
<section id="elements"> |
| 717 |
<h3>Elements</h3> |
| 718 |
<p>Definitions for unknown or to-be-configured Docutils elements.</p> |
| 719 |
<p>admonition:</p> |
| 720 |
<pre class="literal-block">% admonition environment (specially marked topic) |
| 721 |
\ifx\DUadmonition\undefined % poor man's "provideenvironment" |
| 722 |
\newbox{\DUadmonitionbox} |
| 723 |
\newenvironment{DUadmonition}% |
| 724 |
{\begin{center} |
| 725 |
\begin{lrbox}{\DUadmonitionbox} |
| 726 |
\begin{minipage}{0.9\linewidth} |
| 727 |
}% |
| 728 |
{ \end{minipage} |
| 729 |
\end{lrbox} |
| 730 |
\fbox{\usebox{\DUadmonitionbox}} |
| 731 |
\end{center} |
| 732 |
} |
| 733 |
\fi</pre> |
| 734 |
<p>fieldlist:</p> |
| 735 |
<pre class="literal-block">% field list environment (for separate configuration of `field lists`) |
| 736 |
\ifthenelse{\isundefined{\DUfieldlist}}{ |
| 737 |
\newenvironment{DUfieldlist}% |
| 738 |
{\quote\description} |
| 739 |
{\enddescription\endquote} |
| 740 |
}{}</pre> |
| 741 |
<p>footnotes:</p> |
| 742 |
<pre class="literal-block">% numerical or symbol footnotes with hyperlinks and backlinks |
| 743 |
\providecommand*{\DUfootnotemark}[3]{% |
| 744 |
\raisebox{1em}{\hypertarget{#1}{}}% |
| 745 |
\hyperlink{#2}{\textsuperscript{#3}}% |
| 746 |
} |
| 747 |
\providecommand{\DUfootnotetext}[4]{% |
| 748 |
\begingroup% |
| 749 |
\renewcommand{\thefootnote}{% |
| 750 |
\protect\raisebox{1em}{\protect\hypertarget{#1}{}}% |
| 751 |
\protect\hyperlink{#2}{#3}}% |
| 752 |
\footnotetext{#4}% |
| 753 |
\endgroup% |
| 754 |
}</pre> |
| 755 |
<p>inline:</p> |
| 756 |
<pre class="literal-block">% custom inline roles: \DUrole{#1}{#2} tries \DUrole#1{#2} |
| 757 |
\providecommand*{\DUrole}[2]{% |
| 758 |
\ifcsname DUrole#1\endcsname% |
| 759 |
\csname DUrole#1\endcsname{#2}% |
| 760 |
\else% |
| 761 |
#2% |
| 762 |
\fi% |
| 763 |
}</pre> |
| 764 |
<p>legend:</p> |
| 765 |
<pre class="literal-block">% legend environment (in figures and formal tables) |
| 766 |
\ifthenelse{\isundefined{\DUlegend}}{ |
| 767 |
\newenvironment{DUlegend}{\small}{} |
| 768 |
}{}</pre> |
| 769 |
<p>lineblock:</p> |
| 770 |
<pre class="literal-block">% line block environment |
| 771 |
\DUprovidelength{\DUlineblockindent}{2.5em} |
| 772 |
\ifthenelse{\isundefined{\DUlineblock}}{ |
| 773 |
\newenvironment{DUlineblock}[1]{% |
| 774 |
\list{}{\setlength{\partopsep}{\parskip} |
| 775 |
\addtolength{\partopsep}{\baselineskip} |
| 776 |
\setlength{\topsep}{0pt} |
| 777 |
\setlength{\itemsep}{0.15\baselineskip} |
| 778 |
\setlength{\parsep}{0pt} |
| 779 |
\setlength{\leftmargin}{#1}} |
| 780 |
\raggedright |
| 781 |
} |
| 782 |
{\endlist} |
| 783 |
}{}</pre> |
| 784 |
<p>optionlist:</p> |
| 785 |
<pre class="literal-block">% list of command line options |
| 786 |
\providecommand*{\DUoptionlistlabel}[1]{\bfseries #1 \hfill} |
| 787 |
\DUprovidelength{\DUoptionlistindent}{3cm} |
| 788 |
\ifthenelse{\isundefined{\DUoptionlist}}{ |
| 789 |
\newenvironment{DUoptionlist}{% |
| 790 |
\list{}{\setlength{\labelwidth}{\DUoptionlistindent} |
| 791 |
\setlength{\rightmargin}{1cm} |
| 792 |
\setlength{\leftmargin}{\rightmargin} |
| 793 |
\addtolength{\leftmargin}{\labelwidth} |
| 794 |
\addtolength{\leftmargin}{\labelsep} |
| 795 |
\renewcommand{\makelabel}{\DUoptionlistlabel}} |
| 796 |
} |
| 797 |
{\endlist} |
| 798 |
}{}</pre> |
| 799 |
<p>rubric:</p> |
| 800 |
<pre class="literal-block">% informal heading |
| 801 |
\providecommand*{\DUrubric}[1]{\subsubsection*{\emph{#1}}}</pre> |
| 802 |
<p>sidebar:</p> |
| 803 |
<pre class="literal-block">% text outside the main text flow |
| 804 |
\providecommand{\DUsidebar}[1]{% |
| 805 |
\begin{center} |
| 806 |
\colorbox[gray]{0.80}{\parbox{0.9\linewidth}{#1}} |
| 807 |
\end{center} |
| 808 |
}</pre> |
| 809 |
<p>title:</p> |
| 810 |
<pre class="literal-block">% title for topics, admonitions, unsupported section levels, and sidebar |
| 811 |
\providecommand*{\DUtitle}[1]{\subsubsection*{#1}}</pre> |
| 812 |
<p>subtitle:</p> |
| 813 |
<pre class="literal-block">% subtitle (for sidebar) |
| 814 |
\providecommand*{\DUsubtitle}[1]{\par\emph{#1}\smallskip}</pre> |
| 815 |
<p>documentsubtitle:</p> |
| 816 |
<pre class="literal-block">% subtitle (in document title) |
| 817 |
\providecommand*{\DUdocumentsubtitle}[1]{{\large #1}}</pre> |
| 818 |
<p>titlereference:</p> |
| 819 |
<pre class="literal-block">% titlereference standard role |
| 820 |
\providecommand*{\DUroletitlereference}[1]{\textsl{#1}}</pre> |
| 821 |
<p>transition:</p> |
| 822 |
<pre class="literal-block">% transition (break / fancybreak / anonymous section) |
| 823 |
\providecommand*{\DUtransition}{% |
| 824 |
\hspace*{\fill}\hrulefill\hspace*{\fill} |
| 825 |
\vskip 0.5\baselineskip |
| 826 |
}</pre> |
| 827 |
</section> |
| 828 |
</section> |
| 829 |
</main> |
| 830 |
</body> |
| 831 |
</html> |