Hello, In the code below, why headcommand enough ? thanks, Fabrice \setupbodyfont[pagella,11pt] \defineframed [ACFRAME] [width=0.5cm, height=0.5cm, background=color, backgroundcolor=red, foregroundcolor=white, forgroundstyle=bold, framecolor=red, ] \defineenumeration [ex] [text=, distance=0.3em, width=fit, headcommand=\ACFRAME, %numberconversionset=ACCONVERSION, alternative=serried, ] %\defineprocessor[ACPROCESSOR][color=white,command=\groupedcommand{}{}] %\defineconversionset[ACCONVERSION][][ACPROCESSOR->n] \starttext \dorecurse {5} { \startex \input knuth \stopex } \stoptext
Fabrice Couvreur mailto:fabrice1.couvreur@gmail.com 22. Juli 2016 um 00:57 Hello, In the code below, why headcommand enough ? I’m sorry but I don’t know what you’re asking for.
Wolfgang
Hi Wolfgang, In fact, I wanted to know why the instructions to create a new style for the counter were useless (% in the code) . I think I understand that headnumber sends settings (text and number) to the \ACFRAME command. Fabrice Envoyé de mon iPad
Le 22 juil. 2016 à 01:22, Wolfgang Schuster
a écrit : Fabrice Couvreur 22. Juli 2016 um 00:57 Hello, In the code below, why headcommand enough ? I’m sorry but I don’t know what you’re asking for.
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 ___________________________________________________________________________________
Fabrice Couvreur mailto:fabrice1.couvreur@gmail.com 22. Juli 2016 um 02:02 Hi Wolfgang, In fact, I wanted to know why the instructions to create a new style for the counter were useless (% in the code) . The settings aren’t useless, the are applied to the counter as intended.
\setupbodyfont[pagella,11pt] \defineprocessor[ACPROCESSOR][color=red] \defineconversionset[ACCONVERSION][][ACPROCESSOR->n] \defineenumeration [ex] [text=, distance=0.3em, width=fit, numberconversionset=ACCONVERSION, alternative=serried] \starttext \dorecurse{5} {\startex \input knuth \stopex} \stoptext
I think I understand that headnumber sends settings (text and number) to the \ACFRAME command. The headcommand is applied to the text *and* counter of the enumeration while numberconversionset changes on the counter, i.e. when you want a frame only around the counter you have to use numberconversionset but when you want a frame around both you have to use headcommand.
Wolfgang
Hi Wolfgang,
It is clear, I think I understand (My English is not perfect !). So back to
my original post, if I want only the counter is white and surrounded by a red
frame, just write :
\defineenumeration
[ex]
[text=,
distance=0.3em,
width=fit,
numberconversionset=ACCONVERSION,
alternative=serried,
]
\defineprocessor[ACPROCESSOR][command=\ACFRAME]
\defineconversionset[ACCONVERSION][][ACPROCESSOR->n]
Thanks,
Fabrice
2016-07-22 8:08 GMT+02:00 Wolfgang Schuster
Fabrice Couvreur
22. Juli 2016 um 02:02 Hi Wolfgang, In fact, I wanted to know why the instructions to create a new style for the counter were useless (% in the code) . The settings aren’t useless, the are applied to the counter as intended.
\setupbodyfont[pagella,11pt]
\defineprocessor[ACPROCESSOR][color=red] \defineconversionset[ACCONVERSION][][ACPROCESSOR->n]
\defineenumeration [ex] [text=, distance=0.3em, width=fit, numberconversionset=ACCONVERSION, alternative=serried]
\starttext
\dorecurse{5} {\startex \input knuth \stopex}
\stoptext
I think I understand that headnumber sends settings (text and number) to the \ACFRAME command.
The headcommand is applied to the text *and* counter of the enumeration while numberconversionset changes on the counter, i.e. when you want a frame only around the counter you have to use numberconversionset but when you want a frame around both you have to use headcommand.
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
___________________________________________________________________________________
Fabrice Couvreur mailto:fabrice1.couvreur@gmail.com 22. Juli 2016 um 09:48 Hi Wolfgang, It is clear, I think I understand(My English is not perfect !). So back to my original post, if I want only the counter is white and surrounded by a red frame, just write:
\defineenumeration [ex] [text=, distance=0.3em, width=fit, numberconversionset=ACCONVERSION, alternative=serried, ]
\defineprocessor[ACPROCESSOR][command=\ACFRAME] \defineconversionset[ACCONVERSION][][ACPROCESSOR->n] You can play with the position of the frame and place the number on the same line as the content:
\defineframed [ACFRAME] [frame=off, offset=0pt, location=low, width=\struttotal, background=color, backgroundcolor=red, foregroundcolor=white, forgroundstyle=bold] Wolfgang
Thanks Wolfgang
Fabrice
2016-07-22 10:26 GMT+02:00 Wolfgang Schuster
Fabrice Couvreur
22. Juli 2016 um 09:48 Hi Wolfgang, It is clear, I think I understand (My English is not perfect !). So back to my original post, if I want only the counter is white and surrounded by a red frame, just write : \defineenumeration [ex] [text=, distance=0.3em, width=fit, numberconversionset=ACCONVERSION, alternative=serried, ]
\defineprocessor[ACPROCESSOR][command=\ACFRAME] \defineconversionset[ACCONVERSION][][ACPROCESSOR->n]
You can play with the position of the frame and place the number on the same line as the content:
\defineframed [ACFRAME] [frame=off, offset=0pt, location=low, width=\struttotal, background=color, backgroundcolor=red, foregroundcolor=white, forgroundstyle=bold]
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
___________________________________________________________________________________
participants (2)
-
Fabrice Couvreur
-
Wolfgang Schuster