Added custom-latex.el
This commit is contained in:
parent
c964908e44
commit
0ea8c58239
@ -1,2 +1,5 @@
|
||||
# EmacsConfigs
|
||||
|
||||
> Various settings for Emacs using Doom
|
||||
|
||||
- `custom-latex.el`: Exchanges default export of TOOD items
|
||||
|
21
custom-latex.el
Normal file
21
custom-latex.el
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
;; Default latex export behaviour is
|
||||
;; \item {\bfseries\sffamily TODO} TITLE TEXT \hfill{}\textsc{TAGS}
|
||||
;;
|
||||
;; Change to
|
||||
;; \item {\bfseries\sffamily TODO} TITLE TEXT \marginpar{\textsc{TAGS}}
|
||||
|
||||
|
||||
(defun my-org-latex-format-headline-function (todo todo-type priority text tags _info)
|
||||
"Custom function to format headlines for LaTeX export."
|
||||
(concat
|
||||
;; Add the TODO keyword with a different formatting
|
||||
(and todo (format "{\\%s} " todo))
|
||||
;; Add the priority if present
|
||||
(and priority (when priority (format "\\hspace{0.2em}\\%c" priority)))
|
||||
;; Add the headline text
|
||||
(format "%s" text)
|
||||
;; Add tags if present
|
||||
(and tags (format " \\marginpar\\textsc{%s}" tags))))
|
||||
|
||||
(setq org-latex-format-headline-function #'my-org-latex-format-headline-function)
|
Loading…
Reference in New Issue
Block a user