* How to escape characters in tables
@ 2011-03-02 15:25 Ken.Williams
2011-03-03 15:57 ` Eric S Fraga
2011-03-04 3:07 ` Suvayu Ali
0 siblings, 2 replies; 7+ messages in thread
From: Ken.Williams @ 2011-03-02 15:25 UTC (permalink / raw)
To: emacs-orgmode
I posted a question on Stack Overflow a few days ago, I'm wondering whether someone might want to take a look:
http://stackoverflow.com/questions/5144862/escape-pipe-character-in-org-mode
The issue is that I've got tables whose cells contain the '|' character (it's a table of regular expressions), and I can't seem to figure out how to escape it so that it doesn't mean a delimiter between cells. Anyone have advice or a pointer to the docs I can't seem to find?
Thanks.
--
Ken Williams
Senior Research Scientist
Thomson Reuters
http://labs.thomsonreuters.com
--
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to escape characters in tables
2011-03-02 15:25 How to escape characters in tables Ken.Williams
@ 2011-03-03 15:57 ` Eric S Fraga
2011-03-03 16:02 ` Ken.Williams
2011-03-04 3:07 ` Suvayu Ali
1 sibling, 1 reply; 7+ messages in thread
From: Eric S Fraga @ 2011-03-03 15:57 UTC (permalink / raw)
To: Ken.Williams; +Cc: emacs-orgmode
<Ken.Williams@thomsonreuters.com> writes:
> I posted a question on Stack Overflow a few days ago, I'm wondering
> whether someone might want to take a look:
>
> http://stackoverflow.com/questions/5144862/escape-pipe-character-in-org-mode
>
> The issue is that I've got tables whose cells contain the '|'
> character (it's a table of regular expressions), and I can't seem to
> figure out how to escape it so that it doesn't mean a delimiter
> between cells. Anyone have advice or a pointer to the docs I can't
> seem to find?
I guess it all depends on what you want to do with the resulting
document. You could always insert a character that looks like the '|'
character, such as the unicode "LIGHT VERTICAL BAR" (0x2758) character,
'❘', and I'm sure there are others that could be used... org should
ignore this character as a table delimiter.
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.592.gc431)
--
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to escape characters in tables
2011-03-03 15:57 ` Eric S Fraga
@ 2011-03-03 16:02 ` Ken.Williams
0 siblings, 0 replies; 7+ messages in thread
From: Ken.Williams @ 2011-03-03 16:02 UTC (permalink / raw)
To: e.fraga; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]
On 3/3/11 9:57 AM, "Eric S Fraga" <e.fraga@ucl.ac.uk> wrote:
><Ken.Williams@thomsonreuters.com> writes:
>
>>... I've got tables whose cells contain the '|'
>> character (it's a table of regular expressions), and I can't seem to
>> figure out how to escape it so that it doesn't mean a delimiter
>> between cells. Anyone have advice or a pointer to the docs I can't
>> seem to find?
>
>I guess it all depends on what you want to do with the resulting
>document. You could always insert a character that looks like the '|'
>character, such as the unicode "LIGHT VERTICAL BAR" (0x2758) character,
>'❘', and I'm sure there are others that could be used... org should
>ignore this character as a table delimiter.
Thanks Eric. That's not a great solution in this case, because in order
to work in a regex it needs to be the character '|', 0x7C.
Is there some way to put in characters by ASCII code maybe?
--
Ken Williams
Senior Research Scientist
Thomson Reuters
http://labs.thomsonreuters.com
[-- Attachment #2: Type: text/plain, Size: 157 bytes --]
--
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to escape characters in tables
2011-03-02 15:25 How to escape characters in tables Ken.Williams
2011-03-03 15:57 ` Eric S Fraga
@ 2011-03-04 3:07 ` Suvayu Ali
2011-03-04 15:58 ` Ken.Williams
1 sibling, 1 reply; 7+ messages in thread
From: Suvayu Ali @ 2011-03-04 3:07 UTC (permalink / raw)
To: Ken.Williams; +Cc: emacs-orgmode
On Wed, 2 Mar 2011 09:25:57 -0600
<Ken.Williams@thomsonreuters.com> wrote:
> The issue is that I've got tables whose cells contain the '|'
> character (it's a table of regular expressions), and I can't seem to
> figure out how to escape it so that it doesn't mean a delimiter
> between cells. Anyone have advice or a pointer to the docs I can't
> seem to find?
>
I don't think you can.
http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg00171.html
> Thanks.
>
> --
> Ken Williams
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to escape characters in tables
2011-03-04 3:07 ` Suvayu Ali
@ 2011-03-04 15:58 ` Ken.Williams
2011-03-04 17:41 ` Camille persson
0 siblings, 1 reply; 7+ messages in thread
From: Ken.Williams @ 2011-03-04 15:58 UTC (permalink / raw)
To: fatkasuvayu+linux; +Cc: emacs-orgmode
On 3/3/11 9:07 PM, "Suvayu Ali" <fatkasuvayu+linux@gmail.com> wrote:
>On Wed, 2 Mar 2011 09:25:57 -0600
><Ken.Williams@thomsonreuters.com> wrote:
>
>> The issue is that I've got tables whose cells contain the '|'
>> character (it's a table of regular expressions), and I can't seem to
>> figure out how to escape it so that it doesn't mean a delimiter
>> between cells. Anyone have advice or a pointer to the docs I can't
>> seem to find?
>>
>
>I don't think you can.
I'm making slight progress, actually.
On StackOverflow
(http://stackoverflow.com/questions/5144862/escape-pipe-character-in-org-mo
de), it was suggested to use the \vert{} character escape, which does
work.
However, since this is code (a regular expression), I want it to appear
monospaced, so I'm not out of the woods yet - here's a test case that
shows my intent:
| foo | =m/foo\vert{}foodfight/= |
The \vert{} seems not to work inside a =...= construction. Furthermore,
the =...= construction is problematic there because it conflicts with the
start-of-formula syntax.
--
Ken Williams
Senior Research Scientist
Thomson Reuters
http://labs.thomsonreuters.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to escape characters in tables
2011-03-04 15:58 ` Ken.Williams
@ 2011-03-04 17:41 ` Camille persson
2011-03-07 17:45 ` Ken.Williams
0 siblings, 1 reply; 7+ messages in thread
From: Camille persson @ 2011-03-04 17:41 UTC (permalink / raw)
To: Ken.Williams; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]
Hi Ken,
2011/3/4 <Ken.Williams@thomsonreuters.com>
>
>
>
>
> On 3/3/11 9:07 PM, "Suvayu Ali" <fatkasuvayu+linux@gmail.com> wrote:
>
> >On Wed, 2 Mar 2011 09:25:57 -0600
> ><Ken.Williams@thomsonreuters.com> wrote:
> >
> >> The issue is that I've got tables whose cells contain the '|'
> >> character (it's a table of regular expressions), and I can't seem to
> >> figure out how to escape it so that it doesn't mean a delimiter
> >> between cells. Anyone have advice or a pointer to the docs I can't
> >> seem to find?
> >>
> >
> >I don't think you can.
>
> I'm making slight progress, actually.
>
> On StackOverflow
> (
> http://stackoverflow.com/questions/5144862/escape-pipe-character-in-org-mo
> de), it was suggested to use the \vert{} character escape, which does
> work.
>
> However, since this is code (a regular expression), I want it to appear
> monospaced, so I'm not out of the woods yet - here's a test case that
> shows my intent:
> | foo | =m/foo\vert{}foodfight/= |
>
> The \vert{} seems not to work inside a =...= construction. Furthermore,
> the =...= construction is problematic there because it conflicts with the
> start-of-formula syntax.
>
=...= is used for code so it is printed as it written
You may use \texttt{}
| foo | \texttt{m\/foo\vert{}foodfight\/} |
I don't have emacs right now so I can test it... but it should work
CP
>
>
> --
> Ken Williams
> Senior Research Scientist
> Thomson Reuters
> http://labs.thomsonreuters.com
>
>
>
[-- Attachment #2: Type: text/html, Size: 2663 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to escape characters in tables
2011-03-04 17:41 ` Camille persson
@ 2011-03-07 17:45 ` Ken.Williams
0 siblings, 0 replies; 7+ messages in thread
From: Ken.Williams @ 2011-03-07 17:45 UTC (permalink / raw)
To: camille.persson; +Cc: emacs-orgmode
From: Camille persson <camille.persson@gmail.com>
> 2011/3/4 <Ken.Williams@thomsonreuters.com>
>> [...] here's a test case that shows my intent:
>>
>> | foo | =m/foo\vert{}foodfight/= |
>>
>> The \vert{} seems not to work inside a =...= construction. Furthermore,
>> the =...= construction is problematic there because it conflicts with
>>the
>> start-of-formula syntax.
> =...= is used for code so it is printed as it written
> You may use \texttt{}
> | foo | \texttt{m\/foo\vert{}foodfight\/} |
Unfortunately that doesn't work when exporting to HTML though, I assume
it's for LaTeX export only?
I'd suggest there are 3 things that need to be addressed/fixed in org-mode.
First, the table-parser should respect =...= sections and skip over them,
just like a C preprocessor respects double-quoted string sections.
Second, there should be a way to indicate verbatim sections that doesn't
conflict with formula syntax.
Finally, there should be a way (e.g. \x{...}) to stick in a character by
ASCII/Unicode number. This would help with several issues when a literal
character is intended but it conflicts with a markup character.
--
Ken Williams
Senior Research Scientist
Thomson Reuters
http://labs.thomsonreuters.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-03-07 17:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-02 15:25 How to escape characters in tables Ken.Williams
2011-03-03 15:57 ` Eric S Fraga
2011-03-03 16:02 ` Ken.Williams
2011-03-04 3:07 ` Suvayu Ali
2011-03-04 15:58 ` Ken.Williams
2011-03-04 17:41 ` Camille persson
2011-03-07 17:45 ` Ken.Williams
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).