Add documentation for generating PDFs.
This commit is contained in:
parent
3c9294fa44
commit
095d7bbf75
|
|
@ -3,24 +3,4 @@
|
|||
|
||||
((org-mode
|
||||
.
|
||||
((eval . (progn
|
||||
(require 'ox-latex)
|
||||
(setq-local
|
||||
org-latex-classes
|
||||
'(("chapter-code"
|
||||
"\\documentclass{chapter-code}"
|
||||
("\\chapter{%s}" . "\\chapter*{%s}")
|
||||
("\\section{%s}" . "\\section*{%s}"))))))
|
||||
(eval . (keymap-local-set
|
||||
"C-c C-t"
|
||||
(lambda nil
|
||||
(interactive)
|
||||
(save-match-data
|
||||
(let ((string (buffer-string))
|
||||
(pos 0)
|
||||
(tag 0))
|
||||
(while (string-match "<<tag:\\([0-9]+\\)>>" string pos)
|
||||
(setq tag (max tag
|
||||
(string-to-number (match-string 1 string)))
|
||||
pos (match-end 0)))
|
||||
(insert "<<tag:" (number-to-string (1+ tag)) ">>")))))))))
|
||||
((eval . (load-file "startup.el")))))
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
all: pdf remove-tex
|
||||
pdf: ; emacs code.org --batch -l startup.el -f org-latex-export-to-pdf
|
||||
remove-tex: ; rm code.tex
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
#+TITLE: Chapter Code of Regulations
|
||||
|
||||
* Generating PDFs
|
||||
A PDF can be generated using the following command:
|
||||
#+begin_src bash
|
||||
guix shell -m manifest.scm -- make
|
||||
#+end_src
|
||||
Assuming that [[https://guix.gnu.org/][GNU Guix]] is installed, this command will handle downloading all
|
||||
dependencies, generating a pdf, and cleaning up temporary files.
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
;; What follows is a "manifest" equivalent to the command line you gave.
|
||||
;; You can store it in a file that you may then pass to any 'guix' command
|
||||
;; that accepts a '--manifest' (or '-m') option.
|
||||
|
||||
(specifications->manifest
|
||||
(list "emacs-next" "texlive" "make" "git"))
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
(require 'ox-latex)
|
||||
(setq-local
|
||||
org-latex-classes
|
||||
'(("chapter-code"
|
||||
"\\documentclass{chapter-code}"
|
||||
("\\chapter{%s}" . "\\chapter*{%s}")
|
||||
("\\section{%s}" . "\\section*{%s}"))))
|
||||
|
||||
(setopt org-latex-hyperref-template "
|
||||
\\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n pdfkeywords={%k},
|
||||
pdfsubject={%d},\n pdfcreator={%c},\n pdflang={%L},\n colorlinks=true}\n")
|
||||
|
||||
(keymap-local-set
|
||||
"C-c t"
|
||||
(lambda nil
|
||||
(interactive)
|
||||
(save-match-data
|
||||
(let ((string (buffer-string))
|
||||
(pos 0)
|
||||
(tag 0))
|
||||
(while (string-match "<<tag:\\([0-9]+\\)>>" string pos)
|
||||
(setq tag (max tag
|
||||
(string-to-number (match-string 1 string)))
|
||||
pos (match-end 0)))
|
||||
(insert "<<tag:" (number-to-string (1+ tag)) ">>")))))
|
||||
Loading…
Reference in New Issue