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 <e.fr...@ucl.ac.uk> wrote:

> #+include: settings.org


On Thu, Jul 21, 2016 at 7:10 AM Xebar Saram <zelt...@gmail.com> 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