Re: [O] force italic mode?

2016-11-18 Thread William Henney
On Fri, Nov 18, 2016 at 12:31 PM, hymie! 
wrote:

> In our last episode, the evil Dr. Lacto had captured our hero,
>   Aaron Ecay , 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
> hy...@lactose.homelinux.net
>
>
>


-- 

  Dr William Henney, Instituto de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia


Re: [O] force italic mode?

2016-11-18 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  Aaron Ecay , 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/~hymiehy...@lactose.homelinux.net




Re: [O] force italic mode?

2016-11-18 Thread Eric Abrahamsen
Aaron Ecay  writes:

> Hi Eric, hi all,
>
> 2016ko azaroak 17an, Eric Abrahamsen-ek idatzi zuen:
>> 
>> John Kitchin  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:@@wuzzy@@html:@@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. 




Re: [O] force italic mode?

2016-11-18 Thread Aaron Ecay
Hi Eric, hi all,

2016ko azaroak 17an, Eric Abrahamsen-ek idatzi zuen:
> 
> John Kitchin  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:@@wuzzy@@html:@@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



Re: [O] force italic mode?

2016-11-17 Thread Eric Abrahamsen
John Kitchin  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:@@wuzzy@@html:@@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




Re: [O] force italic mode?

2016-11-17 Thread John Kitchin
No what Hymie wants is part of the middle of that word italicizes I think.

On Thursday, November 17, 2016, Eric Abrahamsen 
wrote:

> hymie! > 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:@@fuzzywuzzywuzzabear@@html:@@
>
> 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


Re: [O] force italic mode?

2016-11-17 Thread Eric Abrahamsen
hymie!  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:@@fuzzywuzzywuzzabear@@html:@@

For instance. Is that what you meant?




[O] force italic mode?

2016-11-17 Thread hymie!
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!