# [NTG-context] Prefix for figure number lost in unnumbered subsection

Hans Hagen pragma at wxs.nl
Wed May 13 23:13:52 CEST 2015

On 5/13/2015 10:25 PM, Mojca Miklavec wrote:

> Thank you. This solves the problem, but isn't current behaviour
> (without "incrementnumber=no") some kind of a bug?

maybe, but more a side effect i think .. the incrementnumber is the
official way to have an unumbered section (in fact 'subject's are the way)

> - Once a figure gets a number like "3.4", isn't it a bug if the
> reference to that figure says "Figure 4"?
> - (I find it a bit problematic that figures are numbered "1.1", "2", "1.3".)

there is a bit of history behind this:

- in mkii we stored the numbers like 1:2:3:4 in the utility file
- so in order to get less prefixes in for isntance a list we had to
parse that number
- which was possible because we knew the level
- but then getting pieces colors or in an other font was kind of tricky
(but diable)
- the same for converted numbers
- for mixed usage there was no way to distinguish rendering

but in mkiv, we do it different:

- each number is stored along with the used prefix so we can exactly
match them
- but we can also configure them differently as we have all information
available
- of course overloaded numbers are also handled

> While I could at least understand why implementing the second thing
> properly might be a bit more challenging, I don't understand why a
> reference would ever be allowed to change the original label.

well, you think so, but all you can't imagine get requested ... the same
for the way prefixes are dealt with; we have documents with several
interwoven number systems and we can have more or less suffixes in
different sections of a document, image, reference .. whatever, so
whenever a number is requested there is now full control over the prefix
(what components to use) as well as the number (what components to show)
.. indeed complex

not much different from users mixing fonts that don't match well

> I'm experiencing a similar problem with figures in appendices (I
> already reported it, but I need to find that mail).

there are quite some example posts by wolfgang .. there are also some
examples in the test suite

> And there's another tiny problem that's partially a consequence of a
> human mistake. If a reference is missing, \in[reference] would print
> "??". But if one accidentally tries to reference some unnumbered
> subsubsection, \in doesn't print anything to even remotely indicate an
> error. (The origin of the error was initially referencing
> subsubsections in one chapter, then removing numbers of subsubsections
> for the sake of another chapter and it took a while until the problem
> was spotted.)

maybe some day i'll add a bit more tracing but keep in mind that when
one user asks for ?? another asks for nothing (the log can show some

\enabletrackers[*refer*]
\enabletrackers[*destin*]

> Mojca
>
>
>>> On Fri, May 8, 2015 at 5:36 PM, Mojca Miklavec wrote:
>>>>
>>>> Hi,
>>>>
>>>> Consider the following example where I wanted to remove subsubsection
>>>> numbers (as one ends with way too many numbers otherwise). The figure
>>>> numbering is screwed up, I get:
>>>> - Figure 1.1
>>>> - Figure 2
>>>> - Figure 1.3
>>>>
>>>>       [subsubsection]
>>>>       [number=no]
>>>> \starttext
>>>> \chapter{Chapter A}
>>>> \section{Section B}
>>>> \subsection{Subsection C}
>>>> \placefigure[force]{correct prefix}{test}
>>>> \subsubsection{Subsubsection D}
>>>> \placefigure[force]{no prefix number}{test}
>>>> \subsection{Subsection E}
>>>> \placefigure[force]{correct prefix}{test}
>>>> \stoptext
>>>>
>>>> How to fix that?
>>>>
>>>> Thank you,
>>>>       Mojca
>>>
>>>
>>> ___________________________________________________________________________________
>>> the Wiki!
>>>
>>> maillist : ntg-context at 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
>>>
>>> ___________________________________________________________________________________
>>>
>>
>>
>> --
>>
>> -----------------------------------------------------------------
>>                                            Hans Hagen | PRAGMA ADE
>>                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>      tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
>>                                               | www.pragma-pod.nl
>> -----------------------------------------------------------------
>> ___________________________________________________________________________________
>> the Wiki!
>>
>> maillist : ntg-context at 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
>> ___________________________________________________________________________________
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context at 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
> ___________________________________________________________________________________
>

--

-----------------------------------------------------------------