-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow <b> and <i> tags #434
Comments
Why would this configuration be preferred? |
The
You could argue that Anyway, 👎 from me. |
Agree with @slang800 up here. This is what CSS is for. |
Disagree actually... @slang800 is correct in the assessment; however, I don't agree with the conclusion.
HTML is different than written text in the sense that with the traditional written word you only have bold and italic - any change in inflection is inferred by the context. This was actually a big debate back in the beginning days of the semantic web conversation. A screen-reader for the blind can actually differentiate and change inflection based on the four different tags. So, something marked as italic may not receive a different inflection - but, something marked as emphasis would. One of the PHP Markdown parsers actually has a setting to accomplish this:
From a style perspective - how the browser renders these elements by default they are the same because they are the same in the written word. However, from a CSS perspective, I can make Leaving open for further discussion and putting with #1036 |
See also headings from MLA (https://owl.english.purdue.edu/owl/resource/747/24/). We don't want to "stress" the sub-headings - but we do want to visually distinguish them to signal a reader that they are in a different section of the document. |
ps. For non-HTML display - the Markdown remains unaffected as the base spec will cause bold and italic regardless of underscore or asterisk. |
I'm not really getting where we're going with this...
To do this, we would need a way to differentiate between the two. Somewhat similar to what was proposed in #1031. |
Agreed with the reference to #1031 to a point. However, that solution seems to allow one to specify or limit the rule (Markdown allows all three by default). Not sure I'm seeing what you're seeing on that score. Was thinking a flag might suffice: Mainly because Markdown has us covered on this moreso than with More examples: A works cited page where we reference a book title like Romeo and Juliet https://www.w3.org/TR/html51/textlevel-semantics.html#the-em-element https://www.w3.org/TR/html51/textlevel-semantics.html#the-i-element To the styling point, I was just using that as an example. CSS can style all four elements however we want it to. The point was that it doesn't change the semantic correctness of one or the other - the visual appearance doesn't matter to the semantic intent. |
For citing works, you should use a |
@slang800: From an HTML perspective, I concur. From a writing a document perspective though "cite" is not an option. |
It works for me?
I'll admit that having to put a See also: https://babelmark.github.io/?text=this+%3Ccite%3Eis%3C%2Fcite%3E+*markdown* |
@slang800: Not sure we're speaking the same language on what we're both driving at here. :) One of the things about Markdown is that it is plain text and human readable without conversion to HTML...none. When we use something like Pages for macOS or Word for Windows and macOS - "cite" is not an option for formatting text. See the text formatting options from Pages, for example. So, yes, from an HTML perspective, when citing source material one would probably want to use the Again, going back to the header from APA. It is not a block level element - it's a sentence (inline). Further, it is italicized but not emphasized. In HTML...because documents don't differentiate between changes in inflection and changes in font face. In a document created by word or something like it - it's just an italicized sentence. So, in Markdown: *Some APA header.* Is correct visually, because most writing tools will display it as italicized; however, the use of the emphasis element is semantically incorrect because we're not trying to mark a change in the inflection of the word...unlike the two times I used it here. :) Hope that helps. |
I don't think that Apple's Pages or MS Word is an ideal to aspire to. They don't seem to have any boundary between content and style. They store display settings like page margins and size along with the actual content of the document in a horrible binary blob. Also, I think that MS Word does have citation support now. I haven't used it in years, so I don't know how it works.
Is that done frequently enough to justify being a part of Markdown syntax and adding another (potentially confusing) rule to how Markdown should be interpreted? Also, I don't see any issue with using
In Word there's no distinction between semantic emphasis and the kind of italicization you use when you're actually trying to say that something is a citation but you don't have the syntax in Markdown to do it. Word doesn't care about semantics in the same way that Markdown does. |
Again, I'm not sure we're speaking the same language at the same levels of consideration...and I'm not sure we can get there via text. I'm not saying we should "aspire" to anything. I'm trying to differentiate between a markup language (HTML) interpretted by a computer for communication to a reader and the craft of typesetting (the look of a visual page). HTML, when interpretted by a screen reader for the blind or illiterate can distinguish between emphasis and non. A document, the visual page, can't - at least not using traditional typesetting and typefaces. Yes it is done frequently enough to be under consideration, in my experience (that's why, back in the day, there was some pretty heated debate because, if memory serves, the w3c was considering deprecating Not asking for a change to the Markdown syntax - we are not a specifying body (if we stick strictly to the specs - we can just close this ticket and not consider it again). I do think it's an interesting problem space though, which is why I left it open for now - probably gonna be closing it soon though. The interesting thing about this solution is that even if we pass the Markdown through a parser that doesn't differentiate, the result still renders as expected:
According to the base Markdown spec (Markdown.pl), both of these are valid Markdown. If we pass that Markdown through a parser that differentiates:
Visually the same by default in a browser - semantically, however, they are different. If we pass that Markdown through a parser that doesn't differentiate (complies with Markdown.pl):
Visually the same by default in a browser - semantically they are also the same. I agree - you can use HTML within Markdown and should be able to - having said that, HTML is not the only way Markdown is used these days; so, if we can decouple or differentiate between the world of typesetting and the world of the web - it might be beneficial (this is why the video conversation #675 is what it is). (Of course, the argument could be made that Marked doesn't do non-web parsing...so, yeah...why have the discussion?)
I would say, if a user (typsetter) can't differentiate between inflection (
(Italics/emphasis added - pun intended.)
They are also different according to the HTML5 specification linked to in previous comments. So, no matter what angle we look at it from, in my opinion and practices, Markdown is deficient in its specification because it doesn't differentiate for the mediums through which it is used between the intent of the author versus the practice of typesetting. However, its original specification offers a simple way to overcome that deficiency, if one chooses to do so. Having said all that, at the end of the day, the specifications will win for the Marked library - pretty much every single time. When we start looking at making Marked easier to extend - someone should be able to add this functionality easily. Of course, it would be interesting if more people started using that library instead of Marked directly. :) Strong and emphasis are something of a sore spot for other reasons as well though - see #1036. |
Not sure if @NetoBuenrostro is being notified about this conversation being "revived" for now - want to make sure. |
This conversation is helping me at least crystalize some higher-level thoughts, so thanks.
|
Closing but flagging for possible consideration in releases 1.x or 2.x |
Adding a use case to this: In linguistics it's very common to indicate the relevant part of an example using bolding, like so (the final "b" is bolded).
This is the perfect use case for the In this situation, the
Similarly, in linguistics italics is used as a technical device to show that the word is being mentioned and not actually used (see the use-mention distinction):
This perfectly fits the description for the
The Modern HTML gives |
@dwhieb You have a few options if you want to output
|
@iksent The https://marked.js.org/using_pro#renderer The Em and Strong renderers are very simple:
So overriding would be as simple as defining new renderer functions (something) like this:
|
How about allowing
<b>
and<i>
tags in markdown.This can use the same notation defined in markdown, just outputting different tags.
Not everything has be semantic, some stuff just have to be highlighted.
The text was updated successfully, but these errors were encountered: