Re: [NTG-context] Problems with column sets?

2022-05-25 Thread Ben Moon via ntg-context
I've had a similar issue since December (posted here: 
https://www.mail-archive.com/ntg-context@ntg.nl/msg101228.html) and trying the 
examples from the columnsets manual today and the version that worked for 
Hraban I get the same error (ConTeXt version  2022.05.02, macOS 12.4).

Ben


On Tue, 24 May 2022, at 20:42, T. Kurt Bond via ntg-context wrote:
> Sigh.  I should have mentioned that that I reinstalled LMTX from scratch on 
> both machines, and that my mac is running macOS Monterey 12.3.1.
> 
> On Tue, May 24, 2022 at 3:40 PM T. Kurt Bond  wrote:
>> Huh.  I tried it on a Linux box, and that worked.  But on my main machine, a 
>> Intel 64 bit mac, I get the original result.  Oh, I changed to use this 
>> input:
>>> \definecolumnset[TwoColumns][n=2]
>>> \startcolumnset [TwoColumns]
>>>   \input knuth
>>> \stopcolumnset
>> 
>> On Tue, May 24, 2022 at 3:09 PM Henning Hraban Ramm via ntg-context 
>>  wrote:
>>> Am 24.05.22 um 20:43 schrieb T. Kurt Bond via ntg-context:
>>> > Given the following file that uses definecolumnset and 
>>> > startcolumnset/stopcolumnset (largely from the wiki 
>>> > ) for input:
>>> > 
>>> > 
>>> > 
>>> > \setuppapersize[letter]
>>> > \definecolumnset[TwoColumns][n=2]
>>> > \startcolumnset [TwoColumns]
>>> >\title{Test page}
>>> >\framed
>>> >  [frame=off,
>>> >   bottomframe=on,
>>> >   width=\textwidth,
>>> >   frameoffset=1mm,
>>> >   foregroundstyle=small,
>>> >  ]{\copyright\ \date[][year] Donald E. Knuth}
>>> >\input knuth
>>> > \stopcolumnset
>>> > 
>>> > 
>>> 
>>> That’s not a minimal example, but it works for me (even if the text 
>>> starts only on the second page):
>>> 
>>> \definecolumnset[TwoColumns][n=2]
>>> 
>>> \starttext
>>> \startcolumnset [TwoColumns]
>>>\title{Test page}
>>>\framed
>>>  [frame=off,
>>>   bottomframe=on,
>>>   width=\textwidth,
>>>   frameoffset=1mm,
>>>   foregroundstyle=small,
>>>  ]{\copyright\ \date[][year] Donald E. Knuth}
>>>\samplefile{knuth}
>>> \stopcolumnset
>>> \stoptext
>>> 
>>> 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
>>> ___
>> 
>> 
>> -- 
>> T. Kurt Bond, tkurtb...@gmail.com, https://tkurtbond.github.io
> 
> 
> -- 
> T. Kurt Bond, tkurtb...@gmail.com, https://tkurtbond.github.io
> ___
> 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] blockligatures removing characters

2022-05-13 Thread Ben Moon via ntg-context
I've just update and blockligatures=yes is working again; thanks very much Hans.
Ben


