all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Help understanding what's imported from a #+SETUPFILE file
@ 2016-02-12 20:02 Kaushal Modi
  2016-02-12 20:11 ` Kaushal Modi
  0 siblings, 1 reply; 6+ messages in thread
From: Kaushal Modi @ 2016-02-12 20:02 UTC (permalink / raw)
  To: emacs-org list

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

Hi,

I have a common setup file for all my org files which configure the way the
latex and HTML files are exported.

#+SETUPFILE: ~/org/common/config.org

One of the snippets in my config.org is

# Allow multi-page code listings by wrapping the `minted' environment with
`mdframed' environment
# http://tex.stackexchange.com/a/30524/52678
#+LaTeX_HEADER: \usepackage{mdframed}
#+LaTeX_HEADER: \mdfsetup{%
#+LaTeX_HEADER: topline=true, bottomline=true,leftline=true,
rightline=true, %
#+LaTeX_HEADER: innerleftmargin=15pt, %
#+LaTeX_HEADER: leftmargin=-5pt, %
#+LaTeX_HEADER: rightmargin=-5pt, %
#+LaTeX_HEADER: linewidth=1pt, backgroundcolor=yellow!20!white %
#+LaTeX_HEADER: }

#+LaTeX: \BeforeBeginEnvironment{minted}{\begin{mdframed}}
#+LaTeX: \AfterEndEnvironment{minted}{\end{mdframed}}

The #+LaTeX_HEADER lines get imported into the exported .tex file but the
#+LaTeX lines do not.

From "C-h i g (org) In-buffer settings", I see that

‘#+SETUPFILE: file’
     This line defines a file that holds more in-buffer setup.  Normally
     this is entirely ignored.  Only when the buffer is parsed for
     option-setting lines (i.e., when starting Org mode for a file, when
     pressing ‘C-c C-c’ in a settings line, or when exporting), then the
     contents of this file are parsed as if they had been included in
     the buffer.  In particular, the file can be any other Org mode file
     with internal setup.  You can visit the file the cursor is in the
     line with ‘C-c '’.

But I did not find anything that explains which "#+" lines from SETUPFILE
are ignored.

I thought of using #+SETUPFILE as a clean way to import a common org setup
for exports. But should #+INCLUDE be used in this case instead?

Or what method would you guys suggest (may be using some elisp) so that I
do not need to manually enter the below in all my org files.

#+LaTeX: \BeforeBeginEnvironment{minted}{\begin{mdframed}}
#+LaTeX: \AfterEndEnvironment{minted}{\end{mdframed}}


--
Kaushal Modi

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-02-12 23:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-12 20:02 Help understanding what's imported from a #+SETUPFILE file Kaushal Modi
2016-02-12 20:11 ` Kaushal Modi
2016-02-12 20:50   ` Eric S Fraga
2016-02-12 22:47   ` Nicolas Goaziou
2016-02-12 23:02     ` Kaushal Modi
2016-02-12 23:35       ` Nicolas Goaziou

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.