emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Mark E. Shoulson" <mark@kli.org>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: [PATCH] Add entities for /, +, _, =
Date: Wed, 23 May 2012 22:02:16 -0400	[thread overview]
Message-ID: <4FBD96A8.9040106@kli.org> (raw)
In-Reply-To: <87hav68syk.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1434 bytes --]

On 05/23/2012 05:53 PM, Nicolas Goaziou wrote:
> Hello,
>
> "Mark E. Shoulson"<mark@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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-entities-for-_.patch --]
[-- Type: text/x-patch; name="0001-Add-entities-for-_.patch", Size: 1122 bytes --]

From 4d6c4ccc90fd181f446ff4c7d56f5c980ec9d940 Mon Sep 17 00:00:00 2001
From: Mark Shoulson <mark@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


  parent reply	other threads:[~2012-05-24  2:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09  2:52 Entities Mark E. Shoulson
2012-05-23 21:53 ` Entities Nicolas Goaziou
2012-05-24  1:22   ` [PATCH] Fix for displaying entities ending in a number Mark E. Shoulson
2012-05-25 15:00     ` Nicolas Goaziou
2012-05-24  2:02   ` Mark E. Shoulson [this message]
2012-05-25 15:04     ` [PATCH] Add entities for /, +, _, = Nicolas Goaziou
2012-05-25 20:40       ` Mark E. Shoulson
2012-05-25 21:23         ` Bastien

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=4FBD96A8.9040106@kli.org \
    --to=mark@kli.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).