[NTG-context] Re: Bibliography cite

2023-08-01 Thread Robert via ntg-context
Thank you, Alan for the suggestion.

I tried as you said: \cite[alternative=authoryears,righttext={{, p. 
3}}][Knuth1984].

Yet the result is this: Knuth (1984), , p. 3 

If I leave out the first comma, the result is: Knuth (1984), p. 3 

Righttext probably refers to the text outside the parentheses.

Thank you in advance,

Robert.


> Op 1 aug. 2023, om 22:42 heeft Alan Braslau  het 
> volgende geschreven:
> 
> Using the APA specification:
> 
> \usebtxdefinitions
>[apa]
> 
> 
> you can then
> 
> \cite[alternative=authoryears,righttext={{, p.\nbsp 12}}] [Knuth1984]
> mentions ….
> 
> 
> The tricky part concerning righttext= is the double {{ }}, needed because the 
> text contains a comma. The reason for this is simple, as righttext is a 
> comma-separated list, where each entry corresponds to a cited reference, as 
> in \cite[righttext={a,b}] [ref1,ref2]
> so a is associated with ref1 and b is associated with ref2.
> 
> Alan
> 
> 
> 
> On 01/08/23 01/08/23, 15:37, Robert via ntg-context wrote:
>> Dear List members,
>> For my academic work with context I need the following cite according to Apa 
>> standards:
>> Knuth (1984, p. 12) mentions ….
>> The matrix is this:
>> AUTHOR (, p.~n).
>> I reckon this can somehow be accomplished with the \setupbtx command.
>> (Standard these and other variants are possible: AUTHOR () and AUTHOR 
>> , p. n.)
>> I tried different setups: \setupbtx[apa:cite:authoryear], and 
>> \setupbtx[apa:cite:authoryears], I played with the lefttext, righttext and 
>> other options, but none of them give the desired result.
>> Thank you for any suggestions.
>> Regards,
>> Robert
>> @article{Knuth1984,
>> author={Knuth, Donald E.},
>> title={Literate Programming},
>> journal={The Computer Journal}, Volume={27}, Number={2}, year={1984},
>> Pages={97--111},
>> }

___
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] Re: Bibliography cite

2023-08-01 Thread Alan Braslau via ntg-context

Using the APA specification:

\usebtxdefinitions
[apa]


you can then

\cite[alternative=authoryears,righttext={{, p.\nbsp 12}}] [Knuth1984]
mentions ….


The tricky part concerning righttext= is the double {{ }}, needed 
because the text contains a comma. The reason for this is simple, as 
righttext is a comma-separated list, where each entry corresponds to a 
cited reference, as in \cite[righttext={a,b}] [ref1,ref2]

so a is associated with ref1 and b is associated with ref2.

Alan



On 01/08/23 01/08/23, 15:37, Robert via ntg-context wrote:

Dear List members,

For my academic work with context I need the following cite according to Apa 
standards:

Knuth (1984, p. 12) mentions ….

The matrix is this:

AUTHOR (, p.~n).

I reckon this can somehow be accomplished with the \setupbtx command.

(Standard these and other variants are possible: AUTHOR () and AUTHOR , 
p. n.)

I tried different setups: \setupbtx[apa:cite:authoryear], and 
\setupbtx[apa:cite:authoryears], I played with the lefttext, righttext and 
other options, but none of them give the desired result.

Thank you for any suggestions.

Regards,

Robert



@article{Knuth1984,
author={Knuth, Donald E.},
title={Literate Programming},
journal={The Computer Journal}, Volume={27}, Number={2}, year={1984},
Pages={97--111},
}

___
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] Re: floatcombinations seem to not work correctly after lmtx update

2023-08-01 Thread Hans Hagen

On 8/1/2023 7:34 PM, Gerion Entrup wrote:

Am Montag, 19. Juni 2023, 13:53:02 CEST schrieb Gerion Entrup via ntg-context:

In this minimal example everything works. However, in my real document
the subfigures have enormous space between them so just two pictures are
visible (see the attached png).


I finally found the cause. I had these lines in my header:
```
\setupcaptions[minwidth=0.95\textwidth,
way=bychapter,
prefixsegments=chapter]
```
In the new context, this seem to apply to all captions, while in the old
context, it seems to apply only to those captions that are not specified
otherwise.


gnerally a command like this applies to apply instances, contrary to
 \setupcaptions[instance][...]

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] Re: Tracker for hyphens at the end of lines

2023-08-01 Thread Keith McKay

Thanks Hans!

I'm never disappointed, always amazed with ConTeXt!

This is just what I was looking for.

Best Wishes

Keith McKay

On 01/08/2023 18:10, Hans Hagen via ntg-context wrote:

On 8/1/2023 4:54 PM, Keith McKay wrote:

Hi colleagues,

Is there a tracker for highlighting hyphens at the end of lines 
similar the way underfull and overfull boxes can be displayed with a 
coloured bar at the end of the offending line?


