doc/-syntax-inline.md
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# Inline Formatting The following table lists all the most common ways to format inline text: > %responsive% > Source | Output > ----------------------------------------------------|-------------------- > `**strong emphasis**` or `__strong emphasis__` | __strong emphasis__ > `*emphasis*` or `_emphasis_` | *emphasis* > `~~deleted text~~` | ~~deleted text~~ > `<ins>inserted text<ins>` | <ins>inserted text</ins> > ```code` `` | `code` > `[HTML](abbr:Hypertext Markup Language)` | [HTML](abbr:Hypertext Markup Language) > `<kbd>CTRL</kbd>+<kbd>C</kbd>` | <kbd>CTRL</kbd>+<kbd>C</kbd> > `<mark>marked</mark>` | <mark>marked</mark>. > `Sample output: <samp>This is a test.</samp>` | Sample output: <samp>This is a test.</samp> > `Set the variable <var>test</var> to 1.` | Set the variable <var>test</var> to 1. > `<q>This is a short quotation</q>` | <q>This is a short quotation</q> > `<cite>Hamlet</cite>, by William Shakespeare.` | <cite>Hamlet</cite>, by William Shakespeare. > `A [.md](class:ext) file` | A [.md](class:ext) file > `[my_markdown_file.md](class:file) file` | [my_markdown_file.md](class:file) file > %tip% > Tip > > The [kwd](class:kwd), [opt](class:kwd), [file](class:kwd), [dir](class:kwd), [arg](class:kwd), [tt](class:kwd) and [cmd](class:kwd) classes are all rendered as inline monospace text. [kwd](class:kwd) and [ext](class:ext) are also rendered in bold. ## SmartyPants Substitutions Special characters can be easily entered using some special character sequences. {{hs}} supports all the sequences supported by [Discount][discount]: * <code>`` text‘’</code> → “text”. * `"double-quoted text"` → “double-quoted text” * `'single-quoted text'` → ‘single-quoted text’ * `don't` → don’t. as well as anything-else’t. (But foo'tbar is just foo'tbar.) * `it's` → it’s, as well as anything-else’s (except not foo'sbar and the like.) * `(tm)` → ™ * `(r)` → ® * `(c)` → © * `1/4th` → 1/4th. Same goes for 1/2 and 3/4. * `...` or `. . .` → … * `---` → — * `--` → – * `A^B` becomes A^B. Complex superscripts can be enclosed in brackets, so `A^(B+2)` → A^(B+2). ## Icons {{hs}} bundles the [FontAwesome][fa] icon font. To prepend an icon to text you can use Discount's _class:_ pseudo-protocol, and specify a valid [fa-*](class:kwd) (non-alias) class. Examples: > %responsive% > Source | Output > -----------------------------------------|------------ > `[a paper plane](class:fa-paper-plane)` | [ a paper plane](class:fa-paper-plane) > `[Galactic Empire](class:fa-empire)` | [ Galactic Empire](class:fa-empire) > `[Rebel Alliance](class:fa-rebel)` | [ Rebel Alliance](class:fa-rebel) > %tip% > Tip > > See the [FontAwesome Icon Reference][fa-icons] for a complete list of all CSS classes to use for icons (aliases are not supported). ## Badges Badges are normally just shorthands for [Icons](#Icons) formatted with different colors. To add a _badge_ to some inline text, use the corresponding class among those listed in the following table. For example, the following code: [Genoa, Italy](class:geo) produces the following result: [Genoa, Italy](class:geo) {{hs}} currently supports the following badges: > %responsive% > Class | Badge | Class | Badge > ---------------------|------------------------------|-------------------------------------------- > `todo` | [](class:todo) |`user` | [](class:user) > `fixme` | [](class:fixme) |`tag` | [](class:tag) > `deadline` | [](class:deadline) |`tags` | [](class:tags) > `draftcomment` | [](class:draftcomment) |`attachment` | [](class:attachment) > `urgent` | [](class:urgent) |`bug` | [](class:bug) > `verify` | [](class:verify) |`geo` | [](class:geo) > `project` | [](class:project) |`eur` | [](class:eur) > `red-circle` | [](class:red-circle) |`gbp` | [](class:gbp) > `yellow-circle` | [](class:yellow-circle) |`usd` | [](class:usd) > `green-circle` | [](class:green-circle) |`rub` | [](class:rub) > `gray-circle` | [](class:gray-circle) |`jpy` | [](class:jpy) > `star` | [](class:star) |`btc` | [](class:btc) > `heart` | [](class:heart) |`try` | [](class:try) > `square` | [](class:square) |`krw` | [](class:krw) > `check` | [](class:check) |`inr` | [](class:inr) > `lock` | [](class:lock) |`danger` | [](class:danger) > `unlock` | [](class:unlock) |`question` | [](class:question) > `email` | [](class:email) |`website` | [](class:website) > `phone` | [](class:phone) |`fax` | [](class:fax) > `tm` | [](class:tm) |`reg` | [](class:reg) > `copy` | [](class:copy) |`red-flag` | [](class:red-flag) > `green-flag` | [](class:green-flag) |`yellow-flag` | [](class:yellow-flag) > `story` | [](class:story) |`feature` | [](class:feature) > `add` | [](class:add) |`remove` | [](class:remove) > `time` | [](class:time) |`date` | [](class:date) > `html5` | [](class:html5) |`css3` | [](class:css3) > `apple` | [](class:apple) |`windows` | [](class:windows) > `linux` | [](class:linux) |`android` | [](class:android) > `idea` | [](class:idea) |`link` | [](class:link) > `chrome` | [](class:chrome) |`firefox` | [](class:firefox) > `ie` | [](class:ie) |`edge` | [](class:edge) > `safari` | [](class:safari) |`opera` | [](class:opera) > `sticky` | [](class:sticky) |`bluetooth` | [](class:bluetooth) > `wifi` | [](class:wifi) |`signal` | [](class:signal) > `usb` | [](class:usb) |`print` | [](class:print) ## HastyScribe Logo To display the {{hs}} logo, use the [hastyscribe](class:kwd) class, like this: `[](class:hastyscribe)` → [](class:hastyscribe) ## Links > %responsive% > Source | Output > ----------------------------------------|------------ > `[H3RALD](https://h3rald.com/)` | [H3RALD](https://h3rald.com/) > `[H3RALD](https://h3rald.com/ "H3RALD")`| [H3RALD](https://h3rald.com/ "H3RALD") > `<https://h3rald.com>` | <https://h3rald.com> Additionally, you can define placeholders for URLs and link titles, like this: `[h3rald]: https://h3rald.com/ "Fabio Cevasco's Web Site"` And use them in hyperlinks (note the usage of square brackets instead of round brackets): `[H3RALD][h3rald]` > %sidebar% > Link Icons > > {{hs}} automatically adds an envelope icon to email links, an arrow icon to links to external web sites, and logo icons to links to well-known web sites: > > * [h3rald@h3rad.com](mailto:h3rald@h3rald.com) > * [@h3rald](https://twitter.com/h3rald) > * [fabiocevasco](http://it.linkedin.com/in/fabiocevasco) |