[NTG-context] help wanted: English native speaker as co-editor

2023-04-16 Thread Henning Hraban Ramm via ntg-context
Hi, as most of you know, I’m the editor of context journal, the annual 
magazine for all members of context group, AKA “proceedings of the 
[previous] ConTeXt meeting”.


While I have some experience as an editor in German, my English is far 
from perfect, so I need to rely on a native speaker for proofreading.


In the least years, Clyde was filling that role very diligently, but he 
just moved and can’t make the time again.


Deadline for the current issue is only in August, but we’re already at 
~100 pages with the articles I got (by Willi, Willi, Willi, Taco, Taco, 
Götz, and me) and I’d like to spread the work a bit.


* Would you like to help with that? *

– You don’t need to understand the code.
– I want the text to be correct and understandable, we don’t need to 
reach literary quality.

– You can work in PDF or in the sources, as you like.
– More than one person is welcome.


BTW I never thought of offering “our” articles to TUG and NTG, while I 
sometimes got articles that were published in TUGboat or MAPS first. 
(And I’m writing/translating for DANTE’s DTK regularly.) I’ll start to 
do that, since “recycling” makes sense, and it also can’t hurt to spread 
the word.



This is also a reminder to hand in your talks from Dreifelden – or new 
articles!



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

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


Re: [NTG-context] Help with typesetting footnotes in an HTML document

2023-04-12 Thread Denis Maier via ntg-context
Depending on how complex your files are, you might want to have a look at 
pandoc. It does a decent job when converting docx to other formats (HTML, 
Markdown or even ConTeXt).

Best & good luck
Denis

