[NTG-context] slight correction to 'short filler rule' question

2020-08-24 Thread jbf
In the earlier post I mentioned the rules not balancing. That was my 
error. In experimenting with things I had made a minor error with one of 
the single \quad statements. Apologies. So, at this stage, replacing 
left=\zerowidthnobreakspace  with left=\quads[3] on the ChapterLeftRule, 
and doing similarly with right= for the ChapterRightRule, I do achieve 
something of the kind I am after. I can even go as far as \quads[5] I 
can see. So maybe I have achieved the desired effect. But it may not be 
the best way to do it, since I can't control the length of those rules 
by exact dimensions using this approach.


J.

___
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
___


[NTG-context] short filler rule either side of a text

2020-08-24 Thread jbf
I know it is possible to get a rule to act as a filler either side of, 
say, a chapter head text by using \definefiller with alternative=rule 
and, as explained in an earlier post 
, 
define a left and right version. So, for example, for the left version:


\definefiller
  [ChapterLeftRule]
  [ChapterRule]
  [left=\zerowidthnobreakspace,
   right=\quad]

This gives me a rule that extends to the margins. What if I want the 
rule to be, say, 2 cm either side of my centered header text? I tried 
experimenting by replacing left=\zerowidthnobreakspace with 
left=\quads[3] and that did shorten the rule somewhat, but when I did 
the same for the other side, it did not balance correctly. So maybe I 
need to deal with the 'left=' differently to achieve the desired 
result... or try an entirely different method!


Of course, I don't want the rule at the baseline, but raised, as the 
original stackexchange 
 
example gives. Any clues?


Julian

___
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
___


[NTG-context] keeping content chunks on same page

2020-08-24 Thread Mike Cooper
Just about to have these homework files finished!

My final problem (I hope) is keeping question/answer blocks together.

