[Top][All Lists]

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

Re: [O] export entities inside code/verbatim markup?

From: Kaushal Modi
Subject: Re: [O] export entities inside code/verbatim markup?
Date: Fri, 15 Dec 2017 16:19:42 +0000

On Fri, Dec 15, 2017 at 10:49 AM Eric S Fraga <address@hidden> wrote:
On Friday, 15 Dec 2017 at 10:40, Matt Price wrote:
> tools: <code>Tools \rarr Web Developer \rarr Console</code> or

So what is the problem?  The text in ~...~ markup *is* being exported to
HTML.  What did you expect to see instead?  I am confused and maybe
misunderstood what you were asking.

I believe that Matt wants to render the entities inside the verbatim/code markup.

@Matt: Verbatim/markup blocks simply keep everything inside.. verbatim. Because then how would some literally print \rarr if they wanted too.. Example: What if someone wanted to export: "Type ~\rarr~ to export \rarr". It would be highly confusing if entities got interpreted in verbatim too :)

To do what you want, I would unleash the power of C-x 8 RET.

If you want to include the right arrow in the verbatim blocks, instead of typing "\rarr", do C-x 8 RET, type "right arrow" and hit return again.. \rarr will be inserted in the buffer.. I mean → will be inserted literally.

I like inserting verbatim arrows too. So after I got tired of C-x 8 RET "right arrow", I just bound the <right> key binding in the C-x 8 map to directly insert .

(use-package iso-transl
  :defer 10
    ;; Add custom bindings to "C-x 8" map
    (dolist (binding
               ;; <snip>          
               ;; arrows
               ("<right>" . [?→]) ; rightwards arrow
               ("<left>"  . [?←]) ; leftwards arrow
               ("<up>"    . [?↑]) ; upwards arrow
               ("<down>"  . [?↓]) ; downwards arrow
               ;; <snip>
      (define-key iso-transl-ctl-x-8-map (kbd (car binding)) (cdr binding)))))

With the above code, I just do C-x 8 <right> to insert →.

Full code:https://github.com/kaushalmodi/.emacs.d/blob/master/setup-files/setup-unicode.el

Hope that helps.

Kaushal Modi

reply via email to

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