RogerBW, (edited )
@RogerBW@emacs.ch avatar

Help me . I want to insert something into my documents that will resolve to the current date (ISO8601) when I call org-latex-export-to-pdf—i.e. it will give the PDF document a visible last-edited date. I have some LaTeX that does this in LyX, but I haven't got Org to pass it through…

geoff,
@geoff@emacs.ch avatar

@RogerBW I think an Org-mode macro might be perfect: https://orgmode.org/manual/Macro-Replacement.html

RogerBW,
@RogerBW@emacs.ch avatar

@geoff Excellent! I mean, it doesn't actually produce anything in the output, or an error message, but I agree that that ought to work.

geoff,
@geoff@emacs.ch avatar

@RogerBW using {{{time(%FT%T%z)}}} seems to give a working export in LaTeX for me.

RogerBW,
@RogerBW@emacs.ch avatar

@geoff OK, my org-mode setup is uniquely broken. I just assembled an org file consisting of:

{{{date}}}
{{{date(%Y-%m-%d}}}
{{{time(%FT%T%z)}}}

and exporting to LaTeX shows none of these.

geoff,
@geoff@emacs.ch avatar

@RogerBW {{{date}}} requires that a #+DATE: header be set, but the time one should work and gives the exact time the file was exported for me.

RogerBW,
@RogerBW@emacs.ch avatar

@geoff Aha yes that's what was going on - I hadn't realised I needed to set DATE explicitly to use {{{date}}} (which of course isn't what I want to do anyway). {{{time(%Y-%m-%d)}}} gets the job done. Thanks!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • orgmode
  • slotface
  • kavyap
  • thenastyranch
  • everett
  • tacticalgear
  • rosin
  • Durango
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • InstantRegret
  • Youngstown
  • khanakhh
  • ethstaker
  • JUstTest
  • ngwrru68w68
  • cisconetworking
  • modclub
  • tester
  • osvaldo12
  • cubers
  • GTA5RPClips
  • normalnudes
  • Leos
  • provamag3
  • anitta
  • megavids
  • lostlight
  • All magazines