Re: [NTG-context] spacing

2018-11-08 Thread Henri Menke
On 9/11/18 11:41 AM, Henning Hraban Ramm wrote:
> Thank you, I only tried \usemodule[old-columnsets] before.
> 
> It’s really annoying if ConTeXt proves unreliable time and again.
> I’m trying to replace InDesign in my workflows as often as possible, but if I 
> need to check and rework my environments with every other beta, it’s no fun 
> and costs a lot of time.

Clearly you haven't understood the meaning of “beta”.
If you don't want your documents to break, don't update.

> 
> Greetlings, Hraban
> ---
> https://www.fiee.net
> http://wiki.contextgarden.net
> https://www.dreiviertelhaus.de
> GPG Key ID 1C9B22FD
> 
> Am 2018-11-08 um 18:32 schrieb Wolfgang Schuster 
> :
> 
>> The columns environment uses now the newer mixedcolumns mechanism which is 
>> the reason for the differences in your document.
>>
>> To use the older columns mechanism add \usemodule[old-multicolumns] to your 
>> document.
>>
>> Wolfgang
>>
>>
>> Henning Hraban Ramm schrieb am 07.11.18 um 22:53:
>>> In the last days I recognized that some of my ConTeXt projects behave 
>>> differently WRT spacing, not only with \framed, but also with heads - 
>>> everywhere there’s more space induced than before.
>>> The attached screenshot shows an example of before and after.
>>>
>>> The headings are set up like
>>>
>>> \setuphead[section,subject][page=no,
>>> before={\testpage[7]\blank},after=,
>>> previousnumber=no, sectionsegments=section]
>>> \setuphead[subsection,subsubject][style={\bf},
>>> before={\testpage[7]\blank[small]},after=,
>>> sectionsegments=section:subsection]
>>>
>>> "1 Aufnahme" is a section, "1.1" is a subsection; I always use the 
>>> start/stop version.
>>>
>>> To get back to the old behaviour, I need to replace the \blank commands 
>>> with a negative vskip of font size!
>>> And then there’s still space inserted if the heading starts at the top of a 
>>> column.
>>>
>>> I tried to come up with a MWE – headingspacetest.tex shows at least that 
>>> there’s always space inserted before section headers.
>>>
>>> It might be related to some font handling, since the spacing changes affect 
>>> different "things" in different projects – frames with my label stickers 
>>> and on my magazine covers, headings like here. Or maybe the changes are 
>>> unrelated.
>>>
>>> This change happened between ConTeXt versions 2018.07.27 and 2018.09.01. I 
>>> didn’t change my code.
>>>
>>> Unfortunately there are no older versions of ConTeXt to go back to any more.
> 
> ___
> 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] spacing

2018-11-08 Thread Henning Hraban Ramm
Thank you, I only tried \usemodule[old-columnsets] before.

It’s really annoying if ConTeXt proves unreliable time and again.
I’m trying to replace InDesign in my workflows as often as possible, but if I 
need to check and rework my environments with every other beta, it’s no fun and 
costs a lot of time.

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

Am 2018-11-08 um 18:32 schrieb Wolfgang Schuster 
:

> The columns environment uses now the newer mixedcolumns mechanism which is 
> the reason for the differences in your document.
> 
> To use the older columns mechanism add \usemodule[old-multicolumns] to your 
> document.
> 
> Wolfgang
> 
> 
> Henning Hraban Ramm schrieb am 07.11.18 um 22:53:
>> In the last days I recognized that some of my ConTeXt projects behave 
>> differently WRT spacing, not only with \framed, but also with heads - 
>> everywhere there’s more space induced than before.
>> The attached screenshot shows an example of before and after.
>> 
>> The headings are set up like
>> 
>> \setuphead[section,subject][page=no,
>>  before={\testpage[7]\blank},after=,
>>  previousnumber=no, sectionsegments=section]
>> \setuphead[subsection,subsubject][style={\bf},
>>  before={\testpage[7]\blank[small]},after=,
>>  sectionsegments=section:subsection]
>> 
>> "1 Aufnahme" is a section, "1.1" is a subsection; I always use the 
>> start/stop version.
>> 
>> To get back to the old behaviour, I need to replace the \blank commands with 
>> a negative vskip of font size!
>> And then there’s still space inserted if the heading starts at the top of a 
>> column.
>> 
>> I tried to come up with a MWE – headingspacetest.tex shows at least that 
>> there’s always space inserted before section headers.
>> 
>> It might be related to some font handling, since the spacing changes affect 
>> different "things" in different projects – frames with my label stickers and 
>> on my magazine covers, headings like here. Or maybe the changes are 
>> unrelated.
>> 
>> This change happened between ConTeXt versions 2018.07.27 and 2018.09.01. I 
>> didn’t change my code.
>> 
>> Unfortunately there are no older versions of ConTeXt to go back to any more.

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

2018-11-08 Thread Wolfgang Schuster
The columns environment uses now the newer mixedcolumns mechanism which 
is the reason for the differences in your document.


To use the older columns mechanism add \usemodule[old-multicolumns] to 
your document.


Wolfgang


Henning Hraban Ramm schrieb am 07.11.18 um 22:53:

In the last days I recognized that some of my ConTeXt projects behave 
differently WRT spacing, not only with \framed, but also with heads - 
everywhere there’s more space induced than before.
The attached screenshot shows an example of before and after.

The headings are set up like

\setuphead[section,subject][page=no,
before={\testpage[7]\blank},after=,
previousnumber=no, sectionsegments=section]
\setuphead[subsection,subsubject][style={\bf},
before={\testpage[7]\blank[small]},after=,
sectionsegments=section:subsection]

"1 Aufnahme" is a section, "1.1" is a subsection; I always use the start/stop 
version.

To get back to the old behaviour, I need to replace the \blank commands with a 
negative vskip of font size!
And then there’s still space inserted if the heading starts at the top of a 
column.

I tried to come up with a MWE – headingspacetest.tex shows at least that 
there’s always space inserted before section headers.

It might be related to some font handling, since the spacing changes affect different 
"things" in different projects – frames with my label stickers and on my 
magazine covers, headings like here. Or maybe the changes are unrelated.

This change happened between ConTeXt versions 2018.07.27 and 2018.09.01. I 
didn’t change my code.

Unfortunately there are no older versions of ConTeXt to go back to any more.




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
___


___
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] improving kannada script

2018-10-30 Thread Ulrike Fischer
According to the xelatex output in the following example both
variants are not correct. What would be needed would be the first
two glyphs from variant 1 (knd2 script) and the third from variant 2
(knda script).

Pictures comparing the output can be found at
https://github.com/u-fischer/luaotfload/issues/20

(Disclaimer: I have no idea if xelatex/harfbuzz is correct here, but 
https://tex.stackexchange.com/a/457427/2388 says so).

\definefontfeature
  [kannada-testA]
  [indic-common]
  [script=knd2,
   % basic shaping
   pref=yes,
   blwf=yes,
   half=yes,
   pstf=yes,
   cjct=yes
   ]
\definefontfeature
  [kannada-testB] %identical to default kannada-one
  [indic-common]
  [script=knda,
   % basic shaping
   pref=yes,
   blwf=yes,
   half=yes,
   pstf=yes,
   cjct=yes
   ]   

\definefont
[kannadatestA][file:notosanskannada-regular.ttf*kannada-testA]
\definefont
[kannadatestB][file:notosanskannada-regular.ttf*kannada-testB]
\starttext 
\section{Skript knd2}
\kannadatestA
ಕಿ

ಕ್ರ

ರ್ಕ

\section{Skript knda (default)}

\kannadatestB
ಕಿ

ಕ್ರ

ರ್ಕ
\stoptext




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

[NTG-context] Reset bibliography numbering

2018-10-24 Thread Martin Hasoň
Hi all,

I want to use a custom bibliography for every section in document. It is
possible to starting the numbering from 1 for each section?


\setupbtxrendering[default][
repeat=yes,
continue=yes,
method=local,
numbering=yes,
criterium=section,
]

\usebtxdataset[default][bib.buffer]
\starttext
\startsection[title=Section 1]
\cite[a]
\placelistofpublications
\stopsection

\startsection[title=Section 2]
  \cite[b] \cite[a] \cite[c]
  \placelistofpublications
\stopsection
\stoptext


Actual output:

Section 1
[1]

1  bib a


Section 2
[2] [1] [3]

2 bib b

1 bib a

3 bib c


Expected output:

Section 1
[1]

1  bib a


Section 2
[1] [2] [3]

1 bib b

2 bib a

3 bib c

Many thanks for your help

Martin
___
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] \setuphead for a section block

2018-10-23 Thread Pablo Rodriguez
On 10/23/18 9:25 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 23.10.18 um 21:18:
>> [...]
>> But wasn’t there a command similar to the following one for such purposes?
>>
>>  \setuphead[bodypart:chapter][style=\em]
>>
>> I remember that there was something similar to that command to setup
>> headings in a section block.
> 
> You’re thinking of \defineconversionset, \defineseparatorset etc. which 
> let you
> set values for certain sectionblocks but not \setuphead.

Many thanks for your reply, Wolfgang.

From \defineconversionset, I thought the same was valid for \setuphead.

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] \setuphead for a section block

2018-10-23 Thread Rik

On 10/23/2018 15:23, Rik wrote:

On 10/23/2018 15:18, Pablo Rodriguez wrote:

Dear list,

imagine that I need a different setup for chapter in the bodymatter than
in the frontmatter and appendices.

The way to do it seems to be:

 \setuphead[chapter][style=\bf]
 \startsectionblockenvironment[bodypart]
 \setuphead[chapter][style=\em]
 \stopsectionblockenvironment
 \starttext
 \startfrontmatter
 \chapter{Introduction}
 \stopfrontmatter
 \startbodymatter
 \chapter{Chapter}
 \stopbodymatter
 \stoptext

But wasn’t there a command similar to the following one for such 
purposes?


 \setuphead[bodypart:chapter][style=\em]



I remember that there was something similar to that command to setup
headings in a section block.

Am I creating my memories or did a similar option exist?

Many thanks for your help,

Pablo


\startsectionblockenvironment[bodypart]
\setuphead  [chapter][
  style=\tfc\HeadFont ...


Sorry, I meant to delete, not send.

--
Rik

___
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] \setuphead for a section block

2018-10-23 Thread Wolfgang Schuster



Pablo Rodriguez schrieb am 23.10.18 um 21:18:

Dear list,

imagine that I need a different setup for chapter in the bodymatter than
in the frontmatter and appendices.

The way to do it seems to be:

 \setuphead[chapter][style=\bf]
 \startsectionblockenvironment[bodypart]
 \setuphead[chapter][style=\em]
 \stopsectionblockenvironment
 \starttext
 \startfrontmatter
 \chapter{Introduction}
 \stopfrontmatter
 \startbodymatter
 \chapter{Chapter}
 \stopbodymatter
 \stoptext

But wasn’t there a command similar to the following one for such purposes?

 \setuphead[bodypart:chapter][style=\em]

I remember that there was something similar to that command to setup
headings in a section block.

Am I creating my memories or did a similar option exist?


You’re thinking of \defineconversionset, \defineseparatorset etc. which 
let you

set values for certain sectionblocks but not \setuphead.

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] \setuphead for a section block

2018-10-23 Thread Rik

On 10/23/2018 15:18, Pablo Rodriguez wrote:

Dear list,

imagine that I need a different setup for chapter in the bodymatter than
in the frontmatter and appendices.

The way to do it seems to be:

 \setuphead[chapter][style=\bf]
 \startsectionblockenvironment[bodypart]
 \setuphead[chapter][style=\em]
 \stopsectionblockenvironment
 \starttext
 \startfrontmatter
 \chapter{Introduction}
 \stopfrontmatter
 \startbodymatter
 \chapter{Chapter}
 \stopbodymatter
 \stoptext

But wasn’t there a command similar to the following one for such purposes?

 \setuphead[bodypart:chapter][style=\em]



I remember that there was something similar to that command to setup
headings in a section block.

Am I creating my memories or did a similar option exist?

Many thanks for your help,

Pablo


\startsectionblockenvironment[bodypart]
\setuphead  [chapter][
  style=\tfc\HeadFont ...

--
Rik

___
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] \setuphead for a section block

2018-10-23 Thread Pablo Rodriguez
Dear list,

imagine that I need a different setup for chapter in the bodymatter than
in the frontmatter and appendices.

The way to do it seems to be:

\setuphead[chapter][style=\bf]
\startsectionblockenvironment[bodypart]
\setuphead[chapter][style=\em]
\stopsectionblockenvironment
\starttext
\startfrontmatter
\chapter{Introduction}
\stopfrontmatter
\startbodymatter
\chapter{Chapter}
\stopbodymatter
\stoptext

But wasn’t there a command similar to the following one for such purposes?

\setuphead[bodypart:chapter][style=\em]

I remember that there was something similar to that command to setup
headings in a section block.

Am I creating my memories or did a similar option exist?

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] German introduction to context

2018-10-21 Thread Pablo Rodriguez
Hi Axel,

how about creating a repository at GitLab with the contents you provide?

This would make contributions easier.

Just in case it helps,

Pablo


PS: ConTeXt can deal with XML directly, so I wonder whether it makes
sense to convert from pandoc to ConTeXt.

PS²: hyphenation is wrong in US English only.

\starttext
\hyphenatedword{Trennalgorithmus}
\de\hyphenatedword{Trennalgorithmus}
\deo\hyphenatedword{Trennalgorithmus}
\stoptext



On 10/21/18 1:22 PM, Axel Kielhorn wrote:
> Hello,
> 
> I’m looking for an introduction in german.
> What I need is:
> - Structure chapter/section …
> - Emphasis bold/italic
> - lists itemize
> - floats
> - TABLE
> - index
> - references
> - math (with units)
> - chemistry (only basic stuff)
> 
> Several years ago I started to prepare a talk for a DANTE meeting, trying to 
> show how to generate epub from context.
> Since I got a new job in early 2015 I didn’t have time to finish the talk or 
> go to the meeting.
> I’ll use the enclosed text as a starting point, unless someone already has a 
> usable manual.
> 
> Note: Dominik Wagenführ was an editor of the now defunct „Freies Magazin“ and 
> he supplied a LaTeX document of examples that needed to be converted into 
> ePub. Thus the enclosed document is mainly concerned about epub.
> 
> Greetings Axel
> 
> PS: Comments are welcome.
> 
> 
> ___
> 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
> ___
> 


-- 
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] German introduction to context

2018-10-21 Thread Axel Kielhorn
Hello,

I’m looking for an introduction in german.
What I need is:
- Structure chapter/section …
- Emphasis bold/italic
- lists itemize
- floats
- TABLE
- index
- references
- math (with units)
- chemistry (only basic stuff)

Several years ago I started to prepare a talk for a DANTE meeting, trying to 
show how to generate epub from context.
Since I got a new job in early 2015 I didn’t have time to finish the talk or go 
to the meeting.
I’ll use the enclosed text as a starting point, unless someone already has a 
usable manual.

Note: Dominik Wagenführ was an editor of the now defunct „Freies Magazin“ and 
he supplied a LaTeX document of examples that needed to be converted into ePub. 
Thus the enclosed document is mainly concerned about epub.

Greetings Axel

<>


PS: Comments are welcome.___
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] weird spacing after command type

2018-10-14 Thread Wolfgang Schuster



Pablo Rodriguez schrieb am 14.10.18 um 20:38:

Dear list,

I have the following sample:

 \define[1]\slide{\startmakeup[standard]#1\stopmakeup}

 \definetype[texcode][style=\ttd, option=TEX]

 \starttext
 \slide{\texcode{\ifodd\pageno impar\else par\fi}}

 \startmakeup[standard]
 \texcode{\ifodd\pageno impar\else par\fi}
 \stopmakeup
 \stoptext

I wonder why \slide introduces a space after each command.

Am I missing something or have I hit a bug?


This is normal behaviour for TeX which inserts a spaces after control 
sequences when it tokenizes the input.


\starttext
\detokenize{\ifx\a\b\else\fi}
\stoptext


The best thing you can do is to avoid verbatim code in arguments of 
other commands (section headers are one case where you can’t avoid this) 
and your normal use of the makeup-environment shows how you can avoid 
the unwanted output.



Another way to avoid the space is to create commands which don’t take 
argument which works only when you have a environment which isn’t 
delimited (i.e. the environment grabs everything from the start-command 
to the stop-command).


\define\slide{\groupedcommand{\startmakeup[standard]}{\stopmakeup}}

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] Questions to font family Pagella

2018-10-12 Thread Tomas Hala
Hi all,

I am doing some first tests with fonts (related with our font testing 
intentions)
and I found out that since 2015 there are two sets of files for pagella with 
the same metadata by otfinfo -i.

Eg.:

152192 
/usr/local/texlive/2018/texmf-dist/fonts/opentype/public/newpx/TeXGyrePagellaX-Regular.otf
144472 
/usr/local/texlive/2018/texmf-dist/fonts/opentype/public/tex-gyre/texgyrepagella-regular.otf

The only one difference is in the license note:
"Copyright 2013--2015 Michael Sharpe for added superior figures, letters and 
symbols." 
at files from newx directory.

1. 
Why the distribution (TL 2018) contains two versions of the same font family? 

2. 
How can I recognise which one was used for the document after 
\setupbodyfont[pagella]?

3.
On my disk I have got also one older version (1.011) of pagella (I do not where 
I took it from)
which contains more(!) characters than the current one (2.004) where eg. the 
subset of cyrillic characters is missing... 
Why the newer version contains less? 

Best wishes,

Tomáš

%%

%%
Older:
%%

Family:  TeXGyrePagella
Subfamily:   Regular
Full name:   TeXGyrePagella-Regular
PostScript name: TeXGyrePagella-Regular
Preferred family:TeX Gyre Pagella
Version: Version 1.011;PS 1.011;hotconv 1.0.49;makeotf.lib2.0.14853
Unique ID:   1.011;URW ;TeXGyrePagella-Regular
Trademark:   Please refer to the Copyright section for the font 
trademark attribution notices.
Copyright:   Copyright (URW)++, copyright 1999 by (URW)++ Design & 
Development; Cyrillic glyphs added by Valek Filippov, copyright 2001-2002; 
Vietnamese characters were added by Han The Thanh; copyright 2006, 2007 for TeX 
Gyre extensions by B. Jackowski and J.M. Nowacki (on behalf of TeX users 
groups). This work is released under the GUST Font License --  see 
http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt for details.
Vendor ID:   URW


