public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Multiple HTML file (chunked) output with template
@ 2022-11-04 12:45 Luís de Sousa
       [not found] ` <264eeee0-68c8-4389-a5c5-12563c6926f6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Luís de Sousa @ 2022-11-04 12:45 UTC (permalink / raw)
  To: pandoc-discuss


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

Dear all,

I am currently working on a long document that must served as a web page. 
The single file output is becoming too slow and cumbersome for readers. I 
am aware this functionality is not available, but a Feature Request is open 
[0]. 

In that issue there are some hints to this issue being addressable with a 
template [1]. I have tried many HTML templates, but never seen one that 
would split a long document in a set of small files. Would there be an 
example somewhere I could follow? Otherwise, could someone provide a 
general idea of how such template would function?

Thank you.

[0] https://github.com/jgm/pandoc/issues/6122

[1] https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340

-- 
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/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com.

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

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

* Re: Multiple HTML file (chunked) output with template
       [not found] ` <264eeee0-68c8-4389-a5c5-12563c6926f6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-11-04 16:51   ` 'William Lupton' via pandoc-discuss
       [not found]     ` <CAEe_xxhS3ePa-k7boYMGzHnOsaNPCi4=nH-N8j7yLP8PAE6RCw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: 'William Lupton' via pandoc-discuss @ 2022-11-04 16:51 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

See https://usp.technology/specification for an example of how the
Broadband Forum has recently been publishing some specs. This output is
generated via an html-multi-writer.lua custom writer that contains the
logic for splitting the output into multiple files (based on header level
and/or specific classes). The writer also takes care of generating the
navigation bar that you see at the top and bottom of the pages. The
multiple files are then passed through pandoc again (to add the overall
sidebar ToC and the top/bottom navigation bars, and to generate multiple
standalone docs).

Please let me know if you'd like more details (the overall setup is not
very easily shareable, because it's heavily dependent on rather complicated
make rules, but I could probably share the custom writer and give some
example command lines.)

On Fri, 4 Nov 2022 at 12:45, Luís de Sousa <luis.a.de.sousa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:

> Dear all,
>
> I am currently working on a long document that must served as a web page.
> The single file output is becoming too slow and cumbersome for readers. I
> am aware this functionality is not available, but a Feature Request is open
> [0].
>
> In that issue there are some hints to this issue being addressable with a
> template [1]. I have tried many HTML templates, but never seen one that
> would split a long document in a set of small files. Would there be an
> example somewhere I could follow? Otherwise, could someone provide a
> general idea of how such template would function?
>
> Thank you.
>
> [0] https://github.com/jgm/pandoc/issues/6122
>
> [1] https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340
>
> --
> 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/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxhS3ePa-k7boYMGzHnOsaNPCi4%3DnH-N8j7yLP8PAE6RCw%40mail.gmail.com.

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

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

* Re: Multiple HTML file (chunked) output with template
       [not found]     ` <CAEe_xxhS3ePa-k7boYMGzHnOsaNPCi4=nH-N8j7yLP8PAE6RCw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-11-07  9:22       ` Luís de Sousa
       [not found]         ` <cb3753d7-e845-4a72-a1aa-e93086a32f11n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Luís de Sousa @ 2022-11-07  9:22 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi there. That is precisely the kind of output I would like to have. 
Similar to what tools like mdBook produce. I would be glad if you could 
share more details on that custom writer.

Thank you and regards.

On Friday, 4 November 2022 at 17:51:24 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org 
wrote:

> See https://usp.technology/specification for an example of how the 
> Broadband Forum has recently been publishing some specs. This output is 
> generated via an html-multi-writer.lua custom writer that contains the 
> logic for splitting the output into multiple files (based on header level 
> and/or specific classes). The writer also takes care of generating the 
> navigation bar that you see at the top and bottom of the pages. The 
> multiple files are then passed through pandoc again (to add the overall 
> sidebar ToC and the top/bottom navigation bars, and to generate multiple 
> standalone docs).
>
> Please let me know if you'd like more details (the overall setup is not 
> very easily shareable, because it's heavily dependent on rather complicated 
> make rules, but I could probably share the custom writer and give some 
> example command lines.)
>
> On Fri, 4 Nov 2022 at 12:45, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>> Dear all,
>>
>> I am currently working on a long document that must served as a web page. 
>> The single file output is becoming too slow and cumbersome for readers. I 
>> am aware this functionality is not available, but a Feature Request is open 
>> [0]. 
>>
>> In that issue there are some hints to this issue being addressable with a 
>> template [1]. I have tried many HTML templates, but never seen one that 
>> would split a long document in a set of small files. Would there be an 
>> example somewhere I could follow? Otherwise, could someone provide a 
>> general idea of how such template would function?
>>
>> Thank you.
>>
>> [0] https://github.com/jgm/pandoc/issues/6122
>>
>> [1] https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340
>>
>> -- 
>> 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/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%40googlegroups.com.

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

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

* Re: Multiple HTML file (chunked) output with template
       [not found]         ` <cb3753d7-e845-4a72-a1aa-e93086a32f11n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-11-07 14:46           ` 'William Lupton' via pandoc-discuss
       [not found]             ` <CAEe_xxj6Bht_r9A9ngmpYyseaOjeifv-ONFgZ8quUd6rONTC_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: 'William Lupton' via pandoc-discuss @ 2022-11-07 14:46 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

I've created this gist:
https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf

I added a README.md and hope that there's enough info to get going.
Please let me know if not.

(Please note that this writer does some other things too, which might need
to be stripped out. Also, it's an old-style writer... I haven't got around
to updating it yet,)

On Mon, 7 Nov 2022 at 09:22, Luís de Sousa <luis.a.de.sousa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:

> Hi there. That is precisely the kind of output I would like to have.
> Similar to what tools like mdBook produce. I would be glad if you could
> share more details on that custom writer.
>
> Thank you and regards.
>
> On Friday, 4 November 2022 at 17:51:24 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org
> wrote:
>
>> See https://usp.technology/specification for an example of how the
>> Broadband Forum has recently been publishing some specs. This output is
>> generated via an html-multi-writer.lua custom writer that contains the
>> logic for splitting the output into multiple files (based on header level
>> and/or specific classes). The writer also takes care of generating the
>> navigation bar that you see at the top and bottom of the pages. The
>> multiple files are then passed through pandoc again (to add the overall
>> sidebar ToC and the top/bottom navigation bars, and to generate multiple
>> standalone docs).
>>
>> Please let me know if you'd like more details (the overall setup is not
>> very easily shareable, because it's heavily dependent on rather complicated
>> make rules, but I could probably share the custom writer and give some
>> example command lines.)
>>
>> On Fri, 4 Nov 2022 at 12:45, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>>> Dear all,
>>>
>>> I am currently working on a long document that must served as a web
>>> page. The single file output is becoming too slow and cumbersome for
>>> readers. I am aware this functionality is not available, but a Feature
>>> Request is open [0].
>>>
>>> In that issue there are some hints to this issue being addressable with
>>> a template [1]. I have tried many HTML templates, but never seen one that
>>> would split a long document in a set of small files. Would there be an
>>> example somewhere I could follow? Otherwise, could someone provide a
>>> general idea of how such template would function?
>>>
>>> Thank you.
>>>
>>> [0] https://github.com/jgm/pandoc/issues/6122
>>>
>>> [1] https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340
>>>
>>> --
>>> 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/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxj6Bht_r9A9ngmpYyseaOjeifv-ONFgZ8quUd6rONTC_g%40mail.gmail.com.

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

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

* Re: Multiple HTML file (chunked) output with template
       [not found]             ` <CAEe_xxj6Bht_r9A9ngmpYyseaOjeifv-ONFgZ8quUd6rONTC_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-11-09 16:03               ` Luís de Sousa
       [not found]                 ` <1ef6858a-0a37-4f5f-a88b-eff2479a8130n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Luís de Sousa @ 2022-11-09 16:03 UTC (permalink / raw)
  To: pandoc-discuss


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

Thank you very much for sharing, that looks very promising.

Pandoc can't run the script though, says it can't find the utils package. I 
installed luarocks and with it lua-utils but the error prevails:

$ pandoc multi-test.md -t html-multi-writer.lua -o output/multi-test.html
Error running Lua:
html-multi-writer.lua:21: module 'utils' not found:
    no field package.preload['utils']
    no file '/usr/local/share/lua/5.4/utils.lua'
    no file '/usr/local/share/lua/5.4/utils/init.lua'
    no file '/usr/local/lib/lua/5.4/utils.lua'
    no file '/usr/local/lib/lua/5.4/utils/init.lua'
    no file './utils.lua'
    no file './utils/init.lua'
    no file '/usr/local/lib/lua/5.4/utils.so'
    no file '/usr/local/lib/lua/5.4/loadall.so'
    no file './utils.so'
stack traceback:
    html-multi-writer.lua:21: in main chunk

P.S.: would you consider creating a repository for this work? I would like 
to automate the second stage with bash, shouldn't be too hard.

On Monday, 7 November 2022 at 15:46:58 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org 
wrote:

> I've created this gist: 
> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf
>
> I added a README.md and hope that there's enough info to get going. 
> Please let me know if not.
>
> (Please note that this writer does some other things too, which might need 
> to be stripped out. Also, it's an old-style writer... I haven't got around 
> to updating it yet,)
>
> On Mon, 7 Nov 2022 at 09:22, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>> Hi there. That is precisely the kind of output I would like to have. 
>> Similar to what tools like mdBook produce. I would be glad if you could 
>> share more details on that custom writer.
>>
>> Thank you and regards.
>>
>> On Friday, 4 November 2022 at 17:51:24 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org 
>> wrote:
>>
>>> See https://usp.technology/specification for an example of how the 
>>> Broadband Forum has recently been publishing some specs. This output is 
>>> generated via an html-multi-writer.lua custom writer that contains the 
>>> logic for splitting the output into multiple files (based on header level 
>>> and/or specific classes). The writer also takes care of generating the 
>>> navigation bar that you see at the top and bottom of the pages. The 
>>> multiple files are then passed through pandoc again (to add the overall 
>>> sidebar ToC and the top/bottom navigation bars, and to generate multiple 
>>> standalone docs).
>>>
>>> Please let me know if you'd like more details (the overall setup is not 
>>> very easily shareable, because it's heavily dependent on rather complicated 
>>> make rules, but I could probably share the custom writer and give some 
>>> example command lines.)
>>>
>>> On Fri, 4 Nov 2022 at 12:45, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>
>>>> Dear all,
>>>>
>>>> I am currently working on a long document that must served as a web 
>>>> page. The single file output is becoming too slow and cumbersome for 
>>>> readers. I am aware this functionality is not available, but a Feature 
>>>> Request is open [0]. 
>>>>
>>>> In that issue there are some hints to this issue being addressable with 
>>>> a template [1]. I have tried many HTML templates, but never seen one that 
>>>> would split a long document in a set of small files. Would there be an 
>>>> example somewhere I could follow? Otherwise, could someone provide a 
>>>> general idea of how such template would function?
>>>>
>>>> Thank you.
>>>>
>>>> [0] https://github.com/jgm/pandoc/issues/6122
>>>>
>>>> [1] https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340
>>>>
>>>> -- 
>>>> 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/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com 
>>>> <https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%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/cb3753d7-e845-4a72-a1aa-e93086a32f11n%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%40googlegroups.com.

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

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

* Re: Multiple HTML file (chunked) output with template
       [not found]                 ` <1ef6858a-0a37-4f5f-a88b-eff2479a8130n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-11-09 18:28                   ` 'William Lupton' via pandoc-discuss
       [not found]                     ` <CAEe_xxjtN8XAhYgOti=uKZ1Pk-h4YtM5xk96s5283oS0rgfD9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: 'William Lupton' via pandoc-discuss @ 2022-11-09 18:28 UTC (permalink / raw)
  To: pandoc-discuss

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

Oh sorry, yes, utils is one of mine! I'll look into this tomorrow...

On Wed, 9 Nov 2022, 16:03 Luís de Sousa, <luis.a.de.sousa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> Thank you very much for sharing, that looks very promising.
>
> Pandoc can't run the script though, says it can't find the utils package.
> I installed luarocks and with it lua-utils but the error prevails:
>
> $ pandoc multi-test.md -t html-multi-writer.lua -o output/multi-test.html
> Error running Lua:
> html-multi-writer.lua:21: module 'utils' not found:
>     no field package.preload['utils']
>     no file '/usr/local/share/lua/5.4/utils.lua'
>     no file '/usr/local/share/lua/5.4/utils/init.lua'
>     no file '/usr/local/lib/lua/5.4/utils.lua'
>     no file '/usr/local/lib/lua/5.4/utils/init.lua'
>     no file './utils.lua'
>     no file './utils/init.lua'
>     no file '/usr/local/lib/lua/5.4/utils.so'
>     no file '/usr/local/lib/lua/5.4/loadall.so'
>     no file './utils.so'
> stack traceback:
>     html-multi-writer.lua:21: in main chunk
>
> P.S.: would you consider creating a repository for this work? I would like
> to automate the second stage with bash, shouldn't be too hard.
>
> On Monday, 7 November 2022 at 15:46:58 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org
> wrote:
>
>> I've created this gist:
>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf
>>
>> I added a README.md and hope that there's enough info to get going.
>> Please let me know if not.
>>
>> (Please note that this writer does some other things too, which might
>> need to be stripped out. Also, it's an old-style writer... I haven't got
>> around to updating it yet,)
>>
>> On Mon, 7 Nov 2022 at 09:22, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>>> Hi there. That is precisely the kind of output I would like to have.
>>> Similar to what tools like mdBook produce. I would be glad if you could
>>> share more details on that custom writer.
>>>
>>> Thank you and regards.
>>>
>>> On Friday, 4 November 2022 at 17:51:24 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org
>>> wrote:
>>>
>>>> See https://usp.technology/specification for an example of how the
>>>> Broadband Forum has recently been publishing some specs. This output is
>>>> generated via an html-multi-writer.lua custom writer that contains the
>>>> logic for splitting the output into multiple files (based on header level
>>>> and/or specific classes). The writer also takes care of generating the
>>>> navigation bar that you see at the top and bottom of the pages. The
>>>> multiple files are then passed through pandoc again (to add the overall
>>>> sidebar ToC and the top/bottom navigation bars, and to generate multiple
>>>> standalone docs).
>>>>
>>>> Please let me know if you'd like more details (the overall setup is not
>>>> very easily shareable, because it's heavily dependent on rather complicated
>>>> make rules, but I could probably share the custom writer and give some
>>>> example command lines.)
>>>>
>>>> On Fri, 4 Nov 2022 at 12:45, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>> wrote:
>>>>
>>>>> Dear all,
>>>>>
>>>>> I am currently working on a long document that must served as a web
>>>>> page. The single file output is becoming too slow and cumbersome for
>>>>> readers. I am aware this functionality is not available, but a Feature
>>>>> Request is open [0].
>>>>>
>>>>> In that issue there are some hints to this issue being addressable
>>>>> with a template [1]. I have tried many HTML templates, but never seen one
>>>>> that would split a long document in a set of small files. Would there be an
>>>>> example somewhere I could follow? Otherwise, could someone provide a
>>>>> general idea of how such template would function?
>>>>>
>>>>> Thank you.
>>>>>
>>>>> [0] https://github.com/jgm/pandoc/issues/6122
>>>>>
>>>>> [1] https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340
>>>>>
>>>>> --
>>>>> 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/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%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/cb3753d7-e845-4a72-a1aa-e93086a32f11n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxjtN8XAhYgOti%3DuKZ1Pk-h4YtM5xk96s5283oS0rgfD9A%40mail.gmail.com.

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

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

* Re: Multiple HTML file (chunked) output with template
       [not found]                     ` <CAEe_xxjtN8XAhYgOti=uKZ1Pk-h4YtM5xk96s5283oS0rgfD9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-11-10 12:47                       ` 'William Lupton' via pandoc-discuss
       [not found]                         ` <CAEe_xxiri0e6LHPZdxkjazM8nFU4cuA2FLL3UZ71-w4ro3WvYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: 'William Lupton' via pandoc-discuss @ 2022-11-10 12:47 UTC (permalink / raw)
  To: pandoc-discuss

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

I've updated the gist by adding utils.lua and updating the README. This
should be sufficient for the writer to run without error (please let me
know if not).

Note that you'll also need to get logging.lua as described, and also note
that any generated YAML files will be empty (I didn't want to share my
brain-dead YAML writer but there appear to be lua YAML writers out there
that might work... anyway you might decide that you don't need the
generated YAML... this depends on how you set up the make rules).

I don't really want to create a repo for this (well... a gist _is_ a repo!)
because I don't want (at this point) to provide any support for it
(questions are OK though). I'm providing the gist just as a demo of the
approach. Maybe later...

On Wed, 9 Nov 2022 at 18:28, William Lupton <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org>
wrote:

> Oh sorry, yes, utils is one of mine! I'll look into this tomorrow...
>
> On Wed, 9 Nov 2022, 16:03 Luís de Sousa, <luis.a.de.sousa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> wrote:
>
>> Thank you very much for sharing, that looks very promising.
>>
>> Pandoc can't run the script though, says it can't find the utils package.
>> I installed luarocks and with it lua-utils but the error prevails:
>>
>> $ pandoc multi-test.md -t html-multi-writer.lua -o output/multi-test.html
>> Error running Lua:
>> html-multi-writer.lua:21: module 'utils' not found:
>>     no field package.preload['utils']
>>     no file '/usr/local/share/lua/5.4/utils.lua'
>>     no file '/usr/local/share/lua/5.4/utils/init.lua'
>>     no file '/usr/local/lib/lua/5.4/utils.lua'
>>     no file '/usr/local/lib/lua/5.4/utils/init.lua'
>>     no file './utils.lua'
>>     no file './utils/init.lua'
>>     no file '/usr/local/lib/lua/5.4/utils.so'
>>     no file '/usr/local/lib/lua/5.4/loadall.so'
>>     no file './utils.so'
>> stack traceback:
>>     html-multi-writer.lua:21: in main chunk
>>
>> P.S.: would you consider creating a repository for this work? I would
>> like to automate the second stage with bash, shouldn't be too hard.
>>
>> On Monday, 7 November 2022 at 15:46:58 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org
>> wrote:
>>
>>> I've created this gist:
>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf
>>>
>>> I added a README.md and hope that there's enough info to get going.
>>> Please let me know if not.
>>>
>>> (Please note that this writer does some other things too, which might
>>> need to be stripped out. Also, it's an old-style writer... I haven't got
>>> around to updating it yet,)
>>>
>>> On Mon, 7 Nov 2022 at 09:22, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>
>>>> Hi there. That is precisely the kind of output I would like to have.
>>>> Similar to what tools like mdBook produce. I would be glad if you could
>>>> share more details on that custom writer.
>>>>
>>>> Thank you and regards.
>>>>
>>>> On Friday, 4 November 2022 at 17:51:24 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SisXa4x6EXUF0@public.gmane.orgg
>>>> wrote:
>>>>
>>>>> See https://usp.technology/specification for an example of how the
>>>>> Broadband Forum has recently been publishing some specs. This output is
>>>>> generated via an html-multi-writer.lua custom writer that contains the
>>>>> logic for splitting the output into multiple files (based on header level
>>>>> and/or specific classes). The writer also takes care of generating the
>>>>> navigation bar that you see at the top and bottom of the pages. The
>>>>> multiple files are then passed through pandoc again (to add the overall
>>>>> sidebar ToC and the top/bottom navigation bars, and to generate multiple
>>>>> standalone docs).
>>>>>
>>>>> Please let me know if you'd like more details (the overall setup is
>>>>> not very easily shareable, because it's heavily dependent on
>>>>> rather complicated make rules, but I could probably share the custom writer
>>>>> and give some example command lines.)
>>>>>
>>>>> On Fri, 4 Nov 2022 at 12:45, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>>> wrote:
>>>>>
>>>>>> Dear all,
>>>>>>
>>>>>> I am currently working on a long document that must served as a web
>>>>>> page. The single file output is becoming too slow and cumbersome for
>>>>>> readers. I am aware this functionality is not available, but a Feature
>>>>>> Request is open [0].
>>>>>>
>>>>>> In that issue there are some hints to this issue being addressable
>>>>>> with a template [1]. I have tried many HTML templates, but never seen one
>>>>>> that would split a long document in a set of small files. Would there be an
>>>>>> example somewhere I could follow? Otherwise, could someone provide a
>>>>>> general idea of how such template would function?
>>>>>>
>>>>>> Thank you.
>>>>>>
>>>>>> [0] https://github.com/jgm/pandoc/issues/6122
>>>>>>
>>>>>> [1] https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340
>>>>>>
>>>>>> --
>>>>>> 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/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com
>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%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/cb3753d7-e845-4a72-a1aa-e93086a32f11n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%40googlegroups.com
>> <https://groups.google.com/d/msgid/pandoc-discuss/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxiri0e6LHPZdxkjazM8nFU4cuA2FLL3UZ71-w4ro3WvYA%40mail.gmail.com.

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

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

* Re: Multiple HTML file (chunked) output with template
       [not found]                         ` <CAEe_xxiri0e6LHPZdxkjazM8nFU4cuA2FLL3UZ71-w4ro3WvYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-11-10 16:36                           ` Luís de Sousa
       [not found]                             ` <539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Luís de Sousa @ 2022-11-10 16:36 UTC (permalink / raw)
  To: pandoc-discuss


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

