ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Wolfgang Schuster" <schuster.wolfgang@googlemail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: Adding custom key/value pairs
Date: Thu, 17 Apr 2008 10:24:35 +0200	[thread overview]
Message-ID: <115224fb0804170124o2ac571dex380d8cb0e0e993a2@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0804151053040.15273@nqv-yncgbc>

On Tue, Apr 15, 2008 at 5:34 PM, Aditya Mahajan <adityam@umich.edu> wrote:
> Hi Wolfgang,
>
>
> On Tue, 15 Apr 2008, Wolfgang Schuster wrote:
>
> > On Mon, Apr 14, 2008 at 6:11 PM, Aditya Mahajan <adityam@umich.edu> 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
___________________________________________________________________________________


  reply	other threads:[~2008-04-17  8:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-12 19:44 Rory Molinari
2008-04-13 10:08 ` Taco Hoekwater
2008-04-13 17:37   ` Rory Molinari
2008-04-14  9:56     ` Olivier Guéry
2008-04-14 10:18       ` Wolfgang Schuster
2008-04-14 10:34         ` Olivier Guéry
2008-04-14 10:58           ` Wolfgang Schuster
2008-04-14 11:20             ` Taco Hoekwater
2008-04-14 11:53               ` Wolfgang Schuster
2008-04-14 16:11               ` Aditya Mahajan
2008-04-15 10:56                 ` Wolfgang Schuster
2008-04-15 15:34                   ` Aditya Mahajan
2008-04-17  8:24                     ` Wolfgang Schuster [this message]
2008-04-17  8:42                       ` Taco Hoekwater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=115224fb0804170124o2ac571dex380d8cb0e0e993a2@mail.gmail.com \
    --to=schuster.wolfgang@googlemail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).