Re: [NTG-context] \setupheadertexts for chapters with different authors

2022-03-19 Thread jbf via ntg-context
Thanks for the bits and pieces to the puzzle. I'll do my best to make 
sense of them and solve the problem.


Julian

On 19/3/22 20:18, Henning Hraban Ramm via ntg-context wrote:

Hi Julian,

you’re right, the example didn’t do what you wanted, and it didn’t 
intend to.


Using \getmarking you can get a section title (or another “mark”), you 
can’t combine it with the variable commands, and you don’t need it for 
your case.


https://wiki.contextgarden.net/Command/getmarking isn’t really helpful 
since there’s no example with section titles, but it shows you can 
also get previous or next “marks”.


BTW, I can’t remember when you need \structurevariable vs. 
\namedstructurevariable...


Hraban


Am 19.03.22 um 03:16 schrieb jbf via ntg-context:
I might need a little more help just to understand how best to adapt 
this to my situation:


One thing is clear: I was attempting to use a 'list' variable, and I 
can see why that was an error, since it is headertexts, not TOC that 
I want to influence.


But let me simplify my situation:

You seem to suggest initially that I could use \structureuservariable 
(or \structurevariable) instead, especially since I already have a 
variable to call on, e.g \startchapter[title={My title}][author={A. 
uthor}]. But in the example you then gave, you made no use of either 
of these.


My current setting is:

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


which gives me the book title centred on verso pages, and the chapter 
title centred on recto pages. All I want to do is to have the chapter 
contributors' name for each chapter instead of the chapter title.


So why can't I create a setups along the lines of:

\startsetups[contributor] \getmarking[\structureuservariable{author}] 
\stopsetups


Then just swap 'chapter' in \setupheadertexts, with 'contributor'? I 
tried it but it doesn't work. I thought it would be logical. Clearly 
I'm wrong but don't appreciate why.


Julian

On 18/3/22 18:52, Henning Hraban Ramm via ntg-context wrote:

The *list* variables work only in lists.

There’s also \structurevariable and \structureuservariable.

Make sure you use setups for the header, otherwise the variable gets 
expanded only once at the beginning.


Like in:

\setuppagenumbering[alternative=doublesided]
\setupheadertexts[] % empty
\setupheadertexts[\setups{text right}][][][\setups{text left}]

\startsetups[text right]
\rlap{\pagenumber}
\hfill
\getmarking[chapter]
\hfill
\llap{Un Nom}
\stopsetups

\startsetups[text left]
\rlap{Una Person}
\hfill
\getmarking[section]
\hfill
\llap{\pagenumber}
\stopsetups 


___ 

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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/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] Metafun, difficulty with graphical element in the margin

2022-03-19 Thread Otared Kavian via ntg-context
Hi Willi,

How about invoking the command \setups{Thumb-pictures} between a \start \stop 
pair as in the following:

\showframe

\starttext

\startfrontmatter
\startchapter[title=Test A]
\samplefile{knuth}
\stopchapter

\stopfrontmatter

%\page[yes]

\start
\setups{Thumb-pictures}

\startbodymatter
 \startchapter[title=Test B]
\samplefile{ward}
 \stopchapter

\startchapter[title=Test C]
\samplefile{ward}
\stopchapter

\startchapter[title=Test D]
\samplefile{ward}
\stopchapter


\stopbodymatter
\stop

