emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] orgmode read/source all options from a template file?


From: Kaushal Modi
Subject: Re: [O] orgmode read/source all options from a template file?
Date: Thu, 21 Jul 2016 15:34:14 +0000

I prefer #+SETUPFILE because the beauty is that that option is specific to loading a common org setup file. 

I have my config.org beautifully organized as:

=====
* Latex Setup
** Change default font
Note that fontspec works with only xelatex (not pdflatex).
#+LaTeX_HEADER: \usepackage{fontspec}
#+LaTeX_HEADER: \setmainfont[Ligatures=TeX]{Linux Libertine O}
#+LaTeX_HEADER: \setmonofont[Scale=0.8]{Inconsolata-g}
** Sans serif fonts for section titles
#+LaTeX_HEADER: \usepackage{titlesec}
*** Formatting =section= titles
#+LaTeX_HEADER: \titleformat{\section}
#+LaTeX_HEADER:   [hang] % titleformat shape
#+LaTeX_HEADER:   {\usefont{T1}{qhv}{b}{n}\selectfont\Large} % titleformat format "qhv" - TeX Gyre Heros, "b" - bold
#+LaTeX_HEADER:   {\thesection} % titleformat label
#+LaTeX_HEADER:   {0.6em} % titleformat separation
#+LaTeX_HEADER:   {} % code preceeding title body
*** Formatting =subsection= titles
#+LaTeX_HEADER: \titleformat{\subsection}
#+LaTeX_HEADER:   [hang]           % titleformat shape
#+LaTeX_HEADER:   {\bfseries\large}  % titleformat format
#+LaTeX_HEADER:   {\thesubsection} % titleformat label
#+LaTeX_HEADER:   {0.4em}          % titleformat separation
#+LaTeX_HEADER:   {}               % code preceeding title body
*** TODO Look into using the =sectsty= package instead of =titlesec= because of its compatibility issues with =hyperref=
[[http://tex.stackexchange.com/a/74517/52678][Reference]]
<snip>
=====

The awesome thing is that org will load only the "setup" stuff from a SETUPFILE file.. so it will pick up the #+LaTeX_HEADER lines from above, but not "* Latex Setup" or "** Change default font" or other things.

Basically, only special comments will be read from SETUPFILE.  


On Thu, Jul 21, 2016 at 11:24 AM Eric S Fraga <address@hidden> wrote:
#+include: settings.org

On Thu, Jul 21, 2016 at 7:10 AM Xebar Saram <address@hidden> wrote:
Ok got it, you can "source" a template file by using the SETUPFILE option , ie;

#+SETUPFILE: /home/zeltak/org/files/Uni/Courses/templates/org.options.reveal.org
--

Kaushal Modi


reply via email to

[Prev in Thread] Current Thread [Next in Thread]