5 votes

Comparing Textile vs. Markdown for mobile use

7 comments

  1. [6]
    wirelyre Link
    I think that's right; it's parallel to link syntax (link text ↦ alt text, link target ↦ image source). This also reveals the (main?) difference between Markdown and Textile. Textile is "a...

    In Markdown alt text [for images] seems to be obligatory

    I think that's right; it's parallel to link syntax (link text ↦ alt text, link target ↦ image source).

    This also reveals the (main?) difference between Markdown and Textile. Textile is "a shorthand syntax used to generate valid HTML". A Textile document is not the final form. It's just for writing. But Markdown is "a plain text format for writing structured documents". It is for reading and writing.

    If you're reading a structured plain text document, image descriptions are crucial. The embedded image is completely useless, since you can't see it. But if the document is guaranteed to turn into HTML, then alt text is not necessary — for sighted users anyway.

    4 votes
    1. gyrozeppeli Link Parent
      The alt text is necessary for people with visual impairments who use screen readers or similar tools. I go out of my way to write good alt text, just in case someone needs it one day.

      The alt text is necessary for people with visual impairments who use screen readers or similar tools. I go out of my way to write good alt text, just in case someone needs it one day.

      9 votes
    2. [4]
      cadadr Link Parent
      How often do we really read Markdown, though? Especially, say, on Reddit or Tildes or even HN, we don't get to see the source (maybe through Reddit API it's possible?), and it is definitely...

      How often do we really read Markdown, though? Especially, say, on Reddit or Tildes or even HN, we don't get to see the source (maybe through Reddit API it's possible?), and it is definitely destined for HTML whatever the source format be with these sort of sites. It is just a shorthand for writing some HTML in these (most?) contexts.

      I do share the view about alt text especially for images, but that the syntax is obligatory does not mean much. Someone that did not care enough could just put a dot or a space or something there to the same effect of not putting any text at all (or maybe even more confusing). Many use them for jokes, without any explanation for the images themselves (looking at you, but not only you, XKCD). Or, apparently with good intentions, as photo captions, which is not good enough, because captions are supposed to talk about the image, not describe it briefly or at length. That the syntax is obligatory may not ensure that it is used correctly.

      1 vote
      1. [3]
        masochist Link Parent
        All. the. time. I read them all the time in my terminal. Clone a repo, open the readme.md / contributing.md / whatever in vim / less. Or download a source tarball and open the readme.md in vim /...

        How often do we really read Markdown, though?

        All. the. time. I read them all the time in my terminal. Clone a repo, open the readme.md / contributing.md / whatever in vim / less. Or download a source tarball and open the readme.md in vim / less. This applies for both work and personal projects. Reading markdown files as a Unix hacker / admin is a daily thing.

        4 votes
        1. [2]
          cadadr Link Parent
          Sure thing. But don't miss this bit: I'm mainly talking about Github / Gitlab issues and websites like Tildes. I'd not go with Textile for a Readme file (I prefer Org mode because I squeeze in...

          Sure thing. But don't miss this bit:

          Especially, say, on Reddit or Tildes or even HN, we don't get to see the source (maybe through Reddit API it's possible?), and it is definitely destined for HTML whatever the source format be with these sort of sites.

          I'm mainly talking about Github / Gitlab issues and websites like Tildes. I'd not go with Textile for a Readme file (I prefer Org mode because I squeeze in some issue management for small stuff there) for the reason you explain. But if only the author will see the source for at most a handful of times, what's the point of trading ease-of-typing for ease-of-reading? Which one would you prefer typing on mobile:

          "link text":link
          [link text](link)
          

          I don't think there is a big difference in readability here, if any at all, but there is a big difference in typability where for Markdown I'd need, with my HTC phone, to jump around pages on my keyboard or use Hacker's Keyboard, switching to it just for that because it's not a good casual keyboard.

          2 votes
          1. masochist Link Parent
            I'd probably sidestep the issue entirely and use a dedicated tool for the job in proper Unix tradition, a dedicated Markdown editor / client app that makes it easy to add elements to a document /...

            I'd probably sidestep the issue entirely and use a dedicated tool for the job in proper Unix tradition, a dedicated Markdown editor / client app that makes it easy to add elements to a document / post like links. And I say Markdown because Markdown has won. Textile has lost, RST has lost, and pretty much everything else has lost, too. I absolutely wouldn't attempt to use Emacs on my phone, but I have used a dedicated Markdown editor and it worked as well as any kind of editing on a phone can work (i.e. it was only to see what it was like, and I switched to a real keyboard after about 30 seconds).

            That said, without such a dedicated editor / client app, I can absolutely see why you'd prefer Textile's formatting on a stock phone keyboard. But similarly, I don't do this kind of thing on my phone. With the existence of mature apps, I don't see the cost of expecting people to learn yet another preprocessor language to accommodate folks on phones is worth the benefit.

  2. cadadr Link
    Because this is an original article, I reproduce the entire text below, in it's Textile source format as a demo of what it is (totally not because I'm lazy): Title: Comparing Textile vs. Markdown...

    Because this is an original article, I reproduce the entire text below, in it's Textile source format as a demo of what it is (totally not because I'm lazy):


    Title: Comparing Textile vs. Markdown for mobile use
    Template: page
    Language: en
    Description: In which I argue that Textile is a better fit as a minimal markup language, especially when typing on touchscreens.
    ?
    "Markdown":md is everywhere.  It is also all over the place, with varying dialects.  Also, the markup used is rather hard to type on mobile, with touch screens, because most of the markup characters are either buried in the deepest pages of a usual touch keyboard.  "Textile":tx, instead, can be typed using the first or second levels of the default page of a mobile keyboard.
    
    Let’s compare some frequently-used markup.  I will not attempt an exhaustive comparison, but the features _I consider_ the most common.
    
    h1. Emphasis
    
    Let’s consider first the two conventional styles of emphasis: the use of oblique and bold face: emphasised and strong text.  In Markdown, the following are used:
    
    <pre>
    _emphasised_
    *emphasised*
    __strong__
    **strong**
    </pre>
    
    In Textile:
    
    <pre>
    _emphasised_
    *strong*
    </pre>
    
    This is a rather slow start to this comparison, given the preference between the two styles is mostly subjective.  My subjective opinion is that I strongly prefer the Textile’s style, with one character unambiguously specifying the type of emphasis used.  On most Android keyboards both @*@ and @_@ are on the second level of the first page, so both mark-ups offer a good choice for this syntax.
    
    h1. Inline code snippets
    
    <pre>
    `markdown code snippet`
    @textile code snippet@
    </pre>
    
    This is one of the big fails for Markdown on mobile because the backtick is not available on some Android keyboards, and difficult to reach in others.  Textile instead, uses the at sign, which is often available on the first page on the second level, or on the second page.
    
    On Android, you can use "Hacker’s Keyboard":hkb to type backticks.  I find it is not a good enough general purpose keyboard, though, especially on phone screens, maybe except those bigger than 6 inches.
    
    h1. Links
    
    This is another feature where Textile is better than Markdown.
    
    <pre>
    [A Markdown link](https://www.example.com)
    [Another Markdown link][alias]
    [alias]: https://www.example.com
    [Yet another Markdown link]
    [Yet another Markdown link]: https://www.example.com
    
    "A Textile link":https://www.example.com
    "Another Textile link":alias
    [alias]https://www.example.com
    </pre>
    
    Textile lacks the links like the last Markdown example, but a Textile link can be typed without changing pages on most mobile keyboards, whereas Markdown links would require changing pages multiple times, or pinpoint jumping around text which is hard to do on most phones.
    
    h1. Images
    
    In Markdown images are links with a @!@ prepended.  In textile they have a different syntax.
    
    <pre>
    ![Alt text](markdown.jpg)
    
    !textile.jpg!
    !textile.jpg(Alt text)!
    </pre>
    
    In Markdown alt text seems to be obligatory, if it was (is?) not, it’d be possible to type it w/o switching pages on a usual mobile keyboard.  In Textile the alt text is optional, but an image link can be typed w/o switching pages with or without it.
    
    In Textile there is easy syntax for linking images to URLs or aligning images (the latter uses less than or greater than characters which require changing pages).
    
    h1. Preformatted text (code blocks)
    
    In Markdown, the standard is to indent the block.  A common extension is the «code fence» syntax where, possibly with inspiration from Python, the block is prefixed and postfixed with @```@ (triple backticks).  Both are difficult or impossible on mobile.
    
    In Textile, you can use @<pre>@ like in HTML, which does require switching pages, but it is easier than Markdown’s, especially for longer blocks.  You can also use a @bc.@ or @bc..@ block (I should admit that I just learned about them).
    
    h1. Block quotes
    
    Block quotes are not very easy in one with regards to another in this comparison, but Markdown is better:
    
    <pre>
    > A Markdown block quote
    >
    > > Nested markdown block quote
    
    bq. Textile block quote
    
    bq.. Textile block quote until a different kind block appears
    
    Still a block quote
    
    p. This is a new paragraph that’s not part of the above block quote
    </pre>
    
    IDK if nested block quotes are possible in plain Textile, but it is possible to obtain them with HTML.
    
    h1. Lists
    
    Textile is better because: you can have an unordered lists with @*@ prefix, level indicated with the number of asterisks, and ordered lists with @#@ in the same fashion.
    
    Markdown has three symbols for unordered lists, and unnecessary number based notation for numbered lists.
    
    The asterisk does require switching pages, but pound sign does not.  But Markdown numbered lists are a mess.
    
    h1. Hard-wrapped paragraphs
    
    Markdown[1] allows hard-wrapped lines in paragraphs, Textile does not.  On mobile, one generally does not hard-wrap paragraphs, so they are equal.  I’d wish to be able to hard-wrap paragraphs on desktop, though.
    
    
    h1. Standardisation
    
    Textile is standard, there is one Textile.  Markdown has many dialects and flavours and standards.  The most basic elements do not vary, like emphasis, links or blockquotes, but other things do vary.
    
    h1. Available syntax
    
    Textile has a richer syntax with many more items available in its standard version:
    
    * Tables
    * Footnotes
    * Styling options
    * Sub/superscript
    * Insertions/deletions
    * Citations
    
    and many other useful things.
    
    h1. Conclusions
    
    I wanted this to be a quick comparison of what the two, with emphasis on mobile use.  I conclude that Textile is better because most common things are more easily typed than they are with Markdown.
    
    There are downsides to Textile: it is way bigger than Markdown, and HTML-centric.  It allows specifying classes, IDs, other element properties, and some styling, and that might be undesirable (though Markdown allows HTML snippets which can be used to a similar or identical effect).  Textile has fewer implementations.
    
    Markdown, albeit fragmented[2], is ubiquitous.  Nested blockquotes are a big plus, I personally use them often on online discussion where Markdown is used.  There are many extended versions of Markdown, but they are not fully compatible, so different things work in different places.  Thus, except what "Gruber defines":gruber, it’s easier to just use HTML.
    
    For me, I most commonly use links, emphasis, code blocks, inline code spans and blockquotes, when writing comments online on places like Reddit, Tildes, Github etc., and I find that they are easier to type with Textile on mobile.  What is a question of style on desktop is a question of ergonomics on mobile, and Textile wins for most of the more common tasks.
    
    IDK if it is possible to provoke or promote a shift towards Textile, and I am not sure if it is as big an issue to bother that sort of ‘geektivism’, but I’d fancy if I at least had the option to use Textile.  That Markdown is a widely available format is good, and that something replaced JS rich text editors is great, but that we’re stuck with Markdown[3] without any alternative on most online platforms is sad.
    
    h1. Addenda
    
    h2. Addendum for Emacs users
    
    You can use the following function to copy the region into the clipboard with four spaces prepended to each line, to easily paste code snippets into Markdown documents (or posts on Reddit etc.):
    
    bc. (defun gk-copy-as-markdown-code-snippet (beg end)
      "Copy region, prepend four spaces to every line."
      (interactive "r")
      (let ((snip (buffer-substring beg end)))
        (with-temp-buffer
          (insert snip)
          (goto-char (point-min))
          (while (re-search-forward "^" nil t)
            (replace-match "    "))
          (clipboard-kill-ring-save (point-min) (point-max)))))
    
    If the triple backticks syntax was standard, this wouldn’t really be needed, but it is not; the safe bet is to indent.  And Reddit, famously, lacks the «code fences».
    
    h2. Addendum for iOS users
    
    I’ve found "this":mdkbd keyboard for iOS that can help type markdown in any application.  I haven’t found a similar solution for Android users.  Many applications that use Markdown have some functionality to help type Markdown.
    
    <hr/>
    
    h1. Footnotes
    
    fn1. i.e. most flavours.
    
    fn2. There is the "CommonMark":https://commonmark.org/ effort, but it did not start early enough.
    
    fn3. Again something sub-par that we’re probably stuck with for the ages to come, just like JavaScript, and again on the WWW.  Is it maybe a coincidence that WWW has been a source of lots of bad, not-well-thought-out tech?
    
    [gruber]https://daringfireball.net/projects/markdown/syntax#list
    [hkb]https://f-droid.org/en/packages/org.pocketworkstation.pckeyboard/
    [tx]https://textile-lang.com/
    [md]https://daringfireball.net/projects/markdown/
    [mdkbd]https://itunes.apple.com/us/app/markdown-keyboard/id945466386?mt=8
    
    2 votes