ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Prefixing figures with "T-", "P-", "A-"
@ 2001-01-18  7:14 James Ramsey
  2001-01-18  9:03 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: James Ramsey @ 2001-01-18  7:14 UTC (permalink / raw)


Mostly, I just use LaTeX for reports, esp. lab
reports. I'm a student. I was hoping to use ConTeXt to
do the next couple reports. (If I don't get a chance
to, it's no biggie--but I would like to use a macro
package that seems to be put together with
customization in mind,) Anyway, currently, the way
figure numbering is done in the lab reports is that in
the "Results" section, the tables and graphs are
labeled Table 1, 2, Figure 1, 2, etc., but in the
Theory section, any figures are labeled Figure T-1,
Figure T-2, etc., and in the Procedure and Appendix,
the prefixes for the figures and tables are "P-" and
"A-", respectively. I wouldn't call this the prettiest
prefixing scheme. Mostly this is there so that the
tables and figures in the Results section can start at
1. I've done this basically by redefining \thefigure
as T-\arabic{figure}, P-\arabic{figure}, etc., which
means that in cross-references, the prefixes will
appear as part of the table and figure numbers, which
is what I want.

Is there a way that I can do this in ConTeXt? I saw
something about numbercommand, but I wasn't sure if
that's what I was looking for or not.

A couple other questions while I'm at it:

1) Is there a way to prefix the page number so that
the prefix appears in a cross-reference, i.e. so that
a reference to page A-3 in the appendix will appear as
"A-1" automatically.

2) Is there a way to do multiline headers and footers
in ConTeXt?

=====

----I am a fool for Christ. Mostly I am a fool.----

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Prefixing figures with "T-", "P-", "A-"
@ 2001-01-18 17:58 James Ramsey
  2001-01-19  8:33 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: James Ramsey @ 2001-01-18 17:58 UTC (permalink / raw)


--- Hans Hagen <pragma@wxs.nl> wrote:
> This can be set up with the "way=bysomething" keys,
> most variables permit
> this. 
> 
> \starttext
> 
> \startsectionblockenvironment [bodypart]
>   \setupcaptions[way=bytext]
> \stopsectionblockenvironment
> 
> \startsectionblockenvironment [appendix]
>   \setupcaptions[way=bychapter]
> \stopsectionblockenvironment
> 
> \startbodymatter
>   \chapter{test} \placefigure{}{}
> \stopbodymatter
> 
> \startappendices
>   \chapter{test} \placefigure{}{}
> \stopappendices
> 
> \stoptext

I tried typesetting the text above to see what it
would do, but texexec just gave me the error message

! Undefined control sequence.
l.3 \startsectionblockenvironment
                                 [bodypart]
? H
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the
correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

I don't know if I have to define something beforehand
so that \startsectionblockenvironment is valid, or if
I'm just dealing with a slighly older version of
ConTeXt. (The ConTeXt I have came with teTeX 1.0.6.)

=====

----I am a fool for Christ. Mostly I am a fool.----

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Prefixing figures with "T-", "P-", "A-"
@ 2001-01-19 23:28 James Ramsey
  0 siblings, 0 replies; 5+ messages in thread
From: James Ramsey @ 2001-01-19 23:28 UTC (permalink / raw)


--- Hans Hagen <pragma@wxs.nl> wrote:
> At 09:58 AM 1/18/01 -0800, James Ramsey wrote:
> 
> >! Undefined control sequence.
> >l.3 \startsectionblockenvironment
> >                                 [bodypart]
> >? H
> 
> can you add 
> 
> % interface=en
> 
> at the top of your file? 
> 
> if it still fails, you need to update [not that
> complicated] or just put
> the things between the start/stop in you docu stream
> directly. 

I "just put the things between the start/stop in you
docu stream directly" and now the test file compiles;
however, I'm not sure how it answers the question of
how to prefix figure numbers with "T-" or "P-" and
have the prefixed numbers able to show up in
cross-references.

=====

----I am a fool for Christ. Mostly I am a fool.----

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/


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

end of thread, other threads:[~2001-01-19 23:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-18  7:14 Prefixing figures with "T-", "P-", "A-" James Ramsey
2001-01-18  9:03 ` Hans Hagen
2001-01-18 17:58 James Ramsey
2001-01-19  8:33 ` Hans Hagen
2001-01-19 23:28 James Ramsey

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