From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Rudin Subject: Re: inline constant substitution Date: Sun, 12 Oct 2014 18:13:06 +0100 Message-ID: <87tx39yzx9.fsf@rudin.co.uk> References: <871tqd1hao.fsf@rudin.co.uk> <8738atpbuk.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Nicolas Goaziou writes: > Paul Rudin writes: > >> Suppose I have: >> >> #+CONSTANTS: foo=42 >> >> How can I make inline references to a constant on export in regular >> text, rather than in a table? >> >> I want to be able to write something like: >> >> The value of foo is $foo >> >> in my org file, and then end up with: >> >> The value of foo is 42 >> >> when I export to LaTeX. > > Constants are for tables only. You can use a macro instead: > > #+MACRO: foo 42 > > The value of foo is {{{foo}}}. > Thanks. If I *also* want to use that value in a table is there a way to do that? I experimented with: #+TBLFM: @1$1={{{foo}}} and #+TBLFM: @1$1="{{{foo}}}" But neither of those work.