Thank you once more for keeping this going. I made some progress but now 
there is an error with html-multi-writer.lua itself (log below). I never 
worked with Lua before, apologies if I am making something dumb.

$ wget 
https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
--2022-11-10 17:28:08-- 
 https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 
185.199.111.133, 185.199.108.133, 185.199.110.133, ...
Connecting to raw.githubusercontent.com 
(raw.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8173 (8,0K) [text/plain]
Saving to: ‘logging.lua’

logging.lua             100%[==============================>]   7,98K 
 --.-KB/s    in 0s

2022-11-10 17:28:08 (42,0 MB/s) - ‘logging.lua’ saved [8173/8173]

$ mkdir -p $HOME/.local/share/pandoc/filters
$ mv logging.lua $HOME/.local/share/pandoc/filters
$ export LUA_PATH="$HOME/.local/share/pandoc/filters/?.lua;;"
$ pandoc multi-test.md -t html-multi-writer.lua -o output/multi-test.html
Error running Lua:
html-multi-writer.lua:38: attempt to index a boolean value (local 'utils')
stack traceback:


On Thursday, 10 November 2022 at 13:47:52 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org 
wrote:

> I've updated the gist by adding utils.lua and updating the README. This 
> should be sufficient for the writer to run without error (please let me 
> know if not).
>
> Note that you'll also need to get logging.lua as described, and also note 
> that any generated YAML files will be empty (I didn't want to share my 
> brain-dead YAML writer but there appear to be lua YAML writers out there 
> that might work... anyway you might decide that you don't need the 
> generated YAML... this depends on how you set up the make rules).
>
> I don't really want to create a repo for this (well... a gist _is_ a 
> repo!) because I don't want (at this point) to provide any support for it 
> (questions are OK though). I'm providing the gist just as a demo of the 
> approach. Maybe later...
>
> On Wed, 9 Nov 2022 at 18:28, William Lupton <wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> 
> wrote:
>
>> Oh sorry, yes, utils is one of mine! I'll look into this tomorrow...
>>
>> On Wed, 9 Nov 2022, 16:03 Luís de Sousa, <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>>> Thank you very much for sharing, that looks very promising.
>>>
>>> Pandoc can't run the script though, says it can't find the utils 
>>> package. I installed luarocks and with it lua-utils but the error prevails:
>>>
>>> $ pandoc multi-test.md -t html-multi-writer.lua -o output/multi-test.html
>>> Error running Lua:
>>> html-multi-writer.lua:21: module 'utils' not found:
>>>     no field package.preload['utils']
>>>     no file '/usr/local/share/lua/5.4/utils.lua'
>>>     no file '/usr/local/share/lua/5.4/utils/init.lua'
>>>     no file '/usr/local/lib/lua/5.4/utils.lua'
>>>     no file '/usr/local/lib/lua/5.4/utils/init.lua'
>>>     no file './utils.lua'
>>>     no file './utils/init.lua'
>>>     no file '/usr/local/lib/lua/5.4/utils.so'
>>>     no file '/usr/local/lib/lua/5.4/loadall.so'
>>>     no file './utils.so'
>>> stack traceback:
>>>     html-multi-writer.lua:21: in main chunk
>>>
>>> P.S.: would you consider creating a repository for this work? I would 
>>> like to automate the second stage with bash, shouldn't be too hard.
>>>
>>> On Monday, 7 November 2022 at 15:46:58 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org 
>>> wrote:
>>>
>>>> I've created this gist: 
>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf
>>>>
>>>> I added a README.md and hope that there's enough info to get going. 
>>>> Please let me know if not.
>>>>
>>>> (Please note that this writer does some other things too, which might 
>>>> need to be stripped out. Also, it's an old-style writer... I haven't got 
>>>> around to updating it yet,)
>>>>
>>>> On Mon, 7 Nov 2022 at 09:22, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 
>>>> wrote:
>>>>
>>>>> Hi there. That is precisely the kind of output I would like to have. 
>>>>> Similar to what tools like mdBook produce. I would be glad if you could 
>>>>> share more details on that custom writer.
>>>>>
>>>>> Thank you and regards.
>>>>>
>>>>> On Friday, 4 November 2022 at 17:51:24 UTC+1 
>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>
>>>>>> See https://usp.technology/specification for an example of how the 
>>>>>> Broadband Forum has recently been publishing some specs. This output is 
>>>>>> generated via an html-multi-writer.lua custom writer that contains the 
>>>>>> logic for splitting the output into multiple files (based on header level 
>>>>>> and/or specific classes). The writer also takes care of generating the 
>>>>>> navigation bar that you see at the top and bottom of the pages. The 
>>>>>> multiple files are then passed through pandoc again (to add the overall 
>>>>>> sidebar ToC and the top/bottom navigation bars, and to generate multiple 
>>>>>> standalone docs).
>>>>>>
>>>>>> Please let me know if you'd like more details (the overall setup is 
>>>>>> not very easily shareable, because it's heavily dependent on 
>>>>>> rather complicated make rules, but I could probably share the custom writer 
>>>>>> and give some example command lines.)
>>>>>>
>>>>>> On Fri, 4 Nov 2022 at 12:45, Luís de Sousa <luis.a....-Re5JQEeQqe8@public.gmane.orgm> 
>>>>>> wrote:
>>>>>>
>>>>>>> Dear all,
>>>>>>>
>>>>>>> I am currently working on a long document that must served as a web 
>>>>>>> page. The single file output is becoming too slow and cumbersome for 
>>>>>>> readers. I am aware this functionality is not available, but a Feature 
>>>>>>> Request is open [0]. 
>>>>>>>
>>>>>>> In that issue there are some hints to this issue being addressable 
>>>>>>> with a template [1]. I have tried many HTML templates, but never seen one 
>>>>>>> that would split a long document in a set of small files. Would there be an 
>>>>>>> example somewhere I could follow? Otherwise, could someone provide a 
>>>>>>> general idea of how such template would function?
>>>>>>>
>>>>>>> Thank you.
>>>>>>>
>>>>>>> [0] https://github.com/jgm/pandoc/issues/6122
>>>>>>>
>>>>>>> [1] https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340
>>>>>>>
>>>>>>> -- 
>>>>>>> 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/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com 
>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%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/cb3753d7-e845-4a72-a1aa-e93086a32f11n%40googlegroups.com 
>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%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/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%40googlegroups.com 
>>> <https://groups.google.com/d/msgid/pandoc-discuss/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%40googlegroups.com.

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

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

* Re: Multiple HTML file (chunked) output with template
       [not found]                             ` <539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-11-10 17:05                               ` 'William Lupton' via pandoc-discuss
       [not found]                                 ` <CAEe_xxiUW_GbEf3_uEaW4wyOGG6Um-=Soukd-VonV9HdGCv30g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: 'William Lupton' via pandoc-discuss @ 2022-11-10 17:05 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

can you confirm what's in line 38 of the writer? if you haven't edited the
file then it's this
<https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-html-multi-writer-lua-L38>
:

local output_file_dir, output_file_base = utils.path.split(output_file)

can you confirm that you've also copied utils.lua and that it's being
found? it should be calling the function at this line:
https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L31


On Thu, 10 Nov 2022 at 16:36, Luís de Sousa <luis.a.de.sousa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:

> Thank you once more for keeping this going. I made some progress but now
> there is an error with html-multi-writer.lua itself (log below). I never
> worked with Lua before, apologies if I am making something dumb.
>
> $ wget
> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
> --2022-11-10 17:28:08--
> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
> Resolving raw.githubusercontent.com (raw.githubusercontent.com)...
> 185.199.111.133, 185.199.108.133, 185.199.110.133, ...
> Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443...
> connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 8173 (8,0K) [text/plain]
> Saving to: ‘logging.lua’
>
> logging.lua             100%[==============================>]   7,98K
>  --.-KB/s    in 0s
>
> 2022-11-10 17:28:08 (42,0 MB/s) - ‘logging.lua’ saved [8173/8173]
>
> $ mkdir -p $HOME/.local/share/pandoc/filters
> $ mv logging.lua $HOME/.local/share/pandoc/filters
> $ export LUA_PATH="$HOME/.local/share/pandoc/filters/?.lua;;"
> $ pandoc multi-test.md -t html-multi-writer.lua -o output/multi-test.html
> Error running Lua:
> html-multi-writer.lua:38: attempt to index a boolean value (local 'utils')
> stack traceback:
>
>
> On Thursday, 10 November 2022 at 13:47:52 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SisXa4x6EXUF0@public.gmane.orgg
> wrote:
>
>> I've updated the gist by adding utils.lua and updating the README. This
>> should be sufficient for the writer to run without error (please let me
>> know if not).
>>
>> Note that you'll also need to get logging.lua as described, and also note
>> that any generated YAML files will be empty (I didn't want to share my
>> brain-dead YAML writer but there appear to be lua YAML writers out there
>> that might work... anyway you might decide that you don't need the
>> generated YAML... this depends on how you set up the make rules).
>>
>> I don't really want to create a repo for this (well... a gist _is_ a
>> repo!) because I don't want (at this point) to provide any support for it
>> (questions are OK though). I'm providing the gist just as a demo of the
>> approach. Maybe later...
>>
>> On Wed, 9 Nov 2022 at 18:28, William Lupton <wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org>
>> wrote:
>>
>>> Oh sorry, yes, utils is one of mine! I'll look into this tomorrow...
>>>
>>> On Wed, 9 Nov 2022, 16:03 Luís de Sousa, <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>
>>>> Thank you very much for sharing, that looks very promising.
>>>>
>>>> Pandoc can't run the script though, says it can't find the utils
>>>> package. I installed luarocks and with it lua-utils but the error prevails:
>>>>
>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o
>>>> output/multi-test.html
>>>> Error running Lua:
>>>> html-multi-writer.lua:21: module 'utils' not found:
>>>>     no field package.preload['utils']
>>>>     no file '/usr/local/share/lua/5.4/utils.lua'
>>>>     no file '/usr/local/share/lua/5.4/utils/init.lua'
>>>>     no file '/usr/local/lib/lua/5.4/utils.lua'
>>>>     no file '/usr/local/lib/lua/5.4/utils/init.lua'
>>>>     no file './utils.lua'
>>>>     no file './utils/init.lua'
>>>>     no file '/usr/local/lib/lua/5.4/utils.so'
>>>>     no file '/usr/local/lib/lua/5.4/loadall.so'
>>>>     no file './utils.so'
>>>> stack traceback:
>>>>     html-multi-writer.lua:21: in main chunk
>>>>
>>>> P.S.: would you consider creating a repository for this work? I would
>>>> like to automate the second stage with bash, shouldn't be too hard.
>>>>
>>>> On Monday, 7 November 2022 at 15:46:58 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SisXa4x6EXUF0@public.gmane.orgg
>>>> wrote:
>>>>
>>>>> I've created this gist:
>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf
>>>>>
>>>>> I added a README.md and hope that there's enough info to get going.
>>>>> Please let me know if not.
>>>>>
>>>>> (Please note that this writer does some other things too, which might
>>>>> need to be stripped out. Also, it's an old-style writer... I haven't got
>>>>> around to updating it yet,)
>>>>>
>>>>> On Mon, 7 Nov 2022 at 09:22, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>>> wrote:
>>>>>
>>>>>> Hi there. That is precisely the kind of output I would like to have.
>>>>>> Similar to what tools like mdBook produce. I would be glad if you could
>>>>>> share more details on that custom writer.
>>>>>>
>>>>>> Thank you and regards.
>>>>>>
>>>>>> On Friday, 4 November 2022 at 17:51:24 UTC+1
>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>
>>>>>>> See https://usp.technology/specification for an example of how the
>>>>>>> Broadband Forum has recently been publishing some specs. This output is
>>>>>>> generated via an html-multi-writer.lua custom writer that contains the
>>>>>>> logic for splitting the output into multiple files (based on header level
>>>>>>> and/or specific classes). The writer also takes care of generating the
>>>>>>> navigation bar that you see at the top and bottom of the pages. The
>>>>>>> multiple files are then passed through pandoc again (to add the overall
>>>>>>> sidebar ToC and the top/bottom navigation bars, and to generate multiple
>>>>>>> standalone docs).
>>>>>>>
>>>>>>> Please let me know if you'd like more details (the overall setup is
>>>>>>> not very easily shareable, because it's heavily dependent on
>>>>>>> rather complicated make rules, but I could probably share the custom writer
>>>>>>> and give some example command lines.)
>>>>>>>
>>>>>>> On Fri, 4 Nov 2022 at 12:45, Luís de Sousa <luis.a....@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Dear all,
>>>>>>>>
>>>>>>>> I am currently working on a long document that must served as a web
>>>>>>>> page. The single file output is becoming too slow and cumbersome for
>>>>>>>> readers. I am aware this functionality is not available, but a Feature
>>>>>>>> Request is open [0].
>>>>>>>>
>>>>>>>> In that issue there are some hints to this issue being addressable
>>>>>>>> with a template [1]. I have tried many HTML templates, but never seen one
>>>>>>>> that would split a long document in a set of small files. Would there be an
>>>>>>>> example somewhere I could follow? Otherwise, could someone provide a
>>>>>>>> general idea of how such template would function?
>>>>>>>>
>>>>>>>> Thank you.
>>>>>>>>
>>>>>>>> [0] https://github.com/jgm/pandoc/issues/6122
>>>>>>>>
>>>>>>>> [1]
>>>>>>>> https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340
>>>>>>>>
>>>>>>>> --
>>>>>>>> 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/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com
>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%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/cb3753d7-e845-4a72-a1aa-e93086a32f11n%40googlegroups.com
>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%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/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/pandoc-discuss/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxiUW_GbEf3_uEaW4wyOGG6Um-%3DSoukd-VonV9HdGCv30g%40mail.gmail.com.

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

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

* Re: Multiple HTML file (chunked) output with template
       [not found]                                 ` <CAEe_xxiUW_GbEf3_uEaW4wyOGG6Um-=Soukd-VonV9HdGCv30g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-11-11 12:33                                   ` Luís de Sousa
       [not found]                                     ` <7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Luís de Sousa @ 2022-11-11 12:33 UTC (permalink / raw)
  To: pandoc-discuss


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

Hello again. I confirm those are the contents in line 38. I assume 
utils.lua is being found, line 21 is now being  parsed without error. 
Anything else I can try? 

Thank you.

On Thursday, 10 November 2022 at 18:06:06 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org 
wrote:

> can you confirm what's in line 38 of the writer? if you haven't edited the 
> file then it's this 
> <https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-html-multi-writer-lua-L38>
> :
>
> local output_file_dir, output_file_base = utils.path.split(output_file)
>
> can you confirm that you've also copied utils.lua and that it's being 
> found? it should be calling the function at this line: 
> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L31
>
>
> On Thu, 10 Nov 2022 at 16:36, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>> Thank you once more for keeping this going. I made some progress but now 
>> there is an error with html-multi-writer.lua itself (log below). I never 
>> worked with Lua before, apologies if I am making something dumb.
>>
>> $ wget 
>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>> --2022-11-10 17:28:08--  
>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>> Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 
>> 185.199.111.133, 185.199.108.133, 185.199.110.133, ...
>> Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... 
>> connected.
>> HTTP request sent, awaiting response... 200 OK
>> Length: 8173 (8,0K) [text/plain]
>> Saving to: ‘logging.lua’
>>
>> logging.lua             100%[==============================>]   7,98K 
>>  --.-KB/s    in 0s
>>
>> 2022-11-10 17:28:08 (42,0 MB/s) - ‘logging.lua’ saved [8173/8173]
>>
>> $ mkdir -p $HOME/.local/share/pandoc/filters
>> $ mv logging.lua $HOME/.local/share/pandoc/filters
>> $ export LUA_PATH="$HOME/.local/share/pandoc/filters/?.lua;;"
>> $ pandoc multi-test.md -t html-multi-writer.lua -o output/multi-test.html
>> Error running Lua:
>> html-multi-writer.lua:38: attempt to index a boolean value (local 'utils')
>> stack traceback:
>>
>>
>> On Thursday, 10 November 2022 at 13:47:52 UTC+1 
>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>
>>> I've updated the gist by adding utils.lua and updating the README. This 
>>> should be sufficient for the writer to run without error (please let me 
>>> know if not).
>>>
>>> Note that you'll also need to get logging.lua as described, and also 
>>> note that any generated YAML files will be empty (I didn't want to share my 
>>> brain-dead YAML writer but there appear to be lua YAML writers out there 
>>> that might work... anyway you might decide that you don't need the 
>>> generated YAML... this depends on how you set up the make rules).
>>>
>>> I don't really want to create a repo for this (well... a gist _is_ a 
>>> repo!) because I don't want (at this point) to provide any support for it 
>>> (questions are OK though). I'm providing the gist just as a demo of the 
>>> approach. Maybe later...
>>>
>>> On Wed, 9 Nov 2022 at 18:28, William Lupton <wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> 
>>> wrote:
>>>
>>>> Oh sorry, yes, utils is one of mine! I'll look into this tomorrow...
>>>>
>>>> On Wed, 9 Nov 2022, 16:03 Luís de Sousa, <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>
>>>>> Thank you very much for sharing, that looks very promising.
>>>>>
>>>>> Pandoc can't run the script though, says it can't find the utils 
>>>>> package. I installed luarocks and with it lua-utils but the error prevails:
>>>>>
>>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o 
>>>>> output/multi-test.html
>>>>> Error running Lua:
>>>>> html-multi-writer.lua:21: module 'utils' not found:
>>>>>     no field package.preload['utils']
>>>>>     no file '/usr/local/share/lua/5.4/utils.lua'
>>>>>     no file '/usr/local/share/lua/5.4/utils/init.lua'
>>>>>     no file '/usr/local/lib/lua/5.4/utils.lua'
>>>>>     no file '/usr/local/lib/lua/5.4/utils/init.lua'
>>>>>     no file './utils.lua'
>>>>>     no file './utils/init.lua'
>>>>>     no file '/usr/local/lib/lua/5.4/utils.so'
>>>>>     no file '/usr/local/lib/lua/5.4/loadall.so'
>>>>>     no file './utils.so'
>>>>> stack traceback:
>>>>>     html-multi-writer.lua:21: in main chunk
>>>>>
>>>>> P.S.: would you consider creating a repository for this work? I would 
>>>>> like to automate the second stage with bash, shouldn't be too hard.
>>>>>
>>>>> On Monday, 7 November 2022 at 15:46:58 UTC+1 
>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>
>>>>>> I've created this gist: 
>>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf
>>>>>>
>>>>>> I added a README.md and hope that there's enough info to get going. 
>>>>>> Please let me know if not.
>>>>>>
>>>>>> (Please note that this writer does some other things too, which might 
>>>>>> need to be stripped out. Also, it's an old-style writer... I haven't got 
>>>>>> around to updating it yet,)
>>>>>>
>>>>>> On Mon, 7 Nov 2022 at 09:22, Luís de Sousa <luis.a....-Re5JQEeQqe8@public.gmane.orgm> 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi there. That is precisely the kind of output I would like to have. 
>>>>>>> Similar to what tools like mdBook produce. I would be glad if you could 
>>>>>>> share more details on that custom writer.
>>>>>>>
>>>>>>> Thank you and regards.
>>>>>>>
>>>>>>> On Friday, 4 November 2022 at 17:51:24 UTC+1 
>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>
>>>>>>>> See https://usp.technology/specification for an example of how the 
>>>>>>>> Broadband Forum has recently been publishing some specs. This output is 
>>>>>>>> generated via an html-multi-writer.lua custom writer that contains the 
>>>>>>>> logic for splitting the output into multiple files (based on header level 
>>>>>>>> and/or specific classes). The writer also takes care of generating the 
>>>>>>>> navigation bar that you see at the top and bottom of the pages. The 
>>>>>>>> multiple files are then passed through pandoc again (to add the overall 
>>>>>>>> sidebar ToC and the top/bottom navigation bars, and to generate multiple 
>>>>>>>> standalone docs).
>>>>>>>>
>>>>>>>> Please let me know if you'd like more details (the overall setup is 
>>>>>>>> not very easily shareable, because it's heavily dependent on 
>>>>>>>> rather complicated make rules, but I could probably share the custom writer 
>>>>>>>> and give some example command lines.)
>>>>>>>>
>>>>>>>> On Fri, 4 Nov 2022 at 12:45, Luís de Sousa <luis.a....@gmail.com> 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Dear all,
>>>>>>>>>
>>>>>>>>> I am currently working on a long document that must served as a 
>>>>>>>>> web page. The single file output is becoming too slow and cumbersome for 
>>>>>>>>> readers. I am aware this functionality is not available, but a Feature 
>>>>>>>>> Request is open [0]. 
>>>>>>>>>
>>>>>>>>> In that issue there are some hints to this issue being addressable 
>>>>>>>>> with a template [1]. I have tried many HTML templates, but never seen one 
>>>>>>>>> that would split a long document in a set of small files. Would there be an 
>>>>>>>>> example somewhere I could follow? Otherwise, could someone provide a 
>>>>>>>>> general idea of how such template would function?
>>>>>>>>>
>>>>>>>>> Thank you.
>>>>>>>>>
>>>>>>>>> [0] https://github.com/jgm/pandoc/issues/6122
>>>>>>>>>
>>>>>>>>> [1] 
>>>>>>>>> https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340
>>>>>>>>>
>>>>>>>>> -- 
>>>>>>>>> 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/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com 
>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%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/cb3753d7-e845-4a72-a1aa-e93086a32f11n%40googlegroups.com 
>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%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/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%40googlegroups.com 
>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%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/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%40googlegroups.com.

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

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

