Re: [NTG-context] register for biblical citations

2021-04-16 Thread jbf
You will be happy to know that this works perfectly, and naturally I 
extended the pattern to cover another 30 books or so. I don't 
necessarily understand the Lua code, but I did take the trouble to look 
through sort-ini.lua to get some kind of idea of what was happening and 
basically to understand where you were getting things like: sorters and 
interfaces.variables.before from. At least I could see that much!


Thank you Hans,

Julian

On 16/4/21 11:08 pm, Hans Hagen wrote:


sorters.definitions["biblical"] = {
    method  = interfaces.variables.before,
    replacements = {
    { "Gen",  utf.char(0xFF01) },
    { "Ex",   utf.char(0xFF02) },
    { "Lev",  utf.char(0xFF03) },
    { "Deut", utf.char(0xFF04) },
    { "Lam",  utf.char(0xFF05) },
    { "Dan",  utf.char(0xFF06) },
    { "Joel", utf.char(0xFF07) },
    { "Ps",   utf.char(0xFF08) },
    { "Prov", utf.char(0xFF09) },
    { "Sir",  utf.char(0xFF0A) },
    { "Mt",   utf.char(0xFF0B) },
    { "Mk",   utf.char(0xFF0C) },
    },
} 

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] register for biblical citations

2021-04-16 Thread jbf

Okay, that's all clear enough. Thank you. I'll keep working at it.

Julian

On 16/4/21 11:08 pm, Hans Hagen wrote:

On 4/16/2021 12:22 PM, jbf wrote:
There was no mention of the indicator anywhere in what I copied from 
your example. I did try indicator=no just now in case it should be 
made explicit:
You use a couple of chartacters that will be filtered (crlf and so). 
Try weird ones, like:


sorters.definitions["biblical"] = {
    method  = interfaces.variables.before,
    replacements = {
    { "Gen",  "\\x01\\x01" },
    { "Ex",   "\\x01\\x02" },
    { "Lev",  "\\x01\\x03" },
    { "Deut", "\\x01\\x04" },
    { "Lam",  "\\x01\\x05" },
    { "Dan",  "\\x01\\x06" },
    { "Joel", "\\x02\\x01" },
    { "Ps",   "\\x02\\x02" },
    { "Prov", "\\x02\\x03" },
    { "Sir",  "\\x02\\x04" },
    { "Mt",   "\\x02\\x05" },
    { "Mk",   "\\x02\\x06" },
    },
}

or better, take a harmless unicode sequence

sorters.definitions["biblical"] = {
    method  = interfaces.variables.before,
    replacements = {
    { "Gen",  utf.char(0xFF01) },
    { "Ex",   utf.char(0xFF02) },
    { "Lev",  utf.char(0xFF03) },
    { "Deut", utf.char(0xFF04) },
    { "Lam",  utf.char(0xFF05) },
    { "Dan",  utf.char(0xFF06) },
    { "Joel", utf.char(0xFF07) },
    { "Ps",   utf.char(0xFF08) },
    { "Prov", utf.char(0xFF09) },
    { "Sir",  utf.char(0xFF0A) },
    { "Mt",   utf.char(0xFF0B) },
    { "Mk",   utf.char(0xFF0C) },
    },
}

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] register for biblical citations

2021-04-16 Thread jbf
I did, actually. But maybe I can play with that a bit further. My first 
attempt at doing that was unsuccessful (when I got to 'z' I thought I 
might be able to then go 'za' etc). I'll keep playing, but Hans' luacode 
approach might ultimately be the solution for me. He's given me the 
principles; it's up to me to get them right!


Julian

On 16/4/21 8:54 pm, Henning Hraban Ramm wrote:

Am 16.04.2021 um 11:47 schrieb jbf :

So, not sure where to go from here. Could I perhaps return to my earlier 
question, which indicated that by using the keyword approach [a] [b] and so on, 
as far as [z] I was at least getting a passable result, but how could I 
continue past [z]? Could I have used [1], [2] etc which would allows me to get 
as far as 66 (if I were to need every biblical book)?

