ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* setuphead and command
@ 2006-07-21 21:45 Hubertus Schmidt
  2006-07-24 10:13 ` Taco Hoekwater
  0 siblings, 1 reply; 2+ messages in thread
From: Hubertus Schmidt @ 2006-07-21 21:45 UTC (permalink / raw)


Hi all,
I'm stuck. I try to something like this:

\def\CommandHeader#1#2#3{
  {\framed[frame=off,bottomframe=on, topframe=on,align=right,width=\textwidth]
    {\tbox{\hskip14pt\indent{\type{#2}}\index{#2}\hskip3cm{\it #3}  }}
  }
\definehead[Command][subject]
\setuphead[Command][command=\CommandHeader]
\starttext
\Command{{def}{Define Variable}}
\Command{{tsolve}{solve differential equation}}
\stoptext

It's supposed to look like
------------------------------------------------------------------------------
  def              Define Variable
------------------------------------------------------------------------------
whereas "def" should be indexed and "Define Variable" should be indented...
The document is supposed to become a program manual and I wanted it to look like
this one:
http://cran.r-project.org/doc/manuals/fullrefman.pdf

How would you do the alphabetic sorting of the commands? Manually like the
solution above or with something like "definesorting"?
Is there a good way doing this?

Thanks a lot
Hubertus

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: setuphead and command
  2006-07-21 21:45 setuphead and command Hubertus Schmidt
@ 2006-07-24 10:13 ` Taco Hoekwater
  0 siblings, 0 replies; 2+ messages in thread
From: Taco Hoekwater @ 2006-07-24 10:13 UTC (permalink / raw)




Hubertus Schmidt wrote:
> Hi all,
> 
> It's supposed to look like
> ------------------------------------------------------------------------------
>   def              Define Variable
> ------------------------------------------------------------------------------

This is somewhat closer:

   \def\CommandHeader#1%
     {\framed[frame=off,bottomframe=on,
              topframe=on,align=right,width=\textwidth]
             {\makeline #1}}

   \def\makeline#1#2%
     {\hbox to 10em{\hskip14pt\type{#1}\hss}\index{#1}{\it #2}}

   \definehead[Command][subject]
   \setuphead[Command][deeptextcommand=\CommandHeader]
   \starttext
   \Command{{def}{Define Variable}}
   \Command{{tsolve}{solve differential equation}}
   \stoptext

Cheers, Taco

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-24 10:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-21 21:45 setuphead and command Hubertus Schmidt
2006-07-24 10:13 ` Taco Hoekwater

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).