0

I have two questions for exporting org file to PDF:

  1. I would like not to open Org Export Dispatcher when my org file export to pdf through LaTeX. I checked the manual, then I found the following:

    When the variable org-export-dispatch-use-expert-ui is set to a non-nil value, Org prompts in the minibuffer.

So, I set the following at my init.el. But it does not work. Are there any wrong for this setting?

(setq org-export-dispatch-use-expert-ui t)
  1. To export a org file to a PDF file, I have to type C-c C-e C-l C-O. I don't like this key binding because of too much typing. Could you help me to set a concise keybinding?
| improve this question | | | | |
  • Check the value with C-h v org-export-dispatch-use-expert-ui RET: is the value t as you expect? AFAICT, it works fine: I get the list of options in the minibuffer where I can choose l o to export to PDF. BTW, to get a PDF you have to type C-c C-e l o - the last two are not control chars. And C-c C-e l O is for Beamer export. – NickD Mar 17 at 19:48
1

For part 2), you can go directly to the export function of interest and bind it to any key you want, e.g a function key, say F8:

(define-key org-mode-map [f8] (lambda () (interactive) (org-open-file (org-latex-export-to-pdf))))

Here we have to combine a couple of functions to do the export and then the open of the resulting PDF file. Note also that we have to label the function as interactive i.e. make it a command. And finally, note that you lose the ability to select options (line async, subtree etc.) which the dispatcher allows you to use with an export: those are passed as optional arguments to org-latex-export-to-pdf by the dispatcher, but the above passes no arguments at all.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.