Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kimim/orgmode-examples

A demo of orgmode with beamer, plantuml
https://github.com/kimim/orgmode-examples

Last synced: about 2 months ago
JSON representation

A demo of orgmode with beamer, plantuml

Awesome Lists containing this project

README

        

#+TITLE: orgmode examples
#+SUBTITLE: draw, code evaluation and present in orgmode with \LaTeX{} beamer
:SETTINGS:
#+AUTHOR: kimim
#+STARTUP: show3levels
#+OPTIONS: H:2 toc:t num:t date:t author:t
#+BEAMER_THEME: hippo
#+LATEX_HEADER: \addbibresource{references.bib}
#+bibliography: references.bib
:END:

* Introduction
** Purpose
To evaluate many features of orgmode, such as
- drawing with code
- evaluating results of code snippets
- exporting orgmode file to pdf slides

#+begin_quote
All the orgmode "source text" is hosted in github: https://github.com/kimim/orgmode-examples
#+end_quote

** How
Following tools are used in this file:
- [[https://www.msys2.org/][MSYS2]] provides many tools and libraries
- [[https://www.graalvm.org/][GraalVM]] JDK supports Java, JS, R and more
- [[https://www.gnu.org/software/emacs/][GNU Emacs]] with [[https://github.com/kimim/kimim-emacs][kimim-emacs]] configuration
- [[https://orgmode.org/][Org Mode]], including org-babel, org-export
- [[http://tug.org/texlive/][TexLive]] with [[https://github.com/kimim/beamertheme-hippo][beamertheme-hippo]] style
- [[https://plantuml.com/][PlantUML]], [[https://graphviz.org][Graphviz]], [[https://mermaid-js.github.io/mermaid/][Mermaid]], [[http://ditaa.sourceforge.net/][ditaa]], \LaTeX{} [[https://www.ctan.org/pkg/pgf][tikz]] package
- [[http://lilypond.org][LilyPond]] for music notation
- [[https://inkscape.org/][Inkscape]] to convert svg to pdf, during orgmode-pdf exporting

* Preparation
** Emacs settings
You may need to use kimim-emacs configuration:

#+begin_src shell :exports code :eval no
# backup existing emacs config
cd ~ && mv .emacs .emacs-backup && mv .emacs.d .emacs.d-backup
# clone this config
git clone https://github.com/kimim/kimim-emacs
# copy default .emacs to ~
cp kimim-emacs/.emacs ~
#+end_src

** Emacs and Orgmode version
Firstly, let's check GNU Emacs[fn:1] and Orgmode[fn:2] version:

#+begin_src emacs-lisp :exports both :eval no-export
(concat (emacs-version)
"\nOrgmode " (org-version))
#+end_src

#+RESULTS:
: GNU Emacs 29.1 (build 2, x86_64-w64-mingw32)
: of 2023-08-03
: Orgmode 9.6.6

** TexLive and Beamer Theme
Install TexLive[fn:3] to ~~ and clone beamertheme-hippo[fn:4], and
update \TeX{} cache:

#+begin_src shell :exports code :eval no
git clone https://github.com/kimim/beamertheme-hippo \
/texmf-local/tex/latex/beamertheme-hippo
mktexlsr
#+end_src

** Inkscape version
Install Inkscape[fn:5] to convert SVG image to PDF.

This is inkscape version on my Windows 10:

#+begin_src shell :exports both :results pp :eval no-export
inkscape --version
#+end_src

#+RESULTS:
: Inkscape 1.3 (0e150ed6c4, 2023-07-21)

* Drawing in code
** PlantUML settings in Emacs

Download plantuml.jar[fn:6], and set jar-path
#+begin_src emacs-lisp :exports code :eval no
(require 'url-handlers)
(url-copy-file "https://nchc.dl.sourceforge.net/project/plantuml/plantuml.jar"
"./plantuml.jar" t)

(use-package ob-plantuml
:ensure nil
:config
(require 'plantuml-mode)
;; WARNING: if variables are from other package, setq them at :config
(setq org-plantuml-jar-path "./plantuml.jar")
(setq org-plantuml-executable-args "-headless -charset UTF-8")
(add-to-list 'org-src-lang-modes '("plantuml" . plantuml))
(add-to-list 'org-babel-load-languages '(plantuml . t)))
#+end_src

** PlantUML version
Here is the version info on my machine, including JVM, dot and graphviz:

#+begin_src emacs-lisp :exports outputs :eval no-export
(shell-command-to-string
(concat
"java -jar " org-plantuml-jar-path " -version"))
#+end_src

#+RESULTS:
#+begin_example
PlantUML version 1.2022.3beta3 (Unknown compile time)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Default Encoding: Cp1252
Language: en
Country: US

PLANTUML_LIMIT_SIZE: 4096

Dot version: dot - graphviz version 2.44.1 (20200629.0846)
Installation seems OK. File generation OK
#+end_example

** Sequence Diagram
*** code :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
Let's draw a simple sequence diagram with this plantuml code. We will
use noweb cite:ramsey1994literate [cite:@ramsey1994literate] technique
here to add code from other place with ~<>~.

#+name: sequence-diagram
#+begin_src plantuml :exports both :file alice-and-bob.svg :output-dir images :eval no-export
@startuml
hide footbox
hide unlinked
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
@enduml
#+end_src

*** output :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:

#+attr_latex: :width \textwidth
#+RESULTS: sequence-diagram
[[file:images/alice-and-bob.svg]]

** Class Diagram
*** code :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
A simple class diagram

#+name: class-diagram
#+begin_src plantuml :exports both :file class-diagram.svg :output-dir images :eval no-export
@startuml
class Car
Driver - Car : drives >
Car *- Wheel : have 4 >
Car -- Person : < owns
@enduml
#+end_src

*** output :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:

#+attr_latex: :width \textwidth
#+RESULTS: class-diagram
[[file:images/class-diagram.svg]]

** ditaa settings in Emacs

Download ditaa.jar[fn:7], and set jar-path
#+begin_src emacs-lisp :exports code :eval no
(require 'url-handlers)
(url-copy-file "https://sourceforge.net/projects/ditaa/files/latest/download"
"./ditaa.zip" t)
(shell-command-to-string "unzip ditaa.zip && mv ditaa*.jar ditaa.jar")

(use-package ob-ditaa
:ensure nil
:custom
(org-ditaa-jar-path "./ditaa.jar")
:config
(add-to-list 'org-src-lang-modes '("ditaa" . artist))
(add-to-list 'org-babel-load-languages '(ditaa . t)))
#+end_src

** ditaa
*** code :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
#+name: ditaa-process
#+begin_src ditaa :exports both :output-dir images :file ditaa-process.svg :cmdline --svg -S -o :eval no-export
+--------+ +-------+ +-------+
|cGRE | --+ ditaa +--> |cFF0 |
| Text | +-------+ |diagram|
|Document| |!magic!| | |
| {d}| | | | |
+---+----+ +-------+ +-------+
: ^
| Lots of work |
+-------------------------+
#+end_src

*** output :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:

#+attr_latex: :width \textwidth
#+RESULTS: ditaa-process
[[file:images/ditaa-process.svg]]

** COMMENT mermaid settings in Emacs

Install mermaid with npm:

#+begin_src shell
npm install -g @mermaid-js/mermaid-cli
#+end_src

Configure mermaid in emacs
#+begin_src emacs-lisp
(use-package ob-mermaid
:custom
(ob-mermaid-cli-path "~/node_modules/.bin/mmdc.cmd")
:config
(add-to-list 'org-babel-load-languages '(mermaid . t)))
#+end_src

** COMMENT mermaid version

#+begin_src emacs-lisp :exports both :eval no-export
(shell-command-to-string
(concat ob-mermaid-cli-path " --version"))
#+end_src

#+RESULTS:
: 8.12.1

** COMMENT mermaid
*** code :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
Installation and Configuration, see [[https://github.com/kimim/kimim-emacs#mermaid][kimim-emacs#mermaid]]
#+name: mermaid
#+begin_src mermaid :exports both :output-dir images :file mermaid.svg :eval no-export
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
#+end_src

*** output :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:

#+RESULTS: mermaid
[[file:images/mermaid.svg]]

** tikz logo
*** code :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
#+name: tikz-logo
#+header: :headers '("\\usepackage{tikz}")
#+begin_src latex :exports both :output-dir images :file logo.svg :results file raw :eval no-export
\begin{tikzpicture}
\filldraw[blue] (0,0) rectangle (-4,-2);
\filldraw[blue,rotate=-30] (0,0) rectangle (1,-0.2);
\filldraw[blue] (-4,0) circle (0.2);
\filldraw[blue] (-4,-2) rectangle (-3,-3);
\filldraw[blue] (0,-2) rectangle (-1,-3);
\filldraw[blue] (-4,0) rectangle (-5.5,-1.5);
\end{tikzpicture}
#+end_src

*** output :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
#+attr_latex: :width \textwidth
#+RESULTS: tikz-logo
[[file:images/logo.svg]]

** tikz background
*** code :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
#+name: tikz-background
#+header: :headers '("\\usepackage{tikz}")
#+begin_src latex :exports both :output-dir images :file background.svg :results file raw :exports results :eval no-export
\begin{tikzpicture}
\fill[left color=blue,right color=white,shading angle=90,line width=0] (0,0) rectangle (4,-2);
\begin{scope}[shift={(1,-1)}]
\fill[red!30!white,semitransparent] ( 90:0.3) circle (0.5);
\fill[green!30!white,semitransparent] (210:0.3) circle (0.5);
\fill[blue!30!white,semitransparent] (330:0.3) circle (0.5);
\end{scope}
\end{tikzpicture}
#+end_src

*** output :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
#+attr_latex: :width \textwidth
#+RESULTS: tikz-background
[[file:images/background.svg]]

* Equations
** latex equation

\begin{equation}
\binom{n}{r}=\dbinom{n}{n-r}=\mathrm{C}_n^r=\mathrm{C}_n^{n-r}
\end{equation}

* Org-babel Evaluating Programming Languages
** shell
#+begin_src shell :results verbatim :exports both :eval no-export
sh --version
#+end_src

#+RESULTS:
: GNU bash, version 5.2.15(2)-release (x86_64-pc-msys)
: Copyright (C) 2022 Free Software Foundation, Inc.
: License GPLv3+: GNU GPL version 3 or later
:
: This is free software; you are free to change and redistribute it.
: There is NO WARRANTY, to the extent permitted by law.

** emacs lisp - get current year
#+begin_src emacs-lisp :exports both :eval no-export
(emacs-version)
#+end_src

#+RESULTS:
: GNU Emacs 29.1 (build 2, x86_64-w64-mingw32)
: of 2023-08-03

#+NAME: thisyear
#+begin_src emacs-lisp :exports both :eval no-export
(decoded-time-year (decode-time (current-time)))
#+end_src

#+RESULTS: thisyear
: 2023

** Babashka

[[https://babashka.org][Babashka]] is a fast native Clojure scripting runtime, developed by
Michiel Borkent.

Before evaluating following code block, you need to get ~bb.exe~ to your
system PATH from https://github.com/babashka/babashka/releases and
configure ~ob-bb~ from https://github.com/kimim/ob-bb .

#+begin_src bb :results output :exports both :var year=thisyear :eval no-export
(println "Babashka is" (- year 2019) "years old")
#+end_src

#+RESULTS:
: Babashka is 4 years old

** Babashka - Word Frequency
*** code :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
We use babashka to read this README.org file, and list the top
frequent characters in this file. Then we use several programming
language to generate a bar chart from the result table of this code.

#+name: char-table
#+begin_src bb :results table :exports both :var year=thisyear :eval no-export
(require '[clojure.string :as str])
(-> (slurp "README.org")
(str/split #"")
(->>
(filter #(re-matches #"\w" %)))
(frequencies)
(->>
(sort-by val)
(reverse)
(take 10)))
#+end_src

*** output :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
#+RESULTS: char-table
| e | 1648 |
| t | 1127 |
| a | 1082 |
| o | 1043 |
| i | 968 |
| r | 967 |
| n | 885 |
| s | 884 |
| l | 815 |
| c | 580 |

** Clojure

According to Rich Hickey cite:hickey2020history, Clojure was initially
designed in 2005.

Visit ~deps.edn~ and call ~cider-jack-in~ before evaluating following code
block:

#+begin_src clojure :results output :exports both :var year=thisyear :eval no-export
(println "Clojure is" (- year 2005) "years old")
#+end_src

#+RESULTS:
: Clojure is 18 years old

** Clojure - get table
*** code :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
#+name: char-table-clojure
#+begin_src clojure :var tbl=char-table :results output :exports both
(doseq [item tbl]
(println (first item) "\t" (second item)))
#+end_src

*** output :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
#+RESULTS: char-table-clojure
#+begin_example
e 1655
t 1130
a 1085
o 1043
i 969
r 967
n 889
s 887
l 816
c 582
#+end_example

** Clojure - chart
*** code :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
#+NAME: clojure-chart
#+HEADER: :output-dir images :file clojure-chart.svg
#+begin_src clojure :var tbl=char-table :results file :exports both :eval no-export
(require '[clj-chart.chart :as chart])
(require '[clj-chart.plot :as plot])
(let [x (map first tbl)
y (map second tbl)
chart (chart/bar
{:series [{:name "char-freq"
:xs x :ys y}]})]
(plot/store! chart nil "images/clojure-chart.svg"))
#+end_src
*** output :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
#+attr_latex: :width \textwidth
#+RESULTS: clojure-chart
[[file:images/clojure-chart.svg]]

** COMMENT ClojureScript

TODO
# #+begin_src clojurescript :exports both :var year=thisyear :eval no-export
# (println "ClojureScript is" (- 2021 2011) "years old")
# #+end_src

** Python

Check Python version in shell:
#+begin_src shell :exports both :eval no-export
python --version
#+end_src

#+RESULTS:
: Python 3.11.6

Evaluate Python code:
#+begin_src python :results output :exports both :var year=thisyear :eval no-export
print("Python is " + str(year - 1991) + " years old")
#+end_src

#+RESULTS:
: Python is 32 years old

** Python pyplot
*** code :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:

#+NAME: python-pyplot
#+HEADER: :output-dir images :file python-pyplot.svg
#+begin_src python :var tbl=char-table :results file graphics :exports both
import matplotlib.pyplot as plt
import pandas as pd
data = pd.DataFrame(tbl)
fig=plt.figure(figsize=(4,2))
fig.tight_layout()
plt.bar(data[0], data[1])
fgname = 'images/python-pyplot.svg'
plt.savefig(fgname)
#+end_src

*** output :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
#+attr_latex: :width \textwidth
#+RESULTS: python-pyplot
[[file:images/python-pyplot.svg]]

** C

#+header: :includes
#+begin_src C :exports both :var year=thisyear :eval no-export
printf("%s is %d years old.\n", "C programming language", year - 1972);
#+end_src

#+RESULTS:
: C programming language is 51 years old.

** C++

#+begin_src C++ :exports both :namespaces std :includes :var year=thisyear :eval no-export
cout << "C++ is " << year - 1979 << " years old" << endl;
#+end_src

#+RESULTS:
: C++ is 44 years old

** Java

TODO: can pass variable to java

#+begin_src java :classname Main :exports both :eval no-export
import java.util.Calendar;
public class Main{
public static void main(String[] args){
int thisyear = Calendar.getInstance().get(Calendar.YEAR);
System.out.println("Java is " + (thisyear - 1995) + " years old");
}
}
#+end_src

#+RESULTS:
: Java is 28 years old

** Rust

#+begin_src emacs-lisp :eval no-export
(package-install 'ob-rust)
#+end_src

#+RESULTS:
: Package ‘ob-rust’ installed.

Install ~rust-script~ to evaluate Rust code blocks:

#+begin_src shell
cargo install rust-script
#+end_src

TODO: cannot pass variable to rust

#+begin_src rust :exports both :var year=thisyear :eval no-export
fn main() {
println!("Rust is {} years old", 2023 - 2016);
}
#+end_src

#+RESULTS:
: Rust is 7 years old

** COMMENT Go

TODO
#+begin_src go :exports both
package main
import ("fmt")

func main(){
fmt.Println("emacs")
}
#+end_src

** COMMENT R
TODO
* Org-babel for music and others
** Install LilyPond

LilyPond cite:nienhuys2003lilypond is a system for automated music
engraving.

You can get the installation file from
https://lilypond.org/download.html and install it.

Check the version:

#+begin_src shell :results pp :exports both :eval no-export
lilypond --version
#+end_src

#+RESULTS:
#+begin_example
GNU LilyPond 2.22.1

Copyright (c) 1996--2021 by
Han-Wen Nienhuys
Jan Nieuwenhuizen
and others.

This program is free software. It is covered by the GNU General Public
License and you are welcome to change it and/or distribute copies of it
under certain conditions. Invoke as `lilypond --warranty' for more
information.

#+end_example

** LilyPond

#+name: lilypond
#+begin_src lilypond :exports both :output-dir images :file chords.svg :cmdline --svg -dno-print-pages -dpreview :eval no-export
\relative c' {
\chordmode {c1}
\chordmode {d1}
\chordmode {e1}
\chordmode {f1}
\chordmode {g1}
\chordmode {a1}
\chordmode {b1}
}
#+end_src

#+RESULTS: lilypond
[[file:images/chords.svg]]

* Presenting with Org-beamer
** Beamer

In this section, I will try some beamer settings in orgmode.

** XeTeX version

#+begin_src emacs-lisp :exports both :eval no-export
(princ (format "XeTeX version: %s\n"
(eshell-command-result "xelatex --version") "\n"))
#+end_src

#+RESULTS:
#+begin_example
XeTeX version: XeTeX 3.141592653-2.6-0.999994 (TeX Live 2022)
kpathsea version 6.3.4
Copyright 2022 SIL International, Jonathan Kew and Khaled Hosny.
There is NO warranty. Redistribution of this software is
covered by the terms of both the XeTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the XeTeX source.
Primary author of XeTeX: Jonathan Kew.
Compiled with ICU version 70.1; using 70.1
Compiled with zlib version 1.2.11; using 1.2.11
Compiled with FreeType2 version 2.11.1; using 2.11.1
Compiled with Graphite2 version 1.3.14; using 1.3.14
Compiled with HarfBuzz version 3.4.0; using 3.4.0
Compiled with libpng version 1.6.37; using 1.6.37
Compiled with pplib version v2.05 less toxic i hope
Compiled with fontconfig version 2.13.96; using 2.13.96

#+end_example

** simple slide

This is a simple slide, with some formatted texts:
- *important* _underline_ /slashed/ =code= ~verbatim~ +deleted+ \alert{alert}
- *important* _underline_ /slashed/ =code= ~verbatim~ +deleted+ \alert{alert}
- *important* _underline_ /slashed/ =code= ~verbatim~ +deleted+ \alert{alert}
- *important* _underline_ /slashed/ =code= ~verbatim~ +deleted+ \alert{alert}
- *important* _underline_ /slashed/ =code= ~verbatim~ +deleted+ \alert{alert}
- *important* _underline_ /slashed/ =code= ~verbatim~ +deleted+ \alert{alert}

Enumerations:
1. *important* _underline_ /slashed/ =code= ~verbatim~ +deleted+ \alert{alert}
1. *important* _underline_ /slashed/ =code= ~verbatim~ +deleted+ \alert{alert}
2. *important* _underline_ /slashed/ =code= ~verbatim~ +deleted+ \alert{alert}
1. *important* _underline_ /slashed/ =code= ~verbatim~ +deleted+ \alert{alert}
2. *important* _underline_ /slashed/ =code= ~verbatim~ +deleted+ \alert{alert}
3. *important* _underline_ /slashed/ =code= ~verbatim~ +deleted+ \alert{alert}

** simple slide with definition

It is not recommended to have second level definition bullet...
- Beamer :: LaTeX package to generate slides
- Orgmode :: Powerful plain text format
- org-babel :: Let Orgmode understand and evaluate programming languages
- ox-latex :: Exporter to export orgmode to latex and further to PDF

** simple slide with wallpaper
#+BEAMER: \ThisCenterWallPaper{1}{beamer/wallpaper}

- This slide has a nice wallpaper.
- It is the westlake in the morning.

** full screen with a wallpaper :B_fullframe:
:PROPERTIES:
:BEAMER_env: fullframe
:BEAMER_OPT: plain
:END:
#+BEAMER: \ThisCenterWallPaper{1}{beamer/wallpaper}

** special blocks with heading - 1 :B_againframe:
*** block :B_block:
:PROPERTIES:
:BEAMER_env: block
:END:
- this is a block
*** alert block :B_alertblock:
:PROPERTIES:
:BEAMER_env: alertblock
:END:
- this is an alert block
*** theorem block :B_theorem:
:PROPERTIES:
:BEAMER_env: theorem
:END:
- this is a theorem block
*** proof :B_proof:
:PROPERTIES:
:BEAMER_env: proof
:END:
- This is proof

** special blocks with heading - 2
*** example :B_example:
:PROPERTIES:
:BEAMER_env: example
:END:
This is an example
*** example block :B_exampleblock:
:PROPERTIES:
:BEAMER_env: exampleblock
:END:
Example block
*** definition :B_definition:
:PROPERTIES:
:BEAMER_env: definition
:END:
- this is a definition

** special blocks without heading
*** beamercolorbox :B_beamercolorbox:
:PROPERTIES:
:BEAMER_env: beamercolorbox
:END:
- this is a beamercolorbox
*** verse :B_verse:
:PROPERTIES:
:BEAMER_env: verse
:END:
verse is a poem?
maybe.
*** quotation :B_quotation:
:PROPERTIES:
:BEAMER_env: quotation
:END:
Software is eating the world.
*** quote :B_quote:
:PROPERTIES:
:BEAMER_env: quote
:END:
This is a quote.
** some todo list

- daily task [33%]
- [X] fetch the milk in the morning
- [ ] check the mailbox
- [ ] clean the garden
- learning task [50%]
- [X] read the book
- [X] write the reading notes
- [ ] make a presentation
- [ ] present to students

** table rotated title

#+attar_latex: :align c|l|r
| \rotatebox{45}{enrollment to the class} | \rotatebox{45}{name} | \rotatebox{45}{date} |
|-----------------------------------------+----------------------+----------------------|
| x | Kimi | 2021-09-18 |
| | Ivy | 2021-09-28 |
| x | Anna | 2021-09-20 |
** table fixed width

** table formula

| | | | | |
|-----------+--------+---+---+---|
| 2 | 1 | | | |
| 2 | | | | |
| 2 | 1 | | | |
|-----------+--------+---+---+---|
| [2, 2, 2] | [1, 1] | | | |
| 3 | 2 | | | |
| 6 | 2 | | | |
#+TBLFM: @5$1=(@I..II)::@5$2=(@I..II)
#+TBLFM: @6$1='(length '(@I..II))::@6$2='(length '(@I..II))
#+TBLFM: @7$1='(apply '+ '(@I..II));N::@7$2='(apply '+ '(@I..II));N

** 4 dimension
*** up :B_columns:
:PROPERTIES:
:BEAMER_env: columns
:END:
**** up-left :B_block:BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:BEAMER_env: block
:END:
- 1
**** up-right :B_block:BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:BEAMER_env: block
:END:
- 2
*** down :B_columns:
:PROPERTIES:
:BEAMER_env: columns
:END:
**** down-left :B_block:BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:BEAMER_env: block
:END:
- 3
**** down-right :B_block:BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:BEAMER_env: block
:END:
- 4
** three columns
*** col1 :B_block:BMCOL:
:PROPERTIES:
:BEAMER_col: 0.33
:BEAMER_env: block
:END:
- left column occupies 33%
*** col2 :B_block:BMCOL:
:PROPERTIES:
:BEAMER_col: 0.33
:BEAMER_env: block
:END:
- middle column occupies 33%
*** col3 :B_block:
:PROPERTIES:
:BEAMER_col: 0.33
:BEAMER_env: block
:END:
- right column occupies 33%

** quote and quotation
Quote:
#+begin_quote
If winter comes, can Spring be far behind?
#+end_quote

Quotation:
#+begin_quotation
History repeats itself, and that's one of the things that's wrong with
history.
#+end_quotation

** Highlighting text

The double =@@= can be used to enclose active code.

For example:

#+begin_example
This is very *@@beamer:<2->@@important*
#+end_example

This is very *@@beamer:<2->@@important*

** Lists in action

~#+ATTR_BEAMER: :overlay +-~ can show list one by one:

#+ATTR_BEAMER: :overlay +-
- Can you remember
- The magic Mesosoic numbers
- The dinosaur one to ten

You can also add ~<3->~ before each item to set the order:
- <6-> Can you remember
- <5-> The magic Mesosoic numbers
- <4-> The dinosaur one to ten

** Columns in action
:PROPERTIES:
:BEAMER_act: [<+->]
:END:
#+BEAMER: \setbeamercovered{highly dynamic}
*** col1 :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.33
:END:
Phoenix! Phoenix! How virtue has declined.

It can't wait for the future or catch up with what's behind.

When the Dao works in the world, the sage man works his ways,

When the Dao has disappeared the Sage lives out his days.

*** col2 :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.33
:END:
In times like these just keep far from the shackles and the blade.

Good fortune's lighter than a feather, but none knows how to bear it,

Disaster's heavier than the earth, but none knows how to dodge it.

*** col3 :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.33
:END:
Enough! Enough! These toils of virtue serving man,

Danger! Danger! Escape! – draw the line in the sand.

Brambles, brambles, don't cut me as I go,

Twisting, twisting, my feet stay free of woe.

** Blocks in action
*** Block1
:PROPERTIES:
:BEAMER_act: <1->
:END:
Great understanding is broad, small understanding is picky.

*** Block2
:PROPERTIES:
:BEAMER_act: <2->
:END:
Great words overflowing, small words haggling.

*** Block3
:PROPERTIES:
:BEAMER_act: <3->
:END:
Asleep the bodily soul goes roaming, awake it opens through our form.

* Conclusion
** Key Takeaways

- Emacs is a long lasting, and wonderful text editor
- Orgmode is an awesome plain text format
- \LaTeX{} is great typesetting tool
- Beamer is a \LaTeX{} package for preparing presentation
- Thus, using these tools within Emacs is cool!

* Appendix :B_appendix:
:PROPERTIES:
:BEAMER_env: appendix
:END:
** References
:PROPERTIES:
:BEAMER_opt: allowframebreaks,label=
:END:
#+BEGIN_EXPORT latex
\iffalse % multiline comment
#+END_EXPORT
[[bibliography:references.bib]]
#+BEGIN_EXPORT latex
\fi
\printbibliography
#+END_EXPORT

** OC References

#+print_bibliography:

* Footnotes

[fn:1] https://www.gnu.org/software/emacs

[fn:2] https://orgmode.org

[fn:3] http://tug.org/texlive

[fn:4] https://github.com/kimim/beamertheme-hippo

[fn:5] https://inkscape.org

[fn:6] https://plantuml.com

[fn:7] https://sourceforge.net/projects/ditaa/files/latest/download