Re: [O] something in between @@html:@@ and html blocks

2015-12-04 Thread Eric S Fraga
On Friday,  4 Dec 2015 at 10:43, John Kitchin wrote:
> I have an intermediate use case that isn't covered by html snippets or
> blocks, and I wondered if there is a solution to it.
>
> What I want is to put a large tooltip on a link in html output. The text
> for the tooltip is too large to fit on one line in a @@html:@@ snippet,
> and if I put it in an html block it adds line breaks in the html export.

Does #+HTML: work (i.e. does not introduce line breaks)?
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-363-g5c13a6



[O] something in between @@html:@@ and html blocks

2015-12-04 Thread John Kitchin
I have an intermediate use case that isn't covered by html snippets or
blocks, and I wondered if there is a solution to it.

What I want is to put a large tooltip on a link in html output. The text
for the tooltip is too large to fit on one line in a @@html:@@ snippet,
and if I put it in an html block it adds line breaks in the html export.

Is there a regular way to avoid this, e.g. to insert a large snippet?

Thanks,

-- 
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] something in between @@html:@@ and html blocks

2015-12-04 Thread Rasmus
John Kitchin  writes:

> I have an intermediate use case that isn't covered by html snippets or
> blocks, and I wondered if there is a solution to it.
>
> What I want is to put a large tooltip on a link in html output. The text
> for the tooltip is too large to fit on one line in a @@html:@@ snippet,
> and if I put it in an html block it adds line breaks in the html export.
>
> Is there a regular way to avoid this, e.g. to insert a large snippet?

How about a custom link type?  I thought that’s general solution to life,
the universe and everything ;)

If a lot of the width is due to html cruft you might be able to shorten
redundant parts via a macro, but I’m sure you thought about that...  You
can also add more snippets, one after the other:

 @@html:xx@@
 @@html:xx@@

Another hackish solutions would be to use a filter + footnotes with a
recognizable pattern, but I’m not sure I would go that way...

I doubt this help, but those were my 2 cents.

Rasmus

-- 
However beautiful the theory, you should occasionally look at the evidence




Re: [O] something in between @@html:@@ and html blocks

2015-12-04 Thread Nicolas Goaziou
Hello,

John Kitchin  writes:

> I have an intermediate use case that isn't covered by html snippets or
> blocks, and I wondered if there is a solution to it.
>
> What I want is to put a large tooltip on a link in html output. The text
> for the tooltip is too large to fit on one line in a @@html:@@
> snippet,

Why would you need to fit on one line? Export snippets can span over
multiple lines, as long as you don't introduce a paragraph separator.

> and if I put it in an html block it adds line breaks in the html export.
>
> Is there a regular way to avoid this, e.g. to insert a large snippet?
>
> Thanks,

Regards,

-- 
Nicolas Goaziou



Re: [O] something in between @@html:@@ and html blocks

2015-12-04 Thread Nicolas Goaziou
John Kitchin  writes:

> I tried putting an Emacs function docstring as a tooltip and it had a
> paragraph break in it.

As any inline element, an export snippet cannot contain an empty element
(which is a paragraph separator).  I assume the docstring contained one.

Regards,



Re: [O] something in between @@html:@@ and html blocks

2015-12-04 Thread John Kitchin
I tried putting an Emacs function docstring as a tooltip and it had a
paragraph break in it.

On Friday, December 4, 2015, Nicolas Goaziou  wrote:

> Hello,
>
> John Kitchin > writes:
>
> > I have an intermediate use case that isn't covered by html snippets or
> > blocks, and I wondered if there is a solution to it.
> >
> > What I want is to put a large tooltip on a link in html output. The text
> > for the tooltip is too large to fit on one line in a @@html:@@
> > snippet,
>
> Why would you need to fit on one line? Export snippets can span over
> multiple lines, as long as you don't introduce a paragraph separator.
>
> > and if I put it in an html block it adds line breaks in the html export.
> >
> > Is there a regular way to avoid this, e.g. to insert a large snippet?
> >
> > Thanks,
>
> Regards,
>
> --
> Nicolas Goaziou
>


-- 
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] something in between @@html:@@ and html blocks

2015-12-04 Thread John Kitchin
it doesn't seem to work.

Eric S Fraga writes:

> On Friday,  4 Dec 2015 at 10:43, John Kitchin wrote:
>> I have an intermediate use case that isn't covered by html snippets or
>> blocks, and I wondered if there is a solution to it.
>>
>> What I want is to put a large tooltip on a link in html output. The text
>> for the tooltip is too large to fit on one line in a @@html:@@ snippet,
>> and if I put it in an html block it adds line breaks in the html export.
>
> Does #+HTML: work (i.e. does not introduce line breaks)?

--
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] something in between @@html:@@ and html blocks

2015-12-04 Thread John Kitchin

Rasmus writes:

> John Kitchin  writes:
>
>> I have an intermediate use case that isn't covered by html snippets or
>> blocks, and I wondered if there is a solution to it.
>>
>> What I want is to put a large tooltip on a link in html output. The text
>> for the tooltip is too large to fit on one line in a @@html:@@ snippet,
>> and if I put it in an html block it adds line breaks in the html export.
>>
>> Is there a regular way to avoid this, e.g. to insert a large snippet?
>
> How about a custom link type?  I thought that’s general solution to life,
> the universe and everything ;)

It works for a lot of things, but not this ;) Links do not work with
line breaks in them.

>
> If a lot of the width is due to html cruft you might be able to shorten
> redundant parts via a macro, but I’m sure you thought about that...  You
> can also add more snippets, one after the other:
>
>  @@html:xx@@
>  @@html:xx@@
>
> Another hackish solutions would be to use a filter + footnotes with a
> recognizable pattern, but I’m not sure I would go that way...

This is probably my solution. Replace the things prior to export with
uuids, export, and put then post filter to replace the uuids with the
html code. It turns out I did this once before to get matlab to post to
Wordpress
(https://github.com/jkitchin/matlab-wordpress/blob/master/blogpost.m#L177)
where I had to protect some text temporarily, and then deprotect it.

Thanks!

>
> I doubt this help, but those were my 2 cents.
>
> Rasmus

--
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