%%
/usr/local/texlive/2018/texmf-dist/fonts/opentype/public/newpx/TeXGyrePagellaX-Regular.otf:
%%

Family:  TeXGyrePagellaX
Subfamily:   Regular
Full name:   TeXGyrePagellaX-Regular
PostScript name: TeXGyrePagellaX-Regular
Preferred family:TeX Gyre PagellaX
Version: Version 2.004;PS 2.004;hotconv 1.0.49;makeotf.lib2.0.14853
Unique ID:   2.004;UKWN;TeXGyrePagella-Regular
Trademark:   Please refer to the Copyright section for the font 
trademark attribution notices.
Copyright:   Copyright 2006, 2009 for TeX Gyre extensions by B. 
Jackowski and J.M. Nowacki (on behalf of TeX users groups). This work is 
released under the GUST Font License --  see 
http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt for details.

Copyright 2013--2015 Michael Sharpe for added superior figures, letters and 
symbols.
Vendor ID:   UKWN

%%
/usr/local/texlive/2018/texmf-dist/fonts/opentype/public/tex-gyre/texgyrepagella-regular.otf:
%%

Family:  TeXGyrePagella
Subfamily:   Regular
Full name:   TeXGyrePagella-Regular
PostScript name: TeXGyrePagella-Regular
Preferred family:TeX Gyre Pagella
Version: Version 2.004;PS 2.004;hotconv 1.0.49;makeotf.lib2.0.14853
Unique ID:   2.004;UKWN;TeXGyrePagella-Regular
Trademark:   Please refer to the Copyright section for the font 
trademark attribution notices.
Copyright:   Copyright 2006, 2009 for TeX Gyre extensions by B. 
Jackowski and J.M. Nowacki (on behalf of TeX users groups). This work is 
released under the GUST Font License --  see 
http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt for details.
Vendor ID:   UKWN

%%
___
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] Implicit plots/level curves possible?

2018-10-07 Thread Mikael P. Sundqvist
On Sun, Oct 7, 2018 at 7:14 PM Alan Braslau  wrote:
>
> On Sun, 7 Oct 2018 17:25:35 +0200
> "Mikael P. Sundqvist"  wrote:
>
> > ContourPlot[2 x^5 + x y + y^5 == 0, {x, 0, 2}, {y, -2, 1/2}]
>
> Brut force:
>
> \startTEXpage
> \startMPcode {doublefun}
> pen savedpen ; savedpen := currentpen ;
> pickup pencircle scaled .01 ;
> path p ;
> p := for i=0 upto 1000 :
>for j=0 upto 1000 :
>  hide(x := 2i/1000 ; y := 2.5j/1000 - 2 ;)
>  if abs(2*(x**5)+x*y+y**5) < .002i/1000 : (x,y) .. fi
>endfor
>  endfor cycle ;
> draw subpath (0,length p - 1) of p ;
> setbounds currentpicture to (0,-2)--(2,-2)--(2,.5)--(0,.5)--cycle ;
> currentpicture := currentpicture xsized 5cm ;
> pickup savedpen ;
>
> picture pic ; pic := currentpicture ;
> drawarrow llcorner pic--lrcorner pic ;
> drawarrow llcorner pic--ulcorner pic ;
> label.rt ("$x$", lrcorner pic) ;
> label.top("$y$", ulcorner pic) ;
> for x=0 step .5 until 2 :
> label.bot(decimal x,(x/2)[llcorner pic,lrcorner pic]) ;
> endfor
> for y=0 step .5 until 2.5 :
> label.lft(decimal (y-2),(y/2.5)[llcorner pic,ulcorner pic]) ;
> endfor
> \stopMPcode
> \stopTEXpage
>
>
> Alan

Thanks both to luigi and to Alan! I'm impressed by your brute force
method, Alan! In particular it learned me the "hide" command.

I feel a bit ashamed. Earlier today I answered something else giving a
reference to the metafun manual. Now I'm here not reading it carefully
enough myself. In the helpers section it is clearly written how to
import and plot data. Thus, I exported the data from the Mathematica
plot (that file is pasted below in case anyone wants to try this
themselves, sorry in advance for the big amount of text it generates
in this email) and then importing it just worked fine. I like Alan's
method very much, but it takes some time during compilation, so I will
probably stick with importing. Working code below (where one can see
that Alan's method is indeed working fine, at least with this
example).

Again, thanks to both luigi and Alan!

\starttext

\startTEXpage[offset=2bp]
\startMPcode{doublefun}

pen savedpen ; savedpen := currentpen ;
pickup pencircle scaled .01 ;

lua("MP = { } MP.data = table.load('mmadata.txt')") ;
numeric n ;
lua("mp.print('n := ',\#MP.data)") ;
path mycurve;
mycurve :=
lua("mp.pair(MP.data[1])")
for i=2 upto n :
.. lua("mp.pair(MP.data[" & decimal i & "])")
endfor;
draw mycurve withcolor darkred withpen pencircle scaled 0.04;

path p ;
p := for i=0 upto 1000 :
   for j=0 upto 1000 :
 hide(x := 2i/1000 ; y := 2.5j/1000 - 2 ;)
 if abs(2*(x**5)+x*y+y**5) < .002i/1000 : (x,y) .. fi
   endfor
 endfor cycle ;
draw subpath (0,length p - 1) of p ;
setbounds currentpicture to (0,-2)--(2,-2)--(2,.5)--(0,.5)--cycle ;
currentpicture := currentpicture xsized 5cm ;
pickup savedpen ;

picture pic ; pic := currentpicture ;
drawarrow llcorner pic--lrcorner pic ;
drawarrow llcorner pic--ulcorner pic ;
label.rt ("$x$", lrcorner pic) ;
label.top("$y$", ulcorner pic) ;
for x=0 step .5 until 2 :
label.bot(decimal x,(x/2)[llcorner pic,lrcorner pic]) ;
endfor
for y=0 step .5 until 2.5 :
label.lft(decimal (y-2),(y/2.5)[llcorner pic,ulcorner pic]) ;
endfor
\stopMPcode
\stopTEXpage
\stoptext


%%% mmadata.txt %%%
return {{1.7781332646374535, -2.0}, {1.7768209908069152,
-1.9983615165933983}, {1.775510204081634, -1.9967215415115265},
{1.7664030082433901, -1.985873790716172}, {1.756875567501,
-1.9744897959183674}, {1.7559890220139953, -1.973381069421283},
{1.7551020408163278, -1.9722667987462739}, {1.7455791311458495,
-1.9608832289248324}, {1.7356495451060165, -1.9489795918367347},
{1.7351734376993888, -1.9483801416512756}, {1.7346938775510217,
-1.9477751961654046}, {1.7247720468786834, -1.9358716760955252},
{1.714463398255413, -1.9234693877551021}, {1.7142857142857155,
-1.9232445076564075}, {1.7093814232165505, -1.9173390239186459},
{1.7039827159442558, -1.910837931600294}, {1.6938775510204094,
-1.8986359463002893}, {1.6935950869756253, -1.8983122637294494},
{1.6932881048717179, -1.8979591836734695}, {1.683212201778606,
-1.8857806661440912}, {1.6734693877551032, -1.8739731304347957},
{1.6728341829160982, -1.873242985640593}, {1.6721459415303699,
-1.8724489795918369}, {1.6624611568740721, -1.8606990641114929},
{1.653061224489797, -1.8492648538255463}, {1.6520932542108602,
-1.8481487383588753}, {1.6510476808879386, -1.8469387755102042},
{1.6417306097129987, -1.8355918398995696}, {1.632653061224491,
-1.824508389583349}, {1.6313733625579403, -1.82302819476176},
{1.6299953447379028, -1.8214285714285716}, {1.621021656483979,
-1.8104576232725786}, {1.6122448979591848, -1.7997008180397196},
{1.6106756399677442, -1.7978799

Re: [NTG-context] faking smallcaps font with font features and fallbacks

2018-10-03 Thread Hans Hagen

On 10/3/2018 4:20 PM, mf wrote:

Il 03/10/18 16:02, Hans Hagen ha scritto:

ok, even nicer:

 \definefontfallback[FakeSansCaps]   [SansEmboldened] 
[0x-0x] [rscale=.8,method=uppercase]


which will remap all lowercase in the font so that you also get 
accented characters


Yes, for this case it makes more sense using method=uppercase.

But "target=" is a more general solution (remapping old dingbats fonts 
on the dingbats section of unicode makes sense as an example?)


Would the range 0x-0x overwrite also capital letters?


it checks for the lowercase / uippercase unicode properties so it's safe

In that case i'm afraid we'd have a scaled down, embolded, uppercase 
version of the font, not a small-caps variant with a consistent thickess 
of the glyphs.


no, it more 'clever'


I think i should specify only the lower case letters' ranges.

no, it does that itself

btw, make sure that you also apply default features to the emboldened ...

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] faking smallcaps font with font features and fallbacks

2018-10-03 Thread mf

Il 03/10/18 16:02, Hans Hagen ha scritto:

ok, even nicer:

     \definefontfallback[FakeSansCaps]   [SansEmboldened] 
[0x-0x] [rscale=.8,method=uppercase]


which will remap all lowercase in the font so that you also get accented 
characters


Yes, for this case it makes more sense using method=uppercase.

But "target=" is a more general solution (remapping old dingbats fonts 
on the dingbats section of unicode makes sense as an example?)


Would the range 0x-0x overwrite also capital letters?

In that case i'm afraid we'd have a scaled down, embolded, uppercase 
version of the font, not a small-caps variant with a consistent thickess 
of the glyphs.


I think i should specify only the lower case letters' ranges.

Massimiliano
___
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 making ugly column sizes, how to fix?

2018-10-01 Thread David Walther

I looked at your example.  I ran your example, and on my installation, it has
the same problem as I described.  I have included a PDF file of my original
sample file, and also the PDF generated from your example.   What version of
ConTeXt are you using?

On my installation of context, columns are still coming out "ugly" as you will
see in the PDF t1.pdf.  In t2.pdf you'll see the problem shows up in the table
labelled "Good".  The "Good" refers to the row in bold, not to the row above
it.

David

On Sun, Sep 30, 2018 at 07:44:12PM -0400, Aditya Mahajan wrote:

On Sat, 29 Sep 2018, David Walther wrote:


Full example at the bottom.

I'm making a table.  So far so good.

Every so often I want to make something like a section header.

Regular table rows are like this:

\bTR\bTC \eTC\bTC NightShift \eTC\bTC Tension Lines 146 - 150 \eTC\eTR

For the section headers, I do this, and they look the way I want:

\bTR\bTC 30. \eTC \bTC[nc=2,align=center,style=] \bf{Foo Bar} \eTC\eTR


You can also use

\bTC[nc=2, align=middle, style=bold]

But then the regular lines have ugly line breaks and suddenly the 
column size of column 3 is squeezed.  This shouldn't be, we have the 
whole page to work with.


I don't really see the difference in column sizes between the two 
cases. See attached (I simplified and cleaned the example a little)


Aditya





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

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




t1.tex
Description: TeX document


t2.pdf
Description: Adobe PDF document


t1.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] table making ugly column sizes, how to fix?

2018-09-30 Thread Aditya Mahajan

On Sat, 29 Sep 2018, David Walther wrote:


Full example at the bottom.

I'm making a table.  So far so good.

Every so often I want to make something like a section header.

Regular table rows are like this:

\bTR\bTC \eTC\bTC NightShift \eTC\bTC Tension Lines 146 - 150 \eTC\eTR

For the section headers, I do this, and they look the way I want:

\bTR\bTC 30. \eTC \bTC[nc=2,align=center,style=] \bf{Foo Bar} \eTC\eTR


You can also use

\bTC[nc=2, align=middle, style=bold]

But then the regular lines have ugly line breaks and suddenly the column 
size of column 3 is squeezed.  This shouldn't be, we have the whole page to 
work with.


I don't really see the difference in column sizes between the two cases. 
See attached (I simplified and cleaned the example a little)


Aditya

test.tex
Description: TeX document


test.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] table making ugly column sizes, how to fix?

2018-09-29 Thread David Walther

Full example at the bottom.

I'm making a table.  So far so good.

Every so often I want to make something like a section header.

Regular table rows are like this:

\bTR\bTC \eTC\bTC NightShift \eTC\bTC Tension Lines 146 - 150 \eTC\eTR

For the section headers, I do this, and they look the way I want:

\bTR\bTC 30. \eTC \bTC[nc=2,align=center,style=] \bf{Foo Bar} \eTC\eTR

But then the regular lines have ugly line breaks and suddenly the column size 
of column 3 is squeezed.  This shouldn't be, we have the whole page to work 
with.

So, when I do my section headers this way, the columns come out sized nicely, 
but the section header isn't styled the way I want it:

\bTR\bTC 30. \eTC \bTC\eTC \bTC[align=center] \bf{Foo Bar} \eTC\eTR

Below is my minimal example you can cut and paste.  How do I do the section
headers without messing up the column sizing?


