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:57:32 +0800 Message-ID: <87r4g7bqib.fsf@news.tumashu-localhost.org> References: <87zjuwb3w7.fsf@news.tumashu-localhost.org> <20130612064643.GA73033@kenny.local> <87vc5jbrnu.fsf@news.tumashu-localhost.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmhpX-0000Y6-Dj for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 05:59:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmhpW-0004iq-2y for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 05:59:03 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:49527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmhpV-0004ii-SO for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 05:59:02 -0400 Received: by mail-pd0-f178.google.com with SMTP id w11so5188549pde.23 for ; Wed, 12 Jun 2013 02:59:00 -0700 (PDT) Received: from tumashu ([110.97.93.64]) by mx.google.com with ESMTPSA id z5sm18588355pbk.0.2013.06.12.02.58.58 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 12 Jun 2013 02:58:59 -0700 (PDT) Received: from feng by tumashu with local (Exim 4.80) (envelope-from ) id 1Umho4-0000m7-77 for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 17:57:32 +0800 In-Reply-To: <87vc5jbrnu.fsf@news.tumashu-localhost.org> (Feng Shu's message of "Wed, 12 Jun 2013 17:32:37 +0800") 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 Feng Shu writes: > 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! #+LATEX_ARTICLE_CLASS: ctexart ? #+LATEX_CLASS: article:ctexart ? > >> >> 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 >>> >>> >>> >>> -- >>> --