emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Phil Regier <pregier@ittc.ku.edu>
To: "Thomas S. Dye" <tsd@tsdye.com>
Cc: org mode <emacs-orgmode@gnu.org>
Subject: Re: Named latex blocks for inline execution?
Date: Fri, 14 Mar 2014 12:42:07 -0500 (CDT)	[thread overview]
Message-ID: <64601713.635453.1394818927590.JavaMail.zimbra@ittc.ku.edu> (raw)
In-Reply-To: <m28uscyb4j.fsf@tsdye.com>

Many thanks, Tom; these are all variations I had not thought to try.  I will try them out and see what combination works best for me.

Phil

----- Original Message -----
From: "Thomas S. Dye" <tsd@tsdye.com>
To: "Phil Regier" <pregier@ittc.ku.edu>
Cc: "org mode" <emacs-orgmode@gnu.org>
Sent: Friday, March 14, 2014 11:54:04 AM
Subject: Re: Named latex blocks for inline execution?

Aloha Phil,

Org mode has its own macros, which might work in this instance.

The variable org-babel-inline-result-wrap is set to "=%s=" by
default. Setting it as follows will get rid of the surrounding =
symbols:

#+begin_src emacs-lisp
  (setq org-babel-inline-result-wrap "%s")
#+end_src

Alternatively, on my setup at least, call_Smx()[:results raw] will also
get rid of the surrounding = symbols.

The capitalization of "pi" seems to be related to capitalization of the
variable name "Contents".  This is new to me and I don't recall reading
about it in the documentation, but I haven't looked lately. At any rate,
if I name the variable "contents" then I get a lowercase "pi" in the
output.

My guess about the "backslash" part is that Org mode is expecting an
inline LaTeX math snippet to be on one line.  At any rate, this seems to
work for me:

#+name: Smx
#+begin_src latex :var contents="\\\\pi"
\begin{equation}
  \left[
    \begin{smallmatrix}
      contents
    \end{smallmatrix}
  \right]
\end{equation}
#+end_src

hth,
Tom

  reply	other threads:[~2014-03-14 18:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1549029341.634736.1394809114208.JavaMail.zimbra@ittc.ku.edu>
2014-03-14 15:25 ` Named latex blocks for inline execution? Phil Regier
2014-03-14 16:54   ` Thomas S. Dye
2014-03-14 17:42     ` Phil Regier [this message]
2014-03-14 17:09   ` Eric S Fraga
2014-03-14 17:40     ` Phil Regier

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=64601713.635453.1394818927590.JavaMail.zimbra@ittc.ku.edu \
    --to=pregier@ittc.ku.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=tsd@tsdye.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).