> -Ursprüngliche Nachricht-
> Von: Keith McKay 
> Gesendet: Mittwoch, 12. April 2023 12:22
> An: Maier, Denis Christian (UB) ; ntg-
> cont...@ntg.nl
> Betreff: Re: AW: AW: [NTG-context] Help with typesetting footnotes in an
> HTML document
> 
> Hi Denis,
> 
> Thanks for the code, I shall give this a try.
> 
> To get the html file I convert a docx file using a wordpress multisite app 
> called
> Pressbooks, a book content management system for book publishing in
> various formats such as the web, pdf, epub and various xml flavours (see
> pressbooks.com). My interest was that docx files could be imported into
> pressbooks, edited and then exported as html which I then used in ConTeXt
> to produce pdf. Pressbooks has an open source option and they give
> instructions on how to self-host on a local web server, which is what I have
> done (see pressbooks.org). It is, I suppose, like using a sledgehammer to
> crack a nut, and the html files produced are quite complicated. I'm still in 
> the
> experimental stage with it.
> 
> Before trying out Pressbooks, I had previously produced two
> books(novels) by converting docx files to epub using an epub extension to
> Libre Office, then edit/clean-up the epub using Sigil epub editor.
> Finally I extract the individual xhtml files and input into ConTeXt.
> That was much easier and the files much less complicated, however those
> books did not have footnotes so I shall have to check that out in Sigil.
> I'm still experimenting to get a simple workflow for the conversion of docx
> files to simple (x)html files.
> 
> Thanks again for the code.
> 
> Best Wishes
> 
> Keith
> 
> On 12/04/2023 09:05, denis.ma...@unibe.ch wrote:
> > Hey Keith,
> >
> > the code below should get you started. Obviously, the links in the
> footnotes don't appear as there are no setups for the  elements yet.
> >
> > By the way, where is the HTML coming from? The dual structure for
> footnotes looks a bit odd and a bit too complicated for me.
> >
> > ==
> > \startxmlsetups xml:initialize
> > \xmlsetsetup{\xmldocument}{*}{-}
> > \xmlsetsetup{\xmldocument}{html|body|p|}{xml:*}
> >
> > %\xmlsetsetup{#1}{span[@class="data-fnref"]}{xml:footnote} % data-
> fnref is not a class; also -> the element won't be seen if the parent span is
> not treated in some way.
> > \xmlsetsetup{#1}{span[@class="footnote"]}{xml:footnote-wrapper}
> > \xmlsetsetup{#1}{span[@class="footnote-indirect"]}{xml:footnote}
> > \xmlsetsetup{#1}{div[@class="footnotes"]}{xml:nothing}
> >
> > \stopxmlsetups
> > \xmlregistersetup{xml:initialize}
> >
> > \startxmlsetups xml:html
> > \xmlflush{#1}
> > \stopxmlsetups
> >
> > \startxmlsetups xml:body
> > \xmlflush{#1}
> > \stopxmlsetups
> >
> > \startxmlsetups xml:p
> > \xmlflush{#1}\par
> > \stopxmlsetups
> >
> > \startxmlsetups xml:footnote-wrapper
> > \xmlflush{#1}
> > \stopxmlsetups
> >
> > \startxmlsetups xml:footnote
> > \footnote
> > %
> > {\xmlfirst{test}{div[@class="footnotes"]/div/div[@id="\xmlatt{#1}{id}"
> > ]}} -> test is not the document name nor the name of the node to be
> > processed>; div/div nesting was wrong; for some reason I can't get it
> > to work with xmlfirst. But \xmlfilter works
> > {\xmlfilter{\xmldocument}{div[@id='\xmlrefatt{#1}{data-fnref}']/comman
> > d(xml:test)}}
> > \stopxmlsetups
> >
> > \startxmlsetups xml:test
> > \xmlflush{#1}
> > \stopxmlsetups
> >
> >
> > \starttext
> >
> > \xmlprocessfile{initialise}{footnoteTest.html}{}
> >
> > \stoptext
> >
> ==
> ===
> >
> >> -Ursprüngliche Nachricht-
> >> Von: Keith McKay 
> >> Gesendet: Dienstag, 11. April 2023 17:53
> >> An: Maier, Denis Christian (UB) ; ntg-
> >> cont...@ntg.nl
> >> Betreff: Re: AW: [NTG-context] Help with typesetting footnotes in an
> >> HTML document
> >>
> >> Fair comment Denis.
> >>
> >> I decided to try the lookup based approach on pages 85 - 86 of the
> >> xml manual and my setups are based on those pages. I have to admit
> >> that I find the xml manual a wee bit difficult in places since xml is 
> >

Re: [NTG-context] Help with typesetting footnotes in an HTML document

2023-04-12 Thread Keith McKay via ntg-context

Hi Denis,

Thanks for the code, I shall give this a try.

To get the html file I convert a docx file using a wordpress multisite 
app called Pressbooks, a book content management system for book 
publishing in various formats such as the web, pdf, epub and various xml 
flavours (see pressbooks.com). My interest was that docx files could be 
imported into pressbooks, edited and then exported as html which I then 
used in ConTeXt to produce pdf. Pressbooks has an open source option and 
they give instructions on how to self-host on a local web server, which 
is what I have done (see pressbooks.org). It is, I suppose, like using a 
sledgehammer to crack a nut, and the html files produced are quite 
complicated. I'm still in the experimental stage with it.


Before trying out Pressbooks, I had previously produced two 
books(novels) by converting docx files to epub using an epub extension 
to Libre Office, then edit/clean-up the epub using Sigil epub editor. 
Finally I extract the individual xhtml files and input into ConTeXt. 
That was much easier and the files much less complicated, however those 
books did not have footnotes so I shall have to check that out in Sigil. 
I'm still experimenting to get a simple workflow for the conversion of 
docx files to simple (x)html files.


Thanks again for the code.

Best Wishes

Keith

On 12/04/2023 09:05, denis.ma...@unibe.ch wrote:

Hey Keith,

the code below should get you started. Obviously, the links in the footnotes don't 
appear as there are no setups for the  elements yet.

By the way, where is the HTML coming from? The dual structure for footnotes 
looks a bit odd and a bit too complicated for me.

==
\startxmlsetups xml:initialize
\xmlsetsetup{\xmldocument}{*}{-}
\xmlsetsetup{\xmldocument}{html|body|p|}{xml:*}

%\xmlsetsetup{#1}{span[@class="data-fnref"]}{xml:footnote} % data-fnref is not a 
class; also -> the element won't be seen if the parent span is not treated in some way.
\xmlsetsetup{#1}{span[@class="footnote"]}{xml:footnote-wrapper}
\xmlsetsetup{#1}{span[@class="footnote-indirect"]}{xml:footnote}
\xmlsetsetup{#1}{div[@class="footnotes"]}{xml:nothing}

\stopxmlsetups
\xmlregistersetup{xml:initialize}

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

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

\startxmlsetups xml:p
\xmlflush{#1}\par
\stopxmlsetups

\startxmlsetups xml:footnote-wrapper
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:footnote
\footnote
% {\xmlfirst{test}{div[@class="footnotes"]/div/div[@id="\xmlatt{#1}{id}"]}} -> 
test is not the document name nor the name of the node to be processed>; div/div nesting was wrong; 
for some reason I can't get it to work with xmlfirst. But \xmlfilter works
{\xmlfilter{\xmldocument}{div[@id='\xmlrefatt{#1}{data-fnref}']/command(xml:test)}}
\stopxmlsetups

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


\starttext

\xmlprocessfile{initialise}{footnoteTest.html}{}

\stoptext
=


-Ursprüngliche Nachricht-
Von: Keith McKay 
Gesendet: Dienstag, 11. April 2023 17:53
An: Maier, Denis Christian (UB) ; ntg-
cont...@ntg.nl
Betreff: Re: AW: [NTG-context] Help with typesetting footnotes in an HTML
document

Fair comment Denis.

I decided to try the lookup based approach on pages 85 - 86 of the xml
manual and my setups are based on those pages. I have to admit that I find
the xml manual a wee bit difficult in places since xml is outside my expertise.
I attach my tex and html files which should save some copy and pasting.

Thanks

Keith McKay

On 11/04/2023 14:51, denis.ma...@unibe.ch wrote:

Hard to tell, if you don't show us what you've tried so far.
In one of my setups I use the lua based approach described on page 86/87.

But again, we'll probably need more information to figure it out.

-Ursprüngliche Nachricht-
Von: ntg-context  Im Auftrag von Keith
McKay via ntg-context
Gesendet: Montag, 10. April 2023 17:30
An: mailing list for ConTeXt users 
Cc: Keith McKay 
Betreff: [NTG-context] Help with typesetting footnotes in an HTML
document

Hi,

I have been puzzling over how to typeset footnotes in a HTML
document, most elements have been relatively easy to typeset but I'm
stumped with footnotes.  I have been studying the the xml manual in
particular Chapter  7.4 Cross Referencing, but I'm still struggling
to get xmlsetups which come anywhere near working. Any hints  to a
solution would be greatly appreciated.

Best Wishes

Keith McKay

%%%

Here is a snippet of the HTML document with footnotes

 http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd;>
http://www.w3.org/1999/xhtml; xml:lang="en"> 
     


     ‘What is a weed? A plant whose virtues
have not been discovered,’ wrote Ralph Waldo Emerson. Those delicate crucifers with their
manifold faces of four pink or lilac petals striated w

Re: [NTG-context] Help with typesetting footnotes in an HTML document

2023-04-12 Thread Denis Maier via ntg-context
Hey Keith,

the code below should get you started. Obviously, the links in the footnotes 
don't appear as there are no setups for the  elements yet.

By the way, where is the HTML coming from? The dual structure for footnotes 
looks a bit odd and a bit too complicated for me.

==
\startxmlsetups xml:initialize
\xmlsetsetup{\xmldocument}{*}{-}
\xmlsetsetup{\xmldocument}{html|body|p|}{xml:*}

%\xmlsetsetup{#1}{span[@class="data-fnref"]}{xml:footnote} % data-fnref is not 
a class; also -> the element won't be seen if the parent span is not treated in 
some way.
\xmlsetsetup{#1}{span[@class="footnote"]}{xml:footnote-wrapper}
\xmlsetsetup{#1}{span[@class="footnote-indirect"]}{xml:footnote}
\xmlsetsetup{#1}{div[@class="footnotes"]}{xml:nothing}

\stopxmlsetups
\xmlregistersetup{xml:initialize}

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

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

\startxmlsetups xml:p
\xmlflush{#1}\par
\stopxmlsetups

\startxmlsetups xml:footnote-wrapper
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:footnote
\footnote
% {\xmlfirst{test}{div[@class="footnotes"]/div/div[@id="\xmlatt{#1}{id}"]}} -> 
test is not the document name nor the name of the node to be processed>; 
div/div nesting was wrong; for some reason I can't get it to work with 
xmlfirst. But \xmlfilter works
{\xmlfilter{\xmldocument}{div[@id='\xmlrefatt{#1}{data-fnref}']/command(xml:test)}}
\stopxmlsetups

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


\starttext

\xmlprocessfile{initialise}{footnoteTest.html}{}

\stoptext
=

> -Ursprüngliche Nachricht-
> Von: Keith McKay 
> Gesendet: Dienstag, 11. April 2023 17:53
> An: Maier, Denis Christian (UB) ; ntg-
> cont...@ntg.nl
> Betreff: Re: AW: [NTG-context] Help with typesetting footnotes in an HTML
> document
> 
> Fair comment Denis.
> 
> I decided to try the lookup based approach on pages 85 - 86 of the xml
> manual and my setups are based on those pages. I have to admit that I find
> the xml manual a wee bit difficult in places since xml is outside my 
> expertise.
> I attach my tex and html files which should save some copy and pasting.
> 
> Thanks
> 
> Keith McKay
> 
> On 11/04/2023 14:51, denis.ma...@unibe.ch wrote:
> > Hard to tell, if you don't show us what you've tried so far.
> > In one of my setups I use the lua based approach described on page 86/87.
> But again, we'll probably need more information to figure it out.
> >
> >> -Ursprüngliche Nachricht-
> >> Von: ntg-context  Im Auftrag von Keith
> >> McKay via ntg-context
> >> Gesendet: Montag, 10. April 2023 17:30
> >> An: mailing list for ConTeXt users 
> >> Cc: Keith McKay 
> >> Betreff: [NTG-context] Help with typesetting footnotes in an HTML
> >> document
> >>
> >> Hi,
> >>
> >> I have been puzzling over how to typeset footnotes in a HTML
> >> document, most elements have been relatively easy to typeset but I'm
> >> stumped with footnotes.  I have been studying the the xml manual in
> >> particular Chapter  7.4 Cross Referencing, but I'm still struggling
> >> to get xmlsetups which come anywhere near working. Any hints  to a
> >> solution would be greatly appreciated.
> >>
> >> Best Wishes
> >>
> >> Keith McKay
> >>
> >> %%%
> >>
> >> Here is a snippet of the HTML document with footnotes
> >>
> >>   >> "-//W3C//DTD XHTML 1.1//EN"
> >>     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd;>
> >> http://www.w3.org/1999/xhtml; xml:lang="en"> 
> >>     
> >> 
> >> 
> >>     ‘What is a weed? A plant whose virtues
> >> have not been discovered,’ wrote Ralph Waldo Emerson >> class="footnote"> >> data-fnref="53-1">. Those delicate crucifers with their
> >> manifold faces of four pink or lilac petals striated with veins of
> >> deeper lavender are the perfect introduction to flowers for children.
> >> So delicate and yet hardy.
> >>     I spend some of April abroad, travelling
> >> by road from an unseasonably snowy Austria (‘dieses Wetter ist
> >> verrückt!’ >> data-fnref="53-2"> as an elderly lady exclaimed to me)
> >> to northern France, and when I come home, it’s to a landscape
> >> responding to substantially increased light levels and temperatures.
> >>     This was the early sixties. Like many
> >> thousands, we were rehou

Re: [NTG-context] Help with typesetting footnotes in an HTML document

2023-04-11 Thread Denis Maier via ntg-context
Hard to tell, if you don't show us what you've tried so far.
In one of my setups I use the lua based approach described on page 86/87. But 
again, we'll probably need more information to figure it out.

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Keith
> McKay via ntg-context
> Gesendet: Montag, 10. April 2023 17:30
> An: mailing list for ConTeXt users 
> Cc: Keith McKay 
> Betreff: [NTG-context] Help with typesetting footnotes in an HTML
> document
> 
> Hi,
> 
> I have been puzzling over how to typeset footnotes in a HTML document,
> most elements have been relatively easy to typeset but I'm stumped with
> footnotes.  I have been studying the the xml manual in particular Chapter  7.4
> Cross Referencing, but I'm still struggling to get xmlsetups which come
> anywhere near working. Any hints  to a solution would be greatly
> appreciated.
> 
> Best Wishes
> 
> Keith McKay
> 
> %%%
> 
> Here is a snippet of the HTML document with footnotes
> 
> 
>     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd;>
> http://www.w3.org/1999/xhtml; xml:lang="en"> 
>    
> 
> 
>    ‘What is a weed? A plant whose virtues have
> not been discovered,’ wrote Ralph Waldo Emerson class="footnote"> data-fnref="53-1">. Those delicate crucifers with their
> manifold faces of four pink or lilac petals striated with veins of deeper
> lavender are the perfect introduction to flowers for children. So delicate and
> yet hardy.
>    I spend some of April abroad, travelling by road
> from an unseasonably snowy Austria (‘dieses Wetter ist verrückt!’ class="footnote"> data-fnref="53-2"> as an elderly lady exclaimed to me) to
> northern France, and when I come home, it’s to a landscape responding to
> substantially increased light levels and temperatures.
>    This was the early sixties. Like many thousands,
> we were rehoused from Maryhill in the heart of urban Glasgow to this
> peripheral housing scheme which completely changed the character of what
> had been a village. Within a decade those glasshouses were abandoned,
> glass broken in the frames, and a row of shops that included a chippy and a
> betting shop soon replaced them, betting ‘off’ licensed race-tracks having
> become legal in 1961.
>    
>      
>      
>    Emerson, R.W. (1878) Fortune of the Republic, p.3 quoted in
> Oxford Dictionary of Quotations, Rev Fourth Edition (1996).
>      
>      
>    ‘Crazy weather!’
>      
>      
>     href="http://www.independent.co.uk/sport/racing/our-national-love-affair-
> a-history-of-the-betting-shop-804966.html"
> data-url="http://www.independent.co.uk/sport/racing/our-national-love-
> affair-a-history-of-the-betting-shop-804966.html"> class="import-Hyperlink">http://www.independent.co.uk/sport/racing/our-
> national-love-affair-a-history-of-the-betting-shop-804966.html
> [accessed 11 Dec 2017]
>      
>    
> 
> 
> 
> %%
> 
> __
> _
> If your question is of interest to others as well, please add an entry to the
> Wiki!
> 
> maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-
> context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> __
> _
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Help with typesetting footnotes in an HTML document

2023-04-11 Thread Keith McKay via ntg-context

Fair comment Denis.

I decided to try the lookup based approach on pages 85 - 86 of the xml 
manual and my setups are based on those pages. I have to admit that I 
find the xml manual a wee bit difficult in places since xml is outside 
my expertise. I attach my tex and html files which should save some copy 
and pasting.


Thanks

Keith McKay

On 11/04/2023 14:51, denis.ma...@unibe.ch wrote:

Hard to tell, if you don't show us what you've tried so far.
In one of my setups I use the lua based approach described on page 86/87. But 
again, we'll probably need more information to figure it out.


-Ursprüngliche Nachricht-
Von: ntg-context  Im Auftrag von Keith
McKay via ntg-context
Gesendet: Montag, 10. April 2023 17:30
An: mailing list for ConTeXt users 
Cc: Keith McKay 
Betreff: [NTG-context] Help with typesetting footnotes in an HTML
document

Hi,

I have been puzzling over how to typeset footnotes in a HTML document,
most elements have been relatively easy to typeset but I'm stumped with
footnotes.  I have been studying the the xml manual in particular Chapter  7.4
Cross Referencing, but I'm still struggling to get xmlsetups which come
anywhere near working. Any hints  to a solution would be greatly
appreciated.

Best Wishes

Keith McKay

%%%

Here is a snippet of the HTML document with footnotes


http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd;>
http://www.w3.org/1999/xhtml; xml:lang="en"> 
    


    ‘What is a weed? A plant whose virtues have
not been discovered,’ wrote Ralph Waldo Emerson. Those delicate crucifers with their
manifold faces of four pink or lilac petals striated with veins of deeper
lavender are the perfect introduction to flowers for children. So delicate and
yet hardy.
    I spend some of April abroad, travelling by road
from an unseasonably snowy Austria (‘dieses Wetter ist verrückt!’ as an elderly lady exclaimed to me) to
northern France, and when I come home, it’s to a landscape responding to
substantially increased light levels and temperatures.
    This was the early sixties. Like many thousands,
we were rehoused from Maryhill in the heart of urban Glasgow to this
peripheral housing scheme which completely changed the character of what
had been a village. Within a decade those glasshouses were abandoned,
glass broken in the frames, and a row of shops that included a chippy and a
betting shop soon replaced them, betting ‘off’ licensed race-tracks having
become legal in 1961.
    
      
      
    Emerson, R.W. (1878) Fortune of the Republic, p.3 quoted in
Oxford Dictionary of Quotations, Rev Fourth Edition (1996).
      
      
    ‘Crazy weather!’
      
      
    http://www.independent.co.uk/sport/racing/our-national-love-affair-
a-history-of-the-betting-shop-804966.html"
data-url="http://www.independent.co.uk/sport/racing/our-national-love-
affair-a-history-of-the-betting-shop-804966.html">http://www.independent.co.uk/sport/racing/our-
national-love-affair-a-history-of-the-betting-shop-804966.html
[accessed 11 Dec 2017]
      
    



%%

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

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

FootnoteTest.tex
Description: TeX document







  ‘What is a weed? A plant whose virtues have not been discovered,’ wrote Ralph Waldo Emerson. Those delicate crucifers with their manifold faces of four pink or lilac petals striated with veins of deeper lavender are the perfect introduction to flowers for children. So delicate and yet hardy.
  I spend some of April abroad, travelling by road from an unseasonably snowy Austria (‘dieses Wetter ist verrückt!’ as an elderly lady exclaimed to me) to northern France, and when I come home, it’s to a landscape responding to substantially increased light levels and temperatures.
  This was the early sixties. Like many thousands, we were rehoused from Maryhill in the heart of urban Glasgow to this peripheral housing scheme which completely changed the character of what had been a village. Within a decade those glasshouses were abandoned, glass broken in the frames, and a row of shops that included a chippy and a betting shop soon replaced them, betting ‘off’ licensed race-tracks having become legal in 1961.
  


  Emerson, R.W. (1878) Fortune of the Republic, p.3 quoted in Oxford Dictionary of Quotations, Rev Fourth Edition (1996).


  ‘Crazy weather!’


  http://www.independent.co.uk/sport/racing/our-national-love-affair-a-history-of-the-betting-shop

[NTG-context] Help with typesetting footnotes in an HTML document

2023-04-10 Thread Keith McKay via ntg-context

Hi,

I have been puzzling over how to typeset footnotes in a HTML document, 
most elements have been relatively easy to typeset but I'm stumped with 
footnotes.  I have been studying the the xml manual in particular 
Chapter  7.4 Cross Referencing, but I'm still struggling to get 
xmlsetups which come anywhere near working. Any hints  to a solution 
would be greatly appreciated.


Best Wishes

Keith McKay

%%%

Here is a snippet of the HTML document with footnotes


http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd;>
http://www.w3.org/1999/xhtml; xml:lang="en">

  


  ‘What is a weed? A plant whose virtues have 
not been discovered,’ wrote Ralph Waldo Emersonclass="footnote">data-fnref="53-1">. Those delicate crucifers with their 
manifold faces of four pink or lilac petals striated with veins of 
deeper lavender are the perfect introduction to flowers for children. So 
delicate and yet hardy.
  I spend some of April abroad, travelling by 
road from an unseasonably snowy Austria (‘dieses Wetter ist 
verrückt!’data-fnref="53-2"> as an elderly lady exclaimed to me) to 
northern France, and when I come home, it’s to a landscape responding to 
substantially increased light levels and temperatures.
  This was the early sixties. Like many 
thousands, we were rehoused from Maryhill in the heart of urban Glasgow 
to this peripheral housing scheme which completely changed the character 
of what had been a village. Within a decade those glasshouses were 
abandoned, glass broken in the frames, and a row of shops that included 
a chippy and a betting shop soon replaced them, betting ‘off’ licensed 
race-tracks having become legal in 1961.class="footnote-indirect" data-fnref="75-1">

  
    
    
  Emerson, R.W. (1878) Fortune of the Republic, p.3 quoted 
in Oxford Dictionary of Quotations, Rev Fourth Edition (1996).

    
    
  ‘Crazy weather!’
    
    
  href="http://www.independent.co.uk/sport/racing/our-national-love-affair-a-history-of-the-betting-shop-804966.html; 
data-url="http://www.independent.co.uk/sport/racing/our-national-love-affair-a-history-of-the-betting-shop-804966.html;>class="import-Hyperlink">http://www.independent.co.uk/sport/racing/our-national-love-affair-a-history-of-the-betting-shop-804966.html 
[accessed 11 Dec 2017]

    
  



%%

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

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


Re: [NTG-context] Help for using fonts Nupuram

2022-12-23 Thread Alain Delmotte via ntg-context

Thank you for your help.

It works.

Alain

Thanks for you help.



Merry Christmas and Happy New Year,
Regards

--
Alain


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

maillist :ntg-context@ntg.nl  /https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  :https://www.pragma-ade.nl  /http://context.aanhet.net
archive  :https://bitbucket.org/phg/context-mirror/commits/
wiki :https://contextgarden.net
__
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Help for using fonts Nupuram

2022-12-23 Thread Pablo Rodriguez via ntg-context
On 12/23/22 13:50, Pablo Rodriguez via ntg-context wrote:
> On 12/23/22 12:00, Alain Delmotte via ntg-context wrote:
> Color should be fine. I’m checking what may be wrong with weight.

Alain,

nothing is wrong with weight (https://pdf.ousia.tk/wght.pdf):

  \starttext
\startTEXpage[offset=1em, width=12em]
\dorecurse{20}
  {\definefontfeature[\recurselevel]
[axis={wght={\the\numexpr\recurselevel * 50\relax}},
  colr={\recurselevel}]
   \definedfont[Nupuram-Color.colrv1.otf*\recurselevel]abcde }
\stopTEXpage
  \stoptext

It works fine with LMTX (but not with MkIV [not sure whether this is
intended]).

Just in case it helps,

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

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


Re: [NTG-context] Help for using fonts Nupuram

2022-12-23 Thread Pablo Rodriguez via ntg-context
On 12/23/22 12:00, Alain Delmotte via ntg-context wrote:
> Hi!
> 
> I am trying to run the example Hans published on the 1st of December
> with a new upload.
> It is about using the variable font Nupuram.

Hi Alain,

you mean https://mailman.ntg.nl/pipermail/ntg-context/2022/107279.html.

> After looking to contextgarden,I tried to put the "Nupuram" sub-folder
> or only the folders with .otf in different places of my context-lmtx
> folder, and using "mtxrun --script font --reload".
> But the example of Hans didn't work.

After installing fonts, I always run:

  mtxrun --scripts cache --erase && mtxrun --generate

This helps to remove all the cache (so it doesn’t interfere with new
features to read fonts [among other things]).

> Then I install the .ttf font files in Windows\fonts; it works, but 1)
> trying to install the Nupuram-VF.ttf, I have the message that
> Nupuram-Regular is already installed; and 2) I get the font in the
> example, but no changes of width or colour.

Install either the variable font or the singular fonts. And also install
OTF or TTF. This prevents clashes with font names.

https://smc.org.in/downloads/fonts/nupuram/Nupuram.zip doesn’t contain
the color version.

https://smc.gitlab.io/fonts/Nupuram/fonts/Nupuram-Color.zip contains it.
From fonts/Nupuram-Color/otf-color/ copy Nupuram-Color.colrv1.otf (to
the directory below).

After having copied the font to texmf-fonts/, run "mtxrun --scripts
cache --erase && mtxrun --generate".

Color should be fine. I’m checking what may be wrong with weight.

> So, now I deleted all the Nupuram everywhere.
> How could I have it fully working under context-lmtx?
> 
> I have different places for fonts in my context-lmtx:
> - texmf-fonts  empty

This is the right directory to copy you fonts. It doesn’t get modified
(so contents won’t be erased after an update).

Other directories aren’t designed to contain user fonts.

I hope it helps now. Happy holiday season,

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

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


Re: [NTG-context] Help for using fonts Nupuram

2022-12-23 Thread Hans Hagen via ntg-context

sorry, it's

mtxrun --generate



-
  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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Help for using fonts Nupuram

2022-12-23 Thread Hans Hagen via ntg-context

On 12/23/2022 12:00 PM, Alain Delmotte via ntg-context wrote:

Hi!

I am trying to run the example Hans published on the 1st of December 
with a new upload.

It is about using the variable font Nupuram.

I downloaded the font in a big .zip file.
It contains: two explaining files and  folder with  sub-folder 
"Nupuram", which in turn contains 6 subsub-filders:

- otf with 32 otf font files
- otf-variable with 1 file "Nupuram-VF.otf"
- ttf with 32 ttf font files
- ttf-variable with 1 file "Nupuram-VF.ttf"
- ufo with 32 subfolders xxx.ufo
- webfonts with 33 xxx.woff2 files

After looking to contextgarden,I tried to put the "Nupuram" sub-folder 
or only the folders with .otf in different places of my context-lmtx 
folder, and using "mtxrun --script font --reload".

But the example of Hans didn't work.

Then I install the .ttf font files in Windows\fonts; it works, but 1) 
trying to install the Nupuram-VF.ttf, I have the message that 
Nupuram-Regular is already installed; and 2) I get the font in the 
example, but no changes of width or colour.


So, now I deleted all the Nupuram everywhere.
How could I have it fully working under context-lmtx?

I have different places for fonts in my context-lmtx:
- tex\texmf\fonts  mainly empty except \data
- texmf-context\fonts  populated
- texmf-fonts  empty
- texmf-modules\fonts  populated
don't mis instances and variable fonts here because they have clashing 
(internal) names; put the variable fonts in:


fonts/data/nupuram/*

then run mtxrun --make

and see if s-fonts-variable.mk*v runs (check at the end what font is used)

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Help for using fonts Nupuram

2022-12-23 Thread Alain Delmotte via ntg-context

Hi!

I am trying to run the example Hans published on the 1st of 
December with a new upload.

It is about using the variable font Nupuram.

I downloaded the font in a big .zip file.
It contains: two explaining files and  folder with  
sub-folder "Nupuram", which in turn contains 6 subsub-filders:

- otf with 32 otf font files
- otf-variable with 1 file "Nupuram-VF.otf"
- ttf with 32 ttf font files
- ttf-variable with 1 file "Nupuram-VF.ttf"
- ufo with 32 subfolders xxx.ufo
- webfonts with 33 xxx.woff2 files

After looking to contextgarden,I tried to put the "Nupuram" 
sub-folder or only the folders with .otf in different places 
of my context-lmtx folder, and using "mtxrun --script font 
--reload".

But the example of Hans didn't work.

Then I install the .ttf font files in Windows\fonts; it 
works, but 1) trying to install the Nupuram-VF.ttf, I have 
the message that Nupuram-Regular is already installed; and 
2) I get the font in the example, but no changes of width or 
colour.


So, now I deleted all the Nupuram everywhere.
How could I have it fully working under context-lmtx?

I have different places for fonts in my context-lmtx:
- tex\texmf\fonts  mainly empty except \data
- texmf-context\fonts  populated
- texmf-fonts  empty
- texmf-modules\fonts  populated

Thanks for you help.

Merry Christmas and Happy New Year,
Regards

--
Alain

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

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


Re: [NTG-context] Help test a LMTX bug fix: tweaks in PDF generation

2022-10-11 Thread Gerion Entrup via ntg-context
Am Sonntag, 9. Oktober 2022, 17:33:09 CEST schrieb Leah Neukirchen via 
ntg-context:
> So please: Try to preview and then try to print the attached PDF;
> and report back if either preview or printout does not look like
> the attached reference PNG image (i.e. something is missing,
> the fonts look different, or have wrong relative size.)

Okular, MuPDF and pdf.js (Firefox) on Linux look fine.
Gimp and Krita also look fine (but I think they are both using poppler).
LibreOffice Draw does not (font sizes are wrong). However, this is not directly 
a PDF viewer, so I'm pretty sure it can be ignored.

Best,
Gerion




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

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


Re: [NTG-context] Help test a LMTX bug fix: tweaks in PDF generation

2022-10-10 Thread Pablo Rodriguez via ntg-context
On 10/9/22 17:33, Leah Neukirchen via ntg-context wrote:
> [...]
> So please: Try to preview and then try to print the attached PDF;
> and report back if either preview or printout does not look like
> the attached reference PNG image (i.e. something is missing,
> the fonts look different, or have wrong relative size.)

Hi Leah,

I used Acrobat DC, SumatraPDF and Firefox in Windows and all programs
displayed and printed your document fine (Canon imageRUNNER ADVANCE).

I had no issues before printing LMTX-generated documents.

Many thanks for your work fixing the issues (wrong font display and
printing with some printers),

Pablo

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

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


Re: [NTG-context] Help test a LMTX bug fix: tweaks in PDF generation

2022-10-10 Thread Rik Kabel via ntg-context

Win 11 64 Intel, Sumatra PDF 3.4.6 to Brother MFC-L2740DW looks good.

Win 11 64 Intel, Sumatra PDF 3.4.6 to HP LJPro M254dw looks good.

Printing via Firefox, as others have noted, is fuzzy, but nothing is 
missing.


--
Rik


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

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


Re: [NTG-context] Help test a LMTX bug fix: tweaks in PDF generation

2022-10-10 Thread Willi Egger via ntg-context
I printed the file with a HP Officejet 7740 through Wifi from a MacBook Air 
(old form 2013). - The PDF-reader is Skim.  ConTeXt Version 2022.09.11 20:44 — 
There is a perfect print. 

Willi

> On 10 Oct 2022, at 11:24, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> Am 10.10.22 um 10:50 schrieb Keith McKay via ntg-context:
>> Hi,
>> I printed the file from my Apple mac mini M1 wirelessly to my HP Color 
>> LaserJet MFP M283fdw from Thunderbird, Adobe Acrobat DC, Skim and Texshop. 
>> The latter three were essentially identical and clear but that from 
>> Thunderbird was fuzzy and not as sharp as the others.
> 
> The latter is because Thunderbird uses pdf.js, and that prints PDFs as images 
> (rasterized in a low resolution), as Leah confirmed my guess.
> 
> Hraban
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

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

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


Re: [NTG-context] Help test a LMTX bug fix: tweaks in PDF generation

2022-10-10 Thread Henning Hraban Ramm via ntg-context

Am 10.10.22 um 10:50 schrieb Keith McKay via ntg-context:

Hi,

I printed the file from my Apple mac mini M1 wirelessly to my HP Color 
LaserJet MFP M283fdw from Thunderbird, Adobe Acrobat DC, Skim and 
Texshop. The latter three were essentially identical and clear but that 
from Thunderbird was fuzzy and not as sharp as the others.


The latter is because Thunderbird uses pdf.js, and that prints PDFs as 
images (rasterized in a low resolution), as Leah confirmed my guess.


Hraban

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

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


Re: [NTG-context] Help test a LMTX bug fix: tweaks in PDF generation

2022-10-10 Thread Keith McKay via ntg-context

Hi,

I printed the file from my Apple mac mini M1 wirelessly to my HP Color 
LaserJet MFP M283fdw from Thunderbird, Adobe Acrobat DC, Skim and 
Texshop. The latter three were essentially identical and clear but that 
from Thunderbird was fuzzy and not as sharp as the others.


Best Wishes

Keith McKay

On 09/10/2022 16:33, Leah Neukirchen via ntg-context wrote:

Hi,

last week we had a long thread about non-printing PDF on this list and
together with Hans I tracked down the issue and we found a fix.
Since it changes some details of how PDFs are generated by LMTX, we'd
like to test this change first on a wide range of software and
printers.

So please: Try to preview and then try to print the attached PDF;
and report back if either preview or printout does not look like
the attached reference PNG image (i.e. something is missing,
the fonts look different, or have wrong relative size.)

If you use other PDF tools in your workflow, please also check they
continue to work as before (and just as well as with MKIV-generated PDFs).


Thank you very much,

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

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

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

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


Re: [NTG-context] Help test a LMTX bug fix: tweaks in PDF generation

2022-10-09 Thread Leah Neukirchen via ntg-context
Henning Hraban Ramm via ntg-context  writes:

> Am 09.10.22 um 17:33 schrieb Leah Neukirchen via ntg-context:
>> Hi,
>> last week we had a long thread about non-printing PDF on this list
>> and
>> together with Hans I tracked down the issue and we found a fix.
>> Since it changes some details of how PDFs are generated by LMTX, we'd
>> like to test this change first on a wide range of software and
>> printers.
>> So please: Try to preview and then try to print the attached PDF;
>> and report back if either preview or printout does not look like
>> the attached reference PNG image (i.e. something is missing,
>> the fonts look different, or have wrong relative size.)
>> If you use other PDF tools in your workflow, please also check they
>> continue to work as before (and just as well as with MKIV-generated PDFs).
>
> Hi Leah, thank you!
>
> I viewed and printed the PDF with pdf.js in Thunderbird, Apple Preview
> and Adobe Acrobat Pro 9 to my Kyocera FS-C5100DN color laserprinter
> via KPDL (PS-compatible) driver.
> I don’t see any font problems, but neither text nor the bar are 100%
> black – is this intentional? Doesn’t look like RGB black, there are no
> other colors involved except in the printout from pdf.js.

Should be all black (CMYK black), but we didn't change this.
Picking from the screenshot I get #00 on Linux with evince, mupdf,
pdf.js.

> pdf.js seems to print as image and blurs the outlines. (I never tried
> to print from pdf.js before, is this normal?)

Yes, unfortunately.  But not related to our changes.

> Hraban

-- 
Leah Neukirchenhttps://leahneukirchen.org/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Help test a LMTX bug fix: tweaks in PDF generation

2022-10-09 Thread Henning Hraban Ramm via ntg-context

Am 09.10.22 um 17:33 schrieb Leah Neukirchen via ntg-context:

Hi,

last week we had a long thread about non-printing PDF on this list and
together with Hans I tracked down the issue and we found a fix.
Since it changes some details of how PDFs are generated by LMTX, we'd
like to test this change first on a wide range of software and
printers.

So please: Try to preview and then try to print the attached PDF;
and report back if either preview or printout does not look like
the attached reference PNG image (i.e. something is missing,
the fonts look different, or have wrong relative size.)

If you use other PDF tools in your workflow, please also check they
continue to work as before (and just as well as with MKIV-generated PDFs).


Hi Leah, thank you!

I viewed and printed the PDF with pdf.js in Thunderbird, Apple Preview 
and Adobe Acrobat Pro 9 to my Kyocera FS-C5100DN color laserprinter via 
KPDL (PS-compatible) driver.
I don’t see any font problems, but neither text nor the bar are 100% 
black – is this intentional? Doesn’t look like RGB black, there are no 
other colors involved except in the printout from pdf.js.


pdf.js seems to print as image and blurs the outlines. (I never tried to 
print from pdf.js before, is this normal?)


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

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


[NTG-context] Help test a LMTX bug fix: tweaks in PDF generation

2022-10-09 Thread Leah Neukirchen via ntg-context
Hi,

last week we had a long thread about non-printing PDF on this list and
together with Hans I tracked down the issue and we found a fix.
Since it changes some details of how PDFs are generated by LMTX, we'd
like to test this change first on a wide range of software and
printers.

So please: Try to preview and then try to print the attached PDF;
and report back if either preview or printout does not look like
the attached reference PNG image (i.e. something is missing,
the fonts look different, or have wrong relative size.)

If you use other PDF tools in your workflow, please also check they
continue to work as before (and just as well as with MKIV-generated PDFs).



fontmatrixtest.pdf
Description: Adobe PDF document

Thank you very much,
-- 
Leah Neukirchenhttps://leahneukirchen.org/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Help needed with Custodia typescript

2022-05-25 Thread Henning Hraban Ramm via ntg-context

Congrats!
While I don’t know what \mi is, it’s apparently protected. Maybe there’s 
a hint in the log.


Am 25.05.22 um 19:39 schrieb Stefan Nedeljkovic:

Actually I got lucky just now:

\definefontalternative[md]

\definefontalternative[mc]


Works just fine. Thank you for your suggestion Henning!


On Wed, May 25, 2022 at 7:35 PM Stefan Nedeljkovic > wrote:


mtxrun --script fonts --list --all --pattern=Custodia
identifier               familyname   fontname
filename                      subfont   instances


custodiabold             custodia     custodiabold
Custodia-Bold.ttf
custodiabolditalic       custodia     custodiabolditalic  
Custodia-BoldItalic.ttf
custodiaitalic           custodia     custodianormalitalic
Custodia-NormalItalic.ttf
custodianormal           custodia     custodianormal  
Custodia-Normal.ttf
custodianormalitalic     custodia     custodianormalitalic
Custodia-NormalItalic.ttf
custodiaregular          custodia     custodianormal  
Custodia-Normal.ttf
custodiasemibold         custodia     custodiasemibold
Custodia-SemiBold.ttf
custodiasemibolditalic   custodia     custodiasemibolditalic  
Custodia-SemiBoldItalic.ttf


I tried a different name, but the result was the same.

On Wed, May 25, 2022 at 7:12 PM Henning Hraban Ramm via ntg-context
mailto:ntg-context@ntg.nl>> wrote:

Ah, sorry, didn’t know that. I can’t find an error in your code,
but I
don’t have the (commercial) font to test. What’s the output of the
mtxrun font lookup?
Did you try a different shortcut from "mi"?

Hraban

Am 25.05.22 um 18:44 schrieb Stefan Nedeljkovic:
 > It doesn't work for medium weights, as it is not standard. I
took my
 > solution from Wolfgang, here:
 >
https://tex.stackexchange.com/questions/303648/context-font-weights


 >
>
 >
 > On Wed, May 25, 2022 at 6:32 PM Henning Hraban Ramm via
ntg-context
 > mailto:ntg-context@ntg.nl>
>> wrote:
 >
 >     Hi Stefan,
 >
 >     I never used \definebodyfont but either \definefontfamily or
 >     typescripts
 >     with \definefontsynonym.
 >
 >     Did you try \definefontfamily[custodia][rm][Custodia] ?
 >
 > https://wiki.contextgarden.net/Command/definefontfamily

 >     >
 >
 >     Hraban
 >
 >     Am 25.05.22 um 18:20 schrieb Stefan Nedeljkovic via
ntg-context:
 >      >
 >      > Dear list,
 >      >
 >      >
 >      > I'm trying to set up Custodia in LMTX, but the
 >     custodiasemibolditalic
 >      > won't show up. It shows up regularly when I run mtxrun
--script
 >     fonts
 >      > --list --all --pattern=Custodia
 >      >
 >      > I'm attaching the output for reference. Any help would be
 >     appreciated.
 >      >
 >      >
 >      > Sincerely,
 >      >
 >      > Stefan
 >      >
 >      > \definefontalternative[md]
 >      >
 >      > \definefontalternative[mi]
 >      >
 >      >
 >      > \starttypescript [serif] [custodia]
 >      >
 >      > \definefontsynonym[Serif]
[name:custodianormal][features=default]
 >      >
 >      > \definefontsynonym[SerifItalic]
 >      > [name:custodianormalitalic][features=default]
 >      >
 >      > \definefontsynonym[SerifMedium]
 >     [name:custodiasemibold][features=default]
 >      >
 >      > \definefontsynonym[SerifMediumItalic]
 >      > [name:custodiasemibolditalic][features=default]
 >      >
 >      > \definefontsynonym[SerifBold]
[name:custodiabold][features=default]
 >      >
 >      > \definefontsynonym[SerifBoldItalic]
 >      > [name:custodiabolditalic][features=default]
 >      >
 >      > \stoptypescript
 >      >
 >      >
 >      > \starttypescript [serif] [custodia]
 >      >
 >      > \definebodyfont [default] [rm]
 >      >
 >      > [
 >      >
 >     

Re: [NTG-context] Help needed with Custodia typescript

2022-05-25 Thread Stefan Nedeljkovic via ntg-context
Actually I got lucky just now:

\definefontalternative[md]

\definefontalternative[mc]


Works just fine. Thank you for your suggestion Henning!

On Wed, May 25, 2022 at 7:35 PM Stefan Nedeljkovic 
wrote:

> mtxrun --script fonts --list --all --pattern=Custodia
> identifier   familyname   fontname filename
>subfont   instances
>
> custodiabold custodia custodiabold
> Custodia-Bold.ttf
> custodiabolditalic   custodia custodiabolditalic
> Custodia-BoldItalic.ttf
> custodiaitalic   custodia custodianormalitalic
> Custodia-NormalItalic.ttf
> custodianormal   custodia custodianormal
> Custodia-Normal.ttf
> custodianormalitalic custodia custodianormalitalic
> Custodia-NormalItalic.ttf
> custodiaregular  custodia custodianormal
> Custodia-Normal.ttf
> custodiasemibold custodia custodiasemibold
> Custodia-SemiBold.ttf
> custodiasemibolditalic   custodia custodiasemibolditalic
> Custodia-SemiBoldItalic.ttf
>
> I tried a different name, but the result was the same.
>
> On Wed, May 25, 2022 at 7:12 PM Henning Hraban Ramm via ntg-context <
> ntg-context@ntg.nl> wrote:
>
>> Ah, sorry, didn’t know that. I can’t find an error in your code, but I
>> don’t have the (commercial) font to test. What’s the output of the
>> mtxrun font lookup?
>> Did you try a different shortcut from "mi"?
>>
>> Hraban
>>
>> Am 25.05.22 um 18:44 schrieb Stefan Nedeljkovic:
>> > It doesn't work for medium weights, as it is not standard. I took my
>> > solution from Wolfgang, here:
>> > https://tex.stackexchange.com/questions/303648/context-font-weights
>> > 
>> >
>> > On Wed, May 25, 2022 at 6:32 PM Henning Hraban Ramm via ntg-context
>> > mailto:ntg-context@ntg.nl>> wrote:
>> >
>> > Hi Stefan,
>> >
>> > I never used \definebodyfont but either \definefontfamily or
>> > typescripts
>> > with \definefontsynonym.
>> >
>> > Did you try \definefontfamily[custodia][rm][Custodia] ?
>> >
>> > https://wiki.contextgarden.net/Command/definefontfamily
>> > 
>> >
>> > Hraban
>> >
>> > Am 25.05.22 um 18:20 schrieb Stefan Nedeljkovic via ntg-context:
>> >  >
>> >  > Dear list,
>> >  >
>> >  >
>> >  > I'm trying to set up Custodia in LMTX, but the
>> > custodiasemibolditalic
>> >  > won't show up. It shows up regularly when I run mtxrun --script
>> > fonts
>> >  > --list --all --pattern=Custodia
>> >  >
>> >  > I'm attaching the output for reference. Any help would be
>> > appreciated.
>> >  >
>> >  >
>> >  > Sincerely,
>> >  >
>> >  > Stefan
>> >  >
>> >  > \definefontalternative[md]
>> >  >
>> >  > \definefontalternative[mi]
>> >  >
>> >  >
>> >  > \starttypescript [serif] [custodia]
>> >  >
>> >  > \definefontsynonym[Serif] [name:custodianormal][features=default]
>> >  >
>> >  > \definefontsynonym[SerifItalic]
>> >  > [name:custodianormalitalic][features=default]
>> >  >
>> >  > \definefontsynonym[SerifMedium]
>> > [name:custodiasemibold][features=default]
>> >  >
>> >  > \definefontsynonym[SerifMediumItalic]
>> >  > [name:custodiasemibolditalic][features=default]
>> >  >
>> >  > \definefontsynonym[SerifBold]
>> [name:custodiabold][features=default]
>> >  >
>> >  > \definefontsynonym[SerifBoldItalic]
>> >  > [name:custodiabolditalic][features=default]
>> >  >
>> >  > \stoptypescript
>> >  >
>> >  >
>> >  > \starttypescript [serif] [custodia]
>> >  >
>> >  > \definebodyfont [default] [rm]
>> >  >
>> >  > [
>> >  >
>> >  > tf=Serif sa 1,
>> >  >
>> >  > it=SerifItalic sa 1,
>> >  >
>> >  > md=SerifMedium sa 1,
>> >  >
>> >  > mi=SerifMediumItalic sa 1,
>> >  >
>> >  > bf=SerifBold sa 1,
>> >  >
>> >  > bi=SerifBoldItalic sa 1]
>> >  >
>> >  > \stoptypescript
>> >  >
>> >  >
>> >  >
>> >  > \definetypeface [custodia] [rm] [serif] [custodia] [default]
>> >  >
>> >  >
>> >  >
>> >  >
>> >  >
>> >  > \usetypescript[custodia][uc]
>> >  >
>> >  > \setupbodyfont[custodia,rm,10pt]
>> >  >
>> >  >
>> >  > \starttext
>> >  >
>> >  >
>> >  > Regular Hamburgerfons,
>> >  >
>> >  > {\it Italic Hamburgerfons},
>> >  >
>> >  > {\md Medium Hamburgerfons},
>> >  >
>> >  > {\mi Medium Italic Hamburgerfons},
>> >  >
>> >  > {\bf Bold Hamburgerfons},
>> >  >
>> >  > {\bi Bold Italic Hamburgerfons},\\
>> >  >
>> >  >
>> >  > \setff{smallcaps}{Small Caps Hamburgerfons},
>> >  >
>> >  > \setff{smallcaps}{\it Small Caps Italic Hamburgerfons},
>> >  >
>> >  > \setff{smallcaps}{\md Small Caps Medium 

Re: [NTG-context] Help needed with Custodia typescript

2022-05-25 Thread Stefan Nedeljkovic via ntg-context
mtxrun --script fonts --list --all --pattern=Custodia
identifier   familyname   fontname filename
 subfont   instances

custodiabold custodia custodiabold
Custodia-Bold.ttf
custodiabolditalic   custodia custodiabolditalic
Custodia-BoldItalic.ttf
custodiaitalic   custodia custodianormalitalic
Custodia-NormalItalic.ttf
custodianormal   custodia custodianormal
Custodia-Normal.ttf
custodianormalitalic custodia custodianormalitalic
Custodia-NormalItalic.ttf
custodiaregular  custodia custodianormal
Custodia-Normal.ttf
custodiasemibold custodia custodiasemibold
Custodia-SemiBold.ttf
custodiasemibolditalic   custodia custodiasemibolditalic
Custodia-SemiBoldItalic.ttf

I tried a different name, but the result was the same.

On Wed, May 25, 2022 at 7:12 PM Henning Hraban Ramm via ntg-context <
ntg-context@ntg.nl> wrote:

> Ah, sorry, didn’t know that. I can’t find an error in your code, but I
> don’t have the (commercial) font to test. What’s the output of the
> mtxrun font lookup?
> Did you try a different shortcut from "mi"?
>
> Hraban
>
> Am 25.05.22 um 18:44 schrieb Stefan Nedeljkovic:
> > It doesn't work for medium weights, as it is not standard. I took my
> > solution from Wolfgang, here:
> > https://tex.stackexchange.com/questions/303648/context-font-weights
> > 
> >
> > On Wed, May 25, 2022 at 6:32 PM Henning Hraban Ramm via ntg-context
> > mailto:ntg-context@ntg.nl>> wrote:
> >
> > Hi Stefan,
> >
> > I never used \definebodyfont but either \definefontfamily or
> > typescripts
> > with \definefontsynonym.
> >
> > Did you try \definefontfamily[custodia][rm][Custodia] ?
> >
> > https://wiki.contextgarden.net/Command/definefontfamily
> > 
> >
> > Hraban
> >
> > Am 25.05.22 um 18:20 schrieb Stefan Nedeljkovic via ntg-context:
> >  >
> >  > Dear list,
> >  >
> >  >
> >  > I'm trying to set up Custodia in LMTX, but the
> > custodiasemibolditalic
> >  > won't show up. It shows up regularly when I run mtxrun --script
> > fonts
> >  > --list --all --pattern=Custodia
> >  >
> >  > I'm attaching the output for reference. Any help would be
> > appreciated.
> >  >
> >  >
> >  > Sincerely,
> >  >
> >  > Stefan
> >  >
> >  > \definefontalternative[md]
> >  >
> >  > \definefontalternative[mi]
> >  >
> >  >
> >  > \starttypescript [serif] [custodia]
> >  >
> >  > \definefontsynonym[Serif] [name:custodianormal][features=default]
> >  >
> >  > \definefontsynonym[SerifItalic]
> >  > [name:custodianormalitalic][features=default]
> >  >
> >  > \definefontsynonym[SerifMedium]
> > [name:custodiasemibold][features=default]
> >  >
> >  > \definefontsynonym[SerifMediumItalic]
> >  > [name:custodiasemibolditalic][features=default]
> >  >
> >  > \definefontsynonym[SerifBold]
> [name:custodiabold][features=default]
> >  >
> >  > \definefontsynonym[SerifBoldItalic]
> >  > [name:custodiabolditalic][features=default]
> >  >
> >  > \stoptypescript
> >  >
> >  >
> >  > \starttypescript [serif] [custodia]
> >  >
> >  > \definebodyfont [default] [rm]
> >  >
> >  > [
> >  >
> >  > tf=Serif sa 1,
> >  >
> >  > it=SerifItalic sa 1,
> >  >
> >  > md=SerifMedium sa 1,
> >  >
> >  > mi=SerifMediumItalic sa 1,
> >  >
> >  > bf=SerifBold sa 1,
> >  >
> >  > bi=SerifBoldItalic sa 1]
> >  >
> >  > \stoptypescript
> >  >
> >  >
> >  >
> >  > \definetypeface [custodia] [rm] [serif] [custodia] [default]
> >  >
> >  >
> >  >
> >  >
> >  >
> >  > \usetypescript[custodia][uc]
> >  >
> >  > \setupbodyfont[custodia,rm,10pt]
> >  >
> >  >
> >  > \starttext
> >  >
> >  >
> >  > Regular Hamburgerfons,
> >  >
> >  > {\it Italic Hamburgerfons},
> >  >
> >  > {\md Medium Hamburgerfons},
> >  >
> >  > {\mi Medium Italic Hamburgerfons},
> >  >
> >  > {\bf Bold Hamburgerfons},
> >  >
> >  > {\bi Bold Italic Hamburgerfons},\\
> >  >
> >  >
> >  > \setff{smallcaps}{Small Caps Hamburgerfons},
> >  >
> >  > \setff{smallcaps}{\it Small Caps Italic Hamburgerfons},
> >  >
> >  > \setff{smallcaps}{\md Small Caps Medium Hamburgerfons},
> >  >
> >  > \setff{smallcaps}{\mi Small Caps Medium Italic Hamburgerfons},
> >  >
> >  > \setff{smallcaps}{\bf Small Caps Bold Hamburgerfons},
> >  >
> >  > \setff{smallcaps}{\bi Small Caps Bold Italic Hamburgerfons}
> >  >
> >  >
> >  > \stoptext
> >  >
>
> 

Re: [NTG-context] Help needed with Custodia typescript

2022-05-25 Thread Henning Hraban Ramm via ntg-context
Ah, sorry, didn’t know that. I can’t find an error in your code, but I 
don’t have the (commercial) font to test. What’s the output of the 
mtxrun font lookup?

Did you try a different shortcut from "mi"?

Hraban

Am 25.05.22 um 18:44 schrieb Stefan Nedeljkovic:
It doesn't work for medium weights, as it is not standard. I took my 
solution from Wolfgang, here: 
https://tex.stackexchange.com/questions/303648/context-font-weights 



On Wed, May 25, 2022 at 6:32 PM Henning Hraban Ramm via ntg-context 
mailto:ntg-context@ntg.nl>> wrote:


Hi Stefan,

I never used \definebodyfont but either \definefontfamily or
typescripts
with \definefontsynonym.

Did you try \definefontfamily[custodia][rm][Custodia] ?

https://wiki.contextgarden.net/Command/definefontfamily


Hraban

Am 25.05.22 um 18:20 schrieb Stefan Nedeljkovic via ntg-context:
 >
 > Dear list,
 >
 >
 > I'm trying to set up Custodia in LMTX, but the
custodiasemibolditalic
 > won't show up. It shows up regularly when I run mtxrun --script
fonts
 > --list --all --pattern=Custodia
 >
 > I'm attaching the output for reference. Any help would be
appreciated.
 >
 >
 > Sincerely,
 >
 > Stefan
 >
 > \definefontalternative[md]
 >
 > \definefontalternative[mi]
 >
 >
 > \starttypescript [serif] [custodia]
 >
 > \definefontsynonym[Serif] [name:custodianormal][features=default]
 >
 > \definefontsynonym[SerifItalic]
 > [name:custodianormalitalic][features=default]
 >
 > \definefontsynonym[SerifMedium]
[name:custodiasemibold][features=default]
 >
 > \definefontsynonym[SerifMediumItalic]
 > [name:custodiasemibolditalic][features=default]
 >
 > \definefontsynonym[SerifBold] [name:custodiabold][features=default]
 >
 > \definefontsynonym[SerifBoldItalic]
 > [name:custodiabolditalic][features=default]
 >
 > \stoptypescript
 >
 >
 > \starttypescript [serif] [custodia]
 >
 > \definebodyfont [default] [rm]
 >
 > [
 >
 > tf=Serif sa 1,
 >
 > it=SerifItalic sa 1,
 >
 > md=SerifMedium sa 1,
 >
 > mi=SerifMediumItalic sa 1,
 >
 > bf=SerifBold sa 1,
 >
 > bi=SerifBoldItalic sa 1]
 >
 > \stoptypescript
 >
 >
 >
 > \definetypeface [custodia] [rm] [serif] [custodia] [default]
 >
 >
 >
 >
 >
 > \usetypescript[custodia][uc]
 >
 > \setupbodyfont[custodia,rm,10pt]
 >
 >
 > \starttext
 >
 >
 > Regular Hamburgerfons,
 >
 > {\it Italic Hamburgerfons},
 >
 > {\md Medium Hamburgerfons},
 >
 > {\mi Medium Italic Hamburgerfons},
 >
 > {\bf Bold Hamburgerfons},
 >
 > {\bi Bold Italic Hamburgerfons},\\
 >
 >
 > \setff{smallcaps}{Small Caps Hamburgerfons},
 >
 > \setff{smallcaps}{\it Small Caps Italic Hamburgerfons},
 >
 > \setff{smallcaps}{\md Small Caps Medium Hamburgerfons},
 >
 > \setff{smallcaps}{\mi Small Caps Medium Italic Hamburgerfons},
 >
 > \setff{smallcaps}{\bf Small Caps Bold Hamburgerfons},
 >
 > \setff{smallcaps}{\bi Small Caps Bold Italic Hamburgerfons}
 >
 >
 > \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] Help needed with slide grid layout

2022-05-25 Thread Stefan Nedeljkovic via ntg-context
I have problems setting up the grid in question. I cannot seem to configure
the grid spacing properly, despite combing through the "details" manual.
Could you help me configure the grid?

On Wed, May 25, 2022 at 6:24 PM Stefan Nedeljkovic 
wrote:

> Thank you very much Wolfgang, that solved the problem.
>
> On Wed, May 25, 2022 at 4:01 PM Wolfgang Schuster <
> wolfgang.schuster.li...@gmail.com> wrote:
>
>> Stefan Nedeljkovic via ntg-context schrieb am 25.05.2022 um 13:35:
>> > Dear list,
>> >
>> > This is a follow-up question on my previous question about Jean-Luc
>> > Doumont and his grid layouts. This time I have concrete questions. I
>> > reverse engineered his slide (slide_grid_overlay.pdf). All his units
>> are
>> > based on inches, because the inch is an integer multiple (72) of the
>> TeX
>> > point. His base unit is 0.1in. I tried implementing the layout first,
>> > but the pdf dimensions do not match the ones I set up. For example the
>> > width should be 8 inches, but the pdf is over 11 inches wide. I wish to
>> > shut off all margins and similar things and only have a text area with
>> > an offset of 0.2in all around the page (see slide_grid_overlay.pdf).
>> > Here is my current attempt:
>>
>> You have to use the \measured (with a trailing s) command when you need
>> multiples of a measure value. When you use something like 2\measure{...}
>> ConTeXt uses the "2" followed by the value of the measure, the following
>> example demonstrates this in the second output.
>>
>>  begin example
>> \definemeasure [point] [1pt]
>>
>> \starttext
>>
>> \startbuffer
>> \tex{measure}: \measure{point}
>>
>> \tex{measured}: \the\measured{point}
>> \stopbuffer
>>
>> \typebuffer \getbuffer
>>
>> \startbuffer
>> 2\tex{measure}: 2\measure{point}
>>
>> 2\tex{measured}: \the\dimexpr2\measured{point}\relax
>> \stopbuffer
>>
>> \typebuffer \getbuffer
>>
>> \stoptext
>>  end example
>>
>> Wolfgang
>>
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Help needed with Custodia typescript

2022-05-25 Thread Stefan Nedeljkovic via ntg-context
It doesn't work for medium weights, as it is not standard. I took my
solution from Wolfgang, here:
https://tex.stackexchange.com/questions/303648/context-font-weights

On Wed, May 25, 2022 at 6:32 PM Henning Hraban Ramm via ntg-context <
ntg-context@ntg.nl> wrote:

> Hi Stefan,
>
> I never used \definebodyfont but either \definefontfamily or typescripts
> with \definefontsynonym.
>
> Did you try \definefontfamily[custodia][rm][Custodia] ?
>
> https://wiki.contextgarden.net/Command/definefontfamily
>
> Hraban
>
> Am 25.05.22 um 18:20 schrieb Stefan Nedeljkovic via ntg-context:
> >
> > Dear list,
> >
> >
> > I'm trying to set up Custodia in LMTX, but the custodiasemibolditalic
> > won't show up. It shows up regularly when I run mtxrun --script fonts
> > --list --all --pattern=Custodia
> >
> > I'm attaching the output for reference. Any help would be appreciated.
> >
> >
> > Sincerely,
> >
> > Stefan
> >
> > \definefontalternative[md]
> >
> > \definefontalternative[mi]
> >
> >
> > \starttypescript [serif] [custodia]
> >
> > \definefontsynonym[Serif] [name:custodianormal][features=default]
> >
> > \definefontsynonym[SerifItalic]
> > [name:custodianormalitalic][features=default]
> >
> > \definefontsynonym[SerifMedium] [name:custodiasemibold][features=default]
> >
> > \definefontsynonym[SerifMediumItalic]
> > [name:custodiasemibolditalic][features=default]
> >
> > \definefontsynonym[SerifBold] [name:custodiabold][features=default]
> >
> > \definefontsynonym[SerifBoldItalic]
> > [name:custodiabolditalic][features=default]
> >
> > \stoptypescript
> >
> >
> > \starttypescript [serif] [custodia]
> >
> > \definebodyfont [default] [rm]
> >
> > [
> >
> > tf=Serif sa 1,
> >
> > it=SerifItalic sa 1,
> >
> > md=SerifMedium sa 1,
> >
> > mi=SerifMediumItalic sa 1,
> >
> > bf=SerifBold sa 1,
> >
> > bi=SerifBoldItalic sa 1]
> >
> > \stoptypescript
> >
> >
> >
> > \definetypeface [custodia] [rm] [serif] [custodia] [default]
> >
> >
> >
> >
> >
> > \usetypescript[custodia][uc]
> >
> > \setupbodyfont[custodia,rm,10pt]
> >
> >
> > \starttext
> >
> >
> > Regular Hamburgerfons,
> >
> > {\it Italic Hamburgerfons},
> >
> > {\md Medium Hamburgerfons},
> >
> > {\mi Medium Italic Hamburgerfons},
> >
> > {\bf Bold Hamburgerfons},
> >
> > {\bi Bold Italic Hamburgerfons},\\
> >
> >
> > \setff{smallcaps}{Small Caps Hamburgerfons},
> >
> > \setff{smallcaps}{\it Small Caps Italic Hamburgerfons},
> >
> > \setff{smallcaps}{\md Small Caps Medium Hamburgerfons},
> >
> > \setff{smallcaps}{\mi Small Caps Medium Italic Hamburgerfons},
> >
> > \setff{smallcaps}{\bf Small Caps Bold Hamburgerfons},
> >
> > \setff{smallcaps}{\bi Small Caps Bold Italic Hamburgerfons}
> >
> >
> > \stoptext
> >
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Help needed with Custodia typescript

2022-05-25 Thread Henning Hraban Ramm via ntg-context

Hi Stefan,

I never used \definebodyfont but either \definefontfamily or typescripts 
with \definefontsynonym.


Did you try \definefontfamily[custodia][rm][Custodia] ?

https://wiki.contextgarden.net/Command/definefontfamily

Hraban

Am 25.05.22 um 18:20 schrieb Stefan Nedeljkovic via ntg-context:


Dear list,


I'm trying to set up Custodia in LMTX, but the custodiasemibolditalic 
won't show up. It shows up regularly when I run mtxrun --script fonts 
--list --all --pattern=Custodia


I'm attaching the output for reference. Any help would be appreciated.


Sincerely,

Stefan

\definefontalternative[md]

\definefontalternative[mi]


\starttypescript [serif] [custodia]

\definefontsynonym[Serif] [name:custodianormal][features=default]

\definefontsynonym[SerifItalic] 
[name:custodianormalitalic][features=default]


\definefontsynonym[SerifMedium] [name:custodiasemibold][features=default]

\definefontsynonym[SerifMediumItalic] 
[name:custodiasemibolditalic][features=default]


\definefontsynonym[SerifBold] [name:custodiabold][features=default]

\definefontsynonym[SerifBoldItalic] 
[name:custodiabolditalic][features=default]


\stoptypescript


\starttypescript [serif] [custodia]

\definebodyfont [default] [rm]

[

tf=Serif sa 1,

it=SerifItalic sa 1,

md=SerifMedium sa 1,

mi=SerifMediumItalic sa 1,

bf=SerifBold sa 1,

bi=SerifBoldItalic sa 1]

\stoptypescript



\definetypeface [custodia] [rm] [serif] [custodia] [default]





\usetypescript[custodia][uc]

\setupbodyfont[custodia,rm,10pt]


\starttext


Regular Hamburgerfons,

{\it Italic Hamburgerfons},

{\md Medium Hamburgerfons},

{\mi Medium Italic Hamburgerfons},

{\bf Bold Hamburgerfons},

{\bi Bold Italic Hamburgerfons},\\


\setff{smallcaps}{Small Caps Hamburgerfons},

\setff{smallcaps}{\it Small Caps Italic Hamburgerfons},

\setff{smallcaps}{\md Small Caps Medium Hamburgerfons},

\setff{smallcaps}{\mi Small Caps Medium Italic Hamburgerfons},

\setff{smallcaps}{\bf Small Caps Bold Hamburgerfons},

\setff{smallcaps}{\bi Small Caps Bold Italic Hamburgerfons}


\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] Help needed with slide grid layout

2022-05-25 Thread Stefan Nedeljkovic via ntg-context
Thank you very much Wolfgang, that solved the problem.

On Wed, May 25, 2022 at 4:01 PM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Stefan Nedeljkovic via ntg-context schrieb am 25.05.2022 um 13:35:
> > Dear list,
> >
> > This is a follow-up question on my previous question about Jean-Luc
> > Doumont and his grid layouts. This time I have concrete questions. I
> > reverse engineered his slide (slide_grid_overlay.pdf). All his units are
> > based on inches, because the inch is an integer multiple (72) of the TeX
> > point. His base unit is 0.1in. I tried implementing the layout first,
> > but the pdf dimensions do not match the ones I set up. For example the
> > width should be 8 inches, but the pdf is over 11 inches wide. I wish to
> > shut off all margins and similar things and only have a text area with
> > an offset of 0.2in all around the page (see slide_grid_overlay.pdf).
> > Here is my current attempt:
>
> You have to use the \measured (with a trailing s) command when you need
> multiples of a measure value. When you use something like 2\measure{...}
> ConTeXt uses the "2" followed by the value of the measure, the following
> example demonstrates this in the second output.
>
>  begin example
> \definemeasure [point] [1pt]
>
> \starttext
>
> \startbuffer
> \tex{measure}: \measure{point}
>
> \tex{measured}: \the\measured{point}
> \stopbuffer
>
> \typebuffer \getbuffer
>
> \startbuffer
> 2\tex{measure}: 2\measure{point}
>
> 2\tex{measured}: \the\dimexpr2\measured{point}\relax
> \stopbuffer
>
> \typebuffer \getbuffer
>
> \stoptext
>  end example
>
> Wolfgang
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Help needed with Custodia typescript

2022-05-25 Thread Stefan Nedeljkovic via ntg-context
Dear list,


I'm trying to set up Custodia in LMTX, but the custodiasemibolditalic won't
show up. It shows up regularly when I run mtxrun --script fonts --list
--all --pattern=Custodia

I'm attaching the output for reference. Any help would be appreciated.


Sincerely,

Stefan

\definefontalternative[md]

\definefontalternative[mi]


\starttypescript [serif] [custodia]

\definefontsynonym[Serif] [name:custodianormal][features=default]

\definefontsynonym[SerifItalic]
[name:custodianormalitalic][features=default]

\definefontsynonym[SerifMedium] [name:custodiasemibold][features=default]

\definefontsynonym[SerifMediumItalic]
[name:custodiasemibolditalic][features=default]

\definefontsynonym[SerifBold] [name:custodiabold][features=default]

\definefontsynonym[SerifBoldItalic]
[name:custodiabolditalic][features=default]

\stoptypescript


\starttypescript [serif] [custodia]

\definebodyfont [default] [rm]

[

tf=Serif sa 1,

it=SerifItalic sa 1,

md=SerifMedium sa 1,

mi=SerifMediumItalic sa 1,

bf=SerifBold sa 1,

bi=SerifBoldItalic sa 1]

\stoptypescript



\definetypeface [custodia] [rm] [serif] [custodia] [default]





\usetypescript[custodia][uc]

\setupbodyfont[custodia,rm,10pt]


\starttext


Regular Hamburgerfons,

{\it Italic Hamburgerfons},

{\md Medium Hamburgerfons},

{\mi Medium Italic Hamburgerfons},

{\bf Bold Hamburgerfons},

{\bi Bold Italic Hamburgerfons},\\


\setff{smallcaps}{Small Caps Hamburgerfons},

\setff{smallcaps}{\it Small Caps Italic Hamburgerfons},

\setff{smallcaps}{\md Small Caps Medium Hamburgerfons},

\setff{smallcaps}{\mi Small Caps Medium Italic Hamburgerfons},

\setff{smallcaps}{\bf Small Caps Bold Hamburgerfons},

\setff{smallcaps}{\bi Small Caps Bold Italic Hamburgerfons}


\stoptext


fonts2.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] Help needed with slide grid layout

2022-05-25 Thread Wolfgang Schuster via ntg-context

Stefan Nedeljkovic via ntg-context schrieb am 25.05.2022 um 13:35:

Dear list,

This is a follow-up question on my previous question about Jean-Luc 
Doumont and his grid layouts. This time I have concrete questions. I 
reverse engineered his slide (slide_grid_overlay.pdf). All his units are 
based on inches, because the inch is an integer multiple (72) of the TeX 
point. His base unit is 0.1in. I tried implementing the layout first, 
but the pdf dimensions do not match the ones I set up. For example the 
width should be 8 inches, but the pdf is over 11 inches wide. I wish to 
shut off all margins and similar things and only have a text area with 
an offset of 0.2in all around the page (see slide_grid_overlay.pdf). 
Here is my current attempt:


You have to use the \measured (with a trailing s) command when you need
multiples of a measure value. When you use something like 2\measure{...}
ConTeXt uses the "2" followed by the value of the measure, the following
example demonstrates this in the second output.

 begin example
\definemeasure [point] [1pt]

\starttext

\startbuffer
\tex{measure}: \measure{point}

\tex{measured}: \the\measured{point}
\stopbuffer

\typebuffer \getbuffer

\startbuffer
2\tex{measure}: 2\measure{point}

2\tex{measured}: \the\dimexpr2\measured{point}\relax
\stopbuffer

\typebuffer \getbuffer

\stoptext
 end example

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

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


[NTG-context] Help needed with slide grid layout

2022-05-25 Thread Stefan Nedeljkovic via ntg-context
Dear list,

This is a follow-up question on my previous question about Jean-Luc Doumont
and his grid layouts. This time I have concrete questions. I reverse
engineered his slide (slide_grid_overlay.pdf). All his units are based on
inches, because the inch is an integer multiple (72) of the TeX point. His
base unit is 0.1in. I tried implementing the layout first, but the pdf
dimensions do not match the ones I set up. For example the width should be
8 inches, but the pdf is over 11 inches wide. I wish to shut off all
margins and similar things and only have a text area with an offset of
0.2in all around the page (see slide_grid_overlay.pdf). Here is my current
attempt:


%\input fonts


\definemeasure[base][0.1in]

\definemeasure[zero][0in]


\definepapersize[slide][width=80\measure{base},height=60\measure{base}]

\setuppapersize[slide]


\setuplayout[

leftedge=\measure{zero},

rightedge=\measure{zero},

leftedgedistance=\measure{zero},

rightedgedistance=\measure{zero},

leftmargin=\measure{zero},

rightmargin=\measure{zero},

leftmargindistance=\measure{zero},

rightmargindistance=\measure{zero},

width=middle,

cutspace=2\measure{base},

backspace=2\measure{base},

topspace=2\measure{base},

header=\measure{zero},

height=middle,

bottomspace=2\measure{base},

footer=\measure{zero}]


%\usetypescript[ibmplex][uc]

%\setupbodyfont[ibmplex,rm,9pt]





\starttext


\showlayout


\stoptext


Link to files:
https://drive.google.com/drive/folders/1KpYbDlukvSCirKkFvJICOX3wABl_83bW?usp=sharing



Kind regards,

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

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


Re: [NTG-context] help with facing page image

2022-03-11 Thread jbf via ntg-context
Thanks Wolfgang. This version is the 'icing on the cake' I think, a 
further refined version of the suggestion put forward by Sreeram.


Grateful as always,

Julian

On 11/3/22 23:36, Wolfgang Schuster wrote:

\definepageinjectionalternative
  [chapter:image]
  [renderingsetup=pageinjection:chapter:image]

\startsetups [pageinjection:chapter:image]
  \centerbox{\externalfigure[\dummyparameter{name}]}
\stopsetups

\definepageinjection
  [chapter:start]
  [empty]
  [page=left]

\definepageinjection
  [chapter:insert]
  [previouspage]
  [alternative=chapter:image,
   offset=1cm,
   pagestate=stop]

\setuphead
  [chapter]
  [beforesection={\pageinjection[chapter:start]},
insidesection={\pageinjection[chapter:insert][name={chapter-\namedheadnumber{chapter}}]}] 



\setuppagenumbering
  [alternative=doublesided]

\setupexternalfigures
  [location=default]

\useexternalfigure [chapter-1] [mill]   [factor=max]
\useexternalfigure [chapter-2] [hacker] [orientation=90,scale=2000]
\useexternalfigure [chapter-3] [cow] [orientation=90,height=\framedwidth]

\starttext

\startchapter [title={Mill}]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\startchapter [title={Hacker}]
\dorecurse{11}{\samplefile{lorem}}
\stopchapter

\startchapter [title={cow}]
\dorecurse{7}{\samplefile{lorem}}
\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] help with facing page image

2022-03-11 Thread Wolfgang Schuster via ntg-context

jbf schrieb am 09.03.2022 um 23:02:
Am endeavouring to explore Wolfgang's very 'elegant' solution to this 
facing page challenge. The exploration has included a look at 
base/mkxl/page-inj.mklx (thanks Sreeram for reminding me of this) 
where I see immediately that the approach is experimental and where it 
says also that 'probably more alternatives will be added'. I wonder if 
that last phrase also includes the ability to manipulate the image(s) 
either generally or in individual cases?


Keep your expectations low. I wrote the code (with some changes from 
Hans) to include full page images in novels and the code hasn't changed 
much since 2013.


So, for example., say I need (and in fact I do!) to change some aspect 
of individual images, e.g. I might want to scale=500, or fiddle with 
width/height of a particular image. At the moment I cannot see a way 
of doing this for each image. I wondered if the commented out setups 
in the response to this question might be a clue, but so far haven't 
been able to get that to have any effect.


You have to use a custom alternative (see below) to place the image on 
the page because the default alternative scales the image to fit on the 
available space. The best solution to change orientation, size etc. of 
the included images is to use the \useexternalfigure command and make 
all changes in the style file.



\definepageinjectionalternative
  [chapter:image]
  [renderingsetup=pageinjection:chapter:image]

\startsetups [pageinjection:chapter:image]
  \centerbox{\externalfigure[\dummyparameter{name}]}
\stopsetups

\definepageinjection
  [chapter:start]
  [empty]
  [page=left]

\definepageinjection
  [chapter:insert]
  [previouspage]
  [alternative=chapter:image,
   offset=1cm,
   pagestate=stop]

\setuphead
  [chapter]
  [beforesection={\pageinjection[chapter:start]},
insidesection={\pageinjection[chapter:insert][name={chapter-\namedheadnumber{chapter}}]}]

\setuppagenumbering
  [alternative=doublesided]

\setupexternalfigures
  [location=default]

\useexternalfigure [chapter-1] [mill]   [factor=max]
\useexternalfigure [chapter-2] [hacker] [orientation=90,scale=2000]
\useexternalfigure [chapter-3] [cow] [orientation=90,height=\framedwidth]

\starttext

\startchapter [title={Mill}]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\startchapter [title={Hacker}]
\dorecurse{11}{\samplefile{lorem}}
\stopchapter

\startchapter [title={cow}]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\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] help with facing page image

2022-03-10 Thread jbf via ntg-context
Using your example, Sreeram, but adapting it to my own set of images 
(which are not cows or spiders!) I can now see clearly how to make use 
of all the essential information that had initially been provided by 
Wolfgang, and also the important hint, which I had clumsily and 
unsuccessfully been trying anyway before he offered it, from Aditya, 
about passing key value parameters along the lines of Wolfgang's 'name 
='. It simply did not occur to me to do this using 'factor= '. But there 
was much more about the example I would not have worked out by myself as 
well!


Thank you (all) for your patience.

Julian

On 10/3/22 17:51, śrīrāma wrote:

On Thursday, March 10, 2022 3:32 AM jbf via ntg-context wrote:

Am endeavouring to explore Wolfgang's very 'elegant' solution to this
facing page challenge. The exploration has included a look at
base/mkxl/page-inj.mklx (thanks Sreeram for reminding me of this) where
I see immediately that the approach is experimental and where it says
also that 'probably more alternatives will be added'. I wonder if that
last phrase also includes the ability to manipulate the image(s) either
generally or in individual cases?


The following example is based on Wolfgang's solution using injections: I have 
modified the setup slightly to hook into \externalfigure's {width, height, 
orientation} using user-variables. With this I think you can place any kind of 
image (portrait or landscape) correctly by using width, height, and rotation.

I picked up some images of cows, 'spider', 'hacker' and 'mill' and have them 
renamed as {chap-cover-1, ... chap-cover-6} for a total of 6 chapter images.

%%% start example
\definepageinjectionalternative
[chapter:image]
[renderingsetup=pageinjection:chapter:image]

\startsetups [pageinjection:chapter:image]
\clip
   [width=\framedwidth,height=\framedheight]
   {\centerbox{%
  \externalfigure
 [\dummyparameter{name}]
 [%factor=,
  width=\structureuservariable{width},
  height=\structureuservariable{height},
  orientation=\structureuservariable{rotation}]%
   }}
\stopsetups

\definepageinjection
[chapter:start]
[empty]
[page=left]

\definepageinjection
[chapter:insert]
[previouspage]
[alternative=chapter:image,
   pagestate=stop]

\setuphead
[chapter]
[beforesection={\pageinjection[chapter:start]},
   
insidesection={\pageinjection[chapter:insert][name=\structureuservariable{image}]}]

\setuphead
[chapter]
[beforesection={\pageinjection[chapter:start]},
   
insidesection={\pageinjection[chapter:insert][name={chap-cover-\namedheadnumber{chapter}}]}]


\setuppagenumbering
[alternative=doublesided]

\setupexternalfigures
[location=default]

\starttext
   \startchapter [title={Mill}] [rotation=90,width=\paperheight]
   \dorecurse{7}{\samplefile{lorem}}
   \stopchapter

   \startchapter [title={Mill}] [rotation=-90,width=\paperheight]
   \dorecurse{11}{\samplefile{lorem}}
   \stopchapter

   \startchapter [title={Mill}] [rotation=-90,width=\paperheight]
   \dorecurse{7}{\samplefile{lorem}}
   \stopchapter

   \startchapter [title={Mill}] [rotation=90,width=\paperheight]
   \dorecurse{7}{\samplefile{lorem}}
   \stopchapter

   \startchapter [title={Mill}] [rotation=-45,width=\paperwidth]
   \dorecurse{11}{\samplefile{lorem}}
   \stopchapter

   \startchapter [title={Mill}] [height=\paperheight]
   \dorecurse{7}{\samplefile{lorem}}
   \stopchapter
\stoptext
%%% end example

Sreeram



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

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


Re: [NTG-context] help with facing page image

2022-03-09 Thread śrīrāma via ntg-context
On Thursday, March 10, 2022 3:32 AM jbf via ntg-context wrote:
> Am endeavouring to explore Wolfgang's very 'elegant' solution to this 
> facing page challenge. The exploration has included a look at 
> base/mkxl/page-inj.mklx (thanks Sreeram for reminding me of this) where 
> I see immediately that the approach is experimental and where it says 
> also that 'probably more alternatives will be added'. I wonder if that 
> last phrase also includes the ability to manipulate the image(s) either 
> generally or in individual cases?
> 

The following example is based on Wolfgang's solution using injections: I have 
modified the setup slightly to hook into \externalfigure's {width, height, 
orientation} using user-variables. With this I think you can place any kind of 
image (portrait or landscape) correctly by using width, height, and rotation.

I picked up some images of cows, 'spider', 'hacker' and 'mill' and have them 
renamed as {chap-cover-1, ... chap-cover-6} for a total of 6 chapter images.

%%% start example
   \definepageinjectionalternative
   [chapter:image]
   [renderingsetup=pageinjection:chapter:image]

   \startsetups [pageinjection:chapter:image]
   \clip
  [width=\framedwidth,height=\framedheight]
  {\centerbox{%
 \externalfigure
[\dummyparameter{name}]
[%factor=,
 width=\structureuservariable{width},
 height=\structureuservariable{height},
 orientation=\structureuservariable{rotation}]%
  }}
   \stopsetups

   \definepageinjection
   [chapter:start]
   [empty]
   [page=left]

   \definepageinjection
   [chapter:insert]
   [previouspage]
   [alternative=chapter:image,
  pagestate=stop]

   \setuphead
   [chapter]
   [beforesection={\pageinjection[chapter:start]},
  
insidesection={\pageinjection[chapter:insert][name=\structureuservariable{image}]}]

   \setuphead
   [chapter]
   [beforesection={\pageinjection[chapter:start]},
  
insidesection={\pageinjection[chapter:insert][name={chap-cover-\namedheadnumber{chapter}}]}]


   \setuppagenumbering
   [alternative=doublesided]

   \setupexternalfigures
   [location=default]

   \starttext
  \startchapter [title={Mill}] [rotation=90,width=\paperheight]
  \dorecurse{7}{\samplefile{lorem}}
  \stopchapter

  \startchapter [title={Mill}] [rotation=-90,width=\paperheight]
  \dorecurse{11}{\samplefile{lorem}}
  \stopchapter

  \startchapter [title={Mill}] [rotation=-90,width=\paperheight]
  \dorecurse{7}{\samplefile{lorem}}
  \stopchapter

  \startchapter [title={Mill}] [rotation=90,width=\paperheight]
  \dorecurse{7}{\samplefile{lorem}}
  \stopchapter

  \startchapter [title={Mill}] [rotation=-45,width=\paperwidth]
  \dorecurse{11}{\samplefile{lorem}}
  \stopchapter

  \startchapter [title={Mill}] [height=\paperheight]
  \dorecurse{7}{\samplefile{lorem}}
  \stopchapter
   \stoptext
%%% end example

Sreeram


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

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


Re: [NTG-context] help with facing page image

2022-03-09 Thread jbf via ntg-context

If you mean

\setuphead

[chapter]

[beforesection={\pageinjection[chapter:start]},

insidesection={\pageinjection[chapter:insert][name=\structureuservariable{image}][name=\structureuservariable{scale}]}]

\starttext

\startchapter[title={My title}] [image=Chapter1.jpg][scale=500]

\setups[pageinjection:chapter:image]

\dorecurse{7}{\samplefile{lorem}}

\stopchapter

I tried that (and a few other combinations of the kind) but to no effect.

Julian

On 10/3/22 16:35, Aditya Mahajan via ntg-context wrote:

On Thu, 10 Mar 2022, jbf via ntg-context wrote:


Am endeavouring to explore Wolfgang's very 'elegant' solution to this
facing page challenge. The exploration has included a look at
base/mkxl/page-inj.mklx (thanks Sreeram for reminding me of this) where
I see immediately that the approach is experimental and where it says
also that 'probably more alternatives will be added'. I wonder if that
last phrase also includes the ability to manipulate the image(s) either
generally or in individual cases?

So, for example., say I need (and in fact I do!) to change some aspect
of individual images, e.g. I might want to scale=500, or fiddle with
width/height of a particular image. At the moment I cannot see a way of
doing this for each image. I wondered if the commented out setups in the
response to this question might be a clue, but so far haven't been able
to get that to have any effect.

Couldn't you just pass scale as a key-value parameter, similar to how `name` is 
passed in Wolfgang's solution?

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

maillist :ntg-context@ntg.nl  /http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  :http://www.pragma-ade.nl  /http://context.aanhet.net
archive  :https://bitbucket.org/phg/context-mirror/commits/
wiki :http://contextgarden.net
__
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] help with facing page image

2022-03-09 Thread Aditya Mahajan via ntg-context
On Thu, 10 Mar 2022, jbf via ntg-context wrote:

> Am endeavouring to explore Wolfgang's very 'elegant' solution to this 
> facing page challenge. The exploration has included a look at 
> base/mkxl/page-inj.mklx (thanks Sreeram for reminding me of this) where 
> I see immediately that the approach is experimental and where it says 
> also that 'probably more alternatives will be added'. I wonder if that 
> last phrase also includes the ability to manipulate the image(s) either 
> generally or in individual cases?
> 
> So, for example., say I need (and in fact I do!) to change some aspect 
> of individual images, e.g. I might want to scale=500, or fiddle with 
> width/height of a particular image. At the moment I cannot see a way of 
> doing this for each image. I wondered if the commented out setups in the 
> response to this question might be a clue, but so far haven't been able 
> to get that to have any effect.

Couldn't you just pass scale as a key-value parameter, similar to how `name` is 
passed in Wolfgang's solution?

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] help with facing page image

2022-03-09 Thread jbf via ntg-context
Am endeavouring to explore Wolfgang's very 'elegant' solution to this 
facing page challenge. The exploration has included a look at 
base/mkxl/page-inj.mklx (thanks Sreeram for reminding me of this) where 
I see immediately that the approach is experimental and where it says 
also that 'probably more alternatives will be added'. I wonder if that 
last phrase also includes the ability to manipulate the image(s) either 
generally or in individual cases?


So, for example., say I need (and in fact I do!) to change some aspect 
of individual images, e.g. I might want to scale=500, or fiddle with 
width/height of a particular image. At the moment I cannot see a way of 
doing this for each image. I wondered if the commented out setups in the 
response to this question might be a clue, but so far haven't been able 
to get that to have any effect.


Julian

On 8/3/22 05:35, Wolfgang Schuster wrote:

jbf via ntg-context schrieb am 07.03.2022 um 09:27:
Appreciate your assistance. I'll do my best with what you offer here. 
Of course, I've always said these images are at the beginning, not 
"the end of their respective chapters" and I've already indicated how 
the images are named, simply as Chapter1.jpg  and so on, so I'll need 
to work around these differences in your example. But with trial and 
error, let's hope I get there!


The example below uses a different mechanism to add images at the 
start of a chapter. In the example you have to pass the name of image 
as userdata argument of \startchapter but in the commented \setuphead 
setting you can see how this can be automated.


 begin example
% \definepageinjectionalternative
%   [chapter:image]
%   [renderingsetup=pageinjection:chapter:image]
%
% \startsetups [pageinjection:chapter:image]
%   \clip
% [width=\framedwidth,height=\framedheight]
% {\centerbox{\externalfigure[\dummyparameter{name}][factor=min]}}
% \stopsetups

\definepageinjection
  [chapter:start]
  [empty]
  [page=left]

\definepageinjection
  [chapter:insert]
  [previouspage]
  [%alternative=chapter:image,
   pagestate=stop]

\setuphead
  [chapter]
  [beforesection={\pageinjection[chapter:start]},
insidesection={\pageinjection[chapter:insert][name=\structureuservariable{image}]}] 



% \setuphead
%   [chapter]
%   [beforesection={\pageinjection[chapter:start]},
% 
insidesection={\pageinjection[chapter:insert][name={chapter\namedheadnumber{chapter}}]}]


\setuppagenumbering
  [alternative=doublesided]

\setupexternalfigures
  [location=default]

\starttext

\startchapter [title={Mill}] [image=mill]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\startchapter [title={Mill}] [image=mill]
\dorecurse{11}{\samplefile{lorem}}
\stopchapter

\startchapter [title={Mill}] [image=mill]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\stoptext
 end example

Wolfgang


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

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


Re: [NTG-context] help with facing page image

2022-03-07 Thread śrīrāma via ntg-context
On Tuesday, March 8, 2022 8:21 AM śrīrāma wrote:
> However, I was not able to get the preview PDF correctly, only the first page 
> is visible. Someone who knows how to fix this, please point me in the right 
> direction and I will edit it as needed.

Fixed now using \setuppaper.

Sreeram


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

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


Re: [NTG-context] help with facing page image

2022-03-07 Thread śrīrāma via ntg-context
On Tuesday, March 8, 2022 12:05 AM Wolfgang Schuster wrote:
> The example below uses a different mechanism to add images at the start 
> of a chapter. In the example you have to pass the name of image as 
> userdata argument of \startchapter but in the commented \setuphead 
> setting you can see how this can be automated.

Many thanks for the elegant solution Wolfgang! Personally, I find it much 
cleaner without need for push, pop. I have now added it to the wiki here:
https://wiki.contextgarden.net/Command/setuphead#Special_facing_pages_for_chapters

However, I was not able to get the preview PDF correctly, only the first page 
is visible. Someone who knows how to fix this, please point me in the right 
direction and I will edit it as needed.

Thanks,
Sreeram


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

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


Re: [NTG-context] help with facing page image

2022-03-07 Thread jbf via ntg-context
Special thanks to Sreeram, Wolfgang, Bruce, Hraban for help with this 
issue, ranging from the simplest 'manual' approach (Bruce) to one that I 
must confess I could never have thought of using: definepageinjection 
(Wolfgang). Needless to say, all contributions work, with a bit of 
adjustment in each case for my particular situation.


The one common factor in all four contributions is the use of setups, so 
a light has begun flashing for me: setups are such an important feature 
of ConTeXt for solving many problems!


Thanks to all,

Julian

On 7/3/22 18:01, śrīrāma wrote:

On Monday, March 7, 2022 11:50 AM jbf wrote:

All ten images are different, though, in my case (Chapter1.jpg,
Chapter2.jpg... Chapter10.jpg all in a pics directory, so I'd point
\setupexternalfigures to that). I wonder if there is a way to list them
so that they get called in order as chapters proceed. A kind of "if such
and such then \setlayer 1,2,3"

I think that should be easy. Suppose you have images
{chap-cover-1.jpg, chap-cover-2.jpg,  ... chap-cover-10.jpg}
each of which appear at the ends of their respective chapters, then the 
following achieves what you want (once you point ConTeXt to the right directory 
for figures of course):

% kate: hl ctx
%%% SOF
   \setuppagenumbering[alternative=doublesided]

   \definelayer
 [chapCover]
 [x=0mm,
  y=0mm,
  width=\paperwidth,
  height=\paperheight,repeat=yes]

   \startsetups chapter:before
   \doifoddpageelse{}
 {\pushbackground[page]
  \resetlayer[chapCover]
  \setlayer
  [chapCover]
  {\determineheadnumber[chapter]
   \externalfigure
 [chap-cover-\currentheadnumber]
 [width=\paperwidth]}
   \setupbackgrounds[page][background=chapCover]
   \page[empty]
   \popbackground}
   \stopsetups

   \startsetups chapter:after
   \doifoddpageelse{}
 {\page[empty]}
   \stopsetups

   \setuphead
 [chapter]
 [page=yes,
  before=\directsetup{chapter:before},
  aftersection=\directsetup{chapter:after}]

   \starttext
   \dorecurse{10}{
 \startchapter[title={Chapter \convertnumber{word}{\recurselevel}}]
   \input knuth
   \ifnum\headnumber[chapter]=5
   {\bfd five}
   \fi
   \blank
   \input tufte
   \blank
   \input ward
   \blank
   \ifnum\recurselevel=5
 \page
 \input zapf
 \input zapf
   \fi
 \stopchapter
   }
   \stoptext
%%% EOF

So we figure out which chapter we are in and then set the layer to the 
corresponding picture. Personally, I much prefer to collect all the images into 
a separate PDF with:

%%% chap-covers.tex
 \starttext
 \dorecurse{10}{\startTEXpage
 \externalfigure[chap-cover-\recurselevel]
 \stopTEXpage}
 \stoptext
%%% EOF

[and get 'chap-covers.pdf' from context]

... and then modify the 'before' setup to read as below

%%%
   \startsetups chapter:before
   \doifoddpageelse{}
 {\pushbackground[page]
  \resetlayer[chapCover]
  \setlayer
  [chapCover]
  {\determineheadnumber[chapter]
   \externalfigure
 [chap-covers]
 [page=\currentheadnumber,width=\paperwidth]}
   \setupbackgrounds[page][background=chapCover]
   \page[empty]
   \popbackground}
   \stopsetups
%%%

Sreeram



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

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


Re: [NTG-context] help with facing page image

2022-03-07 Thread Henning Hraban Ramm via ntg-context

Am 07.03.22 um 21:08 schrieb Bruce Horrocks via ntg-context:




On 7 Mar 2022, at 03:49, jbf via ntg-context  wrote:

I wonder if someone can help me untangle the current little mess I seem to be 
creating!

Author wants an image on facing page to each of 10 chapters in the bodypart of 
the document. Assume that everything else is working properly for this document 
(double-sided etc.), but other than before chapter 1, I can't seem to get my 
facing page image to appear where it should!


I didn’t see your original message.
Here’s my approach, as used in 
https://www.dreiviertelhaus.de/reihen/eka/lauf-los-buch/ :



\startsetups eka:normalheader

\setupheadertexts[chapter][{\feature[=normnum]\pagenumber}][{\feature[=normnum]\pagenumber}][]
\stopsetups

\startsetups eka:noheader
  \setupheadertexts[][][][]
\stopsetups

\startsetups eka:imagechapter
  \setupalign[flushleft]
  \doifelse{\structureuservariable{image}}{}{% if image empty, do nothing
  }{%
\directsetup{eka:noheader}
\vbox{%
  \blank[big]

\externalfigure[\structureuservariable{image}][width=0.8\textwidth]\par
}
\doifnot{\structureuservariable{motto}}{}{
  \vfill
  \vbox{%
{\MottoFont\structureuservariable{motto}}
  }%
}%
\page[right]
\vbox{%
  \doifnot{\structureuservariable{subtitle}}{}{
{\SubtitleFont\structureuservariable{subtitle}}
  }%
}%
  }%
  \blank[3*big]
  \directsetup{eka:normalheader}
  \setupalign[width]
\stopsetups


\define[2]\Nothing{} % do nothing

\setuphead[chapter][
  number=no,
  page=left,
  command=\Nothing,
  before=,
  after={\directsetup{eka:imagechapter}},
]


% example:

\startchapter
  [title={Chapter Title – here only used in list}]
  [author={},image=cow,
   subtitle={Subtitle – here a quote by the author},
   motto={Motto – here a short biography of the author}]

...

\stopchapter



Hraban

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

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


Re: [NTG-context] help with facing page image

2022-03-07 Thread Bruce Horrocks via ntg-context


> On 7 Mar 2022, at 03:49, jbf via ntg-context  wrote:
> 
> I wonder if someone can help me untangle the current little mess I seem to be 
> creating!
> 
> Author wants an image on facing page to each of 10 chapters in the bodypart 
> of the document. Assume that everything else is working properly for this 
> document (double-sided etc.), but other than before chapter 1, I can't seem 
> to get my facing page image to appear where it should!
> 

A simpler solution as you only have 10 chapters might be to 'manually' add the 
facing page rather than fiddle with the definition of \startchapter.

For example:

\definestartstop [ChapterPreface]
  [ before={\setups{ChapterPrefaceSetup}},
after={\page}
  ]

% which gives you the commands \startChapterPreface ... \stopChapterPreface 
which I put immediately before \startchapter in the text.

% Then use a setup to prepare the page for your image (you may only need 
\page[left] but also remember you need to stop page headers/footers etc from 
the previous chapter)
\startsetups ChapterPrefaceSetup
  \page[left]
  \setupheader[state=empty]
  % etc
\stopsetups

% If the page setup is complicated then you might need another setup to clean 
it up afterwards. In this example there is just the "after=" in the definition.

% Now you can print your images by using:

\starttext
\startChapterPreface
  \externalfigure[cow.pdf]
\stopChapterPreface
\startchapter[title={firstchapter}}
...
\stopchapter

\startChapterPreface
  \externalfigure[another_cow.pdf]
\stopChapterPreface
\startchapter{title={second chapter}]
...
\stopchapter
\stoptext

Hope this helps.
—
Bruce Horrocks
Hampshire, UK

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

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


Re: [NTG-context] help with facing page image

2022-03-07 Thread Wolfgang Schuster via ntg-context

jbf via ntg-context schrieb am 07.03.2022 um 09:27:
Appreciate your assistance. I'll do my best with what you offer here. 
Of course, I've always said these images are at the beginning, not 
"the end of their respective chapters" and I've already indicated how 
the images are named, simply as Chapter1.jpg  and so on, so I'll need 
to work around these differences in your example. But with trial and 
error, let's hope I get there!


The example below uses a different mechanism to add images at the start 
of a chapter. In the example you have to pass the name of image as 
userdata argument of \startchapter but in the commented \setuphead 
setting you can see how this can be automated.


 begin example
% \definepageinjectionalternative
%   [chapter:image]
%   [renderingsetup=pageinjection:chapter:image]
%
% \startsetups [pageinjection:chapter:image]
%   \clip
% [width=\framedwidth,height=\framedheight]
% {\centerbox{\externalfigure[\dummyparameter{name}][factor=min]}}
% \stopsetups

\definepageinjection
  [chapter:start]
  [empty]
  [page=left]

\definepageinjection
  [chapter:insert]
  [previouspage]
  [%alternative=chapter:image,
   pagestate=stop]

\setuphead
  [chapter]
  [beforesection={\pageinjection[chapter:start]},
insidesection={\pageinjection[chapter:insert][name=\structureuservariable{image}]}]

% \setuphead
%   [chapter]
%   [beforesection={\pageinjection[chapter:start]},
% 
insidesection={\pageinjection[chapter:insert][name={chapter\namedheadnumber{chapter}}]}]


\setuppagenumbering
  [alternative=doublesided]

\setupexternalfigures
  [location=default]

\starttext

\startchapter [title={Mill}] [image=mill]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\startchapter [title={Mill}] [image=mill]
\dorecurse{11}{\samplefile{lorem}}
\stopchapter

\startchapter [title={Mill}] [image=mill]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\stoptext
 end example

Wolfgang

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

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


Re: [NTG-context] help with facing page image

2022-03-07 Thread jbf via ntg-context
Appreciate your assistance. I'll do my best with what you offer here. Of 
course, I've always said these images are at the beginning, not "the end 
of their respective chapters" and I've already indicated how the images 
are named, simply as Chapter1.jpg  and so on, so I'll need to work 
around these differences in your example. But with trial and error, 
let's hope I get there!


Thank you,

Julian


On 7/3/22 18:01, śrīrāma wrote:

On Monday, March 7, 2022 11:50 AM jbf wrote:

All ten images are different, though, in my case (Chapter1.jpg,
Chapter2.jpg... Chapter10.jpg all in a pics directory, so I'd point
\setupexternalfigures to that). I wonder if there is a way to list them
so that they get called in order as chapters proceed. A kind of "if such
and such then \setlayer 1,2,3"

I think that should be easy. Suppose you have images
{chap-cover-1.jpg, chap-cover-2.jpg,  ... chap-cover-10.jpg}
each of which appear at the ends of their respective chapters, then the 
following achieves what you want (once you point ConTeXt to the right directory 
for figures of course):

% kate: hl ctx
%%% SOF
   \setuppagenumbering[alternative=doublesided]

   \definelayer
 [chapCover]
 [x=0mm,
  y=0mm,
  width=\paperwidth,
  height=\paperheight,repeat=yes]

   \startsetups chapter:before
   \doifoddpageelse{}
 {\pushbackground[page]
  \resetlayer[chapCover]
  \setlayer
  [chapCover]
  {\determineheadnumber[chapter]
   \externalfigure
 [chap-cover-\currentheadnumber]
 [width=\paperwidth]}
   \setupbackgrounds[page][background=chapCover]
   \page[empty]
   \popbackground}
   \stopsetups

   \startsetups chapter:after
   \doifoddpageelse{}
 {\page[empty]}
   \stopsetups

   \setuphead
 [chapter]
 [page=yes,
  before=\directsetup{chapter:before},
  aftersection=\directsetup{chapter:after}]

   \starttext
   \dorecurse{10}{
 \startchapter[title={Chapter \convertnumber{word}{\recurselevel}}]
   \input knuth
   \ifnum\headnumber[chapter]=5
   {\bfd five}
   \fi
   \blank
   \input tufte
   \blank
   \input ward
   \blank
   \ifnum\recurselevel=5
 \page
 \input zapf
 \input zapf
   \fi
 \stopchapter
   }
   \stoptext
%%% EOF

So we figure out which chapter we are in and then set the layer to the 
corresponding picture. Personally, I much prefer to collect all the images into 
a separate PDF with:

%%% chap-covers.tex
 \starttext
 \dorecurse{10}{\startTEXpage
 \externalfigure[chap-cover-\recurselevel]
 \stopTEXpage}
 \stoptext
%%% EOF

[and get 'chap-covers.pdf' from context]

... and then modify the 'before' setup to read as below

%%%
   \startsetups chapter:before
   \doifoddpageelse{}
 {\pushbackground[page]
  \resetlayer[chapCover]
  \setlayer
  [chapCover]
  {\determineheadnumber[chapter]
   \externalfigure
 [chap-covers]
 [page=\currentheadnumber,width=\paperwidth]}
   \setupbackgrounds[page][background=chapCover]
   \page[empty]
   \popbackground}
   \stopsetups
%%%

Sreeram



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

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


Re: [NTG-context] help with facing page image

2022-03-06 Thread śrīrāma via ntg-context
On Monday, March 7, 2022 11:50 AM jbf wrote:
> All ten images are different, though, in my case (Chapter1.jpg, 
> Chapter2.jpg... Chapter10.jpg all in a pics directory, so I'd point 
> \setupexternalfigures to that). I wonder if there is a way to list them 
> so that they get called in order as chapters proceed. A kind of "if such 
> and such then \setlayer 1,2,3"

I think that should be easy. Suppose you have images 
{chap-cover-1.jpg, chap-cover-2.jpg,  ... chap-cover-10.jpg}
each of which appear at the ends of their respective chapters, then the 
following achieves what you want (once you point ConTeXt to the right directory 
for figures of course):

% kate: hl ctx
%%% SOF
  \setuppagenumbering[alternative=doublesided]

  \definelayer
[chapCover]
[x=0mm,
 y=0mm,
 width=\paperwidth,
 height=\paperheight,repeat=yes]

  \startsetups chapter:before
  \doifoddpageelse{}
{\pushbackground[page]
 \resetlayer[chapCover]
 \setlayer
 [chapCover]
 {\determineheadnumber[chapter]
  \externalfigure
[chap-cover-\currentheadnumber]
[width=\paperwidth]}
  \setupbackgrounds[page][background=chapCover]
  \page[empty]
  \popbackground}
  \stopsetups

  \startsetups chapter:after
  \doifoddpageelse{}
{\page[empty]}
  \stopsetups

  \setuphead
[chapter]
[page=yes,
 before=\directsetup{chapter:before},
 aftersection=\directsetup{chapter:after}]

  \starttext
  \dorecurse{10}{
\startchapter[title={Chapter \convertnumber{word}{\recurselevel}}]
  \input knuth
  \ifnum\headnumber[chapter]=5
  {\bfd five}
  \fi
  \blank
  \input tufte
  \blank
  \input ward
  \blank
  \ifnum\recurselevel=5
\page
\input zapf
\input zapf
  \fi
\stopchapter
  }
  \stoptext
%%% EOF

So we figure out which chapter we are in and then set the layer to the 
corresponding picture. Personally, I much prefer to collect all the images into 
a separate PDF with:

%%% chap-covers.tex
\starttext
\dorecurse{10}{\startTEXpage
\externalfigure[chap-cover-\recurselevel]
\stopTEXpage}
\stoptext
%%% EOF

[and get 'chap-covers.pdf' from context]

... and then modify the 'before' setup to read as below

%%% 
  \startsetups chapter:before
  \doifoddpageelse{}
{\pushbackground[page]
 \resetlayer[chapCover]
 \setlayer
 [chapCover]
 {\determineheadnumber[chapter]
  \externalfigure
[chap-covers]
[page=\currentheadnumber,width=\paperwidth]}
  \setupbackgrounds[page][background=chapCover]
  \page[empty]
  \popbackground}
  \stopsetups
%%%

Sreeram


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

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


Re: [NTG-context] help with facing page image

2022-03-06 Thread jbf via ntg-context
I can see how that works, Sreeram, especially the chapter:after to cope 
with the chapters ending on an even page. Though I will have to try it 
now on a copy of the real document to test it there.


All ten images are different, though, in my case (Chapter1.jpg, 
Chapter2.jpg... Chapter10.jpg all in a pics directory, so I'd point 
\setupexternalfigures to that). I wonder if there is a way to list them 
so that they get called in order as chapters proceed. A kind of "if such 
and such then \setlayer 1,2,3"


Julian

On 7/3/22 16:38, śrīrāma wrote:

On Monday, March 7, 2022 9:19 AM jbf via ntg-context wrote:

Author wants an image on facing page to each of 10 chapters in the
bodypart of the document. Assume that everything else is working
properly for this document (double-sided etc.), but other than before
chapter 1, I can't seem to get my facing page image to appear where it
should!

 From what I understood from your explanation, I have this:

%%% SOF
   % for 'mill'
   \setupexternalfigures[location={default}]

   \setuppagenumbering[alternative=doublesided]

   
\definelayer[mill][x=0mm,y=0mm,width=\paperwidth,height=\paperheight,repeat=yes]
   \setlayer[mill]{\externalfigure[mill][width=\paperwidth]}

   \startsetups chapter:before
   \doifoddpageelse{}
 {\pushbackground[page]
 \setupbackgrounds[page][background=mill]
 \page[empty]
 \popbackground}
   \stopsetups

   \startsetups chapter:after
   \doifoddpageelse{}
 {\page[empty]}
   \stopsetups

   \setuphead
 [chapter]
 [page=yes,
 before=\directsetup{chapter:before},
 aftersection=\directsetup{chapter:after}]

   \starttext
   \dorecurse{10}{
 \startchapter[title={Chapter \convertnumber{word}{\recurselevel}}]
   \input knuth
   \blank
   \input tufte
   \blank
   \input ward
   \blank
   \ifnum\recurselevel=5
 \page
 \input zapf
 \input zapf
   \fi
 \stopchapter
   }
   \stoptext
%%% EOF

[I am just using the mill picture on every facing page of chapter]
If the chapter ends on an even page then we can insert an empty page with 
\page[empty] with [aftersection=...] in \setuphead. The [before=...] is push, 
set background to mill on a new (empty) left page and then pop back (much like 
the example from wiki).

Sreeram



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

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


Re: [NTG-context] help with facing page image

2022-03-06 Thread śrīrāma via ntg-context
On Monday, March 7, 2022 11:08 AM śrīrāma wrote:
> 
> From what I understood from your explanation, I have this:
> 

A formatted version below –

%%% SOF
  % for 'mill'
  \setupexternalfigures[location={default}]

  \setuppagenumbering[alternative=doublesided]

  \definelayer
[mill]
[x=0mm,
 y=0mm,
 width=\paperwidth,
 height=\paperheight,repeat=yes]
  \setlayer
[mill]
{\externalfigure[mill][width=\paperwidth]}

  \startsetups chapter:before
  \doifoddpageelse{}
{\pushbackground[page]
 \setupbackgrounds[page][background=mill]
 \page[empty]
 \popbackground}
  \stopsetups

  \startsetups chapter:after
  \doifoddpageelse{}
{\page[empty]}
  \stopsetups

  \setuphead
[chapter]
[page=yes,
 before=\directsetup{chapter:before},
 aftersection=\directsetup{chapter:after}]

  \starttext
  \dorecurse{10}{
\startchapter[title={Chapter \convertnumber{word}{\recurselevel}}]
  \input knuth
  \blank
  \input tufte
  \blank
  \input ward
  \blank
  \ifnum\recurselevel=5
\page
\input zapf
\input zapf
  \fi
\stopchapter
  }
  \stoptext
%%% EOF

Sreeram


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

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


Re: [NTG-context] help with facing page image

2022-03-06 Thread śrīrāma via ntg-context
On Monday, March 7, 2022 9:19 AM jbf via ntg-context wrote:
> Author wants an image on facing page to each of 10 chapters in the 
> bodypart of the document. Assume that everything else is working 
> properly for this document (double-sided etc.), but other than before 
> chapter 1, I can't seem to get my facing page image to appear where it 
> should!

From what I understood from your explanation, I have this:

%%% SOF
  % for 'mill'
  \setupexternalfigures[location={default}]

  \setuppagenumbering[alternative=doublesided]

  
\definelayer[mill][x=0mm,y=0mm,width=\paperwidth,height=\paperheight,repeat=yes]
  \setlayer[mill]{\externalfigure[mill][width=\paperwidth]}

  \startsetups chapter:before
  \doifoddpageelse{}
{\pushbackground[page]
\setupbackgrounds[page][background=mill]
\page[empty]
\popbackground}
  \stopsetups

  \startsetups chapter:after
  \doifoddpageelse{}
{\page[empty]}
  \stopsetups

  \setuphead
[chapter]
[page=yes,
before=\directsetup{chapter:before},
aftersection=\directsetup{chapter:after}]

  \starttext
  \dorecurse{10}{
\startchapter[title={Chapter \convertnumber{word}{\recurselevel}}]
  \input knuth
  \blank
  \input tufte
  \blank
  \input ward
  \blank
  \ifnum\recurselevel=5
\page
\input zapf
\input zapf
  \fi
\stopchapter
  }
  \stoptext
%%% EOF

[I am just using the mill picture on every facing page of chapter]
If the chapter ends on an even page then we can insert an empty page with 
\page[empty] with [aftersection=...] in \setuphead. The [before=...] is push, 
set background to mill on a new (empty) left page and then pop back (much like 
the example from wiki).

Sreeram


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

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


[NTG-context] help with facing page image

2022-03-06 Thread jbf via ntg-context
I wonder if someone can help me untangle the current little mess I seem 
to be creating!


Author wants an image on facing page to each of 10 chapters in the 
bodypart of the document. Assume that everything else is working 
properly for this document (double-sided etc.), but other than before 
chapter 1, I can't seem to get my facing page image to appear where it 
should!


A question along these lines (but not quite the same) was asked back in 
2019, so I started with what seemed to me to be the simplest response to 
this question. Here is what I have to get the image before Chapter 1 in 
bodymatter:


\startbodymatter

\definelayer[mylayer] % name of the layer

[x=0mm, y=0mm, % from upper left corner of paper

width=\paperwidth,height=\paperheight] % let the layer cover the full paper

\setlayer[mylayer]

[hoffset=2.5cm, voffset=3cm]

{\externalfigure[Chapter1.jpg][width=.9\textwidth]}

\doifoddpageelse

{}

{\pushbackground[page]

\setupbackgrounds[page]%[background=color,backgroundcolor=red]

[background=mylayer]

\page[empty]

\popbackground}

\startchapter[title={Prelude}] etc.

This correctly places the Chapter1.jpg on the facing page to Chapter 1. 
My problem comes with Chapter 2, since Chapter 1 finishes on an even 
page, and this means I would need a blank odd page to follow that so 
that Chapter2.jpg (a different image to the first) can be on the verso 
of that and the Chapter itself would then start on the odd page facing that.


I think the \doiffoddpageelse command above is only meant to work when a 
chapter ends on an odd, not an even page, but I do not know what 
alternative command to give.


Repeating the above set of commands prior to \startchapter for chapter 2 
places the image, naturally enough, behind the last page of text for 
Chapter 1, which is unacceptable, so I thought I could simply add a 
blank page or two after the chapter and it would all fall into place. I 
tried various ways of doing that (e.g. \page[+2], or using makeup 
pages), and while I can add pages that way, I can't get the image to 
appear.


No doubt the solution is simple enough. It might also lie in the 
\setuphead[chapter] arrangement too. I've tried page=yes there, but to 
no avail. I also tried \ startsetups[chapter:before] with the 
pushbackground etc command and added that in with 
before=\directsetup{chapter:before} as suggested in the wiki, but 
couldn't get that to work either. By that stage I was so tangled up in 
the problem I may not have been able to think straight :-). Somehow, 
though, I think most of the elements are there.


Any help would be appreciated.

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

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


Re: [NTG-context] help with xtreme tables

2021-06-08 Thread Ajith R

Hi,

Thanks. I will try as you suggested

ajith

On Tue, Jun 8, 2021 at 1:54 PM, Hans Hagen  wrote:

On 6/8/2021 9:11 AM, Ajith R wrote:


Hi,

I have a table with around 120 rows and 120 columns which fits an A0 
paper. I want it to be split so that it fits A4 sized papers.

When I tried using xtables :

\startxtable[split=repeat,header=repeat]
\startxtablehead
...
\stopxtablehead
\startxtablebody

.
.
.

\stopxtablebody

the table rows get split into different pages, but the columns get 
cut at the right edge of the page.
Is there a way to split the columns as well (repeating the first 
column as necessary)?


Also, what is the use of grouping rows within \startxtablenext and 
\stopxtablenext?


Note: I am just typing the outline of the code as the cell 
definitions is very long and hopefully my requirement is clear 
without the entire cell definitions.

better look at linetables that

\setuplinetable[n=6,lines=40]

% \setuplinetable[c][1]   
[width=2cm,background=color,backgroundcolor=red]
% \setuplinetable[c][4] 
[width=3cm,background=color,backgroundcolor=yellow]
% \setuplinetable[c][6] 
[width=3cm,background=color,backgroundcolor=magenta]

% \setuplinetable[r][even][background=color,backgroundcolor=green]

\starttext

\startlinetablehead
\dorecurse{2}{\dorecurse{5}{\NC head #1 ##1\NC head \NC head \NC 
head \NC head \NC head} \NC \NR}

\stoplinetablehead
\startlinetable
\dorecurse{2000}{\dorecurse{5}{\NC cell #1 ##1\NC cell \NC cell 
\NC cell \NC cell \NC cell} \NC \NR}

\stoplinetable

\stoptext

a rather old but okay mechanism that splits in two dimensions

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] help with xtreme tables

2021-06-08 Thread Ajith R

Hi,

I have a table with around 120 rows and 120 columns which fits an A0 paper. I 
want it to be split so that it fits A4 sized papers.
When I tried using xtables :

\startxtable[split=repeat,header=repeat]
\startxtablehead
...
\stopxtablehead
\startxtablebody

.
.
.

\stopxtablebody

the table rows get split into different pages, but the columns get cut at the 
right edge of the page.
Is there a way to split the columns as well (repeating the first column as 
necessary)?

Also, what is the use of grouping rows within \startxtablenext and 
\stopxtablenext?

Note: I am just typing the outline of the code as the cell definitions is very 
long and hopefully my requirement is clear without the entire cell definitions.

Thanks,
ajith

 NB: Apologies if you get more than one copy of this email because I am 
re-sending this email as my first attempt appears to have failed


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

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


Re: [NTG-context] help with xtreme tables

2021-06-08 Thread Hans Hagen

On 6/8/2021 9:11 AM, Ajith R wrote:


Hi,

I have a table with around 120 rows and 120 columns which fits an A0 paper. I 
want it to be split so that it fits A4 sized papers.
When I tried using xtables :

\startxtable[split=repeat,header=repeat]
\startxtablehead
...
\stopxtablehead
\startxtablebody

.
.
.

\stopxtablebody

the table rows get split into different pages, but the columns get cut at the 
right edge of the page.
Is there a way to split the columns as well (repeating the first column as 
necessary)?

Also, what is the use of grouping rows within \startxtablenext and 
\stopxtablenext?

Note: I am just typing the outline of the code as the cell definitions is very 
long and hopefully my requirement is clear without the entire cell definitions.

better look at linetables that

\setuplinetable[n=6,lines=40]

% \setuplinetable[c][1]   [width=2cm,background=color,backgroundcolor=red]
% \setuplinetable[c][4] 
[width=3cm,background=color,backgroundcolor=yellow]
% \setuplinetable[c][6] 
[width=3cm,background=color,backgroundcolor=magenta]

% \setuplinetable[r][even][background=color,backgroundcolor=green]

\starttext

\startlinetablehead
\dorecurse{2}{\dorecurse{5}{\NC head #1 ##1\NC head \NC head \NC 
head \NC head \NC head} \NC \NR}

\stoplinetablehead
\startlinetable
\dorecurse{2000}{\dorecurse{5}{\NC cell #1 ##1\NC cell \NC cell \NC 
cell \NC cell \NC cell} \NC \NR}

\stoplinetable

\stoptext

a rather old but okay mechanism that splits in two dimensions

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] help with xtreme tables

2021-06-07 Thread Ajith R

Hi,

I have a table with around 120 rows and 120 columns which fits an A0 
paper. I want it to be split so that it fits A4 sized papers.

When I tried using xtables :

\startxtable[split=repeat,header=repeat]
\startxtablehead
...
\stopxtablehead
\startxtablebody

.
.
.

\stopxtablebody

the table rows get split into different pages, but the columns get cut 
at the right edge of the page.
Is there a way to split the columns as well (repeating the first column 
as necessary)?


Also, what is the use of grouping rows within \startxtablenext and 
\stopxtablenext?


Note: I am just typing the outline of the code as the cell definitions 
is very long and hopefully my requirement is clear without the entire 
cell definitions.


Thanks,
ajith




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

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


Re: [NTG-context] Help figuring why long document stops short in xml export

2021-02-24 Thread Hans Hagen

On 2/24/2021 3:16 PM, Christoph Hintermüller wrote:


May i later send a sharing link to the full sources from our university
systems, may be you immediately see what makes it hickup.

sure,

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Help figuring why long document stops short in xml export

2021-02-24 Thread Christoph Hintermüller

On Wed, 2021-02-24 at 15:49 +0100, Taco Hoekwater wrote:
> > On 24 Feb 2021, at 10:42, Christoph Hintermüller <
> > christ...@out-world.com> wrote:
> > 
> > Hi
> > What command line parameters, trackers etc I should activate when i
> 
> There is 
> 
>   \enabletrackers[export.*]
> 


Thanks. Not sure if related at all but if i add that to the document i
do get the following error. It hicksup at \stopstandardmakeup if i
remove the stanard makeup it hicksup at frontmatter etc. I think that
has something to do with tracker and not the document itself.If i
remove everything up to \stopfrontmatter than it runs until the first
custom defined float and again yields the same error. If i explicitly
not select export.trace.details no hickup.

-registered function call [188]:
...cal/tex/texmf-context/tex/context/base/mkiv/back-exp.lua:3052:
attempt to index a nil value (field '?')
stack traceback:
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3052: in upvalue 'showdetail'
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3067: in upvalue 'collectresults'
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3330: in upvalue 'collectresults'
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3330: in upvalue 'collectresults'
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3330: in upvalue 'collectresults'
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3330: in upvalue 'collectresults'
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3330: in upvalue 'collectresults'
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3330: in upvalue 'collectresults'
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3330: in upvalue 'collectresults'
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3330: in upvalue 'collectresults'
... (skipping 5 levels)
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3330: in upvalue 'collectresults'
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3330: in upvalue 'collectresults'
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3330: in upvalue 'collectresults'
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3330: in upvalue 'collectresults'
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3330: in upvalue 'collectresults'
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3330: in upvalue 'collectresults'
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3330: in upvalue 'collectresults'
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3330: in upvalue 'collectresults'
...cal/tex/texmf-context/tex/context/base/mkiv/back-
exp.lua:3423: in upvalue 'nodes_handlers_export'
[string "local tonut  = nodes.tonut..."]:30: in function
<[string "local tonut  = nodes.tonut..."]:13>
(...tail calls...)
[string "/usr/local/tex/texmf-context/tex/context/base..."]:34: 
in function <[string "/usr/local/tex/texmf-
context/tex/context/base..."]:33>
(...tail calls...)

58 \definemathcommand[ld][nolop]{\mfunction{ld}}
59 \setupcaption[lefthangingfigure][width=\textwidth,align=figure]
60 \setupheadtext[content=Inhalt]
61 %\traceexternalfilters
62 \enabletrackers[export.*]
63 
64 \starttext
65 \startstandardmakeup
66 \title{Programmiertechnik 2}
67 \subsubject{Dr. Christoph Hintermüller}
68 >>  \stopstandardmakeup
69 \startfrontmatter
70 \completecontent
71 %\placecombinedlist[content]
72 \stopfrontmatter
73 \startbodymatter
74 
75 %\showlayout
76 \input ObjektorientierteProgrammierung
77 \placefloats
78 \input DatenStrukturen-


Best
Xristoph


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

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


Re: [NTG-context] Help figuring why long document stops short in xml export

2021-02-24 Thread Taco Hoekwater


> On 24 Feb 2021, at 10:42, Christoph Hintermüller  
> wrote:
> 
> Hi
> What command line parameters, trackers etc I should activate when i

There is 

  \enabletrackers[export.*]

Best wishes,
Taco

— 
Taco Hoekwater  E: t...@bittext.nl
genderfluid (all pronouns)



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

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


Re: [NTG-context] Help figuring why long document stops short in xml export

2021-02-24 Thread Christoph Hintermüller
Hi

On Wed, 2021-02-24 at 15:16 +0100, Christoph Hintermüller wrote:
> 
> 
> I hoped so too. But the only i figured that it stops between two
> sections. If i comment the whole set of sections which seem to
> contain
> offending content. Than it simply stops at some later section. And if
> i
> remove the set before the one seemingly offending it still stops at
> the
> section it stopped in the first instant. If there happens to be some
> pattern i'm not experienced enough to notice it.
> 
> 

I don't know if that is likely to be related at all, if i insert
\showlayout at the beginning of the document the hickup occurs after
later section than if it is not present, even if the section it
initially stopped is include in the document. 

Best
Christoph


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

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


Re: [NTG-context] Help figuring why long document stops short in xml export

2021-02-24 Thread Christoph Hintermüller
Hi

On Wed, 2021-02-24 at 11:24 +0100, Hans Hagen wrote:
> On 2/24/2021 10:42 AM, Christoph Hintermüller wrote:
> 
> > I'm sorry to be so clue less to not be able to provide more
> > information. The document it self is too big to be posted and i do
> > not
> > want to make it public anyway, but if required i can provide a
> > share
> > link.
> 
> You can try to comment some code to see where it fails/succeeds: make
> a 
> copy and start wiping stuff. Normally that quickly reveals where it
> goes 
> wrong.
> 



I hoped so too. But the only i figured that it stops between two
sections. If i comment the whole set of sections which seem to contain
offending content. Than it simply stops at some later section. And if i
remove the set before the one seemingly offending it still stops at the
section it stopped in the first instant. If there happens to be some
pattern i'm not experienced enough to notice it.



> Indeed some real data is needed to see where it fails.
> 


May i later send a sharing link to the full sources from our university
systems, may be you immediately see what makes it hickup.

Best 
Christoph 


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

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


Re: [NTG-context] Help figuring why long document stops short in xml export

2021-02-24 Thread Hans Hagen

On 2/24/2021 10:42 AM, Christoph Hintermüller wrote:


I'm sorry to be so clue less to not be able to provide more
information. The document it self is too big to be posted and i do not
want to make it public anyway, but if required i can provide a share
link.
You can try to comment some code to see where it fails/succeeds: make a 
copy and start wiping stuff. Normally that quickly reveals where it goes 
wrong.


Indeed some real data is needed to see where it fails.

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] Help figuring why long document stops short in xml export

2021-02-24 Thread Christoph Hintermüller
Hi
What command line parameters, trackers etc I should activate when i
want to figure why my document lacks content worth of several pages in
xml export while the pdf which is created in parallel contains all
pages. 

I'm using 

mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file: /tex/texmf-
context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2021.02.14 16:39
mtx-context | main context file: /tex/texmf-
context/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2021.02.14 16:39


Would switching to lmtx may be helpful in at least figuring why or be
the only known solution?

The Document it self is my lecture notes which are about 125 Pages
long. The xml export ends at Page 63. 

Are there any known commands which can cause exporter to give up early
and thus should in export be avoided or be put in mode dependent block
hiding them form exporter.

Any hint what i should, would have to check and how to hopefully grabe
any hint where to amend the document to get full output. 

Currently i have not made images mode dependent (pdf:metapost,
xml:png/svg). Could that be a reason why exporter finally ends document
early?

I'm sorry to be so clue less to not be able to provide more
information. The document it self is too big to be posted and i do not
want to make it public anyway, but if required i can provide a share
link.

Best
Christoph Hintermüller
 

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

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


[NTG-context] help with filename containing spaces

2020-10-17 Thread Pablo Rodriguez
Dear list,

I have this sample:

\setupinteraction[state=start]
\starttext
\def\cB{file.pdf}
\def\cC{file with spaces.pdf}
%~ \def\PathName{\cldcontext{[[\env{completepath}]]}}
\def\PathName{%
\cldcontext{string.gsub([[\env{completepath}]], "", "/")}}
no spaces: \doifelsefileexists{\PathName\cB}{yes}{no}
\attachment[file={\PathName\cB}]\\
with spaces: \doifelsefileexists{\PathName\cC}{yes}{no}
\attachment[file={\PathName\cC}]
\stoptext

It works fine in Linux with spaces in file names. I invoke it with:

context --purgeall --arguments="pathname={~/}" ~/a

But in Windows, the actual invocation involves a loop in a batch file.
Without the loop, it would read (for drag and drop):

context --purgeall --arguments="completepath=%~dp1" file-above.tex

I don’t get the attachment only with the file that has spaces in its
name (the file is also reported as not existing). The file without
spaces in the its name is being attached and reported as existing.

Does anyone know what might be preventing ConTeXt in Windows not to
recognize the existing file with spaces in its name?

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] help with forced page break in TOC

2020-10-05 Thread jbf
Thanks Willi, that is the solution. So I then took a look at 
\showinjector on the wiki (and \setinjector) and found pretty much what 
you explained. Pity there isn't a link from the other page to this that 
I might have found when I first went looking...


Is it the case that the #Forced_Page_break reference in the wiki simply 
no longer applies in any situation? Anyway, that aside, thank you for 
the solution.


Julian

On 6/10/20 9:38 am, Willi Egger wrote:

Hello Julian,

the mechanism does not work in the typesetting of the TOC.

Whatt you is the following, when the book is in a final stage:

run the file with \showinjector. This will give you in the left margin the 
numbers of the different TOC-entries.

Now you can say

\setinjector[list] [“the number of the injector where the break must take 
place][\page]


I hope that this is solving your issue.
Kind regards

Willi

On 5 Oct 2020, at 04:53, jbf  wrote:

I am unable to adapt the example given in 
https://wiki.contextgarden.net/Table_of_Contents#Forced_Page_Break to my 
situation:

In my case, the ToC has no chapters per se, but uses a defined \mytitle. This 
produces a series of unnumbered items in the ToC.

The example in contextgarden tells me to first define the break, which I have 
done:

\definelistextra[page][before=\page]
It then tells me to call this in where I \placecontent (in my case I am using 
my own defined  \placecombined list[content]). The example given in the wiki is:

\placecontent[extras={6=page}]
But I have unnumbered items which are titles (mytitles), so I am not sure what 
to replace '6' with. I tried:

\placecombinedlist[content][extras={mytitle title={Elements of Reading}=page}] 
since 'Elements of reading' is the title before which I want the page break to 
occur. This does not work. I tried variation of it, e.g. since it is the third 
such title I tried ][extras={3=page}] but that does nothing either.

Any clues as to how I can resolve this small problem?

Julian

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

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

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] help with forced page break in TOC

2020-10-05 Thread Willi Egger
Hello Julian,

the mechanism does not work in the typesetting of the TOC.

Whatt you is the following, when the book is in a final stage:

run the file with \showinjector. This will give you in the left margin the 
numbers of the different TOC-entries.

Now you can say

\setinjector[list] [“the number of the injector where the break must take 
place][\page]


I hope that this is solving your issue.
Kind regards

Willi
> On 5 Oct 2020, at 04:53, jbf  wrote:
> 
> I am unable to adapt the example given in 
> https://wiki.contextgarden.net/Table_of_Contents#Forced_Page_Break to my 
> situation:
> 
> In my case, the ToC has no chapters per se, but uses a defined \mytitle. This 
> produces a series of unnumbered items in the ToC.
> 
> The example in contextgarden tells me to first define the break, which I have 
> done:
> 
> \definelistextra[page][before=\page]
> It then tells me to call this in where I \placecontent (in my case I am using 
> my own defined  \placecombined list[content]). The example given in the wiki 
> is:
> 
> \placecontent[extras={6=page}]
> But I have unnumbered items which are titles (mytitles), so I am not sure 
> what to replace '6' with. I tried:
> 
> \placecombinedlist[content][extras={mytitle title={Elements of 
> Reading}=page}] since 'Elements of reading' is the title before which I want 
> the page break to occur. This does not work. I tried variation of it, e.g. 
> since it is the third such title I tried ][extras={3=page}] but that does 
> nothing either.
> 
> Any clues as to how I can resolve this small problem?
> 
> Julian
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

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


[NTG-context] help with forced page break in TOC

2020-10-04 Thread jbf
I am unable to adapt the example given in 
https://wiki.contextgarden.net/Table_of_Contents#Forced_Page_Break to my 
situation:


In my case, the ToC has no chapters per se, but uses a defined \mytitle. 
This produces a series of unnumbered items in the ToC.


The example in contextgarden tells me to first define the break, which I 
have done:


\definelistextra[page][before=\page]

It then tells me to call this in where I \placecontent (in my case I am 
using my own defined  \placecombined list[content]). The example given 
in the wiki is:


\placecontent[extras={6=page}]

But I have unnumbered items which are titles (mytitles), so I am not 
sure what to replace '6' with. I tried:


\placecombinedlist[content][extras={mytitle title={Elements of 
Reading}=page}] since 'Elements of reading' is the title before which I 
want the page break to occur. This does not work. I tried variation of 
it, e.g. since it is the third such title I tried ][extras={3=page}] but 
that does nothing either.


Any clues as to how I can resolve this small problem?

Julian

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

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


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

2020-08-13 Thread Nicola
On 2020-08-13, Pablo Rodriguez  wrote:
> On 8/13/20 6:06 PM, Nicola wrote:
>> [...]
>> Thanks. That works with my MWE, but in my document I actually have
>> a chapter, and chapters start on the right page, even if I add page=no
>> to \setuppagenumbering:
>> [...]
>> I have no idea how to allow chapters to start at arbitrary pages when
>> alternative=doublesided.
>
> Use \page[yes, blank] instead of \page[yes, blank, right].
>
> I hope this helps,

Thank you both. I had tried `yes` already, but I had mixed it with other
interfering settings, which got me confused. Now that I have cleand up
my code, everything is as expected.

Nicola

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

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


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

2020-08-13 Thread Wolfgang Schuster

Nicola schrieb am 13.08.2020 um 18:06:

Thanks. That works with my MWE, but in my document I actually have
a chapter, and chapters start on the right page, even if I add page=no
to \setuppagenumbering:


Can you start a new thread when you have a new question. When other
people have the same problem they can see on the subject if this is
the right thread to find a solution for it.


 \setuppagenumbering[alternative=doublesided,page=no]


The page key in \setuppagenumbering is used to add the final page
in a doublesided document to have a even number of pages.


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

I have no idea how to allow chapters to start at arbitrary pages when
alternative=doublesided.


\setuphead[chapter][page=yes]

Wolfgang

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

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


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

2020-08-13 Thread Pablo Rodriguez
On 8/13/20 6:06 PM, Nicola wrote:
> [...]
> Thanks. That works with my MWE, but in my document I actually have
> a chapter, and chapters start on the right page, even if I add page=no
> to \setuppagenumbering:
> [...]
> I have no idea how to allow chapters to start at arbitrary pages when
> alternative=doublesided.

Use \page[yes, blank] instead of \page[yes, blank, right].

I hope this helps,

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

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


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

2020-08-13 Thread Nicola
On 2020-08-13, Pablo Rodriguez  wrote:
> On 8/13/20 5:17 PM, Nicola wrote:
>> Hi,
>> I still have an issue with blank pages...
>>
 2. Vertically center the ToC (wrt to the text area).
>>>
>>> Use a makeup for the TOC (if and only if it takes a single page).
>>
>> Yes, the ToC takes a single page. The makeup seems to insert a blank
>> page afterwards. MWE:
>
> Hi Nicola,
>
> all makeups do that by default.
>
> "doublesided=no" is what you need.

Thanks. That works with my MWE, but in my document I actually have
a chapter, and chapters start on the right page, even if I add page=no
to \setuppagenumbering:

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

I have no idea how to allow chapters to start at arbitrary pages when
alternative=doublesided.

Nicola


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

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


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

2020-08-13 Thread Pablo Rodriguez
On 8/13/20 5:17 PM, Nicola wrote:
> Hi,
> I still have an issue with blank pages...
>
>>> 2. Vertically center the ToC (wrt to the text area).
>>
>> Use a makeup for the TOC (if and only if it takes a single page).
>
> Yes, the ToC takes a single page. The makeup seems to insert a blank
> page afterwards. MWE:

Hi Nicola,

all makeups do that by default.

"doublesided=no" is what you need.

My warning about only taking a page is that makeups don’t split content
in pages.

I hope it helps,

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

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


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

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

>> 2. Vertically center the ToC (wrt to the text area).
>
> Use a makeup for the TOC (if and only if it takes a single page).

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

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

How do I suppress the blank page after the ToC?

Nicola

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

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


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

2020-08-12 Thread Nicola
On 2020-08-12, Wolfgang Schuster  wrote:
> Nicola schrieb am 11.08.2020 um 22:21:
>> On 2020-08-11, Pablo Rodriguez  wrote:
>>> On 8/11/20 9:24 PM, Nicola wrote:
 Thank Pablo, Wolfgang,
 I have learned more by reading your replies than by myself in the rest
 of the afternoon.
>>>
>>> Hi Nicola,
>>>
>>> if you found replies useful, please update the wiki (this may help others).
>>>
 Just one more thing:
 [...]
 I'd prefer all the titles to be aligned:

   Preface
 I XYZ
...
 VIII XYZ
...

 I have tried to do my homework by playing with \setuphead, but I am
 afraid I need your help on this.
>>>
>>> Sorry, but too tired to type a sample.
>>>
>>> How about setting distance for \setuplist[chapter] in the sectionblock
>>> frontpart with the desired width?
>>
>> That does not seem to change the layout, unfortunately. I have tried
>> with `margin` and `aligntitle` as well:
>>
>> \setuplist[chapter][distance=1cm,aligntitle=yes]
>> \startsectionblockenvironment[frontpart]
>> \setuplist[chapter][aligntitle=yes,margin=2cm,distance=2cm]
>> \stopsectionblockenvironment
>>
>> I'll take a fresh look tomorrow.
>
> When you a unnumbered section with the list alternatives a-c your're out
> of luck with the regular \setuplist options because it always use a
> width of 0pt for regular section number. The aligntitle works only for
> numbered entries to align them when you disable the number entry in the TOC.
>
> To show the section entry and align all entries on the same line you can
> use the following method:
>
>1. Set the width and distance for the section number to 0pt.
>
>2. Set the margin key to a value large enough to fit all numbers
>
>3. Apply a command to the numbercommand key where you shift the
> number to the left in the margin area you set in the previous step

Thanks, nice trick!

Nicola

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

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


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

2020-08-11 Thread Wolfgang Schuster

Nicola schrieb am 11.08.2020 um 22:21:

On 2020-08-11, Pablo Rodriguez  wrote:

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

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


Hi Nicola,

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


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

  Preface
I XYZ
   ...
VIII XYZ
   ...

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


Sorry, but too tired to type a sample.

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


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

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

I'll take a fresh look tomorrow.


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


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


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

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

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


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

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

\starttext

\startfrontmatter
  \completecontent
  \chapter{Preface}
\stopfrontmatter

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

\startbackmatter
  \chapter{Index}
\stopbackmatter

\stoptext
 end example

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

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


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

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

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

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

I'll take a fresh look tomorrow.

Nicola


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

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


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

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

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

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

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

Many thanks for the explanation.

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

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


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

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

Hi Nicola,

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

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

Sorry, but too tired to type a sample.

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

I hope it helps,

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

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


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

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

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

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

Preface
   I XYZ
  ...
VIII XYZ
  ...

I'd prefer all the titles to be aligned:

 Preface
   I XYZ
  ...
VIII XYZ
  ...

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

Nicola


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

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


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

2020-08-11 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 11.08.2020 um 14:53:

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

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


Hi Nicola,

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

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

Many thanks to them and to all other developers.


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

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


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

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



I think a makeup environment fits here better.

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

\startmakeup[copyright]
Copyright © 2020 Author
\stopmakeup



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


distance with dimension is the key in \setuplist.



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




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


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


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


Break pages with \page[yes, blank].



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

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



4. Suppress headers in the front matter.


This would be my educated guess:

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


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


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

   \setuppagenumbering[location={bottom, inmargin}]

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


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

 \setuphead[chapter][after={}]

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


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

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


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


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

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


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

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

Hi Nicola,

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

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

Many thanks to them and to all other developers.

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

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

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

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

distance with dimension is the key in \setuplist.

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

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

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

Break pages with \page[yes, blank].

> 4. Suppress headers in the front matter.

This would be my educated guess:

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

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

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

  \setuppagenumbering[location={bottom, inmargin}]

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

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

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

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

I hope it helps,

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

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


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

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

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

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

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

\setuphead[chapter][after={}]

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

Nicola

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

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

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

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

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

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

\starttext
\startfrontmatter
\page[even]
\startalignment[bottom,flushright]
Copyright © 2020 Author
\stopalignment
\start
\setuphead[chapter][after={}]
\completecontent
\stop
\page[odd]
\startchapter[title={Preface}]\input{knuth}\stopchapter
\stopfrontmatter
\startbodymatter
\setuppagenumber[number=1]
\dorecurse{10}{\startchapter[title={XYZ}]\input{tufte}\stopchapter}
\stopbodymatter
\stoptext
%%%


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

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


Re: [NTG-context] help with confusion re chapter number

2020-07-09 Thread Aditya Mahajan

On Fri, 10 Jul 2020, jbf wrote:


Hi, I wonder if someone could lead me out of my current confusion.

In a test example with MWE as follows, I get exactly what I want:

\setuplabeltext [en] [chapter=~]
\define[2]\MyChapter
  {\framed[frame=off,width=broad,align=middle]{#1\blank[1cm]#2}}
\setuphead [chapter] [command=\MyChapter]
\chapter{Chapter title}

which gives me a chapter number (without the word 'Chapter') and 1cm 
below it the chapter title, e.g.:


 1

  My chapter title

But when I transfer this to the actual tex file I am working with, I 
lose the chapter number. Admittedly, there is more complication to my 
setup in the 'real' example, and maybe that's where I've gone wrong, but 
why am I losing the chapter number?


\define[2]\MyChapter
{\framed[frame=off,width=broad,align=middle,number=yes]{#1\blank[1cm]#2}}
\setuphead
[chapter][header=empty,alternative=middle,style=bold,numbercommand=\groupedcommand{}{\blank[2cm]},after={\blank[3cm]},command=\MyChapter]


What happens if you remove `numbercommand=...,`?

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
___


[NTG-context] help with confusion re chapter number

2020-07-09 Thread jbf

Hi, I wonder if someone could lead me out of my current confusion.

In a test example with MWE as follows, I get exactly what I want:

\setuplabeltext [en] [chapter=~]
\define[2]\MyChapter
  {\framed[frame=off,width=broad,align=middle]{#1\blank[1cm]#2}}
\setuphead [chapter] [command=\MyChapter]
\chapter{Chapter title}

which gives me a chapter number (without the word 'Chapter') and 1cm 
below it the chapter title, e.g.:


 1

  My chapter title

But when I transfer this to the actual tex file I am working with, I 
lose the chapter number. Admittedly, there is more complication to my 
setup in the 'real' example, and maybe that's where I've gone wrong, but 
why am I losing the chapter number?


\define[2]\MyChapter
{\framed[frame=off,width=broad,align=middle,number=yes]{#1\blank[1cm]#2}}
\setuphead
[chapter][header=empty,alternative=middle,style=bold,numbercommand=\groupedcommand{}{\blank[2cm]},after={\blank[3cm]},command=\MyChapter]

Julian

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

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


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

2019-11-10 Thread Wolfgang Schuster

Otared Kavian schrieb am 10.11.2019 um 10:38:

Hi,

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

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

Banach Fixed Point Theorem  3.2.5

Is this possible?


Did you miss Hans solution?

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

Wolfgang

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

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


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

2019-11-10 Thread Otared Kavian
Hi,

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

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

Banach Fixed Point Theorem  3.2.5

Is this possible?

Best regards and many thanks for any hint: OK
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Help with xml & lua

2017-08-07 Thread Hans Hagen

On 8/2/2017 5:23 PM, Olivier Binda wrote:

Hello

I have been trying for the past 3 days to process files with xml on the 
lua side (with Context beta 0.70), but I'm at then end of my wits and 
really need help.


On the lua side, I would really like to be able to :

  1) transform a tree : replace nodes with other nodes

  2) transform a tree : walk it and modify node attributes

  3) walk a modified tree and flush it with setups


what do you mean with 'walk with setups' ... at the lua end? setuips are 
something at the tex end



Could someone give me hints or better yet a lua snipet that :
1) load a tree in lua
2) modify it
3) walk it
4) it can be done again


in some cases you need to apply setups after adaption, eg with

\xmlregistereddocumentsetups{...}{...}

I have had some success with 1, but lost 2 days trying to make 2 & 3 
work with setups


A) I managed to replace a node of an xml document with a subtree of 
another xml document by doing :


-- load the main tree
   local mainTree = lxml.load("mainTree", "mainFile.xml)

   local replacementNode = xml.first(lxml.load("replacement", 
"replacementFile.xml), somePattern)


-- replace nodes
   for node in xml.collected(tree, pattern) do
 node.tg ="toBeReplaced"
 xml.replace(tree, "toBeReplaced", replacementNode)
   end

But then I failed to walk the modified tree with setups : my setups for 
"mainTree" work, but not for the inserted subtrees


at the lua end there's lxm.include

(there's also some some indexing going on)


B) So, to process my tree further, I need to first serialize it

-- save the modified tree

  xml.save(mainTree, "saved.xml")

And then, I can reload the modified tree and work further with it (but 
it sucks to have to save to reload).


\xmlinclude should work ok (at least it does at our end) given that you 
do it before associating the setups


C) "xml.replace" works in a weird way : it erases node (toBereplaced) 
and inserts the children of replacementNode as children of the parent of 
the node to be replaced...


D) I did not manage to walk a tree loaded with xml.load in lua. I know 
that I have to register setups, I tried all sort of things, looked at 
the Tex/Lua context source code but could not make it work. Also the xml 
documentation for context on the net is really old, sparse and obsolete.


On the tex side, it works : \xmlprocessfile{mySetups}{saved.xml}{} works 
like a charm
But the TeX commands don't allow you to grab a modified xml tree, once 
you have walked it


E) I tried

lxml.load(id, filename)
context("\\xmlregistereddocumentsetups{" .. id .. "}{}")

you need to provide (small) working (valid) examples

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] Help with xml & lua

2017-08-07 Thread Olivier Binda

Hello

I have been trying for the past 3 days to process files with xml on the 
lua side (with Context beta 0.70), but I'm at then end of my wits and 
really need help.


On the lua side, I would really like to be able to :

 1) transform a tree : replace nodes with other nodes

 2) transform a tree : walk it and modify node attributes

 3) walk a modified tree and flush it with setups


Could someone give me hints or better yet a lua snipet that :
1) load a tree in lua
2) modify it
3) walk it
4) it can be done again


I have had some success with 1, but lost 2 days trying to make 2 & 3 
work with setups



A) I managed to replace a node of an xml document with a subtree of 
another xml document by doing :


-- load the main tree
  local mainTree = lxml.load("mainTree", "mainFile.xml)

  local replacementNode = xml.first(lxml.load("replacement", 
"replacementFile.xml), somePattern)


-- replace nodes
  for node in xml.collected(tree, pattern) do
node.tg ="toBeReplaced"
xml.replace(tree, "toBeReplaced", replacementNode)
  end

But then I failed to walk the modified tree with setups : my setups for 
"mainTree" work, but not for the inserted subtrees


B) So, to process my tree further, I need to first serialize it

-- save the modified tree

 xml.save(mainTree, "saved.xml")

And then, I can reload the modified tree and work further with it (but 
it sucks to have to save to reload).


C) "xml.replace" works in a weird way : it erases node (toBereplaced) 
and inserts the children of replacementNode as children of the parent of 
the node to be replaced...



D) I did not manage to walk a tree loaded with xml.load in lua. I know 
that I have to register setups, I tried all sort of things, looked at 
the Tex/Lua context source code but could not make it work. Also the xml 
documentation for context on the net is really old, sparse and obsolete.


On the tex side, it works : \xmlprocessfile{mySetups}{saved.xml}{} works 
like a charm
But the TeX commands don't allow you to grab a modified xml tree, once 
you have walked it


E) I tried

lxml.load(id, filename)
context("\\xmlregistereddocumentsetups{" .. id .. "}{}")




Best regards,
OlivierBinda



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

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

Re: [NTG-context] Help with grid typesetting

2016-09-26 Thread Marcus Vinicius Mesquita
Thank you very much.

Regards​

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Help with grid typesetting

2016-09-26 Thread Wolfgang Schuster

Marcus Vinicius Mesquita 
26. September 2016 um 00:07
Dear list,

In the MWE below, the line with 
\setuphead[chapter][before={\blank[3*line,force]}] disrupts the grid 
typesetting in the first page. What am I missing?



\setuplayout[grid=yes]
\showgrid
\setuphead[chapter][before={\blank[3*line,force]}]

\setuphead[chapter][before={\blank[force,3*line,depth]}]

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Help with grid typesetting

2016-09-26 Thread Henri Menke
On 09/26/2016 12:07 AM, Marcus Vinicius Mesquita wrote:
> Dear list,
> 
> In the MWE below, the line with 
> \setuphead[chapter][before={\blank[3*line,force]}] disrupts the grid 
> typesetting in the first page. What am I missing?
> 
> 
> \setuplayout[grid=yes]
> \showgrid
> \setuphead[chapter][before={\blank[3*line,force]}]

\setuphead[chapter][before={\strut\blank[3*line,force]}]

> 
> \starttext
> 
> \startchapter[title={Chapter}]
> \dorecurse{7}{\input tufte}
> \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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Help with grid typesetting

2016-09-25 Thread Marcus Vinicius Mesquita
Dear list,

In the MWE below, the line with
\setuphead[chapter][before={\blank[3*line,force]}] disrupts the grid
typesetting in the first page. What am I missing?


\setuplayout[grid=yes]
\showgrid
\setuphead[chapter][before={\blank[3*line,force]}]

\starttext

\startchapter[title={Chapter}]
\dorecurse{7}{\input tufte}
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Help with configuring Textadept to work with ConTeXt

2016-05-15 Thread L.S.-Soc
Well I deleted MiKTeX from my system path completely and now when I try 
to compile a *.tex file that is clearly a ConTeXt document I only get 
another error message:


> pdflatex -file-line-error -halt-on-error "untitled-3.tex"
Der Befehl "pdflatex" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
> exit status: 1

Which means that no compiler can be found... I am a little stuck here, 
mainly because I can't figure where I can change paths and arguments for 
Textadept or SciTE. SciTE also only gives me an error:


>texexec --pdf test1.tex
warning: f:/Sandbox/ConTeXt/tex/texmf/web2c/texmf.cnf:49: (kpathsea) No 
cnf value on line: OSFONTDIR =.
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/W32TeX) 
(preloaded format=cont-en)

 \write18 enabled.
---! f:/Sandbox/ConTeXt/tex/texmf-win64/web2c/pdftex/cont-en.fmt doesn't 
match pdftex.pool

(Fatal format file error; I'm stymied)
>Exit code: 1

But I did everything as explained on contextwiki. It seems that both 
programs don't even search for CTX...


In TeXworks or TeXnicCenter I haven't had any trouble to make CTX my 
main compiler. But both programs have an option where one can add new 
compiler profiles with location for the compiler and arguments that can 
be passed. In both I simply entered context.exe and my arguments.

But Textadept and SciTE aren't as easy to configure as TW or TXNCC.

Where can I change how and with which program they compile documents? If 
anybody has an idea, I am still open for it.



Greetings, Sebastian


Am 15.05.2016 um 20:48 schrieb Mojca Miklavec:

On 15 May 2016 at 12:22, Jean-Pierre Delange wrote:

Hi !

I don't know Textadept (I'm using TeXWorks). And it is not a good idea to have 
ConTeXt working in parallel with MikTeX (see here : 
http://wiki.contextgarden.net/MikTeX).

This should work fine as long as PATH is different when invoking LaTeX
& ConTeXt.

I haven't touched MikTeX since it lost support for ConTeXt (perhaps
some 8 years ago?), but the last time I did, adding path to ConTeXt
binaries worked fine.

Of course one cannot use MikTeX and ConTeXt with the same PATH settings.

(ConTeXt used to be part of MikTeX, but apparently CS gave up at some
point when LuaTeX came around.)

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Help with configuring Textadept to work with ConTeXt

2016-05-15 Thread Mojca Miklavec
On 15 May 2016 at 12:22, Jean-Pierre Delange wrote:
> Hi !
>
> I don't know Textadept (I'm using TeXWorks). And it is not a good idea to 
> have ConTeXt working in parallel with MikTeX (see here : 
> http://wiki.contextgarden.net/MikTeX).

This should work fine as long as PATH is different when invoking LaTeX
& ConTeXt.

I haven't touched MikTeX since it lost support for ConTeXt (perhaps
some 8 years ago?), but the last time I did, adding path to ConTeXt
binaries worked fine.

Of course one cannot use MikTeX and ConTeXt with the same PATH settings.

(ConTeXt used to be part of MikTeX, but apparently CS gave up at some
point when LuaTeX came around.)

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Help with configuring Textadept to work with ConTeXt

2016-05-15 Thread Jean-Pierre Delange
Hi !

I don't know Textadept (I'm using TeXWorks). And it is not a good idea to have 
ConTeXt working in parallel with MikTeX (see here : 
http://wiki.contextgarden.net/MikTeX). It seems that MiKTeX 2.9 is working with 
luatex... 
Maybe you can find some answers if you take advice from TeXWorks configuration 
with ConTeXt Standalone : there is no way to compile directly with pdftex. You 
must compile with ConTeXt MK IV luatex. For such a result, you have to set 
preferences in your Textadept with the good PATH (where textadept can find the 
setuptex of CTX). It's a good thing to adjust some variables in typesetting 
configuration, such as $synctexoption and $fullname.
Hope it helps !
JP

- Mail original -
De: "L.S.-Soc" <axteff...@gmail.com>
À: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Envoyé: Samedi 14 Mai 2016 23:06:42
Objet: [NTG-context] Help with configuring Textadept to work with ConTeXt

Hi folks,

i am having a hard time to configure Textadept to work with CTX on 
Windows 10. I've also searched around but can't find any usefull tutorial.

What I've done so far:
- I downloaded and installed CTX (first-setup.bat --modules=all) and I 
added "...\texmf-win64\bin" to my system path
- I downloaded and unzipped Textadept and also added the folder to my 
system path.
- I opened a *.tex file with Textadept and pressed "Tools->Compile" but 
I only got an error message:

 > pdflatex -file-line-error -halt-on-error "untitled-3.tex"
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (MiKTeX 2.9 64-bit)
entering extended mode
(untitled-3.tex
LaTeX2e <2015/10/01> patch level 2
Babel <3.9n> and hyphenation patterns for 69 languages loaded.
untitled-3.tex:2: Undefined control sequence
untitled-3.tex:2:  ==> Fatal error occurred, no output PDF file produced!
Transcript written on untitled-3.log.
 > exit status: 1

Now I am wondering why Textadept does choose MiKTeX as I have placed 
ConTeXt above MiKTeX in my system path.
I also tried to extract the scintillua*** lexers into Textadept's lexer 
folder but still. No pdf can be created.

I also searched Textadept's files for context entries but there is 
nothing i could change to make TA compile a file in MkIV.

Did anybody manage to get Context to work with TA and could provide some 
help? Thanks in advance.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Help with configuring Textadept to work with ConTeXt

2016-05-14 Thread L.S.-Soc

Hi folks,

i am having a hard time to configure Textadept to work with CTX on 
Windows 10. I've also searched around but can't find any usefull tutorial.


What I've done so far:
- I downloaded and installed CTX (first-setup.bat --modules=all) and I 
added "...\texmf-win64\bin" to my system path
- I downloaded and unzipped Textadept and also added the folder to my 
system path.
- I opened a *.tex file with Textadept and pressed "Tools->Compile" but 
I only got an error message:


> pdflatex -file-line-error -halt-on-error "untitled-3.tex"
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (MiKTeX 2.9 64-bit)
entering extended mode
(untitled-3.tex
LaTeX2e <2015/10/01> patch level 2
Babel <3.9n> and hyphenation patterns for 69 languages loaded.
untitled-3.tex:2: Undefined control sequence
untitled-3.tex:2:  ==> Fatal error occurred, no output PDF file produced!
Transcript written on untitled-3.log.
> exit status: 1

Now I am wondering why Textadept does choose MiKTeX as I have placed 
ConTeXt above MiKTeX in my system path.
I also tried to extract the scintillua*** lexers into Textadept's lexer 
folder but still. No pdf can be created.


I also searched Textadept's files for context entries but there is 
nothing i could change to make TA compile a file in MkIV.


Did anybody manage to get Context to work with TA and could provide some 
help? Thanks in advance.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Help with t-vim module and math

2016-04-13 Thread Nicola

On 2016-04-13 13:33:27 +, Wolfgang Schuster said:


Nicola 13. April 2016 um 15:28
On 2016-04-13 12:47:56 +, Wolfgang Schuster said:



Nicola 13. April 2016 um 14:17
On 2016-04-13 11:53:51 +, Hans Hagen said:




Thanks, that works. Unfortunately, DejaVu Sans Mono looks too heavy in 
my document:

is there a light variant?


Also, can't the fallback mechanism be used?
Yes it can but you have to enable your custom typeface with 
\setupbodyfont which

wasn’t done in your example.



You're right, but I have done it in my original document.
Even with that, the fallback symbol does not show up:


\usemodule[vim]
\definefontfamily[slidesfont][mono][Latin Modern Mono Light]
\definefallbackfamily[slidesfont][mono][DejaVu Sans Mono][range={"0222A}]
\definevimtyping[pascal][syntax=pascal]
\setupbodyfont[slidesfont]
\starttext
\startpascal
 X := Y ∪ Z;
\stoppascal
\stoptext

You have to move the fallback setting before the font where you want to 
apply the fallback, i.e.


    \definefallbackfamily […] […] […]
    \definefontfamily […] […] […]



Great, it works!

Thanks to ConTeXt and this mailing list, I've cut down the time to 
prepare a presentation dramatically, while improving its quality and 
avoiding frustration (compared to LaTeX Beamer+listings).


Nicola


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Help with t-vim module and math

2016-04-13 Thread Wolfgang Schuster

Nicola 
13. April 2016 um 15:28

On 2016-04-13 12:47:56 +, Wolfgang Schuster said:


Nicola 13. April 2016 um 14:17

On 2016-04-13 11:53:51 +, Hans Hagen said:



Thanks, that works. Unfortunately, DejaVu Sans Mono looks too heavy in 
my document:


is there a light variant?


Also, can't the fallback mechanism be used?

Yes it can but you have to enable your custom typeface with 
\setupbodyfont which


wasn’t done in your example.


You're right, but I have done it in my original document.

Even with that, the fallback symbol does not show up:


\usemodule[vim]

\definefontfamily[slidesfont][mono][Latin Modern Mono Light]

\definefallbackfamily[slidesfont][mono][DejaVu Sans Mono][range={"0222A}]

\definevimtyping[pascal][syntax=pascal]

\setupbodyfont[slidesfont]

\starttext

\startpascal

X := Y ∪ Z;

\stoppascal

\stoptext


You have to move the fallback setting before the font where you want to 
apply the fallback, i.e.


\definefallbackfamily […] […] […]
\definefontfamily […] […] […]

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Help with t-vim module and math

2016-04-13 Thread Nicola

On 2016-04-13 12:47:56 +, Wolfgang Schuster said:

Nicola 13. April 2016 um 14:17 
On 2016-04-13 11:53:51 +, Hans Hagen said: 



Thanks, that works. Unfortunately, DejaVu Sans Mono looks too heavy in 
my document: 
is there a light variant? 

Also, can't the fallback mechanism be used? 
Yes it can but you have to enable your custom typeface with 
\setupbodyfont which

wasn’t done in your example.


You're right, but I have done it in my original document.
Even with that, the fallback symbol does not show up:

\usemodule[vim]
\definefontfamily[slidesfont][mono][Latin Modern Mono Light]
\definefallbackfamily[slidesfont][mono][DejaVu Sans Mono][range={"0222A}]
\definevimtyping[pascal][syntax=pascal]
\setupbodyfont[slidesfont]
\starttext
\startpascal
X := Y ∪ Z;
\stoppascal
\stoptext

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Help with t-vim module and math

2016-04-13 Thread Wolfgang Schuster

Nicola 
13. April 2016 um 14:17
On 2016-04-13 11:53:51 +, Hans Hagen said:


Thanks, that works. Unfortunately, DejaVu Sans Mono looks too heavy in 
my document:

is there a light variant?

Also, can't the fallback mechanism be used?
Yes it can but you have to enable your custom typeface with 
\setupbodyfont which

wasn’t done in your example.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

  1   2   3   >