\setuppagenumbering[alternative=doublesided,location=none,page=no]
\setupfootertexts[\sans{Source: http://mywebsite}]
\setupheadertexts[test column text wrapping]
\setupheadertexts
 [] [Page \userpagenumber\ of \lastuserpagenumber]
 [Page \userpagenumber\ of \lastuserpagenumber] []
\setuppapersize[letter, portrait]
\setuplayout[topspace=0.5in, backspace=1in, height=10in, width=7in,
header=0.5in, footer=0.5in, headerdistance=0in, footerdistance=0in]
\switchtobodyfont[12pt]
\starttext
\setupTABLE[split=repeat]
\setupTABLE[r][each][toffset=3pt, boffset=3pt, loffset=3pt, roffset=3pt]
\setupTABLE[c][each][leftframe=off,rightframe=off,align=right]
\setupTABLE[c][first][frame=off,align=left]
\setupTABLE[c][2][style=\tfx\it,align=left]
\bTABLE
\bTABLEhead
\bTR\bTH Col1 \eTH\bTH Col2 \eTH\bTH Col3 \eTH\eTR
\eTABLEhead
\bTABLEnext
\bTR\bTH Col1 \eTH\bTH Col2 \eTH\bTH Col3 \eTH\eTR
\eTABLEnext
\bTABLEbody
\bTR\bTC \eTC\bTC NightShift \eTC\bTC Tension Lines 146 - 150 \eTC\eTR

% This displays the way I want, but breaks the regular rows.
\bTR\bTC 30. \eTC \bTC[nc=2,align=center,style=] \bf{Foo Bar} \eTC\eTR

% This works with the regular rows, but doesn't look how I want.
%\bTR\bTC 30. \eTC \bTC\eTC \bTC[align=center] \bf{Foo Bar} \eTC\eTR
\eTABLEbody
\eTABLE
\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] Notation of an arc

2018-09-27 Thread Alan Braslau
Try:

\m{\overparent{}{AB}} 

(See section 1 Math Stackers in about.pdf, in the distribution.)

Alan


On Thu, 27 Sep 2018 22:07:37 +0200
Fabrice Couvreur  wrote:

> I just tested both solutions and that of Alan does not work as expected.
> 
> \useMPlibrary[mat]
> 
> \definemathstackers
>   [mp]
>   [alternative=mp]
> 
> \definemathextensible [mp] [overparent] ["FE3DC]
> 
> \starttext
> \m{\overparent{ AB}}
> \stoptext
> 
> 
> 
> Le jeu. 27 sept. 2018 à 21:47, Fabrice Couvreur 
> a écrit :
> 
> > Hi Henri and Alan,
> > Thank you for your answers.
> > Fabrice
> >
> > Le mer. 26 sept. 2018 à 23:52, Alan Braslau  a
> > écrit :
> >  
> >> On Thu, 27 Sep 2018 09:22:00 +1200
> >> Henri Menke  wrote:
> >>  
> >> > On 27/09/18 09:15, Fabrice Couvreur wrote:  
> >> > > Hello,
> >> > > How to improve the notation of an arc ?
> >> > > Thank you
> >> > > Fabrice
> >> > >  
> >> >
> >> > Use the correct math fence
> >> >
> >> > \starttext
> >> > \m{\overparent{\rm AB}}
> >> > \stoptext
> >> >  
> >> > > \starttext
> >> > >  \m{\overset{\frown}{\rm AB}}
> >> > > \stoptext  
> >>
> >> And, if you prefer, you can use MetaPost (rather than the font
> >> extensible):
> >>
> >> \useMPlibrary[mat]
> >>
> >> \definemathstackers
> >>   [mp]
> >>   [alternative=mp]
> >>
> >> \definemathextensible [mp] [overparent] ["FE3DC]
> >>
> >>
> >> Alan
> >>
> >> ___
> >> 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] xml in lua advice ?

2018-09-19 Thread Taco Hoekwater
Hi,

> it actually depends on what you do ... anyway here is some insight (as 
> xml-tex old-timer you'll probably recognize the madness)

What I am mostly trying to do is to have as much of the xml processing in lua 
as possible.

> 
> % \enabletrackers[context*]
> 
> \starttext
> 
> % here is your missing mwe

Yes, sorry about that. My question was intended to be more of an
documentation-related one. 

Using your MWE as guideline, my minimal file looks like this:

% BEGIN ENVIRONMENT
\startluacode
function xml.functions.document(t) 
   lxml.flush(t) 
end
function xml.functions.b(t)
   context.start()
   context.bf()
   lxml.flush(t)
   context.stop()
   context("{}")
end
function xml.functions.section(t)
  context.section("{")
  lxml.flush(t)
  context("}")
end
\stopluacode

\startxmlsetups mysetups % to be converted to lua later
  \xmlsetfunction {main}{document}{xml.functions.document}
  \xmlsetfunction {main}{section} {xml.functions.section}  
  \xmlsetfunction {main}{b}   {xml.functions.b}
\stopxmlsetups

\xmlregistersetup{mysetups} % to be converted to lua later
 
% XML normally in separate file
\starttext
\startbuffer[test]

   some bold title

\stopbuffer

\xmlprocessbuffer{main}{test}{}

\stoptext
% END EXAMPLE


I know it would be simple to write e.g.

  \startsetups xml:section
\section{\xmlflush{#1}}
  \stopsetups

but I was aiming for a simple, clean-looking CLD as style setup of the XML 
document. I doubt I could explain your MWE to one of my coworkers, as I 
hardly understand it myself :)

What I was really hoping for was something like the fictional:

  function xml.functions.section(t)
context.section(lxml.process_into_context_string(t))
  end

or some CLD extension so that it would actually understand

  function xml.functions.section(t)
context.section(lxml.flush(t))
  end

I hope this makes more sense now. Unless something magical is possible,
it seems my best bet is to stick with \startsetups instead of lua for
these cases, just to make sure I can explain to the rest of the office
what is going on.

Thanks,
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] xml in lua advice ?

2018-09-19 Thread mf
My 2 cents:

local xmlflush = lxml.flush

local function text_or_xml(...)
  for i,v in ipairs(arg) do
if "table" == type(v) then
  xmlflush(v)
else
  context(v)
end
  end
end

function xml.functions.heading(t)
  text_or_xml( "\\section{" , t , "}" )
end

Massimiliano

Il giorno mer, 19/09/2018 alle 15.56 +0200, Hans Hagen ha scritto:
> On 9/19/2018 2:50 PM, Taco Hoekwater wrote:
> > Hi,
> > 
> > Is there a more elegant way to feed an xml tree into a context()
> > command
> > that what I have below?
> > 
> > 
> > \startluacode
> > function xml.functions.heading(t)
> > context.section("{")
> > lxml.flush(t)
> > context("}")
> > end
> > \stopluacode
> > 
> > The subtree in ’t’ could have embedded xml tags that should be
> > processed,
> > so just stripping it clean will not do.
> > 
> > (this is not about \section as such, I just needed an example.
> > \startsection
> > would be more modern, but it would not help fix the issue )
> 
> it actually depends on what you do ... anyway here is some insight
> (as 
> xml-tex old-timer you'll probably recognize the madness)
> 
> % \enabletrackers[context*]
> 
> \starttext
> 
> % here is your missing mwe
> 
> \startbuffer[test]
> 
>  some bold title
> 
> \stopbuffer
> 
> % this will assume xml and relate some handlers
> 
> \setuphead[section]
>[coding=xml,
> xmlsetup=xml:flush]
> 
> \startxmlsetups xml:flush
>  \xmlflush{#1}
> \stopxmlsetups
> 
> % comment this one for your amusement
> 
> \startxmlsetups xml:b
>  {\bf \xmlflush{#1}}
> \stopxmlsetups
> 
> % here is the magic: you pass a reference
> 
> \startluacode
> function xml.finalizers.heading(t)
>  context.formatted.section("main::%i",t[1].ix)
> end
> \stopluacode
> 
> % this loads only (can happen at the lua end ... you can sort that
> out)
> 
> \xmlloadbuffer{main}{test}{}
> 
> % this indexes the nodes (the ix keys, basically all these #1
> argumehnts 
> in setups use that trickery)
> 
> \xmladdindex{main}
> 
> % to be sure
> 
> \xmlsetsetup{main}{b}{xml:b}
> 
> % now we filter / apply your finalizer
> 
> \xmlfilter{main}{section/heading()}
> 
> % done
> 
> \stoptext
> 
> 
> 
> 
> -
>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] xml in lua advice ?

2018-09-19 Thread Hans Hagen

On 9/19/2018 2:50 PM, Taco Hoekwater wrote:

Hi,

Is there a more elegant way to feed an xml tree into a context() command
that what I have below?


\startluacode
function xml.functions.heading(t)
context.section("{")
lxml.flush(t)
context("}")
end
\stopluacode

The subtree in ’t’ could have embedded xml tags that should be processed,
so just stripping it clean will not do.

(this is not about \section as such, I just needed an example. \startsection
would be more modern, but it would not help fix the issue )
it actually depends on what you do ... anyway here is some insight (as 
xml-tex old-timer you'll probably recognize the madness)


% \enabletrackers[context*]

\starttext

% here is your missing mwe

\startbuffer[test]

some bold title

\stopbuffer

% this will assume xml and relate some handlers

\setuphead[section]
  [coding=xml,
   xmlsetup=xml:flush]

\startxmlsetups xml:flush
\xmlflush{#1}
\stopxmlsetups

% comment this one for your amusement

\startxmlsetups xml:b
{\bf \xmlflush{#1}}
\stopxmlsetups

% here is the magic: you pass a reference

\startluacode
function xml.finalizers.heading(t)
context.formatted.section("main::%i",t[1].ix)
end
\stopluacode

% this loads only (can happen at the lua end ... you can sort that out)

\xmlloadbuffer{main}{test}{}

% this indexes the nodes (the ix keys, basically all these #1 argumehnts 
in setups use that trickery)


\xmladdindex{main}

% to be sure

\xmlsetsetup{main}{b}{xml:b}

% now we filter / apply your finalizer

\xmlfilter{main}{section/heading()}

% done

\stoptext




-
  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] xml in lua advice ?

2018-09-19 Thread Taco Hoekwater
Hi,

Is there a more elegant way to feed an xml tree into a context() command
that what I have below?


\startluacode
function xml.functions.heading(t)
   context.section("{")
   lxml.flush(t)
   context("}")
end
\stopluacode

The subtree in ’t’ could have embedded xml tags that should be processed, 
so just stripping it clean will not do.

(this is not about \section as such, I just needed an example. \startsection
would be more modern, but it would not help fix the issue )

Thanks for any help,

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] t-scancsv_ConTeXT_module can't filter anymore

2018-09-17 Thread Jorge Manuel

Dear Pablo,

Changing scancsv to handlecsv is enough in my all documents (at least the ones 
I tested).  Now, all works fine. Thanks again.

 Jorge


> No dia 17/09/2018, às 19:34, Pablo Rodriguez  escreveu:
> 
> 
> On 9/17/18 7:50 PM, Jorge Manuel wrote:
>>> [...]
>>> My guess is that you need to enclose text strings in quotes, so that
>>> your conditionals read:
>>> 
>>>  \doloopif{\Flag}{~=}{"anl"}{\lineaction}
>>>  \doloopif{\Flag}{==}{"anl"}{\lineaction}
>> 
>> Thanks for your reply. This code don’t work.  I would try your
>> handlecsv module. I need to adapt my old .tex files.
> I was wrong. Quotes aren’t required.
> 
> See minimal example (which works both with handlecsv and scancsv):
> 
>\usemodule[handlecsv]% scancsv works too
>\opencsvfile{cities.csv}
>\starttext
>\startbuffer
>This is located in Germany: \cA\par
>\stopbuffer
>\section{Cities in Germany}
>\doloopif{\cB}{==}{Germany}{\getbuffer}
>\section{Cities not in Germany}
>\doloopif{\cB}{~=}{Germany}{\getbuffer}
>\stoptext
> 
> Contents from "cities.csv" read:
> 
>"Berlin";"Germany"
>"Paris";"France"
>"London";"UK"
>"New York";"USA"
>"Munich";"Germany"
>"Lisbon";"Portugal"
>"Dublin";"Ireland"
>"Warsaw";"Poland"
>"Vienna";"Austria"
>"Barcelona";"Spain"
> 
> 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
> ___

___
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] t-scancsv_ConTeXT_module can't filter anymore

2018-09-17 Thread Pablo Rodriguez

On 9/17/18 7:50 PM, Jorge Manuel wrote:
>> [...]
>> My guess is that you need to enclose text strings in quotes, so that
>> your conditionals read:
>>
>>   \doloopif{\Flag}{~=}{"anl"}{\lineaction}
>>   \doloopif{\Flag}{==}{"anl"}{\lineaction}
> 
> Thanks for your reply. This code don’t work.  I would try your
> handlecsv module. I need to adapt my old .tex files.
I was wrong. Quotes aren’t required.

See minimal example (which works both with handlecsv and scancsv):

\usemodule[handlecsv]% scancsv works too
\opencsvfile{cities.csv}
\starttext
\startbuffer
    This is located in Germany: \cA\par
\stopbuffer
\section{Cities in Germany}
\doloopif{\cB}{==}{Germany}{\getbuffer}
\section{Cities not in Germany}
\doloopif{\cB}{~=}{Germany}{\getbuffer}
\stoptext

Contents from "cities.csv" read:

"Berlin";"Germany"
"Paris";"France"
"London";"UK"
"New York";"USA"
"Munich";"Germany"
"Lisbon";"Portugal"
"Dublin";"Ireland"
"Warsaw";"Poland"
"Vienna";"Austria"
"Barcelona";"Spain"

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] list of figures

2018-09-14 Thread Andrea Valle
Thanks to all, yes, \placelistoffigures works fine

Concerning structure: yeah, thanks Alan, I used it. I think I had some issues I 
was not able to solve so switched to raw input.

Best

-a-


--
Andrea Valle
--
CIRMA - StudiUm
Università degli Studi di Torino
--> http://www.cirma.unito.it/andrea/
--> http://www.fonurgia.unito.it/andrea/
--> http://www.flickr.com/photos/vanderaalle/sets/
--> http://vimeo.com/vanderaalle
--> http://andreavalle.bandcamp.com
--> andrea.va...@unito.it
--

"This is a very complicated case, Maude. You know, a lotta ins, a lotta outs, a 
lotta what-have-yous." 
(Jeffrey 'The Dude' Lebowski)

> On 14 Sep 2018, at 14:40, Alan Braslau  wrote:
> 
> On Fri, 14 Sep 2018 11:20:27 +0200
> Andrea Valle  wrote:
> 
>> Thanks Henri
>> 
>> actually this works in my chapter but I have a book made up of various 
>> chapters coordinate by a main.tex file 
>> containing general setting and  e.g.
>> 
>> \input c_1_semiotics.tex % chapter
>> 
>> \input c_2_conceptions.tex
>> 
>> etc
> 
> The ConTeXt way of doing this is:
> 
> \component c_1_semiotics
> 
> \component c_2_conceptions
> 
> also putting
> 
> \startcomponent c_1_semiotics
> ...
> \stopcomponent
> 
> at the beginning and end in each component file.
> 
> This project/product scheme is handled more coherently than a raw \input. 
> Note, however, that this has nothing to do directly with the question about 
> generating a list of figures; as already answered 
> \placelistoffigures[criterium=chapter], for example, gives a list of figures 
> limited to the present chapter. One can also use criterium=part, section, 
> etc. as well as criterium=all.
> 
> Alan
> 

___
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] list of figures

2018-09-14 Thread Alan Braslau
On Fri, 14 Sep 2018 11:20:27 +0200
Andrea Valle  wrote:

> Thanks Henri
> 
> actually this works in my chapter but I have a book made up of various 
> chapters coordinate by a main.tex file 
> containing general setting and  e.g.
> 
> \input c_1_semiotics.tex % chapter
> 
> \input c_2_conceptions.tex
> 
> etc

The ConTeXt way of doing this is:

\component c_1_semiotics

\component c_2_conceptions

also putting

\startcomponent c_1_semiotics
...
\stopcomponent

at the beginning and end in each component file.

This project/product scheme is handled more coherently than a raw \input. Note, 
however, that this has nothing to do directly with the question about 
generating a list of figures; as already answered 
\placelistoffigures[criterium=chapter], for example, gives a list of figures 
limited to the present chapter. One can also use criterium=part, section, etc. 
as well as criterium=all.

Alan

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

2018-09-07 Thread Procházka Lukáš Ing .

Hello,

due to great TextAdept (TA) [1] extendibility, I'd like to try to program a TA add-on 
which would provide a ConTeXt source "browser".

The idea is to create an independent window in the TA which will show the 
current document structure, or even the project structure, and provide some 
click-in-browser-go-to-source functionality.

Suppose having a source file with the following content (line numbers in (...) 
just for referring):

---- a.tex
(1) \section{Sec}
(2)
(3) Hello
(4)
(5)  \subsection{Subsec}
(6)
(7)  Word


The "browser" should display this:


Sec (section)
Subsec (subsection)


After some investigation and some questioning in TA mailing list, it seem that 
"tatoolbar" [2] might bu useful for this purpose.

Unfortunately, there is an initial problem: the tatoolbar is not pre-compiled 
for Windows [3] and compilation under Windows is not so easy (I tried with 
GnuWin32 and MinGW installed on my WinX computer); getting Win bins is done by 
cross compiling under Linux.

Is there someone here - who is familiar with Linux - who could compile 
tatoolbar first - and provide it for trying to write the source browser?

Thank you in advance.

Best regards,

Lukas

[1] https://foicica.com/textadept/
[2] https://github.com/gabdub/ta-tweaks/wiki/tatoolbar
[3] https://foicica.com/textadept/manual.html#Compiling


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

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

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

Re: [NTG-context] How to cite online websites (reloaded)

2018-09-03 Thread cryo shock
This is my file .tex file now:

\usemodule[bib]
\usemodule[bibltx]
\setupbibtex[database=sample]
\setuppublications[numbering=yes]

\starttext
As \cite[hh2010] already indicated...

\completepublications
\stoptext

In the same folder is my sample.bib, which I copied from the CTX
distribution. Example:

@ELECTRONIC{hh2010,
  author = hh,
  year = {2010},
  title = {Metafun. \CONTEXT\ mkiv},
  url = {http://www.pragma-ade.nl/general/manuals/metafun-s.pdf},
}

This is the output from the PDF-file:

*As [[error 2]] already indicated...*

The output in the placelist section (no entries):

*1 References*

I don't see what I am doing wrong. This is how I updated CTX:

first-setup -engine=luatex -modules=all -fonts=all

to version *2018.09.01 23:10*

Thanks for help in advance, Lars.


Am Mo., 3. Sep. 2018 um 07:47 Uhr schrieb Alan Braslau <
braslau.l...@comcast.net>:

> \usemodule[bib]
> \usemodule[bibltx]
> \setupbibtex[database=sample]
>
> > On 3 Sep 2018, at 01:43, Lars  wrote:
> >
> > Hi Alan,
> > I don't understand. What is it that makes my code mkii?
> >
> > \usebtxdataset[default][My_file.bib]
> > \usebtxdefinitions[aps]
> > \setupbtxlist[aps][
> >   %alternative=,
> >   width=fit,
> >   distance=.5em,
> >   %distance=0pt,
> >   margin=0em,
> > ]
> >
> > \starttext
> >   Hallo Welt! \cite[lnkHWelt]
> >
> >   \startappendices
> > \startsection[title={Pubs},marking={}]
> >   \placelistofpublications[method=dataset]
> > \stopsection
> >   \stopappendices
> > \stoptext
> > And that's in My_file.bib:
> >
> > @Misc{lnkHWelt,
> >   Note = "zuletzt abgerufen am 5. Aug. 2018",
> >   Url = "http://wiki.contextgarden.net";
> > }
> >
> > What would be the mkiv way?
> >
> > Thanks in advance, Lars.
> >
> >
> > Am 02/09/2018 um 23:56 schrieb Alan Braslau:
> >> You are using the old mkii BibTeX module, not the bibliography database
> system that is part of the mkiv core.
> >>
> >> Alan
> >>
> >>
> >>
> >
> ___
> > 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
>
> ___
___
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] The definitive guide to ConTeXt MkIV documentation

2018-09-02 Thread Arthur Reutenauer
On Sun, Sep 02, 2018 at 06:12:49PM +1200, Henri Menke wrote:
> I was thinking about posting it on the Wiki as well but decided not to
> because it is way too opinionated and reflects purely my experiences.

  That’s legitimate, but I think it’s still useful to have that
information on the wiki, so I added a link at the bottom of the section
“Tips and Tricks” on the home page.  Improvements and suggestion
welcome.

  By the way, I don’t find your write-up particularly opinionated; on
the contrary, I think the description is pretty objective.  You’re right
to pinpoint that the main issue with documentation is the relative lack
of beginners’ guides, not the quality and quantity of documentation
overall.

Best,

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

2018-08-30 Thread Wolfgang Schuster



Willi Egger schrieb am 30.08.18 um 11:18:

Hello,

I am busy to typeset a book with Maguntia.ttf.

I should prepare the TOC with leaders. However how can I get ConTeXT 
to use the same leader-size on all levels which need leaders? As in 
the given example the leaders are adapted to the size of the font.


\setuplist[...][textstyle=...]

Secondly I would like to have the page numbers all in the same size, 
irrespective from the level.
Thirdly, I would love to adapt the distance between the leader-dots to 
a bigger size. How to do that?


Create your own leaders setup with the \definefiller command.


\setuplist
  [chapter,section,subsection]
  [alternative=c]

\setuplist
  [chapter]
  [textstyle=\tfa]

\setuplist
  [subsection]
  [textstyle=\tfx]

\definefiller
  [willi]
  [method=global,
   width=1em]

\setuplistalternative
  [c]
  [filler=willi]

\starttext

\completecontent

\chapter{Chapter}

\section{Section}

\subsection{Subsection}

\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] unwanted page break in contents

2018-08-26 Thread Jeong Dal
Dear Wolfgang,

> 
> \setuplist
>  [section]
>  [width=10mm,
>   style=,
>   textstyle=\ss,
>   after={\blank[preference]}]

It works perfectly.

Thank you so much.

Best regards,

Dalyoung

___
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] unwanted page break in contents

2018-08-26 Thread Wolfgang Schuster



Jeong Dal schrieb am 26.08.18 um 10:06:

Hi,

In the table of contents, there is a unwanted blank space after chapter 2.
There is a page break if the remaining space is not enough to cover the list of 
the next chapter.
For example, page break after ch 2. in the following example.

Is it possible to list them continuously?

Best regards,

Dalyoung


\starttext
\definepagebreak[emptyodd][yes,header, footer, odd]
\setuphead[chapter][page=emptyodd]

\setuphead[title][incrementnumber=list]
\setupcombinedlist[content][list={title,chapter,section,subsection}]
\setuplist[chapter, title][width=5mm, style=,textcommand={\ss\bf }]
\setuplist[section][width=10mm, style=,textcommand={\ss }]


\setuplist
  [section]
  [width=10mm,
   style=,
   textstyle=\ss,
   after={\blank[preference]}]

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] unwanted page break in contents

2018-08-26 Thread Jeong Dal
Hi,

In the table of contents, there is a unwanted blank space after chapter 2.
There is a page break if the remaining space is not enough to cover the list of 
the next chapter.
For example, page break after ch 2. in the following example.

Is it possible to list them continuously?

Best regards,

Dalyoung


\starttext
\definepagebreak[emptyodd][yes,header, footer, odd]
\setuphead[chapter][page=emptyodd]

\setuphead[title][incrementnumber=list]
\setupcombinedlist[content][list={title,chapter,section,subsection}]
\setuplist[chapter, title][width=5mm, style=,textcommand={\ss\bf }]
\setuplist[section][width=10mm, style=,textcommand={\ss }]

\showframe
\startfrontmatter
\completecontent
\page[empty]
\stopfrontmatter

\startbodymatter
\dorecurse{9}
{\chapter{Ch \recurselevel}
\dorecurse{8}
{\section{Section \recurselevel}}
}   
\stopbodymatter
\stoptext

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

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

[NTG-context] Spurious breaks in export when blank line ends paragraph

2018-08-21 Thread Rik Kabel

List,

My understanding of start/stop macros such as 
\startparagraph...\stopparagraph has been that blank lines are allowed 
between the block of text and the macros, as


   \startparagraph

   This is the text of the paragraph

   \stopparagraph

However, in xml exports the blank line before \stopparagraph leads to 
spurious break elements in some circumstances, as shown in the following:


   \setupbackend [export=yes,xhtml=yes]
   \starttext
   \startsection[title=trailing blank line]
   \startparagraph
  Xxx xxx xx x xx xxx  xx xx
  xx. Xxx  x, \inleft{z} x  xx x
  xx  x xx xxx  xx x, xxx   xx
  xxx xxx xxx xx  xxx  xx Xxxx , xxx
    x xx  x xx . Xxx x
  xxx xxx xxx xx xx   xxx,x
  xx x xx,  xxx xxx xxx x . Xxxx xxx
  xx xx xxx xxx ,    xxx x xx
  x x, xxx xxx x xxx xxx xx xx xx
  \inleft{zz}. Xxxx  x xx   (x, xxx,
  xx xxx xx).

   \stopparagraph

   \stopsection

   \startsection[title=no blank line]

   \startparagraph
  Xxx xxx xx x xx xxx  xx xx
  xx. Xxx  x, \inleft{z} x  xx x
  xx  x xx xxx  xx x, xxx   xx
  xxx xxx xxx xx  xxx  xx Xxxx , xxx
    x xx  x xx . Xxx x
  xxx xxx xxx xx xx   xxx,x
  xx x xx,  xxx xxx xxx x . Xxxx xxx
  xx xx xxx xxx ,    xxx x xx
  x x, xxx xxx x xxx xxx xx xx xx
  \inleft{zz}. Xxxx  x xx   (x, xxx,
  xx xxx xx).
   \stopparagraph

   \stopsection

   \startsection[title=Another section]

   \startparagraph

  This is here to show the bottom of the previous section.

   \stopparagraph

   \stopsection

   \stoptext

Note that the pdf output does not display the problem, but the pdf 
output is not why one runs an export. The breaks disappear in shorter 
paragraphs, and disappear when the margintext is not present, but appear 
when margintext is present and the paragraph exceeds some length which I 
have not worked to determine.


Is my understanding of the space rules incorrect, or is this a bug?

Since some breaks perhaps should be present, it is difficult to remove 
these with CSS, or XSLT. One thing that might help is to add a class 
identifier to breaks indicating what lead to their creation. Of course, 
not generating these would be better still.


--

Rik

___
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] structures.lists.ordered empty in latest beta

2018-08-19 Thread Joseph Canedo
Latest beta fixes the issue. Thanks a lot.

Joseph

De : Wolfgang Schuster
Envoyé le :samedi 18 août 2018 18:30
À : Hans Hagen
Cc : Joseph Canedo; mailing list for ConTeXt users
Objet :Re: [NTG-context] structures.lists.ordered empty in latest beta



Hans Hagen schrieb am 18.08.18 um 15:22:
> On 8/18/2018 2:41 PM, Joseph Canedo wrote:
>> I see in pdf (created using MWE Wolfgang kindly provided and latest 
>> Context beta) page 2:
>>
>> Section 16 appears on page 1.
>>
>> Should read I think
>>
>> Section 16 appears on page 2.
>
> hm, not here, so question for wolfgang:
>
> can you run the test with
>
> \showmakeup[whatsit]
>
> and see if there are lateluas shown

The visualizer for section 16 appears one the first page but the section 
itself is moved to the second page.

Wolfgang


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

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

Re: [NTG-context] structures.lists.ordered empty in latest beta

2018-08-18 Thread Wolfgang Schuster



Hans Hagen schrieb am 18.08.18 um 15:22:

On 8/18/2018 2:41 PM, Joseph Canedo wrote:
I see in pdf (created using MWE Wolfgang kindly provided and latest 
Context beta) page 2:


Section 16 appears on page 1.

Should read I think

Section 16 appears on page 2.


hm, not here, so question for wolfgang:

can you run the test with

\showmakeup[whatsit]

and see if there are lateluas shown


The visualizer for section 16 appears one the first page but the section 
itself is moved to the second page.


Wolfgang

resolvers   > trees > analyzing 'home:texmf'

open source > level 1, order 1, name 
'/Users/wolf/context/beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2018.08.18 15:14 MKIV beta  fmt: 2018.8.18  
int: english/english
system  > 
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name 
'/Users/wolf/context/beta/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 
'/Users/wolf/context/beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'test', input './test', result 'test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/Users/wolf/Dropbox/tex/test/test.tex'
visualize   > enabled
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
structure   > sectioning > section @ level 3 : 0.0.1 -> Section 1
structure   > sectioning > section @ level 3 : 0.0.2 -> Section 2
structure   > sectioning > section @ level 3 : 0.0.3 -> Section 3
structure   > sectioning > section @ level 3 : 0.0.4 -> Section 4
structure   > sectioning > section @ level 3 : 0.0.5 -> Section 5
structure   > sectioning > section @ level 3 : 0.0.6 -> Section 6
structure   > sectioning > section @ level 3 : 0.0.7 -> Section 7
structure   > sectioning > section @ level 3 : 0.0.8 -> Section 8
structure   > sectioning > section @ level 3 : 0.0.9 -> Section 9
structure   > sectioning > section @ level 3 : 0.0.10 -> Section 10
structure   > sectioning > section @ level 3 : 0.0.11 -> Section 11
structure   > sectioning > section @ level 3 : 0.0.12 -> Section 12
structure   > sectioning > section @ level 3 : 0.0.13 -> Section 13
structure   > sectioning > section @ level 3 : 0.0.14 -> Section 14
structure   > sectioning > section @ level 3 : 0.0.15 -> Section 15
structure   > sectioning > section @ level 3 : 0.0.16 -> Section 16
structure   > sectioning > section @ level 3 : 0.0.17 -> Section 17
structure   > sectioning > section @ level 3 : 0.0.18 -> Section 18
structure   > sectioning > section @ level 3 : 0.0.19 -> Section 19
backend > xmp > using file 
'/Users/wolf/context/beta/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
structure   > sectioning > section @ level 3 : 0.0.20 -> Section 20
pages   > flushing realpage 2, userpage 2
close source> level 2, order 3, name '/Users/wolf/Dropbox/tex/test/test.tex'
close source> level 1, order 3, name 
'/Users/wolf/context/beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'

system  > start used files

system  > text: test

system  > stop used files


system  > start used files

system  >1: filename=char-prv.lua filetype=tex format=tex 
foundname=/Users/wolf/context/beta/tex/texmf-context/tex/context/base/mkiv/char-prv.lua
 
fullname=/Users/wolf/context/beta/tex/texmf-context/tex/context/base/mkiv/char-prv.lua
 usedmethod=database
system  >2: filename=cont-yes.mkiv filetype=tex 
foundname=/Users/wolf/context/beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv
 
fullname=/Users/wolf/context/beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv
 usedmethod=database
system  >3: filename=publ-imp-default.lua filetype=scripts 
foundname=/Users/wolf/context/beta/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua
 
fullname=/Users/wolf/context/beta/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua
 usedmethod=database
system  >4: filename=cont-new.mkiv filetype=tex 
foundname=/Users/wolf/context/beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv
 
fullname=/Users/wolf/context/beta/tex/t

Re: [NTG-context] structures.lists.ordered empty in latest beta

2018-08-18 Thread Hans Hagen

On 8/18/2018 2:41 PM, Joseph Canedo wrote:
I see in pdf (created using MWE Wolfgang kindly provided and latest 
Context beta) page 2:


Section 16 appears on page 1.

Should read I think

Section 16 appears on page 2.


hm, not here, so question for wolfgang:

can you run the test with

\showmakeup[whatsit]

and see if there are lateluas shown

(beta on ftp)



Joseph

*De : *Hans Hagen <mailto:j.ha...@xs4all.nl>
*Envoyé le :*samedi 18 août 2018 13:48
*À : *mailing list for ConTeXt users <mailto:ntg-context@ntg.nl>; 
Wolfgang Schuster <mailto:wolfgang.schuster.li...@gmail.com>; Joseph 
Canedo <mailto:josephcan...@gmail.com>

*Objet :*Re: [NTG-context] structures.lists.ordered empty in latest beta

On 8/18/2018 10:11 AM, Wolfgang Schuster wrote:

 > Here is your minimal example.

 >

 >

 > \starttext

 >

 > \dorecurse{20}{\section[sec:#1]{Section #1}}

 >

 > Section \in[sec:16] appears on page \at[sec:16].

 >

 > Section \in[sec:17] appears on page \at[sec:17].

 >

 > \stoptext

Goes ok here.

-

    Hans Hagen | PRAGMA ADE

    Ridderstraat 27 | 8061 GH Hasselt | The Netherlands

     tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl

-




--

-
  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] structures.lists.ordered empty in latest beta

2018-08-18 Thread Joseph Canedo
I see in pdf (created using MWE Wolfgang kindly provided and latest Context 
beta) page 2:

Section 16 appears on page 1.

Should read I think

Section 16 appears on page 2.

Joseph

De : Hans Hagen
Envoyé le :samedi 18 août 2018 13:48
À : mailing list for ConTeXt users; Wolfgang Schuster; Joseph Canedo
Objet :Re: [NTG-context] structures.lists.ordered empty in latest beta

On 8/18/2018 10:11 AM, Wolfgang Schuster wrote:
> Here is your minimal example.
> 
> 
> \starttext
> 
> \dorecurse{20}{\section[sec:#1]{Section #1}}
> 
> Section \in[sec:16] appears on page \at[sec:16].
> 
> Section \in[sec:17] appears on page \at[sec:17].
> 
> \stoptext
Goes ok here.

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-



test_section_page.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] structures.lists.ordered empty in latest beta

2018-08-18 Thread Hans Hagen

On 8/18/2018 10:11 AM, Wolfgang Schuster wrote:

Here is your minimal example.


\starttext

\dorecurse{20}{\section[sec:#1]{Section #1}}

Section \in[sec:16] appears on page \at[sec:16].

Section \in[sec:17] appears on page \at[sec:17].

\stoptext

Goes ok here.

-
  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] structures.lists.ordered empty in latest beta

2018-08-18 Thread Wolfgang Schuster

Here is your minimal example.


\starttext

\dorecurse{20}{\section[sec:#1]{Section #1}}

Section \in[sec:16] appears on page \at[sec:16].

Section \in[sec:17] appears on page \at[sec:17].

\stoptext


Wolfgang


Joseph Canedo schrieb am 17.08.18 um 23:08:


The latelua functions seems fixed with 2018-08-16 beta but in some 
occurrences the realpage information for some sections is wrong, being 
set to page before the actual page the section title appears in pdf. 
This seems to happen when the title of section is first at top of page.


If needed I can try working on a MWE.

Thanks

Joseph

From .tuc file.

{

  ["metadata"]=129,

["numberdata"]=133,

  ["references"]={

   ["block"]="bodypart",

["internal"]=5,

   ["realpage"]=3, -- this should be 4

   ["section"]=5,

   ["used"]="width",

  },

  ["titledata"]={

["bookmark"]="Chapitre .iiij.",

["label"]="subsection",

["marking"]="Chapitre",

   ["title"]="Chapitre \\LeftDot \\RM {4}.",

  },

  ["userdata"]={

["blank_after_chapter"]="none",

["blank_before_chapter"]="none",

  },

*De : *Joseph Canedo <mailto:josephcan...@gmail.com>
*Envoyé le :*mercredi 15 août 2018 23:46
*À : *mailing list for ConTeXt users <mailto:ntg-context@ntg.nl>
*Objet :*RE: [NTG-context] structures.lists.ordered empty in latest beta

I also noticed that (at least some) latelua functions do not seem 
called (They output stuff in the log and these are no longer present).


*De : *Hans Hagen <mailto:j.ha...@xs4all.nl>
*Envoyé le :*mercredi 15 août 2018 23:32
*À : *ntg-context@ntg.nl >> mailing list for ConTeXt users 
<mailto:ntg-context@ntg.nl>

*Objet :*Re: [NTG-context] structures.lists.ordered empty in latest beta

On 8/15/2018 10:37 PM, Joseph Canedo wrote:

> Hi,

>

> I use the global lua table ConTeXt provides called :

> structures.lists.ordered to perform some manipulations with sections

> (using structures.lists.ordered.section which is itself a lua table),

> but from latest beta it seems that that variable (a lua table) is now

> completely empty. Is this expected ?

afaik nothing changed

-

   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
___


___
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] structures.lists.ordered empty in latest beta

2018-08-17 Thread Joseph Canedo
The latelua functions seems fixed with 2018-08-16 beta but in some occurrences 
the realpage information for some sections is wrong, being set to page before 
the actual page the section title appears in pdf. This seems to happen when the 
title of section is first at top of page.
If needed I can try working on a MWE.
Thanks

Joseph

>From .tuc file.

{
  ["metadata"]=129,
  ["numberdata"]=133,
  ["references"]={
   ["block"]="bodypart",
   ["internal"]=5,
   ["realpage"]=3, -- this should be 4
   ["section"]=5,
   ["used"]="width",
  },
  ["titledata"]={
   ["bookmark"]="Chapitre .iiij.",
   ["label"]="subsection",
   ["marking"]="Chapitre",
   ["title"]="Chapitre \\LeftDot \\RM {4}.",
  },
  ["userdata"]={
   ["blank_after_chapter"]="none",
   ["blank_before_chapter"]="none",
  },

De : Joseph Canedo
Envoyé le :mercredi 15 août 2018 23:46
À : mailing list for ConTeXt users
Objet :RE: [NTG-context] structures.lists.ordered empty in latest beta

I also noticed that (at least some) latelua functions do not seem called (They 
output stuff in the log and these are no longer present).

De : Hans Hagen
Envoyé le :mercredi 15 août 2018 23:32
À : ntg-context@ntg.nl >> mailing list for ConTeXt users
Objet :Re: [NTG-context] structures.lists.ordered empty in latest beta

On 8/15/2018 10:37 PM, Joseph Canedo wrote:
> Hi,
> 
> I use the global lua table ConTeXt provides called : 
> structures.lists.ordered to perform some manipulations with sections 
> (using structures.lists.ordered.section which is itself a lua table), 
> but from latest beta it seems that that variable (a lua table) is now 
> completely empty. Is this expected ?
afaik nothing changed


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

[NTG-context] Using \dorecheckindentation inside a group

2018-08-10 Thread Aditya Mahajan

Hi,

In t-filter module, I use a group inside \startfilter ... \stopfilter to 
keep various definitions local. However, as reported on [1], this breaks 
the `indentnext` option. The following minimal example illustrates the 
issue:


\unprotect
\definenamespace
  [whatever]
  [
name=whatever,
command=yes,
setup=list,
parent=whatever,
  ]

\appendtoks
\setuevalue{\e!start\currentwhatever}{\start_whatever[\currentwhatever]}%
\setuvalue {\e!stop\currentwhatever}{\stop_whatever}%
\to \everydefinewhatever

\starttexdefinition start_whatever
\dodoubleargument\start_whatever_indeed
\stoptexdefinition

\starttexdefinition start_whatever_indeed[#1][#2]
  \begingroup % to keep assignments local
  \edef\currentwhatever{#1}
  \setupwhatever[#1][#2]
\stoptexdefinition

\starttexdefinition stop_whatever
  \useindentnextparameter\whateverparameter
  \dorechecknextindentation
  \endgroup
\stoptexdefinition

\protect

\definewhatever[whatever]

\setupindenting[big,yes]

\startbuffer
\input ward

\startwhatever
  \input tufte
\stopwhatever

\input ward
\stopbuffer

\starttext

\section{With indentnext=yes}
\setupwhatever[indentnext=yes]
\getbuffer

\section{with indentnext=no}
\setupwhatever[indentnext=no]
\getbuffer

\section{with indentnext=auto}
\setupwhatever[indentnext=auto]
\getbuffer

\stoptext

I use a \begingroup inside \start_whatever to keep the definitions local 
(otherwise \setupwhatever[#1][#2] will change the global setup). This 
means that I have to use \dorecheckindentation \endgroup. As a result, 
when I use `indentnext=auto`, the check for \par fails (see the third case 
in the above example).


How can I fix this?

Thanks,
Aditya

[1]: 
https://tex.stackexchange.com/questions/445198/context-break-paragraph-after-t-vim-code-block

___
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] referencing the equation

2018-08-09 Thread Henri Menke
I usually define my own reference formats, “ineq” for equations, “infig” 
for figures:


\definereferenceformat[ineq][left=(,right=)]
\definereferenceformat[infig][left=\labeltext{figure}]

\starttext

\starttext

\placeformula
\startformula \startalign
 \NC a_1 x + b_1 y \NC = c_1 \NR[eq:1]
 \NC a_2 x + b_2 y \NC = c_2 \NR[eq:2]
\stopalign \stopformula

As seen from \ineq[eq:1] and \ineq[eq:2], referring equations is 
straight forward.


\stoptext

\stoptext

On 10/08/18 10:00, Jeong Dal wrote:

Dear Wolfgang,

Although there is an answer in the manual, I didn’t read it carefully.

Sometimes, I used “\in{word}[reference]” like “\in{equation}[eq:1]".
But I have to change it to “equation (\in[eq:1])”.

Thank you so much.

Best regards,

Dalyoung


2018. 8. 10. 오전 12:21, Wolfgang Schuster  작성:

When you look at the first example in section 4.1 you can see that the 
parentheses are inserted by hand.

%%
\starttext

\placeformula
\startformula \startalign
  \NC a_1 x + b_1 y \NC = c_1 \NR[eq:1]
  \NC a_2 x + b_2 y \NC = c_2 \NR[eq:2]
\stopalign \stopformula

As seen from (\in[eq:1]) and (\in[eq:2]), referring equations is straight 
forward.

\stoptext
%%

Wolfgang



Jeong Dal schrieb am 09.08.18 um 17:12:

Dear,

The examples in mathalign.pdf(p4 - ) tells us the method of referencing the 
equation.
The numbers for the equation is written as (1.1), and in the text, it is 
written as (1.1).
That is the numbers are  always surrounded by ( , ).

In the output of the following code, the equations are numbered surrounded by 
().
But there is no (), when we referece it.

What is the difference between MWE and mathalign.pdf.

Thank you for reading.

Best regards,

Dalyoung

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


___
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] referencing the equation

2018-08-09 Thread Jeong Dal
Dear Wolfgang,

Although there is an answer in the manual, I didn’t read it carefully.

Sometimes, I used “\in{word}[reference]” like “\in{equation}[eq:1]". 
But I have to change it to “equation (\in[eq:1])”. 

Thank you so much.

Best regards,

Dalyoung

> 2018. 8. 10. 오전 12:21, Wolfgang Schuster  
> 작성:
> 
> When you look at the first example in section 4.1 you can see that the 
> parentheses are inserted by hand.
> 
> %%
> \starttext
> 
> \placeformula
> \startformula \startalign
>  \NC a_1 x + b_1 y \NC = c_1 \NR[eq:1]
>  \NC a_2 x + b_2 y \NC = c_2 \NR[eq:2]
> \stopalign \stopformula
> 
> As seen from (\in[eq:1]) and (\in[eq:2]), referring equations is straight 
> forward.
> 
> \stoptext
> %%
> 
> Wolfgang
> 
> 
> 
> Jeong Dal schrieb am 09.08.18 um 17:12:
>> Dear,
>> 
>> The examples in mathalign.pdf(p4 - ) tells us the method of referencing the 
>> equation.
>> The numbers for the equation is written as (1.1), and in the text, it is 
>> written as (1.1).
>> That is the numbers are  always surrounded by ( , ).
>> 
>> In the output of the following code, the equations are numbered surrounded 
>> by ().
>> But there is no (), when we referece it.
>> 
>> What is the difference between MWE and mathalign.pdf.
>> 
>> Thank you for reading.
>> 
>> Best regards,
>> 
>> Dalyoung
>> 
>> ___
>> 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] referencing the equation

2018-08-09 Thread Wolfgang Schuster
When you look at the first example in section 4.1 you can see that the 
parentheses are inserted by hand.


%%
\starttext

\placeformula
\startformula \startalign
  \NC a_1 x + b_1 y \NC = c_1 \NR[eq:1]
  \NC a_2 x + b_2 y \NC = c_2 \NR[eq:2]
\stopalign \stopformula

As seen from (\in[eq:1]) and (\in[eq:2]), referring equations is 
straight forward.


\stoptext
%%

Wolfgang



Jeong Dal schrieb am 09.08.18 um 17:12:

Dear,

The examples in mathalign.pdf(p4 - ) tells us the method of referencing the 
equation.
The numbers for the equation is written as (1.1), and in the text, it is 
written as (1.1).
That is the numbers are  always surrounded by ( , ).

In the output of the following code, the equations are numbered surrounded by 
().
But there is no (), when we referece it.

What is the difference between MWE and mathalign.pdf.

Thank you for reading.

Best regards,

Dalyoung

___
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] resetting footnote counter

2018-08-09 Thread Aditya Mahajan

On Thu, 9 Aug 2018, Robert Zydenbos wrote:

I have tried ‘\resetcounter [footnote]’ (a suggested solution on that 
web page), but it does not work (at least not in MkII+XeTeX). 
‘\setupcounter [footnote] [0]’ (also suggested on that web page) is 
rejected as an error.


Can you post a minimal example. Because the following works in MKII 
(counter reset at each chapter)


\setupfootnotes[way=bychapter]

\starttext
\dorecurse{5}
{\chapter{New Chapter}
  \dorecurse{5}{\input ward\footnote{A quote by ward}}}
\stoptext

The following also works with the counter reset at each section:

\setupfootnotes[way=bysection]

\starttext
\dorecurse{5}
{\section{New Chapter}
  \dorecurse{5}{\input ward\footnote{A quote by ward}}}
\stoptext


and the following works with the footnote reset at each page:

\setupfootnotes[way=bypage]

\starttext
\dorecurse{5}
{\section{New Chapter}
  \dorecurse{5}{\input ward\footnote{A quote by ward}}}
\stoptext

All examples were run using:

ConTeXt  ver: 2018.04.04 00:51 MKII  fmt: 2018.7.3  int: english/english

and the documents were compiled using

texexec --xetex filename

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

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

Re: [NTG-context] general suggestion for ConTeXt documentation

2018-08-09 Thread Robert Zydenbos
> On 8. Aug 2018, at 17:28, Pablo Rodriguez  wrote:
> 
> Hi Robert,
> 
> […] I might be totally missing your point here, but it seems to me that you
> try to know what can be achieved in general with ConTeXt, even before to
> learn how to use ConTeXt for your typesetting needs.

Not really. My requirements are rather dull and limited. I was attracted to 
ConTeXt for its simplicity in changing paper formats, in changing the formats 
of headings (section, subsection etc.), the ease with which index entries can 
be formatted, and above all for its beautiful table possibilities. The book I 
am working on is full of tables in various formats and lengths.

That (and the footnotes :-) ) covers just about all my typesetting needs. I had 
already prepared numerous smaller documents as practice before I started to 
process the book with ConTeXt, was delighted with the results, and so I thought 
that I could manage the book too (before the end of this month…).

Robert
___
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] question regarding \placefloats

2018-08-08 Thread Susanne G. Loeber
Dear Reader,

I have a document with figures and tables. I have tried to use the command
  \placefloats to create a list of all my floats as recommended on the page
Floating Objects, section Flushing floats. There it states: The command
\placefloats outputs all pending floats. I hoped to get a list with all
tables, all figures and all other possible floats.That list would either be
sorted per chapter or sorted per float. However, I was not able to make it
work at all.

In the appendix, you can find my struggles.
First:
\placefloats does not work.

\placelistoffloats does not exist as a command

My solution is two seperate commands, one for the tables \placelistoftables
and one for the figures \completelistoffigures.

Question: how to use \placefloats correctly to get a list of all floats?


Second:

\startcombination[1*2] looks nice, but does not add information to the
\placelistoffigures .

My solution is to place the \startcombination inside a \placefigure.

Question: Is there a better way?


Kind regards, thanks,

Susanne


placefloat.tex
Description: Binary data
___
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] Footnotes in titles, 3 years old file compiles now different

2018-08-07 Thread Lutz Haseloff
Hi Huseyin,
i tried your line of code with recent ConTeXt and luatex and i think it worked 
fine.
See attached files.

Greetings Lutz

Am 7. August 2018 08:29:10 MESZ schrieb "Huseyin Özoguz" :
>I forget: I use now luatex beta 0.80.0 (and Context from 2015.04.15), 
>but the old pdf was compiled with luatex 0.77.0, is that the
>difference, 
>which deleted the footnote?
>
>(I hope this does not break the threadnever learned how to use 
>mail-lists with thunderbird)
>
>___
>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
>___


titlefootnote.pdf
Description: Adobe PDF document
\starttext
\section{title\footnote{ftn-content}}
\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] Footnotes in titles, 3 years old file compiles now different

2018-08-06 Thread Huseyin Özoguz

Hello together,

I have a file from 2015, which contains something like this:

\section{title\footnote{ftn-content}}

And the compiled pdf from then show the footnote correct and with the 
number in order to the other footnotes.


But now I have compiled it again without differences, and the footnote 
disappears. I have read about this and basically it says that apart from 
local footnotes its not possible anymore (?) to set footnotes in titles 
(s.t. the numbers stay in order to all the other footnotes).


What changed since 2015? That is a problem for me because I have to 
compile a book from then to print it again (with minor other corrections 
in the text, but nothing in style). How to achieve the same result like 
back then?


Thank you!
Huseyin

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

2018-07-29 Thread Henning Hraban Ramm
Hello again,
I’m trying xtables for the first time.

Is it possible to setup defined rows/columns like with natural tables, e.g. for 
a header, like in my example?
The commented lines below are wrong. Is there another way?


\definextable[headtable] % table with repeated head

\setupxtable[headtable][
  option={stretch,width},
  frame=off,
  split=repeat,
  header=repeat,
]

% like in natural tables - doesn’t work...
%\setupxtable[headtable][r][first][topframe=on,before={\blank[small]}]
%\setupxtable[headtable][r][1][topframe=on,bottomframe=on,style={\ss\bf}]
%\setupxtable[headtable][r][last][bottomframe=on]

\starttext

\startxtable[headtable]
\startxtablehead
\startxrow
\startxcell Level \stopxcell\startxcell numbered \stopxcell\startxcell 
unnumbered \stopxcell
\stopxrow
\stopxtablehead
\startxtablebody
\startxrow\startxcell 0\stopxcell\startxcell part\stopxcell\startxcell 
—\stopxcell\stopxrow
\startxrow\startxcell 1\stopxcell\startxcell chapter\stopxcell\startxcell 
title\stopxcell\stopxrow
\startxrow\startxcell 2\stopxcell\startxcell section\stopxcell\startxcell 
subject\stopxcell\stopxrow
\startxrow\startxcell 3\stopxcell\startxcell subsection\stopxcell\startxcell 
subsubject\stopxcell\stopxrow
\startxrow\startxcell 4\stopxcell\startxcell subsubsection\stopxcell\startxcell 
subsubsubject\stopxcell\stopxrow
\stopxtablebody
\stopxtable

\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] TABLE setups

2018-07-29 Thread Hans Hagen

On 7/28/2018 11:09 AM, Henning Hraban Ramm wrote:


Meanwhile I had a look into the manuals folder and found the xtables manual.
Section 5 about \definextable and \starttexdefinition is especially interesting.
I guess I need to try both.

(My ConTeXt fu is always outdated, it seems...)
not much has changed in TABLE in years so once you're up to date in that 
domain you're probbably ok for years to come (typically a mechanism that 
cannot change much as it's used in xml processing a lot which means 
fully unattended usage)


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] TABLE setups

2018-07-28 Thread Henning Hraban Ramm
Am 2018-07-28 um 03:35 schrieb Henri Menke :

> On 07/28/2018 07:38 AM, Henning Hraban Ramm wrote:
>> Ahoi,
>> 
>> I need a few different table styles and don’t think it makes sense to setup 
>> them every single time.
>> 
>> Is there a \defineTABLE[mystyle], and then \setupTABLE[mystyle][...] ?
>> 
>> Or can I go via setups like \bTABLE[setups=mystyle] ?
> 
> \startsetups mystyle
>  \setupTABLE[frame=off]
>  \setupTABLE[row][first][topframe=on,bottomframe=on,style=bold]
>  \setupTABLE[row][last] [bottomframe=on]
> \stopsetups
> \starttext
> 
> \bTABLE[setups=mystyle]

Thank you, that was what I wanted to know. A one-line answer would have been 
enough ;)

