emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* something in between @@html:@@ and html blocks
@ 2015-12-04 15:43 John Kitchin
  2015-12-04 15:54 ` Eric S Fraga
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: John Kitchin @ 2015-12-04 15:43 UTC (permalink / raw)
  To: Org Mode

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: something in between @@html:@@ and html blocks
  2015-12-04 15:43 something in between @@html:@@ and html blocks John Kitchin
@ 2015-12-04 15:54 ` Eric S Fraga
  2015-12-04 18:51   ` John Kitchin
  2015-12-04 15:58 ` Rasmus
  2015-12-04 20:12 ` Nicolas Goaziou
  2 siblings, 1 reply; 8+ messages in thread
From: Eric S Fraga @ 2015-12-04 15:54 UTC (permalink / raw)
  To: John Kitchin; +Cc: Org Mode

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: something in between @@html:@@ and html blocks
  2015-12-04 15:43 something in between @@html:@@ and html blocks John Kitchin
  2015-12-04 15:54 ` Eric S Fraga
@ 2015-12-04 15:58 ` Rasmus
  2015-12-04 18:57   ` John Kitchin
  2015-12-04 20:12 ` Nicolas Goaziou
  2 siblings, 1 reply; 8+ messages in thread
From: Rasmus @ 2015-12-04 15:58 UTC (permalink / raw)
  To: emacs-orgmode

John Kitchin <jkitchin@andrew.cmu.edu> 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:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@@
     @@html:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@@

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: something in between @@html:@@ and html blocks
  2015-12-04 15:54 ` Eric S Fraga
@ 2015-12-04 18:51   ` John Kitchin
  0 siblings, 0 replies; 8+ messages in thread
From: John Kitchin @ 2015-12-04 18:51 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: Org Mode

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: something in between @@html:@@ and html blocks
  2015-12-04 15:58 ` Rasmus
@ 2015-12-04 18:57   ` John Kitchin
  0 siblings, 0 replies; 8+ messages in thread
From: John Kitchin @ 2015-12-04 18:57 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode


Rasmus writes:

> John Kitchin <jkitchin@andrew.cmu.edu> 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:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@@
>      @@html:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@@
>
> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: something in between @@html:@@ and html blocks
  2015-12-04 15:43 something in between @@html:@@ and html blocks John Kitchin
  2015-12-04 15:54 ` Eric S Fraga
  2015-12-04 15:58 ` Rasmus
@ 2015-12-04 20:12 ` Nicolas Goaziou
  2015-12-04 21:57   ` John Kitchin
  2 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2015-12-04 20:12 UTC (permalink / raw)
  To: John Kitchin; +Cc: Org Mode

Hello,

John Kitchin <jkitchin@andrew.cmu.edu> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: something in between @@html:@@ and html blocks
  2015-12-04 20:12 ` Nicolas Goaziou
@ 2015-12-04 21:57   ` John Kitchin
  2015-12-04 23:03     ` Nicolas Goaziou
  0 siblings, 1 reply; 8+ messages in thread
From: John Kitchin @ 2015-12-04 21:57 UTC (permalink / raw)
  To: John Kitchin, Org Mode

[-- Attachment #1: Type: text/plain, Size: 1133 bytes --]

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 <mail@nicolasgoaziou.fr> wrote:

> Hello,
>
> John Kitchin <jkitchin@andrew.cmu.edu <javascript:;>> 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

[-- Attachment #2: Type: text/html, Size: 1715 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: something in between @@html:@@ and html blocks
  2015-12-04 21:57   ` John Kitchin
@ 2015-12-04 23:03     ` Nicolas Goaziou
  0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Goaziou @ 2015-12-04 23:03 UTC (permalink / raw)
  To: John Kitchin; +Cc: Org Mode

John Kitchin <jkitchin@andrew.cmu.edu> 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,

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-12-04 23:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-04 15:43 something in between @@html:@@ and html blocks John Kitchin
2015-12-04 15:54 ` Eric S Fraga
2015-12-04 18:51   ` John Kitchin
2015-12-04 15:58 ` Rasmus
2015-12-04 18:57   ` John Kitchin
2015-12-04 20:12 ` Nicolas Goaziou
2015-12-04 21:57   ` John Kitchin
2015-12-04 23:03     ` Nicolas Goaziou

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