Comments

  • Can’t Nest Comments. You can’t nest HTML comments in iA Writer.
<!--
Some text. <!-- Nested comment.>

Checklist 

- [ ] Item one 
- [ ] Item two 

Some more text. 
-->

Content Blocks

  • https://ia.net/writer/support/general/content-blocks
  • Content blocks allow transclusion of files as a way to work with longer texts.
  • Syntax:
    • At the start of a line, write a \ followed by the file name and extension. Example: /imagename.png
    • For image or table captions, use quotes (single quotes or double quotes) or parenthesis.
      • Examples:
        • /imagename.png "Caption"
        • /imagename.png 'Caption'
        • /imagename.png (Caption)
      • Captions for text files are ignored.
  • You can save a referenced file in one of three ways:
    • In the same folder as the file that references it.
    • In a subfolder. Syntax: /imagesfolder/imagename.png (Caption)
    • In parent folder. Before iA Writer 5.3, you could not save files in a parent folder. But starting with iA Writer 5.3, content blocks can use relative paths. For example, ../filename.txt will include a file from the parent folder.
  • iA Writer 4 explains content blocks.
  • iainc/Markdown-Content-Blocks, GitHub, gives the spec for content blocks.
  • “Sadly, iA Writer’s implementation of transclusion is its own proprietary approach: content blocks. Content blocks are cool, but they don’t follow the same syntax as Obsidian, so a file transcluded in iA Writer won’t work properly in Obsidian and vice-versa.” ryanjamurphy, Best practices on iOS/iPadOS, Obsidian Forum, May 25, 2020 at 8:32pm.

Export

  • ePub. iA Writer doesn’t export to ePub. But you can export to Pages (by exporting to Word and opening the document in Pages) and then export to ePub.
  • Word. iA Writer allows you to export to Word. You can even export tables to Word.

Markdown

  • iA Writer uses MultiMarkdown to parse Markdown.

Metadata

  • Metadata in iA Writer, including metadata variables, are a built-in component of MultiMarkdown: http://fletcher.github.io/MultiMarkdown-5/metadata.html
  • Metadata can be used to store important information about a document that is hidden from Preview. See MultiMarkdown Metadata, iA Writer, Medium, March 9, 2016.
  • Metadata can be used to create simple fill-ins.
  • In a direct message to me on Twitter,[^iA Writer, Direct Message on Twitter, Dec. 2, 2021 at 10:49 PM] iA Writer’s support explained some limits of variables in iA Writer:
    • “There isn’t a way to make variables conditional. Really, variables is a bit of a misnomer. They are more like constants. Set them once and they do not change.”
    • “It isn’t possible to expand the scope of these variables–they are built into the Markdown parser. Also, they do not inform the HTML of the output beyond whatever contents are replaced.”
    • “Reserved metadata values–like Author–are not currently passed over to the Preview template either. We would like to offer that ability in the future, but we don’t make any promises on a timeline.”

Tables

  • iA Writer allows you to create tables and even export them to Word.

  • iA Writer has “smart tables,” which allow you to use the syntax =(…) to perform mathematical calculations in your tables. Calculations are handled using math.js.

    • Here are some tips:
      • You can reference other cells. Like spreadsheets, the top-left cell is A0. Examples:
        • =(B1)
        • =(B1 + B2)
      • You can sum the cells in column using =(TOTAL).
        • But TOTAL has limits. You cannot do the following, as they will generate an error:
          • =((TOTAL) / 5)
          • If the total is in B32, =( B3 / 31 )
        • In a direct message to me on Twitter,[^iA Writer, Direct Message on Twitter, Dec. 1, 2021 at 1:28 AM] iA Writer’s support explained: “TOTAL is our own custom function.”
        • In a direct message to me on Twitter,[^iA Writer, Direct Message on Twitter, Dec. 2, 2021 at 10:49 PM] iA Writer’s support explained, “Correct, the TOTAL function is run after all the other calculations done by math.js are completed. This means you cannot use the output of TOTAL in another calculation. That said, we can see how it would be useful. We’ll take a look at how we can improve this in the future.”
    • Limit: There is no way to select a range. Consequently, there is no way to get the average of values in a column. In a direct message to me on Twitter,[^iA Writer, Direct Message on Twitter, Dec. 1, 2021 at 1:28 AM] iA Writer’s support gave the following workaround: “[Y]ou can use the mean function to obtain the mean for manually entered cells.”
      • Example: =(mean(A1,A2).
      • Tip: To have more readable tables, the manually-entered range can be a variable in the metadata. So, in the variable section, you would have a line that says var: A1, A2, A3, A4. Then, a table cell would have: =(mean([%var]).
    • You can define variables in the metadata section of a document and reference the variable in a table.
      • Example: The variable section has a line with var: 5. A table cell has =([%var]).
      • Tip: The variable can be a formula. For example, you can have var1: B1 + B2 + B3. Then in a table cell, you simply write, =(mean([%var1])).

Templates


iA Writer or MS Word?, ia.net

SaaS Radio Hour, iA Writer Chat, with Oliver Reichenstein.

Federico Viticci, iA Writer 5.5, MacStories, May 13, 2020 (via Apple News) (“I’ve been using iA Writer as my only text editor for two years now, and I’m continuously impressed by the thoughtfulness and attention to modern iOS/iPadOS technologies that goes into the app.”).

[Updated 12/3/2021]