Commits

Joe Bogner committed 2450377

web update

  • Participants
  • Parent commits 58c62c7

Comments (0)

Files changed (3)

File example.org.bak

+* Introduction
++ hi
+** Overview
+- org-mode template
+- beamer structure
+- beamer settings
+
+
+* Methodology
+
+** A simple slide
+This slide consists of some text with a number of bullet points:
+- the first, very @important@, point!
+- the previous point shows the use of the special markup which
+  translates to the Beamer specific /alert/ command for highlighting
+  text.
+The above list could be numbered or any other type of list and may
+include sub-lists.
+
+** A more complex slide
+This slide illustrates the use of Beamer blocks.  The following text,
+with its own headline, is displayed in a block:
+
+*** Org mode increases productivity				  :B_theorem:
+aaaa
+
+    :PROPERTIES:
+    :BEAMER_env: theorem
+    :END:
+    - org mode means not having to remember \LaTeX commands.
+    - it is based on ascii text which is inherently portable.
+    - Emacs!
+
+    \hfill \(\qed\)
+
+** Two columns
+
+*** A block					      :B_ignoreheading:BMCOL:
+    :PROPERTIES:
+    :BEAMER_env: ignoreheading
+    :BEAMER_col: 0.4
+    :END:
+    - this slide consists of two columns
+    - the first (left) column has no heading and consists of text
+    - the second (right) column has an image and is enclosed in an
+      @example@ block
+
+*** A screenshot 					    :BMCOL:B_example:
+    :PROPERTIES:
+    :BEAMER_col: 0.6
+    :BEAMER_env: example
+    :END:
+    #+ATTR_LATEX: width=\textwidth
+    [[file:../../images/org-beamer/a-simple-slide.png]]
+
+** Babel
+   :PROPERTIES:
+   :BEAMER_envargs: [t]
+   :END:
+*** Octave code						      :BMCOL:B_block:
+    :PROPERTIES:
+    :BEAMER_col: 0.45
+    :BEAMER_env: block
+    :END:
+#+name: octaveexample
+#+begin_src octave :results output :exports both
+A = [1 2 ; 3 4]
+b = [1; 1];
+x = A\b
+#+end_src
+
+*** The output						      :BMCOL:B_block:
+    :PROPERTIES:
+    :BEAMER_col: 0.4
+    :BEAMER_env: block
+    :BEAMER_envargs: <2->
+    :END:
+
+#+results: octaveexample
+#+begin_example
+A =
+
+   1   2
+   3   4
+
+x =
+
+  -1
+   1
+
+#+end_example
+
+* Conclusions
+
+** Summary
+   - org is an incredible tool for time management
+   - @but@ it is also excellent for writing and for preparing presentations
+   - Beamer is a very powerful \LaTeX{} package for presentations
+   - the combination is unbeatable!
+
+      

File org-html.html

 <html>
+<form method="post">
+  <textarea name="*Text" style="width:800px;height:200px">
+{{text}}
+  </textarea>
+  <input type="submit">
+</form>
 {{#org}}
 <h{{level}}>{{name}}</h{{level}}>
 {{#body}}
 (de passoc (Key Lst) (cadr (seek '((X) (= Key (car X))) Lst)))
 (setq lookup passoc) #hack to override picostache to use plists
 
+(allow "*Text")
+(setq File "example.org.bak")
+
 (de start() 
+   (when *Post
+         (out 2 (prin *Text))
+         (out File (prin *Text))
+         (let Msg (in (list 'git "commit" "-a" "-m" "web update") (line))
+            (out 2 (prin Msg))))
+
   (let (Html (pack (readLines "org-html.html"))
          TemplateTree (parse Html)
-         Lines (readLines "example.org.bak")
+         Text (pack (in File (till NIL)))
+         Lines (readLines File)
          Org (org-parse Lines 0)
          Model (cons 'org (list Org))
-         HeaderTemplate (cdr TemplateTree))
+         HeaderTemplate (nth TemplateTree 4))
          
+         (setq Template TemplateTree)
+
+
          #need to find a more robust way to do this
          (push 'Model '((X) (if View (renderTree (cons 'org (list (list View))) HeaderTemplate))))
          (push 'Model 'orgt)
+         (push 'Model (pipe (ht:Prin (pack Text)) (till NIL)))
+         (push 'Model 'text)
+         (httpHead NIL NIL)
          (prinl (renderTree Model TemplateTree))))
 
 (de go ()