Procházet zdrojové kódy

adding files/functions for publishing org-babel documentation

Eric Schulte před 16 roky
rodič
revize
aba74e8054

binární
doc/images/library-of-babel.png


binární
doc/images/tower-of-babel.jpg


binární
doc/images/tower-of-babel.png


+ 9 - 0
doc/stylesheet.css

@@ -0,0 +1,9 @@
+  #logo {
+      float:right;
+  }
+  
+  #logo #attr {
+      float:center;
+      text-align:center;
+      margin-top:-1em;
+  }

+ 8 - 1
library-of-babel.org

@@ -3,7 +3,14 @@
 #+OPTIONS: H:3 num:nil toc:t
 #+STARTUP: odd hideblocks
 
-[[http://downlode.org/Etext/library_of_babel.html][Full text of the Borges short story]]
+#+begin_html 
+  <div id="logo">
+    <p>
+      <img src="images/library-of-babel.png"  alt="images/tower-of-babel.png" />
+      <div id="attr"><a href="http://downlode.org/Etext/library_of_babel.html">Full text of the Borges short story</a></div>
+    </p>  
+  </div>
+#+end_html
 
 * Plotting code
   Plot column 2 (y axis) against column 1 (x axis). Columns 3 and beyond, if present, are ignored.

+ 20 - 0
org-babel-worg.org

@@ -8,6 +8,15 @@
 #+LANGUAGE:   en
 #+CATEGORY:   worg
 
+#+begin_html 
+  <div id="logo">
+    <p>
+      <img src="images/tower-of-babel.png"  alt="images/tower-of-babel.png" />
+      <div id="attr">from <a href="http://www.flickr.com/photos/23379658@N05/" title=""><b>Martijn Streefkerk</b></a></div>
+    </p>  
+  </div>
+#+end_html
+
 * Introduction
   Org-babel provides the following modifications to [[http://orgmode.org/manual/Literal-examples.html][the existing
   support]] for blocks of source code examples in the org-mode core.
@@ -72,6 +81,17 @@ c(5, 10)
 
 * A meta-programming language for org-mode
 * Spreadsheet plugins for org-mode in any language
+* Library of Babel
+Org-babel support saving of source-code blocks in a library from which
+they can be call in any org-mode file.  This library is called the
+[[file:library-of-babel.org][Library of Babel]].  It is possible to add source-code blocks from any
+org-mode file to the library by calling
+
+#+srcname: add-file-to-lob
+#+begin_src emacs-lisp 
+(org-babel-lob-ingest "path/to/file.org")
+#+end_src
+
 * Reproducible research
   - output vs. value mode
   - file & graphical output

+ 38 - 0
publish-babel.org

@@ -0,0 +1,38 @@
+#+TITLE: Tools for publishing Org-babel documentation
+#+OPTIONS: toc:nil num:nil ^:nil
+
+* org-babel-documentation Project
+
+This defines the =org-babel-documentation= project, for ease of
+publishing.  Publish a project with =C-c C-e X=.
+
+#+begin_src emacs-lisp :results silent
+  (setq org-babel-dir (file-name-directory (or load-file-name buffer-file-name)))
+  (unless (boundp 'org-publish-project-alist)
+    (setq org-publish-project-alist nil))
+  (setq org-publish-project-alist
+        (cons
+         `("org-babel-documentation"
+           :base-directory ,org-babel-dir
+           :base-extension "org"
+           :exclude "org-babel.org"
+           :publishing-directory ,(expand-file-name "doc" org-babel-dir)
+           :index-filename "org-babel-worg.org"
+           :auto-postamble nil
+           :style "<link rel=\"stylesheet\"href=\"stylesheet.css\"type=\"text/css\">")
+         org-publish-project-alist))
+#+end_src
+
+* org-babel-documentation stylesheet
+
+#+begin_src css :tangle doc/stylesheet
+  #logo {
+      float:right;
+  }
+  
+  #logo #attr {
+      float:center;
+      text-align:center;
+      margin-top:-1em;
+  }
+#+end_src