A place to cache linked articles (think custom and personal wayback machine)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  1. <!doctype html><!-- This is a valid HTML5 document. -->
  2. <!-- Screen readers, SEO, extensions and so on. -->
  3. <html lang="fr">
  4. <!-- Has to be within the first 1024 bytes, hence before the `title` element
  5. See: https://www.w3.org/TR/2012/CR-html5-20121217/document-metadata.html#charset -->
  6. <meta charset="utf-8">
  7. <!-- Why no `X-UA-Compatible` meta: https://stackoverflow.com/a/6771584 -->
  8. <!-- The viewport meta is quite crowded and we are responsible for that.
  9. See: https://codepen.io/tigt/post/meta-viewport-for-2015 -->
  10. <meta name="viewport" content="width=device-width,initial-scale=1">
  11. <!-- Required to make a valid HTML5 document. -->
  12. <title>Basics, Tips and Tricks on how to use Markdown (archive) — David Larlet</title>
  13. <meta name="description" content="Publication mise en cache pour en conserver une trace.">
  14. <!-- That good ol' feed, subscribe :). -->
  15. <link rel="alternate" type="application/atom+xml" title="Feed" href="/david/log/">
  16. <!-- Generated from https://realfavicongenerator.net/ such a mess. -->
  17. <link rel="apple-touch-icon" sizes="180x180" href="/static/david/icons2/apple-touch-icon.png">
  18. <link rel="icon" type="image/png" sizes="32x32" href="/static/david/icons2/favicon-32x32.png">
  19. <link rel="icon" type="image/png" sizes="16x16" href="/static/david/icons2/favicon-16x16.png">
  20. <link rel="manifest" href="/static/david/icons2/site.webmanifest">
  21. <link rel="mask-icon" href="/static/david/icons2/safari-pinned-tab.svg" color="#07486c">
  22. <link rel="shortcut icon" href="/static/david/icons2/favicon.ico">
  23. <meta name="msapplication-TileColor" content="#f7f7f7">
  24. <meta name="msapplication-config" content="/static/david/icons2/browserconfig.xml">
  25. <meta name="theme-color" content="#f7f7f7" media="(prefers-color-scheme: light)">
  26. <meta name="theme-color" content="#272727" media="(prefers-color-scheme: dark)">
  27. <!-- Is that even respected? Retrospectively? What a shAItshow…
  28. https://neil-clarke.com/block-the-bots-that-feed-ai-models-by-scraping-your-website/ -->
  29. <meta name="robots" content="noai, noimageai">
  30. <!-- Documented, feel free to shoot an email. -->
  31. <link rel="stylesheet" href="/static/david/css/style_2021-01-20.css">
  32. <!-- See https://www.zachleat.com/web/comprehensive-webfonts/ for the trade-off. -->
  33. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  34. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  35. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  36. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  37. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  38. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  39. <script>
  40. function toggleTheme(themeName) {
  41. document.documentElement.classList.toggle(
  42. 'forced-dark',
  43. themeName === 'dark'
  44. )
  45. document.documentElement.classList.toggle(
  46. 'forced-light',
  47. themeName === 'light'
  48. )
  49. }
  50. const selectedTheme = localStorage.getItem('theme')
  51. if (selectedTheme !== 'undefined') {
  52. toggleTheme(selectedTheme)
  53. }
  54. </script>
  55. <meta name="robots" content="noindex, nofollow">
  56. <meta content="origin-when-cross-origin" name="referrer">
  57. <!-- Canonical URL for SEO purposes -->
  58. <link rel="canonical" href="https://ia.net/writer/support/basics/markdown-guide">
  59. <body class="remarkdown h1-underline h2-underline h3-underline em-underscore hr-center ul-star pre-tick" data-instant-intensity="viewport-all">
  60. <article>
  61. <header>
  62. <h1>Basics, Tips and Tricks on how to use Markdown</h1>
  63. </header>
  64. <nav>
  65. <p class="center">
  66. <a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
  67. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-home"></use>
  68. </svg> Accueil</a> •
  69. <a href="https://ia.net/writer/support/basics/markdown-guide" title="Lien vers le contenu original">Source originale</a>
  70. </p>
  71. </nav>
  72. <hr>
  73. <p>Our apps use Markdown formatting. This lets you apply basic formatting by adding a few punctuation characters. You can also use the formatting buttons in the bottom bar of your text window on OS X or the formatting keys in the Keyboard Bar of iA Writer for iOS.</p>
  74. <h2 id="basics">Basics</h2>
  75. <p>If you are not familiar with Markdown, it might look a little scary at first. Once you get the basics, you will quickly love it as it allows you to format your text without taking your hands off the keyboard. iA Writer’s Auto-Markdown will give you instant feedback if you got the formatting right or not.</p>
  76. <h3 id="headings">Headings</h3>
  77. <p>You can use up to up to six levels by writing # at the start of a line; the number of hashtags defines the hierarchy of the heading.</p>
  78. <pre><code># First level heading
  79. ## Second level heading
  80. ### Third level heading
  81. </code></pre>
  82. <h3>Emphasis and Importance</h3>
  83. <p>Emphasis (“italics”) and important (“bold”) are written by putting * or _ around the text you want to see in a different format.</p>
  84. <ul>
  85. <li>Emphasis: <code>*example*</code> or <code>_example_</code> (<code>⌘I</code>)</li>
  86. <li>Importance: <code>**example**</code> or <code>__example__</code> (<code>⌘B</code>)</li>
  87. <li>Emphasis + Importance <code>***example***</code> or <code>___example___</code></li>
  88. </ul>
  89. <h3>Strikethrough</h3>
  90. <p>You can use double tildes to make <del>strikethrough</del> text:</p>
  91. <pre><code>~~strikethrough~~</code></pre>
  92. <h3>Highlight</h3>
  93. <p>You can use double equals signs to <mark>highlight</mark> text:</p>
  94. <pre><code>==highlight==</code></pre>
  95. <h3 id="lists">Numbered Lists</h3>
  96. <p>Type <code>1.</code> then a space. Any number (followed by a full stop and space) can be used and the list items will be ordered from 1 when exported.</p>
  97. <pre><code>1. Ordered list item
  98. 2. Ordered list item
  99. 3. Ordered list item
  100. </code></pre>
  101. <h3>Bulleted Lists</h3>
  102. <p>Type <code>*</code>, <code>-</code> or <code>+</code> then a space. Create a bulleted list by using an asterisk (*), hyphen (-), or plus sign (+), followed by a space.</p>
  103. <pre><code>* Bulleted list item
  104. * Bulleted list item
  105. * Bulleted list item
  106. </code></pre>
  107. <h3 id="task-lists">Task Lists</h3>
  108. <p>Type <code>-[ ]</code> or <code>1.[ ]</code> then a space. Adding an <code>x</code> between the square brackets will tick off a task list item in the Preview. iA Writer for Mac and iOS also support clicking or tapping the list item marker to toggle it.</p>
  109. <pre><code>- [ ] Unfinished task list item
  110. - [x] Finished task list item
  111. </code></pre>
  112. <h3>Nesting Lists</h3>
  113. <p>You can nest lists several levels deep, and combine them:</p>
  114. <pre><code>* First level
  115. * Second level
  116. 1. First level
  117. 1. Second level
  118. * First level unordered list item
  119. 1. Second level ordered list item
  120. </code></pre>
  121. <p>Nested list items are indented with four spaces or a tab. iA Writer for iOS includes keys to indent and outdent list items. They can be found by tapping the <code>⌘</code> button in the keyboard bar.</p>
  122. <h3>Blockquotes</h3>
  123. <p>Type <code>&gt;</code> plus a space (just like email):</p>
  124. <pre><code>&gt; A quoted paragraph
  125. &gt;&gt; A quoted paragraph inside a quotation
  126. </code></pre>
  127. <p>iA Writer 5 offers a keyboard shortcut for blockquotes: <code>⌘</code>+<code>&gt;</code> These also now autocomplete in the same manner as lists.</p>
  128. <h2 id="advanced">Advanced</h2>
  129. <h3 id="links">Links</h3>
  130. <p>Create a link by surrounding the link text in square brackets, followed immediately by the URL in parentheses:</p>
  131. <pre><code>[text to link](http://example.com/)
  132. </code></pre>
  133. <p>You can also use reference links. Add the reference in square brackets after the text to link. Then, on a line by itself add the reference with a colon, space, and the URL:</p>
  134. <pre><code>[text to link][ref]
  135. [ref]: http://example.com/
  136. </code></pre>
  137. <h3 id="cross-references">Cross-References</h3>
  138. <p><strong>iA Writer for iOS, iPadOS and macOS</strong> support cross-references using the following syntax: </p>
  139. <pre><code># My Level 1 Header
  140. Some text and a link to [My Level 1 Header][].
  141. </code></pre>
  142. <p>In a document where <code># My Level 1 Header</code> exists. </p>
  143. <p>You can also use the following syntax: </p>
  144. <pre><code># My Level 1 Header
  145. Click here to [jump to section][My Level 1 Header]
  146. </code></pre>
  147. <p>You can define the label for a specific header by adding a space and <code>[Label]</code> following the header: </p>
  148. <pre><code># My Level 1 Header [My Label]
  149. </code></pre>
  150. <p>This can be referenced by: </p>
  151. <pre><code>Here is a link to [My Label][].
  152. or
  153. Click here to [jump to section][My Label].
  154. </code></pre>
  155. <p><strong>iA Writer for Windows</strong> supports cross-referencing headers using the following syntax: </p>
  156. <pre><code># Header
  157. [link text][Header]
  158. </code></pre>
  159. <p>You can use this like so:</p>
  160. <pre><code># My Level 1 Header
  161. Click here to [jump to section][My Level 1 Header].
  162. </code></pre>
  163. <h3 id="images">Images</h3>
  164. <p>Both local and web URLs are supported. Markdown uses the following syntax for images:</p>
  165. <pre><code>![](http://example.com/image.jpg)
  166. ![](./image.jpg)
  167. </code></pre>
  168. <p>When using local images, they must be in a folder added as a Library location. This gives iA Writer permission to use the file. Folders can be added as Locations by clicking the + beside the label in the Organizer on Mac, or by dragging them from Finder into the Location section. iOS supports images from any location except From Other Apps. To add a Location, tap <samp>Edit</samp> and then <samp>Add Location…</samp></p>
  169. <p><strong>Note:</strong> Markdown image syntax and HTML image filename rules are different from Content Blocks. When using Markdown syntax, spaces must be encoded as <code>%20</code>, and the leading slash must be omitted because it refers to the root directory of a device.</p>
  170. <h3 id="code">Code</h3>
  171. <p>You can mark up code in-line using backticks (<code>code</code>), or add a code block by adding at least four spaces to the start of a line:</p>
  172. <pre><code> This is a code block
  173. </code></pre>
  174. <p>In iA Writer, it’s also possible to start a code block with a tab, as long as the text doesn’t start with list, header or blockquote syntax characters (<code>1.</code>, <code>*</code>, <code>-</code>, <code>+</code>, <code>#</code>, <code>&gt;</code>).</p>
  175. <p>In addition, you can use Fenced code blocks, which begin and end with triple backticks, and don’t need indenting. <em>Note that inline formatting (like <code>_underscores_</code>) is ignored in code.</em></p>
  176. <pre><code>```
  177. This is a fenced code block
  178. ```
  179. </code></pre>
  180. <p>Add a footnote in square brackets preceded by a caret. Then add the footnote content like a reference link, for example:</p>
  181. <pre><code>Some text with a footnote[^1].
  182. [^1]: The linked footnote appears at the end of the document.
  183. </code></pre>
  184. <p>On Mac and iOS you can also add an inline footnote in the following manner:</p>
  185. <pre><code>Some text with a footnote[^This is the footnote itself.].
  186. </code></pre>
  187. <p>Note: Markdown was designed for web where there is no concept of pagination. As such footnotes are essentially endnotes. When rendered, these are placed at the end of the document.</p>
  188. <h3 id="toc">Table of Contents</h3>
  189. <p>Generating a table of content is as easy as it gets. Just add <code>{{TOC}}</code> wherever you want the table of content to appear and iA Writer generates it from the Headlines you use in your text. There is a custom key for it on iOS.</p>
  190. <p>On Mac you can add it via the toolbar or the Format Menu. The TOC will become visible and clickable in preview.</p>
  191. <h3 id="tables">Tables</h3>
  192. <p>To make a table, use vertical bar characters to denote cells. Start with column headers, separate with a row of cells with hyphens, then add further rows of cells. For example:</p>
  193. <pre><code>|Header |Column 1 | Column 2 | Column 3 |
  194. |:--- |:---- |:----:| ----:|
  195. |1. Row| is | is | is |
  196. |2. Row| left | nicely | right |
  197. |3. Row| aligned | centered | aligned |
  198. </code></pre>
  199. <p>Let’s be real. This is a mess. Markdown tables look more reasonable than HTML-Tables, but they are the weak point of Markdown. That being said, they still translate nicely when rendered:</p>
  200. <p><img decoding="async" src="/wp-content/uploads/2023/05/mdtable.png" alt></p>
  201. <p>iA Writer includes a menu option to automatically generate the cells for a table.</p>
  202. <p>There is a trick though you can use when writing Markdown tables with a monospaced font. You can feign the correct column width by adding space characters to align the table:</p>
  203. <p><img decoding="async" title="table.png" src="/wp-content/uploads/migration/table.png" alt="table.png"></p>
  204. <p> In Writer for Windows you can clean up a Markdown table by selecting the whole table and using <samp>Format</samp> → <samp>Table</samp> → <samp>Reformat</samp>.</p>
  205. <p><em>Note: If you find your table does not render correctly in Preview, please ensure Smart Dashes are turned off in <samp>Edit</samp> → <samp>Substitutions</samp>.</em></p>
  206. <h3>Separating Paragraphs</h3>
  207. <p>A line starting with a tab indicates a block of code. Because of this it is currently not possible to use a return-plus-tab to indicate a new paragraph in Writer. Instead, please use two returns to separate paragraphs.</p>
  208. <h3>Line Breaks</h3>
  209. <p>From the Markdown specification:</p>
  210. <blockquote>When you do want to insert a <code>&lt;br /&gt;</code> break tag using Markdown, you end a line with two or more spaces, then type return.</blockquote>
  211. <p>iA Writer also allows you to insert a <code>&lt;br /&gt;</code> into a paragraph by using Shift+Enter. This will add the spaces required at the end of the line for you.</p>
  212. <h3>Horizontal Rules</h3>
  213. <p>You can add a thematic break which will be represented by a dividing line (<code>&lt;hr&gt;</code>) when exported to HTML. To do so, add three or more asterisks (<code>*</code>), hyphens (<code>-</code>), or underscores (<code>_</code>) on a line by themselves, optionally separated with spaces. For example:</p>
  214. <pre><code>* * *
  215. </code></pre>
  216. <p>or</p>
  217. <pre><code>-------------
  218. </code></pre>
  219. <h3>Page Breaks</h3>
  220. <p>Sometimes your document doesn’t flow exactly how you want it when printing or exporting to PDF. You can force a page break in iA Writer using three plus marks (<code>+</code>) on a line by themselves:</p>
  221. <pre><code>+++
  222. </code></pre>
  223. <p><em>Note: Manual page breaks are currently unavailable in iA Writer for Android.</em></p>
  224. <p>Markdown doesn’t have an official syntax for comments. So we don’t try to make a bespoke one that will only render correctly in iA Writer.</p>
  225. <p>Since HTML is completely valid in Markdown, you can use HTML comments instead:</p>
  226. <pre><code>&lt;!-- This is a comment --&gt;</code></pre>
  227. <h3>“Escaping” Formatting Characters</h3>
  228. <p>If you want to type a formatting character and have Writer treat it as text not formatting, type a backslash first <code>\</code>. This means <code>\*</code> gives <code>*</code>, <code>\_</code> gives <code>_</code> etc. Escaping isn’t needed in code blocks.</p>
  229. <h3 id="math">Math</h3>
  230. <p>iA Writer supports TeX math expressions on Mac and iOS. These are easy to write in plain text and then formatted beautifully in the Preview.
  231. For inline expressions, use <code>$</code> or <code>\\(</code> and <code>\\)</code>:</p>
  232. <pre><code>An example of math within a paragraph --- \\({e}^{i\pi }+1=0\\)
  233. Or use dollar signs instead --- ${e}^{i\pi }+1=0$
  234. </code></pre>
  235. <p>For block format expressions, use <code>$$</code> or <code>\\[</code> and <code>\\]</code>:</p>
  236. <pre><code>To show an expression by itself:
  237. \\[ {x}_{1,2}=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a} \\]
  238. or:
  239. $${x}_{1,2}=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a}$$
  240. </code></pre>
  241. <p>If using the dollar sign syntax, there must be no space between the <code>$</code> and the contents of the expression and there must be space on the outside.</p>
  242. <p>iA Writer supports metadata at the beginning of documents. You can use it store important information about your documents, hidden from Preview. Metadata must be separated from the rest of the document by three dashes:</p>
  243. <p>You can use metadata to build correspondence Templates.</p>
  244. <p><img decoding="async" class="support-box-shadow" src="https://ia.net/wp-content/uploads/2020/05/bluth.png" alt></p>
  245. <p>You can do this with two easy steps. First you define your metadata at the very top of your document, followed by an empty line. Let’s write “The Cat sat on the Mat” with metadata. Write:</p>
  246. <pre><code>---
  247. Animal: Cat
  248. Thing: Mat
  249. ---
  250. </code></pre>
  251. <p>You can use the metadata in the text by putting it in brackets adding a % sign. Write:</p>
  252. <pre><code>The [%Animal] sat on the [%Thing].
  253. </code></pre>
  254. <p>The whole document should now look like this:</p>
  255. <pre><code>---
  256. Animal: Cat
  257. Thing: Mat
  258. ---
  259. The [%Animal] sat on the [%Thing].
  260. </code></pre>
  261. <p>If you open Preview and compare the raw text and the rendered Markdown you will see this:</p>
  262. <p><img decoding="async" class="support-box-shadow" src="https://ia.net/wp-content/uploads/2020/05/cat.png" alt></p>
  263. <h2 id="smart-automation">Smart Automation</h2>
  264. <p>Peppered throughout iA Writer’s documentation and settings you will see references to various “Smart” features. As a rule, these provide some form of automatic text completion or transformation so you can keep focused on writing instead of dealing with minutiae.</p>
  265. <h3>Smart Lists</h3>
  266. <p>Once you begin writing a list in iA Writer, a bullet/list marker of the same type will be created automatically when you hit return. Hitting return twice in a row removes the empty list item and exits the list so no further items will be created.</p>
  267. <p>Blockquotes in iA Writer 5 now behave the same way.</p>
  268. <h3>Smart Substitutions in the Editor</h3>
  269. <p>These options are found in <samp>Preferences</samp> → <samp>Editor</samp> → <samp>Smart substitions</samp> on Mac and <samp>Settings</samp> → <samp>Editor</samp> → <samp>Text Input</samp> on iOS.</p>
  270. <p>When <samp>Smart Copy/Paste</samp> is turned on, spaces are added around content pasted into the Editor automatically.</p>
  271. <p>When activated, <samp>Smart Quotes</samp> will automatically replace any straight quotes written in the Editor with curly quotes, as you write. <samp>Smart Dashes</samp> works in a similar way, substituting a dash in the Editor whenever two hyphens are written consecutively.</p>
  272. <h3>Smart Punctuation (Markdown)</h3>
  273. <p>This option is found in <samp>Preferences</samp> → <samp>Templates</samp> → <samp>Markdown processing</samp> on Mac and <samp>Settings</samp> → <samp>Templates</samp> → <samp>Markdown processing</samp> on iOS.</p>
  274. <p>When turned on, it will convert straight quotes and doubled hyphens in the typed in the Editor into curly quotes and dashes in the Preview, respectively.</p>
  275. <p>Using this option will <em>not</em> affect text in the Editor, it only makes the change in the Preview as the Markdown is processed.</p>
  276. <h3>Smart Tables</h3>
  277. <p>New in iA Writer for Mac and iOS, you can use the syntax <code>=(…)</code> to perform mathematical calculations in your tables.</p>
  278. <ul>
  279. <li>You can also reference other cells in these calculations</li>
  280. <li>Cell IDs start at A0 from the top-left, like in spreadsheets</li>
  281. <li>Calculations are handled by <a href="http://mathjs.org/" rel="nofollow noopener" target="_blank">math.js</a></li>
  282. </ul>
  283. <table><colgroup> <col> <col> </colgroup>
  284. <thead>
  285. <tr>
  286. <th>Editor Input</th>
  287. <th>Preview Output</th>
  288. </tr>
  289. </thead>
  290. <tbody>
  291. <tr>
  292. <td><code>1</code></td>
  293. <td>1</td>
  294. </tr>
  295. <tr>
  296. <td><code>=(2 + 2)</code></td>
  297. <td>4</td>
  298. </tr>
  299. <tr>
  300. <td><code>=(51 / 3)</code></td>
  301. <td>17</td>
  302. </tr>
  303. <tr>
  304. <td><code>=(B1 + B3)</code></td>
  305. <td>18</td>
  306. </tr>
  307. <tr>
  308. <td><code>=(TOTAL)</code></td>
  309. <td>40</td>
  310. </tr>
  311. </tbody>
  312. </table>
  313. <p>N.B. To avoid formatting and calculation errors in Smart Tables, please use spaces on either side of arithmetic operators (<code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>).</p>
  314. <p>Additionally, you can make use of metadata variables:</p>
  315. <pre><code>---
  316. Var: 1
  317. ---</code></pre>
  318. <table><colgroup> <col> <col> </colgroup>
  319. <thead>
  320. <tr>
  321. <th><strong>Editor Input</strong></th>
  322. <th><strong>Preview Output</strong></th>
  323. </tr>
  324. </thead>
  325. <tbody>
  326. <tr>
  327. <td><code>=([%Var] + 0)</code></td>
  328. <td>1</td>
  329. </tr>
  330. <tr>
  331. <td><code>=([%Var] + 1)</code></td>
  332. <td>2</td>
  333. </tr>
  334. <tr>
  335. <td><code>=([%Var] + 2)</code></td>
  336. <td>3</td>
  337. </tr>
  338. </tbody>
  339. </table>
  340. <p>You can also perform unit conversion:</p>
  341. <table><colgroup> <col> <col> </colgroup>
  342. <thead>
  343. <tr>
  344. <th><strong>Editor Input</strong></th>
  345. <th><strong>Preview Output</strong></th>
  346. </tr>
  347. </thead>
  348. <tbody>
  349. <tr>
  350. <td><code>=(25 m/s to km/h)</code></td>
  351. <td>90 km / h</td>
  352. </tr>
  353. <tr>
  354. <td><code>=(2.2046226218487757 lbs to kg)</code></td>
  355. <td>1 kg</td>
  356. </tr>
  357. <tr>
  358. <td><code>=(460 V * 20 A * 30 days to kWh)</code></td>
  359. <td>6624 kWh</td>
  360. </tr>
  361. </tbody>
  362. </table>
  363. <h2 id="preview">Preview</h2>
  364. <p>Writer apps use Markdown formatting, so you can format your text just by typing. It’s familiar, and it’s also subtly formatted on-screen using Auto Markdown:</p>
  365. <p><img decoding="async" src="/wp-content/uploads/migration/editor.png"></p>
  366. <p>Writer also provides a formatted preview of your document:</p>
  367. <h5>iA Writer for Mac</h5>
  368. <p>Choose <samp>View</samp> → <samp>Show Preview</samp> or <kbd>⌘</kbd><kbd>R</kbd> or swipe to the left</p>
  369. <h5>iA Writer for iPad and iPhone</h5>
  370. <p>Tap the Preview button at the top right</p>
  371. <h5>iA Writer for Windows</h5>
  372. <p>Choose <samp>View</samp> → <samp>Preview</samp> or <kbd>ctrl</kbd><kbd>R</kbd></p>
  373. <h5>iA Writer for Android</h5>
  374. <p>Tap <span><samp>⋮</samp></span> → <samp>Preview</samp> or swipe to the left</p>
  375. <h2 id="exporting">Exporting</h2>
  376. <p>iA Writer supports exporting as plain text, HTML, Microsoft Word 2007 (.docx), and PDF via <samp>File</samp> → <samp>Export</samp>.</p>
  377. <p>You can also export as PDF on Mac via either:
  378. <samp>File</samp> → <samp>Print</samp> → <samp>PDF</samp>
  379. <samp>File</samp> → <samp>Print Plain Text</samp> → <samp>PDF</samp></p>
  380. <p>Finally, you can copy formatted text from Writer’s Preview to paste into other programs.</p>
  381. </article>
  382. <hr>
  383. <footer>
  384. <p>
  385. <a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
  386. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-home"></use>
  387. </svg> Accueil</a> •
  388. <a href="/david/log/" title="Accès au flux RSS"><svg class="icon icon-rss2">
  389. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-rss2"></use>
  390. </svg> Suivre</a> •
  391. <a href="http://larlet.com" title="Go to my English profile" data-instant><svg class="icon icon-user-tie">
  392. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-user-tie"></use>
  393. </svg> Pro</a> •
  394. <a href="mailto:david%40larlet.fr" title="Envoyer un courriel"><svg class="icon icon-mail">
  395. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-mail"></use>
  396. </svg> Email</a> •
  397. <abbr class="nowrap" title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340"><svg class="icon icon-hammer2">
  398. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-hammer2"></use>
  399. </svg> Légal</abbr>
  400. </p>
  401. <template id="theme-selector">
  402. <form>
  403. <fieldset>
  404. <legend><svg class="icon icon-brightness-contrast">
  405. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-brightness-contrast"></use>
  406. </svg> Thème</legend>
  407. <label>
  408. <input type="radio" value="auto" name="chosen-color-scheme" checked> Auto
  409. </label>
  410. <label>
  411. <input type="radio" value="dark" name="chosen-color-scheme"> Foncé
  412. </label>
  413. <label>
  414. <input type="radio" value="light" name="chosen-color-scheme"> Clair
  415. </label>
  416. </fieldset>
  417. </form>
  418. </template>
  419. </footer>
  420. <script src="/static/david/js/instantpage-5.1.0.min.js" type="module"></script>
  421. <script>
  422. function loadThemeForm(templateName) {
  423. const themeSelectorTemplate = document.querySelector(templateName)
  424. const form = themeSelectorTemplate.content.firstElementChild
  425. themeSelectorTemplate.replaceWith(form)
  426. form.addEventListener('change', (e) => {
  427. const chosenColorScheme = e.target.value
  428. localStorage.setItem('theme', chosenColorScheme)
  429. toggleTheme(chosenColorScheme)
  430. })
  431. const selectedTheme = localStorage.getItem('theme')
  432. if (selectedTheme && selectedTheme !== 'undefined') {
  433. form.querySelector(`[value="${selectedTheme}"]`).checked = true
  434. }
  435. }
  436. const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
  437. window.addEventListener('load', () => {
  438. let hasDarkRules = false
  439. for (const styleSheet of Array.from(document.styleSheets)) {
  440. let mediaRules = []
  441. for (const cssRule of styleSheet.cssRules) {
  442. if (cssRule.type !== CSSRule.MEDIA_RULE) {
  443. continue
  444. }
  445. // WARNING: Safari does not have/supports `conditionText`.
  446. if (cssRule.conditionText) {
  447. if (cssRule.conditionText !== prefersColorSchemeDark) {
  448. continue
  449. }
  450. } else {
  451. if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
  452. continue
  453. }
  454. }
  455. mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
  456. }
  457. // WARNING: do not try to insert a Rule to a styleSheet you are
  458. // currently iterating on, otherwise the browser will be stuck
  459. // in a infinite loop…
  460. for (const mediaRule of mediaRules) {
  461. styleSheet.insertRule(mediaRule.cssText)
  462. hasDarkRules = true
  463. }
  464. }
  465. if (hasDarkRules) {
  466. loadThemeForm('#theme-selector')
  467. }
  468. })
  469. </script>
  470. </body>
  471. </html>