From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/40397 Path: news.gmane.org!not-for-mail From: "Wolfgang Schuster" Newsgroups: gmane.comp.tex.context Subject: Re: Adding custom key/value pairs Date: Thu, 17 Apr 2008 10:24:35 +0200 Message-ID: <115224fb0804170124o2ac571dex380d8cb0e0e993a2@mail.gmail.com> References: <2c62660f97846a8a50e04eab167dde42@quokka70.fastmail.fm> <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 1208427519 10932 80.91.229.12 (17 Apr 2008 10:18:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Apr 2008 10:18:39 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 17 12:19:06 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 1JmRCW-0000qb-8v for gctc-ntg-context-518@m.gmane.org; Thu, 17 Apr 2008 12:18:44 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C3CEB1FBE8; Thu, 17 Apr 2008 12:18:03 +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 08503-02-2; Thu, 17 Apr 2008 12:17:29 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 23A3D1FCDE; Thu, 17 Apr 2008 10:28:22 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1AC2C1FCDB for ; Thu, 17 Apr 2008 10:28:20 +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 30286-03-59 for ; Thu, 17 Apr 2008 10:27:45 +0200 (CEST) Original-Received: from yw-out-1718.google.com (yw-out-1718.google.com [74.125.46.152]) by ronja.ntg.nl (Postfix) with ESMTP id 6139F1FBAA for ; Thu, 17 Apr 2008 10:24:36 +0200 (CEST) Original-Received: by yw-out-1718.google.com with SMTP id 6so2229915ywa.74 for ; Thu, 17 Apr 2008 01:24:35 -0700 (PDT) Original-Received: by 10.150.96.10 with SMTP id t10mr1322173ybb.1.1208420675506; Thu, 17 Apr 2008 01:24:35 -0700 (PDT) Original-Received: by 10.150.49.21 with HTTP; Thu, 17 Apr 2008 01:24:35 -0700 (PDT) In-Reply-To: Content-Disposition: inline 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:40397 Archived-At: On Tue, Apr 15, 2008 at 5:34 PM, Aditya Mahajan wrote: > 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. I module should be enogh for the start, makes it easier to test without the need to create a new relase or replace one of the core files and to generate a new format file. > 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 > ] I would replace headetext with \setuphead[abstract] and the format for the table of content (is this what do you mean with "for the content") with \setuplist but should abstract use a own command to place the title \definehead[abstract] or can we use one of the predefined ones (title -- new page or subject -- if you need a abstract in different languages on one page). > 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. Can't the abstract just placed after the text has been set with \start/\stopabstract. > 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. Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________