emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Q: add contents of a property to LaTeX export?
@ 2019-10-30 11:44 Julius Dittmar
  2019-10-30 14:21 ` John Kitchin
  0 siblings, 1 reply; 2+ messages in thread
From: Julius Dittmar @ 2019-10-30 11:44 UTC (permalink / raw)
  To: Org Mode

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Q: add contents of a property to LaTeX export?
  2019-10-30 11:44 Q: add contents of a property to LaTeX export? Julius Dittmar
@ 2019-10-30 14:21 ` John Kitchin
  0 siblings, 0 replies; 2+ messages in thread
From: John Kitchin @ 2019-10-30 14:21 UTC (permalink / raw)
  To: Julius Dittmar; +Cc: Org Mode

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-30 14:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30 11:44 Q: add contents of a property to LaTeX export? Julius Dittmar
2019-10-30 14:21 ` John Kitchin

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