[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: multipage html output
From: |
Orm Finnendahl |
Subject: |
Re: multipage html output |
Date: |
Thu, 4 Jul 2024 11:50:42 +0200 |
Hi,
Am Mittwoch, den 03. Juli 2024 um 11:05:39 Uhr (+0000) schrieb Ihor
Radchenko:
>
> Not really. ox-publish is more about exporting multiple input
> .org/non-.org files into outputs.
>
> I'd rather see this kind of feature being a part of ox.el - an option to
> export one .org to many smaller files. Currently, we only have an option
> to export one .org (or part of it) to a single string/file. (And then,
> ox-odt has to try various kludges to make things work as expected with
> .odt, which consist of multiple files under the hood).
that is/was my intention: Basically there was only a very small
change to ox.el necessary to make it work (it's mentioned in the
comment on top of ox-multipage-html in my github repository):
Currently `org-export-as' combines parsing the org document into a
global parse tree with all additional options applied and serializing
that into the final output target format. My code simply splits the
code sections of these tasks into two separate functions, which are
called by org-export-as, `org-export--collect-tree-info' and
`org-export--transcode-headline'. The advantage of this approach is
that it is fully compatible with the prior code, but gives the
necessary flexibility to the backend export code to split up the
global parse tree before serializing.
The multipage html backend (ox-html-multipage.el) takes care of
generating the global parse tree with org-export--headline, divides
that tree into the subtrees of the individual pages, then calls the
serializing function for each of the subtrees and writes the results
to file. Is that along the lines of what you meant?
In the meantime I thought about the proposed backend. Maybe it's a
good idea to integrate the single page *and* the multipage backend
into one backend altogether: The Backend *always* produces multipage
output, but you can define the level at which the pages are split with
an #+OPTION: in the org file. Setting the default level to 0 if the
option is not set will generate the exact same output as the old
backend without breaking anything for anybody. I'm quite sure it'll
work and as I said it's mainly done and wouldn't require a lot of
work.
What do you think?
--
Orm
- multipage html output, Orm Finnendahl, 2024/07/03
- Re: multipage html output, Dr. Arne Babenhauserheide, 2024/07/03
- Re: multipage html output, Christian Moe, 2024/07/03
- Re: multipage html output, Ihor Radchenko, 2024/07/03
- Re: multipage html output, Christian Moe, 2024/07/03
- Re: multipage html output,
Orm Finnendahl <=
- Re: multipage html output, Ihor Radchenko, 2024/07/04
- Re: multipage html output, Orm Finnendahl, 2024/07/04
- Re: multipage html output, Ihor Radchenko, 2024/07/04
- Re: multipage html output, Orm Finnendahl, 2024/07/07
- Re: multipage html output, Ihor Radchenko, 2024/07/08
- Re: multipage html output, Orm Finnendahl, 2024/07/08
- Re: multipage html output, Ihor Radchenko, 2024/07/09
- Re: multipage html output, Orm Finnendahl, 2024/07/10
- Re: multipage html output, Ihor Radchenko, 2024/07/10
- Re: multipage html output, Orm Finnendahl, 2024/07/07