-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Superscript/Subscript markup #1337
Comments
I've looked at the extended markdown listed on markdownguide.org, and perhaps those are good solutions. I've added the strikethrough from there, and highlight too is a candidate. The mentioned syntax for superscript is The proposed syntax for footnotes is also the one I plan to implement with a slight modification. |
This is a welcomedevelopment. Even fiction writers sometimes need to use superscripts and subscripts. |
Absolutely. I occasionally find my self needing it. Luckily, I can manage most of the cases with unicode as it is usually superscript of numbers. |
So, I'm playing around with this. I want to add a syntax that can be used for text inline blocks of various kinds, so I'm trying out a syntax. I don't want to add a lot of weird looking
Which renders as "October 19th, 2023" This is pretty easy to both add a syntax highlighter regex to, and process during export. The neat thing about this syntax is that I can also use it to add formatting for bold and italic for special cases where the regular syntax doesn't work. There have been a few requests for that where someone want to only bold a part of a word. Allowing something like this:
Here, it would render as "October 19th, 2023", which works on GitHub, but not in novelWriter. |
Also tagging @tmarplatt here since the feature came from another issue, and I'm not sure you're being notified. I'd like some feedback on this before I go ahead and add a new notation we'll be stuck with! 😃 |
Thanks for implementing partial formatting. I'm not on board with arguing against But it's fine by me. If the partial formatting can't be done in another way anyway, then I'm just happy for the new feature we're getting 🙂 |
Can you consider adding aliases for the (what do you call them?) commands? I'm thinking |
The problem is that The beauty of the Yes, I can make them Keep in mind I want to use this notation for footnotes and endnotes as well, so it needs to consistent. I've also considered the following notation |
In ANSI keyboard layouts at least, square brackets are easier to type. (Then again, in Spanish layouts it's the other way around hehe.) I would advise against curly brackets if only for breaking consistency like you mentioned. And definitely favour clarity over brevity: Also it would perhaps help to know what your plans for (foot|end)notes syntax are. |
If we're opting for descriptive, I could make them:
I could easily support Alternatively, the footnote "text" could point to a reference where the footnote is defined. The latter would make it possible to have multi-paragraph footnotes. The benefit with having the |
Definitely not, especially if you're also adding syntax for endnotes ( |
I think an alternative short form can be useful if you use them a lot. It will be optional anyway. Yes, the implementation details belong in #342, but the in-line command syntax should be the same for all these features, and this is where I'm implementing it. I think the |
I've given this some further thought. An even simpler solution, that also allows nesting of formatting, is to just mimic HTML. We can't use actual HTML syntax since So, this would work:
This too matches well with the These shortcodes are also trivial to implement in the way the current parser works. This will be simple to use for anyone who knows HTML, and who remember forum shortcodes. Since regular emphasis syntax in Markdown still works, these codes would rarely be needed, but when you do need complex control of the formatting, they are there. The last point is what I like the most with this. It basically bypasses the parser logic that looks for a beginning and an end of formatting syntax, and just inserts the raw formatting marker. It is also inline with Markdown implementations that allow HTML markup when regular Markdown is insufficient. |
FYI, I made Epic #1541 to track the shortcodes work and the 4 issue tickets it will solve. General implementation details should be discussed there, and the specifics for each feature component in their respective threads. I've implemented superscript/subscript as |
Added in #1540. |
Originally posted by @tmarplatt in #1330
The text was updated successfully, but these errors were encountered: