spot/doc/org/init.el.in
Alexandre Duret-Lutz 61602a3bba org: convert all images to svg
Suggested in #299.

* doc/org/autfilt.org, doc/org/concepts.org, doc/org/dstar2tgba.org,
doc/org/genaut.org, doc/org/hierarchy.org, doc/org/hoa.org,
doc/org/ltl2tgba.org, doc/org/ltl2tgta.org, doc/org/ltlcross.org,
doc/org/oaut.org, doc/org/randaut.org, doc/org/satmin.org,
doc/org/tut11.org, doc/org/tut23.org, doc/org/tut24.org,
doc/org/tut30.org, doc/org/tut31.org, doc/org/tut50.org,
doc/org/tut51.org: Adjust all dot outputs to produce svg.
* doc/org/arch.tex, doc/org/hierarchy.tex, doc/org/satmin.tex: Adjust
to produce a pdf with 12pt text.
* doc/Makefile.am: Adjust the generation of arch.svg, hierarchy.svg,
and satmin.svg: From above.
* doc/org/.dir-locals.el.in, doc/org/init.el.in: Adjust dot arguments
to produce svg with 12pt text (the default was 14pt).
* doc/org/spot.css: Use Lato as the main font for consistency with
automata.
* HACKING: pdf2svg is now required to build the doc.
2017-11-22 12:03:53 +01:00

98 lines
3.9 KiB
EmacsLisp

(setq load-path (append '("@abs_top_srcdir@/elisp/" ; for hoa-mode.el
;; htmlize is not always in the load-path.
;; On Debian it can be found here.
"/usr/share/emacs/site-lisp/emacs-goodies-el")
load-path))
(or (require 'org-publish nil t) ; Org 7
(require 'ox-publish)) ; Org 8
(require 'org-install)
(require 'org-version)
(require 'hoa-mode)
(print (concat "Org " (org-version)))
(setq org-export-htmlize-output-type 'css)
(setq org-html-htmlize-output-type 'css)
; the .org-timestamp directory does not always exist, is not always
; created by org, and that causes issues on our buildfarm.
(setq org-publish-use-timestamps-flag nil)
;; The default value of writing to ~/.org-timestamps causes race
;; conditions when doing concurrent builds.
(setq org-publish-timestamp-directory "@abs_top_builddir@/.org-timestamps/")
(org-babel-do-load-languages
'org-babel-load-languages
`((,(if (version< org-version "8.3") 'sh 'shell) . t)
(dot . t)
(python . t)
(plantuml . t)
(C . t)))
(setq org-confirm-babel-evaluate nil)
(setq org-plantuml-jar-path "@abs_top_builddir@/doc/org/plantuml.jar")
(setq org-babel-temporary-directory "@abs_top_builddir@/doc/org/tmp")
(make-directory org-babel-temporary-directory t)
(setq org-babel-python-command "@PYTHON@")
(setq org-babel-C++-compiler "./g++wrap")
(setq shell-file-name "@SHELL@")
(setq org-babel-default-header-args:plantuml
'((:results . "file")
(:exports . "results")
;; prevent the plantuml logo to annoying appear on top of
;; whatever you are doing when the project compiles in the
;; background.
(:java . "-Djava.awt.headless=true")))
(setenv "PATH"
(concat "@abs_top_builddir@/bin" path-separator (getenv "PATH")))
(setenv "PYTHONPATH"
(concat "@abs_top_builddir@/python/.libs:"
"@abs_top_builddir@/python:"
"@abs_top_srcdir@/python:"
"@abs_top_builddir@/python/spot/.libs:"
"@abs_top_builddir@/python/spot:"
"@abs_top_builddir@/spot/ltsmin/.libs"
"@abs_top_srcdir@/python/spot:"
(getenv "PYTHONPATH")))
(setenv "DYLD_LIBRARY_PATH"
(concat "@abs_top_builddir@/python/.libs:@abs_top_builddir@/spot/.libs:@abs_top_builddir@/buddy/src/.libs:"
(getenv "DYLD_LIBRARY_PATH")))
(setenv "SPOT_DOTDEFAULT" "Brf(Lato)C(#ffffa0)")
(setenv "SPOT_DOTEXTRA" "node[fontsize=12] fontsize=12 stylesheet=\"spot.css\" edge[arrowhead=vee, arrowsize=.7, fontsize=12]")
(setq org-export-html-home/up-format
"<div id=\"org-div-home-and-up\" style=\"text-align:center;white-space:nowrap;\">
<a accesskey=\"h\" href=\"%s\">UP</a> | <a accesskey=\"H\" href=\"%s\">HOME</a>
</div>")
(setq org-export-html-postamble nil)
(setq org-publish-project-alist
`(("spot-html"
:base-directory "@abs_top_srcdir@/doc/org/"
:base-extension "org"
:publishing-directory "@abs_top_srcdir@/doc/userdoc/"
:recursive t
:exclude "setup.org"
:auto-sitemap t
:sitemap-title "Sitemap for Spot"
:publishing-function
,(if (require 'org-publish nil t) 'org-publish-org-to-html ; Org 7
'org-html-publish-to-html) ; Org 8
; Org 8
:html-head "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"spot.css\" />"
; Org 7
:style "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"spot.css\" />"
:auto-preamble t)
("spot-static"
:base-directory "@abs_top_srcdir@/doc/org/"
:base-extension "css\\|js\\|png\\|svg\\|jpg\\|gif\\|pdf"
:publishing-directory "@abs_top_srcdir@/doc/userdoc/"
:recursive t
:publishing-function org-publish-attachment)
("spot-all" :components ("spot-html" "spot-static"))))
(org-publish-all t)
;;; org-babel-remove-temporary-directory does not correctly remove
;;; nested directories and we have some files in tmp/.libs/ because of
;;; libtool. So let us clean that ourselves.
(delete-directory org-babel-temporary-directory t)