* Re: Multiple HTML file (chunked) output with template
       [not found]                                     ` <7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-11-11 12:58                                       ` 'William Lupton' via pandoc-discuss
       [not found]                                         ` <CAEe_xxh--=VrfpuU75HDuSe1uLJ1ZmFbdhBpX4VcTysmCVoyhQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: 'William Lupton' via pandoc-discuss @ 2022-11-11 12:58 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Oh, I'm so sorry! I hadn't tested exactly what I gave you (I'd put the
contents of utils.lua into the writer for testing, but then put it into a
new file to share with you, so the writer didn't need to change), but I
forgot to put 'return utils' at the bottom.

I've now added this line:
https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L51
and this time I've tested it locally. Please try again.

On Fri, 11 Nov 2022 at 12:33, Luís de Sousa <luis.a.de.sousa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:

> Hello again. I confirm those are the contents in line 38. I assume
> utils.lua is being found, line 21 is now being  parsed without error.
> Anything else I can try?
>
> Thank you.
>
> On Thursday, 10 November 2022 at 18:06:06 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SisXa4x6EXUF0@public.gmane.orgg
> wrote:
>
>> can you confirm what's in line 38 of the writer? if you haven't edited
>> the file then it's this
>> <https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-html-multi-writer-lua-L38>
>> :
>>
>> local output_file_dir, output_file_base = utils.path.split(output_file)
>>
>> can you confirm that you've also copied utils.lua and that it's being
>> found? it should be calling the function at this line:
>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L31
>>
>>
>> On Thu, 10 Nov 2022 at 16:36, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>>> Thank you once more for keeping this going. I made some progress but now
>>> there is an error with html-multi-writer.lua itself (log below). I never
>>> worked with Lua before, apologies if I am making something dumb.
>>>
>>> $ wget
>>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>>> --2022-11-10 17:28:08--
>>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>>> Resolving raw.githubusercontent.com (raw.githubusercontent.com)...
>>> 185.199.111.133, 185.199.108.133, 185.199.110.133, ...
>>> Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443...
>>> connected.
>>> HTTP request sent, awaiting response... 200 OK
>>> Length: 8173 (8,0K) [text/plain]
>>> Saving to: ‘logging.lua’
>>>
>>> logging.lua             100%[==============================>]   7,98K
>>>  --.-KB/s    in 0s
>>>
>>> 2022-11-10 17:28:08 (42,0 MB/s) - ‘logging.lua’ saved [8173/8173]
>>>
>>> $ mkdir -p $HOME/.local/share/pandoc/filters
>>> $ mv logging.lua $HOME/.local/share/pandoc/filters
>>> $ export LUA_PATH="$HOME/.local/share/pandoc/filters/?.lua;;"
>>> $ pandoc multi-test.md -t html-multi-writer.lua -o output/multi-test.html
>>> Error running Lua:
>>> html-multi-writer.lua:38: attempt to index a boolean value (local
>>> 'utils')
>>> stack traceback:
>>>
>>>
>>> On Thursday, 10 November 2022 at 13:47:52 UTC+1
>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>
>>>> I've updated the gist by adding utils.lua and updating the README. This
>>>> should be sufficient for the writer to run without error (please let me
>>>> know if not).
>>>>
>>>> Note that you'll also need to get logging.lua as described, and also
>>>> note that any generated YAML files will be empty (I didn't want to share my
>>>> brain-dead YAML writer but there appear to be lua YAML writers out there
>>>> that might work... anyway you might decide that you don't need the
>>>> generated YAML... this depends on how you set up the make rules).
>>>>
>>>> I don't really want to create a repo for this (well... a gist _is_ a
>>>> repo!) because I don't want (at this point) to provide any support for it
>>>> (questions are OK though). I'm providing the gist just as a demo of the
>>>> approach. Maybe later...
>>>>
>>>> On Wed, 9 Nov 2022 at 18:28, William Lupton <wlu...-QSt+ys/nuMyEUIsrzH9SisXa4x6EXUF0@public.gmane.orgg>
>>>> wrote:
>>>>
>>>>> Oh sorry, yes, utils is one of mine! I'll look into this tomorrow...
>>>>>
>>>>> On Wed, 9 Nov 2022, 16:03 Luís de Sousa, <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>
>>>>>> Thank you very much for sharing, that looks very promising.
>>>>>>
>>>>>> Pandoc can't run the script though, says it can't find the utils
>>>>>> package. I installed luarocks and with it lua-utils but the error prevails:
>>>>>>
>>>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o
>>>>>> output/multi-test.html
>>>>>> Error running Lua:
>>>>>> html-multi-writer.lua:21: module 'utils' not found:
>>>>>>     no field package.preload['utils']
>>>>>>     no file '/usr/local/share/lua/5.4/utils.lua'
>>>>>>     no file '/usr/local/share/lua/5.4/utils/init.lua'
>>>>>>     no file '/usr/local/lib/lua/5.4/utils.lua'
>>>>>>     no file '/usr/local/lib/lua/5.4/utils/init.lua'
>>>>>>     no file './utils.lua'
>>>>>>     no file './utils/init.lua'
>>>>>>     no file '/usr/local/lib/lua/5.4/utils.so'
>>>>>>     no file '/usr/local/lib/lua/5.4/loadall.so'
>>>>>>     no file './utils.so'
>>>>>> stack traceback:
>>>>>>     html-multi-writer.lua:21: in main chunk
>>>>>>
>>>>>> P.S.: would you consider creating a repository for this work? I would
>>>>>> like to automate the second stage with bash, shouldn't be too hard.
>>>>>>
>>>>>> On Monday, 7 November 2022 at 15:46:58 UTC+1
>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>
>>>>>>> I've created this gist:
>>>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf
>>>>>>>
>>>>>>> I added a README.md and hope that there's enough info to get going.
>>>>>>> Please let me know if not.
>>>>>>>
>>>>>>> (Please note that this writer does some other things too, which
>>>>>>> might need to be stripped out. Also, it's an old-style writer... I haven't
>>>>>>> got around to updating it yet,)
>>>>>>>
>>>>>>> On Mon, 7 Nov 2022 at 09:22, Luís de Sousa <luis.a....@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi there. That is precisely the kind of output I would like to
>>>>>>>> have. Similar to what tools like mdBook produce. I would be glad if you
>>>>>>>> could share more details on that custom writer.
>>>>>>>>
>>>>>>>> Thank you and regards.
>>>>>>>>
>>>>>>>> On Friday, 4 November 2022 at 17:51:24 UTC+1
>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>
>>>>>>>>> See https://usp.technology/specification for an example of how
>>>>>>>>> the Broadband Forum has recently been publishing some specs. This output is
>>>>>>>>> generated via an html-multi-writer.lua custom writer that contains the
>>>>>>>>> logic for splitting the output into multiple files (based on header level
>>>>>>>>> and/or specific classes). The writer also takes care of generating the
>>>>>>>>> navigation bar that you see at the top and bottom of the pages. The
>>>>>>>>> multiple files are then passed through pandoc again (to add the overall
>>>>>>>>> sidebar ToC and the top/bottom navigation bars, and to generate multiple
>>>>>>>>> standalone docs).
>>>>>>>>>
>>>>>>>>> Please let me know if you'd like more details (the overall setup
>>>>>>>>> is not very easily shareable, because it's heavily dependent on
>>>>>>>>> rather complicated make rules, but I could probably share the custom writer
>>>>>>>>> and give some example command lines.)
>>>>>>>>>
>>>>>>>>> On Fri, 4 Nov 2022 at 12:45, Luís de Sousa <luis.a....@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Dear all,
>>>>>>>>>>
>>>>>>>>>> I am currently working on a long document that must served as a
>>>>>>>>>> web page. The single file output is becoming too slow and cumbersome for
>>>>>>>>>> readers. I am aware this functionality is not available, but a Feature
>>>>>>>>>> Request is open [0].
>>>>>>>>>>
>>>>>>>>>> In that issue there are some hints to this issue being
>>>>>>>>>> addressable with a template [1]. I have tried many HTML templates, but
>>>>>>>>>> never seen one that would split a long document in a set of small files.
>>>>>>>>>> Would there be an example somewhere I could follow? Otherwise, could
>>>>>>>>>> someone provide a general idea of how such template would function?
>>>>>>>>>>
>>>>>>>>>> Thank you.
>>>>>>>>>>
>>>>>>>>>> [0] https://github.com/jgm/pandoc/issues/6122
>>>>>>>>>>
>>>>>>>>>> [1]
>>>>>>>>>> https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> 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/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com
>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%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/cb3753d7-e845-4a72-a1aa-e93086a32f11n%40googlegroups.com
>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%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/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%40googlegroups.com
>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%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/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxh--%3DVrfpuU75HDuSe1uLJ1ZmFbdhBpX4VcTysmCVoyhQ%40mail.gmail.com.

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

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

* Re: Multiple HTML file (chunked) output with template
       [not found]                                         ` <CAEe_xxh--=VrfpuU75HDuSe1uLJ1ZmFbdhBpX4VcTysmCVoyhQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-11-11 14:01                                           ` Luís de Sousa
       [not found]                                             ` <5e290d88-1c47-407d-819b-34a094d8b48fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Luís de Sousa @ 2022-11-11 14:01 UTC (permalink / raw)
  To: pandoc-discuss


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

Alright, it is working now, many thanks. The output HTML looks pretty solid 
and well linked. Two questions: 

1. What is the purpose of the /dev/null bit in the second compile command?

2. Could you share an HTML template? It would greatly facilitate the design 
work.

Next I will give it a try with a more elaborate document including 
cross-references, citations, etc. Will report back on that.

Regards.

On Friday, 11 November 2022 at 13:58:28 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org 
wrote:

> Oh, I'm so sorry! I hadn't tested exactly what I gave you (I'd put the 
> contents of utils.lua into the writer for testing, but then put it into a 
> new file to share with you, so the writer didn't need to change), but I 
> forgot to put 'return utils' at the bottom.
>
> I've now added this line: 
> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L51 
> and this time I've tested it locally. Please try again.
>
> On Fri, 11 Nov 2022 at 12:33, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>> Hello again. I confirm those are the contents in line 38. I assume 
>> utils.lua is being found, line 21 is now being  parsed without error. 
>> Anything else I can try? 
>>
>> Thank you.
>>
>> On Thursday, 10 November 2022 at 18:06:06 UTC+1 
>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>
>>> can you confirm what's in line 38 of the writer? if you haven't edited 
>>> the file then it's this 
>>> <https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-html-multi-writer-lua-L38>
>>> :
>>>
>>> local output_file_dir, output_file_base = utils.path.split(output_file)
>>>
>>> can you confirm that you've also copied utils.lua and that it's being 
>>> found? it should be calling the function at this line: 
>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L31
>>>
>>>
>>> On Thu, 10 Nov 2022 at 16:36, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 
>>> wrote:
>>>
>>>> Thank you once more for keeping this going. I made some progress but 
>>>> now there is an error with html-multi-writer.lua itself (log below). I 
>>>> never worked with Lua before, apologies if I am making something dumb.
>>>>
>>>> $ wget 
>>>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>>>> --2022-11-10 17:28:08--  
>>>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>>>> Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 
>>>> 185.199.111.133, 185.199.108.133, 185.199.110.133, ...
>>>> Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... 
>>>> connected.
>>>> HTTP request sent, awaiting response... 200 OK
>>>> Length: 8173 (8,0K) [text/plain]
>>>> Saving to: ‘logging.lua’
>>>>
>>>> logging.lua             100%[==============================>]   7,98K 
>>>>  --.-KB/s    in 0s
>>>>
>>>> 2022-11-10 17:28:08 (42,0 MB/s) - ‘logging.lua’ saved [8173/8173]
>>>>
>>>> $ mkdir -p $HOME/.local/share/pandoc/filters
>>>> $ mv logging.lua $HOME/.local/share/pandoc/filters
>>>> $ export LUA_PATH="$HOME/.local/share/pandoc/filters/?.lua;;"
>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o 
>>>> output/multi-test.html
>>>> Error running Lua:
>>>> html-multi-writer.lua:38: attempt to index a boolean value (local 
>>>> 'utils')
>>>> stack traceback:
>>>>
>>>>
>>>> On Thursday, 10 November 2022 at 13:47:52 UTC+1 
>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>
>>>>> I've updated the gist by adding utils.lua and updating the README. 
>>>>> This should be sufficient for the writer to run without error (please let 
>>>>> me know if not).
>>>>>
>>>>> Note that you'll also need to get logging.lua as described, and also 
>>>>> note that any generated YAML files will be empty (I didn't want to share my 
>>>>> brain-dead YAML writer but there appear to be lua YAML writers out there 
>>>>> that might work... anyway you might decide that you don't need the 
>>>>> generated YAML... this depends on how you set up the make rules).
>>>>>
>>>>> I don't really want to create a repo for this (well... a gist _is_ a 
>>>>> repo!) because I don't want (at this point) to provide any support for it 
>>>>> (questions are OK though). I'm providing the gist just as a demo of the 
>>>>> approach. Maybe later...
>>>>>
>>>>> On Wed, 9 Nov 2022 at 18:28, William Lupton <
>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> wrote:
>>>>>
>>>>>> Oh sorry, yes, utils is one of mine! I'll look into this tomorrow...
>>>>>>
>>>>>> On Wed, 9 Nov 2022, 16:03 Luís de Sousa, <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 
>>>>>> wrote:
>>>>>>
>>>>>>> Thank you very much for sharing, that looks very promising.
>>>>>>>
>>>>>>> Pandoc can't run the script though, says it can't find the utils 
>>>>>>> package. I installed luarocks and with it lua-utils but the error prevails:
>>>>>>>
>>>>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o 
>>>>>>> output/multi-test.html
>>>>>>> Error running Lua:
>>>>>>> html-multi-writer.lua:21: module 'utils' not found:
>>>>>>>     no field package.preload['utils']
>>>>>>>     no file '/usr/local/share/lua/5.4/utils.lua'
>>>>>>>     no file '/usr/local/share/lua/5.4/utils/init.lua'
>>>>>>>     no file '/usr/local/lib/lua/5.4/utils.lua'
>>>>>>>     no file '/usr/local/lib/lua/5.4/utils/init.lua'
>>>>>>>     no file './utils.lua'
>>>>>>>     no file './utils/init.lua'
>>>>>>>     no file '/usr/local/lib/lua/5.4/utils.so'
>>>>>>>     no file '/usr/local/lib/lua/5.4/loadall.so'
>>>>>>>     no file './utils.so'
>>>>>>> stack traceback:
>>>>>>>     html-multi-writer.lua:21: in main chunk
>>>>>>>
>>>>>>> P.S.: would you consider creating a repository for this work? I 
>>>>>>> would like to automate the second stage with bash, shouldn't be too hard.
>>>>>>>
>>>>>>> On Monday, 7 November 2022 at 15:46:58 UTC+1 
>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>
>>>>>>>> I've created this gist: 
>>>>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf
>>>>>>>>
>>>>>>>> I added a README.md and hope that there's enough info to get going. 
>>>>>>>> Please let me know if not.
>>>>>>>>
>>>>>>>> (Please note that this writer does some other things too, which 
>>>>>>>> might need to be stripped out. Also, it's an old-style writer... I haven't 
>>>>>>>> got around to updating it yet,)
>>>>>>>>
>>>>>>>> On Mon, 7 Nov 2022 at 09:22, Luís de Sousa <luis.a....@gmail.com> 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi there. That is precisely the kind of output I would like to 
>>>>>>>>> have. Similar to what tools like mdBook produce. I would be glad if you 
>>>>>>>>> could share more details on that custom writer.
>>>>>>>>>
>>>>>>>>> Thank you and regards.
>>>>>>>>>
>>>>>>>>> On Friday, 4 November 2022 at 17:51:24 UTC+1 
>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>>
>>>>>>>>>> See https://usp.technology/specification for an example of how 
>>>>>>>>>> the Broadband Forum has recently been publishing some specs. This output is 
>>>>>>>>>> generated via an html-multi-writer.lua custom writer that contains the 
>>>>>>>>>> logic for splitting the output into multiple files (based on header level 
>>>>>>>>>> and/or specific classes). The writer also takes care of generating the 
>>>>>>>>>> navigation bar that you see at the top and bottom of the pages. The 
>>>>>>>>>> multiple files are then passed through pandoc again (to add the overall 
>>>>>>>>>> sidebar ToC and the top/bottom navigation bars, and to generate multiple 
>>>>>>>>>> standalone docs).
>>>>>>>>>>
>>>>>>>>>> Please let me know if you'd like more details (the overall setup 
>>>>>>>>>> is not very easily shareable, because it's heavily dependent on 
>>>>>>>>>> rather complicated make rules, but I could probably share the custom writer 
>>>>>>>>>> and give some example command lines.)
>>>>>>>>>>
>>>>>>>>>> On Fri, 4 Nov 2022 at 12:45, Luís de Sousa <luis.a....@gmail.com> 
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> Dear all,
>>>>>>>>>>>
>>>>>>>>>>> I am currently working on a long document that must served as a 
>>>>>>>>>>> web page. The single file output is becoming too slow and cumbersome for 
>>>>>>>>>>> readers. I am aware this functionality is not available, but a Feature 
>>>>>>>>>>> Request is open [0]. 
>>>>>>>>>>>
>>>>>>>>>>> In that issue there are some hints to this issue being 
>>>>>>>>>>> addressable with a template [1]. I have tried many HTML templates, but 
>>>>>>>>>>> never seen one that would split a long document in a set of small files. 
>>>>>>>>>>> Would there be an example somewhere I could follow? Otherwise, could 
>>>>>>>>>>> someone provide a general idea of how such template would function?
>>>>>>>>>>>
>>>>>>>>>>> Thank you.
>>>>>>>>>>>
>>>>>>>>>>> [0] https://github.com/jgm/pandoc/issues/6122
>>>>>>>>>>>
>>>>>>>>>>> [1] 
>>>>>>>>>>> https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340
>>>>>>>>>>>
>>>>>>>>>>> -- 
>>>>>>>>>>> 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/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com 
>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%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/cb3753d7-e845-4a72-a1aa-e93086a32f11n%40googlegroups.com 
>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%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/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%40googlegroups.com 
>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%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/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%40googlegroups.com 
>>>> <https://groups.google.com/d/msgid/pandoc-discuss/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%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/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/5e290d88-1c47-407d-819b-34a094d8b48fn%40googlegroups.com.

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

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

* Re: Multiple HTML file (chunked) output with template
       [not found]                                             ` <5e290d88-1c47-407d-819b-34a094d8b48fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-11-11 14:30                                               ` 'William Lupton' via pandoc-discuss
       [not found]                                                 ` <CAEe_xxjk4tfW2iyU1=rikSnmTWN6kDGYneGcqYc2_1WdReSqUw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: 'William Lupton' via pandoc-discuss @ 2022-11-11 14:30 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Inline...

On Fri, 11 Nov 2022 at 14:01, Luís de Sousa <luis.a.de.sousa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:

> Alright, it is working now, many thanks. The output HTML looks pretty
> solid and well linked. Two questions:


Great!

1. What is the purpose of the /dev/null bit in the second compile command?
>

That's what this remark in the README is referring to (rather obliquely):

> Including the HTML via --include-in-header was a workaround I think, and
might no longer be necessary.

I think there was a problem with parsing HTML at one point, and this was a
way of injecting HTML without passing it through pandoc.


> 2. Could you share an HTML template? It would greatly facilitate the
> design work.
>

I've added github-template.html
<https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-github-template-html>
(somewhat
anonymised) to the gist.

Next I will give it a try with a more elaborate document including
> cross-references, citations, etc. Will report back on that.
>

You'll probably have noted that the writer attempts to fix cross-references
so they reference the correct output file.

Regards.
>
> On Friday, 11 November 2022 at 13:58:28 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org
> wrote:
>
>> Oh, I'm so sorry! I hadn't tested exactly what I gave you (I'd put the
>> contents of utils.lua into the writer for testing, but then put it into a
>> new file to share with you, so the writer didn't need to change), but I
>> forgot to put 'return utils' at the bottom.
>>
>> I've now added this line:
>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L51
>> and this time I've tested it locally. Please try again.
>>
>> On Fri, 11 Nov 2022 at 12:33, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>>> Hello again. I confirm those are the contents in line 38. I assume
>>> utils.lua is being found, line 21 is now being  parsed without error.
>>> Anything else I can try?
>>>
>>> Thank you.
>>>
>>> On Thursday, 10 November 2022 at 18:06:06 UTC+1
>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>
>>>> can you confirm what's in line 38 of the writer? if you haven't edited
>>>> the file then it's this
>>>> <https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-html-multi-writer-lua-L38>
>>>> :
>>>>
>>>> local output_file_dir, output_file_base = utils.path.split(output_file)
>>>>
>>>> can you confirm that you've also copied utils.lua and that it's being
>>>> found? it should be calling the function at this line:
>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L31
>>>>
>>>>
>>>> On Thu, 10 Nov 2022 at 16:36, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>> wrote:
>>>>
>>>>> Thank you once more for keeping this going. I made some progress but
>>>>> now there is an error with html-multi-writer.lua itself (log below). I
>>>>> never worked with Lua before, apologies if I am making something dumb.
>>>>>
>>>>> $ wget
>>>>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>>>>> --2022-11-10 17:28:08--
>>>>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>>>>> Resolving raw.githubusercontent.com (raw.githubusercontent.com)...
>>>>> 185.199.111.133, 185.199.108.133, 185.199.110.133, ...
>>>>> Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443...
>>>>> connected.
>>>>> HTTP request sent, awaiting response... 200 OK
>>>>> Length: 8173 (8,0K) [text/plain]
>>>>> Saving to: ‘logging.lua’
>>>>>
>>>>> logging.lua             100%[==============================>]   7,98K
>>>>>  --.-KB/s    in 0s
>>>>>
>>>>> 2022-11-10 17:28:08 (42,0 MB/s) - ‘logging.lua’ saved [8173/8173]
>>>>>
>>>>> $ mkdir -p $HOME/.local/share/pandoc/filters
>>>>> $ mv logging.lua $HOME/.local/share/pandoc/filters
>>>>> $ export LUA_PATH="$HOME/.local/share/pandoc/filters/?.lua;;"
>>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o
>>>>> output/multi-test.html
>>>>> Error running Lua:
>>>>> html-multi-writer.lua:38: attempt to index a boolean value (local
>>>>> 'utils')
>>>>> stack traceback:
>>>>>
>>>>>
>>>>> On Thursday, 10 November 2022 at 13:47:52 UTC+1
>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>
>>>>>> I've updated the gist by adding utils.lua and updating the README.
>>>>>> This should be sufficient for the writer to run without error (please let
>>>>>> me know if not).
>>>>>>
>>>>>> Note that you'll also need to get logging.lua as described, and also
>>>>>> note that any generated YAML files will be empty (I didn't want to share my
>>>>>> brain-dead YAML writer but there appear to be lua YAML writers out there
>>>>>> that might work... anyway you might decide that you don't need the
>>>>>> generated YAML... this depends on how you set up the make rules).
>>>>>>
>>>>>> I don't really want to create a repo for this (well... a gist _is_ a
>>>>>> repo!) because I don't want (at this point) to provide any support for it
>>>>>> (questions are OK though). I'm providing the gist just as a demo of the
>>>>>> approach. Maybe later...
>>>>>>
>>>>>> On Wed, 9 Nov 2022 at 18:28, William Lupton <
>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> wrote:
>>>>>>
>>>>>>> Oh sorry, yes, utils is one of mine! I'll look into this tomorrow...
>>>>>>>
>>>>>>> On Wed, 9 Nov 2022, 16:03 Luís de Sousa, <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Thank you very much for sharing, that looks very promising.
>>>>>>>>
>>>>>>>> Pandoc can't run the script though, says it can't find the utils
>>>>>>>> package. I installed luarocks and with it lua-utils but the error prevails:
>>>>>>>>
>>>>>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o
>>>>>>>> output/multi-test.html
>>>>>>>> Error running Lua:
>>>>>>>> html-multi-writer.lua:21: module 'utils' not found:
>>>>>>>>     no field package.preload['utils']
>>>>>>>>     no file '/usr/local/share/lua/5.4/utils.lua'
>>>>>>>>     no file '/usr/local/share/lua/5.4/utils/init.lua'
>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils.lua'
>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils/init.lua'
>>>>>>>>     no file './utils.lua'
>>>>>>>>     no file './utils/init.lua'
>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils.so'
>>>>>>>>     no file '/usr/local/lib/lua/5.4/loadall.so'
>>>>>>>>     no file './utils.so'
>>>>>>>> stack traceback:
>>>>>>>>     html-multi-writer.lua:21: in main chunk
>>>>>>>>
>>>>>>>> P.S.: would you consider creating a repository for this work? I
>>>>>>>> would like to automate the second stage with bash, shouldn't be too hard.
>>>>>>>>
>>>>>>>> On Monday, 7 November 2022 at 15:46:58 UTC+1
>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>
>>>>>>>>> I've created this gist:
>>>>>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf
>>>>>>>>>
>>>>>>>>> I added a README.md and hope that there's enough info to get
>>>>>>>>> going. Please let me know if not.
>>>>>>>>>
>>>>>>>>> (Please note that this writer does some other things too, which
>>>>>>>>> might need to be stripped out. Also, it's an old-style writer... I haven't
>>>>>>>>> got around to updating it yet,)
>>>>>>>>>
>>>>>>>>> On Mon, 7 Nov 2022 at 09:22, Luís de Sousa <luis.a....@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Hi there. That is precisely the kind of output I would like to
>>>>>>>>>> have. Similar to what tools like mdBook produce. I would be glad if you
>>>>>>>>>> could share more details on that custom writer.
>>>>>>>>>>
>>>>>>>>>> Thank you and regards.
>>>>>>>>>>
>>>>>>>>>> On Friday, 4 November 2022 at 17:51:24 UTC+1
>>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>>>
>>>>>>>>>>> See https://usp.technology/specification for an example of how
>>>>>>>>>>> the Broadband Forum has recently been publishing some specs. This output is
>>>>>>>>>>> generated via an html-multi-writer.lua custom writer that contains the
>>>>>>>>>>> logic for splitting the output into multiple files (based on header level
>>>>>>>>>>> and/or specific classes). The writer also takes care of generating the
>>>>>>>>>>> navigation bar that you see at the top and bottom of the pages. The
>>>>>>>>>>> multiple files are then passed through pandoc again (to add the overall
>>>>>>>>>>> sidebar ToC and the top/bottom navigation bars, and to generate multiple
>>>>>>>>>>> standalone docs).
>>>>>>>>>>>
>>>>>>>>>>> Please let me know if you'd like more details (the overall setup
>>>>>>>>>>> is not very easily shareable, because it's heavily dependent on
>>>>>>>>>>> rather complicated make rules, but I could probably share the custom writer
>>>>>>>>>>> and give some example command lines.)
>>>>>>>>>>>
>>>>>>>>>>> On Fri, 4 Nov 2022 at 12:45, Luís de Sousa <luis.a....@gmail.com>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Dear all,
>>>>>>>>>>>>
>>>>>>>>>>>> I am currently working on a long document that must served as a
>>>>>>>>>>>> web page. The single file output is becoming too slow and cumbersome for
>>>>>>>>>>>> readers. I am aware this functionality is not available, but a Feature
>>>>>>>>>>>> Request is open [0].
>>>>>>>>>>>>
>>>>>>>>>>>> In that issue there are some hints to this issue being
>>>>>>>>>>>> addressable with a template [1]. I have tried many HTML templates, but
>>>>>>>>>>>> never seen one that would split a long document in a set of small files.
>>>>>>>>>>>> Would there be an example somewhere I could follow? Otherwise, could
>>>>>>>>>>>> someone provide a general idea of how such template would function?
>>>>>>>>>>>>
>>>>>>>>>>>> Thank you.
>>>>>>>>>>>>
>>>>>>>>>>>> [0] https://github.com/jgm/pandoc/issues/6122
>>>>>>>>>>>>
>>>>>>>>>>>> [1]
>>>>>>>>>>>> https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> 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/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com
>>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%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/cb3753d7-e845-4a72-a1aa-e93086a32f11n%40googlegroups.com
>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%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/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%40googlegroups.com
>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%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/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%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/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/5e290d88-1c47-407d-819b-34a094d8b48fn%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/5e290d88-1c47-407d-819b-34a094d8b48fn%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxjk4tfW2iyU1%3DrikSnmTWN6kDGYneGcqYc2_1WdReSqUw%40mail.gmail.com.

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

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

* Re: Multiple HTML file (chunked) output with template
       [not found]                                                 ` <CAEe_xxjk4tfW2iyU1=rikSnmTWN6kDGYneGcqYc2_1WdReSqUw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-11-15 15:54                                                   ` Luís de Sousa
       [not found]                                                     ` <20b2a20b-69ad-4b93-863a-c70db01d45een-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Luís de Sousa @ 2022-11-15 15:54 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi again Will, sorry for bothering you further. I so far failed to get the 
template to work. I tried to add it to the data folder 
($HOME/.local/share/pandoc/templates/) but still nothing. Looks like the 
default template is being applied no matter what. For instance, none of the 
meta predicates in the head section ever make it to the final HTML. 

Would you have any suggestion to debug this issue?

Thank you.

On Friday, 11 November 2022 at 15:30:17 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org 
wrote:

> Inline...
>
> On Fri, 11 Nov 2022 at 14:01, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>> Alright, it is working now, many thanks. The output HTML looks pretty 
>> solid and well linked. Two questions: 
>
>
> Great!
>
> 1. What is the purpose of the /dev/null bit in the second compile command?
>>
>
> That's what this remark in the README is referring to (rather obliquely):
>
> > Including the HTML via --include-in-header was a workaround I think, and 
> might no longer be necessary.
>
> I think there was a problem with parsing HTML at one point, and this was a 
> way of injecting HTML without passing it through pandoc.
>  
>
>> 2. Could you share an HTML template? It would greatly facilitate the 
>> design work.
>>
>
> I've added github-template.html 
> <https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-github-template-html> (somewhat 
> anonymised) to the gist.
>
> Next I will give it a try with a more elaborate document including 
>> cross-references, citations, etc. Will report back on that.
>>
>
> You'll probably have noted that the writer attempts to fix 
> cross-references so they reference the correct output file. 
>
> Regards.
>>
>> On Friday, 11 November 2022 at 13:58:28 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org 
>> wrote:
>>
>>> Oh, I'm so sorry! I hadn't tested exactly what I gave you (I'd put the 
>>> contents of utils.lua into the writer for testing, but then put it into a 
>>> new file to share with you, so the writer didn't need to change), but I 
>>> forgot to put 'return utils' at the bottom.
>>>
>>> I've now added this line: 
>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L51 
>>> and this time I've tested it locally. Please try again.
>>>
>>> On Fri, 11 Nov 2022 at 12:33, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 
>>> wrote:
>>>
>>>> Hello again. I confirm those are the contents in line 38. I assume 
>>>> utils.lua is being found, line 21 is now being  parsed without error. 
>>>> Anything else I can try? 
>>>>
>>>> Thank you.
>>>>
>>>> On Thursday, 10 November 2022 at 18:06:06 UTC+1 
>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>
>>>>> can you confirm what's in line 38 of the writer? if you haven't edited 
>>>>> the file then it's this 
>>>>> <https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-html-multi-writer-lua-L38>
>>>>> :
>>>>>
>>>>> local output_file_dir, output_file_base = utils.path.split(output_file)
>>>>>
>>>>> can you confirm that you've also copied utils.lua and that it's being 
>>>>> found? it should be calling the function at this line: 
>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L31
>>>>>
>>>>>
>>>>> On Thu, 10 Nov 2022 at 16:36, Luís de Sousa <luis.a....-Re5JQEeQqe8@public.gmane.orgm> 
>>>>> wrote:
>>>>>
>>>>>> Thank you once more for keeping this going. I made some progress but 
>>>>>> now there is an error with html-multi-writer.lua itself (log below). I 
>>>>>> never worked with Lua before, apologies if I am making something dumb.
>>>>>>
>>>>>> $ wget 
>>>>>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>>>>>> --2022-11-10 17:28:08--  
>>>>>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>>>>>> Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 
>>>>>> 185.199.111.133, 185.199.108.133, 185.199.110.133, ...
>>>>>> Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... 
>>>>>> connected.
>>>>>> HTTP request sent, awaiting response... 200 OK
>>>>>> Length: 8173 (8,0K) [text/plain]
>>>>>> Saving to: ‘logging.lua’
>>>>>>
>>>>>> logging.lua             100%[==============================>]   7,98K 
>>>>>>  --.-KB/s    in 0s
>>>>>>
>>>>>> 2022-11-10 17:28:08 (42,0 MB/s) - ‘logging.lua’ saved [8173/8173]
>>>>>>
>>>>>> $ mkdir -p $HOME/.local/share/pandoc/filters
>>>>>> $ mv logging.lua $HOME/.local/share/pandoc/filters
>>>>>> $ export LUA_PATH="$HOME/.local/share/pandoc/filters/?.lua;;"
>>>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o 
>>>>>> output/multi-test.html
>>>>>> Error running Lua:
>>>>>> html-multi-writer.lua:38: attempt to index a boolean value (local 
>>>>>> 'utils')
>>>>>> stack traceback:
>>>>>>
>>>>>>
>>>>>> On Thursday, 10 November 2022 at 13:47:52 UTC+1 
>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>
>>>>>>> I've updated the gist by adding utils.lua and updating the README. 
>>>>>>> This should be sufficient for the writer to run without error (please let 
>>>>>>> me know if not).
>>>>>>>
>>>>>>> Note that you'll also need to get logging.lua as described, and also 
>>>>>>> note that any generated YAML files will be empty (I didn't want to share my 
>>>>>>> brain-dead YAML writer but there appear to be lua YAML writers out there 
>>>>>>> that might work... anyway you might decide that you don't need the 
>>>>>>> generated YAML... this depends on how you set up the make rules).
>>>>>>>
>>>>>>> I don't really want to create a repo for this (well... a gist _is_ a 
>>>>>>> repo!) because I don't want (at this point) to provide any support for it 
>>>>>>> (questions are OK though). I'm providing the gist just as a demo of the 
>>>>>>> approach. Maybe later...
>>>>>>>
>>>>>>> On Wed, 9 Nov 2022 at 18:28, William Lupton <
>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> wrote:
>>>>>>>
>>>>>>>> Oh sorry, yes, utils is one of mine! I'll look into this tomorrow...
>>>>>>>>
>>>>>>>> On Wed, 9 Nov 2022, 16:03 Luís de Sousa, <luis.a....-Re5JQEeQqe8@public.gmane.orgm> 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Thank you very much for sharing, that looks very promising.
>>>>>>>>>
>>>>>>>>> Pandoc can't run the script though, says it can't find the utils 
>>>>>>>>> package. I installed luarocks and with it lua-utils but the error prevails:
>>>>>>>>>
>>>>>>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o 
>>>>>>>>> output/multi-test.html
>>>>>>>>> Error running Lua:
>>>>>>>>> html-multi-writer.lua:21: module 'utils' not found:
>>>>>>>>>     no field package.preload['utils']
>>>>>>>>>     no file '/usr/local/share/lua/5.4/utils.lua'
>>>>>>>>>     no file '/usr/local/share/lua/5.4/utils/init.lua'
>>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils.lua'
>>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils/init.lua'
>>>>>>>>>     no file './utils.lua'
>>>>>>>>>     no file './utils/init.lua'
>>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils.so'
>>>>>>>>>     no file '/usr/local/lib/lua/5.4/loadall.so'
>>>>>>>>>     no file './utils.so'
>>>>>>>>> stack traceback:
>>>>>>>>>     html-multi-writer.lua:21: in main chunk
>>>>>>>>>
>>>>>>>>> P.S.: would you consider creating a repository for this work? I 
>>>>>>>>> would like to automate the second stage with bash, shouldn't be too hard.
>>>>>>>>>
>>>>>>>>> On Monday, 7 November 2022 at 15:46:58 UTC+1 
>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>>
>>>>>>>>>> I've created this gist: 
>>>>>>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf
>>>>>>>>>>
>>>>>>>>>> I added a README.md and hope that there's enough info to get 
>>>>>>>>>> going. Please let me know if not.
>>>>>>>>>>
>>>>>>>>>> (Please note that this writer does some other things too, which 
>>>>>>>>>> might need to be stripped out. Also, it's an old-style writer... I haven't 
>>>>>>>>>> got around to updating it yet,)
>>>>>>>>>>
>>>>>>>>>> On Mon, 7 Nov 2022 at 09:22, Luís de Sousa <luis.a....@gmail.com> 
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi there. That is precisely the kind of output I would like to 
>>>>>>>>>>> have. Similar to what tools like mdBook produce. I would be glad if you 
>>>>>>>>>>> could share more details on that custom writer.
>>>>>>>>>>>
>>>>>>>>>>> Thank you and regards.
>>>>>>>>>>>
>>>>>>>>>>> On Friday, 4 November 2022 at 17:51:24 UTC+1 
>>>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>>>>
>>>>>>>>>>>> See https://usp.technology/specification for an example of how 
>>>>>>>>>>>> the Broadband Forum has recently been publishing some specs. This output is 
>>>>>>>>>>>> generated via an html-multi-writer.lua custom writer that contains the 
>>>>>>>>>>>> logic for splitting the output into multiple files (based on header level 
>>>>>>>>>>>> and/or specific classes). The writer also takes care of generating the 
>>>>>>>>>>>> navigation bar that you see at the top and bottom of the pages. The 
>>>>>>>>>>>> multiple files are then passed through pandoc again (to add the overall 
>>>>>>>>>>>> sidebar ToC and the top/bottom navigation bars, and to generate multiple 
>>>>>>>>>>>> standalone docs).
>>>>>>>>>>>>
>>>>>>>>>>>> Please let me know if you'd like more details (the overall 
>>>>>>>>>>>> setup is not very easily shareable, because it's heavily dependent on 
>>>>>>>>>>>> rather complicated make rules, but I could probably share the custom writer 
>>>>>>>>>>>> and give some example command lines.)
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, 4 Nov 2022 at 12:45, Luís de Sousa <
>>>>>>>>>>>> luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Dear all,
>>>>>>>>>>>>>
>>>>>>>>>>>>> I am currently working on a long document that must served as 
>>>>>>>>>>>>> a web page. The single file output is becoming too slow and cumbersome for 
>>>>>>>>>>>>> readers. I am aware this functionality is not available, but a Feature 
>>>>>>>>>>>>> Request is open [0]. 
>>>>>>>>>>>>>
>>>>>>>>>>>>> In that issue there are some hints to this issue being 
>>>>>>>>>>>>> addressable with a template [1]. I have tried many HTML templates, but 
>>>>>>>>>>>>> never seen one that would split a long document in a set of small files. 
>>>>>>>>>>>>> Would there be an example somewhere I could follow? Otherwise, could 
>>>>>>>>>>>>> someone provide a general idea of how such template would function?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thank you.
>>>>>>>>>>>>>
>>>>>>>>>>>>> [0] https://github.com/jgm/pandoc/issues/6122
>>>>>>>>>>>>>
>>>>>>>>>>>>> [1] 
>>>>>>>>>>>>> https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340
>>>>>>>>>>>>>
>>>>>>>>>>>>> -- 
>>>>>>>>>>>>> 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/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com 
>>>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%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/cb3753d7-e845-4a72-a1aa-e93086a32f11n%40googlegroups.com 
>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%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/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%40googlegroups.com 
>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%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/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%40googlegroups.com 
>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%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/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%40googlegroups.com 
>>>> <https://groups.google.com/d/msgid/pandoc-discuss/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%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/5e290d88-1c47-407d-819b-34a094d8b48fn%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/5e290d88-1c47-407d-819b-34a094d8b48fn%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20b2a20b-69ad-4b93-863a-c70db01d45een%40googlegroups.com.

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

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

