Re: [O] how to get version information on title slide with org beamer

2017-08-27 Thread Eric S Fraga
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@


signature.asc
Description: PGP signature


Re: [O] how to get version information on title slide with org beamer

2017-08-27 Thread Eric S Fraga
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


signature.asc
Description: PGP signature


Re: [O] how to get version information on title slide with org beamer

2017-08-26 Thread Berry, Charles

> On Aug 26, 2017, at 10:57 AM, Eric S Fraga  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



[O] how to get version information on title slide with org beamer

2017-08-26 Thread Eric S Fraga
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


signature.asc
Description: PGP signature