public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* filter for ePub footnotes
@ 2017-08-23 14:08 Pablo Rodríguez
       [not found] ` <2665838a-f621-7d7d-8646-de7f780f4121-S0/GAf8tV78@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Pablo Rodríguez @ 2017-08-23 14:08 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Dear list,

I would be extremely interested in generating ePub files which contain
real superscript glyphs (from the font embedded in the file).

I can do that with all superscript, but I need a file for the footnote
references.

Would anyone be so kind to create a filter that replaces each digit from
0123456789 with the correspondent digit from ⁰¹²³⁴⁵⁶⁷⁸⁹ inside the
element <a class="footnoteRef">?

I would love to do it myself, but I’m afraid I cannot code.

Many thanks in advance,

Pablo
-- 
http://www.ousia.tk

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/2665838a-f621-7d7d-8646-de7f780f4121%40web.de.
For more options, visit https://groups.google.com/d/optout.


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

* Re: filter for ePub footnotes
       [not found] ` <2665838a-f621-7d7d-8646-de7f780f4121-S0/GAf8tV78@public.gmane.org>
@ 2017-08-23 14:17   ` John MacFarlane
       [not found]     ` <20170823141730.GC22331-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: John MacFarlane @ 2017-08-23 14:17 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

What you want isn't a filter, since the footnote marker is
only created by the writer.  Your best bet is a shell
script that opens the epub zip container, does a regex
substitution on the contents of <a class="footnoteRef">,
and zips it back together again.

+++ Pablo Rodríguez [Aug 23 17 16:08 ]:
>Dear list,
>
>I would be extremely interested in generating ePub files which contain
>real superscript glyphs (from the font embedded in the file).
>
>I can do that with all superscript, but I need a file for the footnote
>references.
>
>Would anyone be so kind to create a filter that replaces each digit from
>0123456789 with the correspondent digit from ⁰¹²³⁴⁵⁶⁷⁸⁹ inside the
>element <a class="footnoteRef">?
>
>I would love to do it myself, but I’m afraid I cannot code.
>
>Many thanks in advance,
>
>Pablo
>-- 
>http://www.ousia.tk
>
>-- 
>You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/2665838a-f621-7d7d-8646-de7f780f4121%40web.de.
>For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20170823141730.GC22331%40Johns-MacBook-Pro.local.
For more options, visit https://groups.google.com/d/optout.


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

* Re: filter for ePub footnotes
       [not found]     ` <20170823141730.GC22331-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
@ 2017-08-23 14:35       ` Pablo Rodríguez
       [not found]         ` <8adc9ebe-b391-209e-29c6-a831438b8468-S0/GAf8tV78@public.gmane.org>
  2017-08-25 17:06       ` BP Jonsson
  1 sibling, 1 reply; 7+ messages in thread
From: Pablo Rodríguez @ 2017-08-23 14:35 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

n 08/23/2017 04:17 PM, John MacFarlane wrote:
> What you want isn't a filter, since the footnote marker is
> only created by the writer.  Your best bet is a shell
> script that opens the epub zip container, does a regex
> substitution on the contents of <a class="footnoteRef">,
> and zips it back together again.

Many thanks for your reply, John.

How could I achieve that? I don’t even know where to start searching.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/8adc9ebe-b391-209e-29c6-a831438b8468%40web.de.
For more options, visit https://groups.google.com/d/optout.


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

* Re: filter for ePub footnotes
       [not found]         ` <8adc9ebe-b391-209e-29c6-a831438b8468-S0/GAf8tV78@public.gmane.org>
@ 2017-08-23 16:01           ` Jan Ulrich Hasecke
       [not found]             ` <6b2c8ffe-418c-d7b2-7ea2-dbe8d93deb04-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Ulrich Hasecke @ 2017-08-23 16:01 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Am 23.08.2017 um 16:35 schrieb Pablo Rodríguez:
> n 08/23/2017 04:17 PM, John MacFarlane wrote:
>> What you want isn't a filter, since the footnote marker is
>> only created by the writer.  Your best bet is a shell
>> script that opens the epub zip container, does a regex
>> substitution on the contents of <a class="footnoteRef">,
>> and zips it back together again.
> 
> Many thanks for your reply, John.
> 
> How could I achieve that? I don’t even know where to start searching.

On linux you could use sed for substitution. Personally, I would do it
with a python script, but any script language will do the trick. And
finally you can knit it together with a Makefile.

juh

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/6b2c8ffe-418c-d7b2-7ea2-dbe8d93deb04%40mailbox.org.
For more options, visit https://groups.google.com/d/optout.


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

* Re: filter for ePub footnotes
       [not found]             ` <6b2c8ffe-418c-d7b2-7ea2-dbe8d93deb04-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
