James Harkins <jamshar...@gmail.com> writes: > I have: > > Western notation supports a type of /polyphony/[fn:1] > > I get: > > Western notation supports a type of /polyphony/\footnote{ ... blah blah > ... } >
I believe you have to fiddle with org-emphasis-regexp-components. The default value is (" ('\"{" "- .,:!?;'\")}\\" " ,\"'" "." 1) Pretty, isn't it? Looks like Perl :-) There are four strings and an integer in that list, if you squint hard enough and count (unescaped) double quotes. The second string in this list (i.e. "- .,:!?;'\")}\\") specifies the set of characters that are allowed as the "postmatch", and they include the dash, a space, a tab, a period, a comma, a colon, an exclamation mark, a question mark, a semicolon, a single quote, a double quote (escaped as \"), a closing paren, a closing curly brace and a backslash (which has to be escaped as \\ above). Note that this set does *not* include the opening square bracket, so [ is not a valid postmatch character. That's what needs to be done to have the parser recognize ``.../foo/[bar]'' as an italics ``foo''. So we add it, but one has to be careful: you cannot add it at the beginning of the string, before the dash. This whole set becomes a character class in the *real* regexp, org-emph-re, that is used by the rest of the code and if the dash does not come at the very beginning, it takes on a special meaning, which we don't want to give it in this case. So let's add the square bracket at the end of that string: "- .,:!?;'\")}\\[" That should be safe. BTW, don't cut and paste anything from here: I'm not sure that I've cut and pasted everything correctly in the first place and additionally mailers tend to mangle various things in email: this is much too delicate to withstand even the slightest kind of mangling. Best to copy the default definition of org-emphasis-regexp-components from org.el into your .emacs and make the modification there. Make sure that you restart emacs or reload org after adding the modification: the wheels have to turn again in order to transform the pieces of org-emphasis-regexp-components into the real regexp, org-emph-re. This works (I tested it), but it is rather fiddly, so you have to double and triple check to make sure that you got things right. Maybe there is an easier method: if so, I'd appreciate a pointer. NB: no warranty is offered. If it breaks, you get to pick up the pieces. -- Nick