aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2022-03-31 23:39:21 +0100
committerYann Herklotz <git@yannherklotz.com>2022-03-31 23:39:21 +0100
commit1ea717fd1cb522e62aab9c67f67c272dc8b4d10f (patch)
treecf1a371d7a360ff5a3ed264304fab872028f705b
parent6aadcd5f0338104d4ebee6277a9c4497200f26f6 (diff)
downloadox-tufte-master.tar.gz
ox-tufte-master.zip
Fix some warnings in the documentation and namingHEADmaster
-rw-r--r--ox-tufte.el36
1 files changed, 22 insertions, 14 deletions
diff --git a/ox-tufte.el b/ox-tufte.el
index 93dc808..7ad12f2 100644
--- a/ox-tufte.el
+++ b/ox-tufte.el
@@ -7,7 +7,7 @@
;; Description: An org exporter for Tufte HTML
;; Keywords: org, tufte, html
;; Version: 1.1.0
-;; Package-Requires: ((org "8.2") (emacs "24"))
+;; Package-Requires: ((org "8.2") (emacs "24.4"))
;; URL: https://git.sr.ht/~ymherklotz/ox-tufte
;; This file is not part of GNU Emacs.
@@ -39,7 +39,7 @@
;;; User-Configurable Variables
-(defgroup org-export-tufte nil
+(defgroup ox-tufte-org-export nil
"Options specific to Tufte export back-end."
:tag "Org Tufte"
:group 'org-export
@@ -47,10 +47,12 @@
:package-version '(Org . "8.0"))
(defcustom org-tufte-include-footnotes-at-bottom nil
- "Non-nil means to include footnotes at the bottom of the page
- in addition to being included as sidenotes. Sidenotes are not
- shown on very narrow screens (phones), so it may be useful to
- additionally include them at the bottom."
+ "Includes footnote at the bottom.
+
+Non-nil means to include footnotes at the bottom of the page in
+addition to being included as sidenotes. Sidenotes are not shown
+on very narrow screens (phones), so it may be useful to
+additionally include them at the bottom."
:group 'org-export-tufte
:type 'boolean)
@@ -97,8 +99,10 @@ holding contextual information."
;;; Transcode Functions
-(defun org-tufte-quote-block (quote-block contents info)
- "Transform a quote block into an epigraph in Tufte HTML style"
+(defun org-tufte-quote-block (quote-block contents _info)
+ "Transform a QUOTE-BLOCK into an epigraph in Tufte HTML style.
+
+CONTENTS is the main content."
(format "<div class=\"epigraph\"><blockquote>\n%s\n%s</blockquote></div>"
contents
(if (org-element-property :name quote-block)
@@ -133,7 +137,8 @@ contextual information."
(defun org-tufte-footnote-reference (footnote-reference contents info)
"Create a footnote according to the tufte css format.
-FOOTNOTE-REFERENCE is the org element, CONTENTS is nil. INFO is a
+
+FOOTNOTE-REFERENCE is the org element, CONTENTS is nil. INFO is a
plist holding contextual information."
(format
(concat "<label for=\"%s\" class=\"margin-toggle sidenote-number\"></label>"
@@ -149,9 +154,10 @@ plist holding contextual information."
(replace-regexp-in-string "</?p.*>" "" fn-data))))
(defun org-tufte-maybe-margin-note-link (link desc info)
- "Render LINK as a margin note if it starts with `mn:', for
- example, `[[mn:1][this is some text]]' is margin note 1 that
- will show \"this is some text\" in the margin.
+ "Render LINK as a margin note if it starts with `mn:'.
+
+For example, `[[mn:1][this is some text]]' is margin note 1 that
+will show \"this is some text\" in the margin.
If it does not, it will be passed onto the original function in
order to be handled properly. DESC is the description part of the
@@ -168,8 +174,10 @@ link. INFO is a plist holding contextual information."
(org-html-link link desc info))))
(defun org-tufte-src-block (src-block contents info)
- "Transcode SRC-BLOCK element into Tufte HTML format. CONTENTS
-is nil. INFO is a plist used as a communication channel."
+ "Transcode SRC-BLOCK element into Tufte HTML format.
+
+CONTENTS is nil. INFO is a plist used as a communication
+channel."
(format "<pre class=\"code\"><code>%s</code></pre>"
(org-html-format-code src-block info)))