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

2020-08-13 Thread Nicola
Hi,
I still have an issue with blank pages...

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

Yes, the ToC takes a single page. The makeup seems to insert a blank
page afterwards. MWE:

\setuppagenumbering[alternative=doublesided]
\definemakeup[ToC][align=middle,pagestate=start]
\starttext
\startfrontmatter
  \startmakeup[ToC]
\placecontent
  \stopmakeup
  \input{knuth}
\stopfrontmatter
\startbodymatter
  \dorecurse{10}{\chapter{Foo}}
\stopbodymatter
\stoptext

How do I suppress the blank page after the ToC?

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-12 Thread Nicola
On 2020-08-12, Wolfgang Schuster  wrote:
> 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

Thanks, nice trick!

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

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


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


Re: [NTG-context] Wrong page numbers in frontmatter

2020-06-14 Thread Jack Steyn
Thanks kindly, Wolfgang.

On Mon, 15 Jun 2020 at 00:49, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Jack Steyn schrieb am 14.06.2020 um 16:46:
> > Hi,
> >
> > I'm not sure why the following MWE produces a document where page 2
> > has the page number i instead of ii. It seems to have something to do
> > with the use of makeup. I was using it to create a vertically centered
> > title page. Is there a better way of doing this which will give the
> > correct page numbers?
> >
> > Best,
> >
> > Jack
> >
> > \definestructureconversionset[frontpart:pagenumber][][romannumerals]
> > \definestructureconversionset[bodypart:pagenumber][][numbers]
> >
> > \definemakeup[titlepage][align=middle]
>
> \definemakeup[titlepage][align=middle,pagestate=start]
>
> 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] Wrong page numbers in frontmatter

2020-06-14 Thread Wolfgang Schuster

Jack Steyn schrieb am 14.06.2020 um 16:46:

Hi,

I'm not sure why the following MWE produces a document where page 2 
has the page number i instead of ii. It seems to have something to do 
with the use of makeup. I was using it to create a vertically centered 
title page. Is there a better way of doing this which will give the 
correct page numbers?


Best,

Jack

\definestructureconversionset[frontpart:pagenumber][][romannumerals]
\definestructureconversionset[bodypart:pagenumber][][numbers]

\definemakeup[titlepage][align=middle]


\definemakeup[titlepage][align=middle,pagestate=start]

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
___


[NTG-context] Wrong page numbers in frontmatter

2020-06-14 Thread Jack Steyn
Hi,

I'm not sure why the following MWE produces a document where page 2 has the
page number i instead of ii. It seems to have something to do with the use
of makeup. I was using it to create a vertically centered title page. Is
there a better way of doing this which will give the correct page numbers?

Best,

Jack

\definestructureconversionset[frontpart:pagenumber][][romannumerals]
\definestructureconversionset[bodypart:pagenumber][][numbers]

\definemakeup[titlepage][align=middle]

\starttext

\startfrontmatter
\startmakeup[titlepage]
Title
\stopmakeup
test
\stopfrontmatter

\startbodymatter
\setcounter[userpage][1]
test
\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
___


Re: [NTG-context] More funny numbers

2020-06-12 Thread Hans Hagen

On 6/12/2020 4:35 AM, Jairo A. del Rio wrote:
Hi everyone! The following example shows that numerators of fractions 
inside math alignment environments appear with a funny size:


\startTEXpage
\startformula
\startmathalignment[n=1,align=middle]
\NC \frac{1351}{780}>\sqrt{3}>\frac{265}{153},  3013 
\frac{3}{4}>\sqrt{9082321}, \quad 1838 \frac{9}{17}>\sqrt{3380929} \NR
\NC 1009 \frac{1}{6}>\sqrt{1018405}, \quad 2017 
\frac{1}{4}>\sqrt{4069284}  \frac{1}{38}, \quad 591 
\frac{1}{8}<\sqrt{349450} \NR
\NC 1172 \frac{1}{8}<\sqrt{1373943\frac{84}{33}},  2339 
\frac{1}{4}<\sqrt{5472132 \frac{1}{16}} \NR

\stopmathalignment
\stopformula
\stopTEXpage

It's actually nice to find those bugs when one makes heavy use of math 
environments. For comparison, LuaTeX prints the correct output.

i uploaded a new version that should fix the spacing

-
  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] More funny numbers

2020-06-12 Thread Hans Hagen

On 6/12/2020 4:35 AM, Jairo A. del Rio wrote:

It's actually nice to find those bugs when one makes heavy use of math 
environments. For comparison, LuaTeX prints the correct output.
Well, thanks for finding them! Normnally those bugs are easy to fix. 
Concerning math, there are no real fundamental changes under the hood, 
but in the process of adding some more control there can be side 
effects. For instance:


-- In order to make a bit nicer token interface (from the lua end) there 
has been a bit more abstraction and some internal quantities sit in 
better defined slots with zero based indices not, but in order to do 
that I need to adapt some references and might overlook some ... no big 
deal as there are not that many.


-- Some math rendering is quite hard codes wrt style and already much 
has been made configurable (either controlled by keywords or by 
additional parameters, think of \mathfoomode like ones). But it's easy 
to overlook something there. This is why user testing helps.


-- Some new features (like prescripts that are handy for proper 
chemistry as well as (i still have to adapt some code) mathml) but those 
will go unnoticed / not impact regular math.


-- New (often already old by now) trickery like local math parameters, 
which at some point wil be better interfaced.


-- Actually plenty more is possible but not yet used / done. It will 
happen when I run into the code / have a reason, but the mechanisms are 
there.


In general, not all that is there is yet used. I often do that stepwise 
(just try it out someplace), also because sometimes we need to split 
mkiv and lmtx sources then. Stepwise changes are easier because all kind 
of things can interfere.


Wrt non-math i.e. general new features in the engine, these can for 
instance involve more robust macro coding, full expansion, less horrific 
tracing, future possibilities.


Users are welcome to suggest additional low level context macros that 
they're missing. We're also wondering if some low level macros can go 
away or maybe some 'raw' ones can be aliased to regular ones as 
performance issues matter less nowadays.


There are for instance a few new tricks with macros but I'm not sure how 
many users really define there own, and if so they never asked for those 
specific things.


I'm anyway more or less through my list of engine related todo's (that 
accumulated over years).


All that said, I really appreciate the patience that users have with 
testing,


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] More funny numbers

2020-06-11 Thread Jairo A. del Rio
Hi everyone! The following example shows that numerators of fractions
inside math alignment environments appear with a funny size:

\startTEXpage
\startformula
\startmathalignment[n=1,align=middle]
\NC \frac{1351}{780}>\sqrt{3}>\frac{265}{153},  3013
\frac{3}{4}>\sqrt{9082321}, \quad 1838 \frac{9}{17}>\sqrt{3380929} \NR
\NC 1009 \frac{1}{6}>\sqrt{1018405}, \quad 2017 \frac{1}{4}>\sqrt{4069284}
 \frac{1}{38}, \quad 591 \frac{1}{8}<\sqrt{349450} \NR
\NC 1172 \frac{1}{8}<\sqrt{1373943\frac{84}{33}},  2339
\frac{1}{4}<\sqrt{5472132 \frac{1}{16}} \NR
\stopmathalignment
\stopformula
\stopTEXpage

It's actually nice to find those bugs when one makes heavy use of math
environments. For comparison, LuaTeX prints the correct output.

Jairo :)
___
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
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] 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] 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
___


[NTG-context] chapter numbers

2020-06-07 Thread jbf
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
___


Re: [NTG-context] Numbers inside \sqrt are small

2020-06-07 Thread Hans Hagen

On 6/6/2020 5:45 PM, Otared Kavian wrote:

Hi Mikael,

Thanks to your message I discovered that in all my recent documents typeset 
with lmtx the \sqrt has a bug… Indeed the argument under the square root is  
too small.  (The version I have right now is 2020.05.25 23:39, after running sh 
install.sh).
It may be that it is related to the recent changes discussed in anther thread 
about the square root and friends.

I hope Hans will have time to fix the issue…

put this in cont-new.mkiv

\unexpanded\def\styledrootradical#1#2%
  {\normalexpanded{\rootradical
 {\normalunexpanded{#1}}%
 {\noexpand\triggermathstyle{\number\normalmathstyle}%
  \normalunexpanded{#2

no updates today

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] Numbers inside \sqrt are small

2020-06-06 Thread Otared Kavian
Hi Mikael,

Thanks to your message I discovered that in all my recent documents typeset 
with lmtx the \sqrt has a bug… Indeed the argument under the square root is  
too small.  (The version I have right now is 2020.05.25 23:39, after running sh 
install.sh).
It may be that it is related to the recent changes discussed in anther thread 
about the square root and friends.

I hope Hans will have time to fix the issue…

Best regards: Otared K.

> On 2 Jun 2020, at 14:47, Mikael Sundqvist  wrote:
> 
> Hi,
> 
> \starttext
> $2+\sqrt{2}$
> \stoptext
> 
> The output is attached. This happened with a release that are a bit old, as 
> well as with the most recent upgrade. LMTX.
> 
> /Mikael
> ___
> 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] Numbers inside \sqrt are small

2020-06-02 Thread Mikael Sundqvist
Hi,

\starttext
$2+\sqrt{2}$
\stoptext

The output is attached. This happened with a release that are a bit old, as
well as with the most recent upgrade. LMTX.

/Mikael


sqrt.pdf
Description: Adobe PDF document
___
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] lmtx: rotation problem with float numbers

2020-05-27 Thread Peter Rolf
Am 27.05.2020 um 17:46 schrieb Wolfgang Schuster:
> Hans Hagen schrieb am 27.05.2020 um 17:39:
>> On 5/27/2020 5:30 PM, Wolfgang Schuster wrote:
>>> Peter Rolf schrieb am 27.05.2020 um 16:38:
>>>> Hi,
>>>>
>>>> this used to work, but wants a dimension now
>>> In which way? Did you get the desired result or was there just no
>>> error message.
>>>> \starttext
>>>> \rotate[rotation=-0.2]{Rotation}
>>>> \stoptext
>>>>
>>>> No such problems with integer rotation numbers.
>>> ConTeXt expects a integer for the rotation value and decimals are
>>> only possible for a dimension.
>> can you test with:
>>
>>    \clf_analyzerotate % rather accurate
>>  \p_rotation_rotation\space
>>
>> in grph-trf.mkiv
> It works.
>

Thanks for the quick fix and the testing :)
___
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] lmtx: rotation problem with float numbers

2020-05-27 Thread Wolfgang Schuster

Hans Hagen schrieb am 27.05.2020 um 17:39:

On 5/27/2020 5:30 PM, Wolfgang Schuster wrote:

Peter Rolf schrieb am 27.05.2020 um 16:38:

Hi,

this used to work, but wants a dimension now
In which way? Did you get the desired result or was there just no 
error message.

\starttext
\rotate[rotation=-0.2]{Rotation}
\stoptext

No such problems with integer rotation numbers.
ConTeXt expects a integer for the rotation value and decimals are 
only possible for a dimension.

can you test with:

   \clf_analyzerotate % rather accurate
 \p_rotation_rotation\space

in grph-trf.mkiv

It works.

\starttext
\blackrule[width=\textwidth,height=\linewidth]
\vskip-\baselineskip
\rotate[rotation=-0.2]{\blackrule[width=\textwidth,height=\linewidth]}
\vskip-\baselineskip
\rotate[rotation=-1]{\blackrule[width=\textwidth,height=\linewidth]}
\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] lmtx: rotation problem with float numbers

2020-05-27 Thread Hans Hagen

On 5/27/2020 5:30 PM, Wolfgang Schuster wrote:

Peter Rolf schrieb am 27.05.2020 um 16:38:

Hi,

this used to work, but wants a dimension now
In which way? Did you get the desired result or was there just no error 
message.

\starttext
\rotate[rotation=-0.2]{Rotation}
\stoptext

No such problems with integer rotation numbers.
ConTeXt expects a integer for the rotation value and decimals are only 
possible for a dimension.

can you test with:

   \clf_analyzerotate % rather accurate
 \p_rotation_rotation\space

in grph-trf.mkiv

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] lmtx: rotation problem with float numbers

2020-05-27 Thread Wolfgang Schuster

Peter Rolf schrieb am 27.05.2020 um 16:38:

Hi,

this used to work, but wants a dimension now
In which way? Did you get the desired result or was there just no error 
message.

\starttext
\rotate[rotation=-0.2]{Rotation}
\stoptext

No such problems with integer rotation numbers.
ConTeXt expects a integer for the rotation value and decimals are only 
possible for a dimension.


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
___


[NTG-context] lmtx: rotation problem with float numbers

2020-05-27 Thread Peter Rolf
Hi,

this used to work, but wants a dimension now

\starttext
\rotate[rotation=-0.2]{Rotation}
\stoptext

No such problems with integer rotation numbers.


Peter



T:\tmp>context --version
mtx-context | ConTeXt Process Management 1.03
mtx-context |
mtx-context | main context file:
V:/tmp/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2020.05.25 23:39
mtx-context | main context file:
V:/tmp/context/tex/texmf-context/tex/context/base/mkiv/context.mkxl
mtx-context | current version: 2020.05.25 23:39
\starttext
\rotate[rotation=-0.2]{Rotation}
\stoptext
open source > level 1, order 1, name 'cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2020.05.25 23:39 MKIV beta  fmt: 2020.5.27  
int: english/english
system  > 
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name 
'V:/tmp/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name 
'V:/tmp/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'rotation', input './rotation', result 
'rotation'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name './rotation.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded

tex error   > tex error on line 2 in file ./rotation.tex: ! Illegal unit of 
measure (pt inserted)

 
\relax 
\grph_rotate_finish_yes ...f_analyzerotate \numexpr \p_rotation_rotation \relax 

\d_grph_rotate_width \d_grph_rotate_height \d_grp...
\grph_rotate_finish_indeed ...h_rotate_finish_nop \else \grph_rotate_finish_yes 

\fi \egroup 
\syst_boxes_with_next_box ->\grph_rotate_finish_indeed 
   \egroup 
l.2 \rotate[rotation=-0.2]{Rotation}
  

1 \starttext
2 >>  \rotate[rotation=-0.2]{Rotation}
3 \stoptext
4 