Sorry, I was just too busy with other TeX issues to simply try it.

Meanwhile I had a look into the manuals folder and found the xtables manual.
Section 5 about \definextable and \starttexdefinition is especially interesting.
I guess I need to try both.

(My ConTeXt fu is always outdated, it seems...)

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] Set up a theorem style

2018-07-26 Thread Fabrice Couvreur
Hello,
Perhaps the key proposed by Wolfgang is what I want to do : put a dash
between the numbering and the text

\setupenumerations[
   before={\blank},
   after={\blank},
   text=Théorème ,
   alternative=serried,
   headstyle={\sc},
   prefix=yes,
   prefixsegments=chapter,
   way=bysection,
   *numberstopper={. ---},*
   style=italic,

]

\defineenumeration[theorem]

Fabrice


2018-07-25 12:15 GMT+02:00 Fabrice Couvreur :

> Hello,
> I used LaTeX for a long time before converting (with difficulty !) to
> ConteXt. For example, to define my new theorems, I used the amsthm
> package and I did this :
>
> \newtheoremstyle{theoremdd}% name of the style to be used
>   {\topsep}% measure of space to leave above the theorem. E.g.: 3pt
>   {\topsep}% measure of space to leave below the theorem. E.g.: 3pt
>   {\itshape}% name of font to use in the body of the theorem
>   {0pt}% measure of space to indent
>   {\bfseries}% name of head font
>  * {. ---}% punctuation between head and body*
>   { }% space after theorem head; " " = normal interword space
>   {\thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}}
>
> \theoremstyle{theoremdd}
> \newtheorem{thmd}{Theorem}[section]
>
>
>
> I'm trying to do the same thing with ConTeXt but I can not do it
> completely :
>
> \setupenumerations[
>before={\blank},
>after={\blank},
>text=Théorème,
>alternative=serried,
>title=no,
>prefix=yes,
>prefixsegments=chapter,
>way=bysection,
>right=.,
>titlestyle=bold,
>style=italic,
>width=broad,
>
> ]
>
> \defineenumeration[theorem]
>
>
> \starttext
>
> \startchapter[title={First Chapter}]
> \startsection[title={First Section}]
>   \dorecurse{2}{
>     \starttheorem
>   \input ward
> \stoptheorem}
> \stopsection
> \stopchapter
>
> \startchapter[title={Second Chapter}]
> \startsection[title={Second Section}]
> \dorecurse{2}{
> \starttheorem
>   \input ward
> \stoptheorem}
> \stopsection
> \stopchapter
>
> \stoptext
>
> Thanks
> Fabrice
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Set up a theorem style