On Fri, 13 May 2022, at 14:29, Ben Moon via ntg-context wrote:
> Thanks Hans,
> 
> I tried to modify your example for preventing the capital-Th ligature but 
> this doesn't seem to work. The 'fi' ligature is prevented, but 'Th' still 
> appears as a ligature. This occurs with the original lowercase version too. 
> Have I missed something?
> 
> ```
> \startluacode
>  local demo = {
>  name= "demo",
>  options = {
>  {
>  patterns = {
>  fio  = "f|io",
>  },
>  words = [[ fioot fiots ]],
>  },
>  {
>  patterns = {
>  fio  = "T|h",
>  },
>  words = [[ This That ]],
>  },
>  },
>  }
>  table.save("oeps-fixes.llg",demo)
> \stopluacode
> 
> \setuplanguage[en][goodies={oeps-fixes.llg}]
> 
> \setupbodyfont[ebgaramond]
> 
> \starttext
>  fiets fiots fiats fioot This That
> \stoptext
> ```
> Ben
> 
> On Mon, 9 May 2022, at 14:03, Hans Hagen via ntg-context wrote:
>> On 5/9/2022 9:56 AM, Denis Maier via ntg-context wrote:
>> > Happens here as well, already on  ConTeXt  ver: 2022.03.12 17:56 LMTX.
>> > 
>> > By the way, this even happens without special fonts:
>> > 
>> > \blockligatures[Th]
>> > 
>> > \definefontfeature[default:blocklig][default][liga=yes,blockligatures=yes]
>> > 
>> > \setupbodyfont[myfont]
>> > 
>> > \starttext
>> > 
>> > \definedfont[Serif*default:blocklig]
>> > 
>> >  The This These are missing the `h'
>> > 
>> > \stoptext
>> I'll fix it but it's not the way to do it in lmtx where we have
>> 
>> \startluacode
>>  local demo = {
>>  name= "demo",
>>  options = {
>>  {
>>  patterns = {
>>  fio  = "f|io",
>>  },
>>  words = [[ fioot fiots ]],
>>  },
>>  {
>>  patterns = {
>>  fio  = "t|h",
>>  },
>>  words = [[ this that ]],
>>  },
>>  },
>>  }
>>  table.save("oeps-fixes.llg",demo)
>> \stopluacode
>> 
>> \setuplanguage[en][goodies={oeps-fixes.llg}]
>> 
>> \setupbodyfont[ebgaramond]
>> 
>> \starttext
>>  fiets fiots fiats fioot this that
>> \stoptext
>> 
>> I just added (no upload) this
>> 
>> \startluacode
>>  local demo = {
>>  name= "demo",
>>  options = {
>>  {
>>  substitutions = {
>>  th = "t|h",
>>  Th = "T|h",
>>  st = "s|t",
>>  St = "S|t",
>>  fi = "f|i",
>>  },
>>  },
>>  },
>>  }
>>  table.save("oeps-fixes.llg",demo)
>> \stopluacode
>> 
>> \setuplanguage[en][goodies={oeps-fixes.llg}]
>> 
>> \setupbodyfont[ebgaramond]
>> 
>> \starttext
>>  The This These fiets and thisthis thisfiets
>> \stoptext
>> 
>> 
>> 
>> -
>>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
> ___
> 
___
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] blockligatures removing characters

2022-05-13 Thread Ben Moon via ntg-context
Thanks Hans,

I tried to modify your example for preventing the capital-Th ligature but this 
doesn't seem to work. The 'fi' ligature is prevented, but 'Th' still appears as 
a ligature. This occurs with the original lowercase version too. Have I missed 
something?

```
\startluacode
 local demo = {
 name= "demo",
 options = {
 {
 patterns = {
 fio  = "f|io",
 },
 words = [[ fioot fiots ]],
 },
 {
 patterns = {
 fio  = "T|h",
 },
 words = [[ This That ]],
 },
 },
 }
 table.save("oeps-fixes.llg",demo)
\stopluacode

\setuplanguage[en][goodies={oeps-fixes.llg}]

\setupbodyfont[ebgaramond]

\starttext
 fiets fiots fiats fioot This That
\stoptext
```
Ben

On Mon, 9 May 2022, at 14:03, Hans Hagen via ntg-context wrote:
> On 5/9/2022 9:56 AM, Denis Maier via ntg-context wrote:
> > Happens here as well, already on  ConTeXt  ver: 2022.03.12 17:56 LMTX.
> > 
> > By the way, this even happens without special fonts:
> > 
> > \blockligatures[Th]
> > 
> > \definefontfeature[default:blocklig][default][liga=yes,blockligatures=yes]
> > 
> > \setupbodyfont[myfont]
> > 
> > \starttext
> > 
> > \definedfont[Serif*default:blocklig]
> > 
> >  The This These are missing the `h'
> > 
> > \stoptext
> I'll fix it but it's not the way to do it in lmtx where we have
> 
> \startluacode
>  local demo = {
>  name= "demo",
>  options = {
>  {
>  patterns = {
>  fio  = "f|io",
>  },
>  words = [[ fioot fiots ]],
>  },
>  {
>  patterns = {
>  fio  = "t|h",
>  },
>  words = [[ this that ]],
>  },
>  },
>  }
>  table.save("oeps-fixes.llg",demo)
> \stopluacode
> 
> \setuplanguage[en][goodies={oeps-fixes.llg}]
> 
> \setupbodyfont[ebgaramond]
> 
> \starttext
>  fiets fiots fiats fioot this that
> \stoptext
> 
> I just added (no upload) this
> 
> \startluacode
>  local demo = {
>  name= "demo",
>  options = {
>  {
>  substitutions = {
>  th = "t|h",
>  Th = "T|h",
>  st = "s|t",
>  St = "S|t",
>  fi = "f|i",
>  },
>  },
>  },
>  }
>  table.save("oeps-fixes.llg",demo)
> \stopluacode
> 
> \setuplanguage[en][goodies={oeps-fixes.llg}]
> 
> \setupbodyfont[ebgaramond]
> 
> \starttext
>  The This These fiets and thisthis thisfiets
> \stoptext
> 
> 
> 
> -
>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
___


