-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require text to be wrapped in braces to export as sub/superscript
Now ox-hugo by default requires text, to be sub/super-scripted, to be wrapped in {}. So now "a_b" will be exported as "a_b", but "a_{b}" will be exported as "a<sub>b</sub>". To revert back to the earlier behavior, user needs to add "#+OPTIONS: ^:t" to their Org file.
- Loading branch information
1 parent
1131882
commit b35dfa0
Showing
8 changed files
with
75 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
test/site/content/posts/sub-superscripts-dont-require-braces.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
+++ | ||
title = "Sub/superscripts don't require braces" | ||
tags = ["export-settings"] | ||
draft = false | ||
+++ | ||
|
||
## Following text will export `_..` as subscript and `^..` as superscript {#following-text-will-export-dot-dot-as-subscript-and-dot-dot-as-superscript} | ||
|
||
a<sub>b</sub> a<sub>bc</sub> a<sup>b</sup> a<sup>bc</sup> | ||
|
||
|
||
## Following text will export `_{..}` as subscript and `^{..}` as superscript {#following-text-will-export-dot-dot-as-subscript-and-dot-dot-as-superscript} | ||
|
||
a<sub>b</sub> a<sub>bc</sub> a<sup>b</sup> a<sup>bc</sup> |
14 changes: 14 additions & 0 deletions
14
test/site/content/posts/sub-superscripts-require-braces.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
+++ | ||
title = "Sub/superscripts require braces" | ||
tags = ["export-settings"] | ||
draft = false | ||
+++ | ||
|
||
## Following text will export `_` and `^` verbatim {#following-text-will-export-and-verbatim} | ||
|
||
a\_b a\_bc a^b a^bc | ||
|
||
|
||
## Following text will export `_{..}` as subscript and `^{..}` as superscript {#following-text-will-export-dot-dot-as-subscript-and-dot-dot-as-superscript} | ||
|
||
a<sub>b</sub> a<sub>bc</sub> a<sup>b</sup> a<sup>bc</sup> |