emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* how to get version information on title slide with org beamer
@ 2017-08-26 17:57 Eric S Fraga
  2017-08-26 23:54 ` Berry, Charles
  0 siblings, 1 reply; 4+ messages in thread
From: Eric S Fraga @ 2017-08-26 17:57 UTC (permalink / raw)
  To: emacs-orgmode

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

Hello all,

I know I can use {{{modification-time(...,t)}}} say to get the revision
control system information about when the repository was last
modified.  However, I would like to have other information (e.g. the
mercurial id).  More importantly, I would like this information to
appear on my beamer export title slide.

I have tried

#+date: \copyright {{{time(%Y)}}}, version src_shell{hg id --num}

for instance but babel blocks are not executed for these
lines.  Putting this text in a macro doesn't help either.

Any suggestions?

Thanks,
eric

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-796-gbae41a

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: how to get version information on title slide with org beamer
  2017-08-26 17:57 how to get version information on title slide with org beamer Eric S Fraga
@ 2017-08-26 23:54 ` Berry, Charles
  2017-08-27  9:13   ` Eric S Fraga
  2017-08-27 11:24   ` Eric S Fraga
  0 siblings, 2 replies; 4+ messages in thread
From: Berry, Charles @ 2017-08-26 23:54 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode@gnu.org


> On Aug 26, 2017, at 10:57 AM, Eric S Fraga <esflists@gmail.com> wrote:
> 
> Hello all,
> 
> I know I can use {{{modification-time(...,t)}}} say to get the revision
> control system information about when the repository was last
> modified.  However, I would like to have other information (e.g. the
> mercurial id).  More importantly, I would like this information to
> appear on my beamer export title slide.
> 
> I have tried
> 
> #+date: \copyright {{{time(%Y)}}}, version src_shell{hg id --num}
> 
> for instance but babel blocks are not executed for these
> lines.  Putting this text in a macro doesn't help either.
> 
> Any suggestions?
> 

Use a :post header to format a date keyword line.

Something like:


--8<---------------cut here---------------start------------->8---

#+NAME: mydateline
#+BEGIN_SRC emacs-lisp
(format "#+DATE: %s\n" *this*) 
#+END_SRC

src_shell[:post mydateline() :results raw]{date} 

* intro

et cetera
--8<---------------cut here---------------end--------------->8---

Chuck

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

* Re: how to get version information on title slide with org beamer
  2017-08-26 23:54 ` Berry, Charles
@ 2017-08-27  9:13   ` Eric S Fraga
  2017-08-27 11:24   ` Eric S Fraga
  1 sibling, 0 replies; 4+ messages in thread
From: Eric S Fraga @ 2017-08-27  9:13 UTC (permalink / raw)
  To: Berry, Charles; +Cc: emacs-orgmode@gnu.org

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

On Saturday, 26 Aug 2017 at 23:54, Berry, Charles wrote:
> Use a :post header to format a date keyword line.

Many thanks!  Works perfectly.

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-796-gbae41a

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: how to get version information on title slide with org beamer
  2017-08-26 23:54 ` Berry, Charles
  2017-08-27  9:13   ` Eric S Fraga
@ 2017-08-27 11:24   ` Eric S Fraga
  1 sibling, 0 replies; 4+ messages in thread
From: Eric S Fraga @ 2017-08-27 11:24 UTC (permalink / raw)
  To: Berry, Charles; +Cc: emacs-orgmode@gnu.org

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

For completeness, here is my final code based on Charles's suggestion:

#+begin_src org
  ,* date formatting with version information               :ignoreheading:
  ,#+NAME: mydateline
  ,#+BEGIN_SRC emacs-lisp
  (format "#+DATE: \\copyright{} %s\n" *this*) 
  ,#+END_SRC

  src_shell[:post mydateline() :results raw]{echo -n $(date +%Y) '@@latex:\\ \footnotesize \color{gray}@@' v$(hg id --num)} 
#+end_src

This is for export to beamer (well, LaTeX more generally) and outputs
the year with revision information below in light grey (British spelling
I'm told ;-)).  I should probably move the copyright symbol into the
shell script but this works...

Thanks again,
eric

-- 
Eric S Fraga, ericsfraga@<most social media>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

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

end of thread, other threads:[~2017-08-27 11:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-26 17:57 how to get version information on title slide with org beamer Eric S Fraga
2017-08-26 23:54 ` Berry, Charles
2017-08-27  9:13   ` Eric S Fraga
2017-08-27 11:24   ` Eric S Fraga

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