[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: |
Mon, 12 Aug 2024 20:58:06 +0200 |
Hi,
again thanks for checking.
Am Montag, den 12. August 2024 um 17:10:25 Uhr (+0000) schrieb Ihor Radchenko:
>
> :multipage-split-function should be added to the :translate-alist I
> think. It should be documented what :multipage-split-function is
> supposed to do in the docstring of `org-export-define-backend'.
>
>
> I do not feel like :multipage-split-function is supposed to be export
> _option_. It is more internal. That's why :translate-alist, where the
> internals like templates and transcoders lie.
That's how I had it before, but I reasoned it is not a transcoding
function either, so I was unsure. Anyway I reversed it.
> > (defun org-export-transcode-org-page (org-page _ info)
> > ...
> > (let* ((body-only (org-element-property :body-only org-page))
> > (info (cl-list* ;; add :tl-headline and :tl-headline-number to
> info
> > :tl-headline headline
> > :tl-headline-number
> > (alist-get
> > headline
> > (plist-get info :headline-numbering))
> > info))
>
> May you please explain what is the purpose of constructing custom INFO
> plist, what all these parameters do, and why you re-do the export again
> in the transcoder discarding the CONTENTS argument provided?
>
The redo of the transcoding was a leftover from debugging an earlier
stage. Removed now.
:tl-headline and :tl-headline-numbering are needed for constructing
the side toc and the footnote section on each page. They are needed in
org-html-multipage-toc, called by org-html-multipage-template and in
org-html-footnote-section called from
org-html-multipage-inner-template. At that stage there is no
information about the page, the templates are on. Let me know if you
have a better idea how to provide/access that information, I found a
temporary addition to info the most natural way. As it will be needed
by any multipage backend which wants to determine the footnotes for a
page, I think there should be a generic solution in ox.el.
As :tl-headline-numbering can be determined from the tl-headline
within org-html-multipage-toc, I can get rid of that if you
prefer. Let me know how to proceed.
> > (defun org-export-transcode-org-data (data body info)
> > "Transcode DATA with BODY. Return transcoded string.
> > DATA is the top `org-data' node of the parse-tree. INFO is the
> > communication channel plist."
> > (if (plist-get info :multipage)
> > ;;; for multipage output the `org-data' node contains `org-page'
> > ;;; pseudo elements as contents, so we call `org-export-data' on
> > ;;; each of them and return the collected results.
> > (mapcar (lambda (org-page)
> > (org-export-data org-page info))
> > (org-element-contents data))
>
> This is not a transcoder's job to export its contents.
> Please move special handling of org-page AST nodes to `org-export-data'.
done.
--
Orm
- Re: multipage html output, (continued)
- Re: multipage html output, Ihor Radchenko, 2024/08/05
- Re: multipage html output, Orm Finnendahl, 2024/08/06
- Re: multipage html output, Orm Finnendahl, 2024/08/06
- Re: multipage html output, Orm Finnendahl, 2024/08/06
- Re: multipage html output, Ihor Radchenko, 2024/08/10
- Re: multipage html output, Orm Finnendahl, 2024/08/11
- Re: multipage html output, Ihor Radchenko, 2024/08/11
- Re: multipage html output, Orm Finnendahl, 2024/08/11
- Re: multipage html output, Orm Finnendahl, 2024/08/12
- Re: multipage html output, Ihor Radchenko, 2024/08/12
- Re: multipage html output,
Orm Finnendahl <=
- Re: multipage html output, Rudolf Adamkovič, 2024/08/17
- Re: multipage html output, Ihor Radchenko, 2024/08/17
- Re: multipage html output, Orm Finnendahl, 2024/08/19
- Re: multipage html output, Ihor Radchenko, 2024/08/22