| 1 | BEP: 2 |
|---|
| 2 | Title: Sample reStructured Text BEP Template |
|---|
| 3 | Version: $Revision$ |
|---|
| 4 | Last-Modified: $Date$ |
|---|
| 5 | Author: David Harrison <dave@bittorrent.com> |
|---|
| 6 | Status: Active |
|---|
| 7 | Type: Process |
|---|
| 8 | Content-Type: text/x-rst |
|---|
| 9 | Created: 02-Feb-2008 |
|---|
| 10 | Post-History: |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | Abstract |
|---|
| 14 | ======== |
|---|
| 15 | |
|---|
| 16 | This BEP provides a boilerplate or sample template for creating your |
|---|
| 17 | own reStructuredText BEPs. In conjunction with the content guidelines |
|---|
| 18 | in BEP 1 [#BEP-1]_, this should make it easy for you to conform your own |
|---|
| 19 | BEPs to the format outlined below. |
|---|
| 20 | |
|---|
| 21 | Note: if you are reading this BEP via the web, you should first grab |
|---|
| 22 | the text (reStructuredText) source of this BEP in order to complete |
|---|
| 23 | the steps below. **DO NOT USE THE HTML FILE AS YOUR TEMPLATE!** |
|---|
| 24 | |
|---|
| 25 | To get the source this (or any) BEP, look at the top of the HTML page |
|---|
| 26 | and click on the date & time on the "Last-Modified" line. It is a |
|---|
| 27 | link to the source text in the BitTorrent.org subversion repository. |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | Rationale |
|---|
| 31 | ========= |
|---|
| 32 | |
|---|
| 33 | BEP submissions come in a wide variety of forms, not all adhering |
|---|
| 34 | to the format guidelines set forth below. Use this template, in |
|---|
| 35 | conjunction with the format guidelines below, to ensure that your |
|---|
| 36 | BEP submission won't get automatically rejected because of form. |
|---|
| 37 | |
|---|
| 38 | ReStructuredText is offered as an alternative to plaintext BEPs, to |
|---|
| 39 | allow BEP authors more functionality and expressivity, while |
|---|
| 40 | maintaining easy readability in the source text. The processed HTML |
|---|
| 41 | form makes the functionality accessible to readers: live hyperlinks, |
|---|
| 42 | styled text, tables, images, and automatic tables of contents, among |
|---|
| 43 | other advantages. |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | How to Use This Template |
|---|
| 47 | ======================== |
|---|
| 48 | |
|---|
| 49 | To use this template you must first decide whether your BEP is going |
|---|
| 50 | to be an Informational or Standards Track BEP. Most BEPs are |
|---|
| 51 | Standards Track because they propose a new feature for the BitTorrent |
|---|
| 52 | system including the BitTorrent suite of protocols. When in doubt, |
|---|
| 53 | read BEP 1 for details or contact the BEP editors |
|---|
| 54 | <editor@bittorrent.org>. |
|---|
| 55 | |
|---|
| 56 | Once you've decided which type of BEP yours is going to be, follow the |
|---|
| 57 | directions below. |
|---|
| 58 | |
|---|
| 59 | - Make a copy of this file (``.rst`` file, **not** HTML!) and perform |
|---|
| 60 | the following edits. |
|---|
| 61 | |
|---|
| 62 | - Replace the "BEP: 2" header with "BEP: XXX" since you don't yet have |
|---|
| 63 | a BEP number assignment. |
|---|
| 64 | |
|---|
| 65 | - Change the Title header to the title of your BEP. |
|---|
| 66 | |
|---|
| 67 | - Leave the Version and Last-Modified headers alone; we'll take care |
|---|
| 68 | of those when we check your BEP into BitTorrent's Subversion repository. |
|---|
| 69 | These headers consist of keywords ("Revision" and "Date" enclosed in |
|---|
| 70 | "$"-signs) which are automatically expanded by the repository. |
|---|
| 71 | Please do not edit the expanded date or revision text. |
|---|
| 72 | |
|---|
| 73 | - Change the Author header to include your name, and optionally your |
|---|
| 74 | email address. Be sure to follow the format carefully: your name |
|---|
| 75 | must appear first, and it must not be contained in parentheses. |
|---|
| 76 | Your email address may appear second (or it can be omitted) and if |
|---|
| 77 | it appears, it must appear in angle brackets. It is okay to |
|---|
| 78 | obfuscate your email address. |
|---|
| 79 | |
|---|
| 80 | - If there is a mailing list for discussion of your new feature, add a |
|---|
| 81 | Discussions-To header right after the Author header. You should not |
|---|
| 82 | add a Discussions-To header if the mailing list to be used is |
|---|
| 83 | bittorrent-list@bittorrent.org, or if discussions should be sent to |
|---|
| 84 | you directly. Most Informational BEPs don't have a Discussions-To |
|---|
| 85 | header. |
|---|
| 86 | |
|---|
| 87 | - Change the Status header to "Draft". |
|---|
| 88 | |
|---|
| 89 | - For Standards Track BEPs, change the Type header to "Standards |
|---|
| 90 | Track". |
|---|
| 91 | |
|---|
| 92 | - For Informational BEPs, change the Type header to "Informational". |
|---|
| 93 | |
|---|
| 94 | - For Standards Track BEPs, if your feature depends on the acceptance |
|---|
| 95 | of some other currently in-development BEP, add a Requires header |
|---|
| 96 | right after the Type header. The value should be the BEP number of |
|---|
| 97 | the BEP yours depends on. Don't add this header if your dependent |
|---|
| 98 | feature is described in a Final BEP. |
|---|
| 99 | |
|---|
| 100 | - Change the Created header to today's date. Be sure to follow the |
|---|
| 101 | format carefully: it must be in ``dd-mmm-yyyy`` format, where the |
|---|
| 102 | ``mmm`` is the 3 English letter month abbreviation, i.e. one of Jan, |
|---|
| 103 | Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec. |
|---|
| 104 | |
|---|
| 105 | - Leave Post-History alone for now; you'll add dates to this header |
|---|
| 106 | each time you post your BEP to bittorrent-list@bittorrent.org. If |
|---|
| 107 | you posted your BEP to the lists on August 14, 2001 and September 3, |
|---|
| 108 | 2001, the Post-History header would look like:: |
|---|
| 109 | |
|---|
| 110 | Post-History: 14-Aug-2001, 03-Sept-2001 |
|---|
| 111 | |
|---|
| 112 | You must manually add new dates and check them in. If you don't |
|---|
| 113 | have check-in privileges, send your changes to the BEP editors. |
|---|
| 114 | |
|---|
| 115 | - Add a Replaces header if your BEP obsoletes an earlier BEP. The |
|---|
| 116 | value of this header is the number of the BEP that your new BEP is |
|---|
| 117 | replacing. Only add this header if the older BEP is in "final" |
|---|
| 118 | form, i.e. is either Accepted, Final, or Rejected. You aren't |
|---|
| 119 | replacing an older open BEP if you're submitting a competing idea. |
|---|
| 120 | |
|---|
| 121 | - Now write your Abstract, Rationale, and other content for your BEP, |
|---|
| 122 | replacing all this gobbledygook with your own text. Be sure to |
|---|
| 123 | adhere to the format guidelines below, specifically on the |
|---|
| 124 | prohibition of tab characters and the indentation requirements. |
|---|
| 125 | |
|---|
| 126 | - Update your References and Copyright section. Usually you'll place |
|---|
| 127 | your BEP into the public domain, in which case just leave the |
|---|
| 128 | Copyright section alone. Alternatively, you can use the `Open |
|---|
| 129 | Publication License`__, but public domain is still strongly |
|---|
| 130 | preferred. |
|---|
| 131 | |
|---|
| 132 | __ http://www.opencontent.org/openpub/ |
|---|
| 133 | |
|---|
| 134 | - Leave the Emacs stanza at the end of this file alone, including the |
|---|
| 135 | formfeed character ("^L", or ``\f``). |
|---|
| 136 | |
|---|
| 137 | - Send your BEP submission to the BEP editors at editor@bittorrent.org. |
|---|
| 138 | |
|---|
| 139 | |
|---|
| 140 | ReStructuredText BEP Formatting Requirements |
|---|
| 141 | ============================================ |
|---|
| 142 | |
|---|
| 143 | The following is a BEP-specific summary of reStructuredText syntax. |
|---|
| 144 | For the sake of simplicity and brevity, much detail is omitted. For |
|---|
| 145 | more detail, see `Resources`_ below. `Literal blocks`_ (in which no |
|---|
| 146 | markup processing is done) are used for examples throughout, to |
|---|
| 147 | illustrate the plaintext markup. |
|---|
| 148 | |
|---|
| 149 | |
|---|
| 150 | General |
|---|
| 151 | ------- |
|---|
| 152 | |
|---|
| 153 | You must adhere to the Emacs convention of adding two spaces at the |
|---|
| 154 | end of every sentence. |
|---|
| 155 | |
|---|
| 156 | Tab characters must never appear in the document at all. A BEP should |
|---|
| 157 | include the standard Emacs stanza included by example at the bottom of |
|---|
| 158 | this BEP. |
|---|
| 159 | |
|---|
| 160 | |
|---|
| 161 | Section Headings |
|---|
| 162 | ---------------- |
|---|
| 163 | |
|---|
| 164 | BEP headings must begin in column zero and the initial letter of each |
|---|
| 165 | word must be capitalized as in book titles. Acronyms should be in all |
|---|
| 166 | capitals. Section titles must be adorned with an underline, a single |
|---|
| 167 | repeated punctuation character, which begins in column zero and must |
|---|
| 168 | extend at least as far as the right edge of the title text (4 |
|---|
| 169 | characters minimum). First-level section titles are underlined with |
|---|
| 170 | "=" (equals signs), second-level section titles with "-" (hyphens), |
|---|
| 171 | and third-level section titles with "'" (single quotes or |
|---|
| 172 | apostrophes). For example:: |
|---|
| 173 | |
|---|
| 174 | First-Level Title |
|---|
| 175 | ================= |
|---|
| 176 | |
|---|
| 177 | Second-Level Title |
|---|
| 178 | ------------------ |
|---|
| 179 | |
|---|
| 180 | Third-Level Title |
|---|
| 181 | ''''''''''''''''' |
|---|
| 182 | |
|---|
| 183 | If there are more than three levels of sections in your BEP, you may |
|---|
| 184 | insert overline/underline-adorned titles for the first and second |
|---|
| 185 | levels as follows:: |
|---|
| 186 | |
|---|
| 187 | ============================ |
|---|
| 188 | First-Level Title (optional) |
|---|
| 189 | ============================ |
|---|
| 190 | |
|---|
| 191 | ----------------------------- |
|---|
| 192 | Second-Level Title (optional) |
|---|
| 193 | ----------------------------- |
|---|
| 194 | |
|---|
| 195 | Third-Level Title |
|---|
| 196 | ================= |
|---|
| 197 | |
|---|
| 198 | Fourth-Level Title |
|---|
| 199 | ------------------ |
|---|
| 200 | |
|---|
| 201 | Fifth-Level Title |
|---|
| 202 | ''''''''''''''''' |
|---|
| 203 | |
|---|
| 204 | You shouldn't have more than five levels of sections in your BEP. If |
|---|
| 205 | you do, you should consider rewriting it. |
|---|
| 206 | |
|---|
| 207 | You must use two blank lines between the last line of a section's body |
|---|
| 208 | and the next section heading. If a subsection heading immediately |
|---|
| 209 | follows a section heading, a single blank line in-between is |
|---|
| 210 | sufficient. |
|---|
| 211 | |
|---|
| 212 | The body of each section is not normally indented, although some |
|---|
| 213 | constructs do use indentation, as described below. Blank lines are |
|---|
| 214 | used to separate constructs. |
|---|
| 215 | |
|---|
| 216 | |
|---|
| 217 | Paragraphs |
|---|
| 218 | ---------- |
|---|
| 219 | |
|---|
| 220 | Paragraphs are left-aligned text blocks separated by blank lines. |
|---|
| 221 | Paragraphs are not indented unless they are part of an indented |
|---|
| 222 | construct (such as a block quote or a list item). |
|---|
| 223 | |
|---|
| 224 | |
|---|
| 225 | Inline Markup |
|---|
| 226 | ------------- |
|---|
| 227 | |
|---|
| 228 | Portions of text within paragraphs and other text blocks may be |
|---|
| 229 | styled. For example:: |
|---|
| 230 | |
|---|
| 231 | Text may be marked as *emphasized* (single asterisk markup, |
|---|
| 232 | typically shown in italics) or **strongly emphasized** (double |
|---|
| 233 | asterisks, typically boldface). ``Inline literals`` (using double |
|---|
| 234 | backquotes) are typically rendered in a monospaced typeface. No |
|---|
| 235 | further markup recognition is done within the double backquotes, |
|---|
| 236 | so they're safe for any kind of code snippets. |
|---|
| 237 | |
|---|
| 238 | |
|---|
| 239 | Block Quotes |
|---|
| 240 | ------------ |
|---|
| 241 | |
|---|
| 242 | Block quotes consist of indented body elements. For example:: |
|---|
| 243 | |
|---|
| 244 | This is a paragraph. |
|---|
| 245 | |
|---|
| 246 | This is a block quote. |
|---|
| 247 | |
|---|
| 248 | A block quote may contain many paragraphs. |
|---|
| 249 | |
|---|
| 250 | Block quotes are used to quote extended passages from other sources. |
|---|
| 251 | Block quotes may be nested inside other body elements. Use 4 spaces |
|---|
| 252 | per indent level. |
|---|
| 253 | |
|---|
| 254 | |
|---|
| 255 | Literal Blocks |
|---|
| 256 | -------------- |
|---|
| 257 | |
|---|
| 258 | .. |
|---|
| 259 | In the text below, double backquotes are used to denote inline |
|---|
| 260 | literals. "``::``" is written so that the colons will appear in a |
|---|
| 261 | monospaced font; the backquotes (``) are markup, not part of the |
|---|
| 262 | text. See "Inline Markup" above. |
|---|
| 263 | |
|---|
| 264 | By the way, this is a comment, described in "Comments" below. |
|---|
| 265 | |
|---|
| 266 | Literal blocks are used for code samples or preformatted ASCII art. To |
|---|
| 267 | indicate a literal block, preface the indented text block with |
|---|
| 268 | "``::``" (two colons). The literal block continues until the end of |
|---|
| 269 | the indentation. Indent the text block by 4 spaces. For example:: |
|---|
| 270 | |
|---|
| 271 | This is a typical paragraph. A literal block follows. |
|---|
| 272 | |
|---|
| 273 | :: |
|---|
| 274 | |
|---|
| 275 | for a in [5,4,3,2,1]: # this is program code, shown as-is |
|---|
| 276 | print a |
|---|
| 277 | print "it's..." |
|---|
| 278 | # a literal block continues until the indentation ends |
|---|
| 279 | |
|---|
| 280 | The paragraph containing only "``::``" will be completely removed from |
|---|
| 281 | the output; no empty paragraph will remain. "``::``" is also |
|---|
| 282 | recognized at the end of any paragraph. If immediately preceded by |
|---|
| 283 | whitespace, both colons will be removed from the output. When text |
|---|
| 284 | immediately precedes the "``::``", *one* colon will be removed from |
|---|
| 285 | the output, leaving only one colon visible (i.e., "``::``" will be |
|---|
| 286 | replaced by "``:``"). For example, one colon will remain visible |
|---|
| 287 | here:: |
|---|
| 288 | |
|---|
| 289 | Paragraph:: |
|---|
| 290 | |
|---|
| 291 | Literal block |
|---|
| 292 | |
|---|
| 293 | |
|---|
| 294 | Lists |
|---|
| 295 | ----- |
|---|
| 296 | |
|---|
| 297 | Bullet list items begin with one of "-", "*", or "+" (hyphen, |
|---|
| 298 | asterisk, or plus sign), followed by whitespace and the list item |
|---|
| 299 | body. List item bodies must be left-aligned and indented relative to |
|---|
| 300 | the bullet; the text immediately after the bullet determines the |
|---|
| 301 | indentation. For example:: |
|---|
| 302 | |
|---|
| 303 | This paragraph is followed by a list. |
|---|
| 304 | |
|---|
| 305 | * This is the first bullet list item. The blank line above the |
|---|
| 306 | first list item is required; blank lines between list items |
|---|
| 307 | (such as below this paragraph) are optional. |
|---|
| 308 | |
|---|
| 309 | * This is the first paragraph in the second item in the list. |
|---|
| 310 | |
|---|
| 311 | This is the second paragraph in the second item in the list. |
|---|
| 312 | The blank line above this paragraph is required. The left edge |
|---|
| 313 | of this paragraph lines up with the paragraph above, both |
|---|
| 314 | indented relative to the bullet. |
|---|
| 315 | |
|---|
| 316 | - This is a sublist. The bullet lines up with the left edge of |
|---|
| 317 | the text blocks above. A sublist is a new list so requires a |
|---|
| 318 | blank line above and below. |
|---|
| 319 | |
|---|
| 320 | * This is the third item of the main list. |
|---|
| 321 | |
|---|
| 322 | This paragraph is not part of the list. |
|---|
| 323 | |
|---|
| 324 | Enumerated (numbered) list items are similar, but use an enumerator |
|---|
| 325 | instead of a bullet. Enumerators are numbers (1, 2, 3, ...), letters |
|---|
| 326 | (A, B, C, ...; uppercase or lowercase), or Roman numerals (i, ii, iii, |
|---|
| 327 | iv, ...; uppercase or lowercase), formatted with a period suffix |
|---|
| 328 | ("1.", "2."), parentheses ("(1)", "(2)"), or a right-parenthesis |
|---|
| 329 | suffix ("1)", "2)"). For example:: |
|---|
| 330 | |
|---|
| 331 | 1. As with bullet list items, the left edge of paragraphs must |
|---|
| 332 | align. |
|---|
| 333 | |
|---|
| 334 | 2. Each list item may contain multiple paragraphs, sublists, etc. |
|---|
| 335 | |
|---|
| 336 | This is the second paragraph of the second list item. |
|---|
| 337 | |
|---|
| 338 | a) Enumerated lists may be nested. |
|---|
| 339 | b) Blank lines may be omitted between list items. |
|---|
| 340 | |
|---|
| 341 | Definition lists are written like this:: |
|---|
| 342 | |
|---|
| 343 | what |
|---|
| 344 | Definition lists associate a term with a definition. |
|---|
| 345 | |
|---|
| 346 | how |
|---|
| 347 | The term is a one-line phrase, and the definition is one |
|---|
| 348 | or more paragraphs or body elements, indented relative to |
|---|
| 349 | the term. |
|---|
| 350 | |
|---|
| 351 | |
|---|
| 352 | Tables |
|---|
| 353 | ------ |
|---|
| 354 | |
|---|
| 355 | Simple tables are easy and compact but you are not required to use |
|---|
| 356 | simple tables:: |
|---|
| 357 | |
|---|
| 358 | ===== ===== ======= |
|---|
| 359 | A B A and B |
|---|
| 360 | ===== ===== ======= |
|---|
| 361 | False False False |
|---|
| 362 | True False False |
|---|
| 363 | False True False |
|---|
| 364 | True True True |
|---|
| 365 | ===== ===== ======= |
|---|
| 366 | |
|---|
| 367 | There must be at least two columns in a table (to differentiate from |
|---|
| 368 | section titles). Column spans use underlines of hyphens ("Inputs" |
|---|
| 369 | spans the first two columns):: |
|---|
| 370 | |
|---|
| 371 | ===== ===== ====== |
|---|
| 372 | Inputs Output |
|---|
| 373 | ------------ ------ |
|---|
| 374 | A B A or B |
|---|
| 375 | ===== ===== ====== |
|---|
| 376 | False False False |
|---|
| 377 | True False True |
|---|
| 378 | False True True |
|---|
| 379 | True True True |
|---|
| 380 | ===== ===== ====== |
|---|
| 381 | |
|---|
| 382 | Text in a first-column cell starts a new row. No text in the first |
|---|
| 383 | column indicates a continuation line; the rest of the cells may |
|---|
| 384 | consist of multiple lines. For example:: |
|---|
| 385 | |
|---|
| 386 | ===== ========================= |
|---|
| 387 | col 1 col 2 |
|---|
| 388 | ===== ========================= |
|---|
| 389 | 1 Second column of row 1. |
|---|
| 390 | 2 Second column of row 2. |
|---|
| 391 | Second line of paragraph. |
|---|
| 392 | 3 - Second column of row 3. |
|---|
| 393 | |
|---|
| 394 | - Second item in bullet |
|---|
| 395 | list (row 3, column 2). |
|---|
| 396 | ===== ========================= |
|---|
| 397 | |
|---|
| 398 | |
|---|
| 399 | Hyperlinks |
|---|
| 400 | ---------- |
|---|
| 401 | |
|---|
| 402 | When referencing an external web page in the body of a BEP, you should |
|---|
| 403 | include the title of the page in the text, with either an inline |
|---|
| 404 | hyperlink reference to the URL or a footnote reference (see |
|---|
| 405 | `Footnotes`_ below). Do not include the URL in the body text of the |
|---|
| 406 | BEP. |
|---|
| 407 | |
|---|
| 408 | Hyperlink references use backquotes and a trailing underscore to mark |
|---|
| 409 | up the reference text; backquotes are optional if the reference text |
|---|
| 410 | is a single word. For example:: |
|---|
| 411 | |
|---|
| 412 | In this paragraph, we refer to the `BitTorrent web site`_. |
|---|
| 413 | |
|---|
| 414 | An explicit target provides the URL. Put targets in a References |
|---|
| 415 | section at the end of the BEP, or immediately after the reference. |
|---|
| 416 | Hyperlink targets begin with two periods and a space (the "explicit |
|---|
| 417 | markup start"), followed by a leading underscore, the reference text, |
|---|
| 418 | a colon, and the URL (absolute or relative):: |
|---|
| 419 | |
|---|
| 420 | .. _BitTorrent web site: http://www.bittorrent.org/ |
|---|
| 421 | |
|---|
| 422 | The reference text and the target text must match (although the match |
|---|
| 423 | is case-insensitive and ignores differences in whitespace). Note that |
|---|
| 424 | the underscore trails the reference text but precedes the target text. |
|---|
| 425 | If you think of the underscore as a right-pointing arrow, it points |
|---|
| 426 | *away* from the reference and *toward* the target. |
|---|
| 427 | |
|---|
| 428 | The same mechanism can be used for internal references. Every unique |
|---|
| 429 | section title implicitly defines an internal hyperlink target. We can |
|---|
| 430 | make a link to the Abstract section like this:: |
|---|
| 431 | |
|---|
| 432 | Here is a hyperlink reference to the `Abstract`_ section. The |
|---|
| 433 | backquotes are optional since the reference text is a single word; |
|---|
| 434 | we can also just write: Abstract_. |
|---|
| 435 | |
|---|
| 436 | Footnotes containing the URLs from external targets will be generated |
|---|
| 437 | automatically at the end of the References section of the BEP, along |
|---|
| 438 | with footnote references linking the reference text to the footnotes. |
|---|
| 439 | |
|---|
| 440 | Text of the form "BEP x" or "RFC x" (where "x" is a number) will be |
|---|
| 441 | linked automatically to the appropriate URLs. |
|---|
| 442 | |
|---|
| 443 | |
|---|
| 444 | Footnotes |
|---|
| 445 | --------- |
|---|
| 446 | |
|---|
| 447 | Footnote references consist of a left square bracket, a number, a |
|---|
| 448 | right square bracket, and a trailing underscore:: |
|---|
| 449 | |
|---|
| 450 | This sentence ends with a footnote reference [1]_. |
|---|
| 451 | |
|---|
| 452 | Whitespace must precede the footnote reference. Leave a space between |
|---|
| 453 | the footnote reference and the preceding word. |
|---|
| 454 | |
|---|
| 455 | When referring to another BEP, include the BEP number in the body |
|---|
| 456 | text, such as "BEP 1". The title may optionally appear. Add a |
|---|
| 457 | footnote reference following the title. For example:: |
|---|
| 458 | |
|---|
| 459 | Refer to BEP 1 [2]_ for more information. |
|---|
| 460 | |
|---|
| 461 | Add a footnote that includes the BEP's title and author. It may |
|---|
| 462 | optionally include the explicit URL on a separate line, but only in |
|---|
| 463 | the References section. Footnotes begin with ".. " (the explicit |
|---|
| 464 | markup start), followed by the footnote marker (no underscores), |
|---|
| 465 | followed by the footnote body. For example:: |
|---|
| 466 | |
|---|
| 467 | References |
|---|
| 468 | ========== |
|---|
| 469 | |
|---|
| 470 | .. [2] BEP 1, "BEP Purpose and Guidelines", Harrison |
|---|
| 471 | (http://www.bittorrent.org/beps/bep_0001.html) |
|---|
| 472 | |
|---|
| 473 | If you decide to provide an explicit URL for a BEP, please use this as |
|---|
| 474 | the URL template:: |
|---|
| 475 | |
|---|
| 476 | http://www.bittorrent.org/beps/bep_xxxx |
|---|
| 477 | |
|---|
| 478 | BEP numbers in URLs must be padded with zeros from the left, so as to |
|---|
| 479 | be exactly 4 characters wide, however BEP numbers in the text are |
|---|
| 480 | never padded. |
|---|
| 481 | |
|---|
| 482 | During the course of developing your BEP, you may have to add, remove, |
|---|
| 483 | and rearrange footnote references, possibly resulting in mismatched |
|---|
| 484 | references, obsolete footnotes, and confusion. Auto-numbered |
|---|
| 485 | footnotes allow more freedom. Instead of a number, use a label of the |
|---|
| 486 | form "#word", where "word" is a mnemonic consisting of alphanumerics |
|---|
| 487 | plus internal hyphens, underscores, and periods (no whitespace or |
|---|
| 488 | other characters are allowed). For example:: |
|---|
| 489 | |
|---|
| 490 | Refer to BEP 1 [#BEP-1]_ for more information. |
|---|
| 491 | |
|---|
| 492 | References |
|---|
| 493 | ========== |
|---|
| 494 | |
|---|
| 495 | .. [#BEP-1] BEP 1, "BEP Purpose and Guidelines", Harrison |
|---|
| 496 | |
|---|
| 497 | http://www.bittorrent.org/beps/bep-0001 |
|---|
| 498 | |
|---|
| 499 | Footnotes and footnote references will be numbered automatically, and |
|---|
| 500 | the numbers will always match. Once a BEP is finalized, auto-numbered |
|---|
| 501 | labels should be replaced by numbers for simplicity. |
|---|
| 502 | |
|---|
| 503 | |
|---|
| 504 | Images |
|---|
| 505 | ------ |
|---|
| 506 | |
|---|
| 507 | If your BEP contains a diagram, you may include it in the processed |
|---|
| 508 | output using the "image" directive:: |
|---|
| 509 | |
|---|
| 510 | .. image:: diagram.png |
|---|
| 511 | |
|---|
| 512 | Any browser-friendly graphics format is possible: .png, .jpeg, .gif, |
|---|
| 513 | .tiff, etc. |
|---|
| 514 | |
|---|
| 515 | Since this image will not be visible to readers of the BEP in source |
|---|
| 516 | text form, you should consider including a description or ASCII art |
|---|
| 517 | alternative, using a comment (below). |
|---|
| 518 | |
|---|
| 519 | |
|---|
| 520 | Comments |
|---|
| 521 | -------- |
|---|
| 522 | |
|---|
| 523 | A comment block is an indented block of arbitrary text immediately |
|---|
| 524 | following an explicit markup start: two periods and whitespace. Leave |
|---|
| 525 | the ".." on a line by itself to ensure that the comment is not |
|---|
| 526 | misinterpreted as another explicit markup construct. Comments are not |
|---|
| 527 | visible in the processed document. For the benefit of those reading |
|---|
| 528 | your BEP in source form, please consider including a descriptions of |
|---|
| 529 | or ASCII art alternatives to any images you include. For example:: |
|---|
| 530 | |
|---|
| 531 | .. image:: dataflow.png |
|---|
| 532 | |
|---|
| 533 | .. |
|---|
| 534 | Data flows from the input module, through the "black box" |
|---|
| 535 | module, and finally into (and through) the output module. |
|---|
| 536 | |
|---|
| 537 | The Emacs stanza at the bottom of this document is inside a comment. |
|---|
| 538 | |
|---|
| 539 | |
|---|
| 540 | Escaping Mechanism |
|---|
| 541 | ------------------ |
|---|
| 542 | |
|---|
| 543 | reStructuredText uses backslashes ("``\``") to override the special |
|---|
| 544 | meaning given to markup characters and get the literal characters |
|---|
| 545 | themselves. To get a literal backslash, use an escaped backslash |
|---|
| 546 | ("``\\``"). There are two contexts in which backslashes have no |
|---|
| 547 | special meaning: `literal blocks`_ and inline literals (see `Inline |
|---|
| 548 | Markup`_ above). In these contexts, no markup recognition is done, |
|---|
| 549 | and a single backslash represents a literal backslash, without having |
|---|
| 550 | to double up. |
|---|
| 551 | |
|---|
| 552 | If you find that you need to use a backslash in your text, consider |
|---|
| 553 | using inline literals or a literal block instead. |
|---|
| 554 | |
|---|
| 555 | |
|---|
| 556 | Habits to Avoid |
|---|
| 557 | =============== |
|---|
| 558 | |
|---|
| 559 | Many programmers who are familiar with TeX often write quotation marks |
|---|
| 560 | like this:: |
|---|
| 561 | |
|---|
| 562 | `single-quoted' or ``double-quoted'' |
|---|
| 563 | |
|---|
| 564 | Backquotes are significant in reStructuredText, so this practice |
|---|
| 565 | should be avoided. For ordinary text, use ordinary 'single-quotes' or |
|---|
| 566 | "double-quotes". For inline literal text (see `Inline Markup`_ |
|---|
| 567 | above), use double-backquotes:: |
|---|
| 568 | |
|---|
| 569 | ``literal text: in here, anything goes!`` |
|---|
| 570 | |
|---|
| 571 | |
|---|
| 572 | Resources |
|---|
| 573 | ========= |
|---|
| 574 | |
|---|
| 575 | Many other constructs and variations are possible. For more details |
|---|
| 576 | about the reStructuredText markup, in increasing order of |
|---|
| 577 | thoroughness, please see: |
|---|
| 578 | |
|---|
| 579 | * `A ReStructuredText Primer`__, a gentle introduction. |
|---|
| 580 | |
|---|
| 581 | __ http://docutils.sourceforge.net/docs/rst/quickstart.html |
|---|
| 582 | |
|---|
| 583 | * `Quick reStructuredText`__, a users' quick reference. |
|---|
| 584 | |
|---|
| 585 | __ http://docutils.sourceforge.net/docs/rst/quickref.html |
|---|
| 586 | |
|---|
| 587 | * `reStructuredText Markup Specification`__, the final authority. |
|---|
| 588 | |
|---|
| 589 | __ http://docutils.sourceforge.net/spec/rst/reStructuredText.html |
|---|
| 590 | |
|---|
| 591 | The processing of reStructuredText BEPs is done using Docutils_. If |
|---|
| 592 | you have a question or require assistance with reStructuredText or |
|---|
| 593 | Docutils, please `post a message`_ to the `Docutils-users mailing |
|---|
| 594 | list`_. The `Docutils project web site`_ has more information. |
|---|
| 595 | |
|---|
| 596 | .. _Docutils: |
|---|
| 597 | .. _Docutils project web site: http://docutils.sourceforge.net/ |
|---|
| 598 | .. _post a message: |
|---|
| 599 | mailto:docutils-users@lists.sourceforge.net?subject=BEPs |
|---|
| 600 | .. _Docutils-users mailing list: |
|---|
| 601 | http://docutils.sf.net/docs/user/mailing-lists.html#docutils-users |
|---|
| 602 | |
|---|
| 603 | |
|---|
| 604 | This document was derived heavily from PEP-0012 [#PEP-12]_. In many places |
|---|
| 605 | text was simply copied and modified. Although the PEP-0012 text |
|---|
| 606 | was written by David Goodger and Barry Warsaw, they are not |
|---|
| 607 | responsible for its use in the BitTorent Enhancement Process, and |
|---|
| 608 | should not be bothered with technical questions specific to BitTorrent |
|---|
| 609 | or the BEP process. Please direct all comments to the BitTorrent |
|---|
| 610 | editors <editor@bittorrent.org>. |
|---|
| 611 | |
|---|
| 612 | Acknowledgements |
|---|
| 613 | ================ |
|---|
| 614 | |
|---|
| 615 | Thanks to Barry Warsaw, David Goodger, and Guido van Rossum for their |
|---|
| 616 | guidance. |
|---|
| 617 | |
|---|
| 618 | References |
|---|
| 619 | ========== |
|---|
| 620 | |
|---|
| 621 | .. [#BEP-1] BEP_0001. BEP Purpose and Guidelines, Harrison |
|---|
| 622 | (http://www.bittorrent.org/beps/bep_0001.html) |
|---|
| 623 | |
|---|
| 624 | .. [#PEP-12] PEP-0012. Sample reStructuredText PEP Template, Goodger, Warsaw |
|---|
| 625 | (http://www.python.org/peps/pep-0012.html) |
|---|
| 626 | |
|---|
| 627 | |
|---|
| 628 | Copyright |
|---|
| 629 | ========= |
|---|
| 630 | |
|---|
| 631 | This document has been placed in the public domain. |
|---|
| 632 | |
|---|
| 633 | |
|---|
| 634 | |
|---|
| 635 | .. |
|---|
| 636 | Local Variables: |
|---|
| 637 | mode: indented-text |
|---|
| 638 | indent-tabs-mode: nil |
|---|
| 639 | sentence-end-double-space: t |
|---|
| 640 | fill-column: 70 |
|---|
| 641 | coding: utf-8 |
|---|
| 642 | End: |
|---|