【发布时间】:2017-08-22 08:01:15
【问题描述】:
有没有办法在org-babel的#+RESULTS块中启用字体粗细和颜色?
例如,使用 --color 选项调用 ls 会在 shell 中按预期呈现字体粗细和颜色,但在 #+RESULTS 块中呈现时则不会:
#+BEGIN_SRC shell
ls --color ~/
#+END_SRC
#+RESULTS:
| Applications |
| Desktop |
| Documents |
| Downloads |
| Library |
...
Screenshot of ls with and without --color in the terminal
另一个例子是node模块chalk,它以明文形式出现在#+RESULTS块中:
#+BEGIN_SRC js
const chalk = require('chalk');
console.log(chalk.red('Hello world!'));
#+END_SRC
#+RESULTS:
: Hello world!
: undefined
【问题讨论】: