From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/40266 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Adding custom key/value pairs Date: Tue, 15 Apr 2008 11:34:49 -0400 (EDT) Message-ID: References: <2c62660f97846a8a50e04eab167dde42@quokka70.fastmail.fm> <4801DBAC.4000907@elvenkind.com> <5c2c86e70804140256wa4ab590r8dc19cd6e145766a@mail.gmail.com> <115224fb0804140318k66b32fefof645c851bfb34d01@mail.gmail.com> <5c2c86e70804140334o538ccae6l313f6bd04672ac8a@mail.gmail.com> <115224fb0804140358v691112sa6988b9a44e3a33e@mail.gmail.com> <48033E1B.9010301@elvenkind.com> <115224fb0804150356o3df708bm29be96b33364cb2c@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: ger.gmane.org 1208275284 15295 80.91.229.12 (15 Apr 2008 16:01:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Apr 2008 16:01:24 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 15 18:02:00 2008 connect(): Connection refused 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 1JlnDA-0004Xk-66 for gctc-ntg-context-518@m.gmane.org; Tue, 15 Apr 2008 17:36:44 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 07A5D1FCF6; Tue, 15 Apr 2008 17:36:04 +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 04806-04-3; Tue, 15 Apr 2008 17:35:18 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id F262C1FCAF; Tue, 15 Apr 2008 17:35:17 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id DAC8F1FC14 for ; Tue, 15 Apr 2008 17:35:16 +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 05656-01-2 for ; Tue, 15 Apr 2008 17:34:42 +0200 (CEST) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) by ronja.ntg.nl (Postfix) with ESMTP id 157151FCAF for ; Tue, 15 Apr 2008 17:34:41 +0200 (CEST) Original-Received: FROM adi-laptop.local (c-68-40-40-75.hsd1.mi.comcast.net [68.40.40.75]) BY hellskitchen.mr.itd.umich.edu ID 4804CB0E.69830.22694 ; 15 Apr 2008 11:34:38 -0400 In-Reply-To: <115224fb0804150356o3df708bm29be96b33364cb2c@mail.gmail.com> User-Agent: Alpine 1.00 (DEB 882 2007-12-20) 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:40266 Archived-At: Hi Wolfgang, On Tue, 15 Apr 2008, Wolfgang Schuster wrote: > On Mon, Apr 14, 2008 at 6:11 PM, Aditya Mahajan wrote: >> On Mon, 14 Apr 2008, Taco Hoekwater wrote: >> >>> Wolfgang Schuster wrote: >>>> >>>> Why not, I have nothing against a few predefined title pages layouts. >>> >>> Somewhat related: it would be nice if there was some common code for >>> titles (books as well as articles). >>> >>> [snip] >>> >>> Anyway, the maps module contains all the code to do everything. And >>> the same is true for the TUG module. And for quite a few others I have >>> laying around. Lots of duplicate code all over, so a common framework >>> would be great. I've been meaning to write one for a long time, but >>> somehow I never quite get around to actually doing it. >>> >>> Just saying this to let you know that I would really welcome a module >>> with commands like \setuptitle, \definetitle, and \placetitle. >> >> I agree with that. It will be really nice to have a module that does a few >> "simple" titles (alternate=(a|b|c), etc.) For one of my personal modules, >> I was following something along the lines of the maps module. But I find >> Wolfgang's solution on the wiki to be more ConTeXtish than what all other >> modules use. > > Hi Aditya, > > could you use a few lines what do you expect from a placetitle/placetitlepage > command or a titlepage environment. Some of the things that I use \placetitle for: * Writing academic papers. Currenly, I have a macro that I use like this: \article [title ={...}, author={...}, publication={...},% This just goes to pdf subtitle date={...}, bottom={...}, %text placed at page bottom, %usually current revision number thanks={...}, %placed on the footer of the first page ] \startabstract ... \stopabstract \startkeywords .... \stopkeywords The abstract environment places a head ("Abstract") followed by its content. The formatting depends on whether it is a journal article, or a conference article. keyword also places a head followed by its content. Currently, what I have is that \article places all its contents, and so do abstract and keyword. So, I do not have to store anything. * TUGBoat articles: This uses a style file originally by Hans, which I have modified considerably, but still uses the same interface. This uses \setvariables [tugboat] [title={...}, author={...}, address={...}, email={...}, year={...}, volume={..}, number={...}, page={...}] The title and the author go to the document title. The address and email go at the end of the article. The year, volume, number, and page go to the header and footer of the article. The rest of the article is somethng like \starttext \startArticle \startAbstract .... \stopAbstract ... \stopArticle \stoptext This structure is the reason I think something like \setuptitle (or \setupdocumenttitle) is needed. * Practex journal, which uses http://wiki.contextgarden.net/Modules/Pracjourn * My Ways which use http://wiki.contextgarden.net/Modules/MyWay * and finally Maps which use http://wiki.contextgarden.net/Modules/Maps -------------------- Notice that almost all of them so similar things, but in slightly different manner. What I wish for is a common interface, and I really like your idea of \setuptitle. In fact, I think that something like that should be part of the core. The module does not need to take care of all the formatting requirements: just provide the interface. For a particular publications, the module for that publication can modify the \placetitle command to do what they want. With this, the user documentation can just say that use \setuptitle[title=...,author=..., date=....] %and maybe setups={...} So, we will have a consistent user inteferface for all documents. > What should we do with the abstract, did it depend on the document title ... In general, the formatting of the abstract will depend on the kind of the document. Just need something like \definetitlesubstructure% or something more appropriate [abstract] [headtext={Abstract}, headstyle=bold, headcolor=blue, headalign=middle, inbetween=\blank,%between the head and the body style=small, %for the contents color=black, %for the contents ] This should define a command that captures its contents, and provides a command \placetitlesubstructure[abstract]. Similarly, we can define \definetitlesubstructure [keywords] [....] Then, \placetitlesubstructure[abstract] and \placetitlesubstracutre[keywords] and go in the after={...} key of \setuptitle. As I said before, the module just needs to collect the information, and provide one or two simple styles. Once the information is collected, it is easy to use other keys (e.g. thanks key in my first case) and let the user define a setups that take of how to handle those keys. 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 ___________________________________________________________________________________