Re: [NTG-context] \title with extra content in toc

2020-08-11 Thread Mikael Sundqvist
I do not recommend against the start/stop variant, but in this case I think
you can also do

\chapter[title=..., list=..., bookmark=...]

/Mikael

Den ons 12 aug. 2020 05:46jbf  skrev:

> That is clear enough and works (of course!) and reminds me that I'm
> better off using the \starttitle...\stoptitle format than just \title as
> I have been.
>
> J
>
> On 12/8/20 1:23 pm, Aditya Mahajan wrote:
>
> > [
> >   title={Title of chapter},
> >   list={What appears in TOC},
> >   bookmark={What appears in bookmarks},
> > ]
>
> ___
> 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
___


[NTG-context] further to the earlier header question

2020-08-11 Thread jbf
Clearly I am now getting myself quite confused where headers are 
concerned, and have sought as much info as I can on the wiki, but am not 
getting the desired results. We are talking about ConTeXt MkIV and a 
doublesided document.


If I only use \chapter throughout and have my setup as:

\setupheadertexts
  [{\hfill\getmarking[chapter]\hfill}][]
  [{\hfill\documentvariable{metadata:title}\hfill}][]

then everything works as it should: Chapter title as header on recto 
pages and book title as header on verso pages. And as chapters change so 
does the header on the recto page.


But this book has some 'chapters' that need to be unnumbered, for which 
I am using \title in the main body (as well as in frontmatter). 
Everything else about this choice works, except for the recto headers.


If I use ONLY the setup above, then fairly obviously the numbered 
Chapters work, but those with \title continue to use the previous 
Chapter header for the recto pages (the verso pages with the book title 
is okay). So I understand that I may need to also give a command for the 
\title 'chapters' to act the way the other numbered chapters do. So I 
thought I could do this by simply adding the same set of commands above, 
but this time using title:


\setupheadertexts
  [{\hfill\getmarking[*chapter*]\hfill}][]
  [{\hfill\documentvariable{metadata:title}\hfill}][]

\setupheadertexts
  [{\hfill\getmarking[*title*]\hfill}][]
  [{\hfill\documentvariable{metadata:title}\hfill}][]

However, when I do this, I get strange behaviour: now the numbered 
chapters do not show their recto header at all (the verso book title 
still appears though). The unnumbered \title chapters now show the 
headers but the same behaviour as indicated above occurs - the next 
numbered chapter after that carries the previous unnumbered chapter's title.


Obviously I cannot do things the way I am doing it, but I cannot find 
how to do it.


The other behaviour is the one I noted in an earlier post -  if I get 
\title (used for an introduction) in the frontmatter to work with the 
correct headers, in the case of this Introduction (which is seven 
pages), the last of the recto pages does not bear the header 
'Introduction'. Perhaps this is expected behaviour?


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
___


Re: [NTG-context] Help on tweaking alignment, page numbers and ToC

2020-08-11 Thread Wolfgang Schuster

Nicola schrieb am 11.08.2020 um 22:21:

On 2020-08-11, Pablo Rodriguez  wrote:

On 8/11/20 9:24 PM, Nicola wrote:

Thank Pablo, Wolfgang,
I have learned more by reading your replies than by myself in the rest
of the afternoon.


Hi Nicola,

if you found replies useful, please update the wiki (this may help others).


Just one more thing:
[...]
I'd prefer all the titles to be aligned:

  Preface
I XYZ
   ...
VIII XYZ
   ...

I have tried to do my homework by playing with \setuphead, but I am
afraid I need your help on this.


Sorry, but too tired to type a sample.

How about setting distance for \setuplist[chapter] in the sectionblock
frontpart with the desired width?


That does not seem to change the layout, unfortunately. I have tried
with `margin` and `aligntitle` as well:

\setuplist[chapter][distance=1cm,aligntitle=yes]
\startsectionblockenvironment[frontpart]
\setuplist[chapter][aligntitle=yes,margin=2cm,distance=2cm]
\stopsectionblockenvironment

I'll take a fresh look tomorrow.


When you a unnumbered section with the list alternatives a-c your're out 
of luck with the regular \setuplist options because it always use a 
width of 0pt for regular section number. The aligntitle works only for 
numbered entries to align them when you disable the number entry in the TOC.


To show the section entry and align all entries on the same line you can 
use the following method:


  1. Set the width and distance for the section number to 0pt.

  2. Set the margin key to a value large enough to fit all numbers

  3. Apply a command to the numbercommand key where you shift the 
number to the left in the margin area you set in the previous step


 begin example
\define[1]\ChapterListNumbercommand
  {\offset[x=-1cm,width=0pt]{\simplealignedbox{1cm}{flushleft}{#1}}}

\setuplist
  [chapter]
  [distance=0cm,
   width=0cm,
   margin=1cm,
   numbercommand=\ChapterListNumbercommand]

\starttext

\startfrontmatter
  \completecontent
  \chapter{Preface}
\stopfrontmatter

\startbodymatter
  \chapter{Introduction}
  \chapter{Workflow}
  \chapter{Input}
  \chapter{Output}
\stopbodymatter

\startbackmatter
  \chapter{Index}
\stopbackmatter

\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] \title with extra content in toc

2020-08-11 Thread jbf
That is clear enough and works (of course!) and reminds me that I'm 
better off using the \starttitle...\stoptitle format than just \title as 
I have been.


J

On 12/8/20 1:23 pm, Aditya Mahajan wrote:


[
  title={Title of chapter},
  list={What appears in TOC},
  bookmark={What appears in bookmarks},
    ] 

___
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] \title with extra content in toc

2020-08-11 Thread Aditya Mahajan

On Wed, 12 Aug 2020, jbf wrote:

Still dealing with \title, but am creating a separate thread because the 
question is different.


As well as using \title within frontmatter (my previous question was 
about the header not appearing on final page if it is an odd/recto page) 
I am also using it in the main body for 'chapters' that I don't want 
numbered, and of course, have ensured that such \title items can appear 
in the TOC. But I want to add a one-word comment in brackets to the 
title that appears in the TOC, so that I get:


Chapter title (comment).. 5  or whatever the page number is.

Is there are way I can add  extra content to an item that appears in the 
TOC?


\startchapter
[
  title={Title of chapter},
  list={What appears in TOC},
  bookmark={What appears in bookmarks},
]


\stopchapter

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] \checkpage in the TOC

2020-08-11 Thread Hans Hagen

