emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Multiple underscores crash org latex export; other exporters sur


From: Charles C. Berry
Subject: Re: [O] Multiple underscores crash org latex export; other exporters survive
Date: Mon, 5 Dec 2016 09:30:16 -0800
User-agent: Alpine 2.20 (OSX 67 2015-01-07)

On Sun, 4 Dec 2016, Nicolas Goaziou wrote:

Hello,

Scott Randby <address@hidden> writes:

There is an interesting issue here. I sometimes want to use ~ in a code
snippet, so I can't use ~code snippet~. Yet,

Indeed, this was discussed in this ML. We need some escape character in
Org. A general escape character is a bit ambitious, and not necessarily
useful, but we could introduce one specifically for verbatim and code
markers, much like in macros and verbatim blocks, e.g.

 ~some\~code\=with special\\ characters~

There is a design decision involved: what character can be escaped? It
could be anything, or limit to "~" for code and "=" for verbatim
markers. For example macros limit escape-able characters to "," and "\".
This makes the contents easier to read, but the rule is inconsistent.

Thoughts?

I do not think this is needed.

The existing markup is simple and useful and does not complicate the appearance of the org buffer nor editting it.

More complicated inline markups can be rendered with export snippets, macros, and/or inline src blocks. For example:

--
#+MACRO: code src_code[:eval no :exports code]{$1}

{{{code(y~x)}}}
--

will handle many situations.

If one needs to render something with embedded commas and/or backslashes like

: y~x(z,w)
: cat("here is a newline\n")

then

: src_code{ y~x(z,w) }
: src_code{ cat("here is a newline\n") }

works if `org-babel-default-header-args:code' is

: '((:eval . "no")(:exports . "code"))

HTH,

Chuck



reply via email to

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