Dimensions can be in units of em, ex, in, pt, pc, cm, mm, dd, cc, nd, nc, bp, or
sp; but yours is a new one! I'll assume that you meant to say pt, for printer's
points. two letters.


___
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] \setbreakpoints[compound] and numbers

2020-05-19 Thread Peter Münster
Hi,

How could I get breaking lines with numbers please?

Example:

\setbreakpoints[compound]
\setuplayout[width=1mm]
\starttext
xxx/xxx % line break is ok here
xx1/xxx % I would like a linebreak here too
\stoptext

TIA for any help,
-- 
   Peter
___
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] How to get page number as Burmese numbers?

2019-12-31 Thread Kyaw Myo Min
Hello Users, I am new to ConTeXt. Previously I used LaTeX. Can you help me how 
can I get page numbers in Burmese number. I found on ConTeXt wiki how to 
convert page number to words. But I don’t know how to modify it.Burmese 
language is not supported in ConTeXt.
___
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] Adding line numbers to all pages?

2019-12-02 Thread Weber, Matthias
Now that is embarrassing finding my question answered in an earlier post by 
Oliver from today.

Sorry for the noise.

Matthias

On Dec 2, 2019, at 17:49, Weber, Matthias 
mailto:matwe...@indiana.edu>> wrote:

Dear All,

Is there a simple way to add line numbers to the margin of each page of a 
document? They should recommence at 1 on every page,
and either omit formulas or handle them “gracefully”. I’d be happy to have any 
ad-hoc solution.

Thanks,

Matthias



\starttext

\input tufte
\startformula
1+1=1
\stopformula
\input knuth

\input tufte
\startformula
1+1=2
\stopformula
\input knuth

\input tufte
\startformula
1+1=3
\stopformula
\input knuth

\stoptext

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

maillist : ntg-context@ntg.nl<mailto: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] Adding line numbers to all pages?

2019-12-02 Thread Weber, Matthias
Dear All,

Is there a simple way to add line numbers to the margin of each page of a 
document? They should recommence at 1 on every page,
and either omit formulas or handle them “gracefully”. I’d be happy to have any 
ad-hoc solution.

Thanks,

Matthias



\starttext

\input tufte
\startformula
1+1=1
\stopformula
\input knuth

\input tufte
\startformula
1+1=2
\stopformula
\input knuth

\input tufte
\startformula
1+1=3
\stopformula
\input knuth

\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] setup according to total numbers

2019-11-20 Thread Pablo Rodriguez
Hi Hans,

this is related to a previous message
(https://mailman.ntg.nl/pipermail/ntg-context/2019/096253.html).

I don’t know how hard could to implement them, but it would be useful to
be able to setup xtables and lists based on the total number of columns,
rows and items.

Some cases would be:

- Set a different width in list if their total number of items is more
than 9 and another one if items are more than 19.

- List iwith alphabetic numbering when it contains fewer items than 5
and with digits in other case.

- Stretch xtable to width, if it contains more than 4 columns.

- Stretch xtable to height, if it contains more than 10 rows.

Sure, there may be plenty of other cases in which being able to setup
xtables and list based on the total number of their elements would be handy.

I wonder whether it would be possible to have commands that provide the
number of these elements to be used to set them up.

Many thanks for your help,

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] Cross references to column numbers

2019-11-16 Thread Hans Hagen

On 11/15/2019 8:22 PM, Pablo Rodriguez wrote:

On 11/15/19 3:44 PM, Oliver von Criegern wrote:

Could someone please take a look at this?

Am 12.11.19 um 13:02 schrieb Oliver von Criegern:

[...]
As you will see, targets A, B and C are all in the first column, and
targets D, E and F are all in the second column. But the references
read as follows:


Hi Oliver,

with latest beta from 2019.11.14 17:07 (and even the previous one),
references read:

 A: page 1, column 1, line 29.
 B: page 1, column 1, line 29.
 C: page 1, column 1, line 29.
 D: page 1, column 2, line 14.
 E: page 1, column 2, line 14.
 F: page 1, column 2, line 14.

I think your issue has been fixed. Or what is wrong there?

different implementation

(taco's solution is for the older method, but that method is a bit 
sensitive for different r/l layouts)


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] Cross references to column numbers

2019-11-15 Thread Pablo Rodriguez
On 11/15/19 3:44 PM, Oliver von Criegern wrote:
> Could someone please take a look at this?
>
> Am 12.11.19 um 13:02 schrieb Oliver von Criegern:
>> [...]
>> As you will see, targets A, B and C are all in the first column, and
>> targets D, E and F are all in the second column. But the references
>> read as follows:

Hi Oliver,

with latest beta from 2019.11.14 17:07 (and even the previous one),
references read:

A: page 1, column 1, line 29.
B: page 1, column 1, line 29.
C: page 1, column 1, line 29.
D: page 1, column 2, line 14.
E: page 1, column 2, line 14.
F: page 1, column 2, line 14.

I think your issue has been fixed. Or what is wrong there?

Just in case 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] Cross references to column numbers

2019-11-15 Thread Taco Hoekwater


> On 15 Nov 2019, at 16:31, Taco Hoekwater  wrote:
> 
> But that outer \numexpr rounds instead of truncates. so anything that
> is past halfway   of the column is rounded too far up. This fixes it
 ^ horizontally

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] Cross references to column numbers

2019-11-15 Thread Taco Hoekwater
Hi,

> On 15 Nov 2019, at 15:44, Oliver von Criegern 
>  wrote:
> 
> Could someone please take a look at this?

Well, I can tell you what is wrong …

The definition of \referencecolumnnumber is like this:

\def\referencecolumnnumber
  {\numexpr \dimexpr \clf_referenceposx -\cutspace \relax /
\dimexpr \makeupwidth /\nofcolumns \relax 
   +\plusone \relax }

But that outer \numexpr rounds instead of truncates. so anything that
is past halfway of the column is rounded too far up. This fixes it
(but not very elegantly)

\unprotect
\def\referencecolumnnumber
  {\numexpr \dimexpr \clf_referenceposx -\cutspace - \makeupwidth 
/(2*\nofcolumns) \relax /
\dimexpr \makeupwidth /\nofcolumns \relax 
   +\plusone \relax }
\protect
 

Best wishes,
Taco

