From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/2877 Path: main.gmane.org!not-for-mail From: "Giuseppe Bilotta" Newsgroups: gmane.comp.tex.context Subject: Translating from LaTeX to ConTeXt: environments Date: Thu, 5 Oct 2000 18:50:10 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <001401c02eed$586c6700$875a0e97@nuovo> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035393652 12473 80.91.224.250 (23 Oct 2002 17:20:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 17:20:52 +0000 (UTC) Original-To: "ConTeXt" Xref: main.gmane.org gmane.comp.tex.context:2877 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:2877 As I already said in a previous post, I'm trying to convert some LaTeX files to ConTeXt. The next problem I'm facing is: What's the ConTeXt equivalent of a (generic) LaTeX environment? To be precise, I'm looking for an equivalent of the "verse" LaTeX environment. I would assume that and appropriate \defineparagraphs (with n=1) is the answer. The problem is to set the paragraphs appropriately: I need to nest a \startnarrower ... \stopnarrower (to ensure narrower margins) and a \startlines ... \stoplines. But it does not seem to work: \def\SongStart{\startnarrower[2*left,right]\startlines} \def\SongStop{\stoplines\stopnarrowe} \defineparagraphs[song][n=1] \setupparagraphs[song][style=italic,before=\SongStart,after=\SongStop] gives an incomplete conditional error (the same also swapping narrower and lines). Does anybody know a solution? One more question: is there an easy way to define a command (\def) that accepts an optional parameter? I mean: \command{argument} does one thing, \command[optional]{argument} does another, depending on [optional]. (btw, Hans, this is what I meant when asking for a "programmer's reference"). Giuseppe Bilotta