public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: user account <mail.user.sadf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: converting links to footnotes... including page number in footnote??
Date: Sat, 26 Nov 2022 07:35:31 -0800 (PST)	[thread overview]
Message-ID: <ffe38e06-2703-4e9b-b1ca-48310162c97dn@googlegroups.com> (raw)
In-Reply-To: <25474.6699.105043.345344-4mDQ13Tdud8Jw5R7aSpS0dP8p4LwMBBS@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 5095 bytes --]

Prince looks decent, but I'm reluctant to use anything that's not freedom 
software.

On Saturday, November 26, 2022 at 8:52:52 AM UTC-5 Håkon Wium Lie wrote:

> If you use Prince as the PDF generator, you can produce quite advanced 
> footnotes:
>
> https://css4.pub/2022/footnotes/
>
> Also, Prince supports sidenotes, aiming for the holy grail of Tufte-like 
> layout:
>
> https://css4.pub
> https://css4.pub/2022/sidenotes/
>
> To add the page number of the linked-to page (which was the original
> question), Prince supports the "target-counter" feature in CSS.
>
> https://www.princexml.com/doc/gen-content/
>
> This is often used to create ToCs:
>
> https://css4.pub/2022/toc/
>
> (Prince is a commercial product, but free for non-commercial use. I work 
> for the company.)
>
> Håkon Wium Lie haa...-EO96REbE7qRuMpJDpNschA@public.gmane.org www.wiumlie.no/en 
>
> > Thanks! Yeah injecting html in the intermediary document doesn't sound 
> very 
> > promising either (again, because the pages have to be built first before 
> > footnotes updated with page #s) so maybe I'll abandon weasyprint in this 
> > case, if this would be easy to do with a *Tex pdf engine. In that 
> case... 
> > how would one go about this? Would a lua filter be more capable with a 
> > different pdf engine or would a different mechanism be used?
> > 
> > On Saturday, November 26, 2022 at 5:28:31 AM UTC-5 Bastien Dumont wrote:
> > 
> > > The problem is that Pandoc does not produce the PDF document: it 
> produces 
> > > the intermediary HTML document that is processed by weasyprint to 
> produce 
> > > the PDF. So you cannot get page numbers in a Lua filter.
> > >
> > > However, you can inject raw HTML code in the intermediary file (or in 
> your 
> > > CSS) that will make weasyprint print the page numbers. The question is 
> > > whether such HTML code exists. It certainly would be possible to do 
> this if 
> > > you converted to PDF via LaTeX, ConTeXt or groff, but I don't know if 
> it is 
> > > possible via weasyprint.
> > >
> > > Le Friday 25 November 2022 à 04:33:05PM, user account a écrit :
> > > > Using pandoc with weasyprint pdf engine to turn the markdown files 
> from 
> > > a blog
> > > > (static site generator does the html conversion) into a pdf for 
> print.
> > > > 
> > > > Would it be possible, perhaps with a custom lua filter or some other 
> > > mechanism,
> > > > to add the page number of the linked-to page? The page numbers won't 
> be 
> > > known
> > > > until pandoc has already created the document, and I don't know 
> where in 
> > > 'the
> > > > pipeline' the lua filter intervenes compared to when the pages 
> exist...? 
> > > And
> > > > If the pages exist with their numbers earlier enough, is there an 
> object 
> > > or
> > > > something from which lua can get the page number?
> > > > 
> > > > I haven't found anything about page numbers in https://pandoc.org/
> > > > lua-filters.html#module-pandoc.utils ...am I looking in the wrong 
> place? 
> > > Can
> > > > anyone tell me anything about this?
> > > > 
> > > > It's an intimidating rabbit hole for me, particularly because I see 
> no 
> > > mention
> > > > of "page number" there in the docs, which makes it seem kinda 
> hopeless
> > > > actually. But maybe one of you know the way and could point me in 
> that
> > > > direction?
> > > > 
> > > > --
> > > > 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 [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > > > To view this discussion on the web visit [2]
> > > https://groups.google.com/d/msgid/
> > > > pandoc-discuss/a93afb43-c939-40c1-868f-1db8eded17d8n%
> 40googlegroups.com.
> > > > 
> > > > References:
> > > > 
> > > > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > > > [2] 
> > > 
> https://groups.google.com/d/msgid/pandoc-discuss/a93afb43-c939-40c1-868f-1db8eded17d8n%40googlegroups.com?utm_medium=email&utm_source=footer
> > >
> > >
> > 
> > -- 
> > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/2aec84ad-a750-48f2-a0c2-ad7572dcca11n%40googlegroups.com
> .
>

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ffe38e06-2703-4e9b-b1ca-48310162c97dn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 9477 bytes --]

  parent reply	other threads:[~2022-11-26 15:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-26  0:33 user account
     [not found] ` <a93afb43-c939-40c1-868f-1db8eded17d8n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-26 10:28   ` Bastien DUMONT
2022-11-26 13:21     ` user account
     [not found]       ` <2aec84ad-a750-48f2-a0c2-ad7572dcca11n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-26 13:52         ` 'Håkon Wium Lie' via pandoc-discuss
     [not found]           ` <25474.6699.105043.345344-4mDQ13Tdud8Jw5R7aSpS0dP8p4LwMBBS@public.gmane.org>
2022-11-26 15:35             ` user account [this message]
2022-11-26 17:34         ` Bastien DUMONT
2022-11-26 22:30           ` user account
     [not found]             ` <480d0274-2324-43d7-9f74-1bbfc08fcbd0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-27  8:56               ` Bastien DUMONT
2022-11-27 14:13                 ` user account
     [not found]                   ` <e969f1ca-c6bf-4a5e-b53f-86aa0a444db2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-27 15:50                     ` Bastien DUMONT
2022-11-27 16:24                       ` user account
     [not found]                         ` <858c5a07-89a0-4daa-803f-e0d9d50ca9c6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-27 17:01                           ` Bastien DUMONT
2022-11-28  4:01                             ` user account
     [not found]                               ` <80adcd1d-bc18-4b38-b3a9-0265d0922790n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-28 17:04                                 ` Pablo Rodríguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ffe38e06-2703-4e9b-b1ca-48310162c97dn@googlegroups.com \
    --to=mail.user.sadf-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).