2018-07-25 Thread Aditya Mahajan

On Wed, 25 Jul 2018, Fabrice Couvreur wrote:


Hello,
I used LaTeX for a long time before converting (with difficulty !) to
ConteXt. For example, to define my new theorems, I used the amsthm package
and I did this :

\newtheoremstyle{theoremdd}% name of the style to be used
 {\topsep}% measure of space to leave above the theorem. E.g.: 3pt
 {\topsep}% measure of space to leave below the theorem. E.g.: 3pt
 {\itshape}% name of font to use in the body of the theorem
 {0pt}% measure of space to indent
 {\bfseries}% name of head font
* {. ---}% punctuation between head and body*
 { }% space after theorem head; " " = normal interword space
 {\thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}}

\theoremstyle{theoremdd}
\newtheorem{thmd}{Theorem}[section]



I'm trying to do the same thing with ConTeXt but I can not do it completely
:


What are you missing?

Aditya


\setupenumerations[
  before={\blank},
  after={\blank},
  text=Théorème,
  alternative=serried,
  title=no,
  prefix=yes,
  prefixsegments=chapter,
  way=bysection,
  right=.,
  titlestyle=bold,
  style=italic,
  width=broad,

]

\defineenumeration[theorem]


\starttext

\startchapter[title={First Chapter}]
\startsection[title={First Section}]
 \dorecurse{2}{
   \starttheorem
 \input ward
   \stoptheorem}
\stopsection
\stopchapter

\startchapter[title={Second Chapter}]
\startsection[title={Second Section}]
\dorecurse{2}{
   \starttheorem
 \input ward
   \stoptheorem}
\stopsection
\stopchapter

\stoptext

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

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

[NTG-context] Set up a theorem style

2018-07-25 Thread Fabrice Couvreur
Hello,
I used LaTeX for a long time before converting (with difficulty !) to
ConteXt. For example, to define my new theorems, I used the amsthm package
and I did this :

\newtheoremstyle{theoremdd}% name of the style to be used
  {\topsep}% measure of space to leave above the theorem. E.g.: 3pt
  {\topsep}% measure of space to leave below the theorem. E.g.: 3pt
  {\itshape}% name of font to use in the body of the theorem
  {0pt}% measure of space to indent
  {\bfseries}% name of head font
 * {. ---}% punctuation between head and body*
  { }% space after theorem head; " " = normal interword space
  {\thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}}

\theoremstyle{theoremdd}
\newtheorem{thmd}{Theorem}[section]



I'm trying to do the same thing with ConTeXt but I can not do it completely
:

\setupenumerations[
   before={\blank},
   after={\blank},
   text=Théorème,
   alternative=serried,
   title=no,
   prefix=yes,
   prefixsegments=chapter,
   way=bysection,
   right=.,
   titlestyle=bold,
   style=italic,
   width=broad,

]

\defineenumeration[theorem]


\starttext

\startchapter[title={First Chapter}]
\startsection[title={First Section}]
  \dorecurse{2}{
\starttheorem
  \input ward
\stoptheorem}
\stopsection
\stopchapter

\startchapter[title={Second Chapter}]
\startsection[title={Second Section}]
\dorecurse{2}{
\starttheorem
  \input ward
\stoptheorem}
\stopsection
\stopchapter

\stoptext

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

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

[NTG-context] SHA512 for LuaTeX-5.2

2018-07-22 Thread Pablo Rodriguez
Dear list,

