Underline Text Formatting

Hi!

I’m brand new to Bike Outliner; really like it and will definitely purchase a subscription. However, I do have a question: I tested the text formatting shortcuts with Cmd+E, and think it is a great implementation but I noticed that Underline is missing as an option. This is unfortunate because in my work I use a lot of strikethrough/underline formatting to indicate new and deleted text.

I imagine this is a know limitation of the software or file formatting?

Thanks, and great work on the outliner! It is very elegant.

Best,

MB

Perhaps worth distinguishing between structure and decoration here.

Bike defines a set of standard HTML text run attributes {em, strong, code, mark, s, a, base} and custom style sheets can map these onto particular decorations.

In decorative terms,

  • em is typically displayed with an italic style,
  • strong with bold,
  • mark with highlight.

u is not included in that set – it has an uncertain status these days – but customising a style-sheet would allow you to repurpose mark, for example, if your aim is specifically to see an underline text decoration (no longer the normal purpose of <u> tags in HTML).

(As you’ve discovered, the s attribute is displayed by default as strikethrough)


If your workflow moves bike drafts on for further processing in a system which expects to see <u> tags to indicate new text, then a command line filter like:

jaq --from xml --to xml 'walk(
    if type == "object" and .t == "mark" then
        .t = "u"
    else
        .
    end
)' input.bike > output.html

would replace the <mark> tags with <u> tags.


jaq can be installed via Homebrew

1 Like