Re: [NTG-context] chapter numbers

2020-06-08 Thread jbf
A useful distinction to know. Do you think this is made clear on the 
wiki? In fact I am sure that the information is there precisely as you 
have put it, but the challenge (for the wiki and the wiki user) is to 
find it. Your many brief and to-the-point explanations of these little 
matters, Wolfgang, are like grains of gold in the sands, that one has to 
pan for.


Julian

On 9/6/20 5:25 am, Wolfgang Schuster wrote:

Duncan Hothersall schrieb am 08.06.2020 um 08:35:
Use \setuplabeltext instead of \setupheadtext. I agree 
the documentation suggests \setupheadtext should work the same way, 
but it doesn't seem to. You might also want a space after the word 
Chapter.


It works the same way but it's used for a different purpose.

The \setupheadtext command is used to change the default titles for 
\completecontent, \completeindex etc.


 begin example
\setupheadtext[en][content=Table of Contents]

\starttext
\completecontent
\stoptext
 end example

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] start/stop executed conditionally on mode ?

2020-06-08 Thread Wolfgang Schuster

Fabrice L schrieb am 08.06.2020 um 21:53:

Thanks to Aditya, I have succeeded, but it was not trivial for me. So, 
in case somebody someday would need a detailed solution, here is a 
minimal example, and an explanation.


A buffer « Questions » is defined. If in « ClassRoom » mode, a 
start/stop « Questions » is also defined. So when ConTeXt encounters the 
\startQuestions / \stopQuestions, if the « ClassRoom » mode is enabled, 
the buffer is processed (with some format if needed - framed here for 
the example), and if the mode « ClassRoom » is disabled, then nothing is 
process. You can add as many \startQuestions / \stopQuestions you wish.


Let me give a better explanation.


The line

\definebuffer [Questions]

serves two purposes:

1. It create a Questions environment (\startQuestions ... 
\stopQuestions)


2. I gobbles the content of the environment.


When you enable the ClassRoom mode ConTeXt encounters this line

\definestartstop [Questions]

which redefines the Questions environment which uses now the 
startstop-mechanism but the previously created environment buffer based 
environment no longer exists.


The reason for this redefinition is to keep the content of the 
environment in the document although you could have used other methods 
to achieve the same as \definestartstop.


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] start/stop executed conditionally on mode ?

2020-06-08 Thread Fabrice L


> Le 7 juin 2020 à 23:19, Aditya Mahajan  a écrit :
> 
> On Sun, 7 Jun 2020, Fabrice L wrote:
> 
>> Dear List,
>> 
>> I would like to insert a page using (ideally) start/stop instructions. The 
>> problem is that this page should be inserted only in a certain mode. 
>> Consulting the mailing list, I thought the following code was working, but 
>> it’s not ! The code is executed in the mode as expected, but the following 
>> instructions ("Some other text... » in the exemple) is not typeset.
>> 
>> Here is a minimal (not working!) example:
>> 
>> % 
>> \unexpanded\def\StartQuestionsList{
>>  \startmode[ClassRoom]  \page[yes] Here are some questions: \blank
>> }
>> \unexpanded\def\StopQuestionsList{
>>  \page[yes] \stopmode
>> }
>> \definestartstop[Questions][
>>  before=\StartQuestionsList,
>>  after=\StopQuestionsList
>>  ]
>> 
>> 
>> \startQuestions
>>  Question A….
>>  Question B….
>> \stopQuestions
>> 
>> Some other text...
>> % 
>> 
>> 
>> So to be clear, I would like the result in the « ClassRoom » mode to be:
>> % 
>> Here are some questions:
>> 
>>  Question A….
>>  Question B….
>> 
>> Some other text...
>> % 
>> 
>> Otherwise to be:
>> % 
>> Some other text...
>> % 
> 
> If you only set `ClassRoom` mode at compile time (rather than setting and 
> unsetting it the middle of the document), then you can do:
> 
> \definebuffer[Questions]
> 
> \startmode[ClassRoom]
> \define\StopQuestionsList {...}
> 
> \definestartstop[Questions][...]
> \stopmode
> 

Thanks to Aditya, I have succeeded, but it was not trivial for me. So, in case 
somebody someday would need a detailed solution, here is a minimal example, and 
an explanation. 

A buffer « Questions » is defined. If in « ClassRoom » mode, a start/stop « 
Questions » is also defined. So when ConTeXt encounters the \startQuestions / 
\stopQuestions, if the « ClassRoom » mode is enabled, the buffer is processed 
(with some format if needed - framed here for the example), and if the mode « 
ClassRoom » is disabled, then nothing is process. You can add as many 
\startQuestions / \stopQuestions you wish. 


% --
\definebuffer[Questions]

\enablemode[ClassRoom] % Try "On / Off » to process "\startQuestions / 
\stopQuestions » or not.

\startmode[ClassRoom]
 
\definestartstop[Questions][before={\startframedtext\red},after={\stopframedtext\blue}]
\stopmode

\starttext

Before...

\startQuestions
The content of the buffer ! 
\stopQuestions

After...

\stoptext
% --

Thanks Aditya !
Fabrice.



> Aditya___
> 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] use parentheses in itemize