I have the following sample (adapted from
https://stackoverflow.com/q/50442185):

✂️
\starttext
\startlua
--
-- UTILITY FUNCTIONS
--
-- transform a string of bytes in a string of hexadecimal digits
local function str2hexa (s)
local h = string.gsub(s, ".", function(c)
return string.format("%02x", string.byte(c))
end)
return h
end

-- transforms number 'l' into a big-endian sequence of 'n' bytes
--(coded as a string)
local function num2string(l, n)
local s = ""
for i = 1, n do
--most significant byte of l
local remainder = l % 256
s = string.char(remainder) .. s
--remove from l the bits we have already transformed
l = (l-remainder) / 256
end
return s
end

-- transform the big-endian sequence of eight bytes starting at
-- index 'i' in 's' into a number
local function s264num (s, i)
local n = 0
for i = i, i + 7 do
    n = n*256 + string.byte(s, i)
end
return n
end

--
-- MAIN SECTION
--

-- FIRST STEP: INITIALIZE HASH VALUES
--(second 32 bits of the fractional parts of the square roots of the
first 9th through 16th primes 23..53)

local HH = {}

local function initH512(H)
H = {0x6a09e667f3bcc908, 0xbb67ae8584caa73b, 0x3c6ef372fe94f82b,
0xa54ff53a5f1d36f1, 0x510e527fade682d1, 0x9b05688c2b3e6c1f,
0x1f83d9abfb41bd6b, 0x5be0cd19137e2179}
return H
end

-- SECOND STEP: INITIALIZE ROUND CONSTANTS
--(first 80 bits of the fractional parts of the cube roots of the first
80 primes 2..409)

local k = {
0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f,
0xe9b5dba58189dbbc, 0x3956c25bf348b538,
0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118,
0xd807aa98a3030242, 0x12835b0145706fbe,
0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2, 0x72be5d74f27b896f,
0x80deb1fe3b1696b1, 0x9bdc06a725c71235,
0xc19bf174cf692694, 0xe49b69c19ef14ad2, 0xefbe4786384f25e3,
0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65,
0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4,
0x76f988da831153b5, 0x983e5152ee66dfab,
0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4,
0xc6e00bf33da88fc2, 0xd5a79147930aa725,
0x06ca6351e003826f, 0x142929670a0e6e70, 0x27b70a8546d22ffc,
0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed,
0x53380d139d95b3df, 0x650a73548baf63de, 0x766a0abb3c77b2a8,
0x81c2c92e47edaee6, 0x92722c851482353b,
0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791,
0xc76c51a30654be30, 0xd192e819d6ef5218,
0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8,
0x19a4c116b8d2d0c8, 0x1e376c085141ab53,
0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8, 0x391c0cb3c5c95a63,
0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373,
0x682e6ff3d6b2b8a3, 0x748f82ee5defb2fc, 0x78a5636f43172f60,
0x84c87814a1f0ab72, 0x8cc702081a6439ec,
0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915,
0xc67178f2e372532b, 0xca273eceea26619c,
0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178,
0x06f067aa72176fba, 0x0a637dc5a2c898a6,
0x113f9804bef90dae, 0x1b710b35131c471b, 0x28db77f523047d84,
0x32caab7b40c72493, 0x3c9ebe0a15c9bebc,
0x431d67c49c100d4c, 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a,
0x5fcb6fab3ad6faec, 0x6c44198c4a475817
}

-- THIRD STEP: PRE-PROCESSING (padding)

local function preprocess(toProcess, len)
--append a single '1' bit
--append K '0' bits, where K is the minimum number >= 0 such that L
+ 1 + K = 896mod1024
local extra = 128 - (len + 9) % 128
len = num2string(8 * len, 8)
toProcess = toProcess .. "\\128" .. string.rep("\\0", extra) .. len
assert(#toProcess % 128 == 0)
return toProcess
end

local function rrotate(rot, n)
return (rot >> n) | ((rot << 64 - n))
end

local function digestblock(msg, i, H)
local w = {}
for j = 1, 16 do w[j] = s264num(msg, i + (j - 1)*4) end
for j = 17, 80 do
local v = w[j - 15]
local s0 = rrotate(v, 1) ~ rrotate(v, 8) ~ (v >> 7)
v = w[j - 2]
w[j] = w[j - 16] + s0 + w[j - 7] + ((rrotate(v, 19) ~ rrotate(v,
61)) ~ (v >> 6))
end

local a, b, c, d, e, f, g, h = H[1], H[2], H[3], H[4], H[5], H[6],
H[7], H[8]
for i = 1, 80 do
a, b, c, d, e, f, g, h = a , b , c , d , e , f , g , h
local s0 = rrotate(a, 28) ~ (rrotate(a, 34) ~ rrotate(a, 39))
local maj = ((a & b) ~ (a & c)) ~ (b & c)
local t2 = s0 + maj
local s1 = rrotate(e, 14) ~ (rrotate(e, 18) ~ rrotate(e, 41))
local ch = (e & f) ~ (~e & g)
local t1 = h + s1 + ch + k[i] + w[i]
h, g, f, e, d, c, b, a = g, f, e, d + t1, c, b, a, t1 + t2
end

H[1] = (H[1] + a)
H[2] = (H[2] + b)
H[3] = (H[3] + c)
H[4] = (H[4] + d)
H[5] = (H[5] + e)
H[6] = (H[6] + f)
H[7] = (H[7] + g)
H[8] = (H[8] + h)
end

local function fina

Re: [NTG-context] Some questions about the presentation of a book

2018-07-21 Thread Fabrice Couvreur
Hello,
To center the titles, we must add the key alternative = middle
However for the title of the summary, it is correct because a single word
but for the titles of chapters, it is not correct because I get :

Chapitre I :
First chapter

instead of : Chapitre I : First chapter

​Thanks
Fabrice​




2018-07-20 23:55 GMT+02:00 Fabrice Couvreur :

> Hello,
> I would like to modify the file below to :
>
> - center the title "Sommaire"
> - delete the line of the first page
> - center the title of each chapter
> - delete the line on each page with the title of the chapter
>
> Thanks for your help
> Fabrice
>
> 
> ##
> \usemodule[visual]
>
> \mainlanguage[fr]
>
> \setuphead[chapter][commandbefore={:\,},header=empty]
>
> \setuphead[subsection][style=bold]
>
> \setuphead[section]
>   [distance=\zeropoint,
>style=bold,
>commandbefore={\space\endash\space}]
>
> \setuphead[title][commandbefore={}]
>
> \setuplayout
>   [height=middle,
>width=middle,
>backspace=2cm,
>topspace=10mm,
>bottomspace=10mm,
>header=10mm,
>footer=10mm,
>footerdistance=10mm,
>headerdistance=10mm]
>
> \definelayout
>   [firstpage]
>   [header=empty]
>
>
> \setupbackgrounds[header][text][bottomframe=on]
>
> \setupheadertexts[{\getmarking[section]}]
>  [pagenumber]
>  [{\getmarking[chapter]}]
>  [pagenumber]
>
>
> \setuppagenumbering[alternative=,location=]
>
>
> \setuplabeltext[fr][chapter=Chapitre ]
>
> \definestructureconversionset
>   [structure]
>   [n, R, n, n, n]
>
> \definestructureconversionset
>   [digits]
>   [n, n, n, n, n]
>
> \setupheads[sectionconversionset=structure]
>
> \setuplist[chapter][style=bold,width=5mm]
>
> \starttext
>
> \starttitle[title={\bf Sommaire}]
> \placelist
>   [chapter,section,subsection]
>   [criterium=all,
>alternative=c]
>
> \stoptitle
>
> \startchapter[title=First chapter]
> \startsection[title=Fist section]
> \startsubsection[title=First subsection]
>  \dorecurse{10}{\fakewords{120}{120}\par}
> \stopsubsection
> \stopsection
> \stopchapter
> \startchapter[title=Second chapter]
> \startsection[title=Second section]
> \startsubsection[title=Second subsection]
> \dorecurse{10}{\fakewords{120}{120}\par}
> \stopsubsection
> \stopsection
> \stopchapter
> \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] Some questions about the presentation of a book

2018-07-20 Thread Fabrice Couvreur
Hello,
I would like to modify the file below to :

- center the title "Sommaire"
- delete the line of the first page
- center the title of each chapter
- delete the line on each page with the title of the chapter

Thanks for your help
Fabrice

##
\usemodule[visual]

\mainlanguage[fr]

\setuphead[chapter][commandbefore={:\,},header=empty]

\setuphead[subsection][style=bold]

\setuphead[section]
  [distance=\zeropoint,
   style=bold,
   commandbefore={\space\endash\space}]

\setuphead[title][commandbefore={}]

\setuplayout
  [height=middle,
   width=middle,
   backspace=2cm,
   topspace=10mm,
   bottomspace=10mm,
   header=10mm,
   footer=10mm,
   footerdistance=10mm,
   headerdistance=10mm]

\definelayout
  [firstpage]
  [header=empty]


\setupbackgrounds[header][text][bottomframe=on]

\setupheadertexts[{\getmarking[section]}]
 [pagenumber]
 [{\getmarking[chapter]}]
 [pagenumber]


\setuppagenumbering[alternative=,location=]


\setuplabeltext[fr][chapter=Chapitre ]

\definestructureconversionset
  [structure]
  [n, R, n, n, n]

\definestructureconversionset
  [digits]
  [n, n, n, n, n]

\setupheads[sectionconversionset=structure]

\setuplist[chapter][style=bold,width=5mm]

\starttext

\starttitle[title={\bf Sommaire}]
\placelist
  [chapter,section,subsection]
  [criterium=all,
   alternative=c]

\stoptitle

\startchapter[title=First chapter]
\startsection[title=Fist section]
\startsubsection[title=First subsection]
 \dorecurse{10}{\fakewords{120}{120}\par}
\stopsubsection
\stopsection
\stopchapter
\startchapter[title=Second chapter]
\startsection[title=Second section]
\startsubsection[title=Second subsection]
\dorecurse{10}{\fakewords{120}{120}\par}
\stopsubsection
\stopsection
\stopchapter
\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] Problem of compiling a file with Emacs

2018-07-19 Thread Fabrice Couvreur
Hello,
I'm starting a new discussion about compiling a file with Emacs. I will try
to be clear:

1. Compilation without Emacs in a terminal (Xterm):

 /home / aragorn / texlive / 2018 / bin / x86_64-linux / context Test.tex
Ok!

 / home / aragorn / context / tex / linux-64 / bin / context Test.tex Ok!

2. Compiling with a Emacs terminal shell command by having this in my ~ /
.emacs file

(setenv "PATH" "/ home / aragorn / context / tex / texmf-linux-64 / bin: $
PATH" t)

/ home / aragorn / texlive / 2018 / bin / x86_64-linux / context Test.tex
No Ok!

/ home / aragorn / context / tex / tex-linux-64 / bin / context Test.tex No
Ok!

3. Compiling with an Emacs terminal shell command by commenting this in my
~ / .emacs file

;; (setenv "PATH" "/ home / aragorn / context / tex / texmf-linux-64 / bin:
$ PATH" t)

/ home / aragorn / texlive / 2018 / bin / x86_64-linux / context Test.tex
Ok!

/ home / aragorn / context / tex / linux-64 / bin / context Test.tex Ok!

4. Compiling with the C-C C-C command by commenting this in my ~ / .emacs
file

;; (setenv "PATH" "/ home / aragorn / context / tex / texmf-linux-64 / bin:
$ PATH" t)

OK !

5. Coming with the C-c C-c command by having this in my ~ / .emacs file

(setenv "PATH" "/ home / aragorn / context / tex / texmf-linux-64 / bin: $
PATH" t) (that's what I do with all other files)

No OK !

Thanks.

My file Test.tex

% macros=mkvi
\setuppagenumbering[location=footer]

\startusableMPgraphic{NumberHead}
 draw outlinetext.f
 ("\bf\namedheadnumber{chapter}")
 (withcolor "lightgray")
 ysized 50pt ;
\stopusableMPgraphic

\unexpanded\def\processMPheadnumber#1%
  {\useMPgraphic{NumberHead}}

\setuphead
   [chapter]
   [command=\HeadTitle,
headstyle=\ss,
numbercommand=\processMPheadnumber,
   ]


\unexpanded\def\HeadTitle#1#2%
  {\framed
[frame=off,
 bottomframe=on,
 width=broad,
 align={broad,nothyphenated,left}]
{#1\blank[nowhite]#2}}

  \starttext
\starttitle[title={Sommaire}]

\start

\placelist
  [chapter,section,subsection]
  [criterium=all,
   alternative=c]

\stop

\stoptitle



\startchapter[title=Espaces probabilisés]

\startsubsection[title=Expérience aléatoire et univers]

\stopsubsection

\startsubsection[title=Événements]

\stopsubsection

\stopchapter

\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] title of index

2018-07-19 Thread Hans van der Meer
Thanks. Putting \placeregister[index] inside a  
\startchapter[title=\mytitle{}]-\stopchapter pair does the ttrick.

> On 19 Jul 2018, at 14:19, Rik Kabel  wrote:
> 
> On 7/19/2018 07:54, Hans van der Meer wrote:
>> The macro \completeregister[index] placed in 
>> \startbackmatter\startappendices typesets as “I Index”. 
>> How can I change and format with my custom macro the part “Index”? 
>> Such as using \mytitle{xyz} instead of Index?
>> 
>> No solution found in the Context Wiki.
>> 
>> dr. Hans van der Meer
>> 
> 
> Try \placeindex or \placeregister[index] and your own section heading. This 
> is analagous to \completecontent and \placecontent.

dr. Hans van der Meer


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

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

Re: [NTG-context] title of index

2018-07-19 Thread Rik Kabel

On 7/19/2018 07:54, Hans van der Meer wrote:
The macro \completeregister[index] placed in 
\startbackmatter\startappendices typesets as “I Index”.

How can I change and format with my custom macro the part “Index”?
Such as using \mytitle{xyz} instead of Index?

No solution found in the Context Wiki.

dr. Hans van der Meer



Try \placeindex or \placeregister[index] and your own section heading. 
This is analagous to \completecontent and \placecontent.
___
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] Epub broken

2018-07-05 Thread Rik Kabel

On 7/5/2018 10:27, Hans Hagen wrote:

On 7/4/2018 3:17 PM, Rik Kabel wrote:

The following example fails with recent betas, but not with TL18:

define fails


Sorry to be so terse in the original note. By failure, I mean that the 
generated .epub document is incorrect; parts are out of order, as:



(When one section is removed, the disorder is gone, so a smaller test 
file will not exhibit this problem.)


In a larger document, endnotes are scrambled as well, with two index 
marks for some and none for others. The generated .pdf (which is a 
throw-away when trying to produce epub) does not show the same problems.


The .epub file is attached.

--
RIk


test.epub
Description: application/epub
___
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] Epub broken

2018-07-04 Thread Rik Kabel

The following example fails with recent betas, but not with TL18:

   \setupinteraction [state=start]
   \setuptagging [state=start]
   \setupbackend [export=yes,xhtml=yes]
   \setupexport  [title={Title}]
   \setupstructure   [state=start]
   \starttext
   \startchapter[title={Chapter title}]
   \startparagraph
  Chapter introduction.
   \stopparagraph
   \startsection[title={Section 1 title}]
   \startparagraph
  Section one text.
   \stopparagraph
   \stopsection
   \startsection[title={Section 2 title}]
   \startparagraph
  Section two text.
   \stopparagraph
   \stopsection
   \startsection[title={Section 3 title}]
   \startparagraph
  Section three text.
   \stopparagraph
   \stopsection
   \startsection[title={Section 4 title}]
   \startparagraph
  Section four text.
   \stopparagraph
   \stopsection
   \startsection[title={Section 5 title}]
   \startparagraph
  Section five text.
   \stopparagraph
   \stopsection
   \startsection[title={Section 6 title}]
   \startparagraph
  Section six text.
   \stopparagraph
   \stopsection
   \startsection[title={Section 7 title}]
   \startparagraph
  Aaaa a aa aaa (aa aa) , aaa aa aaa    
 aaa aa aa    aa aa aaa . Aa  
aaa a,  a aa aa a, aa a, aa aa 
aaa -aa. aaa’a  aa  aaa aa—a aa , aa aaa a. 
Aaaa a aa aaa , aaa aa aaa     aaa aa 
aa    aa aa aaa . Aaaa a aa aaa , aaa 
aa aaa     aaa aa aa    aa aa aaa 
.
   \stopparagraph
   \stopsection
   \startsection[title={Section 8 title}]
   \startparagraph
  Aaaa a aa aaa (aa aa) , aaa aa aaa    
 aaa aa aa    aa aa aaa . Aa  
aaa a,  a aa aa a, aa a, aa aa 
aaa -aa. aaa’a  aa  aaa aa—a aa , aa aaa a 
aa aaa.
   \stopparagraph
   \stopsection
   \stopchapter
   \stoptext

--
Rik

___
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] Referencing footnotes by SECTION

2018-07-02 Thread Idris Samawi Hamid ادريس سماوي حامد
On Mon, 02 Jul 2018 07:21:19 -0600, Wolfgang Schuster  
 wrote:



Idris Samawi Hamid ادريس سماوي حامد 
2. Juli 2018 um 14:34
Hi Wolfgang,

On Mon, 02 Jul 2018 00:58:44 -0600, Wolfgang Schuster
 wrote:


Hi Idris,

you can enable the display of chapter numbers with the prefix-key:

\setupnotation
   [footnote]
   [prefix=yes,
   %prefixsegments=chapter,
way=bychapter]


Many thanks for this. There is an unwanted side-effect: Let

marker= main-text footnote marker
header= numeral for footnote header
reference = reference numeral

The prefix appears in three places, e.g.,

marker- II.1
header- II.1
reference - II.1

but we only want the prefix in the reference, not anywhere else, e.g.,

marker- 1
header- 1
reference - II.1

The prefix in the main-text marker and in the footnote header are
superfluous, e.g., the reader already knows which chapter one is
reading. But to reference a footnote from a later chapter, a prefix is
needed to let the reader know which chapter.

So the question is: Can the prefix be made to apply only to the
reference and not the marker or notation header?


You have to set different prefixsegments settings for the note entries
and the references.


\defineconversionset [OLIE] [n,R,n,n,n,n] [n]

\setuphead
   [sectionconversionset=OLIE]

\setupnotation
   [footnote]
   [prefix=yes,
prefixset=none]

\setupreferencestructureprefix
   [footnote]
   [default]
   [prefixsegments=chapter,
prefixset=all]

\starttext

\chapter{Chapter}

Hey\footnote[listen]{This is a footnote.}

See \in{footnote}[listen].

\stoptext


Excellent; this is a big help. Many thanks!


==
Observation:

For endnotes at the end of a book having the prefix in the header is
also useful, i.e.,

marker- 1
header- II.1
reference - II.1

So a general mechanism to set the prefix for each of the above three
would be useful.

If not currently supported, would like to make this a feature request.
==


I don’t think this is possible because marker and header share the same
counter setups.


Ok, that makes sense. As always, thank you for your pointers and  
explanations!


Best wishes
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] Referencing footnotes by SECTION

2018-07-02 Thread Wolfgang Schuster




Idris Samawi Hamid ادريس سماوي حامد 
2. Juli 2018 um 14:34
Hi Wolfgang,

On Mon, 02 Jul 2018 00:58:44 -0600, Wolfgang Schuster 
 wrote:



Hi Idris,

you can enable the display of chapter numbers with the prefix-key:

\setupnotation
   [footnote]
   [prefix=yes,
   %prefixsegments=chapter,
way=bychapter]


Many thanks for this. There is an unwanted side-effect: Let

marker= main-text footnote marker
header= numeral for footnote header
reference = reference numeral

The prefix appears in three places, e.g.,

marker- II.1
header- II.1
reference - II.1

but we only want the prefix in the reference, not anywhere else, e.g.,

marker- 1
header- 1
reference - II.1

The prefix in the main-text marker and in the footnote header are 
superfluous, e.g., the reader already knows which chapter one is 
reading. But to reference a footnote from a later chapter, a prefix is 
needed to let the reader know which chapter.


So the question is: Can the prefix be made to apply only to the 
reference and not the marker or notation header?


You have to set different prefixsegments settings for the note entries 
and the references.



\defineconversionset [OLIE] [n,R,n,n,n,n] [n]

\setuphead
  [sectionconversionset=OLIE]

\setupnotation
  [footnote]
  [prefix=yes,
   prefixset=none]

\setupreferencestructureprefix
  [footnote]
  [default]
  [prefixsegments=chapter,
   prefixset=all]

\starttext

\chapter{Chapter}

Hey\footnote[listen]{This is a footnote.}

See \in{footnote}[listen].

\stoptext



==
Observation:

For endnotes at the end of a book having the prefix in the header is 
also useful, i.e.,


marker- 1
header- II.1
reference - II.1

So a general mechanism to set the prefix for each of the above three 
would be useful.


If not currently supported, would like to make this a feature request.
==


I don’t think this is possible because marker and header share the same 
counter setups.


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] \setupreferencestructureprefix and numberconversionset

