ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Some questions about my document
@ 2017-08-24 12:53 Fabrice Couvreur
  2017-08-26 10:27 ` Fabrice Couvreur
  0 siblings, 1 reply; 7+ messages in thread
From: Fabrice Couvreur @ 2017-08-24 12:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1263 bytes --]

Hello,
I would like to have this :

####################

Chapitre I : Espaces probabilisés

I.1 - Expérience aléatoire et univers

Définition 1.1

Définition 1.2

####################

Thank you
Fabrice

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\definestructureconversionset
  [structure]
  [numbers, Romannumerals, numbers, numbers, numbers]
  [numbers]

\setupheads [sectionconversionset=structure]

\setupenumerations
[
before={\blank[big]},
after={\blank[big]},
alternative=serried,
width=broad,
distance=0.5em,
headstyle=bold,
titlestyle=bold,
prefix=chapter,
way=bychapter,
conversion=numbers]

\defineenumeration
[definition]
[
text=Définition,
title=yes,
style=italic,
list=all,
listtext={Définition}]

\starttext
\startchapter[title=Espaces probabilisés]
\startsection[title=Expérience aléatoire  et univers]
\startdefinition
  On appelle expérience aléatoire une expérience sur un système dont le
résultat n'est pas connu d'avance et peut varier si on répète cette
expérience.
\stopdefinition
\startdefinition
  On appelle univers l'ensemble des résultats possibles. Il est noté
\math{\Omega}.
\stopdefinition
\stopchapter
\stoptext

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

[-- Attachment #1.2: Type: text/html, Size: 1668 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Some questions about my document
  2017-08-24 12:53 Some questions about my document Fabrice Couvreur
@ 2017-08-26 10:27 ` Fabrice Couvreur
  2017-08-26 22:14   ` Fabrice Couvreur
  0 siblings, 1 reply; 7+ messages in thread
From: Fabrice Couvreur @ 2017-08-26 10:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2257 bytes --]

Hi,
I have simplified the code, but I get :

Remark I.1.
Remark I.2.
Remark I.3.

instead :

Remark 1.1.
Remark 1.2
Remark 1.3

Thanks
Fabrice

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definestructureconversionset
  [structure]
  [numbers, Romannumerals, numbers, numbers, numbers]
  [numbers]

\setupheads [sectionconversionset=structure]

\defineenumeration
  [remark]
  [
    text=Remark,
    location=serried,
    width=fit,
    right={.~},
    prefix=yes,
    prefixsegments=chapter,
  ]

\setupnumber[remark][way=bychapter]

\starttext
\startchapter
  [title={First chapter}]
\startsection
  [title={First section}]
  \dorecurse{3}{\startremark \input ward \stopremark}
\stopsection
\stopchapter
\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

2017-08-24 14:53 GMT+02:00 Fabrice Couvreur <fabrice1.couvreur@gmail.com>:

> Hello,
> I would like to have this :
>
> ####################
>
> Chapitre I : Espaces probabilisés
>
> I.1 - Expérience aléatoire et univers
>
> Définition 1.1
>
> Définition 1.2
>
> ####################
>
> Thank you
> Fabrice
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> \definestructureconversionset
>   [structure]
>   [numbers, Romannumerals, numbers, numbers, numbers]
>   [numbers]
>
> \setupheads [sectionconversionset=structure]
>
> \setupenumerations
> [
> before={\blank[big]},
> after={\blank[big]},
> alternative=serried,
> width=broad,
> distance=0.5em,
> headstyle=bold,
> titlestyle=bold,
> prefix=chapter,
> way=bychapter,
> conversion=numbers]
>
> \defineenumeration
> [definition]
> [
> text=Définition,
> title=yes,
> style=italic,
> list=all,
> listtext={Définition}]
>
> \starttext
> \startchapter[title=Espaces probabilisés]
> \startsection[title=Expérience aléatoire  et univers]
> \startdefinition
>   On appelle expérience aléatoire une expérience sur un système dont le
> résultat n'est pas connu d'avance et peut varier si on répète cette
> expérience.
> \stopdefinition
> \startdefinition
>   On appelle univers l'ensemble des résultats possibles. Il est noté
> \math{\Omega}.
> \stopdefinition
> \stopchapter
> \stoptext
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>

[-- Attachment #1.2: Type: text/html, Size: 4075 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Some questions about my document
  2017-08-26 10:27 ` Fabrice Couvreur
