From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan L Tyree Subject: Re: Org equivalent to \chapter* Date: Fri, 08 Aug 2014 08:07:43 +1000 Message-ID: <53E3F8AF.4060200@gmail.com> References: <53E172B1.5020101@gmail.com> <87oavyj7sd.fsf@gmx.us> <87wqalzfgd.fsf@gmx.us> <53E2B054.1000605@gmail.com> <87tx5or4wt.fsf@pank.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFVqk-00018z-6Y for emacs-orgmode@gnu.org; Thu, 07 Aug 2014 18:08:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XFVqg-0005x6-7R for emacs-orgmode@gnu.org; Thu, 07 Aug 2014 18:07:54 -0400 Received: from mail-pa0-x229.google.com ([2607:f8b0:400e:c03::229]:64973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFVqf-0005wx-Sx for emacs-orgmode@gnu.org; Thu, 07 Aug 2014 18:07:50 -0400 Received: by mail-pa0-f41.google.com with SMTP id rd3so6126956pab.28 for ; Thu, 07 Aug 2014 15:07:48 -0700 (PDT) Received: from [192.168.1.1] (202.63.32.163.static.rev.eftel.com. [202.63.32.163]) by mx.google.com with ESMTPSA id co14sm18428659pac.43.2014.08.07.15.07.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Aug 2014 15:07:47 -0700 (PDT) In-Reply-To: <87tx5or4wt.fsf@pank.eu> 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 On 07/08/14 20:05, Rasmus wrote: > Alan L Tyree writes: > >> On 07/08/14 05:52, Thomas S. Dye wrote: >>> Aloha Rasmus, >>> >>> Rasmus writes: >>> >>>> Thomas, >>>> >>>> tsd@tsdye.com (Thomas S. Dye) writes: >>>> >>>>> Rasmus writes: >>>>> >>>>>> Alan L Tyree writes: >>>>>> >>>>>>> I'm sure this has been asked before, but I can't seem to find it. Is >>>>>>> there an org markup that produces a starred latex heading? >>>>>>> >>>>>>> In a book, for example, I want the Preface to be at chapter level, but >>>>>>> not included in the numbering. Same for HTML export, of course. >>>>>> You would probably need some sort of filter for this. Most certainly >>>>>> you will be able to find implementations on this list. >>>>>> >>>>>> Here's something from my init file that works with LaTeX. Other >>>>>> formats such as txt and html are harder since Org generates section >>>>>> numbers and the TOC. >>>>> Thanks for sharing this. It will be useful for book authors. >>>>> >>>>> Do you think it is possible to write a general headline filter that >>>>> takes care of all the various LaTeX possibilities? >>>> I don't like *one* filter to rule them all. Of course, if it's a >>>> collection of other function calls that is OK. As your recent >>>> question showed execution order may matter, >>>> (e.g. with :ignoreheading:clearpage:). >>>> >>>> Of course it's possible to bundle a couple of filters generally useful >>>> for ox-latex and provide a "consistent" interface. Alternatively, one >>>> could make a ox-latex+.el that provides a derived class with extra >>>> options. That's may be more work, and may be harder to hack. >>>> >>>> In fact Aaron started ox-extra.el, with the intention of providing >>>> "semi-official" extensions but Worg may be a better means of >>>> communication. >>>> >>>>> Right now Iʻm using tags to ignoreheading, clearpage, and newpage. >>>>> In addition to your nonum filter, Eric S. has a filter that gets rid >>>>> of a heading and promotes the content, which I havenʻt had occasion >>>>> to use, but also has its own tag. >>>> Yes, Eric has cool tree-based filter(s). I want to study them more >>>> carefully. Quite possibly, it's easier to provide elegant filters >>>> with trees. For instance, you have direct access to the element >>>> representation. In my filters I "hack" my way to this using >>>> text-properties. >>>> >>>>> From the LaTeX authorʻs point of view, it would be great to have a set >>>>> of tags (and options) that "just work." >>>> Would you want this as a derived class or filters? Perhaps it's >>>> easier to have a derived class with an alternative headline >>>> function. . . >>>> >>>>> Do you (and others) think the "tag and filter" approach can achieve >>>>> this? Or, are there too many moving parts to make it feasible? >>>> Yes. >>>> >>>> The ox-koma-script interface is basically controlled via tags. I >>>> think it's nice. >>> Thanks for this useful overview and the pointers to good examples. >>> >>> Iʻve been slowly building a set of filters and links that work for me, >>> but each new project differs a bit from the previous one and I have to >>> fiddle with the Org mode setup. Iʻm eager to get to the place Iʻm at >>> with LaTeX, where I just jump in and start writing. >>> >>> Thanks again for your help. >>> >>> All the best, >>> Tom >>> >> Thanks to everyone who responded. >> >> Several of my books are out of print and I am converting them to ePub >> and to printed form. ePub is pretty smooth by exporting to HTML and >> then using Calibre. LaTeX is the obvious choice for print. > Have you seen this project: > > https://github.com/rzoller/tex2ebook > > I haven't tried it myself, but the process seems similar to what you > are doing only that it uses hevea to convert from tex to html. > > —Rasmus > > -- > Lasciate ogni speranza o voi che entrate: siete nella mani di'machellaio > > > Thanks, Rasmus. I'll have a look at this and report back. Org -> tex -> HTML would at least solve the unnumbered heading problem (with the use of your filter). As an additional aside, note that Pandoc Markdown permits the use of a tag to produce an unnumbered heading when exporting to HTML and LaTeX. # Heading {.unnumbered} I'm a very inexperienced lisp coder, but it seems to me that this should be incorporated into the basic exporters. The HTML exporter, for example, adds the numbering to each heading. In the loop that accomplishes that, it should be easy to ignore headings with a tag such as your :nonum:. Otherwise, it is necessary to write a filter that not only undoes the numbering for selected headlines, but essentially reproduces the numbering algorithms originally introduced in ox-html. Cheers, Alan -- Alan L Tyree http://www2.austlii.edu.au/~alan Tel: 04 2748 6206 sip:typhoon@iptel.org