Ihor Radchenko [2022-09-21 Wed 16:55] wrote: > More concretely, I mean something like > > * 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.
I don't understand the usecase, that's why I wasn't really following. If you write \vspace{10cm} before some headline, it's going to do the right thing even if it "belongs" to a previous headline. If org-latex-classes is not a good enough solution I also think it should be a general export feature, not specific to latex. In that case you need a general syntax, e.g. properties like "export_prefix", "export_postfix" and the code should be as simple as possible, i.e. copying the text one line before/after the headline. -- Daniel Fleischer