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 23:11:36 +0800 Message-ID: <87ip1jbbyv.fsf@news.tumashu-localhost.org> References: <87zjuwb3w7.fsf@news.tumashu-localhost.org> <20130612064643.GA73033@kenny.local> <87vc5jbrnu.fsf@news.tumashu-localhost.org> <87r4g7bqib.fsf@news.tumashu-localhost.org> <87fvwne9we.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmmjY-0000Om-Bd for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 11:13:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmmjT-0003Uh-Q9 for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 11:13:12 -0400 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]:59846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmmjT-0003TO-JA for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 11:13:07 -0400 Received: by mail-pa0-f53.google.com with SMTP id tj12so4995268pac.26 for ; Wed, 12 Jun 2013 08:13:06 -0700 (PDT) Received: from tumashu ([110.97.93.64]) by mx.google.com with ESMTPSA id l4sm19507207pbo.6.2013.06.12.08.13.03 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:13:05 -0700 (PDT) Received: from feng by tumashu with local (Exim 4.80) (envelope-from ) id 1Ummi1-0001gj-MW for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 23:11:37 +0800 In-Reply-To: <87fvwne9we.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Wed, 12 Jun 2013 21:28:01 +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 > > (eval-after-load 'ox-latex > '(add-to-list 'org-latex-classes > '("myclass" "\\documentclass{article} > [NO-DEFAULT-PACKAGES] > [NO-PACKAGES] > [EXTRA] > \\usepackage{mychinesestylefile}" > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\subsection*{%s}") > ("\\subsubsection{%s}" . "\\subsubsection*{%s}") > ("\\paragraph{%s}" . "\\paragraph*{%s}") > ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))) > > And then in any given document: > > #+LaTeX_CLASS: myclass At the moment, I am using the similar solution! If you use this way, org-mode fragement previewing may be broken if you setting \pagestyle{fancy}. > > If I need to layer another project-specific style file on top of that, I > add a second line in the header: > > #+LaTeX_HEADER: \usepackage{someparticularpackage} > > Any document that might require Chinese starts as a "myclass", and then > goes from there. I set this up a year ago, and haven't needed to mess > with it since. There are many, the first one is "ctex", which may be the most popular latex solution of chinese users. All the university latex templates in China seem to be writen as "class", instead of "style". and nearly all of them are derive from class "article" or "book" It is the reason that I want this feature: #+LaTeX_CLASS: article:myclass It will use default "article" template, and replace class name to myclass! > > Hope that helps, > Eric --