I use a template for my work. It contains following options. Can I put those in .emacs file.

#+OPTIONS: num:nil; p:t 
#+OPTIONS: toc:nil 
#+LATEX_HEADER: \pagenumbering{}
#+LATEX_HEADER: \usepackage[a4paper, top=42mm, right=2cm, bottom=1.5cm]{geometry} 

Maybe not exactly what you are expecting as not in .emacs file, but in another Org file, the solution I use for a long time is to use #+SETUPFILE:

In your .org files:

#+SETUPFILE: path_to_your_setup/setupFile.org
#+TITLE: My Org document

In the path_to_your_setup/ directory (your project root for instance), my setupFile.org is:

#+OPTIONS: H:3 toc:t num:t \n:nil ::t |:t ^:nil -:t f:t *:t tex:t d:t tags:not-in-toc
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="http://orgmode.org/worg/style/worg.css"/>
#+HTML_HEAD: <style type="text/css">body{ max-width:80%; }</style>
#+INFOJS_OPT: view:showall mouse:underline path:http://orgmode.org/org-info.js home:theindex.html 

but you can adapt it according to your needs.

  • 1
    This is a good method as the syntax is preserved. – Andrew Swann Dec 20 '17 at 9:47

If you want text inserted automatically when you first visit a new file, you can use the autoinsert package. I use it for org files exactly the way you want.


You can define your own latex document classes in your .emacs file. This uses pure latex syntax and you add the definitions to the org variable org-latex-classes. This blog post explains this approach well.

In addition, I use abbrev to quickly insert org header lines to documents. The following lines in abbrev_devs under org-mode-abbrev-table make it easy to start using my custom class as well as disable header numbering and toc.

("oarticle" "#+LATEX_CLASS: fu-org-article" nil 0)
("otoc" "#+OPTIONS: toc:nil num:nil" nil 0)

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.