I would do something like this in a block like this. This hook runs on a
copy of the buffer. You can change (org-id-get-create) to org-entry-get if
you want.
* build
:noexport:
#+BEGIN_SRC emacs-lisp
(let ((org-export-before-processing-hook
'((lambda (_backend)
(org-map-entries (lambda ()
(org-end-of-meta-data)
(insert (format "\nID: %s\n" (org-id-get-create)))))))))
(org-open-file (org-latex-export-to-pdf)))
#+END_SRC
#+RESULTS:
John
-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
On Wed, Oct 30, 2019 at 7:47 AM Julius Dittmar <[email protected]>
wrote:
> Hi folks,
>
> I would like the org export to add a line containing one property entry
> (ID for example) to the LaTeX export for every heading.
>
> Ideally I'd like this to be added to the org-latex-classes
> configuration. I'd like to call a macro \mysection{..content of ID
> property..}{..heading line content..} there (instead of
> \section{..heading line content..}.
>
> Alternatively something like \renewcommand{\ID}{...contents of ID
> property...} immediately before or after the sectioning command would
> work, too.
>
> My elisp skills are still near to non-existent, so I would not even know
> where to start looking for something like that.
>
> Any pointers?
>
> Thanks in advance,
> Julius
>
>