* Re: Multiple HTML file (chunked) output with template
       [not found]                                                     ` <20b2a20b-69ad-4b93-863a-c70db01d45een-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-11-15 18:28                                                       ` 'William Lupton' via pandoc-discuss
       [not found]                                                         ` <CAEe_xxg7Gy3Ag3gzwFO8855d=7JE=XqOw4C4HivpJkuB109y0w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: 'William Lupton' via pandoc-discuss @ 2022-11-15 18:28 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Well not really, apart from using a very simple input file. See below for
an example (I've downloaded the template from the gist to
github-template-gist.html and put it in the current directory).

I'm wondering whether your problem might be that you're not supplying the
needed metadata, so it _looks_ as though it's using the default template
but in fact it isn't. I hope that you noted this comment in the README:

   - This is intended as a demo just to show the approach. It is not likely
   to be directly usable. In particular, all generated YAML files will
   currently be empty.

Have you tried editing the template, e.g., to insert some arbitrary HTML,
so you can be absolutely sure whether it's being used or not?

% cat temp.md
Document.

% pandoc temp.md
<p>Document.</p>

% pandoc -s temp.md -o temp-default.html
[WARNING] This document format requires a nonempty <title> element.
  Defaulting to 'temp' as the title.
  To specify a title, use 'title' in metadata or --metadata title="...".

% pandoc -s --template github-template-gist.html temp.md -o temp-github.html
[WARNING] This document format requires a nonempty <title> element.
  Defaulting to 'temp' as the title.
  To specify a title, use 'title' in metadata or --metadata title="...".

% diff -w temp-default.html temp-github.html
1a2
> <!-- ORGANIZATION GitHub Pages pandoc template; modified from
default.html template -->
164a166
>   <!-- XXX header includes are included just before the ToC (below) -->
165a168
>
166a170,182
>   <section class="page-header">
>     <h1 class="project-name">
>       <a href="" style="text-decoration: none; color: white;">
>         <img src="bbflogo-reverse-dark.png"/><br>
>
>       </a>
>     </h1>
>     <h2 class="project-tagline"></h2>
>     <p></p>
>     <p></p>
>   </section>
>
>   <section class="main-content">
167a184,194
>     <div style="clear: both;"/>
>     <footer class="site-footer">
>       <span class="site-footer-owner">
>       </span>
>       <span class="site-footer-credits">
>         This page was generated by <a href="https://pandoc.org">pandoc</a>
>         and <a href="https://pages.github.com">GitHub Pages</a>.
>         <span class="release"/>
>       </span>
>     </footer>
>   </section>

On Tue, 15 Nov 2022 at 15:54, Luís de Sousa <luis.a.de.sousa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:

> Hi again Will, sorry for bothering you further. I so far failed to get the
> template to work. I tried to add it to the data folder
> ($HOME/.local/share/pandoc/templates/) but still nothing. Looks like the
> default template is being applied no matter what. For instance, none of the
> meta predicates in the head section ever make it to the final HTML.
>
> Would you have any suggestion to debug this issue?
>
> Thank you.
>
> On Friday, 11 November 2022 at 15:30:17 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org
> wrote:
>
>> Inline...
>>
>> On Fri, 11 Nov 2022 at 14:01, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>>> Alright, it is working now, many thanks. The output HTML looks pretty
>>> solid and well linked. Two questions:
>>
>>
>> Great!
>>
>> 1. What is the purpose of the /dev/null bit in the second compile command?
>>>
>>
>> That's what this remark in the README is referring to (rather obliquely):
>>
>> > Including the HTML via --include-in-header was a workaround I think,
>> and might no longer be necessary.
>>
>> I think there was a problem with parsing HTML at one point, and this was
>> a way of injecting HTML without passing it through pandoc.
>>
>>
>>> 2. Could you share an HTML template? It would greatly facilitate the
>>> design work.
>>>
>>
>> I've added github-template.html
>> <https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-github-template-html> (somewhat
>> anonymised) to the gist.
>>
>> Next I will give it a try with a more elaborate document including
>>> cross-references, citations, etc. Will report back on that.
>>>
>>
>> You'll probably have noted that the writer attempts to fix
>> cross-references so they reference the correct output file.
>>
>> Regards.
>>>
>>> On Friday, 11 November 2022 at 13:58:28 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SisXa4x6EXUF0@public.gmane.orgg
>>> wrote:
>>>
>>>> Oh, I'm so sorry! I hadn't tested exactly what I gave you (I'd put the
>>>> contents of utils.lua into the writer for testing, but then put it into a
>>>> new file to share with you, so the writer didn't need to change), but I
>>>> forgot to put 'return utils' at the bottom.
>>>>
>>>> I've now added this line:
>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L51
>>>> and this time I've tested it locally. Please try again.
>>>>
>>>> On Fri, 11 Nov 2022 at 12:33, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>> wrote:
>>>>
>>>>> Hello again. I confirm those are the contents in line 38. I assume
>>>>> utils.lua is being found, line 21 is now being  parsed without error.
>>>>> Anything else I can try?
>>>>>
>>>>> Thank you.
>>>>>
>>>>> On Thursday, 10 November 2022 at 18:06:06 UTC+1
>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>
>>>>>> can you confirm what's in line 38 of the writer? if you haven't
>>>>>> edited the file then it's this
>>>>>> <https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-html-multi-writer-lua-L38>
>>>>>> :
>>>>>>
>>>>>> local output_file_dir, output_file_base =
>>>>>> utils.path.split(output_file)
>>>>>>
>>>>>> can you confirm that you've also copied utils.lua and that it's being
>>>>>> found? it should be calling the function at this line:
>>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L31
>>>>>>
>>>>>>
>>>>>> On Thu, 10 Nov 2022 at 16:36, Luís de Sousa <luis.a....@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Thank you once more for keeping this going. I made some progress but
>>>>>>> now there is an error with html-multi-writer.lua itself (log below). I
>>>>>>> never worked with Lua before, apologies if I am making something dumb.
>>>>>>>
>>>>>>> $ wget
>>>>>>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>>>>>>> --2022-11-10 17:28:08--
>>>>>>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>>>>>>> Resolving raw.githubusercontent.com (raw.githubusercontent.com)...
>>>>>>> 185.199.111.133, 185.199.108.133, 185.199.110.133, ...
>>>>>>> Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443...
>>>>>>> connected.
>>>>>>> HTTP request sent, awaiting response... 200 OK
>>>>>>> Length: 8173 (8,0K) [text/plain]
>>>>>>> Saving to: ‘logging.lua’
>>>>>>>
>>>>>>> logging.lua             100%[==============================>]
>>>>>>> 7,98K  --.-KB/s    in 0s
>>>>>>>
>>>>>>> 2022-11-10 17:28:08 (42,0 MB/s) - ‘logging.lua’ saved [8173/8173]
>>>>>>>
>>>>>>> $ mkdir -p $HOME/.local/share/pandoc/filters
>>>>>>> $ mv logging.lua $HOME/.local/share/pandoc/filters
>>>>>>> $ export LUA_PATH="$HOME/.local/share/pandoc/filters/?.lua;;"
>>>>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o
>>>>>>> output/multi-test.html
>>>>>>> Error running Lua:
>>>>>>> html-multi-writer.lua:38: attempt to index a boolean value (local
>>>>>>> 'utils')
>>>>>>> stack traceback:
>>>>>>>
>>>>>>>
>>>>>>> On Thursday, 10 November 2022 at 13:47:52 UTC+1
>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>
>>>>>>>> I've updated the gist by adding utils.lua and updating the README.
>>>>>>>> This should be sufficient for the writer to run without error (please let
>>>>>>>> me know if not).
>>>>>>>>
>>>>>>>> Note that you'll also need to get logging.lua as described, and
>>>>>>>> also note that any generated YAML files will be empty (I didn't want to
>>>>>>>> share my brain-dead YAML writer but there appear to be lua YAML writers out
>>>>>>>> there that might work... anyway you might decide that you don't need the
>>>>>>>> generated YAML... this depends on how you set up the make rules).
>>>>>>>>
>>>>>>>> I don't really want to create a repo for this (well... a gist _is_
>>>>>>>> a repo!) because I don't want (at this point) to provide any support for it
>>>>>>>> (questions are OK though). I'm providing the gist just as a demo of the
>>>>>>>> approach. Maybe later...
>>>>>>>>
>>>>>>>> On Wed, 9 Nov 2022 at 18:28, William Lupton <
>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> wrote:
>>>>>>>>
>>>>>>>>> Oh sorry, yes, utils is one of mine! I'll look into this
>>>>>>>>> tomorrow...
>>>>>>>>>
>>>>>>>>> On Wed, 9 Nov 2022, 16:03 Luís de Sousa, <luis.a....@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Thank you very much for sharing, that looks very promising.
>>>>>>>>>>
>>>>>>>>>> Pandoc can't run the script though, says it can't find the utils
>>>>>>>>>> package. I installed luarocks and with it lua-utils but the error prevails:
>>>>>>>>>>
>>>>>>>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o
>>>>>>>>>> output/multi-test.html
>>>>>>>>>> Error running Lua:
>>>>>>>>>> html-multi-writer.lua:21: module 'utils' not found:
>>>>>>>>>>     no field package.preload['utils']
>>>>>>>>>>     no file '/usr/local/share/lua/5.4/utils.lua'
>>>>>>>>>>     no file '/usr/local/share/lua/5.4/utils/init.lua'
>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils.lua'
>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils/init.lua'
>>>>>>>>>>     no file './utils.lua'
>>>>>>>>>>     no file './utils/init.lua'
>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils.so'
>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/loadall.so'
>>>>>>>>>>     no file './utils.so'
>>>>>>>>>> stack traceback:
>>>>>>>>>>     html-multi-writer.lua:21: in main chunk
>>>>>>>>>>
>>>>>>>>>> P.S.: would you consider creating a repository for this work? I
>>>>>>>>>> would like to automate the second stage with bash, shouldn't be too hard.
>>>>>>>>>>
>>>>>>>>>> On Monday, 7 November 2022 at 15:46:58 UTC+1
>>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>>>
>>>>>>>>>>> I've created this gist:
>>>>>>>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf
>>>>>>>>>>>
>>>>>>>>>>> I added a README.md and hope that there's enough info to get
>>>>>>>>>>> going. Please let me know if not.
>>>>>>>>>>>
>>>>>>>>>>> (Please note that this writer does some other things too, which
>>>>>>>>>>> might need to be stripped out. Also, it's an old-style writer... I haven't
>>>>>>>>>>> got around to updating it yet,)
>>>>>>>>>>>
>>>>>>>>>>> On Mon, 7 Nov 2022 at 09:22, Luís de Sousa <luis.a....@gmail.com>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi there. That is precisely the kind of output I would like to
>>>>>>>>>>>> have. Similar to what tools like mdBook produce. I would be glad if you
>>>>>>>>>>>> could share more details on that custom writer.
>>>>>>>>>>>>
>>>>>>>>>>>> Thank you and regards.
>>>>>>>>>>>>
>>>>>>>>>>>> On Friday, 4 November 2022 at 17:51:24 UTC+1
>>>>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> See https://usp.technology/specification for an example of
>>>>>>>>>>>>> how the Broadband Forum has recently been publishing some specs. This
>>>>>>>>>>>>> output is generated via an html-multi-writer.lua custom writer that
>>>>>>>>>>>>> contains the logic for splitting the output into multiple files (based on
>>>>>>>>>>>>> header level and/or specific classes). The writer also takes care of
>>>>>>>>>>>>> generating the navigation bar that you see at the top and bottom of the
>>>>>>>>>>>>> pages. The multiple files are then passed through pandoc again (to add the
>>>>>>>>>>>>> overall sidebar ToC and the top/bottom navigation bars, and to generate
>>>>>>>>>>>>> multiple standalone docs).
>>>>>>>>>>>>>
>>>>>>>>>>>>> Please let me know if you'd like more details (the overall
>>>>>>>>>>>>> setup is not very easily shareable, because it's heavily dependent on
>>>>>>>>>>>>> rather complicated make rules, but I could probably share the custom writer
>>>>>>>>>>>>> and give some example command lines.)
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Fri, 4 Nov 2022 at 12:45, Luís de Sousa <
>>>>>>>>>>>>> luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Dear all,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I am currently working on a long document that must served as
>>>>>>>>>>>>>> a web page. The single file output is becoming too slow and cumbersome for
>>>>>>>>>>>>>> readers. I am aware this functionality is not available, but a Feature
>>>>>>>>>>>>>> Request is open [0].
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> In that issue there are some hints to this issue being
>>>>>>>>>>>>>> addressable with a template [1]. I have tried many HTML templates, but
>>>>>>>>>>>>>> never seen one that would split a long document in a set of small files.
>>>>>>>>>>>>>> Would there be an example somewhere I could follow? Otherwise, could
>>>>>>>>>>>>>> someone provide a general idea of how such template would function?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thank you.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> [0] https://github.com/jgm/pandoc/issues/6122
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> [1]
>>>>>>>>>>>>>> https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> 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/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com
>>>>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%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/cb3753d7-e845-4a72-a1aa-e93086a32f11n%40googlegroups.com
>>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%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/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%40googlegroups.com
>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%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/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%40googlegroups.com
>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%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/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%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/5e290d88-1c47-407d-819b-34a094d8b48fn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/5e290d88-1c47-407d-819b-34a094d8b48fn%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/20b2a20b-69ad-4b93-863a-c70db01d45een%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/20b2a20b-69ad-4b93-863a-c70db01d45een%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxg7Gy3Ag3gzwFO8855d%3D7JE%3DXqOw4C4HivpJkuB109y0w%40mail.gmail.com.

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

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

* Re: Multiple HTML file (chunked) output with template
       [not found]                                                         ` <CAEe_xxg7Gy3Ag3gzwFO8855d=7JE=XqOw4C4HivpJkuB109y0w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-11-16  8:32                                                           ` Luís de Sousa
       [not found]                                                             ` <fbe785d6-57dc-45a5-a4da-cc275638cd6dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Luís de Sousa @ 2022-11-16  8:32 UTC (permalink / raw)
  To: pandoc-discuss


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

Hello again. I am now certain the template is being applied as you showed. 
However the output page is in all similar to the default, same font, 
colours and the absence of a TOC (a screen capture of the two side by side 
is attached). I was expecting to see something more akin to what you 
pointed to upthread and thought it was not functioning: 
https://usp.technology/specification . So I would just ask you to confirm 
the output in the screen capture is the expected.

Thank you.

On Tuesday, 15 November 2022 at 19:29:14 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org 
wrote:

