[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: multipage html output
From: |
Ihor Radchenko |
Subject: |
Re: multipage html output |
Date: |
Tue, 09 Jul 2024 17:55:51 +0000 |
Orm Finnendahl <orm.finnendahl@selma.hfmdk-frankfurt.de> writes:
>> Is there any situation when you need to export the full document
>> vs. multipage to different places?
>
> Actually that is what I'm currently doing (and what I need for my
> publishing chain): The single-page document is not in the html folder
> used for the multipage document. Both files happen to have the same
> name so it wouldn't work out, if I want to generate single-page along
> the multipage version, without having to change the document.
If this is the case, users may potentially need similar diverging
settings for single- vs. multi- page documents for almost any given
export option, not just the ones you mentioned.
To address such situations, we may, for example, allow an alternative
"multi" version of each export keyword to act specially when multipage
export is used. Consider that there is an export option #+SAMPLEOPTION.
If the document has only "#+SAMPLEOPTION: value", exporter will use it
for both normal and multipage export. However, we may allow an
alternative #+SAMPLEOPTION[multipage]: multipage value that will be used
instead when defined.
In addition to defining alternative variants of in-buffer settings, we
also need to provide the equivalent feature for custom variables
defining the export options. We can do it by treating the value of such
export-related variables specially - we may allow special values like
[org-export-variants :default default-value :multipage multipage-value]
and provide helper functions like
(org-export-set-option option-name value) ; :default
(org-export-set-option option-name :multipage value) ; for multipage export only
(org-export-set-option option-name :singlepage value) ; just for singlepage
export
(Or can be some other consistent way to define alternatives; feel free
to brainstorm)
>> > - org-html-multipage-front-matter
>> >
>> > A list to specify pages in front of the headlines of the
>> > document. Possible values are 'title, 'title-toc and 'toc. title-toc
>> > is a combined page containing the title and the toc. Multiple
>> > entries are possible.
>>
>> This sounds orthogonal to multipage export. May you please illustrate
>> what you want to achieve by introducing this option? Maybe there is an
>> existing feature that can be re-used instead of creating something new?
>
> Could be: The toc as a first page is needed, when you don't want a toc
> on the side of each html page, e.g. when using the classical info
> layout. And it might be necessary to be able to distinguish between a
> separate title page with author and the toc on the next page (or a
> combined page with title and toc or no front matter at all because the
> title appears on every page). If this is possible with already
> existing options, even better. I just think that it might be necessary
> to be able to distinguish between the needs for html output format
> vs. the needs for LaTex or single-page output without having to edit
> the document (I need that as my publishing chain is going to export
> info, html multipage, pdf output and html single-page output using the
> same org file).
Sorry, but I still do not quite understand. May you please illustrate a
bit more with some kind of simple example?
>> > - org-html-multipage-join-first-subsection
>> >
>> > Boolean: Non-nil means that the first subsection of a section
>> > without a body will be joined on the section page
>> > (recursively). See my generated example pages linked below
>> > (Chapters 4, 5 and 7 for a recursive example)
>>
>> Sorry, but I cannot understand anything from there. May you explain in
>> words?
>
> Consider a case like this:
>
> * Headline 1
> ** Headline 2
> *** Headline 3
> Text for Headline 3
>
> Without the above option, Headline 1, Headline 2 and Headline 3 would
> be on separate pages with Headline 1 and Headline 2 being empty pages
> with just the Headline. The option puts all three Headlines and the
> Contents of Headline 3 on the same page. See here:
I see. It sounds useful given that your strategy to split the document
into pages is "on each headline on each level".
Conceptually, I see this as one of possible customizations for paging
strategies. Your `org-html-multipage-join-first-subsection' simply tells
to split off pages only when there is non-empty contents inside the
containing headings.
This also reveals that we may sometimes want more than just to tell how
to split the document. After splitting, we may want to rearrange the
pages differently (maybe even re-order?). In other words, multipage
export may need to:
1. Take document AST
2. Split it into multiple parts
3. Filter the obtained part list (post-process)
4. Perform actual per-page export
...
>> > - org-html-multipage-split
>> >
>> > How to split the document. Possible values are
>> >
>> > 'toc for generating a page for each toc entry.
>>
>> May I guess that the previous option may have something do with
>> situation when #+TOC: keyword is in the middle of a text?
>
> No: In the online document of the link above the page splitting
> follows the toc (with the exception of the page joining explained
> above), meaning that each visible toc entry will generate one page. Be
> aware that this is not obvious on the online page as subfolders are
> folded automatically using the css (folded elements have the class
> "toc-hidden"). If you look at the html page source you can see that
> every page contains the full toc to enable other css or js based
> styling decisions.
Sounds reasonable. I guess that the docstring can be improved :)
>> Do I understand correctly that your alternative layout is simply a
>> question of custom #+HTML_HEADER? Or is there something more to it?
>
> In my layout the main difference is that the nav left and nav right
> elements are part of the page-main-body rather than part of
> <content>. I'm not positive this is elegantly manageable with css,
> when the navigation is outside the page-main-body.
Sorry, but I am lost. What do you mean by "content" and what do you mean
by "page-main-body"?
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- Re: multipage html output, (continued)
- 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, 2024/07/04
- 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 <=
- 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
- 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/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/11