From mboxrd@z Thu Jan 1 00:00:00 1970 From: Feng Shu Subject: Re: [suggest] We should import latex template system Date: Wed, 12 Jun 2013 17:32:37 +0800 Message-ID: <87vc5jbrnu.fsf@news.tumashu-localhost.org> References: <87zjuwb3w7.fsf@news.tumashu-localhost.org> <20130612064643.GA73033@kenny.local> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmhRR-00024g-HS for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 05:34:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmhRP-0003g1-Mq for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 05:34:09 -0400 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]:62027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmhRP-0003fl-Gt for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 05:34:07 -0400 Received: by mail-pa0-f50.google.com with SMTP id fb1so6395278pad.9 for ; Wed, 12 Jun 2013 02:34:06 -0700 (PDT) Received: from tumashu ([110.97.93.64]) by mx.google.com with ESMTPSA id v7sm18454843pbq.32.2013.06.12.02.34.03 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 12 Jun 2013 02:34:05 -0700 (PDT) Received: from feng by tumashu with local (Exim 4.80) (envelope-from ) id 1UmhPx-0000h0-Cj for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 17:32:37 +0800 In-Reply-To: <20130612064643.GA73033@kenny.local> (Viktor Rosenfeld's message of "Wed, 12 Jun 2013 08:46:43 +0200") 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 Viktor Rosenfeld writes: > Hi, > > Feng Shu wrote: > >> org-mode odt exporter are using 'org-odt-styles-file, which are odt >> templetes, I think latex exporter should do like this. for example: > > I would also like to have a template mechanism for my LaTeX exports. > However, I think the way to do it in LaTeX is to write custom *.sty > files which can then be included using #+LATEX_HEADER: \usepackage{...} > for individual exports or more generally using org-latex-packages-alist. .sty can be easily resolved. The problem is that many template should be writen as "class" instead of "style". If I want to use a custom class , I need to do: 1. (add-to-list 'org-latex-classes ...) 2. (setq org-latex-default-class ...) I don't know other language users, for Chinese latex user, the first thing of write a document may change the document class, for example, change "article" to "ctexart". If I want use org-mode ,I should add all the "class" common used to the "org-latex-classes", It will be a nightmare. In org-latex-class, "article" and "ctexart" elements are very similar, the only different may be their class names. I want such result: 1. I don't need customize 'org-latex-classes 2. #+LATEX_CLASS: ctexart can work! > > I've been wanting to learn how to do it but I did not find the time yet. > (Any pointers to good tutorials would be appreciated.) > > Cheers, > Viktor > >> >> >> org-latex-styles-file or org-latex-templete-file >> >> >> we can include many different language's templates into org, and no need >> touch the ox-latex.el and the user can write theirs template easily, >> >> >> >> we can use "locale" to determine which template will be used >> >> >> >> converting latex fragements can use templates too, like: >> >> >> org-latex-fragment-templete-file >> >> >> >> -- >> --