> Well not really, apart from using a very simple input file. See below for 
> an example (I've downloaded the template from the gist to 
> github-template-gist.html and put it in the current directory).
>
> I'm wondering whether your problem might be that you're not supplying the 
> needed metadata, so it _looks_ as though it's using the default template 
> but in fact it isn't. I hope that you noted this comment in the README:
>
>    - This is intended as a demo just to show the approach. It is not 
>    likely to be directly usable. In particular, all generated YAML files will 
>    currently be empty.
>
> Have you tried editing the template, e.g., to insert some arbitrary HTML, 
> so you can be absolutely sure whether it's being used or not?
>
> % cat temp.md
> Document.
>
> % pandoc temp.md 
> <p>Document.</p>
>
> % pandoc -s temp.md -o temp-default.html
> [WARNING] This document format requires a nonempty <title> element.
>   Defaulting to 'temp' as the title.
>   To specify a title, use 'title' in metadata or --metadata title="...".
>
> % pandoc -s --template github-template-gist.html temp.md -o 
> temp-github.html
> [WARNING] This document format requires a nonempty <title> element.
>   Defaulting to 'temp' as the title.
>   To specify a title, use 'title' in metadata or --metadata title="...".
>
> % diff -w temp-default.html temp-github.html 
> 1a2
> > <!-- ORGANIZATION GitHub Pages pandoc template; modified from 
> default.html template -->
> 164a166
> >   <!-- XXX header includes are included just before the ToC (below) -->
> 165a168
> > 
> 166a170,182
> >   <section class="page-header">
> >     <h1 class="project-name">
> >       <a href="" style="text-decoration: none; color: white;">
> >         <img src="bbflogo-reverse-dark.png"/><br>
> >         
> >       </a>
> >     </h1>
> >     <h2 class="project-tagline"></h2>
> >     <p></p>
> >     <p></p>
> >   </section>
> > 
> >   <section class="main-content">
> 167a184,194
> >     <div style="clear: both;"/>
> >     <footer class="site-footer">
> >       <span class="site-footer-owner">
> >       </span>
> >       <span class="site-footer-credits">
> >         This page was generated by <a href="https://pandoc.org
> ">pandoc</a>
> >         and <a href="https://pages.github.com">GitHub Pages</a>.
> >         <span class="release"/>
> >       </span>
> >     </footer>
> >   </section>
>
> On Tue, 15 Nov 2022 at 15:54, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>> Hi again Will, sorry for bothering you further. I so far failed to get 
>> the template to work. I tried to add it to the data folder 
>> ($HOME/.local/share/pandoc/templates/) but still nothing. Looks like the 
>> default template is being applied no matter what. For instance, none of the 
>> meta predicates in the head section ever make it to the final HTML. 
>>
>> Would you have any suggestion to debug this issue?
>>
>> Thank you.
>>
>> On Friday, 11 November 2022 at 15:30:17 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org 
>> wrote:
>>
>>> Inline...
>>>
>>> On Fri, 11 Nov 2022 at 14:01, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 
>>> wrote:
>>>
>>>> Alright, it is working now, many thanks. The output HTML looks pretty 
>>>> solid and well linked. Two questions: 
>>>
>>>
>>> Great!
>>>
>>> 1. What is the purpose of the /dev/null bit in the second compile 
>>>> command?
>>>>
>>>
>>> That's what this remark in the README is referring to (rather obliquely):
>>>
>>> > Including the HTML via --include-in-header was a workaround I think, 
>>> and might no longer be necessary.
>>>
>>> I think there was a problem with parsing HTML at one point, and this was 
>>> a way of injecting HTML without passing it through pandoc.
>>>  
>>>
>>>> 2. Could you share an HTML template? It would greatly facilitate the 
>>>> design work.
>>>>
>>>
>>> I've added github-template.html 
>>> <https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-github-template-html> (somewhat 
>>> anonymised) to the gist.
>>>
>>> Next I will give it a try with a more elaborate document including 
>>>> cross-references, citations, etc. Will report back on that.
>>>>
>>>
>>> You'll probably have noted that the writer attempts to fix 
>>> cross-references so they reference the correct output file. 
>>>
>>> Regards.
>>>>
>>>> On Friday, 11 November 2022 at 13:58:28 UTC+1 
>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>
>>>>> Oh, I'm so sorry! I hadn't tested exactly what I gave you (I'd put the 
>>>>> contents of utils.lua into the writer for testing, but then put it into a 
>>>>> new file to share with you, so the writer didn't need to change), but I 
>>>>> forgot to put 'return utils' at the bottom.
>>>>>
>>>>> I've now added this line: 
>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L51 
>>>>> and this time I've tested it locally. Please try again.
>>>>>
>>>>> On Fri, 11 Nov 2022 at 12:33, Luís de Sousa <luis.a....-Re5JQEeQqe8@public.gmane.orgm> 
>>>>> wrote:
>>>>>
>>>>>> Hello again. I confirm those are the contents in line 38. I assume 
>>>>>> utils.lua is being found, line 21 is now being  parsed without error. 
>>>>>> Anything else I can try? 
>>>>>>
>>>>>> Thank you.
>>>>>>
>>>>>> On Thursday, 10 November 2022 at 18:06:06 UTC+1 
>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>
>>>>>>> can you confirm what's in line 38 of the writer? if you haven't 
>>>>>>> edited the file then it's this 
>>>>>>> <https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-html-multi-writer-lua-L38>
>>>>>>> :
>>>>>>>
>>>>>>> local output_file_dir, output_file_base = 
>>>>>>> utils.path.split(output_file)
>>>>>>>
>>>>>>> can you confirm that you've also copied utils.lua and that it's 
>>>>>>> being found? it should be calling the function at this line: 
>>>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L31
>>>>>>>
>>>>>>>
>>>>>>> On Thu, 10 Nov 2022 at 16:36, Luís de Sousa <luis.a....@gmail.com> 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Thank you once more for keeping this going. I made some progress 
>>>>>>>> but now there is an error with html-multi-writer.lua itself (log below). I 
>>>>>>>> never worked with Lua before, apologies if I am making something dumb.
>>>>>>>>
>>>>>>>> $ wget 
>>>>>>>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>>>>>>>> --2022-11-10 17:28:08--  
>>>>>>>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>>>>>>>> Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 
>>>>>>>> 185.199.111.133, 185.199.108.133, 185.199.110.133, ...
>>>>>>>> Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... 
>>>>>>>> connected.
>>>>>>>> HTTP request sent, awaiting response... 200 OK
>>>>>>>> Length: 8173 (8,0K) [text/plain]
>>>>>>>> Saving to: ‘logging.lua’
>>>>>>>>
>>>>>>>> logging.lua             100%[==============================>]   
>>>>>>>> 7,98K  --.-KB/s    in 0s
>>>>>>>>
>>>>>>>> 2022-11-10 17:28:08 (42,0 MB/s) - ‘logging.lua’ saved [8173/8173]
>>>>>>>>
>>>>>>>> $ mkdir -p $HOME/.local/share/pandoc/filters
>>>>>>>> $ mv logging.lua $HOME/.local/share/pandoc/filters
>>>>>>>> $ export LUA_PATH="$HOME/.local/share/pandoc/filters/?.lua;;"
>>>>>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o 
>>>>>>>> output/multi-test.html
>>>>>>>> Error running Lua:
>>>>>>>> html-multi-writer.lua:38: attempt to index a boolean value (local 
>>>>>>>> 'utils')
>>>>>>>> stack traceback:
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thursday, 10 November 2022 at 13:47:52 UTC+1 
>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>
>>>>>>>>> I've updated the gist by adding utils.lua and updating the README. 
>>>>>>>>> This should be sufficient for the writer to run without error (please let 
>>>>>>>>> me know if not).
>>>>>>>>>
>>>>>>>>> Note that you'll also need to get logging.lua as described, and 
>>>>>>>>> also note that any generated YAML files will be empty (I didn't want to 
>>>>>>>>> share my brain-dead YAML writer but there appear to be lua YAML writers out 
>>>>>>>>> there that might work... anyway you might decide that you don't need the 
>>>>>>>>> generated YAML... this depends on how you set up the make rules).
>>>>>>>>>
>>>>>>>>> I don't really want to create a repo for this (well... a gist _is_ 
>>>>>>>>> a repo!) because I don't want (at this point) to provide any support for it 
>>>>>>>>> (questions are OK though). I'm providing the gist just as a demo of the 
>>>>>>>>> approach. Maybe later...
>>>>>>>>>
>>>>>>>>> On Wed, 9 Nov 2022 at 18:28, William Lupton <
>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> wrote:
>>>>>>>>>
>>>>>>>>>> Oh sorry, yes, utils is one of mine! I'll look into this 
>>>>>>>>>> tomorrow...
>>>>>>>>>>
>>>>>>>>>> On Wed, 9 Nov 2022, 16:03 Luís de Sousa, <luis.a....@gmail.com> 
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> Thank you very much for sharing, that looks very promising.
>>>>>>>>>>>
>>>>>>>>>>> Pandoc can't run the script though, says it can't find the utils 
>>>>>>>>>>> package. I installed luarocks and with it lua-utils but the error prevails:
>>>>>>>>>>>
>>>>>>>>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o 
>>>>>>>>>>> output/multi-test.html
>>>>>>>>>>> Error running Lua:
>>>>>>>>>>> html-multi-writer.lua:21: module 'utils' not found:
>>>>>>>>>>>     no field package.preload['utils']
>>>>>>>>>>>     no file '/usr/local/share/lua/5.4/utils.lua'
>>>>>>>>>>>     no file '/usr/local/share/lua/5.4/utils/init.lua'
>>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils.lua'
>>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils/init.lua'
>>>>>>>>>>>     no file './utils.lua'
>>>>>>>>>>>     no file './utils/init.lua'
>>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils.so'
>>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/loadall.so'
>>>>>>>>>>>     no file './utils.so'
>>>>>>>>>>> stack traceback:
>>>>>>>>>>>     html-multi-writer.lua:21: in main chunk
>>>>>>>>>>>
>>>>>>>>>>> P.S.: would you consider creating a repository for this work? I 
>>>>>>>>>>> would like to automate the second stage with bash, shouldn't be too hard.
>>>>>>>>>>>
>>>>>>>>>>> On Monday, 7 November 2022 at 15:46:58 UTC+1 
>>>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>>>>
>>>>>>>>>>>> I've created this gist: 
>>>>>>>>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf
>>>>>>>>>>>>
>>>>>>>>>>>> I added a README.md and hope that there's enough info to get 
>>>>>>>>>>>> going. Please let me know if not.
>>>>>>>>>>>>
>>>>>>>>>>>> (Please note that this writer does some other things too, which 
>>>>>>>>>>>> might need to be stripped out. Also, it's an old-style writer... I haven't 
>>>>>>>>>>>> got around to updating it yet,)
>>>>>>>>>>>>
>>>>>>>>>>>> On Mon, 7 Nov 2022 at 09:22, Luís de Sousa <
>>>>>>>>>>>> luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi there. That is precisely the kind of output I would like to 
>>>>>>>>>>>>> have. Similar to what tools like mdBook produce. I would be glad if you 
>>>>>>>>>>>>> could share more details on that custom writer.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thank you and regards.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Friday, 4 November 2022 at 17:51:24 UTC+1 
>>>>>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> See https://usp.technology/specification for an example of 
>>>>>>>>>>>>>> how the Broadband Forum has recently been publishing some specs. This 
>>>>>>>>>>>>>> output is generated via an html-multi-writer.lua custom writer that 
>>>>>>>>>>>>>> contains the logic for splitting the output into multiple files (based on 
>>>>>>>>>>>>>> header level and/or specific classes). The writer also takes care of 
>>>>>>>>>>>>>> generating the navigation bar that you see at the top and bottom of the 
>>>>>>>>>>>>>> pages. The multiple files are then passed through pandoc again (to add the 
>>>>>>>>>>>>>> overall sidebar ToC and the top/bottom navigation bars, and to generate 
>>>>>>>>>>>>>> multiple standalone docs).
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Please let me know if you'd like more details (the overall 
>>>>>>>>>>>>>> setup is not very easily shareable, because it's heavily dependent on 
>>>>>>>>>>>>>> rather complicated make rules, but I could probably share the custom writer 
>>>>>>>>>>>>>> and give some example command lines.)
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Fri, 4 Nov 2022 at 12:45, Luís de Sousa <
>>>>>>>>>>>>>> luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Dear all,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I am currently working on a long document that must served 
>>>>>>>>>>>>>>> as a web page. The single file output is becoming too slow and cumbersome 
>>>>>>>>>>>>>>> for readers. I am aware this functionality is not available, but a Feature 
>>>>>>>>>>>>>>> Request is open [0]. 
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> In that issue there are some hints to this issue being 
>>>>>>>>>>>>>>> addressable with a template [1]. I have tried many HTML templates, but 
>>>>>>>>>>>>>>> never seen one that would split a long document in a set of small files. 
>>>>>>>>>>>>>>> Would there be an example somewhere I could follow? Otherwise, could 
>>>>>>>>>>>>>>> someone provide a general idea of how such template would function?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Thank you.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> [0] https://github.com/jgm/pandoc/issues/6122
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> [1] 
>>>>>>>>>>>>>>> https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>> 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...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>>>>>>>>>>>>>>> To view this discussion on the web visit 
>>>>>>>>>>>>>>> https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com 
>>>>>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%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/cb3753d7-e845-4a72-a1aa-e93086a32f11n%40googlegroups.com 
>>>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%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/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%40googlegroups.com 
>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%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/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%40googlegroups.com 
>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%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/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%40googlegroups.com 
>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%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/5e290d88-1c47-407d-819b-34a094d8b48fn%40googlegroups.com 
>>>> <https://groups.google.com/d/msgid/pandoc-discuss/5e290d88-1c47-407d-819b-34a094d8b48fn%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/20b2a20b-69ad-4b93-863a-c70db01d45een%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/20b2a20b-69ad-4b93-863a-c70db01d45een%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/fbe785d6-57dc-45a5-a4da-cc275638cd6dn%40googlegroups.com.

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