@ 2017-08-26 22:14   ` Fabrice Couvreur
  2017-08-27  9:03     ` Pablo Rodriguez
  0 siblings, 1 reply; 7+ messages in thread
From: Fabrice Couvreur @ 2017-08-26 22:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2876 bytes --]

" I would like to have this :

Chapitre I : Espaces probabilisés

I.1 - Expérience aléatoire et univers "


I did this :

\setuphead[chapter][commandbefore={: }]
\setuphead[section][distance=\zeropoint,commandbefore={\space\endash\space}]
\setuplabeltext[en][chapter=Chapitre ]

But for this

Remark 1.1.
Remark 1.2
Remark 1.3

I do not find !

Fabrice

2017-08-26 12:27 GMT+02:00 Fabrice Couvreur <fabrice1.couvreur@gmail.com>:

> Hi,
> I have simplified the code, but I get :
>
> Remark I.1.
> Remark I.2.
> Remark I.3.
>
> instead :
>
> Remark 1.1.
> Remark 1.2
> Remark 1.3
>
> Thanks
> Fabrice
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> \definestructureconversionset
>   [structure]
>   [numbers, Romannumerals, numbers, numbers, numbers]
>   [numbers]
>
> \setupheads [sectionconversionset=structure]
>
> \defineenumeration
>   [remark]
>   [
>     text=Remark,
>     location=serried,
>     width=fit,
>     right={.~},
>     prefix=yes,
>     prefixsegments=chapter,
>   ]
>
> \setupnumber[remark][way=bychapter]
>
> \starttext
> \startchapter
>   [title={First chapter}]
> \startsection
>   [title={First section}]
>   \dorecurse{3}{\startremark \input ward \stopremark}
> \stopsection
> \stopchapter
> \stoptext
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> 2017-08-24 14:53 GMT+02:00 Fabrice Couvreur <fabrice1.couvreur@gmail.com>:
>
>> Hello,
>> I would like to have this :
>>
>> ####################
>>
>> Chapitre I : Espaces probabilisés
>>
>> I.1 - Expérience aléatoire et univers
>>
>> Définition 1.1
>>
>> Définition 1.2
>>
>> ####################
>>
>> Thank you
>> Fabrice
>>
>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>>
>> \definestructureconversionset
>>   [structure]
>>   [numbers, Romannumerals, numbers, numbers, numbers]
>>   [numbers]
>>
>> \setupheads [sectionconversionset=structure]
>>
>> \setupenumerations
>> [
>> before={\blank[big]},
>> after={\blank[big]},
>> alternative=serried,
>> width=broad,
>> distance=0.5em,
>> headstyle=bold,
>> titlestyle=bold,
>> prefix=chapter,
>> way=bychapter,
>> conversion=numbers]
>>
>> \defineenumeration
>> [definition]
>> [
>> text=Définition,
>> title=yes,
>> style=italic,
>> list=all,
>> listtext={Définition}]
>>
>> \starttext
>> \startchapter[title=Espaces probabilisés]
>> \startsection[title=Expérience aléatoire  et univers]
>> \startdefinition
>>   On appelle expérience aléatoire une expérience sur un système dont le
>> résultat n'est pas connu d'avance et peut varier si on répète cette
>> expérience.
>> \stopdefinition
>> \startdefinition
>>   On appelle univers l'ensemble des résultats possibles. Il est noté
>> \math{\Omega}.
>> \stopdefinition
>> \stopchapter
>> \stoptext
>>
>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>>
>
>