Did you try to use more than one letter as keyword?

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
___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] register for biblical citations

2021-04-16 Thread jbf
You are correct on both counts; it is not quite random (just not what I 
was looking for ) and yes, the abbreviated book title needs to be in 
the mix as well, just in case it also ends up throwing things out. But, 
as you can see subsequently, each contribution is making things clearer 
(for me, not so accustomed to working with Lua code) and I have every 
confidence we will work this one out. For almost anyone using ConTeXt 
for preparing a book that includes such an index, and I believe it is 
normal for biblical citations to be listed according to biblical book 
order, at least, this is the author's request in my case, the ultimate 
solution will benefit such people in the future.


Julian

On 16/4/21 8:57 pm, r.erm...@hccnet.nl wrote:

It seems that the items are actually not randomly listed.

It appears to me that the list is sorted on the chapter number, and then the 
verse number. The abbreviated book title is not involved in this sorting order, 
which it should be.

Robert



Op 16 apr. 2021, om 12:22 heeft jbf  het volgende 
geschreven:

There was no mention of the indicator anywhere in what I copied from your 
example. I did try indicator=no just now in case it should be made explicit:

(\setupregister[bibcit][language=biblical,before=,indicator=no]

but that makes no difference either. Same result. Seemingly random index.

Julian

On 16/4/21 8:06 pm, Hans Hagen wrote:

On 4/16/2021 11:47 AM, jbf wrote:

Hans, thanks for your ingenious solution but there is still a way to go I 
suspect!

I implemented (copy-paste) precisely the solution offered and I get an index 
but with some strange results ! Notice that in my previous own solution (but 
only as far as 26 books!) I at least got an index in the order of the biblical 
books, but using the luacode you offered, I get a seemingly random result (see 
below).

I extended your example by a few books. so:

\startluacode
sorters.definitions["biblical"] = {
  method  = interfaces.variables.before,
  replacements = {
  { "Gen",  string.char(1) },
  { "Ex",   string.char(2) },
  { "Lev",  string.char(3) },
  { "Deut", string.char(4) },
  { "Lam",  string.char(5) },
  { "Dan",  string.char(6) },
  { "Joel",  string.char(7) },
  { "Ps",  string.char(8) },
  { "Prov",  string.char(9) },
  { "Sir",  string.char(10) },
  { "Mt",  string.char(11) },
  { "Mk",  string.char(12) },

  },
}
\stopluacode

But the result I get (just showing you a dozen or so, and you will see that Gen 
doesn't even turn up in this list ... it does, but much later!):

Mk 2:19-20 with parallels (PES) 146
Mt 3:8-10 (PES) 135
Prov 3:11-12 (PES) 139, 172
Sir 4:17-18 (PES) 139
Mt 5:5 (PES) 146
Mt 5:6 (MAC) 123
Mt 5:16 (MAC) 121
Mt 6:1-6, 16-18 (MAC) 121
Mt 6:1-6, 16-18 (PES) 145
Mt 7:13-14 (PES) 146
Sir 10:9 (PES) 142
Mt 11:12 (PRO) 160
Mt 12:34 (MAC) 124, 137
Mt 12:36 (PES) 134
Mk 12:41-44 (MAC) 122
Sir 17:27 (PES) 142

I have no idea why this is happening. I changed nothing of what you gave me and 
removed anything I had previously. If you need an example of how \bibcit is 
being used in the text, just in case it helps (but I doubt it), here is one:

The widow’s mite pleased God because of her good intention, rather than the 
heap of money that the pharisees, urged on by self-love, threw into the 
treasury box (cf.  \bibcit{Mk 12:41-44 (MAC)}Mk 12:41-44).

So, not sure where to go from here. Could I perhaps return to my earlier 
question, which indicated that by using the keyword approach [a] [b] and so on, 
as far as [z] I was at least getting a passable result, but how could I 
continue past [z]? Could I have used [1], [2] etc which would allows me to get 
as far as 66 (if I were to need every biblical book)?

don't set the indicator


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

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

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

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : 

Re: [NTG-context] register for biblical citations

2021-04-16 Thread Hans Hagen

On 4/16/2021 12:22 PM, jbf wrote:
There was no mention of the indicator anywhere in what I copied from 
your example. I did try indicator=no just now in case it should be made 
explicit:
You use a couple of chartacters that will be filtered (crlf and so). Try 
weird ones, like:


sorters.definitions["biblical"] = {
method  = interfaces.variables.before,
replacements = {
{ "Gen",  "\\x01\\x01" },
{ "Ex",   "\\x01\\x02" },
{ "Lev",  "\\x01\\x03" },
{ "Deut", "\\x01\\x04" },
{ "Lam",  "\\x01\\x05" },
{ "Dan",  "\\x01\\x06" },
{ "Joel", "\\x02\\x01" },
{ "Ps",   "\\x02\\x02" },
{ "Prov", "\\x02\\x03" },
{ "Sir",  "\\x02\\x04" },
{ "Mt",   "\\x02\\x05" },
{ "Mk",   "\\x02\\x06" },
},
}

or better, take a harmless unicode sequence

sorters.definitions["biblical"] = {
method  = interfaces.variables.before,
replacements = {
{ "Gen",  utf.char(0xFF01) },
{ "Ex",   utf.char(0xFF02) },
{ "Lev",  utf.char(0xFF03) },
{ "Deut", utf.char(0xFF04) },
{ "Lam",  utf.char(0xFF05) },
{ "Dan",  utf.char(0xFF06) },
{ "Joel", utf.char(0xFF07) },
{ "Ps",   utf.char(0xFF08) },
{ "Prov", utf.char(0xFF09) },
{ "Sir",  utf.char(0xFF0A) },
{ "Mt",   utf.char(0xFF0B) },
{ "Mk",   utf.char(0xFF0C) },
},
}

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] autopdf on MacOS?

2021-04-16 Thread Hans Åberg

> On 16 Apr 2021, at 10:36, Thomas A. Schmitz  
> wrote:
> 
> On 4/16/21 10:26 AM, Hans Åberg wrote:
>>> That it doesn’t update in the background is more a feature than a bug, 
>>> otherwise it would complain about broken/unavailable files during the TeX 
>>> runs.
>> It is likely a bug: It has worked in some past versions.
> It still works for me (I'm on the latest version of macos). The trick is to 
> not change the focus to the pdf document in preview until the TeX run has 
> finished; otherwise you get a dialogue box complaining about a broken pdf 
> document.

That is the activation, which also can be done by the 'open' command:
context … && open 
If 'context' succeeds, the PDF document will be opened, otherwise not. If one 
wants to use another PDF reader, one can use
open -a  


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] register for biblical citations

2021-04-16 Thread r . ermers
It seems that the items are actually not randomly listed. 

It appears to me that the list is sorted on the chapter number, and then the 
verse number. The abbreviated book title is not involved in this sorting order, 
which it should be.

Robert


> Op 16 apr. 2021, om 12:22 heeft jbf  het volgende 
> geschreven:
> 
> There was no mention of the indicator anywhere in what I copied from your 
> example. I did try indicator=no just now in case it should be made explicit:
> 
> (\setupregister[bibcit][language=biblical,before=,indicator=no]
> 
> but that makes no difference either. Same result. Seemingly random index.
> 
> Julian
> 
> On 16/4/21 8:06 pm, Hans Hagen wrote:
>> On 4/16/2021 11:47 AM, jbf wrote:
>>> Hans, thanks for your ingenious solution but there is still a way to go I 
>>> suspect!
>>> 
>>> I implemented (copy-paste) precisely the solution offered and I get an 
>>> index but with some strange results ! Notice that in my previous own 
>>> solution (but only as far as 26 books!) I at least got an index in the 
>>> order of the biblical books, but using the luacode you offered, I get a 
>>> seemingly random result (see below).
>>> 
>>> I extended your example by a few books. so:
>>> 
>>> \startluacode
>>> sorters.definitions["biblical"] = {
>>>  method  = interfaces.variables.before,
>>>  replacements = {
>>>  { "Gen",  string.char(1) },
>>>  { "Ex",   string.char(2) },
>>>  { "Lev",  string.char(3) },
>>>  { "Deut", string.char(4) },
>>>  { "Lam",  string.char(5) },
>>>  { "Dan",  string.char(6) },
>>>  { "Joel",  string.char(7) },
>>>  { "Ps",  string.char(8) },
>>>  { "Prov",  string.char(9) },
>>>  { "Sir",  string.char(10) },
>>>  { "Mt",  string.char(11) },
>>>  { "Mk",  string.char(12) },
>>> 
>>>  },
>>> }
>>> \stopluacode
>>> 
>>> But the result I get (just showing you a dozen or so, and you will see that 
>>> Gen doesn't even turn up in this list ... it does, but much later!):
>>> 
>>> Mk 2:19-20 with parallels (PES) 146
>>> Mt 3:8-10 (PES) 135
>>> Prov 3:11-12 (PES) 139, 172
>>> Sir 4:17-18 (PES) 139
>>> Mt 5:5 (PES) 146
>>> Mt 5:6 (MAC) 123
>>> Mt 5:16 (MAC) 121
>>> Mt 6:1-6, 16-18 (MAC) 121
>>> Mt 6:1-6, 16-18 (PES) 145
>>> Mt 7:13-14 (PES) 146
>>> Sir 10:9 (PES) 142
>>> Mt 11:12 (PRO) 160
>>> Mt 12:34 (MAC) 124, 137
>>> Mt 12:36 (PES) 134
>>> Mk 12:41-44 (MAC) 122
>>> Sir 17:27 (PES) 142
>>> 
>>> I have no idea why this is happening. I changed nothing of what you gave me 
>>> and removed anything I had previously. If you need an example of how 
>>> \bibcit is being used in the text, just in case it helps (but I doubt it), 
>>> here is one:
>>> 
>>> The widow’s mite pleased God because of her good intention, rather than the 
>>> heap of money that the pharisees, urged on by self-love, threw into the 
>>> treasury box (cf.  \bibcit{Mk 12:41-44 (MAC)}Mk 12:41-44).
>>> 
>>> So, not sure where to go from here. Could I perhaps return to my earlier 
>>> question, which indicated that by using the keyword approach [a] [b] and so 
>>> on, as far as [z] I was at least getting a passable result, but how could I 
>>> continue past [z]? Could I have used [1], [2] etc which would allows me to 
>>> get as far as 66 (if I were to need every biblical book)?
>> don't set the indicator
>> 
>> 
>> -
>>   Hans Hagen | PRAGMA ADE
>>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
>> -
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

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


Re: [NTG-context] register for biblical citations

2021-04-16 Thread Henning Hraban Ramm

> Am 16.04.2021 um 11:47 schrieb jbf :
> 
> So, not sure where to go from here. Could I perhaps return to my earlier 
> question, which indicated that by using the keyword approach [a] [b] and so 
> on, as far as [z] I was at least getting a passable result, but how could I 
> continue past [z]? Could I have used [1], [2] etc which would allows me to 
> get as far as 66 (if I were to need every biblical book)?

Did you try to use more than one letter as keyword?

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] register for biblical citations

2021-04-16 Thread jbf
There was no mention of the indicator anywhere in what I copied from 
your example. I did try indicator=no just now in case it should be made 
explicit:


(\setupregister[bibcit][language=biblical,before=,indicator=no]

but that makes no difference either. Same result. Seemingly random index.

Julian

On 16/4/21 8:06 pm, Hans Hagen wrote:

On 4/16/2021 11:47 AM, jbf wrote:
Hans, thanks for your ingenious solution but there is still a way to 
go I suspect!


I implemented (copy-paste) precisely the solution offered and I get 
an index but with some strange results ! Notice that in my previous 
own solution (but only as far as 26 books!) I at least got an index 
in the order of the biblical books, but using the luacode you 
offered, I get a seemingly random result (see below).


I extended your example by a few books. so:

\startluacode
sorters.definitions["biblical"] = {
 method  = interfaces.variables.before,
 replacements = {
 { "Gen",  string.char(1) },
 { "Ex",   string.char(2) },
 { "Lev",  string.char(3) },
 { "Deut", string.char(4) },
 { "Lam",  string.char(5) },
 { "Dan",  string.char(6) },
 { "Joel",  string.char(7) },
 { "Ps",  string.char(8) },
 { "Prov",  string.char(9) },
 { "Sir",  string.char(10) },
 { "Mt",  string.char(11) },
 { "Mk",  string.char(12) },

 },
}
\stopluacode

But the result I get (just showing you a dozen or so, and you will 
see that Gen doesn't even turn up in this list ... it does, but much 
later!):


Mk 2:19-20 with parallels (PES) 146
Mt 3:8-10 (PES) 135
Prov 3:11-12 (PES) 139, 172
Sir 4:17-18 (PES) 139
Mt 5:5 (PES) 146
Mt 5:6 (MAC) 123
Mt 5:16 (MAC) 121
Mt 6:1-6, 16-18 (MAC) 121
Mt 6:1-6, 16-18 (PES) 145
Mt 7:13-14 (PES) 146
Sir 10:9 (PES) 142
Mt 11:12 (PRO) 160
Mt 12:34 (MAC) 124, 137
Mt 12:36 (PES) 134
Mk 12:41-44 (MAC) 122
Sir 17:27 (PES) 142

I have no idea why this is happening. I changed nothing of what you 
gave me and removed anything I had previously. If you need an example 
of how \bibcit is being used in the text, just in case it helps (but 
I doubt it), here is one:


The widow’s mite pleased God because of her good intention, rather 
than the heap of money that the pharisees, urged on by self-love, 
threw into the treasury box (cf.  \bibcit{Mk 12:41-44 (MAC)}Mk 
12:41-44).


So, not sure where to go from here. Could I perhaps return to my 
earlier question, which indicated that by using the keyword approach 
[a] [b] and so on, as far as [z] I was at least getting a passable 
result, but how could I continue past [z]? Could I have used [1], [2] 
etc which would allows me to get as far as 66 (if I were to need 
every biblical book)?

don't set the indicator


-
  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] register for biblical citations

2021-04-16 Thread Hans Hagen

On 4/16/2021 11:47 AM, jbf wrote:
Hans, thanks for your ingenious solution but there is still a way to go 
I suspect!


I implemented (copy-paste) precisely the solution offered and I get an 
index but with some strange results ! Notice that in my previous own 
solution (but only as far as 26 books!) I at least got an index in the 
order of the biblical books, but using the luacode you offered, I get a 
seemingly random result (see below).


I extended your example by a few books. so:

\startluacode
sorters.definitions["biblical"] = {
     method  = interfaces.variables.before,
     replacements = {
     { "Gen",  string.char(1) },
     { "Ex",   string.char(2) },
     { "Lev",  string.char(3) },
     { "Deut", string.char(4) },
     { "Lam",  string.char(5) },
     { "Dan",  string.char(6) },
     { "Joel",  string.char(7) },
     { "Ps",  string.char(8) },
     { "Prov",  string.char(9) },
     { "Sir",  string.char(10) },
     { "Mt",  string.char(11) },
     { "Mk",  string.char(12) },

     },
}
\stopluacode

But the result I get (just showing you a dozen or so, and you will see 
that Gen doesn't even turn up in this list ... it does, but much later!):


Mk 2:19-20 with parallels (PES) 146
Mt 3:8-10 (PES) 135
Prov 3:11-12 (PES) 139, 172
Sir 4:17-18 (PES) 139
Mt 5:5 (PES) 146
Mt 5:6 (MAC) 123
Mt 5:16 (MAC) 121
Mt 6:1-6, 16-18 (MAC) 121
Mt 6:1-6, 16-18 (PES) 145
Mt 7:13-14 (PES) 146
Sir 10:9 (PES) 142
Mt 11:12 (PRO) 160
Mt 12:34 (MAC) 124, 137
Mt 12:36 (PES) 134
Mk 12:41-44 (MAC) 122
Sir 17:27 (PES) 142

I have no idea why this is happening. I changed nothing of what you gave 
me and removed anything I had previously. If you need an example of how 
\bibcit is being used in the text, just in case it helps (but I doubt 
it), here is one:


The widow’s mite pleased God because of her good intention, rather than 
the heap of money that the pharisees, urged on by self-love, threw into 
the treasury box (cf.  \bibcit{Mk 12:41-44 (MAC)}Mk 12:41-44).


So, not sure where to go from here. Could I perhaps return to my earlier 
question, which indicated that by using the keyword approach [a] [b] and 
so on, as far as [z] I was at least getting a passable result, but how 
could I continue past [z]? Could I have used [1], [2] etc which would 
allows me to get as far as 66 (if I were to need every biblical book)?

don't set the indicator


-
  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] No space between \cite and next word.

2021-04-16 Thread Mikael Sundqvist
Hi,

I think there has been some change recently. Is it on purpose that
there is no space after the \cite. Look how the parenthesis that ends
the citation and the word "text" are set without space inbetween.

/Mikael

\startbuffer[mybib]
@article{a,
  author = {An Author},
  title = {A title},
  year = {2021},
}
\stopbuffer

\usebtxdefinitions[apa]
 \usebtxdataset[mybib.buffer]

\starttext

Text \cite[a] text.

\placelistofpublications

\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] register for biblical citations

2021-04-16 Thread jbf
Hans, thanks for your ingenious solution but there is still a way to go 
I suspect!


I implemented (copy-paste) precisely the solution offered and I get an 
index but with some strange results ! Notice that in my previous own 
solution (but only as far as 26 books!) I at least got an index in the 
order of the biblical books, but using the luacode you offered, I get a 
seemingly random result (see below).


I extended your example by a few books. so:

\startluacode
sorters.definitions["biblical"] = {
    method  = interfaces.variables.before,
    replacements = {
    { "Gen",  string.char(1) },
    { "Ex",   string.char(2) },
    { "Lev",  string.char(3) },
    { "Deut", string.char(4) },
    { "Lam",  string.char(5) },
    { "Dan",  string.char(6) },
    { "Joel",  string.char(7) },
    { "Ps",  string.char(8) },
    { "Prov",  string.char(9) },
    { "Sir",  string.char(10) },
    { "Mt",  string.char(11) },
    { "Mk",  string.char(12) },

    },
}
\stopluacode

But the result I get (just showing you a dozen or so, and you will see 
that Gen doesn't even turn up in this list ... it does, but much later!):


Mk 2:19-20 with parallels (PES) 146
Mt 3:8-10 (PES) 135
Prov 3:11-12 (PES) 139, 172
Sir 4:17-18 (PES) 139
Mt 5:5 (PES) 146
Mt 5:6 (MAC) 123
Mt 5:16 (MAC) 121
Mt 6:1-6, 16-18 (MAC) 121
Mt 6:1-6, 16-18 (PES) 145
Mt 7:13-14 (PES) 146
Sir 10:9 (PES) 142
Mt 11:12 (PRO) 160
Mt 12:34 (MAC) 124, 137
Mt 12:36 (PES) 134
Mk 12:41-44 (MAC) 122
Sir 17:27 (PES) 142

I have no idea why this is happening. I changed nothing of what you gave 
me and removed anything I had previously. If you need an example of how 
\bibcit is being used in the text, just in case it helps (but I doubt 
it), here is one:


The widow’s mite pleased God because of her good intention, rather than 
the heap of money that the pharisees, urged on by self-love, threw into 
the treasury box (cf.  \bibcit{Mk 12:41-44 (MAC)}Mk 12:41-44).


So, not sure where to go from here. Could I perhaps return to my earlier 
question, which indicated that by using the keyword approach [a] [b] and 
so on, as far as [z] I was at least getting a passable result, but how 
could I continue past [z]? Could I have used [1], [2] etc which would 
allows me to get as far as 66 (if I were to need every biblical book)?


Julian

On 16/4/21 5:24 pm, Hans Hagen wrote:


On 4/15/2021 11:28 AM, jbf wrote:

My simple MWE:

\defineregister[bibcit]
\setupregister[bibcit][%
indicator=no,
before=]

text... \bibcit[a]{Gen 3:6 (MAC) }Gen 3:6

(and so one for each Genesis reference, then moving on to Leviticus 
with [b] etc.)



In other words, I have used the key option [] using the alphabet to 
change the order, with Genesis as [a], Exodus [b], Leviticus [c], and 
so on.


Problem 1: there are 26 letters in the English alphabet. There are 
many more biblical books (OT and NT) than 26, so what do I do when I 
reach z?


Problem 2: the (MAC) would not normally be required in any biblical 
citation, but in my case it is, as well as (PER), (PRO) and several 
other references. In other words, these indicate where, in  a set of 
documents, the particular citations are to be found. But I think they 
may affect the order of citations, so, for example, I get the 
following results for the first four books of the Bible:


Gen 3:6 (MAC)    120
Gen 4:2-8 (MAC) 123
Gen 39:6-20 (MAG)     127
Gen 17:1 (PES)   137
Gen 18:27 (PES) 140
Gen 28:10-12 (PES)    141
Ex 20:12 (MAG)  129
Lev 6:5-6 (PES)   136
Deut 6:5 (PES)    145
Lam 3:27 (MAG)  129

Notice that Gen 39:6-20 is out of order in terms of chapters and 
verses. It should come after Gen 28:10-12 (PES) but I do not know how 
to control that order. It may be that (MAG), which comes after (MAC) 
in alphabetical terms, is controlling the order, rather than chapter 
and verse which I really want to control the order.


I realise this is complicated, but I'm sure ConTeXt is up to it. I've 
got the basics right for getting at least 26 books in some sort of 
order, but after that??

cheat (crossed fingers that you have enough entries) :

\startluacode
sorters.definitions["biblical"] = {
    method  = interfaces.variables.before,
    replacements = {
    { "Gen",  string.char(1) },
    { "Ex",   string.char(2) },
    { "Lev",  string.char(3) },
    { "Deut", string.char(4) },
    { "Lam",  string.char(5) },
    },
}
\stopluacode

\defineregister[bibcit] \setupregister[bibcit][language=biblical,before=]

\starttext

test ... \bibcit{Gen 3:6}
test ... \bibcit{Gen 4:2-8}
test ... \bibcit{Gen 39:6-20}
test ... \bibcit{Gen 17:1}
test ... \bibcit{Gen 18:27}
test ... \bibcit{Gen 28:10-12}
test ... \bibcit{Ex 20:12}
test ... \bibcit{Lev 6:5-6}
test ... \bibcit{Deut 6:5}
test ... \bibcit{Lam 3:27}

\blank[3*big] \placeregister[bibcit]

\stoptext

but is shows that it's not impossible to come up with a solution


Re: [NTG-context] autopdf on MacOS?

2021-04-16 Thread Thomas A. Schmitz

On 4/16/21 10:26 AM, Hans Åberg wrote:

That it doesn’t update in the background is more a feature than a bug, 
otherwise it would complain about broken/unavailable files during the TeX runs.

It is likely a bug: It has worked in some past versions.


It still works for me (I'm on the latest version of macos). The trick is 
to not change the focus to the pdf document in preview until the TeX run 
has finished; otherwise you get a dialogue box complaining about a 
broken pdf document. It also helps that ConTeXt now displays the 
colorful "error" page when something goes wrong; otherwise, preview crashes.


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

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


Re: [NTG-context] autopdf on MacOS?

2021-04-16 Thread Hans Åberg

> On 15 Apr 2021, at 11:45, Henning Hraban Ramm  wrote:
> 
>> Am 15.04.2021 um 10:26 schrieb Hans van der Meer :
>> 
>> Allthough a new pdf is created, this is not opened. If the pdf is open in 
>> Preview already, it is not updated unless switching to the Preview 
>> application.
>> 
>> It something wrong here? Is it not functional in MacOS? Am I missing some 
>> clue?
> 
> Apple’s Preview updates only on activation, and not reliably (for me, it 
> often crashes).

One can use the command 'open ', which opens it. In some versions of 
Preview, one get an extra copy so that they must eventually be all closed by 
hand.

> That it doesn’t update in the background is more a feature than a bug, 
> otherwise it would complain about broken/unavailable files during the TeX 
> runs.

It is likely a bug: It has worked in some past versions.


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] register for biblical citations

2021-04-16 Thread Hans Hagen

On 4/15/2021 11:28 AM, jbf wrote:

My simple MWE:

\defineregister[bibcit]
\setupregister[bibcit][%
indicator=no,
before=]

text... \bibcit[a]{Gen 3:6 (MAC) }Gen 3:6

(and so one for each Genesis reference, then moving on to Leviticus with 
[b] etc.)



In other words, I have used the key option [] using the alphabet to 
change the order, with Genesis as [a], Exodus [b], Leviticus [c], and so 
on.


Problem 1: there are 26 letters in the English alphabet. There are many 
more biblical books (OT and NT) than 26, so what do I do when I reach z?


Problem 2: the (MAC) would not normally be required in any biblical 
citation, but in my case it is, as well as (PER), (PRO) and several 
other references. In other words, these indicate where, in  a set of 
documents, the particular citations are to be found. But I think they 
may affect the order of citations, so, for example, I get the following 
results for the first four books of the Bible:


Gen 3:6 (MAC)    120
Gen 4:2-8 (MAC) 123
Gen 39:6-20 (MAG)     127
Gen 17:1 (PES)   137
Gen 18:27 (PES) 140
Gen 28:10-12 (PES)    141
Ex 20:12 (MAG)  129
Lev 6:5-6 (PES)   136
Deut 6:5 (PES)    145
Lam 3:27 (MAG)  129

Notice that Gen 39:6-20 is out of order in terms of chapters and verses. 
It should come after Gen 28:10-12 (PES) but I do not know how to control 
that order. It may be that (MAG), which comes after (MAC) in 
alphabetical terms, is controlling the order, rather than chapter and 
verse which I really want to control the order.


I realise this is complicated, but I'm sure ConTeXt is up to it. I've 
got the basics right for getting at least 26 books in some sort of 
order, but after that??

cheat (crossed fingers that you have enough entries) :

\startluacode
sorters.definitions["biblical"] = {
method  = interfaces.variables.before,
replacements = {
{ "Gen",  string.char(1) },
{ "Ex",   string.char(2) },
{ "Lev",  string.char(3) },
{ "Deut", string.char(4) },
{ "Lam",  string.char(5) },
},
}
\stopluacode

\defineregister[bibcit] \setupregister[bibcit][language=biblical,before=]

\starttext

test ... \bibcit{Gen 3:6}
test ... \bibcit{Gen 4:2-8}
test ... \bibcit{Gen 39:6-20}
test ... \bibcit{Gen 17:1}
test ... \bibcit{Gen 18:27}
test ... \bibcit{Gen 28:10-12}
test ... \bibcit{Ex 20:12}
test ... \bibcit{Lev 6:5-6}
test ... \bibcit{Deut 6:5}
test ... \bibcit{Lam 3:27}

\blank[3*big] \placeregister[bibcit]

\stoptext

but is shows that it's not impossible to come up with a solution

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