[NTG-context] blockligatures removing characters

2022-05-07 Thread Ben Moon via ntg-context
Hi List,

I'm using blockligatures to avoid the 'Th' ligature in some fonts but keep 
others. Recently I've found this removes the 'h' completely, i.e. 'Th' is 
changed to 'T', 'The' becomes 'Te' etc. 

Is there a way to restore the blockligatures functionality? I'm on ConTeXt 
version 2022.05.02 16:19.

Here is a MWE using Almendra (https://fonts.google.com/specimen/Almendra 
)
 from Google Fonts.

```
\starttypescriptcollection[myfont]

\starttypescript[myfont]
\definefontsynonym[Serif][Almendra-Regular][features=default]
\stoptypescript

\starttypescript[myfont]
\definetypeface[\typescriptone][rm][serif][myfont][default][]
\stoptypescript

\stoptypescriptcollection

\blockligatures[Th]

\definefontfeature[default][default][liga=yes]
\definefontfeature[default:nolig][default][liga=no]
\definefontfeature[default:blocklig][default][liga=yes,blockligatures=yes]

\setupbodyfont[myfont]

\starttext
The This These have the Th ligature and others (fi)

\definedfont[Serif*default:nolig]
The This These have no ligatures (not fi)

\definedfont[Serif*default:blocklig]
The This These are missing the `h' (fi)
\stoptext
```

Best,
Ben___
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] xmlpos values doubled

2022-04-20 Thread Ben Moon via ntg-context
Hello again,

I wonder whether anyone has some thoughts to help with my problem? Either why 
\xmlpos gives double values or alternatives to arrange my table format?

Best wishes,
Ben


On Mon, 28 Mar 2022, at 10:44, Ben Moon via ntg-context wrote:
> Hello All,
> 
> I'm trying to render a table stored in XML JATS format 
> (https://jats.nlm.nih.gov/archiving/) and eventually want to use the 
>  tag to setup column aligning from the @align attribute, e.g.,
> 
> \setupTABLE [column] [\xmlpos{#1}] [align=\xmlatt{#1}{align}]
> 
> Including \xmlpos{#1} I get double the value returned, i.e.: the first 
> element in colgroup returns 2, the second returns 4 etc.
> 
> Below is a MWE to show my issue. I show \xmlpos for each  tag in 
>   above the table, which returns 2, 4, 6, 8 but I expected 1, 2, 3, 
> 4. Am I missing something or is there another way I could do this?
> 
> 
> \startbuffer[table]
>   
> 
>   
> 
> 
> 
> 
>   
>   
> 
>   H1 (centre)
>   H2 (right)
>   H3
>   H4
> 
>   
>   
> 
>   A1
>   A2
>   A3
>   A4
> 
> 
>   B1
>   B2
>   B3
>   B4
> 
>   
> 
>   
> \stopbuffer
> 
> \startxmlsetups xml:tabletestsetups
> \xmlsetsetup{#1}{*}{-}
> % tables
> \xmlsetsetup{#1}{table-wrap|table}{xml:*}
> \xmlsetsetup{#1}{thead|tbody|tr|th|td}{xml:table:*}
> \xmlsetsetup{#1}{colgroup|col}{xml:*}
> \stopxmlsetups
> 
> \xmlregistersetup{xml:tabletestsetups}
> 
> \startxmlsetups xml:table-wrap
> \startplacetable
> % \contextversion \par
> \xmlflush{#1}
> \stopplacetable
> \stopxmlsetups
> 
> \startxmlsetups xml:table
> \bTABLE
> \xmlflush{#1}
> \eTABLE
> \stopxmlsetups
> 
> \startxmlsetups xml:colgroup
> \xmlflush{#1}
> \stopxmlsetups
> 
> \startxmlsetups xml:col
> \xmlpos{#1} \xmlatt{#1}{align}\par
> \stopxmlsetups
> 
> \startxmlsetups xml:table:thead
> \bTABLEhead
> \xmlflush{#1}
> \eTABLEhead
> \stopxmlsetups
> 
> \startxmlsetups xml:table:tr
> \bTR
> \xmlflush{#1}
> \eTR
> \stopxmlsetups
> 
> \startxmlsetups xml:table:th
> \bTH
> \xmlflush{#1}
> \eTH
> \stopxmlsetups
> 
> \startxmlsetups xml:table:tbody
> \bTABLEbody
> \xmlflush{#1}
> \eTABLEbody
> \stopxmlsetups
> 
> \startxmlsetups xml:table:td
> \bTC
> \xmlflush{#1}
> \eTC
> \stopxmlsetups
> 
> \xmlprocessbuffer{main}{table}{}
> 
> 
> All the best,
> Ben
> 
> 
> Ben Moon
> b...@themoons.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
> ___
> 
___
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] xmlpos values doubled

2022-03-28 Thread Ben Moon via ntg-context
Hello All,

I'm trying to render a table stored in XML JATS format 
(https://jats.nlm.nih.gov/archiving/) and eventually want to use the  
tag to setup column aligning from the @align attribute, e.g.,

\setupTABLE [column] [\xmlpos{#1}] [align=\xmlatt{#1}{align}]

Including \xmlpos{#1} I get double the value returned, i.e.: the first element 
in colgroup returns 2, the second returns 4 etc.

Below is a MWE to show my issue. I show \xmlpos for each  tag in 
  above the table, which returns 2, 4, 6, 8 but I expected 1, 2, 3, 
4. Am I missing something or is there another way I could do this?


\startbuffer[table]
  

  




  
  

  H1 (centre)
  H2 (right)
  H3
  H4

  
  

  A1
  A2
  A3
  A4


  B1
  B2
  B3
  B4

  

  
\stopbuffer

\startxmlsetups xml:tabletestsetups
\xmlsetsetup{#1}{*}{-}
% tables
\xmlsetsetup{#1}{table-wrap|table}{xml:*}
\xmlsetsetup{#1}{thead|tbody|tr|th|td}{xml:table:*}
\xmlsetsetup{#1}{colgroup|col}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:tabletestsetups}

\startxmlsetups xml:table-wrap
\startplacetable
% \contextversion \par
\xmlflush{#1}
\stopplacetable
\stopxmlsetups

\startxmlsetups xml:table
\bTABLE
\xmlflush{#1}
\eTABLE
\stopxmlsetups

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

\startxmlsetups xml:col
\xmlpos{#1} \xmlatt{#1}{align}\par
\stopxmlsetups

\startxmlsetups xml:table:thead
\bTABLEhead
\xmlflush{#1}
\eTABLEhead
\stopxmlsetups

\startxmlsetups xml:table:tr
\bTR
\xmlflush{#1}
\eTR
\stopxmlsetups

\startxmlsetups xml:table:th
\bTH
\xmlflush{#1}
\eTH
\stopxmlsetups

\startxmlsetups xml:table:tbody
\bTABLEbody
\xmlflush{#1}
\eTABLEbody
\stopxmlsetups

\startxmlsetups xml:table:td
\bTC
\xmlflush{#1}
\eTC
\stopxmlsetups

\xmlprocessbuffer{main}{table}{}


All the best,
Ben

Ben Moon
b...@themoons.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] \startcolumnset ... \stopcolumnset fatal error: return code 11

2022-01-17 Thread Ben Moon via ntg-context
I too get an error trying to run John’s code and my own (I found this after 
that wouldn’t work) on macOS. My error code is 1 rather than 11.

system  > ConTeXt  ver: 2022.01.15 17:32 LMTX  fmt: 2022.1.17  int: 
English/english

mtx-context | fatal error: return code: 1

Ben


___
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] Caption with hanging figure label

2021-11-30 Thread Ben Moon via ntg-context
Hi,

I’d like to create a caption with the first line hanging/outdented compared to 
the lines afterwards, like this:

> Figure 1. Here is the line of text
>that goes on to a second line. The
>first line is hanging.

I’ve posted this question here: 
, but was suggested to post on 
the mailing list.

I have also seen the `hang=yes` option (from this post 
), which gives the figure label 
in its own ‘column’.

The difference that I want is that the Figure label is in-line with the body of 
the caption and not in a separate column. 

Do you have suggestions for how to do this?

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