\startbackmatter
\dorecurse{5}{\startchapter[title=Test #1]
\samplefile{thuan}
\stopchapter}

\stopbackmatter

\stoptext


> On 19 Mar 2022, at 21:42, Willi Egger via ntg-context  
> wrote:
> 
> Hello Otared,
> 
> thanks so much for your testing and comments. — Tthe problem is, that this 
> thumb-picture should only be placed in the \startboydmatter..\stopbodymatter 
> sections. In the case of this book however there are the title pages and 
> quite some text including the TOC in the \startfrontmatter..\stopfrontmatter. 
> SO I end up with being forced to invoke the setups at the beginning of the 
> bodymatter.
> 
> Thanks!
> Kind regards
> 
> Willi
> 
>> On 19 Mar 2022, at 16:52, Otared Kavian via ntg-context  
>> wrote:
>> 
>> Hi Willi,
>> 
>> Your test file works fine if I place 
>>  \setups{Thumb-pictures}
>> before \starttext (using version 2022.03.12 17:56 LMTX).
>> However in the file you sent the choice of the command
>>  \setups{Thumb-pictures}
>> is between chapter A and B, which seems starnge to me...
>> 
>> Best regards: Otared K.
>> 
>>> On 18 Mar 2022, at 20:29, Willi Egger via ntg-context  
>>> wrote:
>>> 
>>> Good evening!
>>> 
>>> I have a dictionary where I would like to include thumb-pictures in the 
>>> margin. — When I use the attached code with a single 
>>> \startchapter...\stopchapter, it works. However if I add another 
>>> \startchapter…\stopchapter before loading the setups for the thumb-picture 
>>> metafun throws an error about not having complete information for 
>>> performing a transformation.
>>> 
>>> I am currently using the before last version of LMTX-ConTeXT (January 21st 
>>> 2022).
>>> 
>>> Could someone try to compile?
>>> 
>>> Thanks, kind regards
>>> 
>>> Willi___
>>> If your question is of interest to others as well, please add an entry to 
>>> the Wiki!
>>> 
>>> maillist : ntg-context@ntg.nl / 
>>> http://www.ntg.nl/mailman/listinfo/ntg-context
>>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>>> wiki : http://contextgarden.net
>>> ___
>> 
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/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
___


[NTG-context] Metafun, difficulty with graphical element in the margin, again.

2022-03-19 Thread Willi Egger via ntg-context
Hello,

I am a little desperate… I have installed in a new directory the latest version 
of ConTeXt.

I run the sample file I provided before. After enabling a second 
chapter-section before the \setups{Thumb-picture} the metafun error reoccurs. — 
Looking at the log I do net get really wiser, lacking the background of the 
implementation… 

So here follows the section of the log with the error:

metafun > log >
metafun > log > error: Transform components aren't all known
metafun > log >
metapost> trace >  (0,0,mfun_page_hsize[-4],0,0,1)
metapost> trace >  yscaled
metapost> trace >  mfun_page_field [ (EXPR 0) ] [ (-40) ] := 
unitsquare xscaled mfun_page_hsize [ (EXPR 0) ] yscaled mfun_page_vsize [ (-40) 
] shifted ( mfun_page_hstep [ (EXPR 0) ] , mfun_page_vstep [ (-40) ] ) ; 
mfun_page_field [ (-40) ] [ (EXPR 0) ] := mfun_page_field [ (EXPR 0) ] [ (-40) 
] ;  ENDFOR
metapost> trace >  for HorPos = LeftEdge step 1 until 
RightEdge : mfun_page_field [ HorPos ] [ (EXPR 0) ] := unitsquare xscaled 
mfun_page_hsize [ HorPos ] yscaled mfun_page_vsize [ (EXPR 0) ] shifted ( 
mfun_page_hstep [ HorPos ] , mfun_page_vstep [ (EXPR 0) ] ) ; mfun_page_field [ 
(EXPR 0) ] [ HorPos ] := mfun_page_field [ HorPos ] [ (EXPR 0) ] ; endfor ;  
ENDFOR
metapost> trace >  mfun_check_page_field -> -> 
mfun_check_page_dimensions;for.VerPos=Top.step10until.Bottom:for.HorPos=LeftEdge.step1until.RightEdge:mfun_page_field[HorPos][VerPos]:=unitsquare.xscaled.mfun_page_hsize[HorPos]yscaled.mfun_page_vsize[VerPos]shifted(mfun_page_hstep[HorPos],mfun_page_vstep[VerPos]);mfun_page_field[VerPos][HorPos]:=mfun_page_field[HorPos][VerPos];endfor;endfor;
metapost> trace >  mfun_check_page_field ;
metapost> trace >  hide -> (TEXT0)-> 
exitif.numeric.begingroup(TEXT0);endgroup;
metapost> trace >  Field -> -> 
hide(mfun_check_page_field;)mfun_page_field
metafun > log >
metafun > log > I'm unable to apply a partially specified 
transformation except to a fully known
pair or transform. Proceed, and I'll omit the transformation.
metafun > log > 


How to interprete, wha tto try next?

Kind regards

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

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


Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-19 Thread Willi Egger via ntg-context
Hello Otared,

thanks so much for your testing and comments. — Tthe problem is, that this 
thumb-picture should only be placed in the \startboydmatter..\stopbodymatter 
sections. In the case of this book however there are the title pages and quite 
some text including the TOC in the \startfrontmatter..\stopfrontmatter. SO I 
end up with being forced to invoke the setups at the beginning of the 
bodymatter.

Thanks!
Kind regards

Willi

> On 19 Mar 2022, at 16:52, Otared Kavian via ntg-context  
> wrote:
> 
> Hi Willi,
> 
> Your test file works fine if I place 
>   \setups{Thumb-pictures}
> before \starttext (using version 2022.03.12 17:56 LMTX).
> However in the file you sent the choice of the command
>   \setups{Thumb-pictures}
> is between chapter A and B, which seems starnge to me...
> 
> Best regards: Otared K.
> 
>> On 18 Mar 2022, at 20:29, Willi Egger via ntg-context  
>> wrote:
>> 
>> Good evening!
>> 
>> I have a dictionary where I would like to include thumb-pictures in the 
>> margin. — When I use the attached code with a single 
>> \startchapter...\stopchapter, it works. However if I add another 
>> \startchapter…\stopchapter before loading the setups for the thumb-picture 
>> metafun throws an error about not having complete information for performing 
>> a transformation.
>> 
>> I am currently using the before last version of LMTX-ConTeXT (January 21st 
>> 2022).
>> 
>> Could someone try to compile?
>> 
>> Thanks, kind regards
>> 
>> Willi___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> ___
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] Metafun, difficulty with graphical element in the margin

