On 05/23/2012 05:53 PM, Nicolas Goaziou wrote:
Hello,

"Mark E. Shoulson"<m...@kli.org>  writes:
Also attached is another patch that might or might not be useful.
Sometimes it can be a problem when you can't type, say, asterisks
around a word when you NEED asterisks around the word, not a boldface
word (I'd been getting around it by using Unicode characters that look
like asterisks, like ∗). The way to do it right is to use the \ast
entity, which expands to the right thing but doesn't affect
formatting. There's also already a \tilde entity, to allow putting in
tildes without accidentally setting something verbatim. I added
entities for the remaining markup characters: \plus, \under, \equal,
and \slash. \under might be particularly handy when avoiding
subscripting (which raises the question of if there should be an
\asciicirc (or something) entity for ^ also).
I think they are all useful. Though, asciicirc already exists as circ.

I hadn't counted \circ because it expands under Unicode to ˆ (U+02C6) and not to the true ascii circumflex ^ (U+005E); the point of these entities is to represent ascii characters that otherwise would confuse things. Maybe \circ should expand to ^; maybe there should be another entity for it (maybe neither).

Anyway; attaching the relevant patch (changelog tweaked), once again hoping I got the formatting and everything right.

~mark

>From 4d6c4ccc90fd181f446ff4c7d56f5c980ec9d940 Mon Sep 17 00:00:00 2001
From: Mark Shoulson <m...@kli.org>
Date: Wed, 23 May 2012 21:53:35 -0400
Subject: [PATCH] Add entities for /, +, _, =

* org-entities.el (org-entities): Add new entities for characters
  which could cause formatting changes if typed directly.
---
 lisp/org-entities.el |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/lisp/org-entities.el b/lisp/org-entities.el
index 8b5b3f3..fce3b68 100644
--- a/lisp/org-entities.el
+++ b/lisp/org-entities.el
@@ -260,6 +260,10 @@ loaded, add these packages to `org-export-latex-packages-alist'."
     ("lt" "\\textless{}" nil "&lt;" "<" "<" "<")
     ("gt" "\\textgreater{}" nil "&gt;" ">" ">" ">")
     ("tilde" "\\~{}" nil "&tilde;" "~" "~" "~")
+    ("slash" "/" nil "/" "/" "/" "/")
+    ("plus" "+" nil "+" "+" "+" "+")
+    ("under" "\\_" nil "_" "_" "_" "_")
+    ("equal" "=" nil "=" "=" "=" "=")
     ("dagger" "\\textdagger{}" nil "&dagger;" "[dagger]" "[dagger]" "†")
     ("Dagger" "\\textdaggerdbl{}" nil "&Dagger;" "[doubledagger]" "[doubledagger]" "‡")
 
-- 
1.7.7.6

Reply via email to