emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] ox-latex: Add scrartcl LaTeX class
@ 2015-09-21 10:25 Sebastian Boehm
  2015-09-21 19:46 ` Nicolas Goaziou
  0 siblings, 1 reply; 19+ messages in thread
From: Sebastian Boehm @ 2015-09-21 10:25 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi Org mode devs,

I would like to propose adding the KOMA-script scrartcl class to the
list of supported ox-latex classes. scrartcl is one of the most
popular "article" alternatives out there and it would be great to be
able to pass org files using scrartcl to other Org mode users without
having to explain ox-latex custom settings.

The attached patch changes ox-latex.el to include scrartcl in org-latex-classes.

Best,
Sebastian

[-- Attachment #2: 0001-ox-latex-Add-scrartcl-LaTeX-class.patch --]
[-- Type: application/octet-stream, Size: 1277 bytes --]

From ea21629e1a6fe71f3d3a44fa1ce5e9668a8c3daa Mon Sep 17 00:00:00 2001
From: Sebastian Boehm <sebastian@sometimesfood.org>
Date: Mon, 21 Sep 2015 11:39:37 +0200
Subject: [PATCH] ox-latex: Add scrartcl LaTeX class

* lisp/ox-latex.el (org-latex-classes): Add scrartcl latex class.
---
 lisp/ox-latex.el | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index ddbbd33..3a04ebc 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -421,7 +421,14 @@ references."
      ("\\chapter{%s}" . "\\chapter*{%s}")
      ("\\section{%s}" . "\\section*{%s}")
      ("\\subsection{%s}" . "\\subsection*{%s}")
-     ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
+     ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
+    ("scrartcl"
+     "\\documentclass[11pt]{scrartcl}"
+     ("\\section{%s}" . "\\section*{%s}")
+     ("\\subsection{%s}" . "\\subsection*{%s}")
+     ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
+     ("\\paragraph{%s}" . "\\paragraph*{%s}")
+     ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
   "Alist of LaTeX classes and associated header and structure.
 If #+LATEX_CLASS is set in the buffer, use its value and the
 associated information.  Here is the structure of each cell:
-- 
2.5.3


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

* Re: [PATCH] ox-latex: Add scrartcl LaTeX class
  2015-09-21 10:25 [PATCH] ox-latex: Add scrartcl LaTeX class Sebastian Boehm
@ 2015-09-21 19:46 ` Nicolas Goaziou
  2015-09-21 21:45   ` Rasmus
                     ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Nicolas Goaziou @ 2015-09-21 19:46 UTC (permalink / raw)
  To: Sebastian Boehm; +Cc: emacs-orgmode

Hello,

Sebastian Boehm <sebastian@sometimesfood.org> writes:

> I would like to propose adding the KOMA-script scrartcl class to the
> list of supported ox-latex classes. scrartcl is one of the most
> popular "article" alternatives out there and it would be great to be
> able to pass org files using scrartcl to other Org mode users without
> having to explain ox-latex custom settings.
>
> The attached patch changes ox-latex.el to include scrartcl in
> org-latex-classes.

Thank you. But can't users needing a non-default class customize their
own `org-latex-classes? Or is there an entitling reason to offer it out
of the box?

Regards,

-- 
Nicolas Goaziou

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

* Re: [PATCH] ox-latex: Add scrartcl LaTeX class
  2015-09-21 19:46 ` Nicolas Goaziou
@ 2015-09-21 21:45   ` Rasmus
  2015-09-21 22:37     ` Suvayu Ali
  2015-09-22  7:20   ` Eric S Fraga
  2015-09-23 16:59   ` Sebastian Boehm
  2 siblings, 1 reply; 19+ messages in thread
From: Rasmus @ 2015-09-21 21:45 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Sebastian Boehm <sebastian@sometimesfood.org> writes:
>
>> I would like to propose adding the KOMA-script scrartcl class to the
>> list of supported ox-latex classes. scrartcl is one of the most
>> popular "article" alternatives out there and it would be great to be
>> able to pass org files using scrartcl to other Org mode users without
>> having to explain ox-latex custom settings.
>>
>> The attached patch changes ox-latex.el to include scrartcl in
>> org-latex-classes.
>
> Thank you. But can't users needing a non-default class customize their
> own `org-latex-classes? Or is there an entitling reason to offer it out
> of the box?

