I have done this using Pollen to generate hyperlinks when outputting to 
HTML and footnotes when outputting to LaTeX/PDF. More recently I’m toying 
with a LaTeX template for use with a Pollen project that collects all the 
links as end-notes and puts them at the end of the document with QR codes.

As far as print goes, if you can figure out the LaTeX code to make it 
happen then it's quite straightforward to use Pollen to generate that code, 
then use a LaTeX compiler to process the result to PDF.

Your aside example would be pretty easy to implement. Mobi is basically 
HTML iirc, and in LaTeX you would just use the \margginnote command or 
similar. 

To sum up: everything you stated is possible, but in addition to learning 
Pollen and Racket, you will have to learn LaTeX, which may not be fun. Go 
ahead and get started on the tutorials! 
(https://docs.racket-lang.org/pollen/index.html)

I see your sig mentions Minneapolis, which is where I am. On the off chance 
that you’re ever in town and want to meet up and talk about this stuff, let 
me know!

—Joel D

On Tuesday, February 13, 2018 at 11:39:11 PM UTC-6, Benjamin Melançon wrote:
>
> In our content we have a bunch of URLs referenced like this: ◊link["
> http://example.com"]{example} 
>
> Output target #1 (HTML; maybe ebooks) is simple: Have the link function 
> output <a href="http://example.com";>example</a>.
>
> Output target #3 (a printed book; an information sheet with an online 
> companion providing all the links) is pretty simple also: Have the link 
> function output something like *example* (1) and then separately process 
> and generate the list of links like so:  (1)  http://example.com  — 
> although i haven't yet learned how one could add numbers, or how to pull 
> out semantic elements from a whole document.
>
> Output target #2 (a fancier book, a magazine-like layout) is where i'm 
> looking for examples or reassurance...   here there needs to be an 
> awareness in some function somewhere of how pagination plays out, which 
> seems to me devilishly difficult, as the output of a footnote can affect 
> how much room there is for text and therefore if the linked item to be 
> footnoted appears on that page or not.  So, i'm looking for how Pollen has 
> handled output to paginated media.
>
> Bonus:  A similar situation, but probably requiring a different mechanism, 
> is  ◊aside[This would be the last time he saw his trusty narrator.]{Paul 
> took control of his life and began writing his own story.}  — where in a 
> simple layout, perhaps .mobi, the aside ("This would be the last...") is 
> printed immediately below its associated paragraph ("Paul took...") and in 
> a more complex layout, perhaps meant for print, it is in an space made by 
> an offset in the text to the left or right, or in the margin.
>
> I'm not concerned that this power has to live only in the template; if i 
> have to, say, toggle a variable for when i'm generating output for a medium 
> that can handle hyperlinks or for one that can't, or for mediums that can 
> handle more complex layouts or ones that can't, that's fine.
>
> And i don't need to know how to do all of this, right now.  I just need to 
> be assured this is possible before i start happily marking up the meaning 
> of life, the universe, and everything semantically in Pollen.
>
> My apologies for an attempt to ask an advanced question as a new pollen 
> programmer, which is sure to grate experienced ears.
>
> Thank you!
>
> ben
>
> Boston / Minneapolis
> https://drutopia.org/
>

-- 
You received this message because you are subscribed to the Google Groups 
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pollenpub+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to