* force italic mode? @ 2016-11-17 12:45 hymie! 2016-11-17 16:39 ` Eric Abrahamsen 0 siblings, 1 reply; 8+ messages in thread From: hymie! @ 2016-11-17 12:45 UTC (permalink / raw) To: emacs-orgmode Greetings. (My first question is, can I post from gmane?) I know how to make text italic by /surrounding/ it with /slashes/. I know that there's a variable (org-emphasis-regex-components) that specifies what characters are allowed before or after the markup characters. But let's say I don't want to mess with my document defaults. I just want to specify, in this one particular place, that I have the word fuzzywuzzywuzzabear and I want "wuzzy" to be italic. Is there a way I can do that? --hymie! ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: force italic mode? 2016-11-17 12:45 force italic mode? hymie! @ 2016-11-17 16:39 ` Eric Abrahamsen 2016-11-17 16:46 ` John Kitchin 0 siblings, 1 reply; 8+ messages in thread From: Eric Abrahamsen @ 2016-11-17 16:39 UTC (permalink / raw) To: emacs-orgmode hymie! <hymie@lactose.homelinux.net> writes: > Greetings. > > (My first question is, can I post from gmane?) > > I know how to make text italic by /surrounding/ it with /slashes/. > > I know that there's a variable (org-emphasis-regex-components) that > specifies what characters are allowed before or after the markup > characters. > > But let's say I don't want to mess with my document defaults. I just > want to specify, in this one particular place, that I have the word > > fuzzywuzzywuzzabear > > and I want "wuzzy" to be italic. Is there a way I can do that? You haven't actually said why you can't just write /fuzzywuzzywuzzabear/, but presumably there's some reason that won't work. You might consider literal export snippets, though then you'd need to target each different backend you're exporting to. So you could do: @@html:<emph>@@fuzzywuzzywuzzabear@@html:</emph>@@ For instance. Is that what you meant? ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: force italic mode? 2016-11-17 16:39 ` Eric Abrahamsen @ 2016-11-17 16:46 ` John Kitchin 2016-11-17 17:03 ` Eric Abrahamsen 0 siblings, 1 reply; 8+ messages in thread From: John Kitchin @ 2016-11-17 16:46 UTC (permalink / raw) To: Eric Abrahamsen; +Cc: emacs-orgmode@gnu.org [-- Attachment #1: Type: text/plain, Size: 1387 bytes --] No what Hymie wants is part of the middle of that word italicizes I think. On Thursday, November 17, 2016, Eric Abrahamsen <eric@ericabrahamsen.net> wrote: > hymie! <hymie@lactose.homelinux.net <javascript:;>> writes: > > > Greetings. > > > > (My first question is, can I post from gmane?) > > > > I know how to make text italic by /surrounding/ it with /slashes/. > > > > I know that there's a variable (org-emphasis-regex-components) that > > specifies what characters are allowed before or after the markup > > characters. > > > > But let's say I don't want to mess with my document defaults. I just > > want to specify, in this one particular place, that I have the word > > > > fuzzywuzzywuzzabear > > > > and I want "wuzzy" to be italic. Is there a way I can do that? > > You haven't actually said why you can't just write > /fuzzywuzzywuzzabear/, but presumably there's some reason that won't > work. You might consider literal export snippets, though then you'd need > to target each different backend you're exporting to. So you could do: > > @@html:<emph>@@fuzzywuzzywuzzabear@@html:</emph>@@ > > For instance. Is that what you meant? > > > -- John ----------------------------------- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu [-- Attachment #2: Type: text/html, Size: 2072 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: force italic mode? 2016-11-17 16:46 ` John Kitchin @ 2016-11-17 17:03 ` Eric Abrahamsen 2016-11-18 14:59 ` Aaron Ecay 0 siblings, 1 reply; 8+ messages in thread From: Eric Abrahamsen @ 2016-11-17 17:03 UTC (permalink / raw) To: emacs-orgmode John Kitchin <jkitchin@andrew.cmu.edu> writes: > No what Hymie wants is part of the middle of that word italicizes I > think. Oh, sorry! Don't know how I missed that. Well, still, same solution: fuzzy@@html:<emph>@@wuzzy@@html:</emph>@@wuzzabear So far as I know there's no way to do that *outside* of an export-specific snippet, but I would love to be proved wrong. E ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: force italic mode? 2016-11-17 17:03 ` Eric Abrahamsen @ 2016-11-18 14:59 ` Aaron Ecay 2016-11-18 17:44 ` Eric Abrahamsen 2016-11-18 18:31 ` hymie! 0 siblings, 2 replies; 8+ messages in thread From: Aaron Ecay @ 2016-11-18 14:59 UTC (permalink / raw) To: Eric Abrahamsen, emacs-orgmode Hi Eric, hi all, 2016ko azaroak 17an, Eric Abrahamsen-ek idatzi zuen: > > John Kitchin <jkitchin@andrew.cmu.edu> writes: > >> No what Hymie wants is part of the middle of that word italicizes I >> think. > > Oh, sorry! Don't know how I missed that. Well, still, same solution: > > fuzzy@@html:<emph>@@wuzzy@@html:</emph>@@wuzzabear > > So far as I know there's no way to do that *outside* of an > export-specific snippet, but I would love to be proved wrong. You can accomplish this by using an entity that expands to nothing. The closest entry in org-entities is \zwj (zero width word-joining space): foo\zwj{}/bar/\zwj{}baz I have an entry like the following defined in org-entities-user for this purpose: ("nothing" "" nil "" "" "" "") It might be worth considering adding to org-entities, but I’ve never proposed it as it looks like an ugly hack to me. -- Aaron Ecay ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: force italic mode? 2016-11-18 14:59 ` Aaron Ecay @ 2016-11-18 17:44 ` Eric Abrahamsen 2016-11-18 18:31 ` hymie! 1 sibling, 0 replies; 8+ messages in thread From: Eric Abrahamsen @ 2016-11-18 17:44 UTC (permalink / raw) To: emacs-orgmode Aaron Ecay <aaronecay@gmail.com> writes: > Hi Eric, hi all, > > 2016ko azaroak 17an, Eric Abrahamsen-ek idatzi zuen: >> >> John Kitchin <jkitchin@andrew.cmu.edu> writes: >> >>> No what Hymie wants is part of the middle of that word italicizes I >>> think. >> >> Oh, sorry! Don't know how I missed that. Well, still, same solution: >> >> fuzzy@@html:<emph>@@wuzzy@@html:</emph>@@wuzzabear >> >> So far as I know there's no way to do that *outside* of an >> export-specific snippet, but I would love to be proved wrong. > > You can accomplish this by using an entity that expands to nothing. The > closest entry in org-entities is \zwj (zero width word-joining space): > > foo\zwj{}/bar/\zwj{}baz > > I have an entry like the following defined in org-entities-user for this > purpose: > > ("nothing" "" nil "" "" "" "") > > It might be worth considering adding to org-entities, but I’ve never > proposed it as it looks like an ugly hack to me. Huh... but with the \zwj{} trick the /bar/ still isn't recognized as italic -- I think that was the OP's main hope. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: force italic mode? 2016-11-18 14:59 ` Aaron Ecay 2016-11-18 17:44 ` Eric Abrahamsen @ 2016-11-18 18:31 ` hymie! 2016-11-19 0:39 ` William Henney 1 sibling, 1 reply; 8+ messages in thread From: hymie! @ 2016-11-18 18:31 UTC (permalink / raw) To: emacs-orgmode In our last episode, the evil Dr. Lacto had captured our hero, Aaron Ecay <aaronecay@gmail.com>, who said: > You can accomplish this by using an entity that expands to nothing. The > closest entry in org-entities is \zwj (zero width word-joining space): > > foo\zwj{}/bar/\zwj{}baz This doesn't work for me. :( It works to the left of the zwj, such as =foo=\zwj{}bar ...but not to the right as you did above. It's hard to read the value I have for org-emphasis-regexp-components but it looks like } is in there, so I guess it should be working? --hymie! http://lactose.homelinux.net/~hymie hymie@lactose.homelinux.net ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: force italic mode? 2016-11-18 18:31 ` hymie! @ 2016-11-19 0:39 ` William Henney 0 siblings, 0 replies; 8+ messages in thread From: William Henney @ 2016-11-19 0:39 UTC (permalink / raw) To: hymie!; +Cc: emacs-org [-- Attachment #1: Type: text/plain, Size: 1900 bytes --] On Fri, Nov 18, 2016 at 12:31 PM, hymie! <hymie@lactose.homelinux.net> wrote: > In our last episode, the evil Dr. Lacto had captured our hero, > Aaron Ecay <aaronecay@gmail.com>, who said: > > You can accomplish this by using an entity that expands to nothing. The > > closest entry in org-entities is \zwj (zero width word-joining space): > > > > foo\zwj{}/bar/\zwj{}baz > > This doesn't work for me. :( > > It works to the left of the zwj, such as > =foo=\zwj{}bar > > ...but not to the right as you did above. > > It's hard to read the value I have for org-emphasis-regexp-components > but it looks like } is in there, so I guess it should be working? > > No, it is only in the POSTMATCH part. If you add it to the PREMATCH part too, then your example would work. But I think it would be neater to put a pair of literal "zero width space" characters in your file. I managed to get this to work by doing: (setq org-emphasis-regexp-components '("[:space:][:cntrl:]('\"{}" "[:space:][:cntrl:]-.,:!?;'\")}\\[" "[:space:][:cntrl:]" "." 1)) This means you can write "fuzzy/wuzzy/wuzzabear" where there is a 0x200B character (ZERO WIDTH SPACE) either side of /wuzzy/ (hopefully this will survive in the email). I inserted the characters with "C-x 8 RET ...". In case you prefer to have something more visible in the source file, I also made it so you can use any ascii control character to bracket the delimiters. For instance, the NULL character: "fuzzy^@/wuzzy/^@bear". Note that those are not real NULLs, but are how they appear in the emacs buffer. You can insert them with "C-q 0 RET". Will > --hymie! http://lactose.homelinux.net/~hymie > hymie@lactose.homelinux.net > > > -- Dr William Henney, Instituto de Radioastronomía y Astrofísica, Universidad Nacional Autónoma de México, Campus Morelia [-- Attachment #2: Type: text/html, Size: 3148 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-11-19 0:39 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-11-17 12:45 force italic mode? hymie! 2016-11-17 16:39 ` Eric Abrahamsen 2016-11-17 16:46 ` John Kitchin 2016-11-17 17:03 ` Eric Abrahamsen 2016-11-18 14:59 ` Aaron Ecay 2016-11-18 17:44 ` Eric Abrahamsen 2016-11-18 18:31 ` hymie! 2016-11-19 0:39 ` William Henney
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).