It's absolutely a much more pleasant experience than article, at least if
you agree with the KOMA-guys' margin opinion (e.g. top:bottom margin is
fixed at 1:2).  [I've been using the KOMA-bundle for years and years].

The patch is also subjective, e.g. it does not feature \minisec[.]{.}.

ox-koma-article.el would be awesome but until then, there's no point in
adding it.

Rasmus

-- 
I feel emotional landscapes they puzzle me

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

* Re: [PATCH] ox-latex: Add scrartcl LaTeX class
  2015-09-21 21:45   ` Rasmus
@ 2015-09-21 22:37     ` Suvayu Ali
  0 siblings, 0 replies; 19+ messages in thread
From: Suvayu Ali @ 2015-09-21 22:37 UTC (permalink / raw)
  To: emacs-orgmode

On Mon, Sep 21, 2015 at 11:45:08PM +0200, Rasmus wrote:
> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> 
> > Sebastian Boehm <sebastian@sometimesfood.org> writes:
> >
> >> I would like to propose adding the KOMA-script scrartcl class to the
> >> list of supported ox-latex classes. scrartcl is one of the most
> >> popular "article" alternatives out there and it would be great to be
> >> able to pass org files using scrartcl to other Org mode users without
> >> having to explain ox-latex custom settings.
> >>
> >> The attached patch changes ox-latex.el to include scrartcl in
> >> org-latex-classes.
> >
> > Thank you. But can't users needing a non-default class customize their
> > own `org-latex-classes? Or is there an entitling reason to offer it out
> > of the box?
> 
> It's absolutely a much more pleasant experience than article, at least if
> you agree with the KOMA-guys' margin opinion (e.g. top:bottom margin is
> fixed at 1:2).  [I've been using the KOMA-bundle for years and years].
> 
> The patch is also subjective, e.g. it does not feature \minisec[.]{.}.
> 
> ox-koma-article.el would be awesome but until then, there's no point in
> adding it.

I use scrartcl, but I think this should be left up to the end user.
ox-koma-article.el would be great though :).

-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: [PATCH] ox-latex: Add scrartcl LaTeX class
  2015-09-21 19:46 ` Nicolas Goaziou
  2015-09-21 21:45   ` Rasmus
@ 2015-09-22  7:20   ` Eric S Fraga
  2015-09-22 11:21     ` Rasmus
  2015-09-22 14:00     ` Grant Rettke
  2015-09-23 16:59   ` Sebastian Boehm
  2 siblings, 2 replies; 19+ messages in thread
From: Eric S Fraga @ 2015-09-22  7:20 UTC (permalink / raw)
  To: emacs-orgmode

On Monday, 21 Sep 2015 at 21:46, Nicolas Goaziou wrote:

[...]

> Thank you. But can't users needing a non-default class customize their
> own `org-latex-classes? Or is there an entitling reason to offer it out
> of the box?

Only that the koma-script classes are arguably better defaults than the
actual defaults...  Personally, I cannot see any reason to use the
standard article/report/letter classes!

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.1-239-gd01560

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

* Re: [PATCH] ox-latex: Add scrartcl LaTeX class
  2015-09-22  7:20   ` Eric S Fraga
@ 2015-09-22 11:21     ` Rasmus
  2015-09-22 15:33       ` Eric S Fraga
  2015-09-22 14:00     ` Grant Rettke
  1 sibling, 1 reply; 19+ messages in thread
From: Rasmus @ 2015-09-22 11:21 UTC (permalink / raw)
  To: emacs-orgmode

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

>> Thank you. But can't users needing a non-default class customize their
>> own `org-latex-classes? Or is there an entitling reason to offer it out
>> of the box?
>
> Only that the koma-script classes are arguably better defaults than the
> actual defaults...  Personally, I cannot see any reason to use the
> standard article/report/letter classes!

Key word being 'arguably'.  Some people might hate the margin choices to
the extend that they'd need geometry to make KOMA-script bearable.  Now we
have two new dependencies...

Rasmus

-- 
Need more coffee. . .

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

* Re: [PATCH] ox-latex: Add scrartcl LaTeX class
  2015-09-22  7:20   ` Eric S Fraga
  2015-09-22 11:21     ` Rasmus
@ 2015-09-22 14:00     ` Grant Rettke
  1 sibling, 0 replies; 19+ messages in thread
From: Grant Rettke @ 2015-09-22 14:00 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

On Tue, Sep 22, 2015 at 2:20 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
> On Monday, 21 Sep 2015 at 21:46, Nicolas Goaziou wrote:

> Only that the koma-script classes are arguably better defaults than the
> actual defaults...  Personally, I cannot see any reason to use the
> standard article/report/letter classes!

Good to know! I've never tried anything other than the default! :) Now
I'm curious.

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

* Re: [PATCH] ox-latex: Add scrartcl LaTeX class
  2015-09-22 11:21     ` Rasmus
@ 2015-09-22 15:33       ` Eric S Fraga
  2015-09-22 16:34         ` Rasmus
  0 siblings, 1 reply; 19+ messages in thread
From: Eric S Fraga @ 2015-09-22 15:33 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

On Tuesday, 22 Sep 2015 at 13:21, Rasmus wrote:
> Key word being 'arguably'.

indeed!

> Some people might hate the margin choices to the extend that they'd
> need geometry to make KOMA-script bearable.  Now we have two new
> dependencies...

yes.  The real question is not the dependencies but what would we like
new users to when they try exporting a document to PDF for the first
time?  Is the LaTeX default article good enough or would using koma
impress them more?  I don't know the answer to this...

For not so novice users, customising org-latex-classes is relatively
painless.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.1-239-gd01560

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

* Re: [PATCH] ox-latex: Add scrartcl LaTeX class
  2015-09-22 15:33       ` Eric S Fraga
@ 2015-09-22 16:34         ` Rasmus
  0 siblings, 0 replies; 19+ messages in thread
From: Rasmus @ 2015-09-22 16:34 UTC (permalink / raw)
  To: emacs-orgmode

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

>> Some people might hate the margin choices to the extend that they'd
>> need geometry to make KOMA-script bearable.  Now we have two new
>> dependencies...
>
> yes.  The real question is not the dependencies but what would we like
> new users to when they try exporting a document to PDF for the first
> time?  Is the LaTeX default article good enough or would using koma
> impress them more?  I don't know the answer to this...

Having to do a lot of work on a restricted system with e.g. a very old R,
I can tell you that dependencies matter!  I have to check dependencies and
install packages.

I'm not against ox-fancy-latex.el, but it's more work than adding
KOMA-scrip as a default class...

If we want to make a great first impression, libertine-pkg is more likely
to please drive-by testers than KOMA.

Rasmus


-- 
The Kids call him Billy the Saint

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

* Re: [PATCH] ox-latex: Add scrartcl LaTeX class
  2015-09-21 19:46 ` Nicolas Goaziou
  2015-09-21 21:45   ` Rasmus
  2015-09-22  7:20   ` Eric S Fraga
@ 2015-09-23 16:59   ` Sebastian Boehm
  2015-09-23 17:56     ` Thomas S. Dye
                       ` (2 more replies)
  2 siblings, 3 replies; 19+ messages in thread
From: Sebastian Boehm @ 2015-09-23 16:59 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Nicolas Goaziou

Hi Nicolas,

On 21 September 2015 at 21:46, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> But can't users needing a non-default class customize their
> own `org-latex-classes? Or is there an entitling reason to offer it out
> of the box?

you are of course right; users can always customise their own setup.
However, when sharing Org files with other people this kind of tight
coupling between the Org file and the user's Emacs configuration can
become quite problematic.

Granted, this is not a problem if you only work alone on all of your
projects, but it effectively prevents users from using document
classes other than the ones provided by Org mode for shared documents
(especially when sharing documents with less experienced users).

My intention was not to start a debate on "article" vs. "scrartcl",
but it would be great to see some more variety in the default document
classes or maybe even a way to specify the desired document class as
well as the desired sectioning style directly in an Org file without
having to rely on the document class definition being available in
another user's Emacs config.

Btw, since I am not on the list, it would be great if everybody could
CC me on replies.

Best,
Sebastian

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

* Re: [PATCH] ox-latex: Add scrartcl LaTeX class
  2015-09-23 16:59   ` Sebastian Boehm
@ 2015-09-23 17:56     ` Thomas S. Dye
  2015-09-23 18:16     ` Eric S Fraga
  2015-09-23 20:27     ` Rasmus
  2 siblings, 0 replies; 19+ messages in thread
From: Thomas S. Dye @ 2015-09-23 17:56 UTC (permalink / raw)
  To: Sebastian Boehm; +Cc: emacs-orgmode, Nicolas Goaziou

Aloha Sebastian,

Sebastian Boehm <sebastian@sometimesfood.org> writes:

> Hi Nicolas,
>
> On 21 September 2015 at 21:46, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>> But can't users needing a non-default class customize their
>> own `org-latex-classes? Or is there an entitling reason to offer it out
>> of the box?
>
> you are of course right; users can always customise their own setup.
> However, when sharing Org files with other people this kind of tight
> coupling between the Org file and the user's Emacs configuration can
> become quite problematic.
>
> Granted, this is not a problem if you only work alone on all of your
> projects, but it effectively prevents users from using document
> classes other than the ones provided by Org mode for shared documents
> (especially when sharing documents with less experienced users).
>
> My intention was not to start a debate on "article" vs. "scrartcl",
> but it would be great to see some more variety in the default document
> classes or maybe even a way to specify the desired document class as
> well as the desired sectioning style directly in an Org file without
> having to rely on the document class definition being available in
> another user's Emacs config.

Sharing documents that are highly configured, but don't rely on the
user's Emacs configuration, is one goal of "reproducible research"
carried out with Org mode.

In general, it is possible to move the configuration into the shared Org
mode document and then use Local Variables to load the configuration
when the document is opened, or when the user refreshes the setup.

The first step is to put the configuration into one or more Babel source
code blocks in the shared document and give each source code block a
name.  Then set up Local Variables to called the named source code
block(s) using the org-sbe (formerly, sbe) function.

Here is a fragment of the Local Variables section I'm using on a
self-contained Org mode document.

# Local Variables: 
# eval: (require 'ox-latex)
# org-hide-macro-markers: t
# org-entities-user: nil
# eval: (and (fboundp 'org-sbe) (not (fboundp 'sbe)) (fset 'sbe 'org-sbe))
# eval: (sbe "user-entities")
# End:

Where the source code block named "user-entities" is:

*** User Entities
The following source code block sets up user entities that are used frequently
in my work. I use the various =*macron= commands to typeset Hawaiian
language words with what is known in Hawaiian as a /kahak\omacron{}/.

#+name: user-entities
#+begin_src emacs-lisp
  (add-to-list 'org-entities-user '("amacron" "\\={a}" nil "&#0257" "a" "a" "ā"))
  (add-to-list 'org-entities-user '("emacron" "\\={e}" nil "&#0275" "e" "e" "ē"))
  (add-to-list 'org-entities-user '("imacron" "\\={\\i}" nil "&#0299" "i" "i" "ī"))
  (add-to-list 'org-entities-user '("omacron" "\\={o}" nil "&#0333" "o" "o" "ō"))
  (add-to-list 'org-entities-user '("umacron" "\\={u}" nil "&#0363" "u" "u" "ū"))
  (add-to-list 'org-entities-user '("Amacron" "\\={A}" nil "&#0256" "A" "A" "Ā"))
  (add-to-list 'org-entities-user '("Emacron" "\\={E}" nil "&#0274" "E" "E" "Ē"))
  (add-to-list 'org-entities-user '("Imacron" "\\={I}" nil "&#0298" "I" "I" "Ī"))
  (add-to-list 'org-entities-user '("Omacron" "\\={O}" nil "&#0332" "O" "O" "Ō"))
  (add-to-list 'org-entities-user '("Umacron" "\\={U}" nil "&#0362" "U" "U" "Ū"))
#+end_src

Let me know if you have questions.

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

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

* Re: [PATCH] ox-latex: Add scrartcl LaTeX class
  2015-09-23 16:59   ` Sebastian Boehm
  2015-09-23 17:56     ` Thomas S. Dye
@ 2015-09-23 18:16     ` Eric S Fraga
  2015-09-23 18:27       ` Ista Zahn
  2015-09-23 18:28       ` Thomas S. Dye
  2015-09-23 20:27     ` Rasmus
  2 siblings, 2 replies; 19+ messages in thread
From: Eric S Fraga @ 2015-09-23 18:16 UTC (permalink / raw)
  To: Sebastian Boehm; +Cc: emacs-orgmode

On Wednesday, 23 Sep 2015 at 18:59, Sebastian Boehm wrote:
> Hi Nicolas,
>
> On 21 September 2015 at 21:46, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>> But can't users needing a non-default class customize their
>> own `org-latex-classes? Or is there an entitling reason to offer it out
>> of the box?
>
> you are of course right; users can always customise their own setup.
> However, when sharing Org files with other people this kind of tight
> coupling between the Org file and the user's Emacs configuration can
> become quite problematic.

Yes, this is a real problem.

One solution, but not an ideal one, is to use file local variables to
define org-latex-classes (and any other variables) as appropriate for
the document.  It's not ideal because unfortunately most of org's
variables (as well as many of emacs's own) are "global" and hence affect
the functionality of org visiting other buffers.  I find myself having
separate emacs instances for some org files for this reason.

I had thought that maybe using #+bind: would solve this problem but the
export engine looks for the LaTeX class before binding takes effect.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-270-g256fef

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

* Re: [PATCH] ox-latex: Add scrartcl LaTeX class
  2015-09-23 18:16     ` Eric S Fraga
@ 2015-09-23 18:27       ` Ista Zahn
  2015-09-24 10:04         ` Eric S Fraga
  2015-09-23 18:28       ` Thomas S. Dye
  1 sibling, 1 reply; 19+ messages in thread
From: Ista Zahn @ 2015-09-23 18:27 UTC (permalink / raw)
  To: Sebastian Boehm, emacs-orgmode Mailinglist

On Wed, Sep 23, 2015 at 2:16 PM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
> On Wednesday, 23 Sep 2015 at 18:59, Sebastian Boehm wrote:
>> Hi Nicolas,
>>
>> On 21 September 2015 at 21:46, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>>> But can't users needing a non-default class customize their
>>> own `org-latex-classes? Or is there an entitling reason to offer it out
>>> of the box?
>>
>> you are of course right; users can always customise their own setup.
>> However, when sharing Org files with other people this kind of tight
>> coupling between the Org file and the user's Emacs configuration can
>> become quite problematic.
>
> Yes, this is a real problem.
>
> One solution, but not an ideal one, is to use file local variables to
> define org-latex-classes (and any other variables) as appropriate for
> the document.  It's not ideal because unfortunately most of org's
> variables (as well as many of emacs's own) are "global" and hence affect
> the functionality of org visiting other buffers.  I find myself having
> separate emacs instances for some org files for this reason.

Doesn't "setq-local" solve this problem?

>
> I had thought that maybe using #+bind: would solve this problem but the
> export engine looks for the LaTeX class before binding takes effect.
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-270-g256fef
>

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

* Re: [PATCH] ox-latex: Add scrartcl LaTeX class
  2015-09-23 18:16     ` Eric S Fraga
  2015-09-23 18:27       ` Ista Zahn
@ 2015-09-23 18:28       ` Thomas S. Dye
  1 sibling, 0 replies; 19+ messages in thread
From: Thomas S. Dye @ 2015-09-23 18:28 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode, Sebastian Boehm

Hi Eric,

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> One solution, but not an ideal one, is to use file local variables to
> define org-latex-classes (and any other variables) as appropriate for
> the document.  It's not ideal because unfortunately most of org's
> variables (as well as many of emacs's own) are "global" and hence affect
> the functionality of org visiting other buffers.  I find myself having
> separate emacs instances for some org files for this reason.

I've noticed this, too, but never investigated.

Is there some way to know which variables are "global" and which can be
set "locally"?

Also, (completely naively) is it difficult to make "global" variables
"local", or is it something simple, like making a function interactive?  

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

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

* Re: [PATCH] ox-latex: Add scrartcl LaTeX class
  2015-09-23 16:59   ` Sebastian Boehm
  2015-09-23 17:56     ` Thomas S. Dye
  2015-09-23 18:16     ` Eric S Fraga
@ 2015-09-23 20:27     ` Rasmus
  2015-09-23 20:56       ` Nicolas Goaziou
  2 siblings, 1 reply; 19+ messages in thread
From: Rasmus @ 2015-09-23 20:27 UTC (permalink / raw)
  To: emacs-orgmode

Sebastian Boehm <sebastian@sometimesfood.org> writes:
> My intention was not to start a debate on "article" vs. "scrartcl",
> but it would be great to see some more variety in the default document
> classes or maybe even a way to specify the desired document class as
> well as the desired sectioning style directly in an Org file without
> having to rely on the document class definition being available in
> another user's Emacs config.

The long-term solution to this is a new "bundled org" file format
containing dependencies, such as org files, init.el etc.

    https://lists.gnu.org/archive/html/emacs-orgmode/2015-02/msg00765.html

Rasmus

-- 
Got mashed potatoes. Ain't got no T-Bone. No T-Bone

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

* Re: [PATCH] ox-latex: Add scrartcl LaTeX class
  2015-09-23 20:27     ` Rasmus
@ 2015-09-23 20:56       ` Nicolas Goaziou
  2015-09-23 21:27         ` Rasmus
  0 siblings, 1 reply; 19+ messages in thread
From: Nicolas Goaziou @ 2015-09-23 20:56 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

Hello,

Rasmus <rasmus@gmx.us> writes:

> The long-term solution to this is a new "bundled org" file format
> containing dependencies, such as org files, init.el etc.
>
>     https://lists.gnu.org/archive/html/emacs-orgmode/2015-02/msg00765.html

This was just an idea, not a long-term solution or a plan. Actually,
using Babel, you may not even need to introduce a new file format, since
a document can generate its own set-up.


Regards,

-- 
Nicolas Goaziou

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

* Re: [PATCH] ox-latex: Add scrartcl LaTeX class
  2015-09-23 20:56       ` Nicolas Goaziou
@ 2015-09-23 21:27         ` Rasmus
  0 siblings, 0 replies; 19+ messages in thread
From: Rasmus @ 2015-09-23 21:27 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Rasmus <rasmus@gmx.us> writes:
>
>> The long-term solution to this is a new "bundled org" file format
>> containing dependencies, such as org files, init.el etc.
>>
>>     https://lists.gnu.org/archive/html/emacs-orgmode/2015-02/msg00765.html
>
> This was just an idea, not a long-term solution or a plan. Actually,
> using Babel, you may not even need to introduce a new file format, since
> a document can generate its own set-up.

I know.  I still think it's a great idea.  It also nice for pictures, css
etc.

-- 
Dung makes an excellent fertilizer

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

* Re: [PATCH] ox-latex: Add scrartcl LaTeX class
  2015-09-23 18:27       ` Ista Zahn
@ 2015-09-24 10:04         ` Eric S Fraga
  2015-09-27 13:47           ` Sebastian Boehm
  0 siblings, 1 reply; 19+ messages in thread
From: Eric S Fraga @ 2015-09-24 10:04 UTC (permalink / raw)
  To: Ista Zahn; +Cc: emacs-orgmode Mailinglist, Sebastian Boehm

On Wednesday, 23 Sep 2015 at 14:27, Ista Zahn wrote:
> On Wed, Sep 23, 2015 at 2:16 PM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:

[...]

>> One solution, but not an ideal one, is to use file local variables to
>> define org-latex-classes (and any other variables) as appropriate for
>> the document.  It's not ideal because unfortunately most of org's
>> variables (as well as many of emacs's own) are "global" and hence affect
>> the functionality of org visiting other buffers.  I find myself having
>> separate emacs instances for some org files for this reason.
>
> Doesn't "setq-local" solve this problem?

Seems to!  Thanks.  I have done the following:
#+begin_src org
  ,#+title: Testing setq-loccal
  ,#+latex_class: esftest
  ,* settings                                                                      :noexport:
  ,#+name: startup
  ,#+begin_src emacs-lisp :results none
    (setq-local org-latex-classes '(("esftest" "\\documentclass{scrartcl}" ("\\section*{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))))
  ,#+end_src

  # Local Variables:
  # eval: (esf/execute-startup-block)
  # End:
#+end_src
where esf/execute-startup-block executes the src block named "startup".

The issue is complicated by the fact that exporters generate a new
buffer which has its own variables (hence the use of #+bind:) so some
variables should be set using bind but others potentially using
setq-local.

Thanks again,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.1-203-g4ca3d3

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

* Re: [PATCH] ox-latex: Add scrartcl LaTeX class
  2015-09-24 10:04         ` Eric S Fraga
@ 2015-09-27 13:47           ` Sebastian Boehm
  0 siblings, 0 replies; 19+ messages in thread
From: Sebastian Boehm @ 2015-09-27 13:47 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist

Hi,

On 24 September 2015 at 12:04, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
> I have done the following:
> […]

thanks for all the great suggestions! I haven't had the opportunity to
try out all proposed solutions yet, but Eric's snippet looks like a
great way to tackle my initial problem.

Best,
Sebastian

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

end of thread, other threads:[~2015-09-27 13:47 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-21 10:25 [PATCH] ox-latex: Add scrartcl LaTeX class Sebastian Boehm
2015-09-21 19:46 ` Nicolas Goaziou
2015-09-21 21:45   ` Rasmus
2015-09-21 22:37     ` Suvayu Ali
2015-09-22  7:20   ` Eric S Fraga
2015-09-22 11:21     ` Rasmus
2015-09-22 15:33       ` Eric S Fraga
2015-09-22 16:34         ` Rasmus
2015-09-22 14:00     ` Grant Rettke
2015-09-23 16:59   ` Sebastian Boehm
2015-09-23 17:56     ` Thomas S. Dye
2015-09-23 18:16     ` Eric S Fraga
2015-09-23 18:27       ` Ista Zahn
2015-09-24 10:04         ` Eric S Fraga
2015-09-27 13:47           ` Sebastian Boehm
2015-09-23 18:28       ` Thomas S. Dye
2015-09-23 20:27     ` Rasmus
2015-09-23 20:56       ` Nicolas Goaziou
2015-09-23 21:27         ` Rasmus

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).