[-- Attachment #1.2: Type: text/html, Size: 7204 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Some questions about my document
  2017-08-26 22:14   ` Fabrice Couvreur
@ 2017-08-27  9:03     ` Pablo Rodriguez
  2017-08-27 10:29       ` Fabrice Couvreur
  0 siblings, 1 reply; 7+ messages in thread
From: Pablo Rodriguez @ 2017-08-27  9:03 UTC (permalink / raw)
  To: ntg-context

On 08/27/2017 12:14 AM, Fabrice Couvreur wrote:
> " I would like to have this :
> 
> Chapitre I : Espaces probabilisés
> 
> I.1 - Expérience aléatoire et univers "
> 
> I did this :
> 
> \setuphead[chapter][commandbefore={: }]
> \setuphead[section][distance=\zeropoint,commandbefore={\space\endash\space}]
> \setuplabeltext[en][chapter=Chapitre ]

Hi Fabrice,

I think it would be better to use French:

    \mainlanguage[fr]
    \setuplabeltext[fr][chapter=Chapitre ]

> But for this
> 
> Remark 1.1.
> Remark 1.2
> Remark 1.3
> 
> I do not find !

You have to define a new conversion set and use it for the prefix
segments (I added the section to the numbering):

    \definestructureconversionset
      [digits]
      [n, n, a, n, n]
      [numbers]

    \defineenumeration
      [remark]
      [
        text=Remark,
        location=serried,
        width=fit,
        right={.~},
        prefix=yes,
        prefixsegments=chapter:section,
        prefixconversionset=digits,
      ]

I hope it helps,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Some questions about my document
  2017-08-27  9:03     ` Pablo Rodriguez
@ 2017-08-27 10:29       ` Fabrice Couvreur
  2017-08-27 10:43         ` Pablo Rodriguez
  0 siblings, 1 reply; 7+ messages in thread
From: Fabrice Couvreur @ 2017-08-27 10:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2449 bytes --]

Hi Pablo,

" You have to define a new conversion set and use it for the prefix
segments "
It seems to me that's what I did :

\definestructureconversionset
  [structure]
  [numbers, Romannumerals, numbers, numbers, numbers]
  [numbers]

\setupheads [sectionconversionset=structure]

\defineenumeration
  [remark]
  [
    text=Remark,
    location=serried,
    width=fit,
    right={.~},
    prefix=yes,
    prefixsegments=chapter,
  ]

\setupnumber[remark][way=bychapter]


Only I get (which is normal according to the numbering chosen for the
chapters : Romannumerals)

Remark I.1.

and I want this :

Remark 1.1.

Fabrice



2017-08-27 11:03 GMT+02:00 Pablo Rodriguez <oinos@gmx.es>:

> On 08/27/2017 12:14 AM, Fabrice Couvreur wrote:
> > " I would like to have this :
> >
> > Chapitre I : Espaces probabilisés
> >
> > I.1 - Expérience aléatoire et univers "
> >
> > I did this :
> >
> > \setuphead[chapter][commandbefore={: }]
> > \setuphead[section][distance=\zeropoint,commandbefore={\
> space\endash\space}]
> > \setuplabeltext[en][chapter=Chapitre ]
>
> Hi Fabrice,
>
> I think it would be better to use French:
>
>     \mainlanguage[fr]
>     \setuplabeltext[fr][chapter=Chapitre ]
>
> > But for this
> >
> > Remark 1.1.
> > Remark 1.2
> > Remark 1.3
> >
> > I do not find !
>
> You have to define a new conversion set and use it for the prefix
> segments (I added the section to the numbering):
>
>     \definestructureconversionset
>       [digits]
>       [n, n, a, n, n]
>       [numbers]
>
>     \defineenumeration
>       [remark]
>       [
>         text=Remark,
>         location=serried,
>         width=fit,
>         right={.~},
>         prefix=yes,
>         prefixsegments=chapter:section,
>         prefixconversionset=digits,
>       ]
>
> I hope it helps,
>
> Pablo
> --
> http://www.ousia.tk
> ____________________________________________________________
> _______________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ____________________________________________________________
> _______________________

