I want to include the output of inline code blocks in the LaTeX/PDF output of an org-mode document, but not in a monospaced font. I tried the following:
The mean petal length is src_R[:exports results :results raw]{mean(iris$Petal.Length)}.
which gives me this output in the LaTeX file:
The mean petal length is 3.758
.
The period in the sentence appears on a new line in the LaTeX file, which causes a space to appear between the code output and the period in the PDF.
Is there a way I can get the LaTeX output to appear all on one line so the PDF formatting is correct?
ob-R.el
(and re-compile it, if you previously compiled it) by editing the functionorg-babel-R-evaluate-external-process
, specifically, the place where it says(buffer-string)
, replace it with(org-trim (buffer-string))
. But I'm not sure how this will affect multiline results.