X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/18ab493650d648ab8dca651ea2698861f926e895..c6ea35a7a89f45cd09c442a983089928974c9505:/lisp/org/org-entities.el diff --git a/lisp/org/org-entities.el b/lisp/org/org-entities.el index 0146abb07c..bd675c376b 100644 --- a/lisp/org/org-entities.el +++ b/lisp/org/org-entities.el @@ -1,12 +1,11 @@ ;;; org-entities.el --- Support for special entities in Org-mode -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik , ;; Ulf Stegemann ;; Keywords: outlines, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -45,6 +44,7 @@ For example, this will replace \"\\nsup\" with \"[not a superset of]\" in backends where the corresponding character is not available." :group 'org-entities + :version "24.1" :type 'boolean) (defcustom org-entities-user nil @@ -69,6 +69,7 @@ utf-8 replacement Use the special characters available in utf-8. If you define new entities here that require specific LaTeX packages to be loaded, add these packages to `org-export-latex-packages-alist'." :group 'org-entities + :version "24.1" :type '(repeat (list (string :tag "name ") @@ -251,7 +252,7 @@ loaded, add these packages to `org-export-latex-packages-alist'." "* Other" "** Misc. (often used)" - ("circ" "\\circ" t "ˆ" "^" "^" "ˆ") + ("circ" "\\^{}" nil "ˆ" "^" "^" "ˆ") ("vert" "\\vert{}" t "|" "|" "|" "|") ("brvbar" "\\textbrokenbar{}" nil "¦" "|" "¦" "¦") ("sect" "\\S" nil "§" "paragraph" "§" "§") @@ -259,6 +260,11 @@ loaded, add these packages to `org-export-latex-packages-alist'." ("lt" "\\textless{}" nil "<" "<" "<" "<") ("gt" "\\textgreater{}" nil ">" ">" ">" ">") ("tilde" "\\~{}" nil "˜" "~" "~" "~") + ("slash" "/" nil "/" "/" "/" "/") + ("plus" "+" nil "+" "+" "+" "+") + ("under" "\\_" nil "_" "_" "_" "_") + ("equal" "=" nil "=" "=" "=" "=") + ("asciicirc" "\\textasciicircum{}" nil "^" "^" "^" "^") ("dagger" "\\textdagger{}" nil "†" "[dagger]" "[dagger]" "†") ("Dagger" "\\textdaggerdbl{}" nil "‡" "[doubledagger]" "[doubledagger]" "‡") @@ -491,34 +497,31 @@ Kind can be any of `latex', `html', `ascii', `latin1', or `utf8'." ;; Helpfunctions to create a table for orgmode.org/worg/org-symbols.org (defun org-entities-create-table () - "Create an org-mode table with all entities." + "Create an Org mode table with all entities." (interactive) - (let ((ll org-entities) - (pos (point)) - e latex mathp html latin utf8 name ascii) + (let ((pos (point)) e latex mathp html latin utf8 name ascii) (insert "|Name|LaTeX code|LaTeX|HTML code |HTML|ASCII|Latin1|UTF-8\n|-\n") - (while ll - (when (listp e) - (setq e (pop ll)) - (setq name (car e) - latex (nth 1 e) - mathp (nth 2 e) - html (nth 3 e) - ascii (nth 4 e) - latin (nth 5 e) - utf8 (nth 6 e)) - (if (equal ascii "|") (setq ascii "\\vert")) - (if (equal latin "|") (setq latin "\\vert")) - (if (equal utf8 "|") (setq utf8 "\\vert")) - (if (equal ascii "=>") (setq ascii "= >")) - (if (equal latin "=>") (setq latin "= >")) - (insert "|" name - "|" (format "=%s=" latex) - "|" (format (if mathp "$%s$" "$\\mbox{%s}$") - latex) - "|" (format "=%s=" html) "|" html - "|" ascii "|" latin "|" utf8 - "|\n"))) + (mapc (lambda (e) (when (listp e) + (setq name (car e) + latex (nth 1 e) + mathp (nth 2 e) + html (nth 3 e) + ascii (nth 4 e) + latin (nth 5 e) + utf8 (nth 6 e)) + (if (equal ascii "|") (setq ascii "\\vert")) + (if (equal latin "|") (setq latin "\\vert")) + (if (equal utf8 "|") (setq utf8 "\\vert")) + (if (equal ascii "=>") (setq ascii "= >")) + (if (equal latin "=>") (setq latin "= >")) + (insert "|" name + "|" (format "=%s=" latex) + "|" (format (if mathp "$%s$" "$\\mbox{%s}$") + latex) + "|" (format "=%s=" html) "|" html + "|" ascii "|" latin "|" utf8 + "|\n"))) + org-entities) (goto-char pos) (org-table-align))) @@ -568,6 +571,4 @@ Kind can be any of `latex', `html', `ascii', `latin1', or `utf8'." ;; coding: utf-8 ;; End: -;; arch-tag: e6bd163f-7419-4009-9c93-a74623016424 - ;;; org-entities.el ends here