ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Giuseppe Bilotta" <oblomov@freemail.it>
Subject: Re: Translating from LaTeX to ConTeXt: environments
Date: Sun, 8 Oct 2000 16:08:37 +0200	[thread overview]
Message-ID: <000401c03166$d88e3f00$3b400e97@nuovo> (raw)
In-Reply-To: <007501c02fd4$a85e52e0$1bab1497@nuovo>

So, I gave a look at the \definestartstop command, and tried it. It _is_
what I'm looking for, but I lack a full manual to understand exactly how to
fine tune it to my needs.

I trying to write a few commands that should work, e.g., as the color
command; I then need:

1) a "simple" version that works like

some text\Rev{text in a particular color to show revision}

some text\Rev[comment to go in margin]{text like in "normal" \type{\Rev}}

(I managed to do this, by lettin \Rev just scan for the following char and
choose depending on it being [ or not)

2) a "full" version that works like

\startRev
lots of paragraphs in revision color

lots of paragraphs in revision color

lots of paragraphs in revision color
\stopRev

\startRev[comment to go in margin]
lots of paragraphs in revision color

lots of paragraphs in revision color

lots of paragraphs in revision color
\stopRev

I can't seem to manage this. Anybody has any ideas? Follows the code I
managed to get to (but doesn't seem to work properly. why?):

\def\RevNote#1{\inmargin{\tfxx \color[blue]{#1}}}
\def\RevWithComment[#1]#2{\leavevmode%
    \RevNote{#1}%
    \color[red]{#2}%
}
\def\RevWithoutComment#1{\leavevmode%
    \color[red]{#1}%
}
\def\Rev{\doifnextcharelse{[}{\RevWithComment}{\RevWithoutComment}}

\def\RevisionsStart{\startcolor[red]\relax}
\def\RevisionsStop{\stopcolor}

\definestartstop[revisions][command=\RevNote,before=\RevisionsStart,after=\R
evisionsStop]

(the full name is revisions and not \Rev because the file is somewhat
converted from LaTeX and I needed different names)

Giuseppe Bilotta


  reply	other threads:[~2000-10-08 14:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-05 16:50 Giuseppe Bilotta
2000-10-06 19:20 ` Berend de Boer
2000-10-06 20:33   ` Giuseppe Bilotta
2000-10-08 14:08     ` Giuseppe Bilotta [this message]
2000-10-13 19:36       ` Hraban
     [not found]         ` <001c01c035db$85ca1fe0$01460e97@nuovo>
2000-10-14 20:45           ` Hraban
2000-10-15 20:11             ` Hans Hagen
2000-10-15 20:17         ` Hans Hagen
2000-10-16 18:49           ` music typesetting Hraban

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='000401c03166$d88e3f00$3b400e97@nuovo' \
    --to=oblomov@freemail.it \
    /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).