ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Should command `\setnumber' print number in text?
@ 2012-04-29  6:13 Vladimir Lomov
  2012-04-29  7:16 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Lomov @ 2012-04-29  6:13 UTC (permalink / raw)
  To: General mailing list for ConTeXt users

Hello,
I faced with following behavior of `\setnumber' command, consider the
example:

<example file="ex1.tex">
\setupbodyfont[computer-modern-unicode,12pt]

\definenumber[course]
\setnumber[course]{3}

\starttext
Hello.
\stoptext
</example>

Processing by context (ConTeXt  ver: 2012.04.26 22:27 MKIV  fmt:
2012.4.28  int: english/english) I get PDF with number 3 typeset on line
above Hello.

Is it expected behavior? If yes, how can I increase/set value for
"number"-command (counter) then?

P.S. I tried with commented `\setupbodyfont', all is ok. Is it mean that
command is deprecated?

---
WBR, Vladimir Lomov

-- 
You worry too much about your job.  Stop it.  You are not paid enough to worry.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Should command `\setnumber' print number in text?
  2012-04-29  6:13 Should command `\setnumber' print number in text? Vladimir Lomov
@ 2012-04-29  7:16 ` Wolfgang Schuster
  2012-04-29 12:23   ` Vladimir Lomov
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2012-04-29  7:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 29.04.2012 um 08:13 schrieb Vladimir Lomov:

> Hello,
> I faced with following behavior of `\setnumber' command, consider the
> example:
> 
> <example file="ex1.tex">
> \setupbodyfont[computer-modern-unicode,12pt]
> 
> \definenumber[course]
> \setnumber[course]{3}
> 
> \starttext
> Hello.
> \stoptext
> </example>
> 
> Processing by context (ConTeXt  ver: 2012.04.26 22:27 MKIV  fmt:
> 2012.4.28  int: english/english) I get PDF with number 3 typeset on line
> above Hello.
> 
> Is it expected behavior? If yes, how can I increase/set value for
> "number"-command (counter) then?
> 
> P.S. I tried with commented `\setupbodyfont', all is ok. Is it mean that
> command is deprecated?

There was a change in the \setupnumber command for MkIV and you need now brackets for both arguments, e.g. \setupnumber[course][3].

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Should command `\setnumber' print number in text?
  2012-04-29  7:16 ` Wolfgang Schuster
@ 2012-04-29 12:23   ` Vladimir Lomov
  2012-05-01 14:03     ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Lomov @ 2012-04-29 12:23 UTC (permalink / raw)
  To: ntg-context

Hello Wolfgang,

** Wolfgang Schuster [2012-04-29 09:16:38 +0200]:


> Am 29.04.2012 um 08:13 schrieb Vladimir Lomov:

>> Hello,
>> I faced with following behavior of `\setnumber' command, consider the
>> example:

>> <example file="ex1.tex">
>> \setupbodyfont[computer-modern-unicode,12pt]

>> \definenumber[course]
>> \setnumber[course]{3}

>> \starttext
>> Hello.
>> \stoptext
>> </example>

>> Processing by context (ConTeXt  ver: 2012.04.26 22:27 MKIV  fmt:
>> 2012.4.28  int: english/english) I get PDF with number 3 typeset on line
>> above Hello.

>> Is it expected behavior? If yes, how can I increase/set value for
>> "number"-command (counter) then?

>> P.S. I tried with commented `\setupbodyfont', all is ok. Is it mean that
>> command is deprecated?

> There was a change in the \setupnumber command for MkIV and you need now brackets for both arguments, e.g. \setupnumber[course][3].

> Wolfgang
Thank you Wolfgang, `\setupnumber' works.

Just to clarify question (before update wiki): is `\setnumber' command
obsolete and `\setupnumber' should be used instead?

I'm also reading "dev-context", some time ago there were discussion about
`\definestructure...', in message `<4F737D98.5040600@wxs.nl>' Hans shown
several `\let' commands, from that I thought that `\setnumber' is ok to
use with `[]{}'.

---
WBR, Vladimir Lomov

-- 
What does it take for Americans to do great things; to go to the moon, to
win wars, to dig canals linking oceans, to build railroads across a continent?
In independent thought about this question, Neil Armstrong and I concluded
that it takes a coincidence of four conditions, or in Neil's view, the
simultaneous peaking of four of the many cycles of American life.  First, a
base of technology must exist from which to do the thing to be done.  Second,
a period of national uneasiness about America's place in the scheme of human
activities must exist.  Third, some catalytic event must occur that focuses
the national attention upon the direction to proceed.  Finally, an articulate
and wise leader must sense these first three conditions and put forth with
words and action the great thing to be accomplished.  The motivation of young
Americans to do what needs to be done flows from such a coincidence of
conditions. ...  The Thomas Jeffersons, The Teddy Roosevelts, The John
Kennedys appear.  We must begin to create the tools of leadership which they,
and their young frontiersmen, will require to lead us onward and upward.
		-- Dr. Harrison H. Schmidt
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Should command `\setnumber' print number in text?
  2012-04-29 12:23   ` Vladimir Lomov
@ 2012-05-01 14:03     ` Wolfgang Schuster
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2012-05-01 14:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 29.04.2012 um 14:23 schrieb Vladimir Lomov:

> Just to clarify question (before update wiki): is `\setnumber' command
> obsolete and `\setupnumber' should be used instead?

Both commands have a different purpose, with \setupnumber you can
change the conversion of the counter (romannumerals, characters etc.),
add a prefix (chapter, section … number) and let the counter be reset
with each new sectionblock or heading.

With \setnumber you can set the counter to a certain value but to fit
the command in the normal syntax there was a change a while back.

In MkII you set the number in braces

  \setnumber[…]{<number>}

but for MkIV you use brackets to set the number

  \setnumber[…][<number>]

> I'm also reading "dev-context", some time ago there were discussion about
> `\definestructure...', in message `<4F737D98.5040600@wxs.nl>' Hans shown
> several `\let' commands, from that I thought that `\setnumber' is ok to
> use with `[]{}'.

In MkIV the real names for the counter mechanism are

- \definecounter
- \setupcounter
- \incrementcounter
- \convertedcounter
- …

but for backward compatibility (the names are mentioned in manuals) the old
names from MkII are synonyms with the same syntax.

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2012-05-01 14:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-29  6:13 Should command `\setnumber' print number in text? Vladimir Lomov
2012-04-29  7:16 ` Wolfgang Schuster
2012-04-29 12:23   ` Vladimir Lomov
2012-05-01 14:03     ` Wolfgang Schuster

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