all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Boruch Baum <boruch_baum@gmx.com>
To: 29759@debbugs.gnu.org
Subject: bug#29759: 25.2; "exciting footnote styles" promised, but unavailable
Date: Sun, 17 Dec 2017 16:31:14 -0500	[thread overview]
Message-ID: <20171217213114.mti6zqnlsibvaqj7@E15-2016.optimum.net> (raw)

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	other threads:[~2017-12-17 21:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-17 21:31 Boruch Baum [this message]
2017-12-18 15:41 ` bug#29759: 25.2 Updated Code Boruch Baum
2017-12-22 14:44 ` bug#29759: 25.2; "exciting footnote styles" promised, but unavailable Eli Zaretskii
2017-12-24 20:02   ` Boruch Baum
2017-12-25 16:00     ` Eli Zaretskii
2017-12-25 18:20       ` Boruch Baum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171217213114.mti6zqnlsibvaqj7@E15-2016.optimum.net \
    --to=boruch_baum@gmx.com \
    --cc=29759@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.