add org-publish latex/koma letter

This commit is contained in:
Frieder Schlesier 2023-01-16 21:08:36 +01:00
parent 4bf641ea53
commit 59b1672804
3 changed files with 28 additions and 11 deletions

View File

@ -582,7 +582,6 @@ you should place your code here."
) )
(setq calendar-week-start-day 1) (setq calendar-week-start-day 1)
(setq calendar-intermonth-text (setq calendar-intermonth-text
'(propertize '(propertize
(format "%2d" (format "%2d"
@ -594,6 +593,7 @@ you should place your code here."
(setq calendar-intermonth-header (setq calendar-intermonth-header
(propertize "KW" ; or e.g. "Wk" (propertize "KW" ; or e.g. "Wk"
'font-lock-face 'font-lock-keyword-face)) 'font-lock-face 'font-lock-keyword-face))
(with-eval-after-load 'org (with-eval-after-load 'org
(when (file-exists-p "~/dotfiles/spacemacs-custom.el") (when (file-exists-p "~/dotfiles/spacemacs-custom.el")
(load-file "~/dotfiles/spacemacs-custom.el") (load-file "~/dotfiles/spacemacs-custom.el")
@ -601,7 +601,7 @@ you should place your code here."
(when (file-exists-p "~/dotfiles/publish.el") (when (file-exists-p "~/dotfiles/publish.el")
(load-file "~/dotfiles/publish.el") (load-file "~/dotfiles/publish.el")
) )
) )
) )
;; Do not write anything past this comment. This is where Emacs will ;; Do not write anything past this comment. This is where Emacs will

View File

@ -24,7 +24,7 @@
(setq org-export-html-coding-system 'utf-8-unix) (setq org-export-html-coding-system 'utf-8-unix)
(setq org-html-doctype "html5") (setq org-html-doctype "html5")
(defvar fschlde-html-head "<link type='text/css' rel='stylesheet' href='../css/plain.css'>") (defvar fschlde-html-head "<link type='text/css' rel='stylesheet' href='../css/plain.css'>")
(setq fschlde-html-footer " <footer>\nfschl.de 2018-2022\n</footer>") (setq fschlde-html-footer " <footer>\nfschl.de 2018-2023\n</footer>")
;; following two funcs are taken from ;; following two funcs are taken from
;; https://www.orgroam.com/manual.html#How-do-I-publish-my-notes-with-an-Internet_002dfriendly-graph_003f ;; https://www.orgroam.com/manual.html#How-do-I-publish-my-notes-with-an-Internet_002dfriendly-graph_003f
@ -51,7 +51,7 @@
(add-hook 'org-roam-graph-generation-hook (add-hook 'org-roam-graph-generation-hook
(lambda (dot svg) (if (< (- (cadr (current-time)) my-publish-time) 5) (lambda (dot svg) (if (< (- (cadr (current-time)) my-publish-time) 5)
(progn (copy-file svg "~/projects/blog-fschlde/braindump/sitemap.svg" 't) (progn (copy-file svg "~/projects/blog-fschlde/pkb/sitemap.svg" 't)
(kill-buffer (file-name-nondirectory svg)) (kill-buffer (file-name-nondirectory svg))
(setq my-publish-time 0))))) (setq my-publish-time 0)))))
@ -116,7 +116,7 @@
:sitemap-function roam-sitemap :sitemap-function roam-sitemap
:sitemap-title "Roam notes" :sitemap-title "Roam notes"
:publishing-function roam-publication-wrapper :publishing-function roam-publication-wrapper
:publishing-directory "~/projects/blog-fschlde/braindump/" :publishing-directory "~/projects/blog-fschlde/pkb/"
:section-number nil :section-number nil
:table-of-contents nil :table-of-contents nil
:style "<link rel=\"stylesheet\" href=\"../other/mystyle.cs\" type=\"text/css\">") :style "<link rel=\"stylesheet\" href=\"../other/mystyle.cs\" type=\"text/css\">")

View File

@ -7,16 +7,16 @@
(eval-after-load 'ox-koma-letter (eval-after-load 'ox-koma-letter
'(progn '(progn
(add-to-list 'org-latex-classes (add-to-list 'org-latex-classes
'("my-letter" '("Brief-de-modern"
"\\documentclass\{scrlttr2\} "\\documentclass\[Brief-de-modern\]\{scrlttr2\}
\\usepackage[english]{babel}
\\setkomavar{frombank}{(1234)\\,567\\,890}
\[DEFAULT-PACKAGES] \[DEFAULT-PACKAGES]
\[PACKAGES] \[PACKAGES]
\[EXTRA]")) \[EXTRA]"))
(setq org-koma-letter-default-class "my-letter"))) ;; \\usepackage[english]{babel}
;; \\setkomavar{frombank}{(1234)\\,567\\,890}
(setq org-koma-letter-default-class "Brief-de-modern")))
(setq org-default-notes-file "~/Documents/Org/tasks.org") (setq org-default-notes-file "~/Documents/Org/tasks.org")
(setq org-agenda-files (setq org-agenda-files
@ -53,7 +53,24 @@
) )
("l" "letter to Documents/letters/<datetime.org>" ("l" "letter to Documents/letters/<datetime.org>"
entry (file fschl/create-org-letter) entry (file fschl/create-org-letter)
"* %? \n\n * \n\n " "* Preamble :noexport:
# #+TITLE: ?
# #+DATE:
# #+SUBJECT: test letter subject
#+LCO: Absender-Frieder
#+LCO: Brief-de-modern
#+STARTUP: showall
* To-address :to:
# * From :from:
* Sehr geehrte Damen und Herren,
?
* Mit freundlichen Grüßen, :closing: "
) )
("m" "Schedule a meeting" entry ("m" "Schedule a meeting" entry
(file+headline "~/Documents/Org/tasks.org") (file+headline "~/Documents/Org/tasks.org")