> 
> Am 12.11.19 um 13:02 schrieb Oliver von Criegern:
>> Am 10.09.19 um 13:16 schrieb Hans Hagen:
>>> On 9/9/2019 10:05 PM, Henri Menke wrote:
>>>> Bump
>>>> 
>>>> On 9/3/19 4:46 AM, Oliver von Criegern wrote:
>>>>> Dear list members,
>>>>> 
>>>>> is there any way to get a cross reference to a column in a two column 
>>>>> layout?
>>> 
>>> yes and no:
>>> 
>>> no : there is not something buil tin
>>> yes: one can write some hack in a few lines
>>> 
>>> but instead of posting such a hack (which then will a live of its own) i'll 
>>> add a feature:
>>> 
>>> \pagereference[column:#1]
>>> 
>>> \doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{}
>>> 
>>> in the next beta,
>>> 
>>> Hans
>> 
>> Thanks for implementing this, but I am afraid it does not work properly, at 
>> least not if there are several targets following one after another.
>> 
>> Consider this example:
>> 
>> 
>> \setupcolumns[
>> n=2,
>> ]
>> \setuplinenumbering[
>> step=5,
>> method=page,
>> ]
>> 
>> \def\Lab#1{%
>> \pagereference[#1]%
>> \pagereference[column:#1]%
>> \someline[#1]%
>> }
>> 
>> \def\Ref#1{
>> page \at[#1],
>> column \doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{},
>> line \inlinerange[#1].
>> }
>> 
>> \starttext
>> \startcolumns
>> \startlinenumbering
>> 
>> REFERENCES:\par
>> A: \Ref{A}\par
>> B: \Ref{B}\par
>> C: \Ref{C}\par
>> D: \Ref{D}\par
>> E: \Ref{E}\par
>> F: \Ref{F}\par
>> \input lorem
>> TARGETS:
>> \Lab{A} A,
>> \Lab{B} B,
>> \Lab{C} C.
>> \input lorem
>> TARGETS:
>> \Lab{D} D,
>> \Lab{E} E,
>> \Lab{F} F.
>> \input lorem
>> 
>> \stoplinenumbering
>> \stopcolumns
>> \stoptext
>> 
>> As you will see, targets A, B and C are all in the first column, and targets 
>> D, E and F are all in the second column. But the references read as follows:
>> 
>> A: page 1, column 1, line 29.
>> B: page 1, column 1, line 29.
>> C: page 1, column 2, line 29.
>> D: page 1, column 2, line 14.
>> E: page 1, column 3, line 14.
>> F: page 1, column 3, line 14.
>> 
>> 
>> Best regards,
>> Oliver
>> 
>> 
>>> 
>>>>> At least, I would need to get some value that tells me whether the target 
>>>>> is in the left or in the right column. How to achieve this?
>>>>> 
>>>>> This is the more simplified version of the my previous question cited 
>>>>> below.
>>>>> 
>>>>> Best regards,
>>>>> Oliver.
>>>>> 
>>>>> 
>>>>> Am 12.08.19 um 15:26 schrieb Oliver von Criegern:
>>>>>> Dear list members,
>>>>>> 
>>>>>> how can I create cross references to column numbers?
>>>>>> 
>>>>>> I have a two column layout with column numbers in the header instead of 
>>>>>> page numbers (actually, these column numbers are calculated from the 
>>>>>> page numbers). Now I want to create a cross reference that returns the 
>>>>>> column number of the target. How can I achieve this?
>>>>>> 
>>>>>> Of course, I can get the page number with \pagereference (for the 
>>>>>> target) and \at (for the reference), but for calculating the column 
>>>>>> number (according to what I did in the header), I would also need to 
>>>>>> know whether the target is in the left or in the right column, and I 
>>

Re: [NTG-context] Cross references to column numbers

2019-11-15 Thread Oliver von Criegern

Could someone please take a look at this?

Am 12.11.19 um 13:02 schrieb Oliver von Criegern:

Am 10.09.19 um 13:16 schrieb Hans Hagen:

On 9/9/2019 10:05 PM, Henri Menke wrote:

Bump

On 9/3/19 4:46 AM, Oliver von Criegern wrote:

Dear list members,

is there any way to get a cross reference to a column in a two 
column layout?


yes and no:

no : there is not something buil tin
yes: one can write some hack in a few lines

but instead of posting such a hack (which then will a live of its 
own) i'll add a feature:


\pagereference[column:#1]

\doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{}

in the next beta,

Hans


Thanks for implementing this, but I am afraid it does not work 
properly, at least not if there are several targets following one 
after another.


Consider this example:


\setupcolumns[
    n=2,
]
\setuplinenumbering[
    step=5,
    method=page,
]

\def\Lab#1{%
\pagereference[#1]%
\pagereference[column:#1]%
\someline[#1]%
}

\def\Ref#1{
page \at[#1],
column 
\doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{},

line \inlinerange[#1].
}

\starttext
\startcolumns
\startlinenumbering

REFERENCES:\par
A: \Ref{A}\par
B: \Ref{B}\par
C: \Ref{C}\par
D: \Ref{D}\par
E: \Ref{E}\par
F: \Ref{F}\par
\input lorem
TARGETS:
\Lab{A} A,
\Lab{B} B,
\Lab{C} C.
\input lorem
TARGETS:
\Lab{D} D,
\Lab{E} E,
\Lab{F} F.
\input lorem

\stoplinenumbering
\stopcolumns
\stoptext

As you will see, targets A, B and C are all in the first column, and 
targets D, E and F are all in the second column. But the references 
read as follows:


A: page 1, column 1, line 29.
B: page 1, column 1, line 29.
C: page 1, column 2, line 29.
D: page 1, column 2, line 14.
E: page 1, column 3, line 14.
F: page 1, column 3, line 14.


Best regards,
Oliver




At least, I would need to get some value that tells me whether the 
target is in the left or in the right column. How to achieve this?


This is the more simplified version of the my previous question 
cited below.


Best regards,
Oliver.


Am 12.08.19 um 15:26 schrieb Oliver von Criegern:

Dear list members,

how can I create cross references to column numbers?

I have a two column layout with column numbers in the header 
instead of page numbers (actually, these column numbers are 
calculated from the page numbers). Now I want to create a cross 
reference that returns the column number of the target. How can I 
achieve this?


Of course, I can get the page number with \pagereference (for the 
target) and \at (for the reference), but for calculating the 
column number (according to what I did in the header), I would 
also need to know whether the target is in the left or in the 
right column, and I can't see how I can get this information.


For an example, see the question posted by me at stackexchange:
https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers 



Besides, I am wondering, regarding the generally very regular and 
consistent naming of commands in ConTeXt, why this is not so in 
the case of references. For example, to refer to a page, I need 
\pagereference (for the target) and \at (for the reference); to 
refer to a line, I need \someline (for the target) and \inline 
(for the reference), but only if I want it to automatically add 
the word "line" or something else before the number, otherwise I 
have to use \inlinerange. It took me some time to find that out. 
Wouldn't it be easier to have just one command for the target and 
another one for the reference, and everything else, as counters 
and headers to be returned, text to be added etc. to be configured 
by options?
Because all these \in \at \about ... give back different things (a 
title, a number, a range, a ...) and packaging all that in one macro 
doens't make it cleaner so soon users will then wrap complex calls in 
a macro of their own (which then can clash with some existing name).


Also, the ref mechanism evolved over decades and we're not going to 
drop compatibility.


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
___ 




--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München

Re: [NTG-context] Cross references to column numbers

2019-11-12 Thread Oliver von Criegern

Am 10.09.19 um 13:16 schrieb Hans Hagen:

On 9/9/2019 10:05 PM, Henri Menke wrote:

Bump

On 9/3/19 4:46 AM, Oliver von Criegern wrote:

Dear list members,

is there any way to get a cross reference to a column in a two 
column layout?


yes and no:

no : there is not something buil tin
yes: one can write some hack in a few lines

but instead of posting such a hack (which then will a live of its own) 
i'll add a feature:


\pagereference[column:#1]

\doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{}

in the next beta,

Hans


Thanks for implementing this, but I am afraid it does not work properly, 
at least not if there are several targets following one after another.


Consider this example:


\setupcolumns[
    n=2,
]
\setuplinenumbering[
    step=5,
    method=page,
]

\def\Lab#1{%
\pagereference[#1]%
\pagereference[column:#1]%
\someline[#1]%
}

\def\Ref#1{
page \at[#1],
column \doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{},
line \inlinerange[#1].
}

\starttext
\startcolumns
\startlinenumbering

REFERENCES:\par
A: \Ref{A}\par
B: \Ref{B}\par
C: \Ref{C}\par
D: \Ref{D}\par
E: \Ref{E}\par
F: \Ref{F}\par
\input lorem
TARGETS:
\Lab{A} A,
\Lab{B} B,
\Lab{C} C.
\input lorem
TARGETS:
\Lab{D} D,
\Lab{E} E,
\Lab{F} F.
\input lorem

\stoplinenumbering
\stopcolumns
\stoptext

As you will see, targets A, B and C are all in the first column, and 
targets D, E and F are all in the second column. But the references read 
as follows:


A: page 1, column 1, line 29.
B: page 1, column 1, line 29.
C: page 1, column 2, line 29.
D: page 1, column 2, line 14.
E: page 1, column 3, line 14.
F: page 1, column 3, line 14.


Best regards,
Oliver




At least, I would need to get some value that tells me whether the 
target is in the left or in the right column. How to achieve this?


This is the more simplified version of the my previous question 
cited below.


Best regards,
Oliver.


Am 12.08.19 um 15:26 schrieb Oliver von Criegern:

Dear list members,

how can I create cross references to column numbers?

I have a two column layout with column numbers in the header 
instead of page numbers (actually, these column numbers are 
calculated from the page numbers). Now I want to create a cross 
reference that returns the column number of the target. How can I 
achieve this?


Of course, I can get the page number with \pagereference (for the 
target) and \at (for the reference), but for calculating the column 
number (according to what I did in the header), I would also need 
to know whether the target is in the left or in the right column, 
and I can't see how I can get this information.


For an example, see the question posted by me at stackexchange:
https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers 



Besides, I am wondering, regarding the generally very regular and 
consistent naming of commands in ConTeXt, why this is not so in the 
case of references. For example, to refer to a page, I need 
\pagereference (for the target) and \at (for the reference); to 
refer to a line, I need \someline (for the target) and \inline (for 
the reference), but only if I want it to automatically add the word 
"line" or something else before the number, otherwise I have to use 
\inlinerange. It took me some time to find that out. Wouldn't it be 
easier to have just one command for the target and another one for 
the reference, and everything else, as counters and headers to be 
returned, text to be added etc. to be configured by options?
Because all these \in \at \about ... give back different things (a 
title, a number, a range, a ...) and packaging all that in one macro 
doens't make it cleaner so soon users will then wrap complex calls in 
a macro of their own (which then can clash with some existing name).


Also, the ref mechanism evolved over decades and we're not going to 
drop compatibility.


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
___ 



--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-

Re: [NTG-context] Help wanted: index with chapter and section numbers

2019-11-10 Thread Wolfgang Schuster

Otared Kavian schrieb am 10.11.2019 um 10:38:

Hi,

In a math text book, I would like to create an index of some material where 
chapter and section numbers are given instead of a page number.

For instance if the result « 3.2.5 Banach Fixed Point Theorem » is stated in 
section 2 of chapter 3, and is the fifth numbered statement in that section, I 
would like to create a \myindex command so that adding the command
\myindex{Banach Fixed Point Theorem}
at that location, I get in the index created by \myindex a line such as

Banach Fixed Point Theorem  3.2.5

Is this possible?


Did you miss Hans solution?

https://mailman.ntg.nl/pipermail/ntg-context/2019/096183.html

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
___


[NTG-context] Help wanted: index with chapter and section numbers

2019-11-10 Thread Otared Kavian
Hi,

In a math text book, I would like to create an index of some material where 
chapter and section numbers are given instead of a page number.

For instance if the result « 3.2.5 Banach Fixed Point Theorem » is stated in 
section 2 of chapter 3, and is the fifth numbered statement in that section, I 
would like to create a \myindex command so that adding the command
\myindex{Banach Fixed Point Theorem}
at that location, I get in the index created by \myindex a line such as

Banach Fixed Point Theorem  3.2.5

Is this possible?

Best regards and many thanks for any hint: OK
___
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] index with chapter and section numbers

2019-11-07 Thread Hans Hagen

On 11/7/2019 10:25 AM, Otared Kavian wrote:

Hi,

In a math text book, I would like to create an index of some material where 
chapter and section numbers are given instead of a page number.

For instance if the result « 3.2.5 Banach Fixed Point Theorem » is stated in 
section 2 of chapter 3, and is the fifth numbered statement in that section, I 
would like to create a \myindex command so that adding the command
\myindex{Banach Fixed Point Theorem}
at that location, I get in the index created by \myindex a line such as

Banach Fixed Point Theorem  3.2.5

Is this possible?


well, the info is actually there already so i added a new option (that 
you then wikify) ...


\setupregister
  [index]
  [pagesegments=1:4,
   pagemethod=section]

\starttext

\chapter {one} \section {alpha}

x\index {whatever 1}x\index {whatever 2}x\index {whatever 2}x \page
x\index {whatever 1}x\index {whatever 2}x\index {whatever 2}x \page

\chapter {one} \section {alpha}

x\index {whatever 1}x\index {whatever 2}x\index {whatever 2}x \page
x\index {whatever 1}x\index {whatever 2}x\index {whatever 2}x \page

\placeindex[n=1]

\stoptext

which then renders:

w
whatever 1 1.1, 2.1
whatever 2 1.1, 2.1

in next beta

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] index with chapter and section numbers

2019-11-07 Thread Otared Kavian
Hi,

In a math text book, I would like to create an index of some material where 
chapter and section numbers are given instead of a page number.

For instance if the result « 3.2.5 Banach Fixed Point Theorem » is stated in 
section 2 of chapter 3, and is the fifth numbered statement in that section, I 
would like to create a \myindex command so that adding the command
\myindex{Banach Fixed Point Theorem}
at that location, I get in the index created by \myindex a line such as

Banach Fixed Point Theorem  3.2.5

Is this possible?

Best regards and many thanks for any hint: OK
___
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] Cross references to column numbers

2019-09-10 Thread Henning Hraban Ramm
Am 2019-09-10 um 13:16 schrieb Hans Hagen :
> 
> On 9/9/2019 10:05 PM, Henri Menke wrote:
>> Bump
>> On 9/3/19 4:46 AM, Oliver von Criegern wrote:
>>> Dear list members,
>>> 
>>> is there any way to get a cross reference to a column in a two column 
>>> layout?
> 
> yes and no:
> 
> no : there is not something buil tin
> yes: one can write some hack in a few lines
> 
> but instead of posting such a hack (which then will a live of its own) i'll 
> add a feature:
> 
> \pagereference[column:#1]
> 
> \doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{}
> 
> in the next beta,

Dear Oliver,
please don’t forget to document this on the appropriate wiki pages!


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
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] Cross references to column numbers

2019-09-10 Thread Oliver von Criegern


Am 10.09.19 um 13:16 schrieb Hans Hagen:

On 9/9/2019 10:05 PM, Henri Menke wrote:

Bump

On 9/3/19 4:46 AM, Oliver von Criegern wrote:

Dear list members,

is there any way to get a cross reference to a column in a two 
column layout?


yes and no:

no : there is not something buil tin
yes: one can write some hack in a few lines

but instead of posting such a hack (which then will a live of its own) 
i'll add a feature:


\pagereference[column:#1]

\doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{}

in the next beta,

Hans



This would be great, thanks!

Best regards,
Oliver




At least, I would need to get some value that tells me whether the 
target is in the left or in the right column. How to achieve this?


This is the more simplified version of the my previous question 
cited below.


Best regards,
Oliver.


Am 12.08.19 um 15:26 schrieb Oliver von Criegern:

Dear list members,

how can I create cross references to column numbers?

I have a two column layout with column numbers in the header 
instead of page numbers (actually, these column numbers are 
calculated from the page numbers). Now I want to create a cross 
reference that returns the column number of the target. How can I 
achieve this?


Of course, I can get the page number with \pagereference (for the 
target) and \at (for the reference), but for calculating the column 
number (according to what I did in the header), I would also need 
to know whether the target is in the left or in the right column, 
and I can't see how I can get this information.


For an example, see the question posted by me at stackexchange:
https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers 



Besides, I am wondering, regarding the generally very regular and 
consistent naming of commands in ConTeXt, why this is not so in the 
case of references. For example, to refer to a page, I need 
\pagereference (for the target) and \at (for the reference); to 
refer to a line, I need \someline (for the target) and \inline (for 
the reference), but only if I want it to automatically add the word 
"line" or something else before the number, otherwise I have to use 
\inlinerange. It took me some time to find that out. Wouldn't it be 
easier to have just one command for the target and another one for 
the reference, and everything else, as counters and headers to be 
returned, text to be added etc. to be configured by options?
Because all these \in \at \about ... give back different things (a 
title, a number, a range, a ...) and packaging all that in one macro 
doens't make it cleaner so soon users will then wrap complex calls in 
a macro of their own (which then can clash with some existing name).


Also, the ref mechanism evolved over decades and we're not going to 
drop compatibility.


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
___ 



--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-23031-1310

___
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] Cross references to column numbers

2019-09-10 Thread Hans Hagen

On 9/9/2019 10:05 PM, Henri Menke wrote:

Bump

On 9/3/19 4:46 AM, Oliver von Criegern wrote:

Dear list members,

is there any way to get a cross reference to a column in a two column layout?


yes and no:

no : there is not something buil tin
yes: one can write some hack in a few lines

but instead of posting such a hack (which then will a live of its own) 
i'll add a feature:


\pagereference[column:#1]

\doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{}

in the next beta,

Hans


At least, I would need to get some value that tells me whether the target is in 
the left or in the right column. How to achieve this?

This is the more simplified version of the my previous question cited below.

Best regards,
Oliver.


Am 12.08.19 um 15:26 schrieb Oliver von Criegern:

Dear list members,

how can I create cross references to column numbers?

I have a two column layout with column numbers in the header instead of page 
numbers (actually, these column numbers are calculated from the page numbers). 
Now I want to create a cross reference that returns the column number of the 
target. How can I achieve this?

Of course, I can get the page number with \pagereference (for the target) and 
\at (for the reference), but for calculating the column number (according to 
what I did in the header), I would also need to know whether the target is in 
the left or in the right column, and I can't see how I can get this information.

For an example, see the question posted by me at stackexchange:
https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers

Besides, I am wondering, regarding the generally very regular and consistent naming of 
commands in ConTeXt, why this is not so in the case of references. For example, to refer 
to a page, I need \pagereference (for the target) and \at (for the reference); to refer 
to a line, I need \someline (for the target) and \inline (for the reference), but only if 
I want it to automatically add the word "line" or something else before the 
number, otherwise I have to use \inlinerange. It took me some time to find that out. 
Wouldn't it be easier to have just one command for the target and another one for the 
reference, and everything else, as counters and headers to be returned, text to be added 
etc. to be configured by options?
Because all these \in \at \about ... give back different things (a 
title, a number, a range, a ...) and packaging all that in one macro 
doens't make it cleaner so soon users will then wrap complex calls in a 
macro of their own (which then can clash with some existing name).


Also, the ref mechanism evolved over decades and we're not going to drop 
compatibility.


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] Cross references to column numbers

2019-09-09 Thread Henri Menke
Bump

On 9/3/19 4:46 AM, Oliver von Criegern wrote:
> Dear list members,
> 
> is there any way to get a cross reference to a column in a two column layout?
> 
> At least, I would need to get some value that tells me whether the target is 
> in the left or in the right column. How to achieve this?
> 
> This is the more simplified version of the my previous question cited below.
> 
> Best regards,
> Oliver.
> 
> 
> Am 12.08.19 um 15:26 schrieb Oliver von Criegern:
>> Dear list members,
>>
>> how can I create cross references to column numbers?
>>
>> I have a two column layout with column numbers in the header instead of page 
>> numbers (actually, these column numbers are calculated from the page 
>> numbers). Now I want to create a cross reference that returns the column 
>> number of the target. How can I achieve this?
>>
>> Of course, I can get the page number with \pagereference (for the target) 
>> and \at (for the reference), but for calculating the column number 
>> (according to what I did in the header), I would also need to know whether 
>> the target is in the left or in the right column, and I can't see how I can 
>> get this information.
>>
>> For an example, see the question posted by me at stackexchange:
>> https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers
>>
>> Besides, I am wondering, regarding the generally very regular and consistent 
>> naming of commands in ConTeXt, why this is not so in the case of references. 
>> For example, to refer to a page, I need \pagereference (for the target) and 
>> \at (for the reference); to refer to a line, I need \someline (for the 
>> target) and \inline (for the reference), but only if I want it to 
>> automatically add the word "line" or something else before the number, 
>> otherwise I have to use \inlinerange. It took me some time to find that out. 
>> Wouldn't it be easier to have just one command for the target and another 
>> one for the reference, and everything else, as counters and headers to be 
>> returned, text to be added etc. to be configured by options?
>>
>> Best regards,
>> Oliver.
>>
>>
> ___
> 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] Cross references to column numbers

2019-09-02 Thread Oliver von Criegern

Dear list members,

is there any way to get a cross reference to a column in a two column 
layout?


At least, I would need to get some value that tells me whether the 
target is in the left or in the right column. How to achieve this?


This is the more simplified version of the my previous question cited below.

Best regards,
Oliver.


Am 12.08.19 um 15:26 schrieb Oliver von Criegern:

Dear list members,

how can I create cross references to column numbers?

I have a two column layout with column numbers in the header instead 
of page numbers (actually, these column numbers are calculated from 
the page numbers). Now I want to create a cross reference that returns 
the column number of the target. How can I achieve this?


Of course, I can get the page number with \pagereference (for the 
target) and \at (for the reference), but for calculating the column 
number (according to what I did in the header), I would also need to 
know whether the target is in the left or in the right column, and I 
can't see how I can get this information.


For an example, see the question posted by me at stackexchange:
https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers 



Besides, I am wondering, regarding the generally very regular and 
consistent naming of commands in ConTeXt, why this is not so in the 
case of references. For example, to refer to a page, I need 
\pagereference (for the target) and \at (for the reference); to refer 
to a line, I need \someline (for the target) and \inline (for the 
reference), but only if I want it to automatically add the word "line" 
or something else before the number, otherwise I have to use 
\inlinerange. It took me some time to find that out. Wouldn't it be 
easier to have just one command for the target and another one for the 
reference, and everything else, as counters and headers to be 
returned, text to be added etc. to be configured by options?


Best regards,
Oliver.



___
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] Cross references to column numbers

2019-08-12 Thread Oliver von Criegern

Dear list members,

how can I create cross references to column numbers?

I have a two column layout with column numbers in the header instead of 
page numbers (actually, these column numbers are calculated from the 
page numbers). Now I want to create a cross reference that returns the 
column number of the target. How can I achieve this?


Of course, I can get the page number with \pagereference (for the 
target) and \at (for the reference), but for calculating the column 
number (according to what I did in the header), I would also need to 
know whether the target is in the left or in the right column, and I 
can't see how I can get this information.


For an example, see the question posted by me at stackexchange:
https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers

Besides, I am wondering, regarding the generally very regular and 
consistent naming of commands in ConTeXt, why this is not so in the case 
of references. For example, to refer to a page, I need \pagereference 
(for the target) and \at (for the reference); to refer to a line, I need 
\someline (for the target) and \inline (for the reference), but only if 
I want it to automatically add the word "line" or something else before 
the number, otherwise I have to use \inlinerange. It took me some time 
to find that out. Wouldn't it be easier to have just one command for the 
target and another one for the reference, and everything else, as 
counters and headers to be returned, text to be added etc. to be 
configured by options?


Best regards,
Oliver.


___
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] I (metapost) can't handle numbers bigger than 32767.99998

2019-07-05 Thread Zhichu
Hi Hans,

I simply put the unicode character there and everything works pretty well.

I was using only 5 Chinese characters in a document: 中國科學院, which means Chinese 
Academy of Sciences. Looked up their unicode number:

for c in u'中國科學院': print(ord(c))
20013
22283
31185
23416
38498

and draw every glyph carefully in a metapost file "cas-chars.mp":

beginglyph(20013,1000,1000,0);
  % a lot of fillings and drawingsendglyph;

then call them in a test file:

\definemetafont[cas-logo][cas-chars.mp]
\startTEXpage
\definefont[cas][cas@cas-logo]
\cas 中國科學院\stopTEXpage

If I remove the beginglyph(38498,1000,1000,0) part in the mp file and “\cas 
中國科學” will generate the correct output. or if I change 
beginglyph(38498,1000,1000,0) to  beginglyph(32767,1000,1000,0) and “\cas 
中國科學\char"7FFF” also gives the right output.

I'm looking forward to “some” module :-)
--
From:Hans Hagen 
Send Time:2019 Jul. 5 (Fri.) 17:03
To:陈之初 ; mailing list for ConTeXt users 

Subject:Re: [NTG-context] I (metapost) can't handle numbers bigger than 
32767.8

On 7/5/2019 8:32 AM, Zhichu wrote:
> Hi everyone,
> 
> I was using metapost to generate some symbols, as in 
> "tex/texmf-context/metapost/context/fonts/mpiv/demo-symbols.tex"

How do you use these symbols in a document? Do you call them up by 
number somehow? Using some glyph interface doesn't make much sense I 
think, as the font stuff comes from mf which is 8 bit. So, these 
character numbers (and simensions) are not really saying much, other 
than that they're properties of a figure.

(In context lmtx there will likely be some module for mp fonts. We can 
already do a lot but there is some more potential.)

Hans


> Occasionally, I want to customize a glyph whose charcode is a little large, 
> say the character " 
> 院":
> 
> ~~~IPython
> In [1]: for c in u'院': print(ord(c))
> 38498
> 
> 
> so I wrote:
> 
> beginglyph(38498,2,4,0) ; % high voltage
>  interim ahlength := 1 ;
>  drawarrow (1,4) -- (0,2) -- (2,3) -- (1,0) withcolor darkred ;
> endglyph ;
> 
> 
> and I got:
> ========
> ! Enormous number has been reduced.
> l.60 beginzhglyph(38498
> );
> I can't handle numbers bigger than 32767.8;
> so I've changed your constant to that maximum amount.
> 
> 
> So charcode is a 15-bit integer?
> 
> Currently, I use `beginglyph(32767,2,4,0) ;` and call it with \char"7FFF. Not 
> an elegant way I think.
> 
> Is there a fix? I checked the metapost manual and found that charcode is only 
> used to set the filename to something like %{jobname}.%{charcode} I can't see 
> why there's a limit for charcode.
> 
> 
> 
> 
> 
> 
> ___
> 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
> ___
> 


-- 

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

___
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] I (metapost) can't handle numbers bigger than 32767.99998

2019-07-05 Thread Hans Hagen

On 7/5/2019 8:32 AM, Zhichu wrote:

Hi everyone,

I was using metapost to generate some symbols, as in 
"tex/texmf-context/metapost/context/fonts/mpiv/demo-symbols.tex"


How do you use these symbols in a document? Do you call them up by 
number somehow? Using some glyph interface doesn't make much sense I 
think, as the font stuff comes from mf which is 8 bit. So, these 
character numbers (and simensions) are not really saying much, other 
than that they're properties of a figure.


(In context lmtx there will likely be some module for mp fonts. We can 
already do a lot but there is some more potential.)


Hans


Occasionally, I want to customize a glyph whose charcode is a little large, say the character " 
院":


~~~IPython
In [1]: for c in u'院': print(ord(c))
38498


so I wrote:

beginglyph(38498,2,4,0) ; % high voltage
 interim ahlength := 1 ;
 drawarrow (1,4) -- (0,2) -- (2,3) -- (1,0) withcolor darkred ;
endglyph ;


and I got:

! Enormous number has been reduced.
l.60 beginzhglyph(38498
);
I can't handle numbers bigger than 32767.8;
so I've changed your constant to that maximum amount.


So charcode is a 15-bit integer?

Currently, I use `beginglyph(32767,2,4,0) ;` and call it with \char"7FFF. Not 
an elegant way I think.

Is there a fix? I checked the metapost manual and found that charcode is only 
used to set the filename to something like %{jobname}.%{charcode} I can't see 
why there's a limit for charcode.






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




--

-
  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] I (metapost) can't handle numbers bigger than 32767.99998

2019-07-05 Thread Zhichu
Hi everyone,

I was using metapost to generate some symbols, as in 
"tex/texmf-context/metapost/context/fonts/mpiv/demo-symbols.tex"

Occasionally, I want to customize a glyph whose charcode is a little large, say 
the character "院":

~~~IPython
In [1]: for c in u'院': print(ord(c))
38498


so I wrote:

beginglyph(38498,2,4,0) ; % high voltage
interim ahlength := 1 ;
drawarrow (1,4) -- (0,2) -- (2,3) -- (1,0) withcolor darkred ;
endglyph ;


and I got:

! Enormous number has been reduced.
l.60 beginzhglyph(38498
);
I can't handle numbers bigger than 32767.8;
so I've changed your constant to that maximum amount.


So charcode is a 15-bit integer?

Currently, I use `beginglyph(32767,2,4,0) ;` and call it with \char"7FFF. Not 
an elegant way I think.

Is there a fix? I checked the metapost manual and found that charcode is only 
used to set the filename to something like %{jobname}.%{charcode} I can't see 
why there's a limit for charcode.





___
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] chapter-number prefixes on figure, etc, numbers, even in unnumbered section appearing in TOC

2019-05-31 Thread Sanjoy Mahajan
Dear List,

The following, it seems, is a recurring question, which I had hoped to
solve by digging in the test suite
 -- but no luck.

The problem is to have figures, list items, problems, etc. numbered with
a chapter prefix (e.g. Figure 7.18) even in unnumbered sections that
appear in the TOC.

1. Using \subject as the section command, the figure number is correctly
prefixed, but the section itself doesn't appear in the TOC.

2. Using \section, the figure number is also correctly prefixed, and the
section appears in the TOC, but the section gets numbered (e.g. Section
2.7).

In one of the earlier threads, which are "Prefix for figure number lost
in unnumbered subsection"
, "Unnumbered
subject in TOC, numbered exercises in text"
, and
"incrementnumber vs. prefixsegments"
, Hans suggested
looking in the test suite for fine control of the prefix segments.

I have done that, and the best MNWE that I can come up with is a
modification of doc/context/tests/mkiv/sections/figures-001.tex in the
test suite (see code below), but it also fails:

* When incrementnumber=list (as in the code), the TOC lists that
section, but the figure 5 doesn't get a chapter-number prefix.

* When incrementnumber=no (recreating \subject), the TOC is not correct,
but figure 5 gets its prefix.

* And wWhen incrementnumber-yes (recreating \section), the TOC lists
that section, but the section gets a number.

Is there a modification to what I tried that gets all the aspects right
(TOC entry, unnumbered, chapter prefix on figures, etc. within)?

-Sanjoy

The code:

\setupcaption[figure][way=bytext,prefixset=1:2]
\definehead[unnumberedsection][section]
\setuphead [unnumberedsection][incrementnumber=list]

\starttext
\placelist[chapter,section,unnumberedsection]

\chapter{One}
\placefigure{one}{1}

\section{Two}
\placefigure{two}{2}

\chapter{Three}
\placefigure{three}{3}
\placefigure{four}{4}

\unnumberedsection{Four}

\placefigure{five}{5}

\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] index "compress" option / collapsing of page numbers

2019-04-03 Thread Henning Hraban Ramm
Am 2019-04-03 um 13:30 schrieb Hans Hagen :

> On 4/3/2019 10:56 AM, Henning Hraban Ramm wrote:
>> Am 2019-04-02 um 18:53 schrieb Hans Hagen :
>>> On 4/2/2019 11:54 AM, Henning Hraban Ramm wrote:
 Ahoi,
 with \setupregister[compress=yes], index entries 1,2,3,4 become 1–4. 
 That’s great.
 But (at least in German publications) it’s usual that 1,2 becomes 1f. and 
 1,2,3 becomes 1ff.
 Is it possible to configure it that way?
>>> it should not be too hard to program but, it being german problem:
>>> 
>>> - you have to come up with an example
>>> - wolfgang has to come up with a proper keyword (compress=?)
>>> 
>> Thank you – it’s not only a German habit, even if we pronounce it 
>> “folgende”, “f.” stems from Latin “folio”, and “ff.” is a duplicated 
>> abbreviation, as was usual in mediaeval Latin.
>> So, this is at least used in English, German, Norwegian and Swedish, as far 
>> as I could find. In French they seem to use “sq.” and “sqq.” (sequens).
>> https://de.wiktionary.org/wiki/ff.
>> https://en.wiktionary.org/wiki/ff.
>> https://fr.wiktionary.org/wiki/sq.
>> I suggest the following setup options:
>> compress = no  —> don’t collapse (as now)
>> compress = yes —> always use – (as now)
>> compresssymbols={\,f.,\,ff.} (or how can you setup a list?)
>> compress = symbols —> use first symbol for one other page, second for more 
>> pages
>>  if there’s only one symbol, more than one sequential page should use – 
>> (like “yes”)
>> Is this feasible?
> 
> i'll add
> 
> \setuplabeltext % predefined
>  [en]
>  [following:singular=f.,
>   following:plural=ff.]
> 
> \setupregister[index][compress=text]


Great! Thank you!
I’ll document it.

Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
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] index "compress" option / collapsing of page numbers

2019-04-03 Thread Hans Hagen

On 4/3/2019 10:56 AM, Henning Hraban Ramm wrote:

Am 2019-04-02 um 18:53 schrieb Hans Hagen :


On 4/2/2019 11:54 AM, Henning Hraban Ramm wrote:

Ahoi,
with \setupregister[compress=yes], index entries 1,2,3,4 become 1–4. That’s 
great.
But (at least in German publications) it’s usual that 1,2 becomes 1f. and 1,2,3 
becomes 1ff.
Is it possible to configure it that way?

it should not be too hard to program but, it being german problem:

- you have to come up with an example
- wolfgang has to come up with a proper keyword (compress=?)



Thank you – it’s not only a German habit, even if we pronounce it “folgende”, 
“f.” stems from Latin “folio”, and “ff.” is a duplicated abbreviation, as was 
usual in mediaeval Latin.
So, this is at least used in English, German, Norwegian and Swedish, as far as 
I could find. In French they seem to use “sq.” and “sqq.” (sequens).

https://de.wiktionary.org/wiki/ff.
https://en.wiktionary.org/wiki/ff.
https://fr.wiktionary.org/wiki/sq.

I suggest the following setup options:

compress = no  —> don’t collapse (as now)
compress = yes —> always use – (as now)

compresssymbols={\,f.,\,ff.} (or how can you setup a list?)
compress = symbols —> use first symbol for one other page, second for more pages
if there’s only one symbol, more than one sequential page should use – 
(like “yes”)

Is this feasible?


i'll add

\setuplabeltext % predefined
  [en]
  [following:singular=f.,
   following:plural=ff.]

\setupregister[index][compress=text]

-
  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] index "compress" option / collapsing of page numbers

