Hello, Marcel van der Boom <mar...@hsdev.com> writes:
Thanks for your patch. A few comments follow. > * lisp/ox-latex.el (org-latex-template): add pdfauthor and pdftitle > (org-latex-hyperref-template): add placeholders for author and title > (org-latex-template): adjust default template with author and title You need full stops at the end of sentences, and upper case letters after the colons. > (defcustom org-latex-hyperref-template > - "\\hypersetup{\n pdfkeywords={%k},\n pdfsubject={%d},\n > pdfcreator={%c}}\n" > + "\\hypersetup{\n pdfkeywords={%k},\n pdfsubject={%d},\n > pdfcreator={%c},\n pdfauthor={%a},\n pdftitle={%t}}" Nitpick: the number of space characters after newline characters should be consistent, even though it wasn't the case before your patch. > + ?a (or (first (plist-get info :author)) "") > + ?t (or (first (plist-get info :title)) "") This part is buggy. Both (plist-get info :author) and (plist-get info :title) will return a "secondary list", which is a list of strings and syntax objects. You usually need to handle these with `org-export-data', not `first'. Alas, in this case, `org-export-data' may not be appropriate, as some objects should be exported differently in these keywords. For example, you may want to remove footnote references, radio-targets, targets, links and possibly any LaTeX markup (e.g., are "\textbf{bold}" macros allowed in these keywords?). The usual way to achieve this is to create an anonymous export back-end, derived from `latex', with `org-export-create-backend', and let it handle specially problematic objects. You then use it within `org-export-data-with-backend'. See `org-html--format-toc-headline' for an example. Regards, -- Nicolas Goaziou