Re: [NTG-context] sorting for particular sub entries to register

2022-01-31 Thread Robert via ntg-context
Hi Julian,

Another solution could be to use Lua.

I have a multilingual document in which some elements to be printed bold 
(Language 1), and collected in an index (trk) arranged according their (verbal) 
stems. Elements from Language 2 are to be printed in italics in the text and 
collected in a separate index.

In the present example the morphemes from Language 2 are separated by ::, the 
verbal stem ends in -.

In \\textbf the input is reproduced as is. Then interesting things happen in 
the index (trk).

The first element (until the first ::) is taken as an main entry in the index 
(hence !). Then the complete input is retained as the secondary entry. Note 
that in the index - separates the morphemes.

I use LuaLatex, but I am quite sure this is also possible in Context.

It is quite complex, but it works.

Robert


\newcommand{\TWI}[1]{\directlua{twi_help(\luastring{#1})}}

\begin{luacode}
function twi_help ( s )
   s = unicode.utf8.gsub (s, '^([^:]+)::([^:]+)::([^:]+)::([^:]+)::([^:]+)$' , 
'\\textbf{%1::%2::%3%::%4::%5}\\sindex%[trk%]{%#%1!%1%-%2%-%3%-%4-%5}’ )

  s = unicode.utf8.gsub … other action

\end{luacode}

\begin{document}

text text text text \TWI{dī-::dū::kin::dah} text text text text text 

\end{document}



> Op 1 feb. 2022, om 01:41 heeft jbf via ntg-context  het 
> volgende geschreven:
> 
> Yes, Adam, that works. Though it can be a laborious solution, since it means 
> creating keys for everything in a sub entry list (and I have many instances, 
> 40 or more in some cases). However, I did not ask for a 'simple' solution, 
> just a solution! Thank you.
> 
> Julian
> 
> On 1/2/22 11:09, Adam Reviczky wrote:
>> Hi Julian,
>> 
>> How about using the keys in every instance?
>> 
>> \setupregister[index][n=1,method={zc,pc,zm,pm,uc},style=WORD]
>> \defineprocessor[special][style=italic]
>> 
>> \starttext
>> P\index[Plenary+periti]{Plenary Council+{\it periti} (experts)}
>> B\index[Plenary+beriti]{Plenary Council+{\it beriti} (experts)}
>> A\index[Plenary+aeriti]{Plenary Council+aeriti (experts)}
>> 
>> S\index[animals+special]{animals+‘special kinds’}
>> B\index[animals+bpecial]{animals+bpecial}
>> A\index[animals+apecial]{animals+‘apecial’}
>> U\index[animals+upecial]{animals+‘upecial’}
>> T\index[animals+tpecial]{animals+tpecial}
>> 
>> \placeindex
>> \stoptext
>> 
>> See result in: https://live.contextgarden.net/cgi-bin/result.cgi?id=j46XhZ 
>> 
>> 
>> Adam
>> 
>> On Mon, Jan 31, 2022 at 10:38 PM jbf via ntg-context > > wrote:
>> Let me come back to the unresolved (for me) question of two situations in 
>> sub entries to a book index (register). Sub entries that have formatting or 
>> sub entries that are surrounded by quote marks (straight or curly, it makes 
>> no difference) do not appear in the correct alphabetical order.
>> 
>> Two attempts on my part:
>> 
>> text before \index[Plenary+periti]{Plenary Council+{\it periti} (experts)} 
>> text after.
>> 
>> text before \index{animals+‘special kinds’} text after. Or alternatively, 
>> \index[animals+special]{animals+‘special kinds’}
>> 
>> The setup for my register is a pretty standard one. The processor is not for 
>> the 'periti' case above but I use it for book titles.
>> 
>> \setupregister[index][n=1,method={zc,pc,zm,pm,uc},style=WORD]
>> \defineprocessor[special][style=italic]
>> In the periti case it is the \it command that clearly interferes with 
>> correct alphabetic positioning in the sub entry list. Placing +periti in the 
>> key does not overcome that problem.
>> 
>> In the ‘special kinds’ case it is the initial single quote mark (‘) that 
>> causes the problem. The item comes last in the sub entry list. And if i 
>> include a key [special], then it comes first in the sub entry list. Either 
>> way, it is out of the desired sorting order.
>> 
>> I believe I have followed the helpful suggestions of various ones, but it is 
>> always possible that I have not fully understood those suggestions. The 
>> reality is that at the moment the issue remains unresolved for me. Any 
>> further wisdom out there to offer me?
>> 
>> 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] sorting for particular sub entries to register

2022-01-31 Thread jbf via ntg-context
Yes, Adam, that works. Though it can be a laborious solution, since it 
means creating keys for everything in a sub entry list (and I have many 
instances, 40 or more in some cases). However, I did not ask for a 
'simple' solution, just a solution! Thank you.


Julian

On 1/2/22 11:09, Adam Reviczky wrote:

Hi Julian,

How about using the keys in every instance?

\setupregister[index][n=1,method={zc,pc,zm,pm,uc},style=WORD]
\defineprocessor[special][style=italic]

\starttext
P\index[Plenary+periti]{Plenary Council+{\it periti} (experts)}
B\index[Plenary+beriti]{Plenary Council+{\it beriti} (experts)}
A\index[Plenary+aeriti]{Plenary Council+aeriti (experts)}

S\index[animals+special]{animals+‘special kinds’}
B\index[animals+bpecial]{animals+bpecial}
A\index[animals+apecial]{animals+‘apecial’}
U\index[animals+upecial]{animals+‘upecial’}
T\index[animals+tpecial]{animals+tpecial}

\placeindex
\stoptext

See result in: https://live.contextgarden.net/cgi-bin/result.cgi?id=j46XhZ

Adam

On Mon, Jan 31, 2022 at 10:38 PM jbf via ntg-context 
 wrote:


Let me come back to the unresolved (for me) question of two
situations in sub entries to a book index (register). Sub entries
that have formatting or sub entries that are surrounded by quote
marks (straight or curly, it makes no difference) do not appear in
the correct alphabetical order.

Two attempts on my part:

text before \index[Plenary+periti]{Plenary Council+{\it periti}
(experts)} text after.

text before \index{animals+‘special kinds’} text after. Or
alternatively, \index[animals+special]{animals+‘special kinds’}

The setup for my register is a pretty standard one. The processor
is not for the 'periti' case above but I use it for book titles.

\setupregister[index][n=1,method={zc,pc,zm,pm,uc},style=WORD]

\defineprocessor[special][style=italic]

In the periti case it is the \it command that clearly interferes
with correct alphabetic positioning in the sub entry list. Placing
+periti in the key does not overcome that problem.

In the ‘special kinds’ case it is the initial single quote mark
(‘) that causes the problem. The item comes last in the sub entry
list. And if i include a key [special], then it comes first in the
sub entry list. Either way, it is out of the desired sorting order.

I believe I have followed the helpful suggestions of various ones,
but it is always possible that I have not fully understood those
suggestions. The reality is that at the moment the issue remains
unresolved for me. Any further wisdom out there to offer me?

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
___


Re: [NTG-context] sorting for particular sub entries to register

2022-01-31 Thread Adam Reviczky via ntg-context
Hi Julian,

How about using the keys in every instance?

\setupregister[index][n=1,method={zc,pc,zm,pm,uc},style=WORD]
\defineprocessor[special][style=italic]

\starttext
P\index[Plenary+periti]{Plenary Council+{\it periti} (experts)}
B\index[Plenary+beriti]{Plenary Council+{\it beriti} (experts)}
A\index[Plenary+aeriti]{Plenary Council+aeriti (experts)}

S\index[animals+special]{animals+‘special kinds’}
B\index[animals+bpecial]{animals+bpecial}
A\index[animals+apecial]{animals+‘apecial’}
U\index[animals+upecial]{animals+‘upecial’}
T\index[animals+tpecial]{animals+tpecial}

\placeindex
\stoptext

See result in: https://live.contextgarden.net/cgi-bin/result.cgi?id=j46XhZ

Adam

On Mon, Jan 31, 2022 at 10:38 PM jbf via ntg-context 
wrote:

> Let me come back to the unresolved (for me) question of two situations in
> sub entries to a book index (register). Sub entries that have formatting or
> sub entries that are surrounded by quote marks (straight or curly, it makes
> no difference) do not appear in the correct alphabetical order.
>
> Two attempts on my part:
>
> text before \index[Plenary+periti]{Plenary Council+{\it periti} (experts)}
> text after.
>
> text before \index{animals+‘special kinds’} text after. Or alternatively,
> \index[animals+special]{animals+‘special kinds’}
>
> The setup for my register is a pretty standard one. The processor is not
> for the 'periti' case above but I use it for book titles.
>
> \setupregister[index][n=1,method={zc,pc,zm,pm,uc},style=WORD]
>
> \defineprocessor[special][style=italic]
>
> In the periti case it is the \it command that clearly interferes with
> correct alphabetic positioning in the sub entry list. Placing +periti in
> the key does not overcome that problem.
>
> In the ‘special kinds’ case it is the initial single quote mark (‘) that
> causes the problem. The item comes last in the sub entry list. And if i
> include a key [special], then it comes first in the sub entry list. Either
> way, it is out of the desired sorting order.
>
> I believe I have followed the helpful suggestions of various ones, but it
> is always possible that I have not fully understood those suggestions. The
> reality is that at the moment the issue remains unresolved for me. Any
> further wisdom out there to offer me?
>
> 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] sorting for particular sub entries to register

2022-01-31 Thread jbf via ntg-context
Let me come back to the unresolved (for me) question of two situations 
in sub entries to a book index (register). Sub entries that have 
formatting or sub entries that are surrounded by quote marks (straight 
or curly, it makes no difference) do not appear in the correct 
alphabetical order.


Two attempts on my part:

text before \index[Plenary+periti]{Plenary Council+{\it periti} 
(experts)} text after.


text before \index{animals+‘special kinds’} text after. Or 
alternatively, \index[animals+special]{animals+‘special kinds’}


The setup for my register is a pretty standard one. The processor is not 
for the 'periti' case above but I use it for book titles.


\setupregister[index][n=1,method={zc,pc,zm,pm,uc},style=WORD]

\defineprocessor[special][style=italic]

In the periti case it is the \it command that clearly interferes with 
correct alphabetic positioning in the sub entry list. Placing +periti in 
the key does not overcome that problem.


In the ‘special kinds’ case it is the initial single quote mark (‘) that 
causes the problem. The item comes last in the sub entry list. And if i 
include a key [special], then it comes first in the sub entry list. 
Either way, it is out of the desired sorting order.


I believe I have followed the helpful suggestions of various ones, but 
it is always possible that I have not fully understood those 
suggestions. The reality is that at the moment the issue remains 
unresolved for me. Any further wisdom out there to offer me?


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] paragraph notes located in text

2022-01-31 Thread Wolfgang Schuster via ntg-context

Pablo Rodriguez via ntg-context schrieb am 31.01.2022 um 19:49:

Dear list,

with current latest (2022.01.21 20:13), I cannot get paragraph footnotes
when located in text.

Here you have the mandatory sample:

   \setuppapersize[A6]
   \showframe\showgrid
   %~ \setupnote[footnote][paragraph=yes]
   \setupnote[footnote][location=text, paragraph=yes]
   \setupnotation[footnote][alternative=serried, width=broad]
   \starttext
   \startlinenumbering[step=3]
   \dorecurse{25}
{a\footnote{b} }
   \stoplinenumbering
\placenotes[footnote]
   \stoptext

I already asked this twice
(https://mailman.ntg.nl/pipermail/ntg-context/2022/104770.html,
https://mailman.ntg.nl/pipermail/ntg-context/2022/104929.html).

Could anyone confirm that the is no way to get paragraph notes when
location is text, or tell me what I’m missing?


You forgot

    \setupnotation[footnote][display=no]

otherwise each footnote entry starts at a new line.

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] doublesided margin page number

2022-01-31 Thread Wolfgang Schuster via ntg-context

Youssef Cherem via ntg-context schrieb am 24.01.2022 um 02:28:
I've managed to put double-sided page numbers -- but numbers are 
restarting after two, though. What's going on?


Add

    \setupbackgrounds[state=repeat]

to your setups to ensure the text background is refreshed.

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] \asciimode and MetaPost in LMTX result in “Isolated expression”

2022-01-31 Thread Marco Patzer via ntg-context
Hi!

LMTX seems to have an issue with \asciimode and MetaPost:

\asciimode
\starttext
  \startMPcode
fill unitsquare scaled 2cm;
  \stopMPcode
\stoptext

Results in:

metafun > log > error: Isolated expression
metafun > log >
metapost> trace >  E.dash.patterns
metapost> trace >  vardef
metafun > log >
metafun > log > I couldn't find an '=' or ':=' after the expression 
that is shown above this
error message, so I guess I'll just ignore it and carry on.
metafun > log >
metapost> trace >  vardef dashpattern(text t) =

Marco

ConTeXt  ver: 2022.01.21 20:13 LMTX  fmt: 2022.1.21
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] doublesided margin page number

