| 1 |
.. |
| 2 |
Copyright (c) 2021 Pradyun Gedam |
| 3 |
Licensed under Creative Commons Attribution-ShareAlike 4.0 International License |
| 4 |
SPDX-License-Identifier: CC-BY-SA-4.0 |
| 5 |
|
| 6 |
===== |
| 7 |
Lists |
| 8 |
===== |
| 9 |
|
| 10 |
Enumerated Lists |
| 11 |
---------------- |
| 12 |
|
| 13 |
1. Arabic numerals. |
| 14 |
|
| 15 |
a) lower alpha) |
| 16 |
|
| 17 |
(i) (lower roman) |
| 18 |
|
| 19 |
A. upper alpha. |
| 20 |
|
| 21 |
I) upper roman) |
| 22 |
|
| 23 |
2. Lists that don't start at 1: |
| 24 |
|
| 25 |
3. Three |
| 26 |
|
| 27 |
4. Four |
| 28 |
|
| 29 |
C. C |
| 30 |
|
| 31 |
D. D |
| 32 |
|
| 33 |
iii. iii |
| 34 |
|
| 35 |
iv. iv |
| 36 |
|
| 37 |
#. List items may also be auto-enumerated. |
| 38 |
|
| 39 |
Definition Lists |
| 40 |
---------------- |
| 41 |
|
| 42 |
Term |
| 43 |
Definition |
| 44 |
Term : classifier |
| 45 |
Definition paragraph 1. |
| 46 |
|
| 47 |
Definition paragraph 2. |
| 48 |
Term |
| 49 |
Definition |
| 50 |
|
| 51 |
I have no clue why the definition list below is classified as a different style |
| 52 |
of definition list than the one above. |
| 53 |
|
| 54 |
Is it the spaces in the term? |
| 55 |
Maybe it was the multiple line paragraph |
| 56 |
in the line below that caused this? |
| 57 |
|
| 58 |
Is it the paragraph above the list maybe? |
| 59 |
I guess a lot of these lists don't have leading paragraphs? |
| 60 |
|
| 61 |
Is it everything all at once? |
| 62 |
Who knows?! |
| 63 |
|
| 64 |
Option Lists |
| 65 |
------------ |
| 66 |
|
| 67 |
For listing command-line options: |
| 68 |
|
| 69 |
-a command-line option "a" |
| 70 |
-b file options can have arguments |
| 71 |
and long descriptions |
| 72 |
--long options can be long also |
| 73 |
--input=file long options can also have |
| 74 |
arguments |
| 75 |
|
| 76 |
--very-long-option |
| 77 |
The description can also start on the next line. |
| 78 |
|
| 79 |
The description may contain multiple body elements, |
| 80 |
regardless of where it starts. |
| 81 |
|
| 82 |
-x, -y, -z Multiple options are an "option group". |
| 83 |
-v, --verbose Commonly-seen: short & long options. |
| 84 |
-1 file, --one=file, --two file |
| 85 |
Multiple options with arguments. |
| 86 |
/V DOS/VMS-style options too |
| 87 |
|
| 88 |
There must be at least two spaces between the option and the description. |
| 89 |
|
| 90 |
Field list |
| 91 |
---------- |
| 92 |
|
| 93 |
:Address: 123 Example Street |
| 94 |
Example, EX Canada |
| 95 |
A1B 2C3 |
| 96 |
:Organization: humankind |
| 97 |
:Status: This is a "work in progress" |
| 98 |
:Version: 1 |
| 99 |
:Field name: This is a generic bibliographic field. |
| 100 |
:Field name 2: |
| 101 |
Generic bibliographic fields may contain multiple body elements. |
| 102 |
|
| 103 |
Like this. |
| 104 |
|
| 105 |
Glossary |
| 106 |
-------- |
| 107 |
|
| 108 |
This is a glossary with definition terms for things like :term:`Writing`: |
| 109 |
|
| 110 |
.. glossary:: |
| 111 |
|
| 112 |
Documentation |
| 113 |
Provides users with the knowledge they need to use something. |
| 114 |
|
| 115 |
Reading |
| 116 |
The process of taking information into ones mind through the use of eyes. |
| 117 |
|
| 118 |
Writing |
| 119 |
The process of putting thoughts into a medium for other people to :term:`read <Reading>`. |
| 120 |
|
| 121 |
Here's another glossary, with more detail. The important bit here is that the contents of the definition are multi-paragraph. |
| 122 |
|
| 123 |
.. glossary:: |
| 124 |
|
| 125 |
Import Package |
| 126 |
|
| 127 |
A Python module which can contain other modules or recursively, other packages. |
| 128 |
|
| 129 |
An import package is more commonly referred to with the single word “package”, but this guide will use the expanded term when more clarity is needed to prevent confusion with a Distribution Package which is also commonly called a “package”. |
| 130 |
|
| 131 |
Package Index |
| 132 |
|
| 133 |
A repository of distributions with a web interface to automate package discovery and consumption. |
| 134 |
|
| 135 |
Bullet Lists |
| 136 |
------------ |
| 137 |
|
| 138 |
.. |
| 139 |
Docutils supports two types of lists, "simple" and "complex". Complex lists |
| 140 |
have item margins, simple lists do not. |
| 141 |
https://docutils.sourceforge.io/sandbox/html4strict/data/simple-lists.html |
| 142 |
|
| 143 |
Simple |
| 144 |
^^^^^^ |
| 145 |
|
| 146 |
- A simple list. |
| 147 |
- There are no margins between list items. |
| 148 |
- Simple lists do not contain multiple paragraphs. That's a complex list. |
| 149 |
- In the case of a nested list |
| 150 |
|
| 151 |
- There are no margins between elements |
| 152 |
|
| 153 |
- Still no margins |
| 154 |
|
| 155 |
- Still no margins |
| 156 |
|
| 157 |
Complex |
| 158 |
^^^^^^^ |
| 159 |
|
| 160 |
- A bullet list |
| 161 |
|
| 162 |
+ Nested bullet list. |
| 163 |
+ Nested item 2. |
| 164 |
|
| 165 |
- Item 2. |
| 166 |
|
| 167 |
Paragraph 2 of item 2. |
| 168 |
|
| 169 |
* Nested bullet list. |
| 170 |
* Nested item 2. |
| 171 |
|
| 172 |
- Third level. |
| 173 |
- Item 2. |
| 174 |
|
| 175 |
* Nested item 3. |
| 176 |
|
| 177 |
- ``inline literal`` |
| 178 |
- ``inline literal`` |
| 179 |
- ``inline literal`` |
| 180 |
- This item has multiple paragraphs. |
| 181 |
|
| 182 |
This item has multiple paragraphs. |
| 183 |
- This item has multiple paragraphs. |
| 184 |
|
| 185 |
This item has multiple paragraphs. |
| 186 |
|
| 187 |
|
| 188 |
Second list level |
| 189 |
^^^^^^^^^^^^^^^^^ |
| 190 |
|
| 191 |
- here is a list in a second-level section. |
| 192 |
- `yahoo <https://www.yahoo.com/>`_ |
| 193 |
- `yahoo <https://www.yahoo.com/>`_ |
| 194 |
|
| 195 |
- `yahoo <https://www.yahoo.com/>`_ |
| 196 |
- here is an inner bullet ``oh`` |
| 197 |
|
| 198 |
- one more ``with an inline literally``. `yahoo <https://www.yahoo.com/>`_ |
| 199 |
|
| 200 |
heh heh. child. try to beat this embed: |
| 201 |
|
| 202 |
.. literalinclude:: ../../../src/pydata_sphinx_theme/__init__.py |
| 203 |
:language: python |
| 204 |
:linenos: |
| 205 |
:lines: 10-20 |
| 206 |
|
| 207 |
- and another. `yahoo <https://www.yahoo.com/>`_ |
| 208 |
- `yahoo <https://www.yahoo.com/>`_ |
| 209 |
- ``hi`` |
| 210 |
- how about an admonition? |
| 211 |
|
| 212 |
.. note:: |
| 213 |
This is a note nested in a list. |
| 214 |
|
| 215 |
- and hehe |
| 216 |
|
| 217 |
But deeper down the rabbit hole |
| 218 |
""""""""""""""""""""""""""""""" |
| 219 |
|
| 220 |
- I kept saying that, "deeper down the rabbit hole". `yahoo <https://www.yahoo.com/>`_ |
| 221 |
|
| 222 |
- I cackle at night `yahoo <https://www.yahoo.com/>`_. |
| 223 |
- I'm so lonely here in GZ ``guangzhou`` |
| 224 |
- A man of python destiny, hopes and dreams. `yahoo <https://www.yahoo.com/>`_ |
| 225 |
|
| 226 |
- `yahoo <https://www.yahoo.com/>`_ |
| 227 |
|
| 228 |
- `yahoo <https://www.yahoo.com/>`_ ``hi`` |
| 229 |
- ``destiny`` |
| 230 |
|
| 231 |
Hlists |
| 232 |
------ |
| 233 |
|
| 234 |
.. hlist:: |
| 235 |
:columns: 2 |
| 236 |
|
| 237 |
- First item |
| 238 |
- Second item |
| 239 |
- Third item |
| 240 |
- Fourth item |
| 241 |
- Fifth item |
| 242 |
- Sixth item |
| 243 |
|
| 244 |
.. rubric:: Hlist with images |
| 245 |
|
| 246 |
.. hlist:: |
| 247 |
:columns: 2 |
| 248 |
|
| 249 |
- .. figure:: https://picsum.photos/200/200 |
| 250 |
|
| 251 |
This is a short caption for a figure. |
| 252 |
|
| 253 |
- .. figure:: https://picsum.photos/200/200 |
| 254 |
|
| 255 |
This is a long caption for a figure. Lorem ipsum dolor sit amet, consectetur adipiscing elit. |
| 256 |
Donec porttitor dolor in odio posuere, vitae ornare libero mattis. In lobortis justo vestibulum nibh aliquet, non. |
| 257 |
|
| 258 |
Numbered List |
| 259 |
------------- |
| 260 |
|
| 261 |
#. One, |
| 262 |
#. Two. |
| 263 |
#. Three with long text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. |
| 264 |
Sed feugiat sagittis neque quis eleifend. Duis rutrum lectus sit amet mattis suscipit. |
| 265 |
|
| 266 |
- A) Using bullets and letters. (A) |
| 267 |
- B) Using bullets and letters. (B) |
| 268 |
- C) Using bullets and letters. (C) |