2019-04-03 Thread Herbert Voss



Am 03.04.19 um 11:41 schrieb Thomas A. Schmitz:




On 3. Apr 2019, at 10:56, Henning Hraban Ramm  wrote:

Thank you – it’s not only a German habit, even if we pronounce it “folgende”, 
“f.” stems from Latin “folio”, and “ff.” is a duplicated abbreviation, as was 
usual in mediaeval Latin.
So, this is at least used in English, German, Norwegian and Swedish, as far as 
I could find. In French they seem to use “sq.” and “sqq.” (sequens).


I’m not sure the abbreviation for “folio” has anything to do with our German 
“folgende”; if you have a link for this, I would like to know. And for the 
record: “ff.” for page ranges is now discouraged in most scholarly 
publications; journals and publishers now say f. for x - x+1, or exact page 
numbers.


it has nothing do do with "folgende", but it is often used because it 
means nearly the same.



folium = {
  de = {”f”, ”ff”},
  en = {”f”, ”ff”},
  fr = {”\,sq”,”\,sqq”},
  jp = {”シンボル”,”番号”},
}

Herbert
___
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] index "compress" option / collapsing of page numbers

2019-04-03 Thread Thomas A. Schmitz


> On 3. Apr 2019, at 10:56, Henning Hraban Ramm  wrote:
> 
> Thank you – it’s not only a German habit, even if we pronounce it “folgende”, 
> “f.” stems from Latin “folio”, and “ff.” is a duplicated abbreviation, as was 
> usual in mediaeval Latin.
> So, this is at least used in English, German, Norwegian and Swedish, as far 
> as I could find. In French they seem to use “sq.” and “sqq.” (sequens).

