;; 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)