@ 2017-08-23 22:04               ` Pablo Rodríguez
  0 siblings, 0 replies; 7+ messages in thread
From: Pablo Rodríguez @ 2017-08-23 22:04 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 08/23/2017 06:01 PM, Jan Ulrich Hasecke wrote:
> Am 23.08.2017 um 16:35 schrieb Pablo Rodríguez:
>> n 08/23/2017 04:17 PM, John MacFarlane wrote:
>>> What you want isn't a filter, since the footnote marker is
>>> only created by the writer.  Your best bet is a shell
>>> script that opens the epub zip container, does a regex
>>> substitution on the contents of <a class="footnoteRef">,
>>> and zips it back together again.
>>
>> Many thanks for your reply, John.
>>
>> How could I achieve that? I don’t even know where to start searching.
> 
> On linux you could use sed for substitution. Personally, I would do it
> with a python script, but any script language will do the trick. And
> finally you can knit it together with a Makefile.

Many thanks for your reply, Jan-Ulrich.

sed is fine, but I wonder how to replace characters only inside <a
class="footnoteRef">.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c3705553-8d47-e9d2-f41c-955d72031afe%40web.de.
For more options, visit https://groups.google.com/d/optout.


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

* Re: filter for ePub footnotes
       [not found]     ` <20170823141730.GC22331-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
  2017-08-23 14:35       ` Pablo Rodríguez
@ 2017-08-25 17:06       ` BP Jonsson
       [not found]         ` <7d399a63-4157-0898-c88d-23a9d85c45de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  1 sibling, 1 reply; 7+ messages in thread
From: BP Jonsson @ 2017-08-25 17:06 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Den 2017-08-23 kl. 16:17, skrev John MacFarlane:
> What you want isn't a filter, since the footnote marker is
> only created by the writer.

I once wrote a filter which intercepted all notes and replaced 
them with a note reference with a link to a div somewhere else in 
the document which contained the note text, in an item of an 
ordered list, with a link back to the note reference,
i.e. essentially the kind of structure which the HTML writer 
creates for links, except that you could put placeholder 
paragraphs anywhere in the document which were replaced with a div 
containing a list with the text of all notes since the last 
placeholder, which allowed me to put notes at the end of sections,
and to 'localize' notes in a table with the note texts below the 
table and the notes numbered alphabetically rather than with 
'arabic' numbers. There were no Note objects at all in the JSON 
returned to the writer. It could easily be adapted to use Unicode 
superscripts if desired.

/bpj


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

* Re: filter for ePub footnotes
       [not found]         ` <7d399a63-4157-0898-c88d-23a9d85c45de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-08-25 17:40           ` Pablo Rodríguez
  0 siblings, 0 replies; 7+ messages in thread
From: Pablo Rodríguez @ 2017-08-25 17:40 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 08/25/2017 07:06 PM, BP Jonsson wrote:
> Den 2017-08-23 kl. 16:17, skrev John MacFarlane:
>> What you want isn't a filter, since the footnote marker is
>> only created by the writer.
> 
> I once wrote a filter which intercepted all notes and replaced 
> them with a note reference with a link to a div somewhere else in 
> the document which contained the note text, in an item of an 
> ordered list, with a link back to the note reference,
> i.e. essentially the kind of structure which the HTML writer 
> creates for links, except that you could put placeholder 
> paragraphs anywhere in the document which were replaced with a div 
> containing a list with the text of all notes since the last 
> placeholder, which allowed me to put notes at the end of sections,
> and to 'localize' notes in a table with the note texts below the 
> table and the notes numbered alphabetically rather than with 
> 'arabic' numbers. There were no Note objects at all in the JSON 
> returned to the writer. It could easily be adapted to use Unicode 
> superscripts if desired.

I’d be extremely interested in that filter.

I must admit that I don’t understand everything. But if I can place the
div with the all the notes text right after a  #footnotes element, this
would be really awesome.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e2accbab-d880-3232-4c39-1e1ad3d4d9a1%40web.de.
For more options, visit https://groups.google.com/d/optout.


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

end of thread, other threads:[~2017-08-25 17:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23 14:08 filter for ePub footnotes Pablo Rodríguez
     [not found] ` <2665838a-f621-7d7d-8646-de7f780f4121-S0/GAf8tV78@public.gmane.org>
2017-08-23 14:17   ` John MacFarlane
     [not found]     ` <20170823141730.GC22331-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2017-08-23 14:35       ` Pablo Rodríguez
     [not found]         ` <8adc9ebe-b391-209e-29c6-a831438b8468-S0/GAf8tV78@public.gmane.org>
2017-08-23 16:01           ` Jan Ulrich Hasecke
     [not found]             ` <6b2c8ffe-418c-d7b2-7ea2-dbe8d93deb04-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2017-08-23 22:04               ` Pablo Rodríguez
2017-08-25 17:06       ` BP Jonsson
     [not found]         ` <7d399a63-4157-0898-c88d-23a9d85c45de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-08-25 17:40           ` Pablo Rodríguez

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 NNTP newsgroup(s).