I’m not sure the abbreviation for “folio” has anything to do with our German 
“folgende”; if you have a link for this, I would like to know. And for the 
record: “ff.” for page ranges is now discouraged in most scholarly 
publications; journals and publishers now say f. for x - x+1, or exact page 
numbers.

Thomas
___
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] index "compress" option / collapsing of page numbers

2019-04-03 Thread Ulrike Fischer
Am Wed, 3 Apr 2019 10:56:21 +0200 schrieb Henning Hraban Ramm:

>  or is there a need to collapse pages in bibliographies?

there can be such page ranges with ff both in the bibliography and
the citation. But normally you input them hard coded as you know it
in advance (in biblatex as 1\psq or 1\psqq). 
But biblatex has options to recreate them on-the-fly for backref
lists in the bib (and could use the code in more places if needed). 
 
-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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] index "compress" option / collapsing of page numbers

2019-04-03 Thread Henning Hraban Ramm
Am 2019-04-02 um 18:53 schrieb Hans Hagen :

> On 4/2/2019 11:54 AM, Henning Hraban Ramm wrote:
>> Ahoi,
>> with \setupregister[compress=yes], index entries 1,2,3,4 become 1–4. That’s 
>> great.
>> But (at least in German publications) it’s usual that 1,2 becomes 1f. and 
>> 1,2,3 becomes 1ff.
>> Is it possible to configure it that way?
> it should not be too hard to program but, it being german problem:
> 
> - you have to come up with an example
> - wolfgang has to come up with a proper keyword (compress=?)
> 

Thank you – it’s not only a German habit, even if we pronounce it “folgende”, 
“f.” stems from Latin “folio”, and “ff.” is a duplicated abbreviation, as was 
usual in mediaeval Latin.
So, this is at least used in English, German, Norwegian and Swedish, as far as 
I could find. In French they seem to use “sq.” and “sqq.” (sequens).

https://de.wiktionary.org/wiki/ff.
https://en.wiktionary.org/wiki/ff.
https://fr.wiktionary.org/wiki/sq.

I suggest the following setup options:

compress = no  —> don’t collapse (as now)
compress = yes —> always use – (as now)

compresssymbols={\,f.,\,ff.} (or how can you setup a list?)
compress = symbols —> use first symbol for one other page, second for more pages
if there’s only one symbol, more than one sequential page should use – 
(like “yes”)

Is this feasible?

As far as I see, we need this only for index entries, i.e. \setupregister, 
since there’s no command like \at for more than one page anyway; or is there a 
need to collapse pages in bibliographies?


Test case:


\usemodule[visual]
\setuppapersize[A6]

\setupregister[index][
  compress=yes,
  %compresssymbols={\,f.,\,ff.},
  %compress=symbols,
]

\starttext
\placeindex\index{nonsense}
\page

\strut\index{something}\page
\strut\index{something}\page

\dorecurse{7}{
\fakewords{10}{100}\index{something}\par
\fakewords{20}{200}\index{other}\par
\fakewords{10}{100}\index{something}\par
}
\index{finis} % not flushed?

\stoptext



Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
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] index "compress" option / collapsing of page numbers

2019-04-02 Thread Hans Hagen

On 4/2/2019 11:54 AM, Henning Hraban Ramm wrote:

Ahoi,

with \setupregister[compress=yes], index entries 1,2,3,4 become 1–4. That’s 
great.

But (at least in German publications) it’s usual that 1,2 becomes 1f. and 1,2,3 
becomes 1ff.

Is it possible to configure it that way?

it should not be too hard to program but, it being german problem:

- you have to come up with an example
- wolfgang has to come up with a proper keyword (compress=?)

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] index "compress" option / collapsing of page numbers

2019-04-02 Thread Henning Hraban Ramm
Ahoi,

with \setupregister[compress=yes], index entries 1,2,3,4 become 1–4. That’s 
great.

But (at least in German publications) it’s usual that 1,2 becomes 1f. and 1,2,3 
becomes 1ff.

Is it possible to configure it that way?


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
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] Omitting part number in chapter numbers

2019-02-20 Thread Wolfgang Schuster

Simon Collier schrieb am 20.02.19 um 02:01:

Dear list.


I would like to have a TOC that looks basically as follows when stripped 
down to the essentials:


1 Part1
1 Chapter1
2 Chapter2

2 Part2
3 Chapter3

I don't want the part number to be "part" of the chapter number (no 2.1, 
just 1, for example).

This behaviour should apply both to the titles in the text and in the TOC..

With the code:

\definestructureresetset[default][1,0,1][1] % reset part and section, 
but not chapter, from wiki

\setuphead[sectionresetset=default]

\setuphead[part]
[placehead=yes,
number=yes,]
\setuplist [part]
   [number=yes,]

\setuphead [chapter]
   [number=yes,]
\setuplist [chapter]
   [number=yes,]

\starttext
\completecontent

\startpart[title={Part1}]
\startchapter[title={Chapter3}]
\input knuth
\stopchapter
\startchapter[title={Chapter2}]
\input tufte
\stopchapter
\stoppart

\startpart[title={Part2}]
\startchapter[title={Chapter3}]
\input knuth
\stopchapter
\stoppart

\stoptext


I can make chapter numbers flow independently of parts, which is nice.
But the numbering for chapters is like 1.1, 1.2, and 2.3, which is a 
good default, but not what I want.
Is there any way to omit part number and get only the chapter number 
displayed?


In wiki there is something that is almost suitable, namely setting:
numbercommand={\determineheadnumber[chapter]\currentheadnumber\gobbleoneargument}]
But this does not work for TOC, returning just zeros (and seems like 
also an extra zero is spilled on TOC, overall pretty hackish solution).


When nothing seemed to work, I also tried to use an ugly macro that uses 
lua to format the argument #1 in the numbercommand nicely with the help 
of string functions,
but it turned out the actual parameter #1 in numbercommand is something 
other than just a string with numbers and dots.
If someone knows what it is, or how to find out, please point me to the 
right direction to better understand the system. Currently I'm unable to 
even print it to the terminal in order to see what actual characters are 
there, the following code outputting the length (seems to be 19 at least 
for me) works just fine as well as printing the string itself to the 
document.


\startluacode  
 userdata = userdata or{}


 function userdata.numberfun(str)
     context(tostring(#str))
 end
\stopluacode

\def\mync#1%
 {\ctxlua{userdata.numberfun([==[#1]==])}}


The idea seemed pretty standard and is used in many books, so maybe I've 
just completely missed the right way to approach this.


You have to use the “sectionsegemnts” key.

\setuphead
  [part]
  [placehead=yes]

\setuphead
  [chapter]
  [sectionsegments=chapter]

\starttext

\completecontent

\part{Part 1}

\chapter{Chapter 1}

\chapter{Chapter 2}

\part{Part 2}

\chapter{Chapter 3}

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


[NTG-context] Omitting part number in chapter numbers

2019-02-19 Thread Simon Collier
Dear list.

I would like to have a TOC that looks basically as follows when stripped down 
to the essentials:

1 Part1
1 Chapter1
2 Chapter2

2 Part2
3 Chapter3

I don't want the part number to be "part" of the chapter number (no 2.1, just 
1, for example).
This behaviour should apply both to the titles in the text and in the TOC..

With the code:

\definestructureresetset[default][1,0,1][1] % reset part and section, but not 
chapter, from wiki
\setuphead[sectionresetset=default]

\setuphead[part]
[placehead=yes,
number=yes,]
\setuplist [part]
  [number=yes,]

\setuphead [chapter]
  [number=yes,]
\setuplist [chapter]
  [number=yes,]

\starttext
\completecontent

\startpart[title={Part1}]
\startchapter[title={Chapter3}]
\input knuth
\stopchapter
\startchapter[title={Chapter2}]
\input tufte
\stopchapter
\stoppart

\startpart[title={Part2}]
\startchapter[title={Chapter3}]
\input knuth
\stopchapter
\stoppart

\stoptext

I can make chapter numbers flow independently of parts, which is nice.
But the numbering for chapters is like 1.1, 1.2, and 2.3, which is a good 
default, but not what I want.
Is there any way to omit part number and get only the chapter number displayed?

In wiki there is something that is almost suitable, namely setting:
numbercommand={\determineheadnumber[chapter]\currentheadnumber\gobbleoneargument}]
But this does not work for TOC, returning just zeros (and seems like also an 
extra zero is spilled on TOC, overall pretty hackish solution).

When nothing seemed to work, I also tried to use an ugly macro that uses lua to 
format the argument #1 in the numbercommand nicely with the help of string 
functions,
but it turned out the actual parameter #1 in numbercommand is something other 
than just a string with numbers and dots.
If someone knows what it is, or how to find out, please point me to the right 
direction to better understand the system. Currently I'm unable to even print 
it to the terminal in order to see what actual characters are there, the 
following code outputting the length (seems to be 19 at least for me) works 
just fine as well as printing the string itself to the document.

\startluacode

 
userdata = userdata or

{

}

function userdata.numberfun

(

str

)

context

(

tostring(#str)

)

end

\stopluacode

\def

\mync

#1

%

{

\ctxlua

{

userdata.numberfun

(

[

==

[

#1

]

==

]

)

}

}

The idea seemed pretty standard and is used in many books, so maybe I've just 
completely missed the right way to approach this.

Regards,
Simon Collier___
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] Typing Unicode subscript and superscript numbers

2018-12-06 Thread Hans Åberg

> On 6 Dec 2018, at 15:23, Wolfgang Schuster 
>  wrote:
> 
> The force key is valid for the \definefallbackfamily command, e.g.
> 
>  \definefallbackfamily [...] [...] [range={...},force=yes]

I tried to test it with the code below, but then it selects the stixtwomath 
glyphs. So possibly the force override is used only if the font has the glyph, 
instead of giving an error.

\definefallbackfamily [mainface] [math] [stix] 
[range={00B2-00B3,00B9,02070-0208F},force=yes]
\definefontfamily [mainface] [math] [stixtwomath]


___
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] Typing Unicode subscript and superscript numbers

2018-12-06 Thread Wolfgang Schuster

Hans Åberg schrieb am 06.12.18 um 15:18:



On 2 Dec 2018, at 19:01, Hans Hagen  wrote:

This super/supscript stuff is a bit more tricky because when a superscript 2 is 
in the font, and a superscript 3 isn't, using a fake ^3 alongside that ^2 quite 
certainly will look bad because the 2 is normally of a different design that a 
scaled down 2, so one then has to replace them all. Then there is the question 
of scale and move (up/down).


This issue shows up with the STIX and STIX2 fonts, as the former has the 
superscript digits ¹ ² ³, but not the other which came to Unicode later in a 
different range.


Although I have some experiemntal (font) magic on my computer it will probably 
take till next year before it will show up in a beta.


I use the code below, which seems fine, as the two fonts are close to each 
other. But it seems that one cannot add [force=yes] to ensure they all come 
from the same font as on the command \definefontfallback. This command would 
otherwise be good to pick replacements for certain glyphs.

\definefallbackfamily [mainface] [serif] [stixtwotext] 
[range={00B2-00B3,00B9,02070-0208F}]


The force key is valid for the \definefallbackfamily command, e.g.

  \definefallbackfamily [...] [...] [range={...},force=yes]

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] Typing Unicode subscript and superscript numbers

2018-12-06 Thread Hans Åberg

> On 2 Dec 2018, at 19:01, Hans Hagen  wrote:
> 
> This super/supscript stuff is a bit more tricky because when a superscript 2 
> is in the font, and a superscript 3 isn't, using a fake ^3 alongside that ^2 
> quite certainly will look bad because the 2 is normally of a different design 
> that a scaled down 2, so one then has to replace them all. Then there is the 
> question of scale and move (up/down).

This issue shows up with the STIX and STIX2 fonts, as the former has the 
superscript digits ¹ ² ³, but not the other which came to Unicode later in a 
different range.

> Although I have some experiemntal (font) magic on my computer it will 
> probably take till next year before it will show up in a beta.

I use the code below, which seems fine, as the two fonts are close to each 
other. But it seems that one cannot add [force=yes] to ensure they all come 
from the same font as on the command \definefontfallback. This command would 
otherwise be good to pick replacements for certain glyphs.

\definefallbackfamily [mainface] [serif] [stixtwotext] 
[range={00B2-00B3,00B9,02070-0208F}]
\definefallbackfamily [mainface] [mono] [stixtwotext] 
[range={00B2-00B3,00B9,02070-0208F}]
\definefallbackfamily [mainface] [math] [stixtwomath] 
[range={00B2-00B3,00B9,02070-0208F}]
\definefontfamily [mainface] [serif] [stix]
\definefontfamily [mainface] [mono] [stix]
\definefontfamily [mainface] [math] [stix]


___
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] Typing Unicode subscript and superscript numbers

2018-12-02 Thread Hans Åberg

> On 2 Dec 2018, at 19:01, Hans Hagen  wrote:
> 
> On 12/2/2018 6:33 PM, Hans Åberg wrote:
>> Maybe as a part of general features: A font fallback that selects the 
>> character from a sequence of fonts if not available, which could involve 
>> ranges, too, but not necessarily. And being able to have untranslated 
>> throughput.
> Using the available fallback mechanism that already can be done.

I couldn't figure out how to do it, though.

> This super/supscript stuff is a bit more tricky because when a superscript 2 
> is in the font, and a superscript 3 isn't, using a fake ^3 alongside that ^2 
> quite certainly will look bad because the 2 is normally of a different design 
> that a scaled down 2, so one then has to replace them all. Then there is the 
> question of scale and move (up/down).

It will look worse not having it at all, when coping from the PDF to the plain 
text file, that is. :-)

> Although I have some experiemntal (font) magic on my computer it will 
> probably take till next year before it will show up in a beta.

Perhaps the stuff that the PDF displays may not need to be what one copies, 
that is, it displays something that looks good, but when coping as plain text, 
one gets something that is useful. That is possible for HTML URLs, even though 
it is a security hazard for such links.


___
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] Typing Unicode subscript and superscript numbers

