emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Julius Dittmar <Julius.Dittmar@gmx.de>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Q: add contents of a property to LaTeX export?
Date: Wed, 30 Oct 2019 10:21:56 -0400	[thread overview]
Message-ID: <CAJ51ETrFwrmXg9iY_ymrC1fdRyGz3pqL7FpyvfWywhgeO3Q5=w@mail.gmail.com> (raw)
In-Reply-To: <007cbf7a-60ea-30bd-4f18-d9493a465812@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 1482 bytes --]

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 <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
>
>

[-- Attachment #2: Type: text/html, Size: 2302 bytes --]

      reply	other threads:[~2019-10-30 14:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30 11:44 Q: add contents of a property to LaTeX export? Julius Dittmar
2019-10-30 14:21 ` John Kitchin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ51ETrFwrmXg9iY_ymrC1fdRyGz3pqL7FpyvfWywhgeO3Q5=w@mail.gmail.com' \
    --to=jkitchin@andrew.cmu.edu \
    --cc=Julius.Dittmar@gmx.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).