在组织模式的beamer演示文稿中,我希望使用python或R源代码块处理电子表格中的数据。我知道怎么做。
将会有一个结果矢量,我需要在不同的幻灯片上获得单独的矢量元素。有没有一种方法可以分解结果向量,这样我就不需要每次都重新计算电子表格了?也许让python只将向量存储为变量,然后使用内联python调用来提取值?
示例:
#+name: calculation
#+begin_src python :result value
return [1, 2, 3]
#+end_src
*** Slide one
I calculated <how to insert :calculationresult[0]>?
- some
- content
*** Slide two
I calculated <how to insert :calculationresult[1]>?
- more
- content发布于 2019-02-10 21:49:54
我只是随便看看文档,所以我找到了以下解决方案:
的内联代码调用中提取结果
#+name: calc
#+begin_src python :session :results output :exports none
myvec = [1, 2, 3]
#+end_src
#+RESULTS: calc
* Page 1
I got number src_python[:session]{myvec[1]}https://stackoverflow.com/questions/54616834
复制相似问题