2022-01-31 Thread Pablo Rodriguez via ntg-context
On 1/31/22 7:19 PM, Pablo Rodriguez via ntg-context wrote:
> On 1/24/22 2:28 AM, Youssef Cherem via ntg-context wrote:
>> I've managed to put double-sided page numbers -- but numbers are
>> restarting after two, though. What's going on?
>
> Hi Yousesef,
 ^

Sorry for the typo when writing your name, Youssef.

Pablo

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] paragraph notes located in text

2022-01-31 Thread Pablo Rodriguez via ntg-context
Dear list,

with current latest (2022.01.21 20:13), I cannot get paragraph footnotes
when located in text.

Here you have the mandatory sample:

  \setuppapersize[A6]
  \showframe\showgrid
  %~ \setupnote[footnote][paragraph=yes]
  \setupnote[footnote][location=text, paragraph=yes]
  \setupnotation[footnote][alternative=serried, width=broad]
  \starttext
  \startlinenumbering[step=3]
  \dorecurse{25}
   {a\footnote{b} }
  \stoplinenumbering
   \placenotes[footnote]
  \stoptext

I already asked this twice
(https://mailman.ntg.nl/pipermail/ntg-context/2022/104770.html,
https://mailman.ntg.nl/pipermail/ntg-context/2022/104929.html).

Could anyone confirm that the is no way to get paragraph notes when
location is text, or tell me what I’m missing?

Many thanks for your help,

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] doublesided margin page number

2022-01-31 Thread Pablo Rodriguez via ntg-context
On 1/24/22 2:28 AM, Youssef Cherem via ntg-context wrote:
> I've managed to put double-sided page numbers -- but numbers are
> restarting after two, though. What's going on?

Hi Yousesef,

I think this is related to how \setupbackgrounds is invoked.

The following command works:

  \setupbackgrounds[page] [setups=setpagenumber, background=pgnumber]

Of course, you have to place the layer properly.

Just in case it might help,

Pablo

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

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