From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: An Org-mode LaTeX class? Date: Tue, 28 Oct 2014 10:54:00 +0100 Message-ID: <87ppdcmsef.fsf@gmx.us> References: <87y4s1t1nw.fsf@wmi.amu.edu.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xj3Tu-0004cR-Mz for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 05:54:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xj3To-0001RZ-DK for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 05:54:26 -0400 Received: from plane.gmane.org ([80.91.229.3]:55483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xj3To-0001RL-6d for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 05:54:20 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xj3Th-0007BH-F9 for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 10:54:13 +0100 Received: from 217.130.110.20 ([217.130.110.20]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Oct 2014 10:54:13 +0100 Received: from rasmus by 217.130.110.20 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Oct 2014 10:54:13 +0100 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-orgmode@gnu.org Cc: tsd@tsdye.com Hi Marcin, Thanks for sharing your ideas. Marcin Borkowski 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