From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: Q: add contents of a property to LaTeX export? Date: Wed, 30 Oct 2019 10:21:56 -0400 Message-ID: References: <007cbf7a-60ea-30bd-4f18-d9493a465812@gmx.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000030910a05962175c9" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:58075) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPorT-0001f3-2F for emacs-orgmode@gnu.org; Wed, 30 Oct 2019 10:22:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPorR-0000pd-Dn for emacs-orgmode@gnu.org; Wed, 30 Oct 2019 10:22:10 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:32788) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iPorR-0000of-0S for emacs-orgmode@gnu.org; Wed, 30 Oct 2019 10:22:09 -0400 Received: by mail-wm1-x329.google.com with SMTP id 6so4411836wmf.0 for ; Wed, 30 Oct 2019 07:22:08 -0700 (PDT) In-Reply-To: <007cbf7a-60ea-30bd-4f18-d9493a465812@gmx.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Julius Dittmar Cc: Org Mode --00000000000030910a05962175c9 Content-Type: text/plain; charset="UTF-8" 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 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 > > --00000000000030910a05962175c9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I would do something like this in a block like this. This = hook runs on a copy of the buffer. You can change=C2=A0=C2=A0(org-id-get-cr= eate) to org-entry-get if you want.


* build =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:noexport:

#+= BEGIN_SRC emacs-lisp
(let ((org-export-before-processing-hook
=C2=A0 = =C2=A0 =C2=A0 =C2=A0'((lambda (_backend)
=C2=A0 (org-map-entries (= lambda ()
=C2=A0 =C2=A0 =C2=A0(org-end-of-meta-data)
=C2=A0 = =C2=A0 =C2=A0(insert (format "\nID: %s\n" (org-id-get-create)))))= ))))

=C2=A0 (org-open-file (org-latex-export-to-pdf)))

#+END_= SRC

#+RESULTS:
Joh= n

-----------------------------------
Professor John Kitchin=C2= =A0
Doherty Hall A207F
Department of Chemical Engineering
Carnegie= Mellon University
Pittsburgh, PA 15213
412-268-7803
=


On Wed, Oct 30, 2019 at 7:47 AM Julius Dittmar <Julius.Dittmar@gmx.de> 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

--00000000000030910a05962175c9--