emacs_tutorial/doc/orgbabel.org

34 lines
870 B
Org Mode
Raw Normal View History

#+date: 2021
#+options: toc:nil num:nil author:nil
* org-babel
[[https://orgmode.org/worg/org-contrib/babel/intro.html][Babel]] is a org utility to write code within org files. It is a nice tool to make
literate programming and have a beatiful documented code.
You can include many structures to include different languages in the
same document.
Header arguments let the user to choose multiple features of the document. [[https://org-babel.readthedocs.io/en/latest/header-args/][Here]]
a reference for header arguments.
** Include templates in org babel
Use:
: M-x org-insert-structure-template
Or keybinding
: C-c C,
Then choose an option (src, example, center, comment)
Or use org-tempo. To include a src code block in the document:
: <s TAB
Change the letter for each option that you need (a, C, c, E, e... for "export
ascii", "comment", "example"...)