How to escape double quote?

后端 未结 4 1403
盖世英雄少女心
盖世英雄少女心 2020-12-19 10:45

In org mode, if I want to format text a monospace verbatim, i.e. ~...~, if it is inside quotes: ~\"...\"~, it is not formatted (left as is).

<
4条回答
  •  借酒劲吻你
    2020-12-19 11:01

    For small amounts of characters which have some unwanted effect in Emacs org-mode (because being metacharacters) it may be helpful to have a look at special symbols in org-mode (org-entities.el).

    So for example " can be encoded by \quot{} (where the braces pair at the end is not mandatory, but needed if no whitespace follows).

    So instead ="..."= you would write =\quot{}...\quot{}=.

    That is some typing more and looks pretty ugly. But for the latter org-mode has a solution: by C-c C-x \ you can toggle a display magic for those symbols. If the magic is active, so directly after typing \quot{} resp. \quot{} a " will be displayed.

    Besides, this symbols list can easily be extended, f.e.

    (add-to-list 'org-entities
    '("backslash" "\\textbackslash" nil "\\" "\\" "\\" "\\"))
    

    Nevertheless I am heavily missing easier escaping in org-mode, besides the above solution and besides escaping a whole line by a : at its beginning.

    I'd be happy if =verbatim= in all cases would leave the text between the ='s unchanged. Not =this*bold*text=, but =this *bold* text=. Like we know that from each well-designed markup/-down language.

    But, of course, this is better placed at the org-mode development pages. Ideally with a fitting patch... :-)

提交回复
热议问题