2018-07-02 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi Wolfgang,

On Mon, 02 Jul 2018 01:08:23 -0600, Wolfgang Schuster  
 wrote:



Hi Idris,

you get the correct reference numbers when you apply the conversion of
the section numbers
with the sectionconversionset-key, this does also mean you have to
remove “conversion=R”
from chapter setup.

==
\defineconversionset [OLIE] [n,R,n,n,n,n] [n]

\setuphead[sectionconversionset=OLIE]
==


Amazing and elegant. Many thanks!

Best wishes
Idris


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

Chapter numbers are indicated roman numerals (conversion=R), all
subsectioning by decimal numerals. See attached and below:

===
\setuphead[chapter]   [alternative=normal,conversion=R]
\setuphead[subsection][alternative=text]
\setuphead[subsection][distance=0em,
   textdistance=0.7em,
   sectionstopper=.,
   criterium=local]

\definestructureconversionset[OLIE][n,R,n,n,n,n][n]
\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace,
numberconversionset=OLIE]

% \setupreferencestructureprefix [chapter] [default]
   % [prefixstopper=\zerowidthspace,
% numberconversionset=OLIE]

\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward

See \in{Sections}[reference3] and \in{Section}[reference4].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsubsection[title={},reference={reference4}]
\input ward
\stopsubsubsection
\startsubsection[title={},reference={reference5}]
\input ward

See \in{Sections}[reference1] and \in{Section}[reference2].
\stopsubsection
\stopchapter
\stoptext
===

So, e.g., Chapter II, Subsection 1, Subsubsection 1

In the references we get

2.1.1

But what we want is

II.1.1

Adding the following to the preamble doesn't appear to work:

\definestructureconversionset[OLIE][n,R,n,n,n,n][n]
\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace,
numberconversionset=OLIE]
What am I missing? Thanks in advance for any guidance.

Best wishes
Idris
___
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
___





--
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] Referencing footnotes by SECTION

2018-07-02 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi Wolfgang,

On Mon, 02 Jul 2018 00:58:44 -0600, Wolfgang Schuster  
 wrote:



Hi Idris,

you can enable the display of chapter numbers with the prefix-key:

\setupnotation
   [footnote]
   [prefix=yes,
   %prefixsegments=chapter,
way=bychapter]


Many thanks for this. There is an unwanted side-effect: Let

marker= main-text footnote marker
header= numeral for footnote header
reference = reference numeral

The prefix appears in three places, e.g.,

marker- II.1
header- II.1
reference - II.1

but we only want the prefix in the reference, not anywhere else, e.g.,

marker- 1
header- 1
reference - II.1

The prefix in the main-text marker and in the footnote header are  
superfluous, e.g., the reader already knows which chapter one is reading.  
But to reference a footnote from a later chapter, a prefix is needed to  
let the reader know which chapter.


So the question is: Can the prefix be made to apply only to the reference  
and not the marker or notation header?


==
Observation:

For endnotes at the end of a book having the prefix in the header is also  
useful, i.e.,


marker- 1
header- II.1
reference - II.1

So a general mechanism to set the prefix for each of the above three would  
be useful.


If not currently supported, would like to make this a feature request.
==

Thank you again, Wolfgang.

Best wishes
Idris


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

When referencing footnotes that reset each chapter, is there a way to
include the chapter information? See attached and below:

===
\setuphead[chapter]   [alternative=normal,conversion=R]
\setuphead[subsection][alternative=text]
\setuphead[subsection][distance=0em,
   textdistance=0.7em,
   sectionstopper=.,
   criterium=local]

\setupnotation[footnote][way=bychapter]

\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace]

\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward
\startfootnote[footnote1]
\input ward
\stopfootnote{}

See \in{Footnote}[footnote2].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsection[title={},reference={reference5}]
\input ward
\startfootnote[footnote2]
\input ward
\stopfootnote{}

See \in{Footnote}[footnote1].
\stopsubsection
\stopchapter
\stoptext
===

If line 8 is commented -
\setupnotation[footnote][way=bychapter]
- we get what we expect. But if line 8 is activated, we get an
ambiguity: Both references give back

 "Footnote 1"

Whereas what we would like is something like this:

 Footnote  I.1

i.e., Chapter I, Footnote 1 - for the first footnote; and

 Footnote II.1

i.e., Chapter II, Footnote 1 - for the second footnote.

Is there a straightforward way to do this?

[[Of course, for the roman chapter numbering we also run into the
reference-numberconversionset issue of the other thread, where

\definestructureconversionset[OLIE][n,R,n,n,n,n][n]
\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace,
numberconversionset=OLIE]

doesn't seem to work.]]

Thank you in advance for any guidance or pointers you can provide!

Best wishes
Idris





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

reference-footnotes.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] \setupreferencestructureprefix and numberconversionset

2018-07-02 Thread Wolfgang Schuster

Hi Idris,

you get the correct reference numbers when you apply the conversion of 
the section numbers
with the sectionconversionset-key, this does also mean you have to 
remove “conversion=R”

from chapter setup.

==
\defineconversionset [OLIE] [n,R,n,n,n,n] [n]

\setuphead[sectionconversionset=OLIE]
==

Wolfgang

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

Chapter numbers are indicated roman numerals (conversion=R), all 
subsectioning by decimal numerals. See attached and below:


===
\setuphead[chapter]   [alternative=normal,conversion=R]
\setuphead[subsection][alternative=text]
\setuphead[subsection][distance=0em,
   textdistance=0.7em,
   sectionstopper=.,
   criterium=local]

\definestructureconversionset[OLIE][n,R,n,n,n,n][n]
\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace,
numberconversionset=OLIE]

% \setupreferencestructureprefix [chapter] [default]
   % [prefixstopper=\zerowidthspace,
% numberconversionset=OLIE]

\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward

See \in{Sections}[reference3] and \in{Section}[reference4].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsubsection[title={},reference={reference4}]
\input ward
\stopsubsubsection
\startsubsection[title={},reference={reference5}]
\input ward

See \in{Sections}[reference1] and \in{Section}[reference2].
\stopsubsection
\stopchapter
\stoptext
===

So, e.g., Chapter II, Subsection 1, Subsubsection 1

In the references we get

2.1.1

But what we want is

II.1.1

Adding the following to the preamble doesn't appear to work:

\definestructureconversionset[OLIE][n,R,n,n,n,n][n]
\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace,
numberconversionset=OLIE]
What am I missing? Thanks in advance for any guidance.

Best wishes
Idris
___
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] Referencing footnotes by SECTION

2018-07-01 Thread Wolfgang Schuster

Hi Idris,

you can enable the display of chapter numbers with the prefix-key:

\setupnotation
  [footnote]
  [prefix=yes,
  %prefixsegments=chapter,
   way=bychapter]

Wolfgang

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

When referencing footnotes that reset each chapter, is there a way to 
include the chapter information? See attached and below:


===
\setuphead[chapter]   [alternative=normal,conversion=R]
\setuphead[subsection][alternative=text]
\setuphead[subsection][distance=0em,
   textdistance=0.7em,
   sectionstopper=.,
   criterium=local]

\setupnotation[footnote][way=bychapter]

\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace]

\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward
\startfootnote[footnote1]
\input ward
\stopfootnote{}

See \in{Footnote}[footnote2].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsection[title={},reference={reference5}]
\input ward
\startfootnote[footnote2]
\input ward
\stopfootnote{}

See \in{Footnote}[footnote1].
\stopsubsection
\stopchapter
\stoptext
===

If line 8 is commented -
\setupnotation[footnote][way=bychapter]
- we get what we expect. But if line 8 is activated, we get an 
ambiguity: Both references give back


 "Footnote 1"

Whereas what we would like is something like this:

 Footnote  I.1

i.e., Chapter I, Footnote 1 - for the first footnote; and

 Footnote II.1

i.e., Chapter II, Footnote 1 - for the second footnote.

Is there a straightforward way to do this?

[[Of course, for the roman chapter numbering we also run into the 
reference-numberconversionset issue of the other thread, where


\definestructureconversionset[OLIE][n,R,n,n,n,n][n]
\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace,
numberconversionset=OLIE]

doesn't seem to work.]]

Thank you in advance for any guidance or pointers you can provide!

Best wishes
Idris


___
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] Referencing footnotes by SECTION

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

Attached!

On Sat, 30 Jun 2018 15:04:02 -0600, Idris Samawi Hamid ادريس سماوي حامد  
 wrote:



Dear gang,

When referencing footnotes that reset each chapter, is there a way to  
include the chapter information? See attached and below:


===
\setuphead[chapter]   [alternative=normal,conversion=R]
\setuphead[subsection][alternative=text]
\setuphead[subsection][distance=0em,
textdistance=0.7em,
sectionstopper=.,
criterium=local]

\setupnotation[footnote][way=bychapter]

\setupreferencestructureprefix [section] [default]
[prefixstopper=\zerowidthspace]

\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward
\startfootnote[footnote1]
\input ward
\stopfootnote{}

See \in{Footnote}[footnote2].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsection[title={},reference={reference5}]
\input ward
\startfootnote[footnote2]
\input ward
\stopfootnote{}

See \in{Footnote}[footnote1].
\stopsubsection
\stopchapter
\stoptext
===

If line 8 is commented -
\setupnotation[footnote][way=bychapter]
- we get what we expect. But if line 8 is activated, we get an  
ambiguity: Both references give back


  "Footnote 1"

Whereas what we would like is something like this:

  Footnote  I.1

i.e., Chapter I, Footnote 1 - for the first footnote; and

  Footnote II.1

i.e., Chapter II, Footnote 1 - for the second footnote.

Is there a straightforward way to do this?

[[Of course, for the roman chapter numbering we also run into the  
reference-numberconversionset issue of the other thread, where


\definestructureconversionset[OLIE][n,R,n,n,n,n][n]
\setupreferencestructureprefix [section] [default]
[prefixstopper=\zerowidthspace,
 numberconversionset=OLIE]

doesn't seem to work.]]

Thank you in advance for any guidance or pointers you can provide!

Best wishes
Idris



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

scratch.tex
Description: TeX document


scratch.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] Referencing footnotes by SECTION

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

Dear gang,

When referencing footnotes that reset each chapter, is there a way to  
include the chapter information? See attached and below:


===
\setuphead[chapter]   [alternative=normal,conversion=R]
\setuphead[subsection][alternative=text]
\setuphead[subsection][distance=0em,
   textdistance=0.7em,
   sectionstopper=.,
   criterium=local]

\setupnotation[footnote][way=bychapter]

\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace]

\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward
\startfootnote[footnote1]
\input ward
\stopfootnote{}

See \in{Footnote}[footnote2].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsection[title={},reference={reference5}]
\input ward
\startfootnote[footnote2]
\input ward
\stopfootnote{}

See \in{Footnote}[footnote1].
\stopsubsection
\stopchapter
\stoptext
===

If line 8 is commented -
\setupnotation[footnote][way=bychapter]
- we get what we expect. But if line 8 is activated, we get an ambiguity:  
Both references give back


 "Footnote 1"

Whereas what we would like is something like this:

 Footnote  I.1

i.e., Chapter I, Footnote 1 - for the first footnote; and

 Footnote II.1

i.e., Chapter II, Footnote 1 - for the second footnote.

Is there a straightforward way to do this?

[[Of course, for the roman chapter numbering we also run into the  
reference-numberconversionset issue of the other thread, where


\definestructureconversionset[OLIE][n,R,n,n,n,n][n]
\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace,
numberconversionset=OLIE]

doesn't seem to work.]]

Thank you in advance for any guidance or pointers you can provide!

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

[NTG-context] \setupreferencestructureprefix and numberconversionset

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

Dear gang,

Chapter numbers are indicated roman numerals (conversion=R), all  
subsectioning by decimal numerals. See attached and below:


===
\setuphead[chapter]   [alternative=normal,conversion=R]
\setuphead[subsection][alternative=text]
\setuphead[subsection][distance=0em,
   textdistance=0.7em,
   sectionstopper=.,
   criterium=local]

\definestructureconversionset[OLIE][n,R,n,n,n,n][n]
\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace,
numberconversionset=OLIE]

% \setupreferencestructureprefix [chapter] [default]
   % [prefixstopper=\zerowidthspace,
% numberconversionset=OLIE]

\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward

See \in{Sections}[reference3] and \in{Section}[reference4].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsubsection[title={},reference={reference4}]
\input ward
\stopsubsubsection
\startsubsection[title={},reference={reference5}]
\input ward

See \in{Sections}[reference1] and \in{Section}[reference2].
\stopsubsection
\stopchapter
\stoptext
===

So, e.g., Chapter II, Subsection 1, Subsubsection 1

In the references we get

2.1.1

But what we want is

II.1.1

Adding the following to the preamble doesn't appear to work:

\definestructureconversionset[OLIE][n,R,n,n,n,n][n]
\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace,
numberconversionset=OLIE]
What am I missing? Thanks in advance for any guidance.

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

scratch.tex
Description: TeX document


scratch.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] referencing and stoppers

2018-06-30 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sat, 30 Jun 2018 04:20:57 -0600, Wolfgang Schuster  
 wrote:



You can use the \setupreferencestructureprefix command set a different
value for
the stopper but you have to ensure the key takes a value because a empty
argument is ignored. Instead of the argument I used in my example
(\symbol[none])
you can also use a unicode character without width, e.g. \zerowidthspace.


\setupreferencestructureprefix [section] [default]
[prefixstopper={\symbol[none]}]
%\setupreferencestructureprefix [section] [default]
[prefixstopper=\zerowidthspace]

   1. Argument: section name -> section == \section / \startsection
   2. Argument: reference type -> default == \in
   3. Argument: settings which differ from \setuphead


Many thanks, this is exactly what was needed!

Your replies and pointers are appreciated and not taken for granted.

Best wishes
Idris


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

For, e.g., \setuphead[...][alternative=text], one often wants the
stopper to appear in the main text sectioning but not in the
references to those sections. For example (attached and below):

===
\setuphead[chapter]   [alternative=normal]
\setuphead[subsection][alternative=text]
\setuphead[subsection][distance=0em,
   textdistance=0.7em,
   sectionstopper=.,
   criterium=local]
\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward

See \in{Sections}[reference3] and \in{Section}[reference4].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsection[title={},reference={reference4}]
\input ward

See \in{Sections}[reference1] and \in{Section}[reference2].
\stopsubsection
\stopchapter
\stoptext
===

See Sections 2.1. and Section 2.2..
See Sections 1.1. and Section 1.2..

SHOULD BE

See Sections 2.1 and Section 2.2.
See Sections 1.1 and Section 1.2.

Is there a straightforward way to remove the stopper from the \in
reference while maintaining it in the main sectioning but removing it
in the referencing?

If there is no straightforward way, what is the best workaround?

As mentioned at the outset, this is not an uncommon scenario. If there
is no straightforward way, would like to make it a feature request.

Thank you in advance for your help.

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





--
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] referencing and stoppers

2018-06-30 Thread Wolfgang Schuster
You can use the \setupreferencestructureprefix command set a different 
value for

the stopper but you have to ensure the key takes a value because a empty
argument is ignored. Instead of the argument I used in my example 
(\symbol[none])

you can also use a unicode character without width, e.g. \zerowidthspace.


\setupreferencestructureprefix [section] [default] 
[prefixstopper={\symbol[none]}]
%\setupreferencestructureprefix [section] [default] 
[prefixstopper=\zerowidthspace]


  1. Argument: section name -> section == \section / \startsection
  2. Argument: reference type -> default == \in
  3. Argument: settings which differ from \setuphead


Wolfgang

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

For, e.g., \setuphead[...][alternative=text], one often wants the 
stopper to appear in the main text sectioning but not in the 
references to those sections. For example (attached and below):


===
\setuphead[chapter]   [alternative=normal]
\setuphead[subsection][alternative=text]
\setuphead[subsection][distance=0em,
   textdistance=0.7em,
   sectionstopper=.,
   criterium=local]
\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward

See \in{Sections}[reference3] and \in{Section}[reference4].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsection[title={},reference={reference4}]
\input ward

See \in{Sections}[reference1] and \in{Section}[reference2].
\stopsubsection
\stopchapter
\stoptext
===

See Sections 2.1. and Section 2.2..
See Sections 1.1. and Section 1.2..

SHOULD BE

See Sections 2.1 and Section 2.2.
See Sections 1.1 and Section 1.2.

Is there a straightforward way to remove the stopper from the \in 
reference while maintaining it in the main sectioning but removing it 
in the referencing?


If there is no straightforward way, what is the best workaround?

As mentioned at the outset, this is not an uncommon scenario. If there 
is no straightforward way, would like to make it a feature request.


Thank you in advance for your help.

Idris
___
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] referencing and stoppers

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

Dear gang,

For, e.g., \setuphead[...][alternative=text], one often wants the stopper  
to appear in the main text sectioning but not in the references to those  
sections. For example (attached and below):


===
\setuphead[chapter]   [alternative=normal]
\setuphead[subsection][alternative=text]
\setuphead[subsection][distance=0em,
   textdistance=0.7em,
   sectionstopper=.,
   criterium=local]
\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward

See \in{Sections}[reference3] and \in{Section}[reference4].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsection[title={},reference={reference4}]
\input ward

See \in{Sections}[reference1] and \in{Section}[reference2].
\stopsubsection
\stopchapter
\stoptext
===

See Sections 2.1. and Section 2.2..
See Sections 1.1. and Section 1.2..

SHOULD BE

See Sections 2.1 and Section 2.2.
See Sections 1.1 and Section 1.2.

Is there a straightforward way to remove the stopper from the \in  
reference while maintaining it in the main sectioning but removing it in  
the referencing?


If there is no straightforward way, what is the best workaround?

As mentioned at the outset, this is not an uncommon scenario. If there is  
no straightforward way, would like to make it a feature request.


Thank you in advance for your help.

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

section-space-text.pdf
Description: Adobe PDF document


section-space-text.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-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 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 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] Confusing level change message, why?

2018-06-17 Thread Hans Hagen

On 6/17/2018 2:48 PM, Rik Kabel wrote:

On 6/17/2018 04:35, Pablo Rodriguez wrote:

On 06/15/2018 11:03 PM, Rik Kabel wrote:

The example below is taken from the wiki article "Titles
<http://wiki.contextgarden.net/Titles>," with pdf bookmark apparatus
prepended and a second chapter added to the bodymatter.