2020-06-08 Thread Mike Cooper
Thanks David!

I also realized (with some help! Thanks John!) that I was completely 
overlooking the answers to my original question, as well as "what is stopper?" 
on the wiki.



-Original Message-
From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of David Rogers
Sent: Friday, June 05, 2020 9:24 PM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] use parentheses in itemize

On June 3, 2020 7:01:57 a.m. PDT, Mike Cooper 
 wrote:
>The logic in that approach is obvious.  Thanks Aditya.
>
>But then, what is "stopper"?  What's it for?  What happens if you just
>leave it out?

When you leave it out, it's simply not used. In broad general terms, ConTeXt is 
set up to allow you to just ignore any features you don't need.

Stopper is for when you want

(1.)
(2.)

or

(1:)
(2:)

or any other thing that suits you, to be placed after each number. "Nothing" is 
certainly one of the legitimate and common choices for this purpose, and Aditya 
took the step of actually defining it as "nothing" by typing "stopper=". (After 
the equals sign comes... you guessed it.) :) 

Doing such a "define it to be nothing" step would be especially 
helpful/important if you DID have it defined as something for a different part 
of your document, and then wanted to change styles part way through.

-- 
David
___
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] chapter numbers

2020-06-08 Thread Wolfgang Schuster

Duncan Hothersall schrieb am 08.06.2020 um 08:35:
Use \setuplabeltext instead of \setupheadtext. I agree the documentation 
suggests \setupheadtext should work the same way, but it doesn't seem 
to. You might also want a space after the word Chapter.


It works the same way but it's used for a different purpose.

The \setupheadtext command is used to change the default titles for 
\completecontent, \completeindex etc.


 begin example
\setupheadtext[en][content=Table of Contents]

\starttext
\completecontent
\stoptext
 end example

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] wiki update - status

2020-06-08 Thread Aditya Mahajan

On Mon, 8 Jun 2020, Garulfo wrote:


- Remove former "manually made links bar" at the top of the pages
  current structure should be enough now have an easier understanding of
  the wiki structure.


Along that line, we should also considering fixing the getting started navbox 
or removing it altogether. It used to have a nice visual layout, but that was 
lost when upgrading the wiki. In the current form, it uses too much vertical 
space and it might be redundant with the new wiki structure.

Aditya
___
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] start/stop executed conditionally on mode ?

2020-06-08 Thread Fabrice L
Dear Aditya,

> Le 7 juin 2020 à 23:19, Aditya Mahajan  a écrit :
> 
> On Sun, 7 Jun 2020, Fabrice L wrote:
> 
>> Dear List,
>> 
>> I would like to insert a page using (ideally) start/stop instructions. The 
>> problem is that this page should be inserted only in a certain mode. 
>> Consulting the mailing list, I thought the following code was working, but 
>> it’s not ! The code is executed in the mode as expected, but the following 
>> instructions ("Some other text... » in the exemple) is not typeset.
>> 
>> Here is a minimal (not working!) example:
>> 
>> % 
>> \unexpanded\def\StartQuestionsList{
>>  \startmode[ClassRoom]  \page[yes] Here are some questions: \blank
>> }
>> \unexpanded\def\StopQuestionsList{
>>  \page[yes] \stopmode
>> }
>> \definestartstop[Questions][
>>  before=\StartQuestionsList,
>>  after=\StopQuestionsList
>>  ]
>> 
>> 
>> \startQuestions
>>  Question A….
>>  Question B….
>> \stopQuestions
>> 
>> Some other text...
>> % 
>> 
>> 
>> So to be clear, I would like the result in the « ClassRoom » mode to be:
>> % 
>> Here are some questions:
>> 
>>  Question A….
>>  Question B….
>> 
>> Some other text...
>> % 
>> 
>> Otherwise to be:
>> % 
>> Some other text...
>> % 
> 
> If you only set `ClassRoom` mode at compile time (rather than setting and 
> unsetting it the middle of the document), then you can do:
> 
> \definebuffer[Questions]
> 
> \startmode[ClassRoom]
> \define\StopQuestionsList {...}
> 
> \definestartstop[Questions][...]
> \stopmode
> 


Thanks for your answer, I will try that.
Fabrice,


___
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] wiki update - status

2020-06-08 Thread Marcus Vinicius Mesquita
So much better! Thank you very much for the effort!

Greetings

Marcus Vinicius

On Sun, Jun 7, 2020, 19:05 Garulfo  wrote:

