From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/34987 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Write once layout everwhere (?) Date: Sun, 10 Jun 2007 23:49:34 -0400 (EDT) Message-ID: References: <3e73596b0706101531m311f435fub90f185d6336586@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1181533800 9685 80.91.229.12 (11 Jun 2007 03:50:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Jun 2007 03:50:00 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jun 11 05:49:58 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1Hxauj-0001P5-Ko for gctc-ntg-context-518@m.gmane.org; Mon, 11 Jun 2007 05:49:57 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D91F0201B4; Mon, 11 Jun 2007 05:49:54 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 14450-02; Mon, 11 Jun 2007 05:49:43 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D1572201A6; Mon, 11 Jun 2007 05:49:42 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9C165201A6 for ; Mon, 11 Jun 2007 05:49:40 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12473-02-4 for ; Mon, 11 Jun 2007 05:49:37 +0200 (CEST) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by ronja.ntg.nl (Postfix) with ESMTP id 23285201A1 for ; Mon, 11 Jun 2007 05:49:36 +0200 (CEST) Original-Received: FROM aditya.hsd1.il.comcast.net. (c-24-13-179-215.hsd1.il.comcast.net [24.13.179.215]) BY hackers.mr.itd.umich.edu ID 466CC64F.60C5E.16810 ; 10 Jun 2007 23:49:35 -0400 In-Reply-To: <3e73596b0706101531m311f435fub90f185d6336586@mail.gmail.com> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:34987 Archived-At: On Sun, 10 Jun 2007, Pepe Barbe wrote: > Hello, > > I have used ConTeXt in the past and I have been very pleased with it > and the results obtained, much more than LaTeX. > > Now I am looking into a solution that would allow me to layout the > content ConTeXt and in other formats that ConTeXt does not (Forgive my > ignorance, if I am wrong) output, like HTML, Plain Text, or RTF (Those > are the formats that I can think of that are interesting to me > currently). > > Reading the Wiki one of those solutions would be XML, but I know very > little about the subject, so this email is to ask about experiences in > similar endeavors, other solutions for the same problem and how > practical this is. I have been exploring for something like this, but unfortunately have not found anything completely satisfactory. For "simple" documents, that is, only text, XML is the easiest. You have to determine a xml dtd, and then it is relatively easy to write context commands to parse it. It is also easy (but slightly cumbersome) to write a xsl stylesheet to parse xml into html. Most browsers do the xslt transformation on the fly. I found xml+css to be the easiest way to go, since you can do almost a one-to-one mapping of your ConTeXt commands. But most xml websites say that it is the "old" method and should not be used. To get plain text, you can do lynx -dump or something similar. I am sure there will be ways to convert xml to rtf, but I have not explored them. Some of the difficulties that I faced with simple documents was: 1. What is the xml equivalent of || 2. What is the xml equivalent of ~ (  ??) 3. What is the xml equivalent of \abbreviation {EECS} {Electrical Engineering and Computer Science} and then \EECS\ and \infull{EECS}. I did not have time to explore further, so I left my xml experiments there. For me the hardest part was to learn the xml way of thinking. > I suppose that I would use this for general writing and for academic > as well (Maths and engineering). For more complext documents (esp math), I do not like xml as an input format. Mathml is too verbose for me to write. Then there is the question of how useful is it to have a xml + mathml document. ConTeXt can parse it, and so can some of the browsers, but most browsers can not. Converting to html + images looks ugly, unless you put in a lot of effort. I have not tried converting xml+mathml to rtf or some office format. For complicated documents, I do not see the use of having an xml document. Most people are happy receiving a pdf. If someone wants to edit my files, and cannot edit tex file, he/she will not be able to edit xml files. If they use an office application to edit the file, I will need to backport the modifications manually. So he/she might as well use pdf annotation tools. If you do want to explore furhter, perhaps the easiest way is to use tex4ht, which does a decent job with most context documents and can convert to html, xml, and open office format. I do not like tex4ht because its html output is too verbose, and its documentation is a bit hard to follow. Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________