* orgmode read/source all options from a template file?
@ 2016-07-21 10:15 Xebar Saram
2016-07-21 11:08 ` Xebar Saram
0 siblings, 1 reply; 4+ messages in thread
From: Xebar Saram @ 2016-07-21 10:15 UTC (permalink / raw)
To: org mode
[-- Attachment #1: Type: text/plain, Size: 632 bytes --]
Hi all
i was wondering if orgmode had a simple way to read/source all options from
a template file. for example instead of adding all this to every
presentation file i create:
#+OPTIONS: reveal_center:t reveal_progress:t reveal_history:nil
reveal_control:t
#+OPTIONS: reveal_center:t
#+OPTIONS: reveal_rolling_links:t reveal_keyboard:t reveal_overview:t
num:nil
#+OPTIONS: reveal_width:1200 reveal_height:800
#+OPTIONS: toc:nil
# #+REVEAL: split
#+REVEAL_MARGIN: 0.1
#+REVEAL_MIN_SCALE: 0.5
i would just source a file (txt or orgmode?) with all the pre definitions
any clue?
thx
Z
[-- Attachment #2: Type: text/html, Size: 909 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: orgmode read/source all options from a template file?
2016-07-21 10:15 orgmode read/source all options from a template file? Xebar Saram
@ 2016-07-21 11:08 ` Xebar Saram
0 siblings, 0 replies; 4+ messages in thread
From: Xebar Saram @ 2016-07-21 11:08 UTC (permalink / raw)
To: org mode
[-- Attachment #1: Type: text/plain, Size: 923 bytes --]
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
best
z
On Thu, Jul 21, 2016 at 1:15 PM, Xebar Saram <zeltakc@gmail.com> wrote:
> Hi all
>
> i was wondering if orgmode had a simple way to read/source all options
> from a template file. for example instead of adding all this to every
> presentation file i create:
>
> #+OPTIONS: reveal_center:t reveal_progress:t reveal_history:nil
> reveal_control:t
> #+OPTIONS: reveal_center:t
> #+OPTIONS: reveal_rolling_links:t reveal_keyboard:t reveal_overview:t
> num:nil
> #+OPTIONS: reveal_width:1200 reveal_height:800
> #+OPTIONS: toc:nil
> # #+REVEAL: split
> #+REVEAL_MARGIN: 0.1
> #+REVEAL_MIN_SCALE: 0.5
>
> i would just source a file (txt or orgmode?) with all the pre definitions
>
> any clue?
>
> thx
>
> Z
>
[-- Attachment #2: Type: text/html, Size: 1522 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: orgmode read/source all options from a template file?
[not found] <c8421cb361a34795ba4519c181b42ac5@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2016-07-21 13:56 ` Eric S Fraga
2016-07-21 15:34 ` Kaushal Modi
0 siblings, 1 reply; 4+ messages in thread
From: Eric S Fraga @ 2016-07-21 13:56 UTC (permalink / raw)
To: Xebar Saram; +Cc: org mode
On Thursday, 21 Jul 2016 at 11:15, Xebar Saram wrote:
> Hi all
>
> i was wondering if orgmode had a simple way to read/source all options
> from a template file. for example instead of adding all this to every
> presentation file i create:
#+include: settings.org
--
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.2-164-g50a182
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: orgmode read/source all options from a template file?
2016-07-21 13:56 ` Eric S Fraga
@ 2016-07-21 15:34 ` Kaushal Modi
0 siblings, 0 replies; 4+ messages in thread
From: Kaushal Modi @ 2016-07-21 15:34 UTC (permalink / raw)
To: Eric S Fraga, Xebar Saram, org mode
[-- 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 --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-21 15:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-21 10:15 orgmode read/source all options from a template file? Xebar Saram
2016-07-21 11:08 ` Xebar Saram
[not found] <c8421cb361a34795ba4519c181b42ac5@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-07-21 13:56 ` Eric S Fraga
2016-07-21 15:34 ` Kaushal Modi
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).