I'm using a memorandum specific style when I do LaTeX export of an org-mode document. It has some fields that I'd like to specify/fill in in a manner similar to the way AUTHOR, TITLE, DATE are specified.
How do I define new document options?
How can I use them in exported documents?
Right now, I'm focused on LaTeX export, but might also want to do HTML output, in which case I would want to use the new options in a customized postamble.
What I have now:
#+OPTIONS: toc:nil #+AUTHOR: Dave #+TITLE: write_me #+DATE: 22 March 2018 #+LATEX_CLASS: myMemo #+LATEX_HEADER: \memoto{ Alice } * Content blah.... myMemo is a modified version of this memo template. The original style uses some custom macros like memoto and memofrom to setup the To: and From lines in the memorandum. So far, I've modified most of the lines in myMemo.sty so that they use the values defined in the org file:
\begin{description} \ifthenelse{\equal{\@memoto}{\relax}}{}{\item [{To:}] \@memoto} \item [{From:}] \@author \item [{Subject:}] \@title \item [{Date:}] \@date \end{description} so that the header portion of the memo uses the values defined by #+AUTHOR: ... etc. However, I don't see a good solution for being able to do the same thing for the To: item that doesn't involve defining a new option (so that line is unchanged from the original style file, and it is specified in the org file with at LATEX_HEADER command).
so, it seems to me that I need a new variable in order to be able to specify the other features I'd like to have in the header. I'd like to have something like this:
#+OPTIONS: toc:nil #+AUTHOR: Dave #+RECIPIENT: Alice #+TITLE: write_me #+DATE: 22 March 2018 #+LATEX_CLASS: myMemo # The class file has been modified to make use of the RECIPIENT field # in an appropriate way; for example using a \@recipient macro # whose value is specified via the RECIPIENT line above * Content blah... How do I do it?