The questions are currently defined via \defineenumeration with a \testpage 
(see below).  I fiddled with the \testpage and found that \testpage[6] gave me 
the best results but there are still some question/answer blocks that get split 
across pages.  The content chunks can be as small as a single line question 
with T/F answer options, or as large as seven lines for the question and seven 
for the answer options (although I don't think both of these occur together).

In my searching for solutions, I thought I'd found something helpful with 
\startframed but I can't figure any way to combine the framed and enumeration...

Anyway, here's some code.  It doesn't demonstrate the page-break problem but 
gives an idea of the different possible sizes of question/answer chunks.

\defineenumeration[question]
   [text=,
headstyle=normal,
right=.,
alternative=left,
distance=1em,
width=fit,
before={\testpage[6]\blank[2em]},
after={\blank}
]

\defineitemgroup[achoices]
   [option={packed,a,broad},
left=(, right=), stopper=]

\starttext
\startquestion Before a joint of pipe is laid down, the thread protector should 
be installed.
\startachoices
\startitem True \stopitem
\startitem False \stopitem
\stopachoices
\stopquestion

\startquestion The hardest part of the drilling program for young drilling 
engineers to plan is the section on hole stability because they have not had 
much hole problem exposure and have not been told that this particular shale is 
a "twenty-day shale". The most likely reason for the breakdown in 
communications is:
\startachoices
\startitem Inadequate case history data and poorly completed field 
records and NO trend charts \stopitem
\startitem Mud company representatives are only calling on drilling 
superintendents and managers \stopitem
\startitem Drilling engineers cannot read "between the lines" on 
morning reports and therefore miss the point many times. \stopitem
\startitem Too few hours to do adequate offset well record check 
\stopitem
\stopachoices
\stopquestion

\startquestion If the toolpusher noted the following trend while RIH with drill 
pipe, what should he instruct the driller to do?
\setuptabulate[header=none]
\starttabulate[|c|c|c|]
\NC Stands \NC Increments required vs. actual \NC Trend \NC \NR
\NC 0-5 \NC 3.57 vs. 3.57 \NC ~0 \NC \NR
\NC 6-10\NC 3.57 vs. 2.57 \NC -1 \NC \NR
\NC 11-15\NC 3.57 vs. 1.57 \NC -2 \NC \NR
\stoptabulate
\startachoices
\startitem Continue to RIH to the casing shoe and observe the well 
\stopitem
\startitem Stop and break circulation every 12 stands \stopitem
\startitem Slow down because it looks like we are losing mud to the 
formation \stopitem
\startitem RIH quickly because it looks like the hole is trying to 
flow \stopitem
\stopachoices
\stopquestion

\stoptext


THANKS FOR YOUR HELP!


Mike Cooper
Technical Trainer
Murchison Drilling Schools, Inc.
2501 Juan Tabo NE
Albuquerque, NM 87112
Tel: (505) 293-6271
Fax: (505) 298-5294
Email: 
m...@murchisondrillingschools.com
Website: 
www.murchisondrillingschools.com
[cid:image007.jpg@01D03ADC.BD6E6850]
  [cid:image008.jpg@01D03ADC.BD6E6850] 
   
[cid:image009.jpg@01D03ADC.BD6E6850] 
Murchison Drilling Schools is now part of
[cid:image001.png@01D63515.857FD120]

___
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
___


Re: [NTG-context] Overriding the number on a float

2020-08-24 Thread Taco Hoekwater


> On 24 Aug 2020, at 19:59, Wolfgang Schuster 
>  wrote:
> 
>> 
>> 
>> \setcounter[figure][5] % next figure is no.6

For this subfigure stuff, perhaps this is useful?

% setup definitions
\definecounter[subfigure][way=bytext,prefix=no]
\setupcounter[subfigure][state=start,numberconversion=a]
\setcounter[subfigure][1]

\def\setsubfigures
  {\setcounter[subfigure][1]
   \incrementcounter[figure]
   
\setupcaption[figure][state=stop,numberstopper={\convertedcounter[subfigure]}]}

\def\unsetsubfigures
  {\setupcaption[figure][state=start,numberstopper=]}

%usage
\setsubfigures

\startplacefigure[title=Test figure]
\externalfigure[dummy]
\stopplacefigure

\incrementnumber[subfigure]

\startplacefigure[title=Test another figure]
\externalfigure[dummy]
\stopplacefigure

\unsetsubfigures


I could not find a safe way to increment the subfigure number automatically, 
unfortunately.

Best wishes,
Taco
___
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
___


Re: [NTG-context] Overriding the number on a float

2020-08-24 Thread Otared Kavian
Hi,

If there are a few special numberings of floats, and one wants floats numbered 
1.6a and 1.6b, the following seems to work:

Best regards: Otared

%%% begin ownnumber-in-floats.tex
\useMPlibrary[dum]

\starttext

\startsection[title=One]
\startplacefigure[title=Test]
\externalfigure[dummy]
\stopplacefigure
\stopsection

\startsection[title=Two]
\startplacefigure[title=Test]
\externalfigure[dummy]
\stopplacefigure
\stopsection

\setcounter[figure][5] % next figure is no.6

\startsection[ownnumber=10,title={A section}] 
\start
\setupcaptions[numberstopper={a}]
\startplacefigure[title=Test figure]
\externalfigure[dummy]
\stopplacefigure
\stop
\stopsection

\setcounter[figure][5]

\startsection[ownnumber=11,title={Another section}] % ownnumber doesn’t work
\start
\setupcaptions[numberstopper={b}]
\startplacefigure[title=Test another figure]
\externalfigure[dummy]
\stopplacefigure
\stop

\startplacefigure[title=Test another figure]
\externalfigure[dummy]
\stopplacefigure

\stopsection

\stoptext
%%% end ownnumber-in-floats.tex

> On 24 Aug 2020, at 19:37, Henning Hraban Ramm  wrote:
> 
> 
> 
>> Am 24.08.2020 um 17:36 schrieb Wolfgang Schuster 
>> :
>> 
>> Henning Hraban Ramm schrieb am 24.08.2020 um 15:29:
 Am 23.08.2020 um 11:25 schrieb Duncan Hothersall :
 
 I think there was a question on this very recently but I don;t think it 
 got an answer and I can't find it to reply to, so apologies for the extra 
 noise. I have a large text with floats numbered sequentially by chapter 
 and then figure/table number, but at the last minute I've had a request 
 for two figures in a particular chapter to become 27.1a and 27.1b instead 
 of 27.1 and 27.2. It's not a combination - they are separate figures on 
 different pages.
 
 I've experimented with the options I can see, but it's not obvious if 
 there is a facility to override the numbering of two figures in a stream 
 of normally numbered figures like this. I was thinking of the equivalent 
 of the old \sym{symbol} command that used to work as a way to override a 
 single item in an otherwise sequential list.
 
 I guess there's a brute force method of setting up a new type of figure 
 with the label "Figure 27.1" and having them numbered as lowercase alpha, 
 but if there's an easier way that would be great.
>>> I’m also interested in overriding automatical numbering, e.g. of chapters 
>>> or itemization items.
>>> E.g. in my songbook, I’d like to have the verses numbered but interrupted 
>>> by a chorus numbered as "C" (i.e. "R" in German).
>>> Similarly the paragraphs of some (by)laws that were changed a lot and use a 
>>> numbering like 1, 2, 3, 3a, 4, 7...
>>> Something like
>>> \startitem[number={R}]
>>> or
>>> \startsection[number={3a}]
>>> would be nice.
>>> If I set it to an integer, ConTeXt should set the counter accordingly, 
>>> otherwise continue counting from the previous calculated number. Would that 
>>> be possible?
>> 
>> 
>> You can set your own section numbers but the counter isn't stopped.
> 
> Thank you! I overlooked "ownnumber". It works for sections, but not for items 
> or floats.
> 
> \setnumber[section][10] doesn’t work, \setcounter the same (according to the 
> source they’re synonymous) – does section use a different counter name or is 
> it no counter at all?
> 
> \setnumber[figure][10] works (but only with integers, not some alphanumerical 
> stuff, sorry Duncan).
> 
> Hraban
> 
> 
> \useMPlibrary[dum]
> 
> \starttext
> 
> \startsection[title=One]
> \startplacefigure[title=Test]
> \externalfigure[dummy]
> \stopplacefigure
> \stopsection
> 
> \startsection[title=Two]
> \startplacefigure[title=Test]
> \externalfigure[dummy]
> \stopplacefigure
> \stopsection
> 
> \setcounter[figure][5] % next figure is no.6
> 
> \startsection[ownnumber=10,title=???] % ownnumber doesn’t work
> \startplacefigure[title=Test,ownnumber=10]
> \externalfigure[dummy]
> \stopplacefigure
> \stopsection
> 
> \setcounter[section][5] % doesn’t work
> 
> \startsection[title=Three]
> \startitemize[n]
>  \item one
>  \item two
>  \item three
>  \startitem[ownnumber=9] five\stopitem  % ownnumber doesn’t work
> \stopitemize
> \stopsection
> 
> \stoptext
> 
> ___
> 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
> ___

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

maillist : ntg-context@ntg.nl / 

Re: [NTG-context] Overriding the number on a float

2020-08-24 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 24.08.2020 um 19:37:

Am 24.08.2020 um 17:36 schrieb Wolfgang Schuster 
:

Henning Hraban Ramm schrieb am 24.08.2020 um 15:29:

Am 23.08.2020 um 11:25 schrieb Duncan Hothersall :

I think there was a question on this very recently but I don;t think it got an 
answer and I can't find it to reply to, so apologies for the extra noise. I 
have a large text with floats numbered sequentially by chapter and then 
figure/table number, but at the last minute I've had a request for two figures 
in a particular chapter to become 27.1a and 27.1b instead of 27.1 and 27.2. 
It's not a combination - they are separate figures on different pages.

I've experimented with the options I can see, but it's not obvious if there is 
a facility to override the numbering of two figures in a stream of normally 
numbered figures like this. I was thinking of the equivalent of the old 
\sym{symbol} command that used to work as a way to override a single item in an 
otherwise sequential list.

I guess there's a brute force method of setting up a new type of figure with the label 
"Figure 27.1" and having them numbered as lowercase alpha, but if there's an 
easier way that would be great.

I’m also interested in overriding automatical numbering, e.g. of chapters or 
itemization items.
E.g. in my songbook, I’d like to have the verses numbered but interrupted by a chorus numbered as 
"C" (i.e. "R" in German).
Similarly the paragraphs of some (by)laws that were changed a lot and use a 
numbering like 1, 2, 3, 3a, 4, 7...
Something like
\startitem[number={R}]
or
\startsection[number={3a}]
would be nice.
If I set it to an integer, ConTeXt should set the counter accordingly, 
otherwise continue counting from the previous calculated number. Would that be 
possible?


You can set your own section numbers but the counter isn't stopped.

Thank you! I overlooked "ownnumber". It works for sections, but not for items 
or floats.

\setnumber[section][10] doesn’t work, \setcounter the same (according to the 
source they’re synonymous) – does section use a different counter name or is it 
no counter at all?

\setnumber[figure][10] works (but only with integers, not some alphanumerical 
stuff, sorry Duncan).


\setupnumber is a synonym of \setupcounter and exists for backwards 
compatibility.



Hraban


\useMPlibrary[dum]

\starttext

\startsection[title=One]
\startplacefigure[title=Test]
\externalfigure[dummy]
\stopplacefigure
\stopsection

\startsection[title=Two]
\startplacefigure[title=Test]
\externalfigure[dummy]
\stopplacefigure
\stopsection

\setcounter[figure][5] % next figure is no.6

\startsection[ownnumber=10,title=???] % ownnumber doesn’t work
\startplacefigure[title=Test,ownnumber=10]
\externalfigure[dummy]
\stopplacefigure
\stopsection

\setcounter[section][5] % doesn’t work


\setupheadnumber[section][5]


\startsection[title=Three]
\startitemize[n]
   \item one
   \item two
   \item three
   \startitem[ownnumber=9] five\stopitem  % ownnumber doesn’t work



\starttext
\startitemize
\txt{I.} \unknown
\sym{7.} \unknown
\stopitemize
\stoptext

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


Re: [NTG-context] Overriding the number on a float

2020-08-24 Thread Henning Hraban Ramm


> Am 24.08.2020 um 17:36 schrieb Wolfgang Schuster 
> :
> 
> Henning Hraban Ramm schrieb am 24.08.2020 um 15:29:
>>> Am 23.08.2020 um 11:25 schrieb Duncan Hothersall :
>>> 
>>> I think there was a question on this very recently but I don;t think it got 
>>> an answer and I can't find it to reply to, so apologies for the extra 
>>> noise. I have a large text with floats numbered sequentially by chapter and 
>>> then figure/table number, but at the last minute I've had a request for two 
>>> figures in a particular chapter to become 27.1a and 27.1b instead of 27.1 
>>> and 27.2. It's not a combination - they are separate figures on different 
>>> pages.
>>> 
>>> I've experimented with the options I can see, but it's not obvious if there 
>>> is a facility to override the numbering of two figures in a stream of 
>>> normally numbered figures like this. I was thinking of the equivalent of 
>>> the old \sym{symbol} command that used to work as a way to override a 
>>> single item in an otherwise sequential list.
>>> 
>>> I guess there's a brute force method of setting up a new type of figure 
>>> with the label "Figure 27.1" and having them numbered as lowercase alpha, 
>>> but if there's an easier way that would be great.
>> I’m also interested in overriding automatical numbering, e.g. of chapters or 
>> itemization items.
>> E.g. in my songbook, I’d like to have the verses numbered but interrupted by 
>> a chorus numbered as "C" (i.e. "R" in German).
>> Similarly the paragraphs of some (by)laws that were changed a lot and use a 
>> numbering like 1, 2, 3, 3a, 4, 7...
>> Something like
>> \startitem[number={R}]
>> or
>> \startsection[number={3a}]
>> would be nice.
>> If I set it to an integer, ConTeXt should set the counter accordingly, 
>> otherwise continue counting from the previous calculated number. Would that 
>> be possible?
> 
> 
> You can set your own section numbers but the counter isn't stopped.

Thank you! I overlooked "ownnumber". It works for sections, but not for items 
or floats.

\setnumber[section][10] doesn’t work, \setcounter the same (according to the 
source they’re synonymous) – does section use a different counter name or is it 
no counter at all?

\setnumber[figure][10] works (but only with integers, not some alphanumerical 
stuff, sorry Duncan).

Hraban


\useMPlibrary[dum]

\starttext

\startsection[title=One]
\startplacefigure[title=Test]
\externalfigure[dummy]
\stopplacefigure
\stopsection

\startsection[title=Two]
\startplacefigure[title=Test]
\externalfigure[dummy]
\stopplacefigure
\stopsection

\setcounter[figure][5] % next figure is no.6

\startsection[ownnumber=10,title=???] % ownnumber doesn’t work
\startplacefigure[title=Test,ownnumber=10]
\externalfigure[dummy]
\stopplacefigure
\stopsection

\setcounter[section][5] % doesn’t work

\startsection[title=Three]
\startitemize[n]
  \item one
  \item two
  \item three
  \startitem[ownnumber=9] five\stopitem  % ownnumber doesn’t work
\stopitemize
\stopsection

\stoptext

___
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
___


Re: [NTG-context] Overriding the number on a float

2020-08-24 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 24.08.2020 um 15:29:




Am 23.08.2020 um 11:25 schrieb Duncan Hothersall :

I think there was a question on this very recently but I don;t think it got an 
answer and I can't find it to reply to, so apologies for the extra noise. I 
have a large text with floats numbered sequentially by chapter and then 
figure/table number, but at the last minute I've had a request for two figures 
in a particular chapter to become 27.1a and 27.1b instead of 27.1 and 27.2. 
It's not a combination - they are separate figures on different pages.

I've experimented with the options I can see, but it's not obvious if there is 
a facility to override the numbering of two figures in a stream of normally 
numbered figures like this. I was thinking of the equivalent of the old 
\sym{symbol} command that used to work as a way to override a single item in an 
otherwise sequential list.

I guess there's a brute force method of setting up a new type of figure with the label 
"Figure 27.1" and having them numbered as lowercase alpha, but if there's an 
easier way that would be great.


I’m also interested in overriding automatical numbering, e.g. of chapters or 
itemization items.

E.g. in my songbook, I’d like to have the verses numbered but interrupted by a chorus numbered as 
"C" (i.e. "R" in German).
Similarly the paragraphs of some (by)laws that were changed a lot and use a 
numbering like 1, 2, 3, 3a, 4, 7...

Something like
\startitem[number={R}]
or
\startsection[number={3a}]
would be nice.
If I set it to an integer, ConTeXt should set the counter accordingly, 
otherwise continue counting from the previous calculated number. Would that be 
possible?



You can set your own section numbers but the counter isn't stopped.

\starttext

\startsection[title=One]
\stopsection

\startsection[title=Two]
\stopsection

\startsection[ownnumber=X,title=???]
\stopsection

\startsection[title=Three]
\stopsection

\stoptext

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


Re: [NTG-context] Label to delete in the table of contents

2020-08-24 Thread Fabrice Couvreur
Thanks !!

Le lun. 24 août 2020 à 15:41, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> a écrit :

> Fabrice Couvreur schrieb am 24.08.2020 um 15:32:
>
> Hi Wolfgang,
> Thank you for your reply. Probably my fault but now I get the number 0 on
> the word "Summary".
> Fabrice
> [image: contents.png]
>
>
> \setuphead
>   [title]
>   [command=,
>numbercommand=]
>
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
___
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
___


Re: [NTG-context] Label to delete in the table of contents

2020-08-24 Thread Wolfgang Schuster

Fabrice Couvreur schrieb am 24.08.2020 um 15:32:

Hi Wolfgang,
Thank you for your reply. Probably my fault but now I get the number 0 
on the word "Summary".

Fabrice
contents.png


\setuphead
  [title]
  [command=,
   numbercommand=]

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


Re: [NTG-context] Label to delete in the table of contents

2020-08-24 Thread Fabrice Couvreur
Hi Wolfgang,
Thank you for your reply. Probably my fault but now I get the number 0 on
the word "Summary".
Fabrice
[image: contents.png]

Le lun. 24 août 2020 à 15:12, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> a écrit :

> Fabrice Couvreur schrieb am 23.08.2020 um 16:02:
>
> Hello,
> For the title of the chapters I use the following command.
>
> \unexpanded\def\HeadTitle#1#2%
>{\framed
>   [frame=off,
>width=fit,
>align=flushleft]
>{\color[darkgray]{\tfxx\cap\bf\labeltext{chapter}}
> \blank#1\blank#2}
>
> When I compile my project, I have the label "Chapitre" above the word
> "Sommaire" in the table of contents : how to delete it ?
>
>
> 1. Don't apply the command to \title
>
> \setuphead[title][command=]
>
>
> 2. Make the command local to bodypart of your document, this works only
> when you use section blocks (e.g. \startbodymatter)
>
> \startsectionblockenvironment[bodypart]
> \setuphead[chapter][command=\HeadTitle]
> \stopsectionblockenvironment
>
>
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
___
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
___


Re: [NTG-context] Overriding the number on a float

2020-08-24 Thread Henning Hraban Ramm


> Am 23.08.2020 um 11:25 schrieb Duncan Hothersall :
> 
> I think there was a question on this very recently but I don;t think it got 
> an answer and I can't find it to reply to, so apologies for the extra noise. 
> I have a large text with floats numbered sequentially by chapter and then 
> figure/table number, but at the last minute I've had a request for two 
> figures in a particular chapter to become 27.1a and 27.1b instead of 27.1 and 
> 27.2. It's not a combination - they are separate figures on different pages.
> 
> I've experimented with the options I can see, but it's not obvious if there 
> is a facility to override the numbering of two figures in a stream of 
> normally numbered figures like this. I was thinking of the equivalent of the 
> old \sym{symbol} command that used to work as a way to override a single item 
> in an otherwise sequential list.
> 
> I guess there's a brute force method of setting up a new type of figure with 
> the label "Figure 27.1" and having them numbered as lowercase alpha, but if 
> there's an easier way that would be great.

I’m also interested in overriding automatical numbering, e.g. of chapters or 
itemization items.

E.g. in my songbook, I’d like to have the verses numbered but interrupted by a 
chorus numbered as "C" (i.e. "R" in German).
Similarly the paragraphs of some (by)laws that were changed a lot and use a 
numbering like 1, 2, 3, 3a, 4, 7...

Something like
\startitem[number={R}]
or
\startsection[number={3a}]
would be nice.
If I set it to an integer, ConTeXt should set the counter accordingly, 
otherwise continue counting from the previous calculated number. Would that be 
possible?

BTW do sections, items and floats all use counters (\setnumber/\getnumber) or 
other mechanisms?


Hraban
___
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
___


Re: [NTG-context] Label to delete in the table of contents

2020-08-24 Thread Wolfgang Schuster

Fabrice Couvreur schrieb am 23.08.2020 um 16:02:

Hello,
For the title of the chapters I use the following command.

\unexpanded\def\HeadTitle#1#2%
   {\framed
[frame=off,
       width=fit,
       align=flushleft]
 {\color[darkgray]{\tfxx\cap\bf\labeltext{chapter}}
\blank#1\blank#2}

When I compile my project, I have the label "Chapitre" above the word 
"Sommaire" in the table of contents : how to delete it ?


1. Don't apply the command to \title

\setuphead[title][command=]


2. Make the command local to bodypart of your document, this works only 
when you use section blocks (e.g. \startbodymatter)


\startsectionblockenvironment[bodypart]
    \setuphead[chapter][command=\HeadTitle]
\stopsectionblockenvironment


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


Re: [NTG-context] color question

2020-08-24 Thread Henning Hraban Ramm


> Am 24.08.2020 um 01:15 schrieb jbf :
> 
> I have a very basic question about color use that someone will be able to 
> answer easily. The background to the question is that (i) I am completely new 
> to this scene of commercially[offset] print-ready material as distinct from 
> what is required on screen (ii) I am using Mk IV (iii) I need spot colors set 
> up for cmyk, and for now I need shades between black and white (e.g. light 
> gray) for a simple design feature.
> 
> My question is this: is the use of color keywords sufficient? Or in other 
> words, have predefined color names like lighgray already been defined in, say 
> cmyk terms behind the scenes, or must I instead 
> \definecolor[lightgray][c=10,m=7,y=5,k=0],   (or perhaps \definespotcolor 
> with those dimensions, or do I need both)?

First: Color parts use decimal numbers from 0 to 1.

Even if some color names are predefined, you should define your grays yourself 
– either as shades of black only or maybe with a bit of cyan. Grays in more 
(process) colors are unstable and might get a tint (color cast) you don’t want. 
(Of course you could use other colors than cyan for some tinting, depending on 
your work.)

E.g. I often \definecolor[deepblack][c=.3,k=1] for black areas; the cyan 
portion evens out some irregularities in print.
Because I don’t trust ConTeXt’s (or my) color setup, I also 
\definecolor[cmykblack][k=1] to avoid “RGB black”. (But 
\setupcolor[cmyk=yes,rgb=no,overprint=yes] should handle that already.)

If you want to use grays as spot colors (e.g. Pantone) you must define them as 
such – but usually you don’t want (to pay for) more than one spot color. Spot 
gray makes sense if you have big areas of that color, since 100% spot color 
looks better than any percent rastered black.

See also:
https://wiki.contextgarden.net/Color
https://wiki.contextgarden.net/Spot_Colors


Hraban (printing engineer)

___
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
___