From: Thomas S. Dye <tsd@tsdye.com>
To: Sebastian Boehm <sebastian@sometimesfood.org>
Cc: emacs-orgmode@gnu.org, Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: [PATCH] ox-latex: Add scrartcl LaTeX class
Date: Wed, 23 Sep 2015 07:56:43 -1000 [thread overview]
Message-ID: <m237y5ow84.fsf@tsdye.com> (raw)
In-Reply-To: <CAPNHJwHJZOFWD1_FM3NBTXYEo3+EBge-u72QYVxWGtwQVjaB4Q@mail.gmail.com>
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 "ā" "a" "a" "ā"))
(add-to-list 'org-entities-user '("emacron" "\\={e}" nil "ē" "e" "e" "ē"))
(add-to-list 'org-entities-user '("imacron" "\\={\\i}" nil "ī" "i" "i" "ī"))
(add-to-list 'org-entities-user '("omacron" "\\={o}" nil "ō" "o" "o" "ō"))
(add-to-list 'org-entities-user '("umacron" "\\={u}" nil "ū" "u" "u" "ū"))
(add-to-list 'org-entities-user '("Amacron" "\\={A}" nil "Ā" "A" "A" "Ā"))
(add-to-list 'org-entities-user '("Emacron" "\\={E}" nil "Ē" "E" "E" "Ē"))
(add-to-list 'org-entities-user '("Imacron" "\\={I}" nil "Ī" "I" "I" "Ī"))
(add-to-list 'org-entities-user '("Omacron" "\\={O}" nil "Ō" "O" "O" "Ō"))
(add-to-list 'org-entities-user '("Umacron" "\\={U}" nil "Ū" "U" "U" "Ū"))
#+end_src
Let me know if you have questions.
hth,
Tom
--
Thomas S. Dye
http://www.tsdye.com
next prev parent reply other threads:[~2015-09-23 17:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=m237y5ow84.fsf@tsdye.com \
--to=tsd@tsdye.com \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
--cc=sebastian@sometimesfood.org \
/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).