Skip to content

Latest commit

 

History

History
164 lines (137 loc) · 4.77 KB

ob-julia-beamer.org

File metadata and controls

164 lines (137 loc) · 4.77 KB

Sample julia Presentation

A Sample julia Beamer presentation

Frame 0

For this to successfully export to PDF you’ll need
(require 'ox-beamer)

and you’ll need a Beamer entry similar to this

(add-to-list 'org-latex-classes
	     '("beamer"
        "\\documentclass[presentation]{beamer}
        \[DEFAULT-PACKAGES]
        \[PACKAGES]
        \[EXTRA]"
	       ("\\section{%s}" . "\\section*{%s}")
	       ("\\subsection{%s}" . "\\subsection*{%s}")
	       ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))

in your .emacs. Then open the org file and do: C-c C-e l P.

Frame 1

Here is some julia code

2+3
print("hello, there!")
sqrt(5)

\pause

Here is the output

This is a beamer note

This subtree will not appear in the PDF. Notice the noweb call <<simple-code>> which is replaced by the named simple-code src block above (so we don’t have to type the same code twice). It is activated by the :noweb yes header argument. You will notice those headline tags, such as :BMCOl:B_block: and :B_note:. Don’t fret about those; they are just a visual aid.

Frame 2

This block extends horizontally

Be sure to put

#+PROPERTY: session *julia*

at the top of the org file to ensure julia code block session evalation by default.

This block heading text is ignored

  • Enter Column View[fn:1] with C-c C-x C-c on headline
  • Might like S-TAB to collapse headlines first
  • Handy for editing headline properties
  • Set ignoreheading with C-c C-b i on headline

[fn:1] See this message on Gmane for more about Column View.

Frame 3

The julia code

\footnotesize

using Winston
x = linspace(0, 3pi, 100)
c = cos(x)
s = sin(x)
p = FramedPlot();
setattr(p, "title", "title!")
setattr(p, "xlabel", L"\Sigma x^2_i")
setattr(p, "ylabel", L"\Theta_i")
add(p, FillBetween(x, c, x, s) )
add(p, Curve(x, c, "color", "red") )
add(p, Curve(x, s, "color", "blue") )
file(p, "example1.pdf")

\normalsize

The image

example1.pdf

References