org: add a first code example
The difficulty is not the example, but setting up org-mode to allow Python and C++ example that use the local libraries, not those installed system-wide. * doc/org/.dir-locals.el: Rename as... * doc/org/.dir-locals.el.in: ... this, so we can easily define PYTHONPATH and other environment variables. * doc/org/init.el.in: Enable C++, and make sure but Python and C++ use the local libraries. * doc/org/g++wrap.in, doc/org/tut01.org: New files. * doc/Makefile.am, configure.ac: Adjust. * wrap/python/spot.py (to_str): Take a parenth argument.
This commit is contained in:
parent
16336be3cc
commit
8de524adb0
7 changed files with 255 additions and 10 deletions
|
|
@ -1,37 +0,0 @@
|
|||
((nil . ((whitespace-action auto-cleanup)
|
||||
(whitespace-style face empty trailing lines-tail)
|
||||
(require-final-newline . t)
|
||||
(mode . whitespace)))
|
||||
(org-mode . ((whitespace-style face empty trailing)
|
||||
(eval .
|
||||
(progn
|
||||
(setq org-babel-sh-command (concat "PATH=../../src/bin"
|
||||
path-separator
|
||||
"$PATH sh"))
|
||||
(setenv "SPOT_DOTDEFAULT" "Brf(Lato)")
|
||||
(setenv "SPOT_DOTEXTRA" "node[style=filled, fillcolor=\"#ffffa0\"] edge[arrowhead=vee, arrowsize=.7]")
|
||||
(org-babel-do-load-languages 'org-babel-load-languages
|
||||
'((sh . t)
|
||||
(python . t)
|
||||
(dot . t)))))
|
||||
(org-confirm-babel-evaluate . nil)
|
||||
(org-babel-python-command . "/usr/bin/python3")
|
||||
(org-publish-project-alist
|
||||
. (("spot-html"
|
||||
:base-directory "."
|
||||
:base-extension "org"
|
||||
:publishing-directory "../userdoc/"
|
||||
:recursive t
|
||||
:publishing-function org-publish-org-to-html
|
||||
; Org 8
|
||||
:html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"spot.css\" />"
|
||||
; Org 7
|
||||
:style "<link rel=\"stylesheet\" type=\"text/css\" href=\"spot.css\" />"
|
||||
:auto-preamble t)
|
||||
("spot-static"
|
||||
:base-directory "."
|
||||
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf"
|
||||
:publishing-directory "../userdoc/"
|
||||
:recursive t
|
||||
:publishing-function org-publish-attachment)
|
||||
("spot-all" :components ("spot-html" "spot-static")))))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue