From: Eric Schulte <schulte.eric@gmail.com>
To: Jay Kerns <gjkernsysu@gmail.com>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: inline Babel calls in math environments and table cells
Date: Mon, 11 Mar 2013 15:26:11 -0600 [thread overview]
Message-ID: <8738w1fx1o.fsf@gmail.com> (raw)
In-Reply-To: <CAFiLVra91MXaREbvC9gKecA0pQDy39s5qRoM2SpeihSopF8c1A@mail.gmail.com> (Jay Kerns's message of "Mon, 11 Mar 2013 16:54:33 -0400")
Jay Kerns <gjkernsysu@gmail.com> writes:
> Greetings,
>
> I am in the process of updating materials to the new exporter in
> anticipation of Org 8.0. It appears that inline SRC blocks are not
> being evaluated in table cells and math environments in the new
> exporter, for instance, something like this:
>
> \( SRC_R[:exports results]{2+3} \)
>
> or like this:
>
> | SRC_R[:exports results]{2+3} |
>
> Is the above intentional? I am reading the Org Syntax document and it
> looks like inline Babel calls are "objects". It also looks like the
> pair \(...\) is a "LaTeX fragment" (also an object). At the beginning
> of the section it says, "Most objects cannot contain objects." And it
> also says right above that, "Objects can be found in... table cells."
> If my reading of the syntax is correct then it would look like the
> latter example is meant to be supported while the former example is
> not.
>
> Am I reading that correctly?
>
> Thank you,
Hi Jay,
This sounds like a question about the new exporter which is beyond my
ken.
However, code blocks may be called from Org-mode tables, using the `sbe'
[1] macro.
Hope this helps,
Footnotes:
[1]
,----[sbe]
| sbe is a Lisp macro in `ob-table.el'.
|
| (sbe SOURCE-BLOCK &rest VARIABLES)
|
| Return the results of calling SOURCE-BLOCK with VARIABLES.
| Each element of VARIABLES should be a two
| element list, whose first element is the name of the variable and
| second element is a string of its value. The following call to
| `sbe' would be equivalent to the following source code block.
|
| (sbe 'source-block (n $2) (m 3))
|
| #+begin_src emacs-lisp :var results=source-block(n=val_at_col_2, m=3) :results silent
| results
| #+end_src
|
| NOTE: by default string variable names are interpreted as
| references to source-code blocks, to force interpretation of a
| cell's value as a string, prefix the identifier a "$" (e.g.,
| "$$2" instead of "$2" or "$@2$2" instead of "@2$2").
|
| NOTE: it is also possible to pass header arguments to the code
| block. In this case a table cell should hold the string value of
| the header argument which can then be passed before all variables
| as shown in the example below.
|
| | 1 | 2 | :file nothing.png | nothing.png |
| #+TBLFM: @1$4='(sbe test-sbe $3 (x $1) (y $2))
|
| [back]
`----
--
Eric Schulte
http://cs.unm.edu/~eschulte
next prev parent reply other threads:[~2013-03-11 21:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 20:54 inline Babel calls in math environments and table cells Jay Kerns
2013-03-11 21:08 ` Jay Kerns
2013-03-11 21:26 ` Eric Schulte [this message]
2013-03-11 23:10 ` Jay Kerns
2013-03-12 15:35 ` Jay Kerns
2013-03-13 2:31 ` Charles Berry
2013-03-13 3:02 ` Jay Kerns
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8738w1fx1o.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=gjkernsysu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).