From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Help understanding what's imported from a #+SETUPFILE file Date: Fri, 12 Feb 2016 15:02:53 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1148f3226a6577052b98298c Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUJwF-0004fC-T3 for emacs-orgmode@gnu.org; Fri, 12 Feb 2016 15:03:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUJwE-0000wE-Ie for emacs-orgmode@gnu.org; Fri, 12 Feb 2016 15:03:35 -0500 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]:34365) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUJwE-0000wA-7v for emacs-orgmode@gnu.org; Fri, 12 Feb 2016 15:03:34 -0500 Received: by mail-wm0-x229.google.com with SMTP id 128so76254675wmz.1 for ; Fri, 12 Feb 2016 12:03:34 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-org list --001a1148f3226a6577052b98298c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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=3Dtrue, bottomline=3Dtrue,leftline=3Dtrue, rightline=3Dtrue, % #+LaTeX_HEADER: innerleftmargin=3D15pt, % #+LaTeX_HEADER: leftmargin=3D-5pt, % #+LaTeX_HEADER: rightmargin=3D-5pt, % #+LaTeX_HEADER: linewidth=3D1pt, backgroundcolor=3Dyellow!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 =E2=80=98#+SETUPFILE: file=E2=80=99 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 =E2=80=98C-c C-c=E2=80=99 in a settings line, or when exporti= ng), 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 =E2=80=98C-c '=E2=80=99. 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 --001a1148f3226a6577052b98298c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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: \mdfs= etup{%
#+LaTeX_HEADER: topline=3Dtrue, bottomline=3Dtrue,leftline= =3Dtrue, rightline=3Dtrue, %
#+LaTeX_HEADER: innerleftmargin=3D15= pt, %
#+LaTeX_HEADER: leftmargin=3D-5pt, %
#+LaTeX_= HEADER: rightmargin=3D-5pt, %
#+LaTeX_HEADER: linewidth=3D1pt, ba= ckgroundcolor=3Dyellow!20!white %
#+LaTeX_HEADER: }
#+LaTeX: \BeforeBeginEnvironment{minted}{\begin{mdframed}}
<= /div>
#+LaTeX: \AfterEndEnvironment{minted}{\end{mdframed}}
<= br>
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 setting= s", I see that

=E2=80=98#+SETUPFILE: file=E2=80=99
=C2=A0= =C2=A0 =C2=A0This line defines a file that holds more in-buffer setup.=C2= =A0 Normally
=C2=A0 =C2=A0 =C2=A0this is entirely ign= ored.=C2=A0 Only when the buffer is parsed for
=C2=A0= =C2=A0 =C2=A0option-setting lines (i.e., when starting Org mode for a file= , when
=C2=A0 =C2=A0 =C2=A0pressing =E2=80=98C-c C-c= =E2=80=99 in a settings line, or when exporting), then the
=C2=A0 =C2=A0 =C2=A0contents of this file are parsed as if they had b= een included in
=C2=A0 =C2=A0 =C2=A0the buffer.=C2=A0= In particular, the file can be any other Org mode file
=C2=A0 =C2=A0 =C2=A0with internal setup.=C2=A0 You can visit the file th= e cursor is in the
=C2=A0 =C2=A0 =C2=A0line with =E2= =80=98C-c '=E2=80=99.

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

I thought of using #+SETUPFILE as a clea= n way to import a common org setup for exports. But should #+INCLUDE be use= d in this case instead?

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

#+LaTeX: \B= eforeBeginEnvironment{minted}{\begin{mdframed}}
#+LaTeX: \Aft= erEndEnvironment{minted}{\end{mdframed}}

--
Kaushal Modi
--001a1148f3226a6577052b98298c--