2018-12-02 Thread Hans Hagen

On 12/2/2018 6:33 PM, Hans Åberg wrote:



On 2 Dec 2018, at 16:55, Hans Hagen  wrote:

On 12/2/2018 3:44 PM, Hans Åberg wrote:

On 2 Dec 2018, at 10:19, Henning Hraban Ramm  wrote:

STIX fonts don’t contain super and subscript numbers.

They are in STIX Two, so I can get them using:
   \definefontfamily[stix-two][mono][Stix Two Text]
   \definefontfamily[stix-two][math][Stix Two Math]
   \setupbodyfont[stix-two,10pt]
But it is an entirely different font design, so a font fallback to STIX would 
be desirable. Then the problem is that these super and subscript symbols are 
spread on a number of different ranges. —It seems one cannot have a general 
fallback in the case the glyph is missing.
In addition, they get translated in the typesetting, so when copied in the PDF 
and pasted into a text file, they loose being super and subscript.

in general these super and subscript are rather useless because (1) only a 
subset of characters is available and (2) it depends on selectively applying 
the subs and sups feature


They are usable in plain text files, though I think, originally added to 
Unicode as a font encoding compatibility. Right now, I just use it in generated 
output files to indicate variable relabeling, so from that point of view, a 
font fallback would suffice, as there is no need to copy and paste from the PDF 
them as part of computer code examples. One might want to copy and work them by 
hand, though.

However, after starting to use them, I thought they might be usable in input 
code, too. Then one would like to paste examples in the manual for copy and 
paste. The super and superscript parentheses could be used as replacement for 
TeX ^ and _, the latter which in turn comes from some pre-ASCII arrow symbols. 
Unicode does not have general super and superscript symbols, and for computer 
input, it would be better with a matching pair than a single symbol.

I have used the text substitutions on MacOS for some time now, and it works 
fine to write math styles and symbols directly in a plain text file. I have 
also seen these super and superscript numbers used for SI units for example, on 
the Internet. So it may become more common in the future.


anyway, i can provide a solution to automatically add these scripts to a font; 
just for fun i implemented something

% \definefontfeature[default][default][scripts=yes]
% \definefontfeature[default][default][scripts=.6]

\definefontfeature
  [default]
  [default]
  [scripts={factor=.6,up=.3,down=.2,extend=1.5}]

but as i use some new trickery it won't be in the beta for a while.


Maybe as a part of general features: A font fallback that selects the character 
from a sequence of fonts if not available, which could involve ranges, too, but 
not necessarily. And being able to have untranslated throughput.

Using the available fallback mechanism that already can be done.

This super/supscript stuff is a bit more tricky because when a 
superscript 2 is in the font, and a superscript 3 isn't, using a fake ^3 
alongside that ^2 quite certainly will look bad because the 2 is 
normally of a different design that a scaled down 2, so one then has to 
replace them all. Then there is the question of scale and move (up/down).


Although I have some experiemntal (font) magic on my computer it will 
probably take till next year before it will show up in a beta.


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] Typing Unicode subscript and superscript numbers

2018-12-02 Thread Hans Åberg

> On 2 Dec 2018, at 16:55, Hans Hagen  wrote:
> 
> On 12/2/2018 3:44 PM, Hans Åberg wrote:
>>> On 2 Dec 2018, at 10:19, Henning Hraban Ramm  wrote:
>>> 
>>> STIX fonts don’t contain super and subscript numbers.
>> They are in STIX Two, so I can get them using:
>>   \definefontfamily[stix-two][mono][Stix Two Text]
>>   \definefontfamily[stix-two][math][Stix Two Math]
>>   \setupbodyfont[stix-two,10pt]
>> But it is an entirely different font design, so a font fallback to STIX 
>> would be desirable. Then the problem is that these super and subscript 
>> symbols are spread on a number of different ranges. —It seems one cannot 
>> have a general fallback in the case the glyph is missing.
>> In addition, they get translated in the typesetting, so when copied in the 
>> PDF and pasted into a text file, they loose being super and subscript.
> in general these super and subscript are rather useless because (1) only a 
> subset of characters is available and (2) it depends on selectively applying 
> the subs and sups feature

They are usable in plain text files, though I think, originally added to 
Unicode as a font encoding compatibility. Right now, I just use it in generated 
output files to indicate variable relabeling, so from that point of view, a 
font fallback would suffice, as there is no need to copy and paste from the PDF 
them as part of computer code examples. One might want to copy and work them by 
hand, though.

However, after starting to use them, I thought they might be usable in input 
code, too. Then one would like to paste examples in the manual for copy and 
paste. The super and superscript parentheses could be used as replacement for 
TeX ^ and _, the latter which in turn comes from some pre-ASCII arrow symbols. 
Unicode does not have general super and superscript symbols, and for computer 
input, it would be better with a matching pair than a single symbol.

I have used the text substitutions on MacOS for some time now, and it works 
fine to write math styles and symbols directly in a plain text file. I have 
also seen these super and superscript numbers used for SI units for example, on 
the Internet. So it may become more common in the future.

> anyway, i can provide a solution to automatically add these scripts to a 
> font; just for fun i implemented something
> 
> % \definefontfeature[default][default][scripts=yes]
> % \definefontfeature[default][default][scripts=.6]
> 
> \definefontfeature
>  [default]
>  [default]
>  [scripts={factor=.6,up=.3,down=.2,extend=1.5}]
> 
> but as i use some new trickery it won't be in the beta for a while.

Maybe as a part of general features: A font fallback that selects the character 
from a sequence of fonts if not available, which could involve ranges, too, but 
not necessarily. And being able to have untranslated throughput.

___
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] Typing Unicode subscript and superscript numbers

2018-12-02 Thread Hans Hagen

On 12/2/2018 3:44 PM, Hans Åberg wrote:



On 2 Dec 2018, at 10:19, Henning Hraban Ramm  wrote:

STIX fonts don’t contain super and subscript numbers.


They are in STIX Two, so I can get them using:
   \definefontfamily[stix-two][mono][Stix Two Text]
   \definefontfamily[stix-two][math][Stix Two Math]

   \setupbodyfont[stix-two,10pt]

But it is an entirely different font design, so a font fallback to STIX would 
be desirable. Then the problem is that these super and subscript symbols are 
spread on a number of different ranges. —It seems one cannot have a general 
fallback in the case the glyph is missing.

In addition, they get translated in the typesetting, so when copied in the PDF 
and pasted into a text file, they loose being super and subscript.
in general these super and subscript are rather useless because (1) only 
a subset of characters is available and (2) it depends on selectively 
applying the subs and sups feature


anyway, i can provide a solution to automatically add these scripts to a 
font; just for fun i implemented something


% \definefontfeature[default][default][scripts=yes]
% \definefontfeature[default][default][scripts=.6]

\definefontfeature
  [default]
  [default]
  [scripts={factor=.6,up=.3,down=.2,extend=1.5}]

but as i use some new trickery it won't be in the beta for a while.

Han s



-
  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] Typing Unicode subscript and superscript numbers

2018-12-02 Thread Hans Åberg

> On 2 Dec 2018, at 10:19, Henning Hraban Ramm  wrote:
> 
> STIX fonts don’t contain super and subscript numbers.

They are in STIX Two, so I can get them using:
  \definefontfamily[stix-two][mono][Stix Two Text]
  \definefontfamily[stix-two][math][Stix Two Math]

  \setupbodyfont[stix-two,10pt]

But it is an entirely different font design, so a font fallback to STIX would 
be desirable. Then the problem is that these super and subscript symbols are 
spread on a number of different ranges. —It seems one cannot have a general 
fallback in the case the glyph is missing.

In addition, they get translated in the typesetting, so when copied in the PDF 
and pasted into a text file, they loose being super and subscript.


___
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] Typing Unicode subscript and superscript numbers

2018-12-02 Thread Henning Hraban Ramm
STIX fonts don’t contain super and subscript numbers.

Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

Am 2018-12-01 um 23:30 schrieb Hans Åberg :

> Only some of the Unicode subscript and superscript numbers and signs show up 
> in the example below in the typing and text environments, though all correct 
> in the formula environment.
> 
> 
> —
> \setupbodyfont[stix,10pt]
> 
> \starttext
> 
> \startformula
> \startalign
>  \NC 푨₀ 0  ₁ 1  ₂ 2  ₃ 3  ₄ 4  ₅ 5  ₆ 6  ₇ 7  ₈ 8  ₉ 9  ₊ +  ₋ -  ₌ =  ₍ (  ₎ 
> )\NR
>  \NC 푩⁰ 0  ¹ 1  ² 2  ³ 3  ⁴ 4  ⁵ 5  ⁶ 6  ⁷ 7  ⁸ 8  ⁹ 9  ⁺ +  ⁻ -  ⁼ =  ⁽ (  ⁾ 
> )\NR
> \stopalign
> \stopformula
> 
> \starttyping
>  푨₀ 0  ₁ 1  ₂ 2  ₃ 3  ₄ 4  ₅ 5  ₆ 6  ₇ 7  ₈ 8  ₉ 9  ₊ +  ₋ -  ₌ =  ₍ (  ₎ )
>  푩⁰ 0  ¹ 1  ² 2  ³ 3  ⁴ 4  ⁵ 5  ⁶ 6  ⁷ 7  ⁸ 8  ⁹ 9  ⁺ +  ⁻ -  ⁼ =  ⁽ (  ⁾ )
> \stoptyping
> 
>  푨₀ 0  ₁ 1  ₂ 2  ₃ 3  ₄ 4  ₅ 5  ₆ 6  ₇ 7  ₈ 8  ₉ 9  ₊ +  ₋ -  ₌ =  ₍ (  ₎ )
> 
>  푩⁰ 0  ¹ 1  ² 2  ³ 3  ⁴ 4  ⁵ 5  ⁶ 6  ⁷ 7  ⁸ 8  ⁹ 9  ⁺ +  ⁻ -  ⁼ =  ⁽ (  ⁾ )
> 
> \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 / 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] Typing Unicode subscript and superscript numbers

2018-12-01 Thread Hans Åberg
Only some of the Unicode subscript and superscript numbers and signs show up in 
the example below in the typing and text environments, though all correct in 
the formula environment.


—
\setupbodyfont[stix,10pt]

\starttext

\startformula
 \startalign
  \NC 푨₀ 0  ₁ 1  ₂ 2  ₃ 3  ₄ 4  ₅ 5  ₆ 6  ₇ 7  ₈ 8  ₉ 9  ₊ +  ₋ -  ₌ =  ₍ (  ₎ 
)\NR
  \NC 푩⁰ 0  ¹ 1  ² 2  ³ 3  ⁴ 4  ⁵ 5  ⁶ 6  ⁷ 7  ⁸ 8  ⁹ 9  ⁺ +  ⁻ -  ⁼ =  ⁽ (  ⁾ 
)\NR
 \stopalign
\stopformula

\starttyping
  푨₀ 0  ₁ 1  ₂ 2  ₃ 3  ₄ 4  ₅ 5  ₆ 6  ₇ 7  ₈ 8  ₉ 9  ₊ +  ₋ -  ₌ =  ₍ (  ₎ )
  푩⁰ 0  ¹ 1  ² 2  ³ 3  ⁴ 4  ⁵ 5  ⁶ 6  ⁷ 7  ⁸ 8  ⁹ 9  ⁺ +  ⁻ -  ⁼ =  ⁽ (  ⁾ )
\stoptyping

  푨₀ 0  ₁ 1  ₂ 2  ₃ 3  ₄ 4  ₅ 5  ₆ 6  ₇ 7  ₈ 8  ₉ 9  ₊ +  ₋ -  ₌ =  ₍ (  ₎ )

  푩⁰ 0  ¹ 1  ² 2  ³ 3  ⁴ 4  ⁵ 5  ⁶ 6  ⁷ 7  ⁸ 8  ⁹ 9  ⁺ +  ⁻ -  ⁼ =  ⁽ (  ⁾ )

\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] vertically centering line numbers

2018-12-01 Thread Pablo Rodriguez
On 12/1/18 9:49 AM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 30.11.18 um 19:29:
>> [...]
>> Is there a way to center vertically the line numbers?
> 
> \defineshift [RaiseNumber] [dy=-0.25,style=\tfxx]
> 
> \setuplinenumbering [step=3,command=\RaiseNumber]
Many thanks for your help, Wolfgang.

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] vertically centering line numbers

2018-12-01 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 30.11.18 um 19:29:

Dear list,

I have the following sample:

 \setuplinenumbering[step=3, style=\tfxx]
 \starttext
 \startlinenumbering
 \dorecurse{40}{This is a verse.\\}
 \stoplinenumbering
 \stoptext

Is there a way to center vertically the line numbers?



\defineshift [RaiseNumber] [dy=-0.25,style=\tfxx]

\setuplinenumbering [step=3,command=\RaiseNumber]

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
___

[NTG-context] vertically centering line numbers

2018-11-30 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setuplinenumbering[step=3, style=\tfxx]
\starttext
\startlinenumbering
\dorecurse{40}{This is a verse.\\}
\stoplinenumbering
\stoptext

Is there a way to center vertically the line numbers?

Many thanks for your help,

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] Align TOC section numbers flushright

2018-06-26 Thread Idris Samawi Hamid ادريس سماوي حامد
On Mon, 25 Jun 2018 14:20:03 -0600, Wolfgang Schuster  
 wrote:



If one turns on \showframe, one sees that the width value does not
prevent crossing the left side of the textblock (a good thing). OTOH,
getting the TOC numerals to lineup with the left side is a matter of
trial and error. [width=1.85em comes close]

And if the document is changed so that the wider roman numerals are
not needed, then one has to reset the width value, again by trial and
error.

