emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* An Org-mode LaTeX class?
@ 2014-10-28  1:37 Marcin Borkowski
  2014-10-28  8:02 ` Fabrice Popineau
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Marcin Borkowski @ 2014-10-28  1:37 UTC (permalink / raw)
  To: Org-Mode mailing list

Hi all,

I have a dream;-).

Imagine someone wrote a dedicated Org-mode LaTeX class, and the LaTeX
exporter got an option to export to this class.  The class modifies
LaTeX so that it supports all Org's elements and objects, and things
like tags, timestamps, checkboxes etc.  Moreover, the look of these
elements is configurable on the LaTeX end, and further by means of Org
options.  This way, we drop the "generic LaTeX" thing (which is nice for
people sending articles to journals etc. – so my dream should not
replace the current LaTeX exporter, only constitute a variant!), but
instead we gain a beautiful, configurable pdf rendering of Org buffers.

What do you think?

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University

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

* Re: An Org-mode LaTeX class?
  2014-10-28  1:37 An Org-mode LaTeX class? Marcin Borkowski
@ 2014-10-28  8:02 ` Fabrice Popineau
  2014-10-28  9:49   ` Mike McLean
  2014-10-28  9:15 ` Thorsten Jolitz
  2014-10-28  9:54 ` Rasmus
  2 siblings, 1 reply; 6+ messages in thread
From: Fabrice Popineau @ 2014-10-28  8:02 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: Org-Mode mailing list

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

I think that I don't know if you can suit everybody's need but that is
worth a try.
For myself, I already wrote a dedicated LaTeX class, because it was too
cumbersome
to configure org-mode for the different kind of documents I need to produce
(not impossible, just too lengthy to duplicate parameters).
Hence, I have a class that can output exams, lab sessions texts, course
notes and slides
with only a couple of options. And I export only subtrees that are
configured for
this class. it took a bit of time, but it definitely worth it.

Fabrice


2014-10-28 2:37 GMT+01:00 Marcin Borkowski <mbork@wmi.amu.edu.pl>:

> Hi all,
>
> I have a dream;-).
>
> Imagine someone wrote a dedicated Org-mode LaTeX class, and the LaTeX
> exporter got an option to export to this class.  The class modifies
> LaTeX so that it supports all Org's elements and objects, and things
> like tags, timestamps, checkboxes etc.  Moreover, the look of these
> elements is configurable on the LaTeX end, and further by means of Org
> options.  This way, we drop the "generic LaTeX" thing (which is nice for
> people sending articles to journals etc. – so my dream should not
> replace the current LaTeX exporter, only constitute a variant!), but
> instead we gain a beautiful, configurable pdf rendering of Org buffers.
>
> What do you think?
>
> --
> Marcin Borkowski
> http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
> Adam Mickiewicz University
>
>


-- 
Fabrice Popineau
-----------------------------
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
------------------------------

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

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

* Re: An Org-mode LaTeX class?
  2014-10-28  1:37 An Org-mode LaTeX class? Marcin Borkowski
  2014-10-28  8:02 ` Fabrice Popineau
@ 2014-10-28  9:15 ` Thorsten Jolitz
  2014-10-28  9:54 ` Rasmus
  2 siblings, 0 replies; 6+ messages in thread
From: Thorsten Jolitz @ 2014-10-28  9:15 UTC (permalink / raw)
  To: emacs-orgmode

Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:

> Imagine someone wrote a dedicated Org-mode LaTeX class, and the LaTeX
> exporter got an option to export to this class.  The class modifies
> LaTeX so that it supports all Org's elements and objects, and things
> like tags, timestamps, checkboxes etc.  Moreover, the look of these
> elements is configurable on the LaTeX end, and further by means of Org
> options.  This way, we drop the "generic LaTeX" thing (which is nice for
> people sending articles to journals etc. – so my dream should not
> replace the current LaTeX exporter, only constitute a variant!), but
> instead we gain a beautiful, configurable pdf rendering of Org buffers.
>
> What do you think?

Make sure to have a look at expl3 (and others like e.g. xparse and
xstring) package, i.e. upcoming LaTeX 3, before writing this class,
because as a programming language the new version seems highly superior,
and will most likely result in much cleaner and more readable code.

Its well documented, search for 'The LaTeX 3 Interface' and 'The expl3
Package and LaTeX 3 Programming'. 

-- 
cheers,
Thorsten

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

* Re: An Org-mode LaTeX class?
  2014-10-28  8:02 ` Fabrice Popineau
@ 2014-10-28  9:49   ` Mike McLean
  0 siblings, 0 replies; 6+ messages in thread
From: Mike McLean @ 2014-10-28  9:49 UTC (permalink / raw)
  To: Fabrice Popineau; +Cc: Org-Mode mailing list, Marcin Borkowski

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

On Tue, Oct 28, 2014 at 4:02 AM, Fabrice Popineau <
fabrice.popineau@supelec.fr> wrote:

> I think that I don't know if you can suit everybody's need but that is
> worth a try.
> For myself, I already wrote a dedicated LaTeX class, because it was too
> cumbersome
> to configure org-mode for the different kind of documents I need to produce
> (not impossible, just too lengthy to duplicate parameters).
>

I did something similar, for similar reasons. I found it easier to make a
LaTeX Template look like what I wanted than to force Org into generating
LaTeX that was what I wanted.


> Hence, I have a class that can output exams, lab sessions texts, course
> notes and slides
> with only a couple of options.
>

