Skip to content

Commit

Permalink
Respect Org Mode variables for controlling sub/superscripts
Browse files Browse the repository at this point in the history
  • Loading branch information
amake committed Nov 21, 2024
1 parent bd52ad2 commit f5a9ba0
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 3 deletions.
10 changes: 10 additions & 0 deletions assets/manual/orgro-manual.org
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,16 @@ following settings from the local variables list:
- ~org-pretty-entities~ :: Whether to prettify entities. Pretty entities are
enabled by default; you can use this to disable them.

- ~org-pretty-entities-include-sub-superscripts~ :: Whether to prettify
subscripts and superscripts. These are enabled by default; you can use this to
disable them. Note that turning off ~org-pretty-entities~ will also disable
subscripts and superscripts.

- ~org-use-sub-superscripts~ :: When subscripts and superscripts are enabled,
setting this to the symbol ~{}~ requires brackets around subscripts and
superscripts. In other words foo_bar will not render as a subscript but
foo_{bar} will.

- ~org-hide-emphasis-markers~ :: Whether to hide emphasis markers. Emphasis
markers are hidden in [[*Reader Mode][Reader Mode]], but this allows hiding them outside of
Reader Mode as well.
Expand Down
11 changes: 11 additions & 0 deletions assets/test/local-vars-entities-off.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
\smiley

foo_bar

foo_{bar}

# Local Variables:
# org-pretty-entities: nil
# org-pretty-entities-include-sub-superscripts: t
# org-use-sub-superscripts: t
# End:
11 changes: 11 additions & 0 deletions assets/test/local-vars-subsup-off.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
\smiley

foo_bar

foo_{bar}

# Local Variables:
# org-pretty-entities: t
# org-pretty-entities-include-sub-superscripts: nil
# org-use-sub-superscripts: t
# End:
11 changes: 11 additions & 0 deletions assets/test/local-vars-subsup-strict.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
\smiley

foo_bar

foo_{bar}

# Local Variables:
# org-pretty-entities: t
# org-pretty-entities-include-sub-superscripts: t
# org-use-sub-superscripts: {}
# End:
5 changes: 5 additions & 0 deletions assets/test/test.org
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ Bidi

* Local variables

Entities
- [[file:local-vars-entities-off.org][Entities disabled]]
- [[file:local-vars-subsup-strict.org][Strict sub/superscripts]]
- [[file:local-vars-subsup-off.org][Sub/superscripts disabled]]

Normal cases
- [[file:local-vars-set.org][Set]]
- [[file:local-vars-eval.org][Evaluation]]
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -500,10 +500,10 @@ packages:
dependency: "direct main"
description:
name: org_flutter
sha256: f0bb7b6c9e8aeb00f5dd831548a43e390578f49276e0151cdc520a01eb9d1655
sha256: "2795f3ecc6155568c14f1dd7a20c4aac9db6215ed424e212136809ed74e116c3"
url: "https://pub.dev"
source: hosted
version: "7.12.0"
version: "7.13.0"
org_parser:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies:
google_fonts: ^6.0.0
http: ^1.1.0
intl: ^0.19.0
org_flutter: ^7.12.0
org_flutter: ^7.13.0
# org_flutter:
# path: ../org_flutter
path_provider: ^2.0.9
Expand Down

0 comments on commit f5a9ba0

Please sign in to comment.