> Hi all,
>
> New source browser is nice ! Thanks a lot.
>
> After level 1 (Main Page / Download and Install / Documentation /
> Mailing lists), I mostly finished a review of level 2 (and some level 3)
> pages.
>
> Several tweaks all over the place like:
>
> - Fonts: full update for newcomers,
> - Try to be responsive "enough" for smartphone
> - More homogeneous style / theme
> - Old Content category and tag pages, update dead links
> - Layout:
>- do the todo, like merging content of paper setup + paper sizes pages
>- complete the flow with imposition
>- rework the "Further reading section", add PDF links and so on
> - Programming & DB:
>- Gather "Calling Lua from TeX" and "Calling TeX from Lua"
>  (section +links) in a same page
> - Tools:
>- segregate "core tools" and "additional tools"
>- highlight existence of mtxrun and context scripts pages
> - Remove former "manually made links bar" at the top of the pages
>current structure should be enough now have an easier understanding of
>the wiki structure.
>
> Thanks for your help Taco, Hans, Aditya, Hraban, Tomáš.
>
> I hope that this will help to improve the reception of users and their
> willingness to contribute.
>
> Bye.
>
> ___
> 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] wiki update - status

2020-06-08 Thread Hans Hagen

On 6/8/2020 12:05 AM, Garulfo wrote:

Hi all,

New source browser is nice ! Thanks a lot.

After level 1 (Main Page / Download and Install / Documentation / 
Mailing lists), I mostly finished a review of level 2 (and some level 3) 
pages.


Several tweaks all over the place like:

- Fonts: full update for newcomers,
- Try to be responsive "enough" for smartphone
- More homogeneous style / theme
- Old Content category and tag pages, update dead links
- Layout:
   - do the todo, like merging content of paper setup + paper sizes pages
   - complete the flow with imposition
   - rework the "Further reading section", add PDF links and so on
- Programming & DB:
   - Gather "Calling Lua from TeX" and "Calling TeX from Lua"
     (section +links) in a same page
- Tools:
   - segregate "core tools" and "additional tools"
   - highlight existence of mtxrun and context scripts pages
- Remove former "manually made links bar" at the top of the pages
   current structure should be enough now have an easier understanding of
   the wiki structure.

Thanks for your help Taco, Hans, Aditya, Hraban, Tomáš.

I hope that this will help to improve the reception of users and their 
willingness to contribute.

I'm really impressed by all the progress that has been made!

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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] chapter numbers

2020-06-08 Thread jbf
Thanks Duncan. It can be quite a struggle working through potentially 
conflicting items in the documentation. I applaud the recent efforts to 
improve the overall presentation of the wiki, though. Your simple little 
change (plus the space!) works of course.


Julian


On 8/6/20 4:35 pm, Duncan Hothersall wrote:
Use \setuplabeltext instead of \setupheadtext. I agree 
the documentation suggests \setupheadtext should work the same way, 
but it doesn't seem to. You might also want a space after the word 
Chapter.


Duncan

On Mon, 8 Jun 2020 at 05:38, jbf > wrote:


I am attempting to get the word 'Chapter' to appear in the Chapter
title, followed by its number, and I attempted to do it simply with:

\setupheadtext[chapter=Chapter]
\setuphead
   [chapter]
   [header=empty]

What I get is simply the number, e.g. 1 My first chapter, 2 My second
chapter etc. \setupheadtext is being ignored. What am I doing wrong?

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

___



--
Duncan Hothersall, Operations Director
CAPDM Limited - Online Program Enablers
0131 677 2400 www.capdm.com 
Registered in Scotland: SC168970       VAT: 682 846 983
Registered address: 20 Forth Street Edinburgh EH1 3LH UK 



Capture, author, publish, deliver and manage your learning materials.

*Sign up to the CAPDM newsletter here
*

___
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] chapter numbers

2020-06-08 Thread Duncan Hothersall
Use \setuplabeltext instead of \setupheadtext. I agree the documentation
suggests \setupheadtext should work the same way, but it doesn't seem to.
You might also want a space after the word Chapter.

Duncan

On Mon, 8 Jun 2020 at 05:38, jbf  wrote:

> I am attempting to get the word 'Chapter' to appear in the Chapter
> title, followed by its number, and I attempted to do it simply with:
>
> \setupheadtext[chapter=Chapter]
> \setuphead
>[chapter]
>[header=empty]
>
> What I get is simply the number, e.g. 1 My first chapter, 2 My second
> chapter etc. \setupheadtext is being ignored. What am I doing wrong?
>
> 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
>
> ___
>


-- 
Duncan Hothersall, Operations Director
CAPDM Limited - Online Program Enablers
0131 677 2400  www.capdm.com
Registered in Scotland: SC168970   VAT: 682 846 983
Registered address: 20 Forth Street Edinburgh EH1 3LH UK


Capture, author, publish, deliver and manage your learning materials.


*Sign up to the CAPDM newsletter here *
___
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
___