[-- Attachment #1.2: Type: text/html, Size: 5443 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Some questions about my document
  2017-08-27 10:29       ` Fabrice Couvreur
@ 2017-08-27 10:43         ` Pablo Rodriguez
  2017-08-27 10:54           ` Fabrice Couvreur
  0 siblings, 1 reply; 7+ messages in thread
From: Pablo Rodriguez @ 2017-08-27 10:43 UTC (permalink / raw)
  To: ntg-context

On 08/27/2017 12:29 PM, Fabrice Couvreur wrote:
> Hi Pablo,
> 
> " You have to define a new conversion set and use it for the prefix
> segments "
> It seems to me that's what I did.

Hi Fabrice,

I don’t think so. Two different conversion sets are required: one for
\setupheads[sectionconversionset=numbers] and a different one for
\defineenumeration[remark][prefixconversionset=digits].

If there is no different conversion set for the enumeration, you get the
default for the head.

Here is the full sample:

    \mainlanguage[fr]
    \setuphead[chapter][commandbefore={: }]
    \setuphead[section][distance=\zeropoint,
        commandbefore={\space\endash\space}]
    \setuplabeltext[fr][chapter=Chapitre ]

    \definestructureconversionset
      [structure]
      [n, R, n, n, n]

    \definestructureconversionset
      [digits]
      [n, n, n, n, n]

    \setupheads[sectionconversionset=structure]

    \defineenumeration
      [remark]
      [
        text=Remark,
        location=serried,
        width=fit,
        right={.~},
        prefix=yes,
        prefixsegments=chapter,
        prefixconversionset=digits,
        %~ prefixsegments=section
      ]

    \setupnumber[remark][way=bychapter]


    \starttext
    \dorecurse{3}{\startchapter
      [title={First chapter}]
    \dorecurse{3}{\startsection
      [title={First section}]
      \dorecurse{3}{\startremark \input ward \stopremark}
    \stopsection}
    \stopchapter}
    \stoptext

I hope it is clear now. Let me know if it isn’t.

Cheers,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Some questions about my document
  2017-08-27 10:43         ` Pablo Rodriguez
@ 2017-08-27 10:54           ` Fabrice Couvreur
  0 siblings, 0 replies; 7+ messages in thread
From: Fabrice Couvreur @ 2017-08-27 10:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2486 bytes --]

Hi Pablo,
Thank you, it's very clear and it finally corresponds to what I want.
The road is long in the learning of this formidable tool !
Fabrice

2017-08-27 12:43 GMT+02:00 Pablo Rodriguez <oinos@gmx.es>:

> On 08/27/2017 12:29 PM, Fabrice Couvreur wrote:
> > Hi Pablo,
> >
> > " You have to define a new conversion set and use it for the prefix
> > segments "
> > It seems to me that's what I did.
>
> Hi Fabrice,
>
> I don’t think so. Two different conversion sets are required: one for
> \setupheads[sectionconversionset=numbers] and a different one for
> \defineenumeration[remark][prefixconversionset=digits].
>
> If there is no different conversion set for the enumeration, you get the
> default for the head.
>
> Here is the full sample:
>
>     \mainlanguage[fr]
>     \setuphead[chapter][commandbefore={: }]
>     \setuphead[section][distance=\zeropoint,
>         commandbefore={\space\endash\space}]
>     \setuplabeltext[fr][chapter=Chapitre ]
>
>     \definestructureconversionset
>       [structure]
>       [n, R, n, n, n]
>
>     \definestructureconversionset
>       [digits]
>       [n, n, n, n, n]
>
>     \setupheads[sectionconversionset=structure]
>
>     \defineenumeration
>       [remark]
>       [
>         text=Remark,
>         location=serried,
>         width=fit,
>         right={.~},
>         prefix=yes,
>         prefixsegments=chapter,
>         prefixconversionset=digits,
>         %~ prefixsegments=section
>       ]
>
>     \setupnumber[remark][way=bychapter]
>
>
>     \starttext
>     \dorecurse{3}{\startchapter
>       [title={First chapter}]
>     \dorecurse{3}{\startsection
>       [title={First section}]
>       \dorecurse{3}{\startremark \input ward \stopremark}
>     \stopsection}
>     \stopchapter}
>     \stoptext
>
> I hope it is clear now. Let me know if it isn’t.
>
> Cheers,
>
> Pablo
> --
> http://www.ousia.tk
> ____________________________________________________________
> _______________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ____________________________________________________________
> _______________________
>

[-- Attachment #1.2: Type: text/html, Size: 4273 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2017-08-27 10:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-24 12:53 Some questions about my document Fabrice Couvreur
2017-08-26 10:27 ` Fabrice Couvreur
2017-08-26 22:14   ` Fabrice Couvreur
2017-08-27  9:03     ` Pablo Rodriguez
2017-08-27 10:29       ` Fabrice Couvreur
2017-08-27 10:43         ` Pablo Rodriguez
2017-08-27 10:54           ` Fabrice Couvreur

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