On 21/09/2022 15:55, Ihor Radchenko wrote:
There is nothing wrong about this, but I feel that this kind of approach
is encouraging to shoot your own leg a bit too much.
I am afraid, it is unavoidable facet of flexibility. Anyway arbitrary
LaTeX command may be inserted using export snippet or block.
Also, :presec/:postsec property names are
confusing --- it is unclear if they are specific to LaTeX. (when about,
say, Beamer)
An example of use case for beamer:
M. ‘quintus’ Gülker. Beamer export: Executing LaTeX between two frames.
Tue, 21 Jun 2022 10:01:03 +0200.
https//list.orgmode.org/87mte6tphc....@guelker.eu
* Section
:PROPERTIES:
:attr_latex: :prepend "section" \setcounter{secnumdepth}{0}
:attr_latex+: :prepend "section"
\addtocontents{toc}{\protect\setcounter{tocdepth}{0}\ignorespaces}
:attr_latex+: :append "section" \setcounter{secnumdepth}{2}
:attr_latex+: :append "section"
\addtocontents{toc}{\protect\setcounter{tocdepth}{2}\ignorespaces}
:END:
I suggest to use more canonical attr_latex that explicitly limits the
export backend.
The only objection is that for ox-html users may expect any attr_html
key-value pairs directly become attributes of the HTML element rather
than control of output at higher level.