3 ms·
The solution are HTML tags like <u></u>
by alpaca128 2y ago
The solution are HTML tags like <u></u>
- dredmorbius 2y agoMarkdown is often, and was originally intended for, HTML generation. But that's not the only target which can be achieved, particularly with such tools as Pandoc, a document format interchange Swiss Army knife. Relying on format-specific tags imposes stronger constraints on endpoints and/or increases complexity of your document build process.
- alpaca128 2y agoInline HTML is part of the standard Markdown syntax, not a complication. If your tool doesn't support HTML it doesn't support Markdown. The format can be so simple in the first place because it allows this escape hatch for anything non-trivial. And tools like Pandoc can handle that just fine.
- dredmorbius 2y agoMy point is that Markdown conversion tools, notably Pandoc, whilst they will incorporate inline HTML when generating HTML endpoints will not convert such inlined code to other endpoints, e.g., LaTeX, DocBook, OpenDocument, etc. If you want those outputs to faithfully represent formatting, you either need to juggle multiple inline directives for each desired output format, or find some universal Markdown-based mechanism for achieving the same result. I'd like to make clear that I'm familiar with Markdown; the fact that its original design intent was streamlining HTML generation; that inline "native" code is a feature, not a but, but all the same a rather fraught one; and that actual practice has moved far beyond Markdown merely being used to generate HTML, least of all my own such practice. I've discussed this situation previously on HN (ironically from the PoV of using LaTeX embeds within Markdown creating problems when attempting to generate other-than-LaTeX outputs), see: <https://news.ycombinator.com/item?id=29690056 https://news.ycombinator.com/item?id=29690056> (2021). And I'd asked about the HTML and/or LaTeX conditional generation in a StackOverflow post about seven years ago: <https://stackoverflow.com/questions/4820502a9/pandoc-have-either-latex-or-markdown-html-render-but-not-both/48221122#48221122 https://stackoverflow.com/questions/4820502a9/pandoc-have-ei...>.
- oneeyedpigeon 2y agoAh, the good old Unarticulated Annotation element! https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u