[-- Attachment #2: RenderedPages.png --]
[-- Type: image/png, Size: 99985 bytes --]

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

* Re: Multiple HTML file (chunked) output with template
       [not found]                                                             ` <fbe785d6-57dc-45a5-a4da-cc275638cd6dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-11-16  9:25                                                               ` 'William Lupton' via pandoc-discuss
       [not found]                                                                 ` <CAEe_xxj5JCnvbH6AbsTnV-cS79HCZ+PLksQ3Tm8RUjcHmyV+DQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: 'William Lupton' via pandoc-discuss @ 2022-11-16  9:25 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Probably, yes!

The details depend on the template variable values (and on the CSS too of
course; for example, the "sidebar" ToC is all done using CSS).

If you go to the example that I gave earlier (
https://usp.technology/specification) and then to corresponding place in
the GitHub repo (
https://github.com/BroadbandForum/usp/tree/master/docs/specification) you
can see all the final products, including the CSS.

On Wed, 16 Nov 2022 at 08:32, Luís de Sousa <luis.a.de.sousa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:

> Hello again. I am now certain the template is being applied as you showed.
> However the output page is in all similar to the default, same font,
> colours and the absence of a TOC (a screen capture of the two side by side
> is attached). I was expecting to see something more akin to what you
> pointed to upthread and thought it was not functioning:
> https://usp.technology/specification . So I would just ask you to confirm
> the output in the screen capture is the expected.
>
> Thank you.
>
> On Tuesday, 15 November 2022 at 19:29:14 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org
> wrote:
>
>> Well not really, apart from using a very simple input file. See below for
>> an example (I've downloaded the template from the gist to
>> github-template-gist.html and put it in the current directory).
>>
>> I'm wondering whether your problem might be that you're not supplying the
>> needed metadata, so it _looks_ as though it's using the default template
>> but in fact it isn't. I hope that you noted this comment in the README:
>>
>>    - This is intended as a demo just to show the approach. It is not
>>    likely to be directly usable. In particular, all generated YAML files will
>>    currently be empty.
>>
>> Have you tried editing the template, e.g., to insert some arbitrary HTML,
>> so you can be absolutely sure whether it's being used or not?
>>
>> % cat temp.md
>> Document.
>>
>> % pandoc temp.md
>> <p>Document.</p>
>>
>> % pandoc -s temp.md -o temp-default.html
>> [WARNING] This document format requires a nonempty <title> element.
>>   Defaulting to 'temp' as the title.
>>   To specify a title, use 'title' in metadata or --metadata title="...".
>>
>> % pandoc -s --template github-template-gist.html temp.md -o
>> temp-github.html
>> [WARNING] This document format requires a nonempty <title> element.
>>   Defaulting to 'temp' as the title.
>>   To specify a title, use 'title' in metadata or --metadata title="...".
>>
>> % diff -w temp-default.html temp-github.html
>> 1a2
>> > <!-- ORGANIZATION GitHub Pages pandoc template; modified from
>> default.html template -->
>> 164a166
>> >   <!-- XXX header includes are included just before the ToC (below) -->
>> 165a168
>> >
>> 166a170,182
>> >   <section class="page-header">
>> >     <h1 class="project-name">
>> >       <a href="" style="text-decoration: none; color: white;">
>> >         <img src="bbflogo-reverse-dark.png"/><br>
>> >
>> >       </a>
>> >     </h1>
>> >     <h2 class="project-tagline"></h2>
>> >     <p></p>
>> >     <p></p>
>> >   </section>
>> >
>> >   <section class="main-content">
>> 167a184,194
>> >     <div style="clear: both;"/>
>> >     <footer class="site-footer">
>> >       <span class="site-footer-owner">
>> >       </span>
>> >       <span class="site-footer-credits">
>> >         This page was generated by <a href="https://pandoc.org
>> ">pandoc</a>
>> >         and <a href="https://pages.github.com">GitHub Pages</a>.
>> >         <span class="release"/>
>> >       </span>
>> >     </footer>
>> >   </section>
>>
>> On Tue, 15 Nov 2022 at 15:54, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>>> Hi again Will, sorry for bothering you further. I so far failed to get
>>> the template to work. I tried to add it to the data folder
>>> ($HOME/.local/share/pandoc/templates/) but still nothing. Looks like the
>>> default template is being applied no matter what. For instance, none of the
>>> meta predicates in the head section ever make it to the final HTML.
>>>
>>> Would you have any suggestion to debug this issue?
>>>
>>> Thank you.
>>>
>>> On Friday, 11 November 2022 at 15:30:17 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SisXa4x6EXUF0@public.gmane.orgg
>>> wrote:
>>>
>>>> Inline...
>>>>
>>>> On Fri, 11 Nov 2022 at 14:01, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>> wrote:
>>>>
>>>>> Alright, it is working now, many thanks. The output HTML looks pretty
>>>>> solid and well linked. Two questions:
>>>>
>>>>
>>>> Great!
>>>>
>>>> 1. What is the purpose of the /dev/null bit in the second compile
>>>>> command?
>>>>>
>>>>
>>>> That's what this remark in the README is referring to (rather
>>>> obliquely):
>>>>
>>>> > Including the HTML via --include-in-header was a workaround I think,
>>>> and might no longer be necessary.
>>>>
>>>> I think there was a problem with parsing HTML at one point, and this
>>>> was a way of injecting HTML without passing it through pandoc.
>>>>
>>>>
>>>>> 2. Could you share an HTML template? It would greatly facilitate the
>>>>> design work.
>>>>>
>>>>
>>>> I've added github-template.html
>>>> <https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-github-template-html> (somewhat
>>>> anonymised) to the gist.
>>>>
>>>> Next I will give it a try with a more elaborate document including
>>>>> cross-references, citations, etc. Will report back on that.
>>>>>
>>>>
>>>> You'll probably have noted that the writer attempts to fix
>>>> cross-references so they reference the correct output file.
>>>>
>>>> Regards.
>>>>>
>>>>> On Friday, 11 November 2022 at 13:58:28 UTC+1
>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>
>>>>>> Oh, I'm so sorry! I hadn't tested exactly what I gave you (I'd put
>>>>>> the contents of utils.lua into the writer for testing, but then put it into
>>>>>> a new file to share with you, so the writer didn't need to change), but I
>>>>>> forgot to put 'return utils' at the bottom.
>>>>>>
>>>>>> I've now added this line:
>>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L51
>>>>>> and this time I've tested it locally. Please try again.
>>>>>>
>>>>>> On Fri, 11 Nov 2022 at 12:33, Luís de Sousa <luis.a....@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hello again. I confirm those are the contents in line 38. I assume
>>>>>>> utils.lua is being found, line 21 is now being  parsed without error.
>>>>>>> Anything else I can try?
>>>>>>>
>>>>>>> Thank you.
>>>>>>>
>>>>>>> On Thursday, 10 November 2022 at 18:06:06 UTC+1
>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>
>>>>>>>> can you confirm what's in line 38 of the writer? if you haven't
>>>>>>>> edited the file then it's this
>>>>>>>> <https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-html-multi-writer-lua-L38>
>>>>>>>> :
>>>>>>>>
>>>>>>>> local output_file_dir, output_file_base =
>>>>>>>> utils.path.split(output_file)
>>>>>>>>
>>>>>>>> can you confirm that you've also copied utils.lua and that it's
>>>>>>>> being found? it should be calling the function at this line:
>>>>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L31
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, 10 Nov 2022 at 16:36, Luís de Sousa <luis.a....@gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Thank you once more for keeping this going. I made some progress
>>>>>>>>> but now there is an error with html-multi-writer.lua itself (log below). I
>>>>>>>>> never worked with Lua before, apologies if I am making something dumb.
>>>>>>>>>
>>>>>>>>> $ wget
>>>>>>>>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>>>>>>>>> --2022-11-10 17:28:08--
>>>>>>>>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>>>>>>>>> Resolving raw.githubusercontent.com (raw.githubusercontent.com)...
>>>>>>>>> 185.199.111.133, 185.199.108.133, 185.199.110.133, ...
>>>>>>>>> Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443...
>>>>>>>>> connected.
>>>>>>>>> HTTP request sent, awaiting response... 200 OK
>>>>>>>>> Length: 8173 (8,0K) [text/plain]
>>>>>>>>> Saving to: ‘logging.lua’
>>>>>>>>>
>>>>>>>>> logging.lua             100%[==============================>]
>>>>>>>>> 7,98K  --.-KB/s    in 0s
>>>>>>>>>
>>>>>>>>> 2022-11-10 17:28:08 (42,0 MB/s) - ‘logging.lua’ saved [8173/8173]
>>>>>>>>>
>>>>>>>>> $ mkdir -p $HOME/.local/share/pandoc/filters
>>>>>>>>> $ mv logging.lua $HOME/.local/share/pandoc/filters
>>>>>>>>> $ export LUA_PATH="$HOME/.local/share/pandoc/filters/?.lua;;"
>>>>>>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o
>>>>>>>>> output/multi-test.html
>>>>>>>>> Error running Lua:
>>>>>>>>> html-multi-writer.lua:38: attempt to index a boolean value (local
>>>>>>>>> 'utils')
>>>>>>>>> stack traceback:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thursday, 10 November 2022 at 13:47:52 UTC+1
>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>>
>>>>>>>>>> I've updated the gist by adding utils.lua and updating the
>>>>>>>>>> README. This should be sufficient for the writer to run without error
>>>>>>>>>> (please let me know if not).
>>>>>>>>>>
>>>>>>>>>> Note that you'll also need to get logging.lua as described, and
>>>>>>>>>> also note that any generated YAML files will be empty (I didn't want to
>>>>>>>>>> share my brain-dead YAML writer but there appear to be lua YAML writers out
>>>>>>>>>> there that might work... anyway you might decide that you don't need the
>>>>>>>>>> generated YAML... this depends on how you set up the make rules).
>>>>>>>>>>
>>>>>>>>>> I don't really want to create a repo for this (well... a gist
>>>>>>>>>> _is_ a repo!) because I don't want (at this point) to provide any support
>>>>>>>>>> for it (questions are OK though). I'm providing the gist just as a demo of
>>>>>>>>>> the approach. Maybe later...
>>>>>>>>>>
>>>>>>>>>> On Wed, 9 Nov 2022 at 18:28, William Lupton <
>>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> wrote:
>>>>>>>>>>
>>>>>>>>>>> Oh sorry, yes, utils is one of mine! I'll look into this
>>>>>>>>>>> tomorrow...
>>>>>>>>>>>
>>>>>>>>>>> On Wed, 9 Nov 2022, 16:03 Luís de Sousa, <luis.a....@gmail.com>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Thank you very much for sharing, that looks very promising.
>>>>>>>>>>>>
>>>>>>>>>>>> Pandoc can't run the script though, says it can't find the
>>>>>>>>>>>> utils package. I installed luarocks and with it lua-utils but the error
>>>>>>>>>>>> prevails:
>>>>>>>>>>>>
>>>>>>>>>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o
>>>>>>>>>>>> output/multi-test.html
>>>>>>>>>>>> Error running Lua:
>>>>>>>>>>>> html-multi-writer.lua:21: module 'utils' not found:
>>>>>>>>>>>>     no field package.preload['utils']
>>>>>>>>>>>>     no file '/usr/local/share/lua/5.4/utils.lua'
>>>>>>>>>>>>     no file '/usr/local/share/lua/5.4/utils/init.lua'
>>>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils.lua'
>>>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils/init.lua'
>>>>>>>>>>>>     no file './utils.lua'
>>>>>>>>>>>>     no file './utils/init.lua'
>>>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils.so'
>>>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/loadall.so'
>>>>>>>>>>>>     no file './utils.so'
>>>>>>>>>>>> stack traceback:
>>>>>>>>>>>>     html-multi-writer.lua:21: in main chunk
>>>>>>>>>>>>
>>>>>>>>>>>> P.S.: would you consider creating a repository for this work? I
>>>>>>>>>>>> would like to automate the second stage with bash, shouldn't be too hard.
>>>>>>>>>>>>
>>>>>>>>>>>> On Monday, 7 November 2022 at 15:46:58 UTC+1
>>>>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> I've created this gist:
>>>>>>>>>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf
>>>>>>>>>>>>>
>>>>>>>>>>>>> I added a README.md and hope that there's enough info to get
>>>>>>>>>>>>> going. Please let me know if not.
>>>>>>>>>>>>>
>>>>>>>>>>>>> (Please note that this writer does some other things too,
>>>>>>>>>>>>> which might need to be stripped out. Also, it's an old-style writer... I
>>>>>>>>>>>>> haven't got around to updating it yet,)
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Mon, 7 Nov 2022 at 09:22, Luís de Sousa <
>>>>>>>>>>>>> luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hi there. That is precisely the kind of output I would like
>>>>>>>>>>>>>> to have. Similar to what tools like mdBook produce. I would be glad if you
>>>>>>>>>>>>>> could share more details on that custom writer.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thank you and regards.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Friday, 4 November 2022 at 17:51:24 UTC+1
>>>>>>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> See https://usp.technology/specification for an example of
>>>>>>>>>>>>>>> how the Broadband Forum has recently been publishing some specs. This
>>>>>>>>>>>>>>> output is generated via an html-multi-writer.lua custom writer that
>>>>>>>>>>>>>>> contains the logic for splitting the output into multiple files (based on
>>>>>>>>>>>>>>> header level and/or specific classes). The writer also takes care of
>>>>>>>>>>>>>>> generating the navigation bar that you see at the top and bottom of the
>>>>>>>>>>>>>>> pages. The multiple files are then passed through pandoc again (to add the
>>>>>>>>>>>>>>> overall sidebar ToC and the top/bottom navigation bars, and to generate
>>>>>>>>>>>>>>> multiple standalone docs).
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Please let me know if you'd like more details (the overall
>>>>>>>>>>>>>>> setup is not very easily shareable, because it's heavily dependent on
>>>>>>>>>>>>>>> rather complicated make rules, but I could probably share the custom writer
>>>>>>>>>>>>>>> and give some example command lines.)
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Fri, 4 Nov 2022 at 12:45, Luís de Sousa <
>>>>>>>>>>>>>>> luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Dear all,
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I am currently working on a long document that must served
>>>>>>>>>>>>>>>> as a web page. The single file output is becoming too slow and cumbersome
>>>>>>>>>>>>>>>> for readers. I am aware this functionality is not available, but a Feature
>>>>>>>>>>>>>>>> Request is open [0].
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> In that issue there are some hints to this issue being
>>>>>>>>>>>>>>>> addressable with a template [1]. I have tried many HTML templates, but
>>>>>>>>>>>>>>>> never seen one that would split a long document in a set of small files.
>>>>>>>>>>>>>>>> Would there be an example somewhere I could follow? Otherwise, could
>>>>>>>>>>>>>>>> someone provide a general idea of how such template would function?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Thank you.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> [0] https://github.com/jgm/pandoc/issues/6122
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> [1]
>>>>>>>>>>>>>>>> https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> 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...-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm
>>>>>>>>>>>>>>>> .
>>>>>>>>>>>>>>>> To view this discussion on the web visit
>>>>>>>>>>>>>>>> https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com
>>>>>>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%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/cb3753d7-e845-4a72-a1aa-e93086a32f11n%40googlegroups.com
>>>>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%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/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%40googlegroups.com
>>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%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/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%40googlegroups.com
>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%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/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%40googlegroups.com
>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%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/5e290d88-1c47-407d-819b-34a094d8b48fn%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/5e290d88-1c47-407d-819b-34a094d8b48fn%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/20b2a20b-69ad-4b93-863a-c70db01d45een%40googlegroups.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/20b2a20b-69ad-4b93-863a-c70db01d45een%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/fbe785d6-57dc-45a5-a4da-cc275638cd6dn%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/fbe785d6-57dc-45a5-a4da-cc275638cd6dn%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxj5JCnvbH6AbsTnV-cS79HCZ%2BPLksQ3Tm8RUjcHmyV%2BDQ%40mail.gmail.com.

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

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

* Re: Multiple HTML file (chunked) output with template
       [not found]                                                                 ` <CAEe_xxj5JCnvbH6AbsTnV-cS79HCZ+PLksQ3Tm8RUjcHmyV+DQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-11-17 14:36                                                                   ` Luís de Sousa
       [not found]                                                                     ` <0a29b118-ae0f-448f-8e3e-39cc96ef5d8an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Luís de Sousa @ 2022-11-17 14:36 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi again Will,

I managed to get a well formatted output with a few tweaks to the CSS in 
the repo. However, I need to add the references to CSS files by hand. I 
understand this might be beyond the original scope of this thread, but what 
is the canonical method to automatically include these files in the pandoc 
compilation? If that is possible.

Thank you.

On Wednesday, 16 November 2022 at 10:25:37 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org 
wrote:

> Probably, yes!
>
> The details depend on the template variable values (and on the CSS too of 
> course; for example, the "sidebar" ToC is all done using CSS).
>
> If you go to the example that I gave earlier (
> https://usp.technology/specification) and then to corresponding place in 
> the GitHub repo (
> https://github.com/BroadbandForum/usp/tree/master/docs/specification) you 
> can see all the final products, including the CSS.
>
> On Wed, 16 Nov 2022 at 08:32, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>> Hello again. I am now certain the template is being applied as you 
>> showed. However the output page is in all similar to the default, same 
>> font, colours and the absence of a TOC (a screen capture of the two side by 
>> side is attached). I was expecting to see something more akin to what you 
>> pointed to upthread and thought it was not functioning: 
>> https://usp.technology/specification . So I would just ask you to 
>> confirm the output in the screen capture is the expected.
>>
>> Thank you.
>>
>> On Tuesday, 15 November 2022 at 19:29:14 UTC+1 wlu...-QSt+ys/nuMyEUIsrzH9SisXa4x6EXUF0@public.gmane.orgg 
>> wrote:
>>
>>> Well not really, apart from using a very simple input file. See below 
>>> for an example (I've downloaded the template from the gist to 
>>> github-template-gist.html and put it in the current directory).
>>>
>>> I'm wondering whether your problem might be that you're not supplying 
>>> the needed metadata, so it _looks_ as though it's using the default 
>>> template but in fact it isn't. I hope that you noted this comment in the 
>>> README:
>>>
>>>    - This is intended as a demo just to show the approach. It is not 
>>>    likely to be directly usable. In particular, all generated YAML files will 
>>>    currently be empty.
>>>
>>> Have you tried editing the template, e.g., to insert some arbitrary 
>>> HTML, so you can be absolutely sure whether it's being used or not?
>>>
>>> % cat temp.md
>>> Document.
>>>
>>> % pandoc temp.md 
>>> <p>Document.</p>
>>>
>>> % pandoc -s temp.md -o temp-default.html
>>> [WARNING] This document format requires a nonempty <title> element.
>>>   Defaulting to 'temp' as the title.
>>>   To specify a title, use 'title' in metadata or --metadata title="...".
>>>
>>> % pandoc -s --template github-template-gist.html temp.md -o 
>>> temp-github.html
>>> [WARNING] This document format requires a nonempty <title> element.
>>>   Defaulting to 'temp' as the title.
>>>   To specify a title, use 'title' in metadata or --metadata title="...".
>>>
>>> % diff -w temp-default.html temp-github.html 
>>> 1a2
>>> > <!-- ORGANIZATION GitHub Pages pandoc template; modified from 
>>> default.html template -->
>>> 164a166
>>> >   <!-- XXX header includes are included just before the ToC (below) -->
>>> 165a168
>>> > 
>>> 166a170,182
>>> >   <section class="page-header">
>>> >     <h1 class="project-name">
>>> >       <a href="" style="text-decoration: none; color: white;">
>>> >         <img src="bbflogo-reverse-dark.png"/><br>
>>> >         
>>> >       </a>
>>> >     </h1>
>>> >     <h2 class="project-tagline"></h2>
>>> >     <p></p>
>>> >     <p></p>
>>> >   </section>
>>> > 
>>> >   <section class="main-content">
>>> 167a184,194
>>> >     <div style="clear: both;"/>
>>> >     <footer class="site-footer">
>>> >       <span class="site-footer-owner">
>>> >       </span>
>>> >       <span class="site-footer-credits">
>>> >         This page was generated by <a href="https://pandoc.org
>>> ">pandoc</a>
>>> >         and <a href="https://pages.github.com">GitHub Pages</a>.
>>> >         <span class="release"/>
>>> >       </span>
>>> >     </footer>
>>> >   </section>
>>>
>>> On Tue, 15 Nov 2022 at 15:54, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 
>>> wrote:
>>>
>>>> Hi again Will, sorry for bothering you further. I so far failed to get 
>>>> the template to work. I tried to add it to the data folder 
>>>> ($HOME/.local/share/pandoc/templates/) but still nothing. Looks like the 
>>>> default template is being applied no matter what. For instance, none of the 
>>>> meta predicates in the head section ever make it to the final HTML. 
>>>>
>>>> Would you have any suggestion to debug this issue?
>>>>
>>>> Thank you.
>>>>
>>>> On Friday, 11 November 2022 at 15:30:17 UTC+1 
>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>
>>>>> Inline...
>>>>>
>>>>> On Fri, 11 Nov 2022 at 14:01, Luís de Sousa <luis.a....-Re5JQEeQqe8@public.gmane.orgm> 
>>>>> wrote:
>>>>>
>>>>>> Alright, it is working now, many thanks. The output HTML looks pretty 
>>>>>> solid and well linked. Two questions: 
>>>>>
>>>>>
>>>>> Great!
>>>>>
>>>>> 1. What is the purpose of the /dev/null bit in the second compile 
>>>>>> command?
>>>>>>
>>>>>
>>>>> That's what this remark in the README is referring to (rather 
>>>>> obliquely):
>>>>>
>>>>> > Including the HTML via --include-in-header was a workaround I think, 
>>>>> and might no longer be necessary.
>>>>>
>>>>> I think there was a problem with parsing HTML at one point, and this 
>>>>> was a way of injecting HTML without passing it through pandoc.
>>>>>  
>>>>>
>>>>>> 2. Could you share an HTML template? It would greatly facilitate the 
>>>>>> design work.
>>>>>>
>>>>>
>>>>> I've added github-template.html 
>>>>> <https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-github-template-html> (somewhat 
>>>>> anonymised) to the gist.
>>>>>
>>>>> Next I will give it a try with a more elaborate document including 
>>>>>> cross-references, citations, etc. Will report back on that.
>>>>>>
>>>>>
>>>>> You'll probably have noted that the writer attempts to fix 
>>>>> cross-references so they reference the correct output file. 
>>>>>
>>>>> Regards.
>>>>>>
>>>>>> On Friday, 11 November 2022 at 13:58:28 UTC+1 
>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>
>>>>>>> Oh, I'm so sorry! I hadn't tested exactly what I gave you (I'd put 
>>>>>>> the contents of utils.lua into the writer for testing, but then put it into 
>>>>>>> a new file to share with you, so the writer didn't need to change), but I 
>>>>>>> forgot to put 'return utils' at the bottom.
>>>>>>>
>>>>>>> I've now added this line: 
>>>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L51 
>>>>>>> and this time I've tested it locally. Please try again.
>>>>>>>
>>>>>>> On Fri, 11 Nov 2022 at 12:33, Luís de Sousa <luis.a....@gmail.com> 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hello again. I confirm those are the contents in line 38. I assume 
>>>>>>>> utils.lua is being found, line 21 is now being  parsed without error. 
>>>>>>>> Anything else I can try? 
>>>>>>>>
>>>>>>>> Thank you.
>>>>>>>>
>>>>>>>> On Thursday, 10 November 2022 at 18:06:06 UTC+1 
>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>
>>>>>>>>> can you confirm what's in line 38 of the writer? if you haven't 
>>>>>>>>> edited the file then it's this 
>>>>>>>>> <https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-html-multi-writer-lua-L38>
>>>>>>>>> :
>>>>>>>>>
>>>>>>>>> local output_file_dir, output_file_base = 
>>>>>>>>> utils.path.split(output_file)
>>>>>>>>>
>>>>>>>>> can you confirm that you've also copied utils.lua and that it's 
>>>>>>>>> being found? it should be calling the function at this line: 
>>>>>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L31
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, 10 Nov 2022 at 16:36, Luís de Sousa <luis.a....@gmail.com> 
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Thank you once more for keeping this going. I made some progress 
>>>>>>>>>> but now there is an error with html-multi-writer.lua itself (log below). I 
>>>>>>>>>> never worked with Lua before, apologies if I am making something dumb.
>>>>>>>>>>
>>>>>>>>>> $ wget 
>>>>>>>>>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>>>>>>>>>> --2022-11-10 17:28:08--  
>>>>>>>>>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>>>>>>>>>> Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 
>>>>>>>>>> 185.199.111.133, 185.199.108.133, 185.199.110.133, ...
>>>>>>>>>> Connecting to raw.githubusercontent.com (
>>>>>>>>>> raw.githubusercontent.com)|185.199.111.133|:443... connected.
>>>>>>>>>> HTTP request sent, awaiting response... 200 OK
>>>>>>>>>> Length: 8173 (8,0K) [text/plain]
>>>>>>>>>> Saving to: ‘logging.lua’
>>>>>>>>>>
>>>>>>>>>> logging.lua             100%[==============================>]   
>>>>>>>>>> 7,98K  --.-KB/s    in 0s
>>>>>>>>>>
>>>>>>>>>> 2022-11-10 17:28:08 (42,0 MB/s) - ‘logging.lua’ saved [8173/8173]
>>>>>>>>>>
>>>>>>>>>> $ mkdir -p $HOME/.local/share/pandoc/filters
>>>>>>>>>> $ mv logging.lua $HOME/.local/share/pandoc/filters
>>>>>>>>>> $ export LUA_PATH="$HOME/.local/share/pandoc/filters/?.lua;;"
>>>>>>>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o 
>>>>>>>>>> output/multi-test.html
>>>>>>>>>> Error running Lua:
>>>>>>>>>> html-multi-writer.lua:38: attempt to index a boolean value (local 
>>>>>>>>>> 'utils')
>>>>>>>>>> stack traceback:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Thursday, 10 November 2022 at 13:47:52 UTC+1 
>>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>>>
>>>>>>>>>>> I've updated the gist by adding utils.lua and updating the 
>>>>>>>>>>> README. This should be sufficient for the writer to run without error 
>>>>>>>>>>> (please let me know if not).
>>>>>>>>>>>
>>>>>>>>>>> Note that you'll also need to get logging.lua as described, and 
>>>>>>>>>>> also note that any generated YAML files will be empty (I didn't want to 
>>>>>>>>>>> share my brain-dead YAML writer but there appear to be lua YAML writers out 
>>>>>>>>>>> there that might work... anyway you might decide that you don't need the 
>>>>>>>>>>> generated YAML... this depends on how you set up the make rules).
>>>>>>>>>>>
>>>>>>>>>>> I don't really want to create a repo for this (well... a gist 
>>>>>>>>>>> _is_ a repo!) because I don't want (at this point) to provide any support 
>>>>>>>>>>> for it (questions are OK though). I'm providing the gist just as a demo of 
>>>>>>>>>>> the approach. Maybe later...
>>>>>>>>>>>
>>>>>>>>>>> On Wed, 9 Nov 2022 at 18:28, William Lupton <
>>>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Oh sorry, yes, utils is one of mine! I'll look into this 
>>>>>>>>>>>> tomorrow...
>>>>>>>>>>>>
>>>>>>>>>>>> On Wed, 9 Nov 2022, 16:03 Luís de Sousa, <luis.a....@gmail.com> 
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Thank you very much for sharing, that looks very promising.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Pandoc can't run the script though, says it can't find the 
>>>>>>>>>>>>> utils package. I installed luarocks and with it lua-utils but the error 
>>>>>>>>>>>>> prevails:
>>>>>>>>>>>>>
>>>>>>>>>>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o 
>>>>>>>>>>>>> output/multi-test.html
>>>>>>>>>>>>> Error running Lua:
>>>>>>>>>>>>> html-multi-writer.lua:21: module 'utils' not found:
>>>>>>>>>>>>>     no field package.preload['utils']
>>>>>>>>>>>>>     no file '/usr/local/share/lua/5.4/utils.lua'
>>>>>>>>>>>>>     no file '/usr/local/share/lua/5.4/utils/init.lua'
>>>>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils.lua'
>>>>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils/init.lua'
>>>>>>>>>>>>>     no file './utils.lua'
>>>>>>>>>>>>>     no file './utils/init.lua'
>>>>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils.so'
>>>>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/loadall.so'
>>>>>>>>>>>>>     no file './utils.so'
>>>>>>>>>>>>> stack traceback:
>>>>>>>>>>>>>     html-multi-writer.lua:21: in main chunk
>>>>>>>>>>>>>
>>>>>>>>>>>>> P.S.: would you consider creating a repository for this work? 
>>>>>>>>>>>>> I would like to automate the second stage with bash, shouldn't be too hard.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Monday, 7 November 2022 at 15:46:58 UTC+1 
>>>>>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> I've created this gist: 
>>>>>>>>>>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I added a README.md and hope that there's enough info to get 
>>>>>>>>>>>>>> going. Please let me know if not.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> (Please note that this writer does some other things too, 
>>>>>>>>>>>>>> which might need to be stripped out. Also, it's an old-style writer... I 
>>>>>>>>>>>>>> haven't got around to updating it yet,)
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Mon, 7 Nov 2022 at 09:22, Luís de Sousa <
>>>>>>>>>>>>>> luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Hi there. That is precisely the kind of output I would like 
>>>>>>>>>>>>>>> to have. Similar to what tools like mdBook produce. I would be glad if you 
>>>>>>>>>>>>>>> could share more details on that custom writer.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Thank you and regards.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Friday, 4 November 2022 at 17:51:24 UTC+1 
>>>>>>>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> See https://usp.technology/specification for an example of 
>>>>>>>>>>>>>>>> how the Broadband Forum has recently been publishing some specs. This 
>>>>>>>>>>>>>>>> output is generated via an html-multi-writer.lua custom writer that 
>>>>>>>>>>>>>>>> contains the logic for splitting the output into multiple files (based on 
>>>>>>>>>>>>>>>> header level and/or specific classes). The writer also takes care of 
>>>>>>>>>>>>>>>> generating the navigation bar that you see at the top and bottom of the 
>>>>>>>>>>>>>>>> pages. The multiple files are then passed through pandoc again (to add the 
>>>>>>>>>>>>>>>> overall sidebar ToC and the top/bottom navigation bars, and to generate 
>>>>>>>>>>>>>>>> multiple standalone docs).
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Please let me know if you'd like more details (the overall 
>>>>>>>>>>>>>>>> setup is not very easily shareable, because it's heavily dependent on 
>>>>>>>>>>>>>>>> rather complicated make rules, but I could probably share the custom writer 
>>>>>>>>>>>>>>>> and give some example command lines.)
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Fri, 4 Nov 2022 at 12:45, Luís de Sousa <
>>>>>>>>>>>>>>>> luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Dear all,
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I am currently working on a long document that must served 
>>>>>>>>>>>>>>>>> as a web page. The single file output is becoming too slow and cumbersome 
>>>>>>>>>>>>>>>>> for readers. I am aware this functionality is not available, but a Feature 
>>>>>>>>>>>>>>>>> Request is open [0]. 
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> In that issue there are some hints to this issue being 
>>>>>>>>>>>>>>>>> addressable with a template [1]. I have tried many HTML templates, but 
>>>>>>>>>>>>>>>>> never seen one that would split a long document in a set of small files. 
>>>>>>>>>>>>>>>>> Would there be an example somewhere I could follow? Otherwise, could 
>>>>>>>>>>>>>>>>> someone provide a general idea of how such template would function?
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Thank you.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> [0] https://github.com/jgm/pandoc/issues/6122
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> [1] 
>>>>>>>>>>>>>>>>> https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>> 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/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com 
>>>>>>>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%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...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>> To view this discussion on the web visit 
>>>>>>>>>>>>>>> https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%40googlegroups.com 
>>>>>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%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/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%40googlegroups.com 
>>>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%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/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%40googlegroups.com 
>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%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/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%40googlegroups.com 
>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%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/5e290d88-1c47-407d-819b-34a094d8b48fn%40googlegroups.com 
>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/5e290d88-1c47-407d-819b-34a094d8b48fn%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/20b2a20b-69ad-4b93-863a-c70db01d45een%40googlegroups.com 
>>>> <https://groups.google.com/d/msgid/pandoc-discuss/20b2a20b-69ad-4b93-863a-c70db01d45een%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/fbe785d6-57dc-45a5-a4da-cc275638cd6dn%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/fbe785d6-57dc-45a5-a4da-cc275638cd6dn%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/0a29b118-ae0f-448f-8e3e-39cc96ef5d8an%40googlegroups.com.

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

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

* Re: Multiple HTML file (chunked) output with template
       [not found]                                                                     ` <0a29b118-ae0f-448f-8e3e-39cc96ef5d8an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-11-17 14:42                                                                       ` 'William Lupton' via pandoc-discuss
  0 siblings, 0 replies; 19+ messages in thread
From: 'William Lupton' via pandoc-discuss @ 2022-11-17 14:42 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

https://pandoc.org/MANUAL.html#options-affecting-specific-writers and look
for --css

(I suggest also searching the manual for "css")

-c *URL*, --css=*URL*

Link to a CSS style sheet. This option can be used repeatedly to include
multiple files. They will be included in the order specified.

A stylesheet is required for generating EPUB. If none is provided using
this option (or the css or stylesheet metadata fields), pandoc will look
for a file epub.css in the user data directory (see --data-dir
<https://pandoc.org/MANUAL.html#option--data-dir>). If it is not found
there, sensible defaults will be used.

On Thu, 17 Nov 2022 at 14:36, Luís de Sousa <luis.a.de.sousa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:

> Hi again Will,
>
> I managed to get a well formatted output with a few tweaks to the CSS in
> the repo. However, I need to add the references to CSS files by hand. I
> understand this might be beyond the original scope of this thread, but what
> is the canonical method to automatically include these files in the pandoc
> compilation? If that is possible.
>
> Thank you.
>
> On Wednesday, 16 November 2022 at 10:25:37 UTC+1
> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>
>> Probably, yes!
>>
>> The details depend on the template variable values (and on the CSS too of
>> course; for example, the "sidebar" ToC is all done using CSS).
>>
>> If you go to the example that I gave earlier (
>> https://usp.technology/specification) and then to corresponding place in
>> the GitHub repo (
>> https://github.com/BroadbandForum/usp/tree/master/docs/specification)
>> you can see all the final products, including the CSS.
>>
>> On Wed, 16 Nov 2022 at 08:32, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>>> Hello again. I am now certain the template is being applied as you
>>> showed. However the output page is in all similar to the default, same
>>> font, colours and the absence of a TOC (a screen capture of the two side by
>>> side is attached). I was expecting to see something more akin to what you
>>> pointed to upthread and thought it was not functioning:
>>> https://usp.technology/specification . So I would just ask you to
>>> confirm the output in the screen capture is the expected.
>>>
>>> Thank you.
>>>
>>> On Tuesday, 15 November 2022 at 19:29:14 UTC+1
>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>
>>>> Well not really, apart from using a very simple input file. See below
>>>> for an example (I've downloaded the template from the gist to
>>>> github-template-gist.html and put it in the current directory).
>>>>
>>>> I'm wondering whether your problem might be that you're not supplying
>>>> the needed metadata, so it _looks_ as though it's using the default
>>>> template but in fact it isn't. I hope that you noted this comment in the
>>>> README:
>>>>
>>>>    - This is intended as a demo just to show the approach. It is not
>>>>    likely to be directly usable. In particular, all generated YAML files will
>>>>    currently be empty.
>>>>
>>>> Have you tried editing the template, e.g., to insert some arbitrary
>>>> HTML, so you can be absolutely sure whether it's being used or not?
>>>>
>>>> % cat temp.md
>>>> Document.
>>>>
>>>> % pandoc temp.md
>>>> <p>Document.</p>
>>>>
>>>> % pandoc -s temp.md -o temp-default.html
>>>> [WARNING] This document format requires a nonempty <title> element.
>>>>   Defaulting to 'temp' as the title.
>>>>   To specify a title, use 'title' in metadata or --metadata title="...".
>>>>
>>>> % pandoc -s --template github-template-gist.html temp.md -o
>>>> temp-github.html
>>>> [WARNING] This document format requires a nonempty <title> element.
>>>>   Defaulting to 'temp' as the title.
>>>>   To specify a title, use 'title' in metadata or --metadata title="...".
>>>>
>>>> % diff -w temp-default.html temp-github.html
>>>> 1a2
>>>> > <!-- ORGANIZATION GitHub Pages pandoc template; modified from
>>>> default.html template -->
>>>> 164a166
>>>> >   <!-- XXX header includes are included just before the ToC (below)
>>>> -->
>>>> 165a168
>>>> >
>>>> 166a170,182
>>>> >   <section class="page-header">
>>>> >     <h1 class="project-name">
>>>> >       <a href="" style="text-decoration: none; color: white;">
>>>> >         <img src="bbflogo-reverse-dark.png"/><br>
>>>> >
>>>> >       </a>
>>>> >     </h1>
>>>> >     <h2 class="project-tagline"></h2>
>>>> >     <p></p>
>>>> >     <p></p>
>>>> >   </section>
>>>> >
>>>> >   <section class="main-content">
>>>> 167a184,194
>>>> >     <div style="clear: both;"/>
>>>> >     <footer class="site-footer">
>>>> >       <span class="site-footer-owner">
>>>> >       </span>
>>>> >       <span class="site-footer-credits">
>>>> >         This page was generated by <a href="https://pandoc.org
>>>> ">pandoc</a>
>>>> >         and <a href="https://pages.github.com">GitHub Pages</a>.
>>>> >         <span class="release"/>
>>>> >       </span>
>>>> >     </footer>
>>>> >   </section>
>>>>
>>>> On Tue, 15 Nov 2022 at 15:54, Luís de Sousa <luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>> wrote:
>>>>
>>>>> Hi again Will, sorry for bothering you further. I so far failed to get
>>>>> the template to work. I tried to add it to the data folder
>>>>> ($HOME/.local/share/pandoc/templates/) but still nothing. Looks like the
>>>>> default template is being applied no matter what. For instance, none of the
>>>>> meta predicates in the head section ever make it to the final HTML.
>>>>>
>>>>> Would you have any suggestion to debug this issue?
>>>>>
>>>>> Thank you.
>>>>>
>>>>> On Friday, 11 November 2022 at 15:30:17 UTC+1
>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>
>>>>>> Inline...
>>>>>>
>>>>>> On Fri, 11 Nov 2022 at 14:01, Luís de Sousa <luis.a....@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Alright, it is working now, many thanks. The output HTML looks
>>>>>>> pretty solid and well linked. Two questions:
>>>>>>
>>>>>>
>>>>>> Great!
>>>>>>
>>>>>> 1. What is the purpose of the /dev/null bit in the second compile
>>>>>>> command?
>>>>>>>
>>>>>>
>>>>>> That's what this remark in the README is referring to (rather
>>>>>> obliquely):
>>>>>>
>>>>>> > Including the HTML via --include-in-header was a workaround I
>>>>>> think, and might no longer be necessary.
>>>>>>
>>>>>> I think there was a problem with parsing HTML at one point, and this
>>>>>> was a way of injecting HTML without passing it through pandoc.
>>>>>>
>>>>>>
>>>>>>> 2. Could you share an HTML template? It would greatly facilitate the
>>>>>>> design work.
>>>>>>>
>>>>>>
>>>>>> I've added github-template.html
>>>>>> <https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-github-template-html> (somewhat
>>>>>> anonymised) to the gist.
>>>>>>
>>>>>> Next I will give it a try with a more elaborate document including
>>>>>>> cross-references, citations, etc. Will report back on that.
>>>>>>>
>>>>>>
>>>>>> You'll probably have noted that the writer attempts to fix
>>>>>> cross-references so they reference the correct output file.
>>>>>>
>>>>>> Regards.
>>>>>>>
>>>>>>> On Friday, 11 November 2022 at 13:58:28 UTC+1
>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>
>>>>>>>> Oh, I'm so sorry! I hadn't tested exactly what I gave you (I'd put
>>>>>>>> the contents of utils.lua into the writer for testing, but then put it into
>>>>>>>> a new file to share with you, so the writer didn't need to change), but I
>>>>>>>> forgot to put 'return utils' at the bottom.
>>>>>>>>
>>>>>>>> I've now added this line:
>>>>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L51
>>>>>>>> and this time I've tested it locally. Please try again.
>>>>>>>>
>>>>>>>> On Fri, 11 Nov 2022 at 12:33, Luís de Sousa <luis.a....@gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hello again. I confirm those are the contents in line 38. I assume
>>>>>>>>> utils.lua is being found, line 21 is now being  parsed without error.
>>>>>>>>> Anything else I can try?
>>>>>>>>>
>>>>>>>>> Thank you.
>>>>>>>>>
>>>>>>>>> On Thursday, 10 November 2022 at 18:06:06 UTC+1
>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>>
>>>>>>>>>> can you confirm what's in line 38 of the writer? if you haven't
>>>>>>>>>> edited the file then it's this
>>>>>>>>>> <https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-html-multi-writer-lua-L38>
>>>>>>>>>> :
>>>>>>>>>>
>>>>>>>>>> local output_file_dir, output_file_base =
>>>>>>>>>> utils.path.split(output_file)
>>>>>>>>>>
>>>>>>>>>> can you confirm that you've also copied utils.lua and that it's
>>>>>>>>>> being found? it should be calling the function at this line:
>>>>>>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf#file-utils-lua-L31
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Thu, 10 Nov 2022 at 16:36, Luís de Sousa <luis.a....@gmail.com>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> Thank you once more for keeping this going. I made some progress
>>>>>>>>>>> but now there is an error with html-multi-writer.lua itself (log below). I
>>>>>>>>>>> never worked with Lua before, apologies if I am making something dumb.
>>>>>>>>>>>
>>>>>>>>>>> $ wget
>>>>>>>>>>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>>>>>>>>>>> --2022-11-10 17:28:08--
>>>>>>>>>>> https://raw.githubusercontent.com/wlupton/pandoc-lua-logging/main/logging.lua
>>>>>>>>>>> Resolving raw.githubusercontent.com (raw.githubusercontent.com)...
>>>>>>>>>>> 185.199.111.133, 185.199.108.133, 185.199.110.133, ...
>>>>>>>>>>> Connecting to raw.githubusercontent.com (
>>>>>>>>>>> raw.githubusercontent.com)|185.199.111.133|:443... connected.
>>>>>>>>>>> HTTP request sent, awaiting response... 200 OK
>>>>>>>>>>> Length: 8173 (8,0K) [text/plain]
>>>>>>>>>>> Saving to: ‘logging.lua’
>>>>>>>>>>>
>>>>>>>>>>> logging.lua             100%[==============================>]
>>>>>>>>>>> 7,98K  --.-KB/s    in 0s
>>>>>>>>>>>
>>>>>>>>>>> 2022-11-10 17:28:08 (42,0 MB/s) - ‘logging.lua’ saved [8173/8173]
>>>>>>>>>>>
>>>>>>>>>>> $ mkdir -p $HOME/.local/share/pandoc/filters
>>>>>>>>>>> $ mv logging.lua $HOME/.local/share/pandoc/filters
>>>>>>>>>>> $ export LUA_PATH="$HOME/.local/share/pandoc/filters/?.lua;;"
>>>>>>>>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o
>>>>>>>>>>> output/multi-test.html
>>>>>>>>>>> Error running Lua:
>>>>>>>>>>> html-multi-writer.lua:38: attempt to index a boolean value
>>>>>>>>>>> (local 'utils')
>>>>>>>>>>> stack traceback:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Thursday, 10 November 2022 at 13:47:52 UTC+1
>>>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>>>>
>>>>>>>>>>>> I've updated the gist by adding utils.lua and updating the
>>>>>>>>>>>> README. This should be sufficient for the writer to run without error
>>>>>>>>>>>> (please let me know if not).
>>>>>>>>>>>>
>>>>>>>>>>>> Note that you'll also need to get logging.lua as described, and
>>>>>>>>>>>> also note that any generated YAML files will be empty (I didn't want to
>>>>>>>>>>>> share my brain-dead YAML writer but there appear to be lua YAML writers out
>>>>>>>>>>>> there that might work... anyway you might decide that you don't need the
>>>>>>>>>>>> generated YAML... this depends on how you set up the make rules).
>>>>>>>>>>>>
>>>>>>>>>>>> I don't really want to create a repo for this (well... a gist
>>>>>>>>>>>> _is_ a repo!) because I don't want (at this point) to provide any support
>>>>>>>>>>>> for it (questions are OK though). I'm providing the gist just as a demo of
>>>>>>>>>>>> the approach. Maybe later...
>>>>>>>>>>>>
>>>>>>>>>>>> On Wed, 9 Nov 2022 at 18:28, William Lupton <
>>>>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Oh sorry, yes, utils is one of mine! I'll look into this
>>>>>>>>>>>>> tomorrow...
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Wed, 9 Nov 2022, 16:03 Luís de Sousa, <luis.a....@gmail.com>
>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thank you very much for sharing, that looks very promising.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Pandoc can't run the script though, says it can't find the
>>>>>>>>>>>>>> utils package. I installed luarocks and with it lua-utils but the error
>>>>>>>>>>>>>> prevails:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> $ pandoc multi-test.md -t html-multi-writer.lua -o
>>>>>>>>>>>>>> output/multi-test.html
>>>>>>>>>>>>>> Error running Lua:
>>>>>>>>>>>>>> html-multi-writer.lua:21: module 'utils' not found:
>>>>>>>>>>>>>>     no field package.preload['utils']
>>>>>>>>>>>>>>     no file '/usr/local/share/lua/5.4/utils.lua'
>>>>>>>>>>>>>>     no file '/usr/local/share/lua/5.4/utils/init.lua'
>>>>>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils.lua'
>>>>>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils/init.lua'
>>>>>>>>>>>>>>     no file './utils.lua'
>>>>>>>>>>>>>>     no file './utils/init.lua'
>>>>>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/utils.so'
>>>>>>>>>>>>>>     no file '/usr/local/lib/lua/5.4/loadall.so'
>>>>>>>>>>>>>>     no file './utils.so'
>>>>>>>>>>>>>> stack traceback:
>>>>>>>>>>>>>>     html-multi-writer.lua:21: in main chunk
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> P.S.: would you consider creating a repository for this work?
>>>>>>>>>>>>>> I would like to automate the second stage with bash, shouldn't be too hard.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Monday, 7 November 2022 at 15:46:58 UTC+1
>>>>>>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I've created this gist:
>>>>>>>>>>>>>>> https://gist.github.com/wlupton/2fc23fc1c4e4b4899121bfafc0fea4bf
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I added a README.md and hope that there's enough info to get
>>>>>>>>>>>>>>> going. Please let me know if not.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> (Please note that this writer does some other things too,
>>>>>>>>>>>>>>> which might need to be stripped out. Also, it's an old-style writer... I
>>>>>>>>>>>>>>> haven't got around to updating it yet,)
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Mon, 7 Nov 2022 at 09:22, Luís de Sousa <
>>>>>>>>>>>>>>> luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Hi there. That is precisely the kind of output I would like
>>>>>>>>>>>>>>>> to have. Similar to what tools like mdBook produce. I would be glad if you
>>>>>>>>>>>>>>>> could share more details on that custom writer.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Thank you and regards.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Friday, 4 November 2022 at 17:51:24 UTC+1
>>>>>>>>>>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> See https://usp.technology/specification for an example
>>>>>>>>>>>>>>>>> of how the Broadband Forum has recently been publishing some specs. This
>>>>>>>>>>>>>>>>> output is generated via an html-multi-writer.lua custom writer that
>>>>>>>>>>>>>>>>> contains the logic for splitting the output into multiple files (based on
>>>>>>>>>>>>>>>>> header level and/or specific classes). The writer also takes care of
>>>>>>>>>>>>>>>>> generating the navigation bar that you see at the top and bottom of the
>>>>>>>>>>>>>>>>> pages. The multiple files are then passed through pandoc again (to add the
>>>>>>>>>>>>>>>>> overall sidebar ToC and the top/bottom navigation bars, and to generate
>>>>>>>>>>>>>>>>> multiple standalone docs).
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Please let me know if you'd like more details (the overall
>>>>>>>>>>>>>>>>> setup is not very easily shareable, because it's heavily dependent on
>>>>>>>>>>>>>>>>> rather complicated make rules, but I could probably share the custom writer
>>>>>>>>>>>>>>>>> and give some example command lines.)
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On Fri, 4 Nov 2022 at 12:45, Luís de Sousa <
>>>>>>>>>>>>>>>>> luis.a....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Dear all,
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> I am currently working on a long document that must
>>>>>>>>>>>>>>>>>> served as a web page. The single file output is becoming too slow and
>>>>>>>>>>>>>>>>>> cumbersome for readers. I am aware this functionality is not available, but
>>>>>>>>>>>>>>>>>> a Feature Request is open [0].
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> In that issue there are some hints to this issue being
>>>>>>>>>>>>>>>>>> addressable with a template [1]. I have tried many HTML templates, but
>>>>>>>>>>>>>>>>>> never seen one that would split a long document in a set of small files.
>>>>>>>>>>>>>>>>>> Would there be an example somewhere I could follow? Otherwise, could
>>>>>>>>>>>>>>>>>> someone provide a general idea of how such template would function?
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Thank you.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> [0] https://github.com/jgm/pandoc/issues/6122
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> [1]
>>>>>>>>>>>>>>>>>> https://github.com/jgm/pandoc/issues/6122#issuecomment-583593340
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>> 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/264eeee0-68c8-4389-a5c5-12563c6926f6n%40googlegroups.com
>>>>>>>>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/264eeee0-68c8-4389-a5c5-12563c6926f6n%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...-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm
>>>>>>>>>>>>>>>> .
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> To view this discussion on the web visit
>>>>>>>>>>>>>>>> https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%40googlegroups.com
>>>>>>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/cb3753d7-e845-4a72-a1aa-e93086a32f11n%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/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%40googlegroups.com
>>>>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/1ef6858a-0a37-4f5f-a88b-eff2479a8130n%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/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%40googlegroups.com
>>>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn%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/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%40googlegroups.com
>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n%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/5e290d88-1c47-407d-819b-34a094d8b48fn%40googlegroups.com
>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/5e290d88-1c47-407d-819b-34a094d8b48fn%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/20b2a20b-69ad-4b93-863a-c70db01d45een%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/20b2a20b-69ad-4b93-863a-c70db01d45een%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/fbe785d6-57dc-45a5-a4da-cc275638cd6dn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/fbe785d6-57dc-45a5-a4da-cc275638cd6dn%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/0a29b118-ae0f-448f-8e3e-39cc96ef5d8an%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/0a29b118-ae0f-448f-8e3e-39cc96ef5d8an%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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxgnCSkiBiFFrU%3DOBEVwHf1XUXzf9PshA-HCB-w2E6dfkw%40mail.gmail.com.

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

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

end of thread, other threads:[~2022-11-17 14:42 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-04 12:45 Multiple HTML file (chunked) output with template Luís de Sousa
     [not found] ` <264eeee0-68c8-4389-a5c5-12563c6926f6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-04 16:51   ` 'William Lupton' via pandoc-discuss
     [not found]     ` <CAEe_xxhS3ePa-k7boYMGzHnOsaNPCi4=nH-N8j7yLP8PAE6RCw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-11-07  9:22       ` Luís de Sousa
     [not found]         ` <cb3753d7-e845-4a72-a1aa-e93086a32f11n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-07 14:46           ` 'William Lupton' via pandoc-discuss
     [not found]             ` <CAEe_xxj6Bht_r9A9ngmpYyseaOjeifv-ONFgZ8quUd6rONTC_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-11-09 16:03               ` Luís de Sousa
     [not found]                 ` <1ef6858a-0a37-4f5f-a88b-eff2479a8130n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-09 18:28                   ` 'William Lupton' via pandoc-discuss
     [not found]                     ` <CAEe_xxjtN8XAhYgOti=uKZ1Pk-h4YtM5xk96s5283oS0rgfD9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-11-10 12:47                       ` 'William Lupton' via pandoc-discuss
     [not found]                         ` <CAEe_xxiri0e6LHPZdxkjazM8nFU4cuA2FLL3UZ71-w4ro3WvYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-11-10 16:36                           ` Luís de Sousa
     [not found]                             ` <539db8b9-47f4-43b8-83d1-4b4c99dc3b3fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-10 17:05                               ` 'William Lupton' via pandoc-discuss
     [not found]                                 ` <CAEe_xxiUW_GbEf3_uEaW4wyOGG6Um-=Soukd-VonV9HdGCv30g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-11-11 12:33                                   ` Luís de Sousa
     [not found]                                     ` <7f4b28ec-1e91-4228-ab03-fe58a2e5cf18n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-11 12:58                                       ` 'William Lupton' via pandoc-discuss
     [not found]                                         ` <CAEe_xxh--=VrfpuU75HDuSe1uLJ1ZmFbdhBpX4VcTysmCVoyhQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-11-11 14:01                                           ` Luís de Sousa
     [not found]                                             ` <5e290d88-1c47-407d-819b-34a094d8b48fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-11 14:30                                               ` 'William Lupton' via pandoc-discuss
     [not found]                                                 ` <CAEe_xxjk4tfW2iyU1=rikSnmTWN6kDGYneGcqYc2_1WdReSqUw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-11-15 15:54                                                   ` Luís de Sousa
     [not found]                                                     ` <20b2a20b-69ad-4b93-863a-c70db01d45een-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-15 18:28                                                       ` 'William Lupton' via pandoc-discuss
     [not found]                                                         ` <CAEe_xxg7Gy3Ag3gzwFO8855d=7JE=XqOw4C4HivpJkuB109y0w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-11-16  8:32                                                           ` Luís de Sousa
     [not found]                                                             ` <fbe785d6-57dc-45a5-a4da-cc275638cd6dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-16  9:25                                                               ` 'William Lupton' via pandoc-discuss
     [not found]                                                                 ` <CAEe_xxj5JCnvbH6AbsTnV-cS79HCZ+PLksQ3Tm8RUjcHmyV+DQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-11-17 14:36                                                                   ` Luís de Sousa
     [not found]                                                                     ` <0a29b118-ae0f-448f-8e3e-39cc96ef5d8an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-17 14:42                                                                       ` 'William Lupton' via pandoc-discuss

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