On 8/10/2020 11:02 PM, Willi Egger wrote:

Hello!

humble, in another book I am trying to improve the list of contents. On 
different places occur page breaks which should be addressed and corrected.


I tried to use the method \checkpage[][], however my attempts are not 
succesful.


For your reference I include a screenshot of the problematic pagebreak.

\definepagechecker
    [willi]
    [method=1,before=,after=,inbetween={\page}]

\setuplist
[chapter]
[prefix=no,
sectionnumber=no,
headnumber=no,
    alternative=command,
    command=\Mychaptercommand,
   inbetween={\checkpage[willi][lines=4]}

Thank you for advice!
Kind regards
Willi
]

Here's an example of an actually already quite old mechanism ..

\showinjector

\setinjector[register][3][\column]
\setinjector[list][2][{\blank[3*big]}]

\starttext
\placelist[section][criterium=text]
\blank[3*big]
\placeregister[index][criterium=text]
\page
\startsection[title=Alpha] first  \index{first}  \stopsection
\startsection[title=Beta]  second \index{second} \stopsection
\startsection[title=Gamma] third  \index{third}  \stopsection
\startsection[title=Delta] fourth \index{fourth} \stopsection
\stoptext

.. so you now have something to wikify ..

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
___


[NTG-context] \title with extra content in toc

2020-08-11 Thread jbf
Still dealing with \title, but am creating a separate thread because the 
question is different.


As well as using \title within frontmatter (my previous question was 
about the header not appearing on final page if it is an odd/recto page) 
I am also using it in the main body for 'chapters' that I don't want 
numbered, and of course, have ensured that such \title items can appear 
in the TOC. But I want to add a one-word comment in brackets to the 
title that appears in the TOC, so that I get:


Chapter title (comment).. 5  or whatever the page number is.

Is there are way I can add  extra content to an item that appears in the 
TOC? In this case it would be the same comment in each instance, but my 
question assumes that there could also be a need for different comments, 
none of which appear in the 'chapter' title in the main body.


Am using MkIV BTW,

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] header text on final page of section

2020-08-11 Thread jbf
I am using \title within frontmatter for an introduction. The 
\setupheadertexts for title (recto and verso pages) is:


\setupheadertexts
  [{\hfill\getmarking[title]\hfill}][]
  [{\hfill\documentvariable{metadata:title}\hfill}][]