So is there a way to make the left side of the textblock flush with
the widest roman? It's by no means urgent, but sine we are supposed to
be able to automate nearly everything.. -)


This isn’t supported but adding a sample key (which is supported by
enumerations) where you can set a text which is used to calculate the
width should be easy.


Ok, hereby making this a feature request -)


The attached file shows which values are valid for \setupcombinedlist.


Ah, our npp-4-context config files for calltips need updating, I have

\definecombinedlist [NAME]
[LIST]
[INHERIT: \setuplist]

but that should be

\definecombinedlist [NAME]
[LIST]
[INHERIT: \setupcombinedlist]


I have the changes only in my local files.


Ah, ok. Many thanks.

Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___
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] Align TOC section numbers flushright

2018-06-25 Thread Wolfgang Schuster



Idris Samawi Hamid ادريس سماوي حامد 
25. Juni 2018 um 21:42
On Mon, 25 Jun 2018 13:17:40 -0600, Wolfgang Schuster 
 wrote:





Idris Samawi Hamid ادريس سماوي حامد schrieb:

\setuphead[chapter]   [conversion=R]

\setuplist[chapter][width=2.8em]

\definecombinedlist
[content]
[chapter]
[level=chapter,
alternative=c,
numberalign=flushright]


Use \setuplist to change the numeralign setting, you need also a
distance value.

\setuplist
   [chapter]
   [alternative=c,
width=2.8em,
distance=1em,
numberalign=flushright]


Many thanks. Had come up with this awkward workaround:

\define[1]\FLUSHRIGHT{\hfill#1\hbox to0.7em{}}

\setuplist[chapter][width=2.8em]
\setuplist[chapter][stopper=.,numbercommand=\FLUSHRIGHT]

Does the attached tex file look correct?

\setuplist
  [chapter]
  [alternative=c,
   width=1.85em,
   distance=0.5em,
   numberalign=flushright,
   level=chapter]


You can remove the level setting.


\definecombinedlist
[content]
[chapter]

If one turns on \showframe, one sees that the width value does not 
prevent crossing the left side of the textblock (a good thing). OTOH, 
getting the TOC numerals to lineup with the left side is a matter of 
trial and error. [width=1.85em comes close]


And if the document is changed so that the wider roman numerals are 
not needed, then one has to reset the width value, again by trial and 
error.


So is there a way to make the left side of the textblock flush with 
the widest roman? It's by no means urgent, but sine we are supposed to 
be able to automate nearly everything.. -)


This isn’t supported but adding a sample key (which is supported by 
enumerations) where you can set a text which is used to calculate the 
width should be easy.



The attached file shows which values are valid for \setupcombinedlist.


Ah, our npp-4-context config files for calltips need updating, I have

\definecombinedlist [NAME]
[LIST]
[INHERIT: \setuplist]

but that should be

\definecombinedlist [NAME]
[LIST]
[INHERIT: \setupcombinedlist]


I have the changes only in my local files.

Wolfang
___
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] Align TOC section numbers flushright

2018-06-25 Thread Idris Samawi Hamid ادريس سماوي حامد
On Mon, 25 Jun 2018 13:17:40 -0600, Wolfgang Schuster  
 wrote:





Idris Samawi Hamid ادريس سماوي حامد schrieb:

\setuphead[chapter]   [conversion=R]

\setuplist[chapter][width=2.8em]

\definecombinedlist
[content]
[chapter]
[level=chapter,
alternative=c,
numberalign=flushright]


Use \setuplist to change the numeralign setting, you need also a
distance value.

\setuplist
   [chapter]
   [alternative=c,
width=2.8em,
distance=1em,
numberalign=flushright]


Many thanks. Had come up with this awkward workaround:

\define[1]\FLUSHRIGHT{\hfill#1\hbox to0.7em{}}

\setuplist[chapter][width=2.8em]
\setuplist[chapter][stopper=.,numbercommand=\FLUSHRIGHT]

Does the attached tex file look correct?

\setuplist
  [chapter]
  [alternative=c,
   width=1.85em,
   distance=0.5em,
   numberalign=flushright,
   level=chapter]

\definecombinedlist
[content]
[chapter]

If one turns on \showframe, one sees that the width value does not prevent  
crossing the left side of the textblock (a good thing). OTOH, getting the  
TOC numerals to lineup with the left side is a matter of trial and error.  
[width=1.85em comes close]


And if the document is changed so that the wider roman numerals are not  
needed, then one has to reset the width value, again by trial and error.


So is there a way to make the left side of the textblock flush with the  
widest roman? It's by no means urgent, but sine we are supposed to be able  
to automate nearly everything.. -)



The attached file shows which values are valid for \setupcombinedlist.


Ah, our npp-4-context config files for calltips need updating, I have

\definecombinedlist [NAME]
[LIST]
[INHERIT: \setuplist]

but that should be

\definecombinedlist [NAME]
[LIST]
[INHERIT: \setupcombinedlist]

Many thanks.

Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512

scratch.pdf
Description: Adobe PDF document


scratch.tex
Description: TeX document
___
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] Align TOC section numbers flushright

2018-06-25 Thread Wolfgang Schuster



Idris Samawi Hamid ادريس سماوي حامد schrieb:

\setuphead[chapter]   [conversion=R]

\setuplist[chapter][width=2.8em]

\definecombinedlist
[content]
[chapter]
[level=chapter,
alternative=c,
numberalign=flushright]


Use \setuplist to change the numeralign setting, you need also a 
distance value.


\setuplist
  [chapter]
  [alternative=c,
   width=2.8em,
   distance=1em,
   numberalign=flushright]

The attached file shows which values are valid for \setupcombinedlist.

Wolfgang


i-list.pdf
Description: Adobe PDF document
___
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] Align TOC section numbers flushright

2018-06-25 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Trying to get the sectioning numerals in the left margin of the TOC to be
fushright; by default they are flushleft; see attached and below:

===
\setuphead[chapter]   [conversion=R]

\setuplist[chapter][width=2.8em]

\definecombinedlist
[content]
[chapter]
[level=chapter,
alternative=c,
numberalign=flushright]

\starttext
\placecontent[conversion=R]
\startchapter[title={First},reference={}]   \input ward \stopchapter
\startchapter[title={Second},reference={}]  \input ward \stopchapter
\startchapter[title={Third},reference={}]   \input ward \stopchapter
\startchapter[title={Fourth},reference={}]  \input ward \stopchapter
\startchapter[title={Fifth},reference={}]   \input ward \stopchapter
\startchapter[title={Sixth},reference={}]   \input ward \stopchapter
\startchapter[title={Seventh},reference={}] \input ward \stopchapter
\startchapter[title={Eighth},reference={}]  \input ward \stopchapter
\stoptext
===

numberalign=flushright would seem to be the governing keyword+value, but
that has no effect here.

For the form of the desired result, see toc-margin_numerals-MURE.pdf:

https://www.dropbox.com/s/j0etnkt54zji6h5/toc-margin_numerals-MURE.pdf?dl=0

(note the stopper after each margin numeral!). Thank you in
advance.

Best wishes
Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512

scratch.pdf
Description: Adobe PDF document


scratch.tex
Description: TeX document
___
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] Table of Contents sectioning numbers in margin + oddity

2018-06-25 Thread Idris Samawi Hamid ادريس سماوي حامد
On Mon, 25 Jun 2018 01:10:18 -0600, Wolfgang Schuster  
 wrote:





Idris Samawi Hamid ادريس سماوي حامد 
25. Juni 2018 um 01:17
On Sun, 24 Jun 2018 17:09:02 -0600, Wolfgang Schuster
 wrote:


2. Oddity: Why does the TOC in the attached example default to a
monospaced font?



You put \placecontent before \starttext but the default fonts are
loaded after \starttext.
When you now put text in a box before \starttext a monospaced font is
loaded as replacement for the missing text font.


Ah, new protocol... many thanks.


Putting \placecontent or any other text creating command before
\starttext was always wrong.


Of course, was referring to the use of fixed-width for default font in  
such an event.. -)


Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___
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] Table of Contents sectioning numbers in margin + oddity

2018-06-25 Thread Wolfgang Schuster



Idris Samawi Hamid ادريس سماوي حامد 
25. Juni 2018 um 01:17
On Sun, 24 Jun 2018 17:09:02 -0600, Wolfgang Schuster 
 wrote:


2. Oddity: Why does the TOC in the attached example default to a 
monospaced font?


You put \placecontent before \starttext but the default fonts are 
loaded after \starttext.
When you now put text in a box before \starttext a monospaced font is 
loaded as replacement for the missing text font.


Ah, new protocol... many thanks.


Putting \placecontent or any other text creating command before 
\starttext was always wrong.


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] Table of Contents sectioning numbers in margin + oddity

2018-06-25 Thread Wolfgang Schuster




Idris Samawi Hamid ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
25. Juni 2018 um 00:46
Dear gang,

mtx-context | current version: 2018.06.24 18:28

In the attached and below, we want sectioning numbers placed and 
naturally aligned in the margin:


===
\definecombinedlist % \setuplist[]
[content]
[section]
[level=section,
alternative=c,
criterium=local]

\setuphead[section][alternative=inmargin]
\setupitemize[1][inmargin][stopper=]

\placecontent

\starttext
\startsection[title= First]
\input ward
\stopsection
\startsection[title= Second]
\startitemize[r]
\startitem[] \input ward \stopitem
\startitem[] \input ward \stopitem
\stopitemize
\stopsection
\stoptext
===

1. What is the most straightforward way to to the section numerals 
generated by \placecontent placed and aligned inmargin?


\define[1]\SectionlistNumbercommand
  {\llap{#1\hskip\leftmargindistance}}

\setuplist
  [section]
  [alternative=c,
   criterium=local,
   width=0pt,
   distance=0pt,
   numbercommand=\SectionlistNumbercommand]


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] Table of Contents sectioning numbers in margin + oddity

2018-06-24 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sun, 24 Jun 2018 17:09:02 -0600, Wolfgang Schuster  
 wrote:


2. Oddity: Why does the TOC in the attached example default to a  
monospaced font?


You put \placecontent before \starttext but the default fonts are loaded  
after \starttext.
When you now put text in a box before \starttext a monospaced font is  
loaded as replacement for the missing text font.


Ah, new protocol... many thanks.

Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___
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] Table of Contents sectioning numbers in margin + oddity

2018-06-24 Thread Wolfgang Schuster




Idris Samawi Hamid ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
25. Juni 2018 um 00:46
Dear gang,

mtx-context | current version: 2018.06.24 18:28

In the attached and below, we want sectioning numbers placed and 
naturally aligned in the margin:


===
\definecombinedlist % \setuplist[]
[content]
[section]
[level=section,
alternative=c,
criterium=local]

\setuphead[section][alternative=inmargin]
\setupitemize[1][inmargin][stopper=]

\placecontent

\starttext
\startsection[title= First]
\input ward
\stopsection
\startsection[title= Second]
\startitemize[r]
\startitem[] \input ward \stopitem
\startitem[] \input ward \stopitem
\stopitemize
\stopsection
\stoptext
===

1. What is the most straightforward way to to the section numerals 
generated by \placecontent placed and aligned inmargin?


2. Oddity: Why does the TOC in the attached example default to a 
monospaced font?


You put \placecontent before \starttext but the default fonts are loaded 
after \starttext.


When you now put text in a box before \starttext a monospaced font is 
loaded as replacement for the missing text font.


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
___

[NTG-context] Table of Contents sectioning numbers in margin + oddity

2018-06-24 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

mtx-context | current version: 2018.06.24 18:28

In the attached and below, we want sectioning numbers placed and naturally  
aligned in the margin:


===
\definecombinedlist % \setuplist[]
[content]
[section]
[level=section,
alternative=c,
criterium=local]

\setuphead[section][alternative=inmargin]
\setupitemize[1][inmargin][stopper=]

\placecontent

\starttext
\startsection[title= First]
\input ward
\stopsection
\startsection[title= Second]
\startitemize[r]
\startitem[] \input ward \stopitem
\startitem[] \input ward \stopitem
\stopitemize
\stopsection
\stoptext
===

1. What is the most straightforward way to to the section numerals  
generated by \placecontent placed and aligned inmargin?


2. Oddity: Why does the TOC in the attached example default to a  
monospaced font?


Thanks in advance.

Best wishes
Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512

test-content.pdf
Description: Adobe PDF document


test-content.tex
Description: TeX document
___
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] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread MF

> This would be a solution:
> 
> Index term, and some
> text
>  21, 34, 45, 72, 89,
>101, 103, 109
> 
> where the rule is: when the numbers exceed the text width, close the
> paragraph, then start a new, right aligned one.
> 
> So i wrote this:
> 
> ---
> \def\wordorparagraphright#1{\let\scratchWidth\relax
>   \setbox\scratchbox=\hbox{#1}\newdimen\scratchWidth
>   \scratchWidth=\wd\scratchbox
>   \ifdim\scratchWidth < 0.9\textwidth
> \wordright{#1}%
>   \else
> \par
> \startalignment[flushright]#1\stopalignment
>   \fi}
> 
> \starttext
> \input sapolsky \wordorparagraphright{\it other text} \par
> \blank
> \input sapolsky \wordorparagraphright{\it other text, this time
> longer}
> \par
> \blank
> \input sapolsky \wordorparagraphright{\it other text, this time
> much much much much much much much much much much much much 
> much much much much much much much much much much longer} \par
> \stoptext
> ---
> 

This, instead, works also with registers:

-
--
\unexpanded\def\wordorparagraphright{\dosingleempty\WordOrParagraphRigh
t}

\def\WordOrParagraphRight[#1]{\groupedcommand{\setbox0\hbox\bgroup}
{\egroup\newdimen\myBoxWd\myBoxWd=\wd0
  \ifdim\myBoxWd < .7\hsize
\wordright{\box0}%
  \else
\startalignment[flushright]\leftskip=.3\hsize plus 1fil\unhbox0
\stopalignment
  \fi}}

\starttext
\input sapolsky \wordorparagraphright{\it other text} \par
\blank
\input sapolsky \wordorparagraphright{\it other text, this time longer}
\par
\blank
\input sapolsky \wordorparagraphright{\it other text, this time
much much much much much much much much much much much much 
much much much much much much much much much much longer} \par
\stoptext
---


A doubt: i'm using box0, is it dangerous?

I tried with scratchbox, but it doesn't work, then i moved to box0, and
it seems to work, even with a big file (with a big register too) of
mine.

___
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] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread MF
\wordright is ok until the numbers don't exceed the text width.

