* caption for code listings
@ 2007-03-11 14:55 Steffen Fritzsche
2007-03-12 10:42 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Steffen Fritzsche @ 2007-03-11 14:55 UTC (permalink / raw)
To: ntg-context
hi,
I'm currently writing my diploma thesis with context. I already read the
wiki and searched the manuals but I didn't find something like a common
practice for defining new caption types.
My problem: I have a lot of code listings and I want to define a custom
caption type (named listing) and aggregate them into a own register. I
already set up a new register with
\defineregister [listing][Listing]
and it is also possible to place listings in this register with
\placelisting{
\startJV
...
\stopJV
}
but how can I add a custom caption to this listing? I'm thinking of
something like \placefigure. Or perhaps I must just setup placelisting.
Any Idea? Thanks in advance!
Steffen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: caption for code listings
2007-03-11 14:55 caption for code listings Steffen Fritzsche
@ 2007-03-12 10:42 ` Wolfgang Schuster
2007-03-12 11:22 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2007-03-12 10:42 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1002 bytes --]
2007/3/11, Steffen Fritzsche <fritzsche@scriptroom.de>:
>
> hi,
>
> I'm currently writing my diploma thesis with context. I already read the
> wiki and searched the manuals but I didn't find something like a common
> practice for defining new caption types.
>
> My problem: I have a lot of code listings and I want to define a custom
> caption type (named listing) and aggregate them into a own register. I
> already set up a new register with
>
> \defineregister [listing][Listing]
>
> and it is also possible to place listings in this register with
>
> \placelisting{
> \startJV
> ...
> \stopJV
> }
>
> but how can I add a custom caption to this listing? I'm thinking of
> something like \placefigure. Or perhaps I must just setup placelisting.
> Any Idea? Thanks in advance!
>
> Steffen
Hi Steffen,
\definefloat[listing][listings]
\starttext
\placelistoflistings
%\completelistoflistings
\placelistings
{text}
{\startJV
...
\stopJV}
\stoptext
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 1713 bytes --]
[-- Attachment #2: Type: text/plain, Size: 139 bytes --]
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: caption for code listings
2007-03-12 10:42 ` Wolfgang Schuster
@ 2007-03-12 11:22 ` Wolfgang Schuster
2007-03-12 12:14 ` Steffen Fritzsche
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2007-03-12 11:22 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1463 bytes --]
2007/3/12, Wolfgang Schuster <schuster.wolfgang@googlemail.com>:
>
>
> 2007/3/11, Steffen Fritzsche <fritzsche@scriptroom.de>:
> >
> > hi,
> >
> > I'm currently writing my diploma thesis with context. I already read the
> > wiki and searched the manuals but I didn't find something like a common
> > practice for defining new caption types.
> >
> > My problem: I have a lot of code listings and I want to define a custom
> > caption type (named listing) and aggregate them into a own register. I
> > already set up a new register with
> >
> > \defineregister [listing][Listing]
> >
> > and it is also possible to place listings in this register with
> >
> > \placelisting{
> > \startJV
> > ...
> > \stopJV
> > }
> >
> > but how can I add a custom caption to this listing? I'm thinking of
> > something like \placefigure. Or perhaps I must just setup placelisting.
> > Any Idea? Thanks in advance!
> >
> > Steffen
>
>
> Hi Steffen,
>
> \definefloat[listing][listings]
>
>
you can change the caption text with the following command
\setuplabeltext[listing=captiontext ] % works for all languages
\setuplabeltext[de][listing=captiontext ] % works only the german caption
> \starttext
>
> \placelistoflistings
> %\completelistoflistings
>
> \placelistings
> {text}
> {\startJV
> ...
> \stopJV}
>
this should be
\placelisting
{text}
\bgroup
\startJV
...
\stopJV
\egroup
> \stoptext
>
>
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 2956 bytes --]
[-- Attachment #2: Type: text/plain, Size: 139 bytes --]
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: caption for code listings
2007-03-12 11:22 ` Wolfgang Schuster
@ 2007-03-12 12:14 ` Steffen Fritzsche
0 siblings, 0 replies; 5+ messages in thread
From: Steffen Fritzsche @ 2007-03-12 12:14 UTC (permalink / raw)
To: mailing list for ConTeXt users
>> \definefloat[listing][listings]
>>
>>
>
> you can change the caption text with the following command
>
> \setuplabeltext[listing=captiontext ] % works for all languages
> \setuplabeltext[de][listing=captiontext ] % works only the german caption
>
> \placelisting
> {text}
> \bgroup
> \startJV
> ...
> \stopJV
> \egroup
>
that's exactly what I'm looking for. Thanks for the quick answer.
Steffen
^ permalink raw reply [flat|nested] 5+ messages in thread
* caption for code listings
@ 2007-03-12 7:00 Steffen Fritzsche
0 siblings, 0 replies; 5+ messages in thread
From: Steffen Fritzsche @ 2007-03-12 7:00 UTC (permalink / raw)
To: ntg-context
hi,
I'm currently writing my diploma thesis with context. I already read the
wiki and searched the manuals but I didn't find something like a common
practice for defining new caption types.
My problem: I have a lot of code listings and I want to define a custom
caption type (named listing) and aggregate them into a own register. I
already set up a new register with
\defineregister [listing][Listing]
and it is also possible to place listings in this register with
\placelisting{
\startJV
...
\stopJV
}
but how can I add a custom caption to this listing? I'm thinking of
something like \placefigure. Or perhaps I must just setup placelisting.
Any Idea? Thanks in advance!
Steffen
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-03-12 12:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-11 14:55 caption for code listings Steffen Fritzsche
2007-03-12 10:42 ` Wolfgang Schuster
2007-03-12 11:22 ` Wolfgang Schuster
2007-03-12 12:14 ` Steffen Fritzsche
2007-03-12 7:00 Steffen Fritzsche
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).