emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Eric S Fraga <e.fraga@ucl.ac.uk>, Xebar Saram <zeltakc@gmail.com>,
	org mode <emacs-orgmode@gnu.org>
Subject: Re: orgmode read/source all options from a template file?
Date: Thu, 21 Jul 2016 15:34:14 +0000	[thread overview]
Message-ID: <CAFyQvY2rRKWg_5bxYMYvJ7q8prTbJddt4qui1zx3wRxfgtmMJQ@mail.gmail.com> (raw)
In-Reply-To: <87h9bj3xi6.fsf@ucl.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 2083 bytes --]

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

> #+include: settings.org


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

[-- Attachment #2: Type: text/html, Size: 3556 bytes --]

  reply	other threads:[~2016-07-21 15:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <c8421cb361a34795ba4519c181b42ac5@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-07-21 13:56 ` orgmode read/source all options from a template file? Eric S Fraga
2016-07-21 15:34   ` Kaushal Modi [this message]
2016-07-21 10:15 Xebar Saram
2016-07-21 11:08 ` Xebar Saram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFyQvY2rRKWg_5bxYMYvJ7q8prTbJddt4qui1zx3wRxfgtmMJQ@mail.gmail.com \
    --to=kaushal.modi@gmail.com \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=zeltakc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).