I have looked at the wiki page "Reviewing hyphenation" and it has a 
solution for mkii from 2009 which, I would think, won't be suitable  
for present day ConTeXt. I have tried searching for hyphens using 
Skim and Adobe Acrobate viewers but although they find hyphenation in 
line they don't recognise hyphens at the edge of lines.


Any help would be appreciated.

I suppose you would be disappointed it there was no tracker ...

\enabletrackers[hyphenation.applied.console]
\enabletrackers[hyphenation.applied.visualize]

you even get a file with the hyphenated words

You can see all of them with

\disabledirectives[backend.cleanup.flatten]
\bitwiseflip \normalizelinemode -\flattendiscretionariesnormalizecode
\showmakeup[discretionary]

weren't it that i had to provide the directive for this to work well 
(disbale flattening) so for that you have to wait till we update


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
___

___
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] Re: floatcombinations seem to not work correctly after lmtx update

2023-08-01 Thread Gerion Entrup
Am Montag, 19. Juni 2023, 13:53:02 CEST schrieb Gerion Entrup via ntg-context:
> In this minimal example everything works. However, in my real document
> the subfigures have enormous space between them so just two pictures are
> visible (see the attached png).

I finally found the cause. I had these lines in my header:
```
\setupcaptions[minwidth=0.95\textwidth,
   way=bychapter,
   prefixsegments=chapter]
```
In the new context, this seem to apply to all captions, while in the old
context, it seems to apply only to those captions that are not specified
otherwise.

Best
Gerion


signature.asc
Description: This is a digitally signed message part.
___
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] Re: Tracker for hyphens at the end of lines

2023-08-01 Thread Hans Hagen via ntg-context

On 8/1/2023 4:54 PM, Keith McKay wrote:

Hi colleagues,

Is there a tracker for highlighting hyphens at the end of lines similar 
the way underfull and overfull boxes can be displayed with a coloured 
bar at the end of the offending line?


I have looked at the wiki page "Reviewing hyphenation" and it has a 
solution for mkii from 2009 which, I would think, won't be suitable  for 
present day ConTeXt. I have tried searching for hyphens using Skim and 
Adobe Acrobate viewers but although they find hyphenation in line they 
don't recognise hyphens at the edge of lines.


Any help would be appreciated.

I suppose you would be disappointed it there was no tracker ...

\enabletrackers[hyphenation.applied.console]
\enabletrackers[hyphenation.applied.visualize]

you even get a file with the hyphenated words

You can see all of them with

\disabledirectives[backend.cleanup.flatten]
\bitwiseflip \normalizelinemode -\flattendiscretionariesnormalizecode
\showmakeup[discretionary]

weren't it that i had to provide the directive for this to work well 
(disbale flattening) so for that you have to wait till we update


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] Re: \defineactivecharacter in LMTX + composing characters

2023-08-01 Thread Hans Hagen

On 8/1/2023 4:18 PM, Hamid,Idris wrote:

Dear gang,

It appears that \defineactivecharacter does not work in lmtx:

\starttext
\defineactivecharacter Ḥ  {\d{H}}
\defineactivecharacter ḥ  {\d{h}}
\defineactivecharacter Ṣ  {\d{S}}
\defineactivecharacter ṣ  {\d{s}}
\stoptext

This should not produce any typeset output but in lmtx it does.

Background: The following characters are essential for Arabic transliteration 
(assuming your email client has the chars):

Ṯṯ Ḥḥ Ḫḫ Ḏḏ Šš Ṣṣ Ḍḍ Ṭṭ Ẓẓ Ġġ Āā Īī Ūū ʿ ʾ
I'd use a different font but as you want to go cheap ... attached gets 
you going and will give you a few hours playing around with fonts.


Using a scaled c for some c like shape is kind of bad anyway, kind of 
using a comma for an ogonek.


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
-
\startluacode

local function botthing(characters,target,base,accent)
--if not characters[target] then
local data1 = characters[base]
local data2 = characters[accent]
if data1 and data2 then
characters[target] = { -- "Ḥ"
height   = data1.height,
depth= (data1.depth or 0) + 0.5*(data2.height or 0),
width= data1.width,
unicode  = target,
commands = {
{ "slot", 0, 0x048 },
{ "left", 0.5*(data2.width  or 0) + 0.5*(data1.width  or 
0)},
{ "down", 0.2*(data2.height or 0) + (data1.height or 0) 
},
{ "slot", 0, 0x2D9, },
},
}
end
--end
end

local function topthing(characters,target,base,accent)
--if not characters[target] then
local data1 = characters[base]
local data2 = characters[accent]
if data1 and data2 then
characters[target] = { -- "Ḥ"
height   = (data1.height or 0) + 0.5*(data2.height or 0),
depth= data1.depth,
width= data1.width,
unicode  = target,
commands = {
{ "slot", 0, 0x048 },
{ "left", 0.5*(data2.width  or 0) + 0.5*(data1.width  or 0) 
},
{ "up",   0.5*(data2.height or 0) },
{ "slot", 0, 0x2D9, },
},
}
end
--end
end