It manages these two cases right:

Index term, and some
text  21, 34, 45, 72

Index term, and some
text
  21, 34, 45, 72, 89

When the numbers exceed the text width, it fails:

Index term, and some
text
21, 34, 45, 72, 89, 101, 103, 109

It fails because it uses a hbox, that can't do nothing but running
beyond the right margin.

This would be a solution:

Index term, and some
text
 21, 34, 45, 72, 89,
   101, 103, 109

where the rule is: when the numbers exceed the text width, close the
paragraph, then start a new, right aligned one.

So i wrote this:

---
\def\wordorparagraphright#1{\let\scratchWidth\relax
  \setbox\scratchbox=\hbox{#1}\newdimen\scratchWidth
  \scratchWidth=\wd\scratchbox
  \ifdim\scratchWidth < 0.9\textwidth
\wordright{#1}%
  \else
\par
\startalignment[flushright]#1\stopalignment
  \fi}

\starttext
\input sapolsky \wordorparagraphright{\it other text} \par
\blank
\input sapolsky \wordorparagraphright{\it other text, this time longer}
\par
\blank
\input sapolsky \wordorparagraphright{\it other text, this time
much much much much much much much much much much much much 
much much much much much much much much much much longer} \par
\stoptext
---

But it doesn't work with

---
\unprotect

\unexpanded\def\startregisterpages
   {\begingroup
\dostarttagged\t!registerpages\empty
\useregisterstyleandcolor\c!pagestyle\c!pagecolor
\registerparameter\c!pageleft}

\unexpanded\def\stopregisterpages
   {\registerparameter\c!pageright
\dostoptagged
\endgroup}

\protect

\def\wordorparagraphright#1{\let\scratchWidth\relax
 
\setbox\scratchbox=\hbox{#1}\newdimen\scratchWidth
 
\scratchWidth=\wd\scratchbox
  \ifdim\scratchWidth < 0.9\textwidth
\w
ordright{#1}%
  \else
\par
\startalignment[flushright]#1\stopalign
ment
  \fi}

\setupregister
   [index]
   [n=1,
alternative=A,
distance=0pt,
pageleft=\wordorparagraphright\bgroup,
pageright=\egroup]

\starttext
\CONTEXT\index{\ConTeXt}
\page
\LATEX\index{\LaTeX}
\page
\CONTEXT\index{\ConTeXt}
\page
\placeindex
\stoptext
---

I suppose it's related to the problem that \groupedcommand solves.
Is there a solution?

An even better solution would be:

Index term, and some
text 21, 34, 45, 72,
   89, 101, 103, 109

where the rule is: put the text until it fills the current line, than
proceed flushing the remainder of the paragraph lines to the right.

Here i tried changing \leftskip in the middle of a paragraph, but it
works globally.

I think this is even harder to implement, at least in the middle of the
register macros.
___
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] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread Hans Hagen

On 5/10/2018 12:35 PM, MF wrote:

This is a more polite version, that lets you restore the original
macros.

\let\origstartregisterpages=\startregisterpages%
\let\origstopregisterpages=\stopregisterpages%
\def\setupregisterpagescommand#1{%
   \unexpanded\def\startregisterpages{\origstartregisterpages#1\bgroup }
   \unexpanded\def\stopregisterpages{\egroup\origstopregisterpages}}
\def\resetregisterpagescommand{%
   \let\startregisterpages=\origstartregisterpages%
   \let\stopregisterpages=\origstopregisterpages}

\setupregister[index][n=1,alternative=A]

\starttext
\CONTEXT\index{\ConTeXt}
\page
\LATEX\index{\LaTeX}
\page
\CONTEXT\index{\ConTeXt}
\page
\setupregisterpagescommand{\wordright}
\placeindex
\page
\resetregisterpagescommand
\placeindex
\stoptext

btw, Hans, are you going to add an option to \setupregister? :)

knowing that wolfgang looked into it i just wait till he cooks up something

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] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread Wolfgang Schuster
The following solution which adds two additional keys (pageleft and 
pageright)

is cleaner because it doesn’t have to overload commands.


\unprotect

\unexpanded\def\startregisterpages
  {\begingroup
   \dostarttagged\t!registerpages\empty
   \useregisterstyleandcolor\c!pagestyle\c!pagecolor
   \registerparameter\c!pageleft}

\unexpanded\def\stopregisterpages
  {\registerparameter\c!pageright
   \dostoptagged
   \endgroup}

\protect

\setupregister
  [index]
  [n=1,
   alternative=A,
   distance=0pt,
   pageleft=\wordright\bgroup,
   pageright=\egroup]

\starttext
\CONTEXT\index{\ConTeXt}
\page
\LATEX\index{\LaTeX}
\page
\CONTEXT\index{\ConTeXt}
\page
\placeindex
\stoptext


Wolfgang

MF 
10. Mai 2018 um 12:35
This is a more polite version, that lets you restore the original
macros.

\let\origstartregisterpages=\startregisterpages%
\let\origstopregisterpages=\stopregisterpages%
\def\setupregisterpagescommand#1{%
\unexpanded\def\startregisterpages{\origstartregisterpages#1\bgroup }
\unexpanded\def\stopregisterpages{\egroup\origstopregisterpages}}
\def\resetregisterpagescommand{%
\let\startregisterpages=\origstartregisterpages%
\let\stopregisterpages=\origstopregisterpages}

\setupregister[index][n=1,alternative=A]

\starttext
\CONTEXT\index{\ConTeXt}
\page
\LATEX\index{\LaTeX}
\page
\CONTEXT\index{\ConTeXt}
\page
\setupregisterpagescommand{\wordright}
\placeindex
\page
\resetregisterpagescommand
\placeindex
\stoptext

btw, Hans, are you going to add an option to \setupregister? :)
___
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] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread MF
This is a more polite version, that lets you restore the original
macros.

\let\origstartregisterpages=\startregisterpages%
\let\origstopregisterpages=\stopregisterpages%
\def\setupregisterpagescommand#1{%
  \unexpanded\def\startregisterpages{\origstartregisterpages#1\bgroup }
  \unexpanded\def\stopregisterpages{\egroup\origstopregisterpages}}
\def\resetregisterpagescommand{%
  \let\startregisterpages=\origstartregisterpages%
  \let\stopregisterpages=\origstopregisterpages}

\setupregister[index][n=1,alternative=A]

\starttext
\CONTEXT\index{\ConTeXt}
\page
\LATEX\index{\LaTeX}
\page
\CONTEXT\index{\ConTeXt}
\page
\setupregisterpagescommand{\wordright}
\placeindex
\page
\resetregisterpagescommand
\placeindex
\stoptext

btw, Hans, are you going to add an option to \setupregister? :)
___
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] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread MF
Thanks Wolfgang and sorry if i reply to my mail, since i've downloaded
yours on another PC.

I've found these macros in strc-reg.mkiv, that are called right before
and after the page numbers:

\unexpanded\def\startregisterpages
  {\begingroup
   \dostarttagged\t!registerpages\empty
   \useregisterstyleandcolor\c!pagestyle\c!pagecolor}

\unexpanded\def\stopregisterpages
  {\dostoptagged
   \endgroup}

And this seems to work:

\let\origstartregisterpages=\startregisterpages%
\let\origstopregisterpages=\stopregisterpages%
\unexpanded\def\startregisterpages{\origstartregisterpages\wordright\bg
roup }
\unexpanded\def\stopregisterpages{\egroup\origstopregisterpages}

\setupregister[index][n=1,alternative=A]

\starttext
\CONTEXT\index{\ConTeXt}
\page
\LATEX\index{\LaTeX}
\page
\CONTEXT\index{\ConTeXt}
\page
\placeindex
\stoptext

I've also learned about \groupedcommand, which i did not know.
Again, thanks for you help.

Best wishes,
Massi


___
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] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-09 Thread Wolfgang Schuster

There is no option to apply a command to all page numbers but you can
add something after the register entry with the textcommand key.

Be aware this solution isn’t perfect because in the worst case
(narrow columns for the register or long entries) page numbers
can be split on multiple lines.

\setupregister
  [index]
  [n=1,
   alternative=A,
   textcommand=\groupedcommand{}{\hfill\quad}]

Wolfgang

MF <mailto:mass...@fastwebnet.it>
9. Mai 2018 um 17:09
Hello list,
i'd like moving the page numbers in my index to the right, with a
\wordright.

\setupregister[index][n=1,alternative=A]

\starttext
\CONTEXT\index{\ConTeXt}
\page
\LATEX\index{\LaTeX}
\page
\CONTEXT\index{\ConTeXt}
\page
\placeindex
\stoptext

The index is at page 4. I want to move the numbers "1,3" and "2" to the
right.
The parameter pagecommand is for the single page number, i want to put
a command (\wordright) around the whole block of page numbers.
How can i do that?

Greetings,
Massi


___
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] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-09 Thread MF
Hello list,
i'd like moving the page numbers in my index to the right, with a
\wordright.

\setupregister[index][n=1,alternative=A]

\starttext
\CONTEXT\index{\ConTeXt}
\page
\LATEX\index{\LaTeX}
\page
\CONTEXT\index{\ConTeXt}
\page
\placeindex
\stoptext

The index is at page 4. I want to move the numbers "1,3" and "2" to the
right.
The parameter pagecommand is for the single page number, i want to put
a command (\wordright) around the whole block of page numbers.
How can i do that?

Greetings,
Massi


___
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] Missing Chapter Numbers

2017-10-22 Thread Pablo Rodriguez
On 10/22/2017 08:59 PM, Thangalin wrote:
> The following code does not hide the headings:
> [..]
> The following code also does not hide the headings:
> [...]
> However, adding "section" makes the sub- and subsubsections hide as expected:
> [...]

Hi Thangalin,

I’m afraid that it doesn’t work as you expect, because you only used
\section commands (no \subsection or \subsubsection ones).

\setuphead[subsection][
  placehead=hidden,
  number=no]

% placehead=hidden breaks the counters?
\setuphead[subsubsection][
  placehead=hidden,
  number=no]

\starttext
\startTEXpage[offset=1em]
  \chapter{chapter}
  chapter
  \section{section}
  section
  \subsection{subsection}
  subsection
  \subsubsection{subsubsection}
  subsubsection
\stopTEXpage
\stoptext

> This behaviour appears to violate the principle of least astonishment.

Simple get a break, too much ConTeXt for now ;-).

Cheers,

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Missing Chapter Numbers

2017-10-22 Thread Thangalin
The following code does not hide the headings:

\setuphead[subsection][
  placehead=no,
  number=no,
]

% placehead=hidden breaks the counters?
\setuphead[subsubsection][
  placehead=no,
  number=no,
]

\starttext
  \chapter{chapter}
  chapter
  \section{section}
  section
  \section{subsection}
  subsection
  \section{subsubsection}
  subsubsection
\stoptext

The following code also does not hide the headings:

% placehead=hidden breaks the counters?
\setuphead[subsection, subsubsection][
  placehead=no,
  number=no,
]

\starttext
  \chapter{chapter}
  chapter
  \section{section}
  section
  \section{subsection}
  subsection
  \section{subsubsection}
  subsubsection
\stoptext

However, adding "section" makes the sub- and subsubsections hide as expected:

\setuphead[section, subsection, subsubsection][
  placehead=no,
  number=no,
]

\starttext
  \chapter{chapter}
  chapter
  \section{section}
  section
  \section{subsection}
  subsection
  \section{subsubsection}
  subsubsection
\stoptext

This behaviour appears to violate the principle of least astonishment.
___
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] size of footnote numbers

2017-09-30 Thread Otared Kavian
Hi Hraban,

If you want to change the way the footnote number in the text is shown 
something like a variation of the following might help you (copying this from a 
solution given by Wolfgang S. a few years ago…):

\define[1]\MyFootnotenoteCommand{\high{\bf{(#1)}}}
\setupnote[textcommand=\MyFootnotenoteCommand]
\setupnotation[footnote][left={(},right={)}]


\starttext
Hi there!\footnote{I’m a footnote.}
\stoptext

Best regards: OK

> On 29 Sep 2017, at 13:34, Henning Hraban Ramm <te...@fiee.net> wrote:
> 
> Ahoi,
> 
> in my current book there are some quotations typeset in a smaller type (via 
> \switchtobodyfont in a defined startstop).
> 
> Now the author insists that their footnote numbers should have the same size 
> as in the body text.
> Since the footnotes are mostly source annotations at the end, it makes some 
> sense.
> 
> What would be the best way to achieve this?
> 
> Here’s my setup:
> 
> \setupbodyfont[alegreya,rm,11pt] % usual font size
> 
> \startsetups[myQuotation]
>  \setupwhitespace[none]
>  \setupnarrower[left=2em,right=2em]
>  \switchtobodyfont[rm,10pt]
> % I guess I should change the footnote number font size here?
> \stopsetups
> 
> \definestartstop[myQuotation][
>setups=myQuotation,
>before={
>  \testpage[2]
>  \startnarrower[left,right]
>  \noindent},
>after={\stopnarrower
>  \indenting[next]}]
> 
> 
> 
> Greetlings, Hraban
> ---
> http://www.fiee.net
> http://wiki.contextgarden.net
> GPG Key ID 1C9B22FD
> 
> ___
> 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] size of footnote numbers

2017-09-30 Thread Pablo Rodriguez
On 09/29/2017 01:34 PM, Henning Hraban Ramm wrote:
> Ahoi,
> 
> in my current book there are some quotations typeset in a smaller
> type (via \switchtobodyfont in a defined startstop).
> 
> Now the author insists that their footnote numbers should have the
> same size as in the body text.
> Since the footnotes are mostly source annotations at the end, it
> makes some sense.
> 
> What would be the best way to achieve this?

Hi Hraban,

I wonder whether the following code is what you may want:

\setuppapersize[A9, landscape]
\setupnotation[footnote][numbercommand=\tf\high]
\starttext
a\footnote{b}
\stoptext

Just in case 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
___

<    1   2   3   4   5   6   7   8   9   10   >