mirror of https://gitlab.com/pamhyr/pamhyr2
31 lines
970 B
EmacsLisp
31 lines
970 B
EmacsLisp
(require 'org)
|
|
(require 'subr-x)
|
|
|
|
(add-to-list
|
|
'org-latex-classes
|
|
'("PamhyrDoc"
|
|
"\\documentclass{../tools/PamhyrDoc}"
|
|
("\\section{%s}" . "\\section*{%s}")
|
|
("\\subsection{%s}" . "\\subsection*{%s}")
|
|
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
|
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
|
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
|
|
|
|
|
|
(setq org-latex-pdf-process
|
|
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
|
|
"bibtex documentation"
|
|
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
|
|
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
|
|
|
|
|
|
(defun pamhyr-version ()
|
|
"Return the contents of the pamhyr version file."
|
|
(with-temp-buffer
|
|
(insert-file-contents "../../VERSION")
|
|
(buffer-string)))
|
|
|
|
(defun pamhyr-current-file ()
|
|
(let ((lst (split-string (buffer-file-name) "/")))
|
|
(string-join (nthcdr (- (length lst) 3) lst) "/")))
|