ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Why doesn't this inherit?
@ 2006-07-18  7:02 David Arnold
  0 siblings, 0 replies; only message in thread
From: David Arnold @ 2006-07-18  7:02 UTC (permalink / raw)
  Cc: Jacob Prystowsky, Bruce Wagner

Hans et all,

We don't understand, why we have to uncomment the commented line in  
the code below to make section numbers go away? Why doesn't the  
enumeration inherit?


\usemodule[colors]
\setupcolors[state=start]
\definecolor[lavender][r=0.25,b=0.75,t=0.095,a=1]


\defineframedtext[MyBox]
\definemeasure[BoxWidth][\textwidth]
\defineblank[BoxBlank][1em plus 1em minus 1em]
\setupframedtexts
	[MyBox]
	[width=\measure{BoxWidth},
	before={\blank[BoxBlank]},
	after={\blank[BoxBlank]},
	background=color,
	frame=no,
	location=middle]
	
\definenumber[CommonCtr][way=bysection,sectionnumber=no]
\definenumber[FigCtr][way=bysection,sectionnumber=no]

\setupframedtexts
	[MyBox]
	[width=\measure{BoxWidth},
	before={\blank[BoxBlank]},
	after={\blank[BoxBlank]},
	background=color,
	frame=no,
	location=middle]

\setuplabeltext[remark=Remark]
\setuplabeltext[theorem=Theorem]

\defineenumeration
	[remark,theorem]
	[location=serried,
	width=broad,
	headstyle=bold,
	inbetween=\blank,
	before=\blank,
	after=\blank,
	way=bysection,
	sectionnumber=no,
	number=yes]

\defineenumeration
	[remark]
	[text=\labeltext{remark}]
	
\defineenumeration
	[theorem]
	[text=\labeltext{theorem},
%	sectionnumber=no,	
	before={\startMyBox[backgroundcolor=lavender]},
	after=\stopMyBox]

	
\setupnumber[remark][number=CommonCtr]
\setupnumber[theorem][number=CommonCtr]
\setupnumber[formula][number=CommonCtr]

\setupnumber[figure][number=FigCtr]

\starttext

\chapter[chap:one]{Chapter One}

\input knuth

\section[sec:one]{Section One}

\startremark
   This is a remark
\stopremark

\startremark
   This is a remark
\stopremark

\starttheorem
   This is a theorem.
\stoptheorem

\placeformula[eq:one]
\startformula
   f(x)=x^2
\stopformula

\startremark
   This is a remark
\stopremark

\starttheorem
   This is a theorem.
\stoptheorem


\stoptext	

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-07-18  7:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-18  7:02 Why doesn't this inherit? David Arnold

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