From: Christian Heinrich <com-orgmode-mailinglist@gladbachcity.de>
To: emacs-orgmode@gnu.org
Subject: Re: [BUG] Inline src blocks do not work for LaTeX [9.5.4 (release_9.5.4-3-g6dc785 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
Date: Sun, 03 Jul 2022 23:19:02 +0200 [thread overview]
Message-ID: <f0c0bcfe42e46da3924c0406b32aedd7ff2d5f58.camel@gladbachcity.de> (raw)
In-Reply-To: <m2k08u9fkt.fsf@me.com>
[-- Attachment #1: Type: text/plain, Size: 2312 bytes --]
Hi Rudolf,
as to your question when to use an inline src block:
I use it particularly in documents that present results from data sets. For instance, when you
calculate something (e.g., an average value), you can store it in a variable =foo= (e.g., in R,
python etc., just make sure you use the :session parameter) and access =foo= in an inline source
block (that uses the same :session parameter). This allows you to avoid having hardcoded numbers in
your documents - when the data changes, so do all the numbers in your text.
As to the naming: begin_src also uses underscores, so I guess the naming scheme is fine...
Hope this helps!
Best regards
Christian
On Sun, 2022-07-03 at 21:11 +0200, Rudolf Adamkovič wrote:
> Ihor Radchenko <yantar92@gmail.com> writes:
>
> > […] By default, unlike ordinary src blocks, inline src blocks are
> > only exported as results - code is not exported, only the result is
> > exported. […] Further, because Org is not always able to evaluate
> > src blocks (when the relevant ob-*.el is not loaded), inline src
> > blocks can sometimes be exported as code.
>
> Dear Ihor,
>
> Thank you for taking the time with your reply.
>
> Oh, my! I expected the exact opposite default for *inline* source,
> namely show code and hide results. But then, I noticed that these
> "inline" elements do not work in tables, so I cannot use them to
> syntax-highlight a table of LaTeX commands anyway. Bummer!
>
> So then, when should we use these "inline blocks" in Org? I expected
> them to provide inline (nicely rendered) code anywhere, including in the
> tables, like LaTeX provides in-line (nicely rendered) math everywhere.
>
> (I also keep wondering why the feature uses a "special" syntax with
> underscores when everything else in Org uses dashes.)
>
> P.S. I also experimented with the src_shell some more:
>
> With #+PROPERTY: header-args+ :exports both, src_shell{ls} exports as
> "ls". I did not expect that. Note that I executed a normal BEGIN_SRC
> "shell" block seconds before, so Emacs must have loaded the relevant
> Lisp code. I then started 'emacs -Q' and tried again. This time,Org
> exported 'src' followed by a subscript 'shell'.
>
> Completely and utterly confused,
>
> Rudy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-07-03 21:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-03 9:57 [BUG] Inline src blocks do not work for LaTeX [9.5.4 (release_9.5.4-3-g6dc785 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)] Rudolf Adamkovič
2022-07-03 11:43 ` Ihor Radchenko
2022-07-03 19:11 ` Rudolf Adamkovič
2022-07-03 21:19 ` Christian Heinrich [this message]
2022-07-08 20:23 ` Rudolf Adamkovič
2022-07-04 12:08 ` Ihor Radchenko
2022-07-04 2:32 ` Timothy
2022-07-04 12:21 ` Ihor Radchenko
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=f0c0bcfe42e46da3924c0406b32aedd7ff2d5f58.camel@gladbachcity.de \
--to=com-orgmode-mailinglist@gladbachcity.de \
--cc=emacs-orgmode@gnu.org \
/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).