local function initialize(tfmdata,value)
if value then
botthing(tfmdata.characters,0x1E24,0x048,0x2D9)
--topthing(tfmdata.characters,0x1E24,0x048,0x2D9)
end
end
local specification = {
name= "idrify",
description = "idrify",
manipulators = {
base = initialize,
node = initialize,
}
}

fonts.handlers.otf.features.register(specification)
\stopluacode

\definefontfeature[default][default][idrify=yes]

\definedfont[Serif*default @ 11pt]

\showglyphs

Ḥ

\stoptext
___
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] Tracker for hyphens at the end of lines

2023-08-01 Thread Keith McKay

Hi colleagues,

Is there a tracker for highlighting hyphens at the end of lines similar 
the way underfull and overfull boxes can be displayed with a coloured 
bar at the end of the offending line?


I have looked at the wiki page "Reviewing hyphenation" and it has a 
solution for mkii from 2009 which, I would think, won't be suitable  for 
present day ConTeXt. I have tried searching for hyphens using Skim and 
Adobe Acrobate viewers but although they find hyphenation in line they 
don't recognise hyphens at the edge of lines.


Any help would be appreciated.

Keith McKay

___
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] \defineactivecharacter in LMTX + composing characters

2023-08-01 Thread Hamid,Idris
Dear gang,

It appears that \defineactivecharacter does not work in lmtx:

\starttext
\defineactivecharacter Ḥ  {\d{H}}
\defineactivecharacter ḥ  {\d{h}}
\defineactivecharacter Ṣ  {\d{S}}
\defineactivecharacter ṣ  {\d{s}}
\stoptext

This should not produce any typeset output but in lmtx it does.

Background: The following characters are essential for Arabic transliteration 
(assuming your email client has the chars):

Ṯṯ Ḥḥ Ḫḫ Ḏḏ Šš Ṣṣ Ḍḍ Ṭṭ Ẓẓ Ġġ Āā Īī Ūū ʿ ʾ

But most really good fonts don't have them, so we have to compose them. Now 
there are other methods, e.g,

1) \definecharacter Hbottomdot  {\buildtextbottomdot H}

but cannot use it without something like \defineactivecharacter (there's no way 
we're going back to the bad old days of control sequences for accented chars). 
That is, we need to be able to say something like

\definecharacter Ḥ  {\buildtextbottomdot H}

But this doesn't work.

The other method

2) \definefontfeature[default][default][compose=yes]

doesn't appear to work either (at least not with, e.g., Minion Pro Opticals).

And even when it used to (somewhat) work (often ugly default results) it did 
not support utf 02BE and 02BF (ʿ ʾ). So we still need something like

\defineactivecharacter ʿ {\high{c}}
\defineactivecharacter ʾ {\kern.07 em 
\high{\rotate[rotation=180,location=high]{c}}}

or better

\definecharacter ʿ {\high{c}}
\definecharacter ʾ {\kern.07 em \high{\rotate[rotation=180,location=high]{c}}}

The upshot is that we need a general, configurable solution for this kind of 
situation.

And please don't say, "Use a different font!" -)

Thank you in advance for any guidance and assistance in this matter.

Best wishes
Idris

--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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] Bibliography cite

2023-08-01 Thread Robert via ntg-context
Dear List members,

For my academic work with context I need the following cite according to Apa 
standards:

Knuth (1984, p. 12) mentions ….

The matrix is this:

AUTHOR (, p.~n).

I reckon this can somehow be accomplished with the \setupbtx command.

(Standard these and other variants are possible: AUTHOR () and AUTHOR , 
p. n.)

I tried different setups: \setupbtx[apa:cite:authoryear], and 
\setupbtx[apa:cite:authoryears], I played with the lefttext, righttext and 
other options, but none of them give the desired result.

Thank you for any suggestions.

Regards,

Robert



@article{Knuth1984,
author={Knuth, Donald E.},
title={Literate Programming},
journal={The Computer Journal}, Volume={27}, Number={2}, year={1984}, 
Pages={97--111}, 
}

___
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] OT: funny units

2023-08-01 Thread Henning Hraban Ramm

WRT to funny units consider this thread (in German):

https://ruhrpott.social/@Matze/110812742577889798

Matze wrote:

I read the 'as big as a song thrush' as a size and I find that we should 
set 'song thrush' as a standard unit for 20-22 cm.


Text problem:
Calculate how many square song thrush amount to a Saarland.

(Saarland is the smallest federal country of Germany that is not only a 
city and often quoted for size comparison.)



Magdalena calculated that with a given song thrush size of 20cm, one 
square song thrush is 400 cm² and a Saarland is about 64,250,000,000 
square song thrush.



;)
HR
___
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
___