emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org-modern dfb42f4f7d 1/5: Add org-modern-footnote (Fix


From: ELPA Syncer
Subject: [elpa] externals/org-modern dfb42f4f7d 1/5: Add org-modern-footnote (Fix #57)
Date: Sun, 5 Jun 2022 06:57:43 -0400 (EDT)

branch: externals/org-modern
commit dfb42f4f7d86d70291310ac34e8f4b0f858edab3
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Add org-modern-footnote (Fix #57)
---
 example.org   | 7 ++++++-
 org-modern.el | 8 ++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/example.org b/example.org
index 1f2bb8a8f0..aae8f1b669 100644
--- a/example.org
+++ b/example.org
@@ -94,7 +94,9 @@ TREPEATED: <2022-02-26 Sat 10:00 .+1d/2d>
 | 3 |  9 | 27 | 81 |  1.7321 |     1.3161 |
 |---+----+----+----+---------+------------|
 
-* Internal Links
+* Special Links
+
+Test numeric foonotes[fn:1] and named foonotes[fn:foo].
 
 <<This is an internal link>>
 
@@ -103,3 +105,6 @@ TREPEATED: <2022-02-26 Sat 10:00 .+1d/2d>
 [[This is an internal link]]
 
 radio link
+
+[fn:1] This is footnote 1
+[fn:foo] This is the foonote
diff --git a/org-modern.el b/org-modern.el
index 737544e439..5ab0a88b08 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -174,6 +174,10 @@ used as replacement for \"#+keyword:\", with t the default 
key."
                         :value-type (choice (string :tag "Replacement")
                                             (const :tag "Hide prefix" t)))))
 
+(defcustom org-modern-footnote '((height 0.7) (raise 0.3))
+  "Prettify footnotes."
+  :type '(choice (const nil) sexp))
+
 (defcustom org-modern-internal-link '(" ↪ " t " ")
   "Prettify internal link targets, e.g., <<introduction>>."
   :type '(choice (const nil) (list string boolean string)))
@@ -566,6 +570,10 @@ You can specify a font `:family'. The font families 
`Iosevka', `Hack' and
       (when org-modern-tag
         `((,(concat "^\\*+.*?\\( \\)\\(:\\(?:" org-tag-re ":\\)+\\)[ \t]*$")
            (0 (org-modern--tag)))))
+      (when org-modern-footnote
+        `(("\\(\\[fn:\\)[^]]+\\]"
+           (0 '(face nil display ,org-modern-footnote))
+           (1 '(face nil display ,(propertize "[" 'display 
org-modern-footnote))))))
       (when org-modern-internal-link
         `(("\\(<<\\)\\([^<][^\n]*?\\)\\(>>\\)"
            (0 '(face org-modern-internal-link) t)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]