In the log, this produces the lines:

 backend > bookmarks > confusing level change at level 3
 around '1 body'
 backend > bookmarks > confusing level change at level 3
 around 'A appendix'
 backend > bookmarks > confusing level change at level 3
 around 'back'

That is, one message for each *matter change.

What is the meaning of the message, and how can it be removed (short of
disabling pdf bookmarks)?

Hi Rik,

if you disable bookmarks (by commenting
"\setupinteraction[state=start]"), you won’t get the message.

But I wonder what is the problem besides the log message. From your
sample, I get a PDF document with all the expected content.

What I am missing from your explanation? Or why are these log messages
so relevant if you get the intended output?

Pablo


Indeed, Pablo, there is no visible defect in the document.

I wonder if the message should cause concern because I do not know if 
there is some other issue that it reflects, perhaps something that is 
not visible in the viewed document, but that might impede PDF standards 
compliance.


If there is no fault or typesetting problem indicated by the message, I 
wonder why it is reported.


Again, if there is no problem, I can add it to my log filtering 
routines, but I want to see it if there is something I should do to 
eliminate it.
it's just part of the check .. if you use for instance \section{foo} 
instead of \startsecction there is some guesswork


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] Confusing level change message, why?

2018-06-15 Thread Rik Kabel
The example below is taken from the wiki article "Titles 
<http://wiki.contextgarden.net/Titles>," with pdf bookmark apparatus 
prepended and a second chapter added to the bodymatter.


In the log, this produces the lines:

   backend > bookmarks > confusing level change at level 3
   around '1 body'
   backend > bookmarks > confusing level change at level 3
   around 'A appendix'
   backend > bookmarks > confusing level change at level 3
   around 'back'

That is, one message for each *matter change.

What is the meaning of the message, and how can it be removed (short of 
disabling pdf bookmarks)?


   \setupinteraction[state=start]
   \placebookmarks[chapter, section, subsection, subsubsection]
   [chapter,section]
   \setupsectionblock[frontpart][page=]
   \setupsectionblock[bodypart] [page=]
   \setupsectionblock[backpart] [page=]
   \setupsectionblock[appendix] [page=]
   \definepagebreak[firstpagebreak][yes,header,footer,right]
   \setuphead[chapter][page=firstpagebreak]
   \setuppagenumbering[alternative=doublesided]
   \starttext
   \startfrontmatter
   \chapter{front}
   \stopfrontmatter
   \startbodymatter
   \chapter{body}
   \chapter{body}
   \stopbodymatter
   \startappendices
   \chapter{appendix}
   \stopappendices
   \startbackmatter
   \chapter{back}
   \stopbackmatter
   \stoptext

--
Rik

___
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] First example in xml-mkiv.pdf

2018-06-06 Thread Keith McKay
Aah yes, how silly of me to forget to add \starttext... \stoptext! 
Thanks for your help.


Best Wishes

Keith


On 06/06/2018 14:32, Hans Hagen wrote:

On 6/5/2018 10:03 PM, Keith McKay wrote:

Dear List,

In my continuing effort to improve my ConTeXt skills I thought I 
would have a look at XML and ConTeXt. Note: I have no XML skills but, 
"in for a penny, in for a pound", as they say over here. I started by 
looking at the very first example on page 5 of "Dealing with XML in 
ConTeXt mkiv" and straight away hit a problem.  There is a typo in 
the first line of the XML file which I corrected:




should be



However when I ran the file using the tex file it only produced a 3 
page pdf with a contents page and 2 title pages and no other text.


Here is the XML file which is the similar to the one on page 5 but 
with two sections rather than one:








Some title



a paragraph of text

another paragraph of text







Another title



a paragraph of text

another paragraph of text







The TeX file is cut and pasted from pages 5 and 6 of xml-mkiv.pdf:

\startxmlsetups xml:demo:base

\xmlsetsetup{#1}{document|section|p|itemize|item}{xml:demo:*}

\stopxmlsetups

\xmlregisterdocumentsetup{demo}{xml:demo:base}

\startxmlsetups xml:demo:document

\starttitle[title={Contents}]

\placelist[chapter]

\stoptitle

\xmlflush{#1}

\stopxmlsetups

\startxmlsetups xml:demo:section

\startchapter[title=\xmlfirst{#1}{/title}]

\xmlfirst{#1}{/content}

\stopchapter

\stopxmlsetups

\startxmlsetups xml:demo:p

\xmlflush{#1}\endgraf

\stopxmlsetups

\xmlprocessfile{demo}{demo.xml}{}

This seemed such a simple example and I'm a bit perplexed as to why 
it did not work. Can somebody explain why no paragraphs are showing 
up? I'm using:


ConTeXt ver: 2018.04.04 00:51 MKIV beta fmt: 2018.6.2 int: 
english/english


LuaTeX, Version 1.07.0 (TeX Live 2018)

Thanks and Best Wishes

you need to add \starttext ... \stoptext

\startbuffer[demo]



    
    Some title
    
    a paragraph of text
    another paragraph of text
    
    
    
    Another title
    
    a paragraph of text
    another paragraph of text
    
    

\stopbuffer

\startxmlsetups xml:demo:base
    \xmlsetsetup{#1}{document|section|p|itemize|item}{xml:demo:*}
\stopxmlsetups

\xmlregisterdocumentsetup{demo}{xml:demo:base}

\startxmlsetups xml:demo:document
    \starttitle[title={Contents}]
    \placelist[chapter]
    \stoptitle
    \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:demo:section
    \startchapter[title=\xmlfirst{#1}{/title}]
    \xmlfirst{#1}{/content}
    \stopchapter
\stopxmlsetups

\startxmlsetups xml:demo:p
    \xmlflush{#1}\endgraf
\stopxmlsetups

\starttext
    \xmlprocessbuffer{demo}{demo}{}
\stoptext


-
  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] First example in xml-mkiv.pdf

2018-06-06 Thread Hans Hagen

On 6/5/2018 10:03 PM, Keith McKay wrote:

Dear List,

In my continuing effort to improve my ConTeXt skills I thought I would 
have a look at XML and ConTeXt. Note: I have no XML skills but, "in for 
a penny, in for a pound", as they say over here. I started by looking at 
the very first example on page 5 of "Dealing with XML in ConTeXt mkiv" 
and straight away hit a problem.  There is a typo in the first line of 
the XML file which I corrected:




should be



However when I ran the file using the tex file it only produced a 3 page 
pdf with a contents page and 2 title pages and no other text.


Here is the XML file which is the similar to the one on page 5 but with 
two sections rather than one:








Some title



a paragraph of text

another paragraph of text







Another title



a paragraph of text

another paragraph of text







The TeX file is cut and pasted from pages 5 and 6 of xml-mkiv.pdf:

\startxmlsetups xml:demo:base

\xmlsetsetup{#1}{document|section|p|itemize|item}{xml:demo:*}

\stopxmlsetups

\xmlregisterdocumentsetup{demo}{xml:demo:base}

\startxmlsetups xml:demo:document

\starttitle[title={Contents}]

\placelist[chapter]

\stoptitle

\xmlflush{#1}

\stopxmlsetups

\startxmlsetups xml:demo:section

\startchapter[title=\xmlfirst{#1}{/title}]

\xmlfirst{#1}{/content}

\stopchapter

\stopxmlsetups

\startxmlsetups xml:demo:p

\xmlflush{#1}\endgraf

\stopxmlsetups

\xmlprocessfile{demo}{demo.xml}{}

This seemed such a simple example and I'm a bit perplexed as to why it 
did not work. Can somebody explain why no paragraphs are showing up? I'm 
using:


ConTeXt ver: 2018.04.04 00:51 MKIV beta fmt: 2018.6.2 int: english/english

LuaTeX, Version 1.07.0 (TeX Live 2018)

Thanks and Best Wishes

you need to add \starttext ... \stoptext

\startbuffer[demo]




Some title

a paragraph of text
another paragraph of text



Another title

a paragraph of text
another paragraph of text



\stopbuffer

\startxmlsetups xml:demo:base
\xmlsetsetup{#1}{document|section|p|itemize|item}{xml:demo:*}
\stopxmlsetups

\xmlregisterdocumentsetup{demo}{xml:demo:base}

\startxmlsetups xml:demo:document
\starttitle[title={Contents}]
\placelist[chapter]
\stoptitle
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:demo:section
\startchapter[title=\xmlfirst{#1}{/title}]
\xmlfirst{#1}{/content}
\stopchapter
\stopxmlsetups

\startxmlsetups xml:demo:p
\xmlflush{#1}\endgraf
\stopxmlsetups

\starttext
\xmlprocessbuffer{demo}{demo}{}
\stoptext


-
  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] First example in xml-mkiv.pdf

2018-06-05 Thread Keith McKay

Dear List,

In my continuing effort to improve my ConTeXt skills I thought I would 
have a look at XML and ConTeXt. Note: I have no XML skills but, "in for 
a penny, in for a pound", as they say over here. I started by looking at 
the very first example on page 5 of "Dealing with XML in ConTeXt mkiv" 
and straight away hit a problem.  There is a typo in the first line of 
the XML file which I corrected:




should be



However when I ran the file using the tex file it only produced a 3 page 
pdf with a contents page and 2 title pages and no other text.


Here is the XML file which is the similar to the one on page 5 but with 
two sections rather than one:








Some title



a paragraph of text

another paragraph of text







Another title



a paragraph of text

another paragraph of text







The TeX file is cut and pasted from pages 5 and 6 of xml-mkiv.pdf:

\startxmlsetups xml:demo:base

\xmlsetsetup{#1}{document|section|p|itemize|item}{xml:demo:*}

\stopxmlsetups

\xmlregisterdocumentsetup{demo}{xml:demo:base}

\startxmlsetups xml:demo:document

\starttitle[title={Contents}]

\placelist[chapter]

\stoptitle

\xmlflush{#1}

\stopxmlsetups

\startxmlsetups xml:demo:section

\startchapter[title=\xmlfirst{#1}{/title}]

\xmlfirst{#1}{/content}

\stopchapter

\stopxmlsetups

\startxmlsetups xml:demo:p

\xmlflush{#1}\endgraf

\stopxmlsetups

\xmlprocessfile{demo}{demo.xml}{}

This seemed such a simple example and I'm a bit perplexed as to why it 
did not work. Can somebody explain why no paragraphs are showing up? I'm 
using:


ConTeXt ver: 2018.04.04 00:51 MKIV beta fmt: 2018.6.2 int: english/english

LuaTeX, Version 1.07.0 (TeX Live 2018)

Thanks and Best Wishes

Keith McKay

___
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] referenceprefix=+ not working

2018-05-22 Thread Henri Menke

Dear list,

the option referenceprefix=+ for setuphead seems to not work.
https://tex.stackexchange.com/questions/432844
It works however if you put an explicit prefix.  See MWE below. 
Reproducible on TL2018 and latest beta.


Cheers, Henri

---

\setuphead
  [section]
  [referenceprefix=+] % when I put "test" it works

\starttext

\startsection[reference=test,title={Test}]

  \startplacefigure[reference=cow]
\externalfigure[cow]
  \stopplacefigure

\stopsection

\in[test:cow] % ??

\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] Wrong section space after placefigure with newcolumnsets

2018-04-05 Thread Charles Vejnar

Hi,

I am placing figures in a columnset. The next header (section, 
subsection...) following the figure has always missing vertical space.


See the normal space after "One subsection" and "Four subsection" but 
reduced space after "Two subsection" and "Three subsection" in the 
example below.


Tested with ConTeXt  ver: 2018.04.04 and LuaTeX, Version 1.07.0.

This seems to be the opposite problem as the one described recently in 
the thread "Bug in wrapped placefigure".


Any solution or fix?

Thank you very much for your help.

Charles



\setuppapersize[letter][letter]

\usemodule[newcolumnsets]
\setuplayout[grid=yes]
\definecolumnset[colset][n=2]

\starttext
\startcolumnset[colset]

\section{One section}

\subsection{One subsection}

\dorecurse{16}{\input ward \par}

\section{Two section}

\subsection{Two subsection}

\placefigure[bots]{Legend.}{\hbox{\externalfigure[dummy][width=\makeupwidth,height=12cm]}}

\dorecurse{5}{\input knuth \par}

\subsection{Three subsection}

\placefigure[bots]{Legend.}{\hbox{\externalfigure[dummy][width=\makeupwidth,height=12cm]}}

\dorecurse{2}{\input knuth \par}

\subsection{Four subsection}

\dorecurse{7}{\input knuth \par}

\stopcolumnset
\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] define xml entity

2018-04-03 Thread Hans Hagen

On 4/3/2018 9:00 AM, dr. Hans van der Meer wrote:

How do I define an xml entity like ä?
Is there an \xml-operation for defining an entity?
Such that I can say \xml{ABC}{an alphabet} for using &ABC; so that it 
produces “an alphabet”, for example.

You can find some in the test suite but it boils down to ...

\xmlsetentity{one}  {...}
\xmltexentity{sim}  {...}

or defining them in the preamble section of the xml file itself.

Entities are tricky. When they are used as abstraction you often want 
them roundtrip while otherwise you might want them expanded. YOu can 
have double escaped entities (which can result from import/export in 
half clever or inconsistent databases).  There's all kinds of control in 
context.


Another tricky thing is that because tex doesn't like # etc we need to 
have our own 'escapes' as well, so that runs in parallel of the 
subsystem that carries (unexpanded) entities around.


It's a conceptual mess deel down ... (well, you can read/understand lua 
so ...).


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

2018-03-31 Thread Henning Hraban Ramm
Am 2018-03-31 um 23:10 schrieb Hans Hagen :

> On 3/31/2018 10:57 PM, Henning Hraban Ramm wrote:
>> Please consider:
>> \starttext
>> \startchapter[title=Test][author=Tufte]
>> \input tufte\par
>> Author: \structureuservariable{author}
>> \startsection[title=Section]
>> \input knuth\par
>> Author: \structureuservariable{author} (empty!)
>> \stopsection
>> \stopchapter
>> \stoptext
>> i.e. the variable that I define in chapter is reset in the next section.
>> But I need it for the whole chapter (i.e. for a head text).
>> Is there some setting to avoid that reset?
> no but there is \namedstructurevariable{..}{..}

i.e. \namedstructurevariable{chapter}{author}

Great, that helps!
Thank you for the quick answer!

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
___

Re: [NTG-context] structureuservariable

2018-03-31 Thread Hans Hagen

On 3/31/2018 10:57 PM, Henning Hraban Ramm wrote:

Please consider:

\starttext

\startchapter[title=Test][author=Tufte]

\input tufte\par
Author: \structureuservariable{author}

\startsection[title=Section]

\input knuth\par
Author: \structureuservariable{author} (empty!)

\stopsection

\stopchapter

\stoptext

i.e. the variable that I define in chapter is reset in the next section.
But I need it for the whole chapter (i.e. for a head text).
Is there some setting to avoid that reset?

no but there is \namedstructurevariable{..}{..}

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

2018-03-31 Thread Henning Hraban Ramm
Please consider:

\starttext

\startchapter[title=Test][author=Tufte]

\input tufte\par
Author: \structureuservariable{author}

\startsection[title=Section]

\input knuth\par
Author: \structureuservariable{author} (empty!)

\stopsection

\stopchapter

\stoptext

i.e. the variable that I define in chapter is reset in the next section.
But I need it for the whole chapter (i.e. for a head text).
Is there some setting to avoid that reset?


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
___

Re: [NTG-context] Bug in wrapped placefigure

2018-03-29 Thread Hans Hagen

On 3/29/2018 11:17 PM, Henri Menke wrote:

On Thu, 2018-03-29 at 13:20 +0200, Hans Hagen wrote:

On 3/29/2018 12:50 PM, Henri Menke wrote:


Dear devs,

When a figure is wrapped in a paragraph and that paragraph is the first
in a section, ConTeXt adds spurious vertical space above the text
(eyeballing it, I'd say it is \topskip).  Find MWE with workaround below.

Found at https://tex.stackexchange.com/questions/423817

Cheers, Henri

---

\setupwhitespace[big]

\starttext

\startsection[title=section]

    \startmode[fix]
  % Set default whitespace
  \setupwhitespace[none]
    \stopmode

    \startplacefigure
  [location={right},
    title={just a dummy figure}]
  \externalfigure[dummy][width=.5\textwidth]
    \stopplacefigure

    \input lorem

    \startmode[fix]
  % Restore whitespace
  \setupwhitespace[big]
    \stopmode

    \input lorem

\stopsection

\stoptext

can you test with

\def\page_sides_wrapup
    {% we need to do this aftergroup
 \aftergroup\par
 \aftergroup\ignoreparskip
 \aftergroup\ignorespaces
 }


Interesting.  This fixes it in beta but not in TL17.


side floats are redone recently ... so partly incompatible code with TL17


BTW: What snapshot is going to be in TL18?


i might push a current





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




--

-
  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] Bug in wrapped placefigure

2018-03-29 Thread Henri Menke
On Thu, 2018-03-29 at 13:20 +0200, Hans Hagen wrote:
> On 3/29/2018 12:50 PM, Henri Menke wrote:
> > 
> > Dear devs,
> > 
> > When a figure is wrapped in a paragraph and that paragraph is the first
> > in a section, ConTeXt adds spurious vertical space above the text
> > (eyeballing it, I'd say it is \topskip).  Find MWE with workaround below.
> > 
> > Found at https://tex.stackexchange.com/questions/423817
> > 
> > Cheers, Henri
> > 
> > ---
> > 
> > \setupwhitespace[big]
> > 
> > \starttext
> > 
> > \startsection[title=section]
> > 
> >    \startmode[fix]
> >  % Set default whitespace
> >  \setupwhitespace[none]
> >    \stopmode
> > 
> >    \startplacefigure
> >  [location={right},
> >    title={just a dummy figure}]
> >  \externalfigure[dummy][width=.5\textwidth]
> >    \stopplacefigure
> > 
> >    \input lorem
> > 
> >    \startmode[fix]
> >  % Restore whitespace
> >  \setupwhitespace[big]
> >    \stopmode
> > 
> >    \input lorem
> > 
> > \stopsection
> > 
> > \stoptext
> can you test with
> 
> \def\page_sides_wrapup
>    {% we need to do this aftergroup
> \aftergroup\par
> \aftergroup\ignoreparskip
> \aftergroup\ignorespaces
> }

Interesting.  This fixes it in beta but not in TL17.

BTW: What snapshot is going to be in TL18?

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

<    7   8   9   10   11   12   13   14   15   16   >