2022-03-19 Thread Otared Kavian via ntg-context
Hi Willi,

Your test file works fine if I place 
\setups{Thumb-pictures}
before \starttext (using version 2022.03.12 17:56 LMTX).
However in the file you sent the choice of the command
\setups{Thumb-pictures}
is between chapter A and B, which seems starnge to me...

Best regards: Otared K.

> On 18 Mar 2022, at 20:29, Willi Egger via ntg-context  
> wrote:
> 
> Good evening!
> 
> I have a dictionary where I would like to include thumb-pictures in the 
> margin. — When I use the attached code with a single 
> \startchapter...\stopchapter, it works. However if I add another 
> \startchapter…\stopchapter before loading the setups for the thumb-picture 
> metafun throws an error about not having complete information for performing 
> a transformation.
> 
> I am currently using the before last version of LMTX-ConTeXT (January 21st 
> 2022).
> 
> Could someone try to compile?
> 
> Thanks, kind regards
> 
> Willi___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] \setupheadertexts for chapters with different authors

2022-03-19 Thread Hans Hagen via ntg-context

On 3/19/2022 10:18 AM, Henning Hraban Ramm via ntg-context wrote:

BTW, I can’t remember when you need \structurevariable vs. 
\namedstructurevariable...
the first is the current, the second a specific one ... so current can 
be subsubsubsubsubsection but with named you can still get the current 
chapter


BTW, best write it down (your book) some place as it can come in handy ...

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] \setupheadertexts for chapters with different authors

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

Hi Julian,

you’re right, the example didn’t do what you wanted, and it didn’t 
intend to.


Using \getmarking you can get a section title (or another “mark”), you 
can’t combine it with the variable commands, and you don’t need it for 
your case.


https://wiki.contextgarden.net/Command/getmarking isn’t really helpful 
since there’s no example with section titles, but it shows you can also 
get previous or next “marks”.


BTW, I can’t remember when you need \structurevariable vs. 
\namedstructurevariable...


Hraban


Am 19.03.22 um 03:16 schrieb jbf via ntg-context:
I might need a little more help just to understand how best to adapt 
this to my situation:


One thing is clear: I was attempting to use a 'list' variable, and I can 
see why that was an error, since it is headertexts, not TOC that I want 
to influence.


But let me simplify my situation:

You seem to suggest initially that I could use \structureuservariable 
(or \structurevariable) instead, especially since I already have a 
variable to call on, e.g \startchapter[title={My title}][author={A. 
uthor}]. But in the example you then gave, you made no use of either of 
these.


My current setting is:

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


which gives me the book title centred on verso pages, and the chapter 
title centred on recto pages. All I want to do is to have the chapter 
contributors' name for each chapter instead of the chapter title.


So why can't I create a setups along the lines of:

\startsetups[contributor] \getmarking[\structureuservariable{author}] 
\stopsetups


Then just swap 'chapter' in \setupheadertexts, with 'contributor'? I 
tried it but it doesn't work. I thought it would be logical. Clearly I'm 
wrong but don't appreciate why.


Julian

On 18/3/22 18:52, Henning Hraban Ramm via ntg-context wrote:

The *list* variables work only in lists.

There’s also \structurevariable and \structureuservariable.

Make sure you use setups for the header, otherwise the variable gets 
expanded only once at the beginning.


Like in:

\setuppagenumbering[alternative=doublesided]
\setupheadertexts[] % empty
\setupheadertexts[\setups{text right}][][][\setups{text left}]

\startsetups[text right]
\rlap{\pagenumber}
\hfill
\getmarking[chapter]
\hfill
\llap{Un Nom}
\stopsetups

\startsetups[text left]
\rlap{Una Person}
\hfill
\getmarking[section]
\hfill
\llap{\pagenumber}
\stopsetups 


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] Metafun, difficulty with graphical element in the margin

2022-03-19 Thread Hans Hagen via ntg-context

On 3/18/2022 8:29 PM, Willi Egger via ntg-context wrote:

Good evening!

I have a dictionary where I would like to include thumb-pictures in the margin. 
— When I use the attached code with a single \startchapter...\stopchapter, it 
works. However if I add another \startchapter…\stopchapter before loading the 
setups for the thumb-picture metafun throws an error about not having complete 
information for performing a transformation.

I am currently using the before last version of LMTX-ConTeXT (January 21st 
2022).

Could someone try to compile?

works here (with the latest)

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
___