0

Markdown uses the "strikethrough" notation to indicate removed text, but how to show added text?

enter image description here

I would like to accomplish something similar in markdown, that is, to inform the reader how the text has been revised.

I would like to know if this is at all possible, and how is this problem solved in some existing applications. I'm looking to select an documentation publishing application (like Hugo/Docusausus/Gatsby, etc) to publish some documentation, and the ability to display revisions, inline is a must have feature. I'm willing to do some development, but if this wheel has already been invented, that's what I'm after. Has this wheel already been invented in markdown? How?

In the example above, shown from OpenOffice with revisions recorded and shown, it is clear that the wording "replacement text here" is a revision to the previous content "consectetur adipiscing elit".

OpenOffice uses a combination of text color, underline and strikethrough, and a vertical line to the left of the text to convey a revision.

The added text could be emphasized with bold or italics, but it seems inappropriate to add emphasis where none was intended by the author of the revision.

The question Get underlined text with Markdown suggests underlining with <ins> or <u> which reportedly works in some places like githhub and jupyter notebooks, but I'm curious if there is a better way.

Also, the documentation at https://daringfireball.net/projects/markdown/syntax#html indicates that the html elements <ins> and <del> for inserted and deleted, respectively, are supported in any markdown flavor; together, and possibly combined with some CSS to show color, come close to the word-processor way of showing revisioning.

Jaredo Mills
  • 159
  • 1
  • 8
  • in which platform (web-based, or standalone application) do you want to show the contents? also, which programming language are you using? – Raptor Dec 15 '22 at 02:15
  • Thank you for the response; I'll be selecting a web publishing solution like Hugo or Docusaurus or Gatsby depending their ability to convey this information. It's even possible I'll have to do some customization/development to accomplish this, if this problem has not been solved before in a publishing application (word processors have a solution, which I've shown). – Jaredo Mills Dec 15 '22 at 02:26
  • I'm not clear on whet you're asking. Is this a question about the representation, e.g. should text be red or green, underlined or emboldened, etc; or is it a question about how to make the text red,green,bold etc? The former belongs on [ux.se]. The latter is on topic here, but you need to be specific about what you're trying to achieve. – Tangentially Perpendicular Dec 15 '22 at 02:50
  • Excellent point. I am starting with the premise that from a User Experience perspective, the solution adopted in word processors is the current best practice. That wheel has been invented. The question that remains is two-fold, (1) what notations are currently accepted in existing documentation publishing applications, and (2) what is the current best practice for describing change with markdown. As I found out, there are some available notations which can be used to approximate a useful display, but there is still missing a way to say "the para xxx was changed to yyy". – Jaredo Mills Dec 15 '22 at 03:32
  • 1
    The generic, most portable method is indeed to use HTML. You can also use `~~old~~` as an alternative to `old`, but this won't work on all platforms. See [babelmark](https://babelmark.github.io/?text=~~hello~~%3Cins%3Egoodbye%3C%2Fins%3E). – tarleb Dec 15 '22 at 09:33

0 Answers0