From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/56363 Path: news.gmane.org!not-for-mail From: Roger Mason Newsgroups: gmane.comp.tex.context Subject: Re: [OT] ASCII text output Date: Thu, 18 Feb 2010 10:19:41 -0330 Message-ID: References: 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: ger.gmane.org 1266500996 32277 80.91.229.12 (18 Feb 2010 13:49:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Feb 2010 13:49:56 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Feb 18 14:49:53 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ni6lN-0004it-Gr for gctc-ntg-context-518@m.gmane.org; Thu, 18 Feb 2010 14:49:53 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E224AC9CC0; Thu, 18 Feb 2010 14:49:52 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OYLRxUelD6nz; Thu, 18 Feb 2010 14:49:50 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 80207C9CC4; Thu, 18 Feb 2010 14:49:50 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A3703C9CC4 for ; Thu, 18 Feb 2010 14:49:48 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id jWh7er79tcyW for ; Thu, 18 Feb 2010 14:49:45 +0100 (CET) Original-Received: from fitzgerald.ucs.mun.ca (mx5.mun.ca [134.153.232.57]) by balder.ntg.nl (Postfix) with ESMTP id 1FBCCC9CC0 for ; Thu, 18 Feb 2010 14:49:43 +0100 (CET) Original-Received: from perthite.esd.mun.ca (perthite.esd.mun.ca [134.153.36.125]) by fitzgerald.ucs.mun.ca (8.13.1/8.13.1) with ESMTP id o1IDnfkC016833 for ; Thu, 18 Feb 2010 10:19:41 -0330 Original-Received: from perthite.esd.mun.ca (perthite.esd.mun.ca [134.153.36.125]) by perthite.esd.mun.ca (8.14.0/8.14.0) with ESMTP id o1IDnfBj027335 for ; Thu, 18 Feb 2010 10:19:41 -0330 In-Reply-To: (Aditya Mahajan's message of "Wed, 17 Feb 2010 14:27:53 -0500 (EST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-Scanned-By: MIMEDefang 2.67 on 134.153.232.57 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:56363 Archived-At: Hello Aditya, Aditya Mahajan writes: > If you are willing to add more markup, then TeX can do the parsing for > you. > > \startquestion[title={Ruby coloured by}, points=1, difficulty=1] > A ruby is a gem of corundum colored > \startoptions > \option Rutile > \option Calcium > \correctoption Chrumium > \option Iron and Titanium > \stopoptions > \starthint > .... > \stophint > \startfeedback > ... > \stopfeedback > \stopquestion > > You can create a mode for ascii output that redefines all the > environments to *typeset* the correct output, which you can then > convert to text using pdftotext. > > Another option is to write everything in XML (it is almost the same ...) > > A ruby .. > > > > > > > > .... > > > ... > > > > With a few setup commands, ConTeXt can directly typeset an xml > file. Parsing the xml file to generate ascii text can be done using > your favourite programming language (or using ConTeXt by typesetting > the desired output and using pdftotext). > Thank you very much. I will work on this over the next week and decide which method I like best. I really appreciate you taking the time to help. Best wishes, Roger ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________