Now, that setup (this time for [chapter]) works correctly for chapters 
in the main body of text, but for some reason that I am unaware of, in 
the case of the 'Introduction', I get a header text ('Introduction' is 
the text) where I should */except for the last page of the 
introduction/* (There are seven pages in the intro, so it is the 7th, 
therefore odd-numbered page that is missing the header).


I would like to understand why this is happening and, of course, be able 
to adjust something so that I do get the header on that page, as I do 
for the other pages.


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
___


Re: [NTG-context] How can I use ConTeXt from TeXLive2020 ?

2020-08-11 Thread Otared Kavian
Hi Hans,

Thanks for your explanations, which clarify why sometimes ConTeXt may not work 
straight of TeXLive.
Nevertheless I will contact the people who maintain MacTeX in order for them to 
be aware of the issue I encounter, so that hopefully in the future releases 
people would be able to use ConTeXt from MacTeX.

Best regards: Otared

> On 11 Aug 2020, at 17:25, Hans Hagen  wrote:
> 
> Hi,
> 
> A few remarks.
> 
> In a mkiv luatex setup there are (on a unix system):
> 
>  luatex  : binary
>  mtxrun  : a copy of mtxrun.lua
>  context : a shell script starting mtxrun
> 
> Now, the problem there is that these shebang lines are limited, i.e. there is 
> no way to pass an argument and we need to start luatex in lua mode. This is 
> why the program refered to is texlua which is a copy of or symlink to luatex 
> and when called with that name it knows that it has to start in lua mode.
> 
> On windows there are two small stubs: mtxrun.exe and context.exe an both will 
> start luatex (no need for texlua there) with the same script etc.
> 
> In a luametatex setup we have a uniform and simpler model.
> 
>  luametatex   : binary
>  mtxrun   : a copy of luametex or symlink to it
>  context  : a copy of luametex or symlink to it
>  mtxrun.lua   : used when mtxrun is started
>  context.lua  : used when context is started
> 
> So, here the 'context' link (or copy) from it's name knows to start in lua 
> mode and load context.lua (which actually loads mtxrun.lua + 
> mtx-context.lua). It's the same on all platforms.
> 
> Now, already long ago we ditched all other stubs simply because given the 
> amount of scripts in a tex live setup it's a recipe for clashes (scripts also 
> have to compete with programs / scripts  installed as part of the os and 
> other programs so even more opportunity for clashes). We just use
> 
>  mtxrun --script ...
> 
> instead (and texmfstart in a mkii setup).
> 
> These models cannot be mixed, which is why in a luametatex lmtx setup we use 
> "context --luatex" to start mkiv, where luametatex is the runner.
> 
> Hans
> 
> ps. I remember the times that context was considered bad because it needed a 
> runner, read: a script was part of the deal and a tex run should not have 
> such a depedency; the need to install perl or ruby was seen as a shortcoming. 
> We also used scripts to generate font metric files (context didn't depend on 
> other programs for toc and index generation and had just one auxiliary file). 
> But times have changed and scripts are now hip and modern in the tex 
> ecosysystem, which is why we basically limit ourselves to just 'context' and 
> 'mtxrun' and start all the other context related scripts indirectly.
> 
> -
>  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] Page number 0 in Table of Contents with makeup

2020-08-11 Thread Nicola
On 2020-08-11, Pablo Rodriguez  wrote:
> On 8/11/20 10:11 PM, Nicola wrote:
>> Consider this example:
>>
>> \definemakeup[toc][align=middle]
>> \setuppagenumbering[alternative=doublesided]
>> \starttext
>>   \startfrontmatter
>> \startmakeup[toc]
>>   \placecontent
>> \stopmakeup
>> %\setuppagenumber[number=1]
>> \startchapter[title={A}]\stopchapter
>> \startchapter[title={B}]\stopchapter
>>   \stopfrontmatter
>> \stoptext
>>
>> The first entry in the ToC has page number 0. I can fix it by
>> uncommenting the commented line or by removing the makeup. Is this
>> expected behaviour? If so, why?
>
> Hi Nicola,
>
> makeups have pagestate set to stop by default.
>
> \definemakeup[toc][align=middle, pagestate=start] solves your issue.
>
> I hope it helps,

Yes, it does!

Thanks,
Nicola

___
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] Help on tweaking alignment, page numbers and ToC

2020-08-11 Thread Nicola
On 2020-08-11, Pablo Rodriguez  wrote:
> On 8/11/20 9:24 PM, Nicola wrote:
>> Thank Pablo, Wolfgang,
>> I have learned more by reading your replies than by myself in the rest
>> of the afternoon.
>
> Hi Nicola,
>
> if you found replies useful, please update the wiki (this may help others).
>
>> Just one more thing:
>> [...]
>> I'd prefer all the titles to be aligned:
>>
>>  Preface
>>I XYZ
>>   ...
>> VIII XYZ
>>   ...
>>
>> I have tried to do my homework by playing with \setuphead, but I am
>> afraid I need your help on this.
>
> Sorry, but too tired to type a sample.
>
> How about setting distance for \setuplist[chapter] in the sectionblock
> frontpart with the desired width?

That does not seem to change the layout, unfortunately. I have tried
with `margin` and `aligntitle` as well:

\setuplist[chapter][distance=1cm,aligntitle=yes]
\startsectionblockenvironment[frontpart]
\setuplist[chapter][aligntitle=yes,margin=2cm,distance=2cm]
\stopsectionblockenvironment

I'll take a fresh look tomorrow.

Nicola


___
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] Page number 0 in Table of Contents with makeup

2020-08-11 Thread Pablo Rodriguez
On 8/11/20 10:11 PM, Nicola wrote:
> Consider this example:
>
> \definemakeup[toc][align=middle]
> \setuppagenumbering[alternative=doublesided]
> \starttext
>   \startfrontmatter
> \startmakeup[toc]
>   \placecontent
> \stopmakeup
> %\setuppagenumber[number=1]
> \startchapter[title={A}]\stopchapter
> \startchapter[title={B}]\stopchapter
>   \stopfrontmatter
> \stoptext
>
> The first entry in the ToC has page number 0. I can fix it by
> uncommenting the commented line or by removing the makeup. Is this
> expected behaviour? If so, why?

Hi Nicola,

makeups have pagestate set to stop by default.

\definemakeup[toc][align=middle, pagestate=start] solves your issue.

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
___


Re: [NTG-context] Help on tweaking alignment, page numbers and ToC

2020-08-11 Thread Pablo Rodriguez
On 8/11/20 8:34 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 11.08.2020 um 14:53:
>> On 8/11/20 1:32 PM, Nicola wrote:
>> [...]
>>> 3. Suppress page numbers and headers in all blank pages.
>>
>> Break pages with \page[yes, blank].
>
> Not the best solution for empty pages before a new chapter.

When I copied the code, I removed right from the \page.

Now I realize that without page, that pagebreak is almost useless.

>> I never used environments (other than the ones to typeset XML sources),
>> so this is my best option .
>
> A environment is nothing more than a external file for the style, the
> only difference between \input{...} and \environment[...] is that
> ConTeXt loads environment files only once.

Many thanks for the explanation.

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
___


[NTG-context] Page number 0 in Table of Contents with makeup

2020-08-11 Thread Nicola
Consider this example:

\definemakeup[toc][align=middle]
\setuppagenumbering[alternative=doublesided]
\starttext
  \startfrontmatter
\startmakeup[toc]
  \placecontent
\stopmakeup
%\setuppagenumber[number=1]
\startchapter[title={A}]\stopchapter
\startchapter[title={B}]\stopchapter
  \stopfrontmatter
\stoptext

The first entry in the ToC has page number 0. I can fix it by
uncommenting the commented line or by removing the makeup. Is this
expected behaviour? If so, why?

Nicola


___
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] Help on tweaking alignment, page numbers and ToC

2020-08-11 Thread Pablo Rodriguez
On 8/11/20 9:24 PM, Nicola wrote:
> Thank Pablo, Wolfgang,
> I have learned more by reading your replies than by myself in the rest
> of the afternoon.

Hi Nicola,

if you found replies useful, please update the wiki (this may help others).

> Just one more thing:
> [...]
> I'd prefer all the titles to be aligned:
>
>  Preface
>I XYZ
>   ...
> VIII XYZ
>   ...
>
> I have tried to do my homework by playing with \setuphead, but I am
> afraid I need your help on this.

Sorry, but too tired to type a sample.

How about setting distance for \setuplist[chapter] in the sectionblock
frontpart with the desired width?

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
___


Re: [NTG-context] Help on tweaking alignment, page numbers and ToC

2020-08-11 Thread Nicola
Thank Pablo, Wolfgang,
I have learned more by reading your replies than by myself in the rest
of the afternoon. Just one more thing:

>>> 1. Increase the space between Roman numbers and titles in the ToC.
>>
>> distance with dimension is the key in \setuplist.
>
> Correct but it's also important to set "width" to a value which is large
> enough to fit the number.

Chapters in the front matter have no number, so the Preface gets aligned
with the numbers of the other chapters:

Preface
   I XYZ
  ...
VIII XYZ
  ...

I'd prefer all the titles to be aligned:

 Preface
   I XYZ
  ...
VIII XYZ
  ...

I have tried to do my homework by playing with \setuphead, but I am
afraid I need your help on this.

Nicola


___
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] Help on tweaking alignment, page numbers and ToC

2020-08-11 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 11.08.2020 um 14:53:

On 8/11/20 1:32 PM, Nicola wrote:

Hi,
first of all, let me say *thank you* for the vast improvements on
ConTeXt Garden! Browsing the documentation and finding stuff is so
much easier and pleasant than it used to be (also the site seems
faster).


Hi Nicola,

Garulfo invested a lot of time and effort in the new wiki layout and
contents.

Taco is always improving the software that runs the wiki (and the source).

Many thanks to them and to all other developers.


Thanks to the docs, dropcaps and protrusion have no secrets for me,
but I am still struggling with some basic tasks (see the document
below):

0. Push text to the bottom of the text area (see copyright).


Well, \setupalignment tweaks position in line (I’d rather say). Bottom
isn’t an option there.

Adding \null\vfill before the alignment does the job.



I think a makeup environment fits here better.

\definemakeup
  [copyright]
  [page=yes,
   pagestate=start,
   doublesided=no,
   align=flushright,
   bottom=]

\startmakeup[copyright]
Copyright © 2020 Author
\stopmakeup



1. Increase the space between Roman numbers and titles in the ToC.


distance with dimension is the key in \setuplist.



Correct but it's also important to set "width" to a value which is large 
enough to fit the number.




2. Vertically center the ToC (wrt to the text area).


Use a makeup for the TOC (if and only if it takes a single page).


3. Suppress page numbers and headers in all blank pages.


Break pages with \page[yes, blank].



Not the best solution for empty pages before a new chapter.

\setuphead
  [chapter]
  [page={yes,header,footer,right}]



4. Suppress headers in the front matter.


This would be my educated guess:

   \startsectionblockenvironment[frontpart]
  \setupheader[state=stop]
   \stopsectionblockenvironment


5. Style and position page numbers differently in the front and body
matter (e.g., centered only in the front matter).


Alignment only (style comes with the proper option ):

   \setuppagenumbering[location={bottom, inmargin}]

   \startsectionblockenvironment[frontpart]
 \setuppagenumbering[location={bottom, centered}]
   \stopsectionblockenvironment


As my full document uses environments, I would like most setups to
be in the environment, if possible. E.g., is it possible to replace

 \setuphead[chapter][after={}]

(see below) with an environment setup that applies only to the ToC?


Either you create and set up a \chapter command for the TOC (such as
\chapterTOC) to use it only once, or you create a sectionblock that you
apply only for the TOC (and define the chapter settings for that
sectionblock).

I never used environments (other than the ones to typeset XML sources),
so this is my best option .


A environment is nothing more than a external file for the style, the 
only difference between \input{...} and \environment[...] is that 
ConTeXt loads environment files only once.


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] custom header/footer for 1st/other pages of section

2020-08-11 Thread Wolfgang Schuster

Mike Cooper schrieb am 11.08.2020 um 19:20:




-Original Message-
From: Wolfgang Schuster [mailto:wolfgang.schuster.li...@gmail.com]
Sent: Tuesday, August 11, 2020 10:07 AM
To: mailing list for ConTeXt users
Cc: Mike Cooper
Subject: Re: [NTG-context] custom header/footer for 1st/other pages of section


Mike Cooper schrieb am 10.08.2020 um 23:40:



Thank you Wolfgang!

I tried to change your code from chapters to sections (since that's what I was

already using) but it didn't work.  So, I switched my sections to chapters and 
it
works great!  But it also caused me to run into other things I'd set up 
manually that
I'm having to figure out---good way to learn!  Haha!

You can only set header or footer settings when the section starts on a
new page. Permitting these two values for every section without this
restrictions can lead to problems because there can be cases where you
have different section levels on the same page and the setting from the
last command on the page counts.


That makes sense.  I wasn't really thinking of my sections as "chapters" per se.  
And I was forcing sections (each >5 pages) to start on new (odd) pages.  But switching to 
chapters is fine and takes care of some other stuff I was forcing.



You don't have to use \chapter as first level section which starts on a 
new page, you can do the same with \section when you use


  \setuphead
[section]
[page={yes,odd}]



One thing I *CANNOT* figure out:  I've been using \doifoddpageelse to put in a

blank/empty page at the end of a section (if needed) so that new sections always
start on an odd page.  This is still working with the change to chapters from
sections, EXCEPT for the first chapter (after TOC)!  Totally stuck with that 
one...

Let me guess you divide your document into section blocks (frontmatter,
bodymatter etc.).

When this is the case you have to first disable the page setting for
these blocks because they interfere with the header/footer setting. To
disable the page breaks add

\setupsectionblock
  [frontpart,bodypart]
  [page=no]

to your document setups.


How does this interact with \startsectionblockenvrironment?  I found this on 
wiki.contextgarden.net/Table_of_Contents for suppressing header/footer on TOC.  
I did not specify frontmatter before, but moving the header/footer content into 
the environment file messed up my formerly clean TOC page.  :-)   So, I've 
currently got:

\startsectionblockenvironment[frontpart]
   \setupheader[state=none]
   \setupfooter[state=none]
\stopsectionblockenvironment

Do I keep this and also include your code above?  Or can both things be taken 
care of together somehow?



Both a different setups for different purposes.


In my setup I tell ConTeXt not to force a page break when it encounters 
\startfrontmatter or \stopfrontmatter because I insert the break with 
\chapter.



With the sectionblockenvironment-environment you can set a list of 
settings which are inserted at the start of block, i.e. your settings 
above do the same as


  \startfrontmatter

  \setupheader[...]
  \setupfooter[...]

  ...

  \stopfrontmatter

where I added the setting to the start of the block. The advantage of 
\startsectionblockenvironment is that you have separated the layout from 
the content.


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] custom header/footer for 1st/other pages of section

2020-08-11 Thread Mike Cooper


> -Original Message-
> From: Wolfgang Schuster [mailto:wolfgang.schuster.li...@gmail.com]
> Sent: Tuesday, August 11, 2020 11:15 AM
> To: mailing list for ConTeXt users
> Cc: Mike Cooper
> Subject: Re: [NTG-context] custom header/footer for 1st/other pages of section
> 
> Mike Cooper schrieb am 11.08.2020 um 19:01:
> >
> >
> >>
> >> Ehm... Why don’t you just use \setuphead[section][page=right] ?
> >>
> >> Hraban
> >
> >
> > Haha!  Well...  because I never found that approach in my searching.
> >
> > But now, I'm not using it because it doesn't work for me.  I was in the 
> > middle of
> > guessing I needed to set up doublesided or some such in order for it to 
> > work when
> > Wolfgang's other solution came in.
> 
> When you use "page=left" or "page=right" you need a doublesided document
> but for a singlesided document you can use "page=even" or "page=odd".
> 
> 
> There is also another layout method which combines both. The layout is
> taken from a singlesided document which means the left and right margins
> are the same on odd and even page but checks for left or right pages
> work like in a doublesided document.
> 
> You can test this with the example below when you uncomment the second
> and third pagenumbering setup-
> 
> \setuppagenumbering
>[alternative={singlesided,doublesided}]
> 
> %\setuppagenumbering
> %  [alternative=singlesided]
> 
> %\setuppagenumbering
> %  [alternative=doublesided]
> 
> \setuphead
>[chapter]
>[page=right]
> 
> \showframe
> 
> \starttext
> 
> \dorecurse{3}
>{\expanded{\chapter{Chapter \recurselevel}}
> \dorecurse{4}{\samplefile{weisman}}}
> 
> \stoptext
> 
> Wolfgang

Interesting!  Thank you!

___
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] custom header/footer for 1st/other pages of section

2020-08-11 Thread Mike Cooper


> -Original Message-
> From: Wolfgang Schuster [mailto:wolfgang.schuster.li...@gmail.com]
> Sent: Tuesday, August 11, 2020 10:07 AM
> To: mailing list for ConTeXt users
> Cc: Mike Cooper
> Subject: Re: [NTG-context] custom header/footer for 1st/other pages of section
> 
> 
> Mike Cooper schrieb am 10.08.2020 um 23:40:
> >
> >
> > Thank you Wolfgang!
> >
> > I tried to change your code from chapters to sections (since that's what I 
> > was
> already using) but it didn't work.  So, I switched my sections to chapters 
> and it
> works great!  But it also caused me to run into other things I'd set up 
> manually that
> I'm having to figure out---good way to learn!  Haha!
> 
> You can only set header or footer settings when the section starts on a
> new page. Permitting these two values for every section without this
> restrictions can lead to problems because there can be cases where you
> have different section levels on the same page and the setting from the
> last command on the page counts.

That makes sense.  I wasn't really thinking of my sections as "chapters" per 
se.  And I was forcing sections (each >5 pages) to start on new (odd) pages.  
But switching to chapters is fine and takes care of some other stuff I was 
forcing.

THANKS!

 
> > One thing I *CANNOT* figure out:  I've been using \doifoddpageelse to put 
> > in a
> blank/empty page at the end of a section (if needed) so that new sections 
> always
> start on an odd page.  This is still working with the change to chapters from
> sections, EXCEPT for the first chapter (after TOC)!  Totally stuck with that 
> one...
> 
> Let me guess you divide your document into section blocks (frontmatter,
> bodymatter etc.).
> 
> When this is the case you have to first disable the page setting for
> these blocks because they interfere with the header/footer setting. To
> disable the page breaks add
> 
>\setupsectionblock
>  [frontpart,bodypart]
>  [page=no]
> 
> to your document setups.

How does this interact with \startsectionblockenvrironment?  I found this on 
wiki.contextgarden.net/Table_of_Contents for suppressing header/footer on TOC.  
I did not specify frontmatter before, but moving the header/footer content into 
the environment file messed up my formerly clean TOC page.  :-)   So, I've 
currently got:

   \startsectionblockenvironment[frontpart]
  \setupheader[state=none]
  \setupfooter[state=none]
   \stopsectionblockenvironment

Do I keep this and also include your code above?  Or can both things be taken 
care of together somehow?

 
> No you can change the settings for the page break at the begin of each
> chapter to
> 
>\setuphead
>  [chapter]
>  [page={yes,header,footer,right}]
> 
> which
> 
>1. Finishes the last page of the previous chapter
>2. Disables the header and footer for the next (empty) page
>3. Adds a empty page when necessary to start the new chapter on a right 
> page

Excited to try this once I know what to do with the sectionblock stuff.

Going to fiddle...

THANKS!!!


___
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] custom header/footer for 1st/other pages of section

2020-08-11 Thread Wolfgang Schuster

Mike Cooper schrieb am 11.08.2020 um 19:01:




-Original Message-
From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Henning
Hraban Ramm
Sent: Tuesday, August 11, 2020 12:37 AM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] custom header/footer for 1st/other pages of section


One thing I *CANNOT* figure out:  I've been using \doifoddpageelse to put in a

blank/empty page at the end of a section (if needed) so that new sections always
start on an odd page.  This is still working with the change to chapters from
sections, EXCEPT for the first chapter (after TOC)!  Totally stuck with that 
one...

Ehm... Why don’t you just use \setuphead[section][page=right] ?

Hraban



Haha!  Well...  because I never found that approach in my searching.

But now, I'm not using it because it doesn't work for me.  I was in the middle 
of guessing I needed to set up doublesided or some such in order for it to work 
when Wolfgang's other solution came in.


When you use "page=left" or "page=right" you need a doublesided document 
but for a singlesided document you can use "page=even" or "page=odd".



There is also another layout method which combines both. The layout is 
taken from a singlesided document which means the left and right margins 
are the same on odd and even page but checks for left or right pages 
work like in a doublesided document.


You can test this with the example below when you uncomment the second 
and third pagenumbering setup-


\setuppagenumbering
  [alternative={singlesided,doublesided}]

%\setuppagenumbering
%  [alternative=singlesided]

%\setuppagenumbering
%  [alternative=doublesided]

\setuphead
  [chapter]
  [page=right]

\showframe

\starttext

\dorecurse{3}
  {\expanded{\chapter{Chapter \recurselevel}}
   \dorecurse{4}{\samplefile{weisman}}}

\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] custom header/footer for 1st/other pages of section

2020-08-11 Thread Mike Cooper


> -Original Message-
> From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Henning
> Hraban Ramm
> Sent: Tuesday, August 11, 2020 12:37 AM
> To: mailing list for ConTeXt users
> Subject: Re: [NTG-context] custom header/footer for 1st/other pages of section
> 
> > One thing I *CANNOT* figure out:  I've been using \doifoddpageelse to put 
> > in a
> blank/empty page at the end of a section (if needed) so that new sections 
> always
> start on an odd page.  This is still working with the change to chapters from
> sections, EXCEPT for the first chapter (after TOC)!  Totally stuck with that 
> one...
> 
> Ehm... Why don’t you just use \setuphead[section][page=right] ?
> 
> Hraban


Haha!  Well...  because I never found that approach in my searching.

But now, I'm not using it because it doesn't work for me.  I was in the middle 
of guessing I needed to set up doublesided or some such in order for it to work 
when Wolfgang's other solution came in.

Thanks for your help!

___
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] custom header/footer for 1st/other pages of section

2020-08-11 Thread Wolfgang Schuster


Mike Cooper schrieb am 10.08.2020 um 23:40:




-Original Message-
From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Wolfgang
Schuster
Sent: Thursday, August 06, 2020 2:58 PM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] custom header/footer for 1st/other pages of section

Mike Cooper schrieb am 06.08.2020 um 17:15:

Hola,

I imagine this is probably simple but I can’t find it…

I want the first page only of each section to have particular content in
header/footer, then all the following pages to different specific
content.Right now, I am manually entering it in each section.I’m hoping
there’s a way to automate this; put it into the environment file for all
sections.


Of course you can set different header/footer layouts for chapter pages.

With  \setupheadertexts and \setupfootertexts you set first the text
which should appear on regular pages.

To have a different text on a chapter page you can use the \definetext
command to set them (third first argument is the name of the setup and
the second argument the location). These setups than can applied to the
chapter with the header and footer key in \setuphead.

 begin example
\setupheadertexts
[Page \userpagenumber\ of \lastuserpagenumber]

\definetext
[chapterheader] % name
[header] % vertical position
[This is a chapter page] % content

\definetext
[chapterfooter]
[footer]
[pagenumber]

\setuphead
[chapter]
[header=chapterheader,
 footer=chapterfooter]

\starttext

\dorecurse{10}
{\expanded{\chapter{Chapter \recurselevel}}
 \dorecurse{\numexpr2*\recurselevel\relax}{\samplefile{knuth}}}

\stoptext
 end example

Wolfgang



Thank you Wolfgang!

I tried to change your code from chapters to sections (since that's what I was 
already using) but it didn't work.  So, I switched my sections to chapters and 
it works great!  But it also caused me to run into other things I'd set up 
manually that I'm having to figure out---good way to learn!  Haha!


You can only set header or footer settings when the section starts on a 
new page. Permitting these two values for every section without this 
restrictions can lead to problems because there can be cases where you 
have different section levels on the same page and the setting from the 
last command on the page counts.



One thing I *CANNOT* figure out:  I've been using \doifoddpageelse to put in a 
blank/empty page at the end of a section (if needed) so that new sections 
always start on an odd page.  This is still working with the change to chapters 
from sections, EXCEPT for the first chapter (after TOC)!  Totally stuck with 
that one...


Let me guess you divide your document into section blocks (frontmatter, 
bodymatter etc.).


When this is the case you have to first disable the page setting for 
these blocks because they interfere with the header/footer setting. To 
disable the page breaks add


  \setupsectionblock
[frontpart,bodypart]
[page=no]

to your document setups.

No you can change the settings for the page break at the begin of each 
chapter to


  \setuphead
[chapter]
[page={yes,header,footer,right}]

which

  1. Finishes the last page of the previous chapter
  2. Disables the header and footer for the next (empty) page
  3. Adds a empty page when necessary to start the new chapter on a 
right page


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] How can I use ConTeXt from TeXLive2020 ?

2020-08-11 Thread Hans Hagen

Hi,

A few remarks.

In a mkiv luatex setup there are (on a unix system):

  luatex  : binary
  mtxrun  : a copy of mtxrun.lua
  context : a shell script starting mtxrun

Now, the problem there is that these shebang lines are limited, i.e. 
there is no way to pass an argument and we need to start luatex in lua 
mode. This is why the program refered to is texlua which is a copy of or 
symlink to luatex and when called with that name it knows that it has to 
start in lua mode.


On windows there are two small stubs: mtxrun.exe and context.exe an both 
will start luatex (no need for texlua there) with the same script etc.


In a luametatex setup we have a uniform and simpler model.

  luametatex   : binary
  mtxrun   : a copy of luametex or symlink to it
  context  : a copy of luametex or symlink to it
  mtxrun.lua   : used when mtxrun is started
  context.lua  : used when context is started

So, here the 'context' link (or copy) from it's name knows to start in 
lua mode and load context.lua (which actually loads mtxrun.lua + 
mtx-context.lua). It's the same on all platforms.


Now, already long ago we ditched all other stubs simply because given 
the amount of scripts in a tex live setup it's a recipe for clashes 
(scripts also have to compete with programs / scripts  installed as part 
of the os and other programs so even more opportunity for clashes). We 
just use


  mtxrun --script ...

instead (and texmfstart in a mkii setup).

These models cannot be mixed, which is why in a luametatex lmtx setup we 
use "context --luatex" to start mkiv, where luametatex is the runner.


Hans

ps. I remember the times that context was considered bad because it 
needed a runner, read: a script was part of the deal and a tex run 
should not have such a depedency; the need to install perl or ruby was 
seen as a shortcoming. We also used scripts to generate font metric 
files (context didn't depend on other programs for toc and index 
generation and had just one auxiliary file). But times have changed and 
scripts are now hip and modern in the tex ecosysystem, which is why we 
basically limit ourselves to just 'context' and 'mtxrun' and start all 
the other context related scripts indirectly.


-
  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] How can I use ConTeXt from TeXLive2020 ?

2020-08-11 Thread Otared Kavian
Hi Adam,

Thanks for your attention to my problem.

> On 11 Aug 2020, at 03:44, Adam Reviczky  wrote:
> 
> Hi Otared,
> 
> Not sure this will help at all, but I've seen similar errors when 
> "texmfcnf.lua" wasn't found (alongside texmf.cnf).
> 
> Although I am not using TeXLive2020, I have the following entries for 
> texmfcnf:
> -rw-r--r-- 1 root root 8272 Aug  9 13:19 
> /usr/share/texlive/texmf-dist/web2c/texmfcnf.lua
> -rw-r--r-- 1 root root 38841 Aug  9 13:19 
> /usr/share/texlive/texmf-dist/web2c/texmf.cnf

I don't have these files at this place, but in
/opt/local/etc/texmf/
I do have 
/opt/local/etc/texmf/texmf.cnf
/opt/local/etc/texmf/texmfcnf.lua
the first one being created automatically when I tried to do mtxrun --generate 
after installing TeXLive2020. Ir says its content should not be modified 
directly and that its content is based on of the file
/opt/local/etc/texmf/texmf.cnf.d
The content of the above directory dates from 2019, and maybe that is why my 
logfile reports things being done with TeXLive2019. 

The content of the file 
/opt/local/etc/texmf/texmfcnf.lua
is written by Hans in date = "2012-05-24" time = "12-12-12".

Replacing /opt/local/etc/texmf/texmf.cnf with some other texmf.cnf does not 
help, since it is overwritten when one does 
mtxrun --generate

So the problem remains… Maybe I have to contact people who prepare MacTeX2020 
and ask for help with them.

Thank you agin for your time and advices.
Best regards: Otared


> 
> and the symlinks to it from:
> lrwxrwxrwx 1 root root 43 Aug 11 02:05 /usr/share/texmf/web2c/texmfcnf.lua -> 
> ../../texlive/texmf-dist/web2c/texmfcnf.lua
> lrwxrwxrwx 1 root root 40 Aug 11 02:21 /usr/share/texmf/web2c/texmf.cnf -> 
> ../../texlive/texmf-dist/web2c/texmf.cnf
> 
> Now, if I remove the symlink (/usr/share/texmf/web2c/texmfcnf.lua) I get the 
> same error as you:
> mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'
> (With the symlink everything is fine of course.)
> 
> https://github.com/TeX-Live/texlive-source/blob/b5db9f9833e389f96a329553b9d6ac7037872b2d/texk/kpathsea/texmf.cnf
> % First writable tree here is used by Lua(La)TeX for the font cache.
> % LuaLaTeX uses the value here, while ConTeXt uses the same variable but
> % from texmfcnf.lua; therefore the two values should be kept in sync.
> % (As should everything else in texmf.cnf <-> texmfcnf.lua.)
> 
> I see from your output that context did find the texmfcnf.lua:
> resolvers   | resolving | found regular configuration file 
> '/opt/local/etc/texmf/texmfcnf.lua'
> 
> So maybe it is something completely different, but it does look like it's 
> something around those configs...
> 
> Have a look and if not, then sorry for the noise.
> 
> Regards,
> Adam
> 
> 
> On Mon, Aug 10, 2020 at 11:04 PM Otared Kavian  wrote:
> Hi Axel,
> 
> > On 10 Aug 2020, at 16:11, Axel Kielhorn  wrote:
> > […]
> > Well, one more suggestion:
> > Use TeX Live Manager to update TeX-Live.
> > I didn’t see any comments about context not working, but maybe the update 
> > fixes something.
> > (You can filter for context related packages.)
> > 
> > There has been one update to „context“ in June 2020.
> 
> I did update TeXLive with TeX Live Manager. But still I cannot run ConTeXt 
> from TeXLive2020 (neither from TeXShop nor from Terminal).
> 
> > […]
> > And another one:
> > Please look into the home directory for a local .texlive2020 folder.
> > There shouldn’t be any and it shouldn’t contain anything context related.
> 
> I checked for the existence of directories of the type .texlive2020: there is 
> no such directory in my home directory.
> There were three leftover directories .texlive2008, .texlive2010 and 
> .texlive2019, which I removed.
> Doing 
> mtxrun --generate
> creates a .texlive2019 directory which contains some other folders which are
> texmf-var/luatex-cache/context/88aacfe88c3cbee9a12d5f4bec4da90b/trees/
> and in the latter folder there are 10 files with suffixes .lua and .luc.
> Again 
> context test.tex
> results in 
> mtxrun | unknown script 'context.lua' or 'mtx-context.lua'
> 
> So the problem remains…
> 
> Best regards: Otared
> ___
> 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
> ___


%% This file should not be edited directly!
%%
%% It was automatically generated by /opt/local/libexec/texlive-update-cnf
%% from the contents of /opt/local/etc/texmf/texmf.cnf.d
%% on Sat Jun 13 10:08:36 CEST 2020.

[NTG-context] new upload - matching gimmick

2020-08-11 Thread Hans Hagen

Hi,

For those who like playing around you can use lua pettern matching in a 
match loop:


\starttext

\doloopovermatch
{(\letterpercent w+) *(\letterpercent w*)}
{aa bb cc dd}
{
  [
\doloopovermatch
  {(\letterpercent w)(\letterpercent w)}
  {#1}
  {(##1 ##2)}
\doloopovermatch
  {(\letterpercent w)(\letterpercent w)}
  {#2}
  {(##1 ##2)}
  ]
}

\blank

\doloopovermatch
  {(\letterpercent d+)}
  {this 1 is 22 a 333 test}
  { [#1] }

\blank

\doloopovermatch
{(.-)\letterpercent{\bf (.-)\letterpercent}(.*)}
{this is {\bf a} test}
{#1{\it not #2}#3}

\blank

\doloopovermatch
  {([\letterpercent w]+)}
  {\cldloadfile{tufte.tex}}
  { [#1] }

\stoptext

Probably not that useful (I never needed it but that doesn't say much) 
but it fits in the repertoire of loops.


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
___


[NTG-context] new upload - hyphenation

2020-08-11 Thread Hans Hagen

Hi,

One can suppress hyphenation with:

  \setupalign[nothyphenated]

but it has some limitations. The low level switches are \nohyphens and 
\dohyphens. Anyway, this mechanism has now been improved a bit:


\starttext

\startbuffer
NEDERLANDS\par Nederlands\par nederlands\par
\CONTEXT  \par test\-test\par test-test \par
\stopbuffer

\blank \start \nl \hsize 2mm\getbuffer \stop \blank
\blank \start \nl \hsize 2mm \nohyphens \getbuffer \stop \blank

\startbuffer
\nohyphens NEDERLANDS {\dohyphens Nederlands} nederlands\par
\stopbuffer

\blank \start \nl \hsize 2mm \getbuffer \stop \blank

\startbuffer
NEDERLANDS {\nohyphens Nederlands} nederlands\par
\stopbuffer

\blank \start \nl \hsize 2mm \getbuffer \stop \blank

\stoptext

We can (and probably will) add more granularity in this but now 
\nohyphens will also deal with explicit \discretionary (as used in the 
\CONTEXT definition) as well as \- and - in addition to the normal 
pattern driven hyphenation. It also obeys grouping.


(this improvement concerns lmtx only)

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] Help on tweaking alignment, page numbers and ToC

2020-08-11 Thread Pablo Rodriguez
On 8/11/20 1:32 PM, Nicola wrote:
> Hi,
> first of all, let me say *thank you* for the vast improvements on
> ConTeXt Garden! Browsing the documentation and finding stuff is so
> much easier and pleasant than it used to be (also the site seems
> faster).

Hi Nicola,

Garulfo invested a lot of time and effort in the new wiki layout and
contents.

Taco is always improving the software that runs the wiki (and the source).

Many thanks to them and to all other developers.

> Thanks to the docs, dropcaps and protrusion have no secrets for me,
> but I am still struggling with some basic tasks (see the document
> below):
>
> 0. Push text to the bottom of the text area (see copyright).

Well, \setupalignment tweaks position in line (I’d rather say). Bottom
isn’t an option there.

Adding \null\vfill before the alignment does the job.

> 1. Increase the space between Roman numbers and titles in the ToC.

distance with dimension is the key in \setuplist.

> 2. Vertically center the ToC (wrt to the text area).

Use a makeup for the TOC (if and only if it takes a single page).

> 3. Suppress page numbers and headers in all blank pages.

Break pages with \page[yes, blank].

> 4. Suppress headers in the front matter.

This would be my educated guess:

  \startsectionblockenvironment[frontpart]
 \setupheader[state=stop]
  \stopsectionblockenvironment

> 5. Style and position page numbers differently in the front and body
>matter (e.g., centered only in the front matter).

Alignment only (style comes with the proper option ):

  \setuppagenumbering[location={bottom, inmargin}]

  \startsectionblockenvironment[frontpart]
\setuppagenumbering[location={bottom, centered}]
  \stopsectionblockenvironment

> As my full document uses environments, I would like most setups to
> be in the environment, if possible. E.g., is it possible to replace
>
> \setuphead[chapter][after={}]
>
> (see below) with an environment setup that applies only to the ToC?

Either you create and set up a \chapter command for the TOC (such as
\chapterTOC) to use it only once, or you create a sectionblock that you
apply only for the TOC (and define the chapter settings for that
sectionblock).

I never used environments (other than the ones to typeset XML sources),
so this is my best option .

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
___


[NTG-context] Help on tweaking alignment, page numbers and ToC

2020-08-11 Thread Nicola
Hi,
first of all, let me say *thank you* for the vast improvements on
ConTeXt Garden! Browsing the documentation and finding stuff is so
much easier and pleasant than it used to be (also the site seems
faster).

Thanks to the docs, dropcaps and protrusion have no secrets for me,
but I am still struggling with some basic tasks (see the document
below):

0. Push text to the bottom of the text area (see copyright).
1. Increase the space between Roman numbers and titles in the ToC.
2. Vertically center the ToC (wrt to the text area).
3. Suppress page numbers and headers in all blank pages.
4. Suppress headers in the front matter.
5. Style and position page numbers differently in the front and body
   matter (e.g., centered only in the front matter).

As my full document uses environments, I would like most setups to
be in the environment, if possible. E.g., is it possible to replace

\setuphead[chapter][after={}]

(see below) with an environment setup that applies only to the ToC?

Nicola

%%%
\definepapersize[lsda][width=128.4mm,height=198.3mm]
\setuppapersize[lsda]

\setuplayout[
  backspace=22.9mm,
  width=90.3mm,
  topspace=8.9mm,
  height=181.1mm,
  header=4mm,
  headerdistance=6.4mm,
  footerdistance=6.4mm,
  footer=4mm,
  leftmargin=15.2mm,
  leftmargindistance=0mm,
  rightmargindistance=0mm,
  rightmargin=15.2mm,
]

\setuplabeltext[it][chapter=]
\setuphead[chapter][
  header=empty,
  alternative=middle,
  conversion=Romannumerals,
  numbercommand=\groupedcommand{\blank[20mm]}{\blank[10mm]},
  after={\blank[3cm]},
]
\setupheadtext[content=]

\setupheadertexts[]
\setupheadertexts[\setups{text a}][][][\setups{text b}]
\startsetups[text a]
  \rlap{whatever}
  \hfill
  \getmarking[chapter]
  \hfill
  \llap{whatever}
\stopsetups

\startsetups[text b]
  \rlap{}
  \hfill
  Some text goes here
  \hfill
  \llap{}
\stopsetups

\setuppagenumbering[
  alternative=doublesided,
  location={text,footer,right},
  style=\tfx
]
\definestructureconversionset[frontpart:pagenumber][][romannumerals]
\definestructureconversionset[bodypart:pagenumber] [][numbers]

\starttext
\startfrontmatter
\page[even]
\startalignment[bottom,flushright]
Copyright © 2020 Author
\stopalignment
\start
\setuphead[chapter][after={}]
\completecontent
\stop
\page[odd]
\startchapter[title={Preface}]\input{knuth}\stopchapter
\stopfrontmatter
\startbodymatter
\setuppagenumber[number=1]
\dorecurse{10}{\startchapter[title={XYZ}]\input{tufte}\stopchapter}
\stopbodymatter
\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
___


[NTG-context] Same counter for figures as theorems

2020-08-11 Thread Tim Steenvoorden
Hi all,

I’ve a text where chapters are numbered 1, 2, 3, … and sections 1.1, 1.2, 1.3, …
Now I’d like all elements (figures, tables, examples, definitions, theorems, …) 
to be numbered consecutively prefixed by the chapter and section number, so 
1.1.1, 1.1.2, 1.2.1, ...

I’ve managed to change figure/table captions to do this by:

\setupcaptions[
  way=bysection,
  prefixsegments=chapter:section,
]

And I’ve setup my enumerations by:

\setupenumerations[
  way=bysection,
  prefix=yes,
  prefixsegments=chapter:section,
]

But how do I use the same counter for figures, tables, and all enumerations?
Trying to share a counter with:

\definecounter[object][
  way=bysection,
  prefix=yes,
  prefixsegments=chapter:section,
]
\setupenumerations[
  counter=object,
]
\setupcaptions[
  counter=object,
]

Results in enumerations numbered 1, 2, 3, ... instead of 1.1.1, 1.1.2, 1.1.3, … 
And figures and tables are still numbered in the default way.

Cheers,
Tim
___
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] \checkpage in the TOC

2020-08-11 Thread Willi Egger
Hello!

humble, in another book I am trying to improve the list of contents. On 
different places occur page breaks which should be addressed and corrected.

I tried to use the method \checkpage[][], however my attempts are not succesful.

For your reference I include a screenshot of the problematic pagebreak.

\definepagechecker
   [willi]
   [method=1,before=,after=,inbetween={\page}]
 
\setuplist
[chapter]
[prefix=no,
sectionnumber=no,
headnumber=no,
   alternative=command,
   command=\Mychaptercommand,
  inbetween={\checkpage[willi][lines=4]}

Thank you for advice!
Kind regards
Willi
]___
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] custom header/footer for 1st/other pages of section

2020-08-11 Thread Henning Hraban Ramm
> One thing I *CANNOT* figure out:  I've been using \doifoddpageelse to put in 
> a blank/empty page at the end of a section (if needed) so that new sections 
> always start on an odd page.  This is still working with the change to 
> chapters from sections, EXCEPT for the first chapter (after TOC)!  Totally 
> stuck with that one...

Ehm... Why don’t you just use \setuphead[section][page=right] ?

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
___