bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#29759: 25.2; "exciting footnote styles" promised, but unavailable


From: Boruch Baum
Subject: bug#29759: 25.2; "exciting footnote styles" promised, but unavailable
Date: Sun, 17 Dec 2017 16:31:14 -0500
User-agent: NeoMutt/20171208

The docstring for variable `footnote-style-alist' promises, "See
footnote-han.el, footnote-greek.el and footnote-hebrew.el for more
exciting styles"; However, those files neither seem to be installed with
emacs, nor appear when I perform a google search for them.

Attached is a patch for Hebrew footnotes, for the benefit of all who
might be 'excited' by such things. For the rest of us, please consider
providing / restoring those files to emacs, or consider applying this
code.


(defconst footnote-hebrew-regex "[אבגדהוזחטיכלמנסעפצקרשת]+")
(defconst footnote-hebrew '(
  ("א" "ב" "ג" "ד" "ה" "ו" "ז" "ח" "ט")
  ("י" "כ" "ל" "מ" "נ" "ס" "ע" "פ" "צ")
  ("ק" "ר" "ש" "ת" "תק" "תר"" תש" "תת" "תתק")))
(defun Footnote-hebrew(n)
  "Supports 9999 footnotes, then rolls over."
  (let*
    ((n (+ (mod n 10000) (/ n 10000)))
     (thousands (/ n 1000))
     (hundreds (/ (mod n 1000) 100))
     (tens (/ (mod n 100) 10))
     (units (mod n 10))
     (special (if (not (= tens 1)) nil
               (or (when (= units 5) "טו")
               (when (= units 6) "טז")))))
   (concat
     (when (/= 0 thousands) (concat (nth (1- thousands) (nth 0 
footnote-hebrew)) "'"))
     (when (/= 0 hundreds) (nth (1- hundreds) (nth 2 footnote-hebrew)))
     (if special special
      (concat
        (when (/= 0 tens) (nth (1- tens) (nth 1 footnote-hebrew)))
        (when (/= 0 units) (nth (1- units) (nth 0 footnote-hebrew))))))))
(add-to-list 'footnote-style-alist `(hebrew Footnote-hebrew 
,footnote-hebrew-regex) t)


VERSION INFORMATION
===================
In GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.20)
 of 2017-09-11, modified by Debian built on trouble
System Description:     Devuan GNU/Linux 1.0 (jessie)

-- 
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0





reply via email to

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