I haven't done slides yet, because I've not picked up Beamer and my
approach was more branding. I have once class that brand-matches my primary
employer (Font, logo usage, etc.), another one that matches one of my large
volunteer efforts, and yet another generic “personal” one for “my”
documents.


> And I export only subtrees that are configured for
> this class. it took a bit of time, but it definitely worth it.
>

Agreed


>
> 2014-10-28 2:37 GMT+01:00 Marcin Borkowski <mbork@wmi.amu.edu.pl>:
>
>> Hi all,
>>
>> I have a dream;-).
>>
>> Imagine someone wrote a dedicated Org-mode LaTeX class, and the LaTeX
>> exporter got an option to export to this class.  The class modifies
>> LaTeX so that it supports all Org's elements and objects, and things
>> like tags, timestamps, checkboxes etc.  Moreover, the look of these
>> elements is configurable on the LaTeX end, and further by means of Org
>> options.  This way, we drop the "generic LaTeX" thing (which is nice for
>> people sending articles to journals etc. – so my dream should not
>> replace the current LaTeX exporter, only constitute a variant!), but
>> instead we gain a beautiful, configurable pdf rendering of Org buffers.
>>
>>
Though I'll admit this does sound intriguing.

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

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

* Re: An Org-mode LaTeX class?
  2014-10-28  1:37 An Org-mode LaTeX class? Marcin Borkowski
  2014-10-28  8:02 ` Fabrice Popineau
  2014-10-28  9:15 ` Thorsten Jolitz
@ 2014-10-28  9:54 ` Rasmus
  2014-10-28 17:38   ` Thomas S. Dye
  2 siblings, 1 reply; 6+ messages in thread
From: Rasmus @ 2014-10-28  9:54 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: tsd

Hi Marcin,

Thanks for sharing your ideas.

Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:

> Imagine someone wrote a dedicated Org-mode LaTeX class, and the LaTeX
> exporter got an option to export to this class.  The class modifies
> LaTeX so that it supports all Org's elements and objects, and things
> like tags, timestamps, checkboxes etc.

Honestly, a patch or an exact bug report would be great.  If something
is not right it should be fixed across all backends.  That being said,
at least cheackboxes are pretty pretty these days

(checkbox (case (org-element-property :checkbox item)
		     (on "$\\boxtimes$ ")
		     (off "$\\square$ ")
		     (trans "$\\boxminus$ ")))

It would be nice to format all timestamps using strftime-like syntax.

> Moreover, the look of these elements is configurable on the LaTeX
> end, and further by means of Org options.  This way, we drop the
> "generic LaTeX" thing (which is nice for people sending articles to
> journals etc. – so my dream should not replace the current LaTeX
> exporter, only constitute a variant!), but instead we gain a
> beautiful, configurable pdf rendering of Org buffers.

Thomas S. Dye tried it back in the days.  It was called org-article¹.
I'm sure he will share his experience here eventually.

In general, if you want to pursuit this, I would advice you to look
into derived classes, ox and ox-latex.  In ox-latex search for
org-export-define-backend and note how each element is "translated"
using a functinon.  From the sound of your project you will want to
tune some of them, and change the default class (for the latter point
see ox-koma-letter).

I think you will have a easier time today than Thomas' had, since ox
and org-element is so modual and easy to work with.

Two good examples of ox-latex derived backends are ox-beamer.el and
ox-koma-letter.el.

Hope it helps.

—Rasmus

Footnotes: 
¹   http://orgmode.org/worg/org-contrib/babel/examples/article-class.html

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

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

* Re: An Org-mode LaTeX class?
  2014-10-28  9:54 ` Rasmus
@ 2014-10-28 17:38   ` Thomas S. Dye
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas S. Dye @ 2014-10-28 17:38 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

Aloha Rasmus,

Rasmus <rasmus@gmx.us> writes:

>> Moreover, the look of these elements is configurable on the LaTeX
>> end, and further by means of Org options.  This way, we drop the
>> "generic LaTeX" thing (which is nice for people sending articles to
>> journals etc. – so my dream should not replace the current LaTeX
>> exporter, only constitute a variant!), but instead we gain a
>> beautiful, configurable pdf rendering of Org buffers.
>
> Thomas S. Dye tried it back in the days.  It was called org-article¹.
> I'm sure he will share his experience here eventually.

My goal was to get publication quality documents out of the old
exporter, which aimed to make LaTeX copies of notes taken in Org mode.
I tried to see how much work I could off-load to LaTeX so I didn't have
to wrestle with the old exporter.

Nicolas's new exporter framework very completely solved the problems I
was having with the old exporter and I now routinely write journal
articles in Org mode, using one of the standard classes (typically
scrartcl) because it is more convenient for me than working in LaTeX.
It is my experience that reproducible research is useful, even when it
is not a goal of publication.  Because my Org mode files capture an
entire analysis, I know exactly where to go when I want to pick up some
old research.

That said, I think there is some overlap between Marcin's dream and what
I was trying to accomplish, though Marcin's knowledge of LaTeX and
programming generally appear to put him well ahead of what I brought to
the table working on org-article.

All the best,
Tom

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

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

end of thread, other threads:[~2014-10-28 17:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-28  1:37 An Org-mode LaTeX class? Marcin Borkowski
2014-10-28  8:02 ` Fabrice Popineau
2014-10-28  9:49   ` Mike McLean
2014-10-28  9:15 ` Thorsten Jolitz
2014-10-28  9:54 ` Rasmus
2014-10-28 17:38   ` Thomas S. Dye

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