Re: [NTG-context] Tabulate: Change cell orienation for individual cells?

2023-06-27 Thread Bruce Horrocks via ntg-context


> On 27 Jun 2023, at 09:56, Denis Maier via ntg-context  
> wrote:
> 
> Hi,
>  is it possible to override the defined orienatation for a given cell ?

\starttext
\starttabulate[|l|c|r|]
\NC this and that \NC left and right \NC here and there \NC \NR
\NC such and so \NC \rotate[rotation=90]{up and down} \NC on and on \NC \NR
\stoptabulate
\stoptext

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Off topic: Does a 'free for commercial use' flared-sans font exist in the world?

2023-06-18 Thread Bruce Horrocks via ntg-context


> On 16 Jun 2023, at 17:35, Gerben Wierda via ntg-context  
> wrote:
> 
> I know this is off topic, but I suspect this community is actually one of the 
> best places to find an answer.
> 
> I really like Optima, and what I really like about it is the 'flared style'.
> 
> But I would like to move to a flared-sans font that gives me more licensing 
> freedom. I haven't been able to find one after extensive searching. The only 
> one who were reasonably priced (not free) were the URW Classico ones in Adobe 
> Creative Cloud, but those can only be used in Adobe programs like InDesign 
> (and not TeX).
> 
> I found some flared-sans fonts, but not one with at least regular, italic, 
> bold, and bold-italic.
> 
> Is there really not a single flared-sans font that is really free (so also 
> for commercial use) to use out there?

Not free but good value: Fontspring have a font called Ophian that looks (to my 
untrained eye!) a reasonable match with Optima.



$22 for the first licence added to the shopping cart then reductions show for 
the subsequent licences. I'm guessing you'll need two: desktop in order to 
install on a PC and publish a printed book, and eBook to allow distribution of 
a PDF or eBook, so 33 USD in total. There's no time limit nor number of copies 
limit as far as I can see - just one eBook licence per title.

Maybe there will be VAT etc added when you get to checkout - I didn't go that 
far.

Regards,
—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] xml nbsp?

2023-06-13 Thread Bruce Horrocks via ntg-context
 is not a pre-defined named character in XML (but it is in HTML which 
lulls you into a false sense of security).

See the link below for some more detail and a fix.



> On 13 Jun 2023, at 11:01, Hans van der Meer via ntg-context 
>  wrote:
> 
> What happened to the non breaking space in XML? It has disappeared in a way. 
> See the minimal example attached.
> 
> dr. Hans van der Meer
> 


test-nbsp.pdf
Description: Adobe PDF document
> 

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Super slow installation

2023-05-31 Thread Bruce Horrocks via ntg-context
On 31 May 2023, at 01:51, Thangalin  wrote:
> 
> From twelve99.net:
> 
> If you’re interested in our IP city prefixes, we have a lookup table on our 
> website: https://www.arelion.com/our-network/bgp-routing/bgp-communities 
> Scroll down to “Origin + Communities” and expand that section. You can see 
> that sea-b1 (your hop 8) is not in Brussels, but is our router in Seattle.
>  
> My guess would be that the hostname “us-was” for Liberty Global (aorta.net) 
> stands for U.S.A. and Washington D.C, not Warsaw. They’re probably using ICMP 
> tunneling for their MPLS backbone, that’s why the ping times are weird for 
> you.

Good point about the MPLS.

I was using https://www.geolocation.com/ to do the geolocation and it claims 
Warsaw but that - in hindsight - is wrong. So "us-was" is likely to be 
Washington as per the name and is also the device "taking the blame" for the 
entirety of the MPLS latency. Since that will include the transatlantic time 
the extra 75ms isn't quite so bad as it looks.

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Super slow installation

2023-05-30 Thread Bruce Horrocks via ntg-context
On 30 May 2023, at 18:59, Thangalin via ntg-context  wrote:

[snip]

> $ traceroute lmtx.pragma-ade.com
>  3  rc1bb-be150-1.vc.shawcable.net (64.59.147.161)  22.062 ms  22.094 ms  
> 22.127 ms
>  4  24.244.60.185 (24.244.60.185)  23.964 ms  24.273 ms  23.612 ms
Vancouver

>  5  24.244.62.57 (24.244.62.57)  24.565 ms  24.926 ms  25.269 ms
Edmonton

>  6  rc1bb-be214.vc.shawcable.net (24.244.58.61)  23.201 ms  16.376 ms  16.637 
> ms
back in Vancouver!

>  7  rc1wt.wa.shawcable.net (66.163.76.66)  20.228 ms  15.492 ms  15.227 ms
Winnipeg

>  8  sea-b1-link.ip.twelve99.net (213.248.67.224)  24.968 ms  28.435 ms  
> 24.726 ms
Brussels (allegedly - I don't believe this gelocation site result because 
Winipeg isn't exactly close to the Atlantic and any undersea cable)

>  9  chi-b23-link.ip.twelve99.net (62.115.132.154)  64.194 ms  64.310 ms  
> 64.081 ms
Chicago (that's more like it)

> 10  nyk-bb2-link.ip.twelve99.net (62.115.137.58)  80.232 ms 
> nyk-bb1-link.ip.twelve99.net (80.91.246.163)  80.730 ms 
> nyk-bb2-link.ip.twelve99.net (62.115.137.58)  80.335 ms
New York

> 11  nyk-b1-link.ip.twelve99.net (62.115.135.133)  84.971 ms  85.189 ms  
> 84.776 ms
still New York - worth a site-seeing tour though!

> 12  upc-ic-355153.ip.twelve99-cust.net (62.115.190.245)  90.268 ms  90.132 ms 
>  90.416 ms
Brussels

> 13  us-was03a-rd1-ae-8-0.aorta.net (84.116.133.98)  165.845 ms  159.578 ms  
> 161.045 ms
Warsaw (plus an extra 75ms latency - that's longer than it took to cross the 
Atlantic)

> 14  nl-ams17b-rc1-lag-105-0.aorta.net (84.116.130.65)  168.328 ms  161.507 ms 
>  162.117 ms
Amsterdam - at last!

> 15  asd-rc0001-cr101-be60-2.core.as33915.net (213.51.64.5)  164.180 ms  
> 168.938 ms  169.739 ms
Amsterdam still

> 16  213.51.7.227 (213.51.7.227)  165.693 ms  161.384 ms  161.558 ms
Hoogeveen

> 17  * * *
This timeout is almost certainly because the last server has been set to ignore 
UDP traffic.

  $ traceroute -I lmtx.pragma-ade.com

uses TCP packets rather than UDP and we get the final response much more 
quickly, which is:

17  d57d1da5.static.ziggozakelijk.nl (213.125.29.165)
which is in Hasselt. :-)

> 
> Something is funky on the network.

Yes. A bit of weirdness in Canada - which could be down to a fault causing 
re-routing. But the Warsaw hop, with its huge increase in latency looks like a 
misconfiguration.

Update: just tried it through a VPN that emerges in Vancouver and I also get 
the trip to Warsaw with a big increase in latency. For some reason Aorta.net 
routing some (or maybe all) traffic through Warsaw - perhaps that's where the 
NSA pay them to spy on on all US->Europe traffic? [1]

[1] Joke. (Besides, they'd never do it for traceroute packets because they'd 
want to hide their snooping.) ;-)  [2]
[2] Also a joke ;-)

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] new module installer and .tar.gz compression

2023-05-08 Thread Bruce Horrocks via ntg-context


> On 8 May 2023, at 16:20, Pablo Rodriguez via ntg-context  
> wrote:
> 
> Hans,
> 
> many thanks for the new script to install modules in LMTX.
> 
> I forced a new release of handlecsv
> (https://modules.contextgarden.net/cgi-bin/module.cgi/action=view/id=86).
> 
> I provide the contents with a git address, so I cannot choose which kind
> of compression the code will have.
> 
> Since imports from git use .tar.gz, these modules cannot be installed
> with the script (which seems to expect .zip compression exclusively).
> 
> Sorry, but I don’t know how to force git urls to be added as zip
> packages in https://modules.contextgarden.net.
> 

Use  
as the link to download as a Zip file.

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] new units

2023-05-07 Thread Bruce Horrocks via ntg-context


> On 7 May 2023, at 10:45, Hans Hagen via ntg-context  
> wrote:
> 
> ps. For those unfamiliar with the tex community, when we talk 'research' and 
> such, keep in mind that most tex related research is kind of bogus, wishful 
> thinking, sounding serious, etc. and that most 'projects' are just 
> 'activities by enthousiatic users' In the end it's all about esthetics which 
> is more about feeling and intuition and pretty much driven by user demsnds. 
> In a similar fashion most 'tex conferences' are more user meetings.


Will there be new units to represent the amount of alcohol that has to be 
imbibed in order to (a) create the joke and (b) understand it?

I'm not sure which of these needs to be the larger. Perhaps that could be the 
subject of the next research?

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] cannot generate format file with current latest

2023-04-30 Thread Bruce Horrocks via ntg-context

> On 30 Apr 2023, at 14:19, Pablo Rodriguez via ntg-context 
>  wrote:
> 
> Dear list,
> 
> I have just updated to current latest (2023.04.27 17:04).
> 
> I always delete cache with "mtxrun --generate" after an update.
> 
> When I try to create the format file with "context --make --all", I get
> the following error message:
> 
> lua error   > lua error on line 645 in file context.mkxl:
> 
> token call, execute: ...ext/base/mkxl/cldf-pos.lmt:18: attempt to index
> a nil value (global 'posit') stack traceback:
> ...ext/base/mkxl/cldf-pos.lmt:18: in local 'code'
> ...ext/base/mkiv/util-lua.lua:96: in field 'loadedluacode'
> ...ext/base/mkiv/luat-env.lua:108: in field 'luafilechunk'
> ...ext/base/mkxl/luat-cod.lmt:82: in function 'lua.registercode'
> [ctxlua]:1: in main chunk
> 
> A number should have been here; I inserted '0'. (If you can't figure out
> why I needed to see a number, look up 'weird error' in the index to The
> TeXbook.)
> 
> Could anyone confirm the issue?

No. Working fine for me on a Mac using that version, both before and after 
running "make all" and "generate".

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Problem with exponent

2023-04-28 Thread Bruce Horrocks via ntg-context


> On 28 Apr 2023, at 19:21, Fabrice Couvreur via ntg-context 
>  wrote:
> 
> Hi,
> I want to write x'² . Only, I get x²'.
> Thanks
> Fabrice
> 
> \starttext
> \m{{x'}²+{y'}²}
> \stoptext

This came up before [1]. The solution is to use \primed{...}

\starttext
\m{{x'}²+{y'}²} 
\quad
\m{\primed{x}^2+\primed{y}^2} 
\stoptext


[1] 
—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Font error in PDF using ConTeXt and Kepler typeface

2023-04-25 Thread Bruce Horrocks via ntg-context
Another check you can do is to run

  $ mtxrun --script font --list --name '--pattern=*kepler*'

and see if the file for keplerstd-light is the one you are expecting and not a 
second copy somewhere that is upsetting things.


> On 25 Apr 2023, at 21:40, lynx--- via ntg-context  wrote:
> 
> Werner:
> This is the one that I think will help the most (taken from the Fonts out of 
> Context manual, pp 147 - 148
> "If you want to use Lucida, all you have to do when you have bought the 
> fonts, is to put
> the OpenType files in a place where they can be found, for instance:
> 
> tex/texmf-fonts/fonts/data/lucida
> 
> Of course you need to run mtxrun --generate afterwards so that the files can 
> be found.
> 
> 
> 
> On 2023-04-25 12:34, lynx--- via ntg-context wrote:
>> Hello, Werner:
>> Have you tried some diagnostic tests, such as trying to get the PDF output 
>> via DVIPS? I suspect that you are, in fact, more knowledgeable and 
>> experience with ConTeXt than I am, but for what it is worth you may want to 
>> look at:
>> • \setupoutput[dvips,acrobat] (see: Context-The Manual (Hans Hagen; 
>> English, page 24))
>> • \showbodyfont[Options] (see: Not-so-short Intro to ConTeXt (J. 
>> Ataz-Lopez;English, page 114))
>> • $ mtxrun  (mtxrun  is the ConTeXt TDS Runner Tool) command from a 
>> terminal window it has has a large number of options for finding the fonts 
>> installed, and for querying their characteristics (see: Fonts out of ConTeXt 
>> (Hans Hagen, pg 52 and ff))
>> Em
>> 
>> On 2023-04-25 08:50, Werner Schmidt via ntg-context wrote:
>> Hi conTeXt folks,
>> 
>> may I ask again. How could I debug the font typesetting of PDF files with 
>> conTeXt?
>> 
>> Any help is highly appreciated.
>> 
>> Best Werner
>> 
>> On April 21, 2023 1:29:18 PM UTC, Werner Schmidt via ntg-context 
>>  wrote: Hi all,
>> 
>> I'd like to use the commercial Adobe Kepler typeface (Kepler Std - version 
>> 2.020) in conTeXt (v2023-04-15) as text (serif) font. Although the font 
>> files are loaded correctly (see log below), the generated PDF is unreadable 
>> (see attached image).
>> 
>> Notes:
>> - Only serif font (keplerstd-light.otf) is not working. It's not embedded in 
>> the generated PDF.
>> - italics and bold fonts are embedded and are rendered well
>> - Can't provide font files because Kepler is a commercial typeface
>> 
>> Do you have any ideas how to debug this issue?
>> 
>> Thanks Werner
>> 
>> log file:
>> mkiv lua stats > loaded fonts: 10 files: fontawesome6freesolid900.otf, 
>> frutigernextpro-bold.otf, frutigernextpro-regular.otf, 
>> iosevka-term-ss09-light.ttf, keplerstd-light.otf, keplerstd-lightcapt.otf, 
>> keplerstd-lightit.otf, keplerstd-semibold.otf, latinmodern-math.otf, 
>> lmroman10-regular.otf
>> mkiv lua stats > font engine: otf 3.133, afm 1.513, tfm 1.000, 30 instances, 
>> 18 shared in backend, 3 common vectors, 15 common hashes, load time 0.449 
>> seconds
>> Example:
>> 
>> This text can't be read in PDF.par
>> {it However, italics are working.}par
>> {bold Also Bold and bfem BoldItalics!}par
>> input{zapf} 

> 

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Spacing problem around decimal point

2023-03-28 Thread Bruce Horrocks via ntg-context


> On 28 Mar 2023, at 21:56, Gavin via ntg-context  wrote:
> 
> Hi Hans, Jim, Bruce, et.al.
> 
> Han’s asked me
> 
>> can you pick up a binary from:
>> 
>> https://dl.contextgarden.net/build/luametatex/work/
>> 
>> and test it?
> 
> Maybe. I picked up the binary, but testing it is not quite as easy as it 
> might be due to the MacOS security settings. I’ll see what I can do, but I 
> know very little about Unix/Darwin.
> 
> Since this appears to be an issue across multiple platforms, I’d welcome 
> anyone else checking the new binary. (Thanks, Günter!)

The x86_64-darwinlegacy from that download link version has fixed the problem 
on the Mac. Thank-you all involved.

\starttext
\startformula
v = \frac{1.32}{1.41} = 0.935
\stopformula
\stoptext

gives the attached.
—
Bruce Horrocks
Hampshire, UK


tt.pdf
Description: Adobe PDF document
___
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
___


Re: [NTG-context] natural table oddities

2023-03-27 Thread Bruce Horrocks via ntg-context
If you're asking for comments with a view to making changes then...

> On 27 Mar 2023, at 15:03, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> I would be happy about some answers/comments.
> Hraban
> 
> Am 13.03.23 um 23:26 schrieb Henning Hraban Ramm:
>> Working on the documentation for “natural tables” in my book I stumbled upon 
>> a few oddities/problems:
>> ## Addressing cells:
>> * There’s \setupTABLE[header], but not "footer" (or "section"); since we 
>> have TABLEhead and TABLEfoot, IMO "head" and "foot" would make sense.

I'd be happy with that, especially as there is already headstyle and headcolor.

>> * Row 1 is the first row of TABLEbody. I couldn’t find how to address the 
>> first line of TABLEbody.
>> * If I format a column, e.g. \setupTABLE[c][-1][color=red], body and foot 
>> are formatted, but not the same column in header. I couldn’t find how to 
>> format columns in header.

If you disregard the Wiki page instructions to use \bTH...\eTH then you can 
format the header using:

  \bTABLEhead
\bTR \bTH Column 1 \eTH \bTD[color=blue] Column 2 \eTD \eTR
  \eTABLEhead

but I'm not sure what the consequences might be, if any. You lose the default 
bold heading so maybe that's all /bTH.../eTH is adding?

It would be nice to have a way of specifying the header explicitly. My 
suggestion would be to have:
- \setupTABLE[r][head][...] affect just the header
- \setupTABLE[r][next][...] affect the new page header
- \setupTABLE[r][first|last|body][...] affect the first, or last, or only the 
body rows (i.e. not the header or footer)
- \setupTABLE[r][foot][...] affect just the footer 

[r][last] (and [r][-1]) would represent the last body row (but not the footer 
row if one has been requested).

Extending to the formatting of header/footer/next etc columns is not quite so 
neat as an extra parameter is required, e.g. [c][][head][...] to reference 
column n in the header. For consistency the syntax [c][][body][...] could be 
an option.


>> * I don’t understand the addressing options "start" and "one".

Me neither. :)

>> ## Formatting
>> * maxwidth doesn’t seem to have an effect, neither on the whole table nor on 
>> a column.
>> * textwidth works only for the whole table.
>> * width gets stretched if option=stretch; i.e. I can’t fix the width of 
>> single cells or columns.

For me, \setupTABLE [c] [1] [width=3cm] fixes the width of column 1 and forces 
long text to wrap.

I'm not sure what your \textwidth comment relates to because \setupTABLE [c] 
[1] [width=.2\textwidth] works as expected for me.


>> ## Page breaking
>> * What’s the difference between split=repeat and header=repeat ?

\setupTABLE [split=repeat] % works as expected for me
\setupTABLE [header=repeat] % doesn't work for me


>> I’d like to know if there are misunderstandings / if the behavior is 
>> intentional.

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Spacing problem around decimal point

2023-03-26 Thread Bruce Horrocks via ntg-context
I also get the incorrect spacing on a Mac.

system  > ConTeXt  ver: 2023.03.20 17:07 LMTX  fmt: 2023.3.22  int: 
english/english


> On 26 Mar 2023, at 22:16, Jim via ntg-context  wrote:
> 
> Hi all,
> 
> Regrettably, I see the same problem and Gavin.
> 
> I am using TeXlive 2023 on Slackware64 15.0, for what that is worth.
> 
> 
>Jim
> 
> On Sun, Mar 26, 2023 at 17:36 (+0200), Günter Kolousek via ntg-context wrote:
> 
> 
>> Hi,
> 
>> I can confirm that the x64_64-linux from
> 
>> https://dl.contextgarden.net/build/luametatex/work/
> 
>> version works correctly. So, no excess spaces around the
>> decimal points at all.
> 
>> HTH
>> Günter
> 
>> Hans Hagen via ntg-context @ 2023-03-26 13:22 +02:
> 
>>> On 3/26/2023 4:20 AM, Gavin via ntg-context wrote:
 Hi List,
 I’m getting strange spaces around some decimal points after a clean
 LMTX
 install. MWE:
 \starttext
 \startformula
 v = \frac{1.32}{1.41} = 0.935
 \stopformula
 \stoptext
 This produces the result attached below. The 1.32 looks fine, but
 the next two
 numbers have excess space around the decimal point. Adding the line
   \showmakeup[mathglue] %\mathspacingmode=1
 to the preamble reveals that the second and third decimal points are
 being
 treated as binary operators. It’s very strang. Are others getting
 this?
>>> can you pick up a binary from:
> 
>>> https://dl.contextgarden.net/build/luametatex/work/
> 
>>> and test it?
> 
>>> Hans
> ___
> 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
> ___

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] \setupTABLE: framecolor

2023-03-25 Thread Bruce Horrocks via ntg-context


> On 25 Mar 2023, at 05:45, jbf via ntg-context  wrote:
> 
> Hi, I am struggling with the last row of a table which, according to its 
> author, should have a black bottomframe, but gray (I am using a defined 
> 'lightgray') for the sides. The first row has a black frame. All intermediate 
> rows have gray.
> I have no difficulty achieving the first row, and the black bottomframe for 
> the last row, but I have been unable to get the last row sides to be gray. 
> Here is the current setups that I have:
> \setupTABLE[frame=off]
> \setupTABLE[row] [first] [topframe=on,bottomframe=on,style=bold]
> \setupTABLE[row][2][topframe=on]
> \setupTABLE[row][2][topframe=off,rightframe=on,leftframe=on,framecolor=lightgray]
> \setupTABLE[row][3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21][frame=on, 
> framecolor=lightgray]
> \setupTABLE[row] [last] [bottomframe=on,style=normal]
> 
> My first row is fine and all but the topframe of row 2 is 'lightgray'; all 
> following rows are 'lightgray'. The last row (22) has a black bottomframe, 
> but how could I achieve 'lightgray' for rightframe, leftframe? If I add a new 
> setup e.g. 
> \setupTABLE[row][last][rightframe=on,leftframe=on,framecolor=lightgray] then 
> I lose the bottomframe in black. I have tried all kinds of combinations but 
> unsuccessfully.
> Julian 

One way to achieve what you want is to have a dummy last row.

\setupTABLE[frame=off]
\setupTABLE[row] [first] [topframe=on,bottomframe=on,style=bold]
\setupTABLE[row][2][topframe=on]
\setupTABLE[row][2][topframe=off,rightframe=on,leftframe=on,framecolor=lightgray]
\setupTABLE[row][3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22][frame=on,
 framecolor=lightgray]
\setupTABLE[row] [last] [topframe=on,framecolor=black, height=0pt]

\starttext
\bTABLE
  \dorecurse{22}{
  \bTR\bTD Row #1 column 1 \eTD\bTD Row #1 column 2 \eTD\eTR
  }
  % Dummy last row
  \bTR \eTR
\eTABLE
\stoptext

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Problem with \stoptabulate

2023-03-21 Thread Bruce Horrocks via ntg-context
Sorry everyone, ignore me, it doesn't work.

(Got my test files mixed up - aargh!)

> On 21 Mar 2023, at 11:06, Bruce Horrocks via ntg-context  
> wrote:
> 
> 
> Thanks Julian - I tried a startstop environment originally but it didn't work.
> 
> The answer turns out to be trivial - just needed to use \long\def for 
> \stoptabulate so the following appears to work:
> 
> \def\startMyExample{\starttabulate[|r|c|l|p|]}
> \long\def\stopMyExample{\stoptabulate}  %% long def required here
> \def\MyExampleItem#1#2#3{\NC #1 \NC \rightarrow \NC #2 \NC #3 \NC\NR}
> 
> \starttext
> Here are some examples...
> 
> \startMyExample
>  \MyExampleItem{before}{after}{change before into after}
>  \MyExampleItem{straw}{gold}{Rumpelstiltskin}
> \stoptabulate
> 
> \stoptext
> 
> 
>> On 21 Mar 2023, at 05:23, jbf via ntg-context  wrote:
>> 
>> Not sure if this helps, Bruce, but there is \definestartstop
>> 
>> Julian
>> 
>> On 21/3/23 10:34, Bruce Horrocks via ntg-context wrote:
>>> I have a technical manual style document that requires a lot of examples to 
>>> be included.
>>> 
>>> They can easily be typeset with a table so I thought I would save myself 
>>> some typing by defining macros for the various bits of a tabulate table. 
>>> Thus I have:
>>> 
>>> \def\startMyExample{\starttabulate[|r|c|l|p|]}
>>> \def\stopMyExample{\stoptabulate}
>>> \def\MyExampleItem#1#2#3{\NC #1 \NC \rightarrow \NC #2 \NC #3 \NC\NR}
>>> 
>>> \starttext
>>> Here are some examples...
>>> 
>>> \startMyExample
>>>  \MyExampleItem{before}{after}{change before into after}
>>>  \MyExampleItem{straw}{gold}{Rumpelstiltskin}
>>> \stopMyExample
>>> %\stoptabulate
>>> 
>>> \stoptext
>>> 
>>> The problem is that \stopMyExample doesn't work - the \stoptabulate isn't 
>>> recognised and I get an end of file reached error. If use a straight 
>>> \stoptabulate then it works as expected. That's fine but it would be nice, 
>>> from an aesthetic point of view, to have start & stop 'paired' commands in 
>>> the source.
>>> 
>>> Presumably some sort of deep ConTeXt fu is going on - can anyone explain it 
>>> please?
>>> 
>>> Regards,
>>> —
>>> Bruce Horrocks
>>> Hampshire, UK
> 
> —
> Bruce Horrocks
> Hampshire, UK
> 
> ___
> 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
> ___


—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Problem with \stoptabulate

2023-03-21 Thread Bruce Horrocks via ntg-context

Thanks Julian - I tried a startstop environment originally but it didn't work.

The answer turns out to be trivial - just needed to use \long\def for 
\stoptabulate so the following appears to work:

\def\startMyExample{\starttabulate[|r|c|l|p|]}
\long\def\stopMyExample{\stoptabulate}  %% long def required here
\def\MyExampleItem#1#2#3{\NC #1 \NC \rightarrow \NC #2 \NC #3 \NC\NR}

\starttext
Here are some examples...

\startMyExample
  \MyExampleItem{before}{after}{change before into after}
  \MyExampleItem{straw}{gold}{Rumpelstiltskin}
\stoptabulate

\stoptext


> On 21 Mar 2023, at 05:23, jbf via ntg-context  wrote:
> 
> Not sure if this helps, Bruce, but there is \definestartstop
> 
> Julian
> 
> On 21/3/23 10:34, Bruce Horrocks via ntg-context wrote:
>> I have a technical manual style document that requires a lot of examples to 
>> be included.
>> 
>> They can easily be typeset with a table so I thought I would save myself 
>> some typing by defining macros for the various bits of a tabulate table. 
>> Thus I have:
>> 
>> \def\startMyExample{\starttabulate[|r|c|l|p|]}
>> \def\stopMyExample{\stoptabulate}
>> \def\MyExampleItem#1#2#3{\NC #1 \NC \rightarrow \NC #2 \NC #3 \NC\NR}
>> 
>> \starttext
>> Here are some examples...
>> 
>> \startMyExample
>>   \MyExampleItem{before}{after}{change before into after}
>>   \MyExampleItem{straw}{gold}{Rumpelstiltskin}
>> \stopMyExample
>> %\stoptabulate
>> 
>> \stoptext
>> 
>> The problem is that \stopMyExample doesn't work - the \stoptabulate isn't 
>> recognised and I get an end of file reached error. If use a straight 
>> \stoptabulate then it works as expected. That's fine but it would be nice, 
>> from an aesthetic point of view, to have start & stop 'paired' commands in 
>> the source.
>> 
>> Presumably some sort of deep ConTeXt fu is going on - can anyone explain it 
>> please?
>> 
>> Regards,
>> —
>> Bruce Horrocks
>> Hampshire, UK

—
Bruce Horrocks
Hampshire, UK

___
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] Problem with \stoptabulate

2023-03-20 Thread Bruce Horrocks via ntg-context
I have a technical manual style document that requires a lot of examples to be 
included.

They can easily be typeset with a table so I thought I would save myself some 
typing by defining macros for the various bits of a tabulate table. Thus I have:

\def\startMyExample{\starttabulate[|r|c|l|p|]}
\def\stopMyExample{\stoptabulate}
\def\MyExampleItem#1#2#3{\NC #1 \NC \rightarrow \NC #2 \NC #3 \NC\NR}

\starttext
Here are some examples...

\startMyExample
  \MyExampleItem{before}{after}{change before into after}
  \MyExampleItem{straw}{gold}{Rumpelstiltskin}
\stopMyExample
%\stoptabulate

\stoptext

The problem is that \stopMyExample doesn't work - the \stoptabulate isn't 
recognised and I get an end of file reached error. If use a straight 
\stoptabulate then it works as expected. That's fine but it would be nice, from 
an aesthetic point of view, to have start & stop 'paired' commands in the 
source.

Presumably some sort of deep ConTeXt fu is going on - can anyone explain it 
please?

Regards,
—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Automatic numbering of footnotes set with \note (not with \footnote)

2023-03-16 Thread Bruce Horrocks via ntg-context
I don't have the answer to your explicit question, but a work-around might be 
to put the footnotes into buffers instead of \footnotetext and then use 
/footnote[...]{\getbuffer[name]} in the body. That way ConTeXt sees them in 
order of appearance in the body and so the numbering should be as you want.

> On 15 Mar 2023, at 09:19, Joaquín Ataz López via ntg-context 
>  wrote:
> 
> Good Morning to all list members.
> 
> I am writing a document with very long footnotes, and in order not to break 
> (in the source file) the flow of the main text, instead of using the 
> \footnote macro, I introduce the footnotes using \note[label] at the point 
> where the call to the footnote should be placed, and in a separate place in 
> the source file I write the text associated to the footnote using 
> \footnotetext[label].
> 
> This works quite well and allows to create a more readable source file. There 
> is, nevertheless, a small inconvenience, and it is that when processing the 
> document ConTeXt goes numbering automatically the notes, attending to the 
> order in which they are, in the source file, the \footnotetext commands. 
> Would there be a simple way so that the automatic numbering follows the order 
> of the \note commands, and not that of \footnotetext? Maybe something with 
> \startbuffer combined with a counter?
> 
> -- 
> 
> Joaquín Ataz López
> Departamento de Derecho civil
> Universidad de Murcia

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] rotated headers in natural tables

2023-03-15 Thread Bruce Horrocks via ntg-context
\setupTABLE inherits from \setupframed which has an orientation option.

So \bTR[orientation=90] on the header row should do it, with the content 
specified normally i.e. without using \RtH.

A quick test on one of my tables showed some issues with alignment so you may 
need to fix the 'width' (now the height) of the cells rather than let it be 
calculated by contents.

> On 15 Mar 2023, at 18:15, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> Hi!
> 
> In my table, I want the header texts to be 90˚ rotated and aligned to the 
> bottom of their cell. I couldn’t find an option to do that.
> Tried \dontleavehmode or \hfill in my \RtH macro to no avail.
> Is it possible?
> 
> 
> \define[1]{\RtH}{\rotate{#1}}
> 
> \starttext
> 
> \setupTABLE[offset=3pt]
> \setupTABLE[header][background=color,backgroundcolor=yellow,align=bottom]
> \bTABLE
> \bTABLEhead
> \bTR \bTH\RtH{animal}\eTH \bTH\RtH{size}\eTH \bTH\RtH{weight}\eTH 
> \bTH\RtH{average speed}\eTH \eTR
> \eTABLEhead
> \bTABLEbody
> \bTR \bTD sparrow \eTD \bTD small \eTD \bTD light \eTD \bTD high \eTD \eTR
> \bTR \bTD dog \eTD \bTD medium \eTD \bTD medium \eTD \bTD medium \eTD \eTR
> \bTR \bTD snail \eTD \bTD small \eTD \bTD light \eTD \bTD slow \eTD \eTR
> \bTR \bTD elephant \eTD \bTD big \eTD \bTD heavy \eTD \bTD medium \eTD \eTR
> \eTABLEbody
> \eTABLE
> 
> \stoptext
> 

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] How to extend an existing macro to take optional parameters?

2023-03-14 Thread Bruce Horrocks via ntg-context


> On 14 Mar 2023, at 02:08, Alan Braslau via ntg-context  
> wrote:
> 
> Designating "optional" parameters within [...] is a LaTeX notion.
> ConTeXt handles parameters differently.
> 
> Alan

Thanks Alan but I've never used LaTeX so I've no idea what the philosophical 
differences are.

I wanted three mandatory and two optional params. One of those optional params 
is not typeset so I assumed it should be [ ] delimited and not { }.

> 
>>> and I'd like to be able to extend it so that any of the following
>>> can be used:
>>> 
>>>   \mycommand{aa}{bb}{cc}
>>>   \mycommand{aa}{bb}{cc}{dd}
>>>   \mycommand{aa}{bb}{cc}{dd}[ee]
>>> 
>>> or
>>> 
>>>   \mycommand[ee]{aa}{bb}{cc}{dd}  % if this is more the ConTeXt way
>>> 
>>> where {dd} is the optional extra parameter and, if it is present,
>>> then [ee] can also be optionally added (because it controls how
>>> {dd} is printed).

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] How to extend an existing macro to take optional parameters?

2023-03-14 Thread Bruce Horrocks via ntg-context


> On 13 Mar 2023, at 21:39, Hans Hagen via ntg-context  
> wrote:
> 
> On 3/12/2023 2:24 PM, Bruce Horrocks via ntg-context wrote:
>> I have an existing macro that I'd like to extend.
>> The current definition is \define[3]\mycommand{...} which I'd like to extend 
>> to take an optional 4th parameter plus an optional setup parameter.
>> Thus I currently invoke it as:
>>   \mycommand{aa}{bb}{cc}
>> and I'd like to be able to extend it so that any of the following can be 
>> used:
>>   \mycommand{aa}{bb}{cc}
>>   \mycommand{aa}{bb}{cc}{dd}
>>   \mycommand{aa}{bb}{cc}{dd}[ee]
>> or
>>   \mycommand[ee]{aa}{bb}{cc}{dd}  % if this is more the ConTeXt way
>> where {dd} is the optional extra parameter and, if it is present, then [ee] 
>> can also be optionally added (because it controls how {dd} is printed).
>> If it helps, the actual body of the macro can easily be a call to Lua so 
>> it's fine if the function takes 5 params where 4 and 5 can be nil or empty 
>> strings.
>> I've trawled through syst-aux.mkiv but it only covers optional numbers of [ 
>> ] or { } but not combinations of both (which given the vast numbers of 
>> combinations is perhaps not surprising!). Have I missed something obvious 
>> that would help me?
> So, four optional with mandate {} plus a fallback to an optional []
> 
> \starttext
> 
> \tolerant\def\mycommand#=#=#=#=#:[#5]%
>  {\ifparameter#1\or(1:#1)\fi
>   \ifparameter#2\or(2:#2)\fi
>   \ifparameter#3\or(3:#3)\fi
>   \ifparameter#4\or(4:#4)\fi
>   \ifparameter#5\or[5:#5]\fi}
> 
> \startbuffer
> \mycommand{aa}{bb}{cc}
>  \mycommand{aa}{bb}{cc}{dd}
>  \mycommand{aa}{bb}{cc}{dd}[ee]
> \mycommand{aa}{bb}{cc}
>  \mycommand{aa}{bb}{cc}{dd}
>  \mycommand{aa}{bb}{cc}{dd}[ee]
> \stopbuffer
> 
> \typebuffer
> 
> \startlines \getbuffer \stoplines
> 
> \stoptext
> 
> I'm not saying that it's the best solution, you can add \protected in front 
> of the \def if needed.
> 
> Hans

Thanks Hans,

This works well. I'll try and add something to the Wiki but I don't understand 
how #: does what it does.

Regards,
—
Bruce Horrocks
Hampshire, UK

___
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] How to extend an existing macro to take optional parameters?

2023-03-12 Thread Bruce Horrocks via ntg-context
I have an existing macro that I'd like to extend.

The current definition is \define[3]\mycommand{...} which I'd like to extend to 
take an optional 4th parameter plus an optional setup parameter.

Thus I currently invoke it as:

  \mycommand{aa}{bb}{cc}

and I'd like to be able to extend it so that any of the following can be used:

  \mycommand{aa}{bb}{cc}
  \mycommand{aa}{bb}{cc}{dd}
  \mycommand{aa}{bb}{cc}{dd}[ee]

or

  \mycommand[ee]{aa}{bb}{cc}{dd}  % if this is more the ConTeXt way 

where {dd} is the optional extra parameter and, if it is present, then [ee] can 
also be optionally added (because it controls how {dd} is printed).

If it helps, the actual body of the macro can easily be a call to Lua so it's 
fine if the function takes 5 params where 4 and 5 can be nil or empty strings.

I've trawled through syst-aux.mkiv but it only covers optional numbers of [ ] 
or { } but not combinations of both (which given the vast numbers of 
combinations is perhaps not surprising!). Have I missed something obvious that 
would help me?

Regards,
—
Bruce Horrocks
Hampshire, UK

___
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] Aaligned numbers in a matrix?

2023-02-26 Thread Bruce Horrocks via ntg-context
I'm using the following MWE to produce a matrix:

\definemathmatrix[bmatrix]
  [matrix:brackets]
  [simplecommand=bmatrix]
\starttext
$ a \rightarrow
  \bmatrix{1, 2, 3, 4; 
   2, 1, 4, 3;
   3,-4, 1,-2;
   4,-3, 2,-1} $
\stoptext

The columns with negative numbers in are centred and I would rather have them 
right-aligned so that the digits stack up above each other and the negative 
signs stick out to the left, so to speak. Is there an easy way to achieve this?

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Chapter cover page

2023-02-23 Thread Bruce Horrocks via ntg-context
Hi Alex,

I couldn't get it to work with \tabulate so I switched to TABLE instead. The 
workaround for the horizontal mode problem is to put the chapter title into row 
two of the table. Hopefully this works with your actual text. Also I'm not sure 
where \layoutcolumnwidth is coming from so I just hard-coded a width for now. 
Lastly there are neater ways (using \setuptable) to define the table but it's 
just an example...

\define[2]\MyChapter{
   \bTABLE[frame=off]
   \bTR
 \bTD[width=4cm] \structureuservariable{author} \eTD
 \bTD \structureuservariable{bio} \eTD
   \eTR
   \bTR
 \bTD[nc=2] #1 #2 \eTD
   \eTR
   \eTABLE
}

\definehead[interview][chapter]
\setuphead[interview][
   page=right,
   command=\MyChapter,
   % insidesection={\page},
   style={\tfa},
]

\starttext
\startinterview[title={My Interview}][
   author={Jane Doe},
   year={2022},
   month={Decembre},
   bio={\input ward}
]

\dorecurse{10}{\input ward \crlf}
\stopinterview
\stoptext


> On 23 Feb 2023, at 10:21, Alex Leray via ntg-context  
> wrote:
> 
> Hello,
> 
> I'm trying to figure out how to design a chapter page for a custom head 
> section with uservariables defined.
> 
> I'd like to have the chapter page start on a right page. I'd like this page 
> to feature the title of the chapter (here: an interview) along with some 
> other info like the interviewee name and bio. All in a "fancy" layout.
> 
> I'm having issue putting it all together. The command parameter allow me to 
> override the content of the title but has some drawbacks (it seems to be 
> stuck in horizontal mode for instance).
> 
> I'm open to any solution but would find it nice to keep the 
> \startstopinterview structure.
> 
> Here is my code at the moment:
> 
> %%%
> 
> \define[2]\MyChapter{
>\starttabulate[|p(\layoutcolumnwidth)|p(\layoutcolumnwidth)|]
>\NC \structureuservariable{author} \NC \structureuservariable{bio} \NR
>\stoptabulate
> }
> 
> \definehead[interview][chapter]
> \setuphead[interview][
>page=right,
>command=\MyChapter,
>% insidesection={\page},
>style={\tfa},
> ]
> 
> 
> \starttext
> \startinterview[title={My Interview}][
>author={Jane Doe},
>year={2022},
>month={Decembre},
>bio={\input ward}
> ]
> 
> \dorecurse{10}{\input ward \crlf}
> \stopinterview
> \stoptext
> 
> %%%
> 
> Many thanks
> 
> ___
> 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
> ___

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] How to prevent \subject from being the last line

2023-02-19 Thread Bruce Horrocks via ntg-context


> On 19 Feb 2023, at 19:34, Sylvain Hubert via ntg-context  
> wrote:
> 
> Dear list,
> 
> I have a long document (A4 * 170 pages) with some CJK fonts, where some of 
> the \subject{...} are placed at the end of the corresponding pages, which 
> looks awkward. How can one flush those last-line titles to the next pages?
> 
> Currently I don't have a MWE, as trivial filling-up with 1-2 pages of \lipsum 
> doesn't reproduce the problem. I'm optimistically asking without MWE, but if 
> it is necessary anyway, please tell me and I will obfuscate the 170-page 
> document and find a way to upload it.

\testpage[...] might help.



—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Problem using \scale

2023-02-10 Thread Bruce Horrocks via ntg-context

> On 10 Feb 2023, at 09:20, Hans Hagen via ntg-context  
> wrote:

[snip]

Thank-you Hans, these work great - so well in fact that now I've seen the 
output I've come to the conclusion that the scaled text would be too small and 
what I should really do is flag the one or two addresses in our mailing list 
that have long lines and print them on larger labels in a separate run. :-)

—
Bruce Horrocks
Hampshire, UK

___
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] Problem using \scale

2023-02-09 Thread Bruce Horrocks via ntg-context
I'm printing address labels. Sometimes an address has a long line that is too 
long to fit on the label with the result that it wraps. Instead of wrapping, I 
thought it would be nice to try and auto-scale the label and shrink it so that 
the long line just fits.

I'm using \crlf to break the address into lines and this doesn't play well with 
the \scale command, see MWE below, where the second frame is just one long line 
as the \crlf's seem to be ignored.

Is there a simple solution that allows \crlf and also scale?

\starttext
\startbuffer[address]
Name \crlf
Address 1 \crlf
A long line that wraps \crlf
Town \crlf
Postcode
\stopbuffer
\framed[width=3cm,align=flushleft]{\getbuffer[address]}
\framed[width=3cm,align=flushleft]{\scale[factor=fit]{\getbuffer[address]}}
\stoptext


—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Iwona error

2023-02-06 Thread Bruce Horrocks via ntg-context


> On 6 Feb 2023, at 22:16, Hans Hagen via ntg-context  
> wrote:
> 
> On 2/6/2023 9:57 PM, Bruce Horrocks via ntg-context wrote:
>> Just installed today's update (ConTeXt  ver: 2023.02.06 17:58 LMTX) and 
>> tried out the 3 fonts mentioned.
>> \setupbodyfont[iwona]
>> % \setupbodyfont[kurier]
>> % \setupbodyfont[antykwa]
>> \starttext
>> Some text
>> \stoptext
>> I did a ./install.sh update with no obvious errors and afterwards Kurier and 
>> Antykwa worked for me on the above MWE but Iwona failed with the log entry:
>> [snip]
>> luatex warning  > font: lua-loaded font '21' with name 'ex-iwonar' has no 
>> characters
>> fonts   > virtual math > the mapping is incomplete for 'iwonamath' 
>> at 7pt
>> tex error   > tex error on line 1 in file ./tt.tex:
>> lua error:
>> registered function call [1154]: 
>> ...-64/tex/texmf-context/tex/context/base/mkxl/math-vfu.lmt:677: attempt to 
>> index a nil value (local 'fci')
>> stack traceback:
>> ...-64/tex/texmf-context/tex/context/base/mkxl/math-vfu.lmt:677: in upvalue 
>> 'virtualize'
>> ...-64/tex/texmf-context/tex/context/base/mkxl/math-vfu.lmt:1014: in 
>> function <...-64/tex/texmf-context/tex/context/base/mkxl/math-vfu.lmt:725>
>> (...tail calls...)
>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:485: in field 
>> 'read'
>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1377: in 
>> function <...-64/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1234>
>> (...tail calls...) 
>> [snip]
>> Not sure if that's to do with my setup or true for everyone. I've never used 
>> those fonts before if that makes a difference.
> can you try with
> 
> https://github.com/contextgarden/context-distribution-fonts/blob/main/fonts/data/gust/iwona-math/ex-iwona.enc
> 
> wipe the font cache first

Yes, that worked. Thanks.

—
Bruce Horrocks
Hampshire, UK

___
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] Iwona error

2023-02-06 Thread Bruce Horrocks via ntg-context
Just installed today's update (ConTeXt  ver: 2023.02.06 17:58 LMTX) and tried 
out the 3 fonts mentioned.

\setupbodyfont[iwona]
% \setupbodyfont[kurier]
% \setupbodyfont[antykwa]
\starttext
Some text
\stoptext

I did a ./install.sh update with no obvious errors and afterwards Kurier and 
Antykwa worked for me on the above MWE but Iwona failed with the log entry:

[snip]
luatex warning  > font: lua-loaded font '21' with name 'ex-iwonar' has no 
characters
fonts   > virtual math > the mapping is incomplete for 'iwonamath' at 
7pt
tex error   > tex error on line 1 in file ./tt.tex: 

lua error:

registered function call [1154]: 
...-64/tex/texmf-context/tex/context/base/mkxl/math-vfu.lmt:677: attempt to 
index a nil value (local 'fci')
stack traceback:
...-64/tex/texmf-context/tex/context/base/mkxl/math-vfu.lmt:677: in 
upvalue 'virtualize'
...-64/tex/texmf-context/tex/context/base/mkxl/math-vfu.lmt:1014: in 
function <...-64/tex/texmf-context/tex/context/base/mkxl/math-vfu.lmt:725>
(...tail calls...)
...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:485: in 
field 'read'
...-64/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1377: in 
function <...-64/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1234>
(...tail calls...)  
[snip]

Not sure if that's to do with my setup or true for everyone. I've never used 
those fonts before if that makes a difference.

—
Bruce Horrocks
Hampshire, UK

___
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] A corner case relating to corners!

2023-02-04 Thread Bruce Horrocks via ntg-context
In the Wiki  the examples 
for corner styles 00 - 09 no longer work and the single digit values 0 - 9 need 
to be used instead. (Styles 10 upwards continue to work as per the page.)

Is this a deliberate change and the Wiki needs to be updated or should the 
change be reverted for backwards compatibility?

MWE:

\starttext
\framed[corner=7]{Some text}
\stoptext

With value 07 the frame doesn't display, with value 7 the frame appears as 
expected. (Readers with a long-haired white cat can try corner=007) ;-)

Version: ConTeXt  ver: 2023.01.26 18:34 LMTX
—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] footnotes by paragraph?

2023-01-28 Thread Bruce Horrocks via ntg-context
On 28 Jan 2023, at 02:14, jbf via ntg-context  wrote:
> 
> Here's a tricky one (for me) that I haven't been able to work out. I am 
> dealing with a set of constitutions that I am organizing with a paragraph 
> definition 
> \defineparagraphs[Two][n=2]
> \setupparagraphs[Two][1][width=.2\textwidth,style=\bfx,after={\blank},align=flushleft]
> \setupparagraphs[Two][2][width=.77\textwidth,style=normal,after={\blank}]
> But I need to get the footnotes (which all apply to [2] in each article of 
> the constitutions) to come beneath my defined 'Two'. I do not want them to 
> come at the bottom of the page.
> I thought I might be able to do it by placing \start...stopTwo within a 
> \start...stopsection and defining \setupnotation[way=bysection] but that is 
> not working.
> Any thought on how I could approach this?
> Julian 

Does this help?

\defineparagraphs[Two][n=2]
\setupparagraphs[Two][1][width=.2\textwidth,style=\bfx,after={\blank},align=flushleft]
\setupparagraphs[Two][2][width=.77\textwidth,style=normal,after={\blank}]

\starttext
\startTwo
The role of the Committee
\Two
The role of the Committee\endnote{See a dictionary if you want to know what a 
committee is!} is very important.
Some more text.
\stopTwo
\startTwo
The Chairman
\Two
The role of the Chairman...
\stopTwo
\startTwo
~
\Two
\placenotes[endnote]

\stopTwo
\input knuth
\stoptext


—
Bruce Horrocks
Hampshire, UK

—
Bruce Horrocks
Hampshire, UK

___
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] Printing mailing list labels

2023-01-25 Thread Bruce Horrocks via ntg-context
If you've ever struggled with Word's or (worse) LibreOffice's mail merge 
features to print a mailing list onto sticky labels then this might be of 
interest.

I've created some macros and an example file showing how to print address 
labels on Avery L7160 paper (which is 7 rows of 3 labels on A4) and uploaded 
them here.


Features:
- full control over label content (can even differ from one label to the next 
if necessary)
- easily use up a part-used sheet of labels to avoid waste
- read address data from a CSV file
- easily support different address formats for different international 
destinations
- option to preview on plain paper
- even label your labels in the page header so you remember why you printed 
them!


No licence - the files are placed in the public domain. Feedback welcome.
—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Minor bug in Lua or ConTeXt

2023-01-18 Thread Bruce Horrocks via ntg-context
Thanks Hans.

Before Pablo spends too much effort on the wiki it's worth pointing out that 
this only happened because I was in-line documenting the Lua function that I 
had written and wanted to name the ConTeXT macro that would invoke it - so it's 
trivial for me to avoid this error.

Perhaps the Wiki only needs to point out that if you get a Lua related error 
and the error log lists the entire contents of \startluacode ... \stopluacode 
then a possible source of the error is a \command somewhere in there?

Regards,


> On 18 Jan 2023, at 09:48, Hans Hagen via ntg-context  
> wrote:
> 
> On 1/18/2023 12:36 AM, Bruce Horrocks via ntg-context wrote:
>> ConTeXt  ver: 2023.01.04
>> The following MWE won't compile because of the \dummycommand line even 
>> though it is a comment. Not sure whether it's a minor bug or an unavoidable 
>> aspect of allowing embedded Lua.
>> \startluacode
>> -- \dummycommand
>> \stopluacode
>> \starttext
>> Hello
>> \stoptext
> 
> a bang-head-against-the-wall case:
> 
> \let\dummycommand\relax
> 
> \startluacode
> -- \dummycommand
> \stopluacode
> \starttext
> Hello
> \stoptext
> 
> or:
> 
> \ifdefined\dummycommand \else \let\dummycommand\relax \fi
> 
> a document-on-the-wiki challenge for Pablo
> 
> 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
> ___

—
Bruce Horrocks
Hampshire, UK

___
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] Minor bug in Lua or ConTeXt

2023-01-17 Thread Bruce Horrocks via ntg-context
ConTeXt  ver: 2023.01.04

The following MWE won't compile because of the \dummycommand line even though 
it is a comment. Not sure whether it's a minor bug or an unavoidable aspect of 
allowing embedded Lua.

\startluacode
-- \dummycommand
\stopluacode
\starttext
Hello
\stoptext

—
Bruce Horrocks
Hampshire, UK

___
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: Adobe releases the original PostScript interpreter software as open source

2022-12-19 Thread Bruce Horrocks via ntg-context
A bit off topic but some might be interested...

Adobe have released the PostScript interpreter source code as open source.

Press release here


and a blog post with the background to PostScript here


Regards,
—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Page break with placement of a figure at the bottom of the page

2022-11-11 Thread Bruce Horrocks via ntg-context

> On 10 Nov 2022, at 17:06, Fabrice Couvreur via ntg-context 
>  wrote:
> 
> Hi,
> Sorry to come back to you, but it seems to me that there is enough space here.
> Fabrice

For some reason your PNG images came through in extremely low resolution. 
Without having the ConTeXt source it's hard to say for sure what's happening - 
for example, I would have expected the text on the second page to be at the 
bottom of the first even if there wasn't room for the image - because that was 
what was happening in your first example. 

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Page break with placement of a figure at the bottom of the page

2022-11-09 Thread Bruce Horrocks via ntg-context
On 9 Nov 2022, at 18:22, Pablo Rodriguez via ntg-context  
wrote:
> 
> On 11/9/22 17:51, Fabrice Couvreur via ntg-context wrote:
>> Hi,
>> I find that for some time (but maybe the problem comes from me !), the
>> placement of a figure at the bottom of the page causes a page break when
>> it seems to me that there is enough space, which poses some problems in
>> the pagination of my documents.
> 
> Hi Fabrice,
> 
> your figure requires about 7¼ lines (one line before, six for the image
> itself, and some extra space after it).
> 
> Your layout for the first page only allows 43 lines and sample text ends
> on line 37.
> 
> Replace \showframe with \showgrid and you will see that there might be
> not enough space to fit the image in the first page.
> 
> Add "bottomspace=7.25mm" to the layout for the first page and the image
> will fit in the first page.
> 
> Just in case it might help,

Or Pablo's answer shown another way... change the end of the example to:

\starttext
\dorecurse{11}{\input ward}
\placerecipe{}{\externalfigure[dum]}
\dorecurse{5}{\input ward} %% extra
\stoptext

and the extra text shows how much space the image requires. Holding a ruler up 
to the screen you can see that it won't fit.

The problem seems to be that the image is reserving space for a caption even 
though there isn't a caption. A work-around is to change \setupfloat to the 
following:

 \setupfloat
 [recipe]
 [default={right,none,high}]

and then the image fits as you want it to.
—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] \setuparranging values for perfect bound A5 on A3?

2022-10-09 Thread Bruce Horrocks via ntg-context


> On 9 Oct 2022, at 02:58, Max Chernoff  wrote:
> 
> 
> Hi Bruce,
> 
>> I have a book to be perfect bound[1] and I'm trying to work out what
>> imposition to use.
>> 
>> The printer would like 4 A5 pages laid out on A3 e.g.
>> 
>> +---+---+
>> |   |   |
>> | a | b |
>> |   |   |
>> +---+---+
>> |   |   |
>> | c | d |
>> |   |   |
>> +---+---+
>> 
>> so that he can cut the paper and simply stack a, b, c, & d on top of
>> each other and then put them in the binding machine[2].
>> 
>> If the book is 40 pages long, say, then stack 'a' has page 1 on the
>> top, page 2 on the reverse, then the next sheet has page 3 and 4, and
>> so on down to the last sheet which has page 9 on the front and page 10
>> on the back. Stack 'b' would have page 11 on the front, 12 on the back
>> and so on, so that each stack has a quarter of the book.
>> 
>> Is this something LMTX can do and if so what combination of
>> \setuplayout and \setuppaper do I need to use? If they can be printed
>> in reverse order then great but I assume the printer can do that
>> fairly easily.
> 
> I don't think that there's any way to do this from within a document
> run, so I think that you'll need to use an external program.
> 
>> If not, is there a recommended external program that can do it?
> 
> But, you can use ConTeXt as the external program here. 
> 
> Save as "imposition.cld":
> 
>   local filename = document.getargument("filename")
>   local pdf = lpdf.epdf.image.open(filename)
>   local pages = pdf.nofpages
>   local max = math.ceil(pages / 4)
> 
>   context.setuppapersize({ "A5" }, { "A3" })
>   context.setuppaper { nx = 2, ny = 2 }
>   context.setuparranging { "XY" }
> 
>   local function insert_page(n)
>   context.startpagemakeup()
>   context.filterpages({ filename }, { n })
>   context.stoppagemakeup()
>   end
> 
>   context.starttext()
>   for i = 1, max do
>   if i % 2 == 1 then
>   insert_page(i + 0 * max)
>   insert_page(i + 1 * max)
>   insert_page(i + 2 * max)
>   insert_page(i + 3 * max)
>   else
>   insert_page(i + 1 * max)
>   insert_page(i + 0 * max)
>   insert_page(i + 3 * max)
>   insert_page(i + 2 * max)
>   end
>   end
>   context.stoptext()
> 
> Then run:
> 
>   context imposition.cld --filename=document.pdf
> 
> where "document.pdf" is replaced by your document name.
> 
> I'm not sure if I got your desired output quite right here, but
> hopefully you can easily modify the script if something isn't quite
> right.

Thank-you Max - that is exactly what I wanted and your code worked first time. 
:)

—
Bruce Horrocks
Hampshire, UK

___
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] \setuparranging values for perfect bound A5 on A3?

2022-10-08 Thread Bruce Horrocks via ntg-context
I have a book to be perfect bound[1] and I'm trying to work out what imposition 
to use.

The printer would like 4 A5 pages laid out on A3 e.g.

+---+---+
|   |   |
| a | b |
|   |   |
+---+---+
|   |   |
| c | d |
|   |   |
+---+---+

so that he can cut the paper and simply stack a, b, c, & d on top of each other 
and then put them in the binding machine[2].

If the book is 40 pages long, say, then stack 'a' has page 1 on the top, page 2 
on the reverse, then the next sheet has page 3 and 4, and so on down to the 
last sheet which has page 9 on the front and page 10 on the back. Stack 'b' 
would have page 11 on the front, 12 on the back and so on, so that each stack 
has a quarter of the book.

Is this something LMTX can do and if so what combination of \setuplayout and 
\setuppaper do I need to use? If they can be printed in reverse order then 
great but I assume the printer can do that fairly easily. If not, is there a 
recommended external program that can do it?

I've tried \setuplayout[4*2] and XY with 2x2 but neither output is what I need.

Thanks in advance.

[1] glued spine (if that term isn't used outside the UK)
[2] I'm sure it's actually harder than that. :-)

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] TOC colors and in-page anchors

2022-09-28 Thread Bruce Horrocks via ntg-context


> On 28 Sep 2022, at 09:18, Sylvain Hubert via ntg-context  
> wrote:
> 
> Dear list,
> 
> \usemodule[ipsum]
> \setupinteraction[state=start]
> 
> \starttext
> \completecontent
> \section{s1}\ipsum
> \section{s2}\ipsum
> \section{s3}\ipsum
> \section{s4}\ipsum
> \section{s5}\ipsum
> \section{s6}\ipsum
> \stoptext
> 
> In the table of contents, s1 and s2 (at page 1) are rendered in red, while 
> others in green.
> 
> Moreover, when I click s4, it jumps to page 2 without locating the section 
> precisely within the page.
> This is not the case when using the latex hyperref package.
> 
> Does anyone know how to make the colors uniform and the links precise?
> 
> Any help is appreciated.

The colour change is because those links are on the same page that you are 
jumping to. When you have more text in your document they will be consistent. 
You can override the colors with \setupinteraction[state=start,color=black] for 
example if you wish.

You need focus=standard to jump direct but only when the viewer is in scrolling 
mode. It's explained on the Wiki.


—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Spacing in \unit

2022-09-25 Thread Bruce Horrocks via ntg-context


> On 25 Sep 2022, at 14:30, Gavin via ntg-context  wrote:
> 
> Hello list,
> 
> I have a few questions about space produced by the unit command. Consider 
> this MWE
> 
> \starttext
> \unit{3.00e8 kg m/s}
> 
> $\unit{3.00e8 kg m/s}$
> \stoptext
> 
> The dot between “kg” and “m” has different spacing depending on whether the 
> \unit command is in text or math mode. I think that the tighter spacing in 
> the first one, in text, is correct.
> 
> I personally would also like less space around the \times. To me, the number 
> 3.00e8 should be typeset more like a single number, rather than like a 
> product of 3.00 and 10^8. I am probably in the minority here. If \unit and 
> \digit had an option for tighter spacing around the \times, I’d use it, but 
> the current output with more space is probably what most people expect and 
> want. Perhaps something like [scispace=tight].

I too would prefer less space around the times e.g. \starttext 3.00×10\high{8} 
\stoptext is fine (except for the 8 which is nicer in \unit).

—
Bruce Horrocks
Hampshire, UK

___
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] Is there an "align with item on facing page" option?

2022-09-25 Thread Bruce Horrocks via ntg-context
Is there a way to align text with an item on the facing page?

I'm typesetting author biographies for a book and I'm doing two per page. The 
author's name appears on a line of its own in \tfa size and then the bio text 
follows. Ideally I'd like their names aligned so that all four (on a two page 
spread) appear nicely symmetrical.

Currently I'm using \godown[\dimexpr80mm-\pagetotal] (for A5 pages) between 
each pair which works nicely in that if the first biography is too long it 
overlaps and I know to edit it to be shorter.

However, if the second biography is a little long, it pushes the first back up 
the page a little - maybe only one line - and then it no longer aligns with the 
the one on the facing page. If I could somehow tell ConTeXt to vertically align 
the author names then that might do the job?

I've tried using two frames above each other with fixed min and maxheight but 
then I can't get the author's thumbnail picture to place properly and have the 
text wrap around it.

Any thoughts?
—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] PDF viewer

2022-09-23 Thread Bruce Horrocks via ntg-context
On 23 Sep 2022, at 08:59, Henning Hraban Ramm via ntg-context 
 wrote:
> 
> Unfortunately, Firefox doesn’t register itself as a PDF viewer (at least on 
> MacOS), that means I can’t use it easily to open a PDF from the command line 
> (e.g. in scripts).

The following works for me in Monterey on an Intel Mac:

$ /Applications/Firefox.app/Contents/MacOS/firefox test.pdf  

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Quick way to proofread / check index entries?

2022-09-04 Thread Bruce Horrocks via ntg-context


> On 3 Sep 2022, at 19:51, Bruce Horrocks via ntg-context  
> wrote:
> 
> My own fault for not thinking head :-) but I have a largeish text with a lot 
> of \index{...} entries. To make life easier for the proofreader I would like 
> to temporarily redefine \index to wrap it or replace it with something that 
> will highlight indexed items in the text where they occur, e.g. change their 
> colour.
> 
> I could do this with a global find and replace (across many files) to replace 
> \index with \MyIndex, say, and then define a \MyIndex that understands the 
> various parameter options but this is a hassle. Before I do this, is there 
> anything already pre-built?
> 
> The ultimate aim is to enable a proofreader to see each indexed term where it 
> appears in order to judge whether the term deserves to be in the index at 
> all. (Working backwards from the index itself is possible but clicking a page 
> number, trying to find the term on the page, then reading the context to make 
> a decision is quite hard work - much easier to read through and deal with the 
> terms as they appear.)

Thanks for the suggestions Richard and Mikael.

For the benefit of the list I went with the following quick'n'dirty™ approach 
which will be good enough:

\def\index{\dosingleempty\debugIndex}
\def\debugIndex[#1]#2{%
  \iffirstargument
\null% Ignore it for now
  \else
\inmargin[color=blue,stack=yes,style=ssxx]{#2}%
  \fi
}

\def\startregister{\dotripleempty\debugStartRegister}
\def\debugStartRegister[#1][#2][#3]#4{%
\inmargin[color=darkgreen,stack=yes,style=ssxx]{↓ #2}%
}

\def\stopregister[#1][#2]{\inmargin[color=darkred,stack=yes,style=ssxx]{↑ #2}}

—
Bruce Horrocks
Hampshire, UK

___
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] Quick way to proofread / check index entries?

2022-09-03 Thread Bruce Horrocks via ntg-context
My own fault for not thinking head :-) but I have a largeish text with a lot of 
\index{...} entries. To make life easier for the proofreader I would like to 
temporarily redefine \index to wrap it or replace it with something that will 
highlight indexed items in the text where they occur, e.g. change their colour.

I could do this with a global find and replace (across many files) to replace 
\index with \MyIndex, say, and then define a \MyIndex that understands the 
various parameter options but this is a hassle. Before I do this, is there 
anything already pre-built?

The ultimate aim is to enable a proofreader to see each indexed term where it 
appears in order to judge whether the term deserves to be in the index at all. 
(Working backwards from the index itself is possible but clicking a page 
number, trying to find the term on the page, then reading the context to make a 
decision is quite hard work - much easier to read through and deal with the 
terms as they appear.)

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] metafun paralleled does not give a parallel path

2022-08-25 Thread Bruce Horrocks via ntg-context
I'm seeing the line + arcs behaviour here.

ConTeXt  ver: 2022.08.05 11:44 LMTX  fmt: 2022.8.5  int: english/english


> On 25 Aug 2022, at 13:03, Fabrice L via ntg-context  
> wrote:
> 
> Hi,
> 
>> Le 24 août 2022 à 22:50, fv leung via ntg-context  a 
>> écrit :
>> 
>> The following used to produce three parallel lines.
>> Now it produces one straight line and two arcs.
>> 
>> \starttext
>> 
>> \startMPcode
>>   z0 = origin;
>>   z1 = 72dir(45);
>>   dotlabel.bot("z0", z0);
>>   draw z0--z1;
>>   draw (z0--z1) paralleled -15 withcolor red;
>>   draw (z0--z1) paralleled 15 withcolor blue;
>> \stopMPcode
>>   
>> \stoptext
> 
> Your code produce three perfect parallels lines here, see attached pdf. 
> F.
> 
> 

—
Bruce Horrocks
Hampshire, UK

___
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] Bug (?) with \placefigure[right]

2022-08-16 Thread Bruce Horrocks via ntg-context
Things start to go awry after about 5 or 6 iterations, 12 shows it up clearly 
with three or so nearly blank (except for the subject) pages produced.

\setuppapersize [A5] [A5]
\starttext
\dorecurse{12}{
\subject{Some heading}
\placefigure[right] {} {\externalfigure[cow.pdf] [width=3cm]}
\input lorem
}
\stoptext

I actually want \placefigure[right,none] in my real doc but that also goes awry.
LMTX current version: 2022.08.05 11:44

My actual requirement is to have a set of short biographies, including a small 
'passport' photo, for each contributor to a book. So any suggestions on how to 
wrap text around the photo that avoids this issue would be welcome.
—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] How can I make a Gentoo Linux package for ConTeXt LMTX?

2022-08-15 Thread Bruce Horrocks via ntg-context


> On 15 Aug 2022, at 13:19, amano.kenji  wrote:
> 
> I was trying to translate instructions in install.sh and dependencies of 
> install.sh into shell commands in a Gentoo Linux package.
> 
> Gentoo Linux downloads all dependencies and builds a package in a network 
> namespace where there is no internet access.

If you must use a Linux that makes life hard... ;-)

I'm guessing you're trying to prepare ConTeXt for use in a private repository 
on a LAN so that your users can install it without needing Internet access?

ConTeXt only depends on glibc (iirc) - and it assumes it is present already. So 
do an install on a machine that does have Internet access and everything you 
need will then be self-contained in the directory you chose to install into. 
Zip up that directory and use it for subsequent installs as many times as you 
want just by unzipping it - no further Internet access required.

You'll need to set up the PATH for where you unzipped the file - but the 
install.sh file has the necessary information towards the end.

Try it and see - it's not like typical modern bloatware that pulls down 100's 
of Gbytes of dependencies willy-nilly.

> 
> Thus, install.sh cannot be directly used in a gentoo linux package. I have to 
> translate instructions used in install.sh into shell commands.
> 
> How can I do that? Can I somehow execute mtx-install.lua, mtxrun.lua, or 
> mtxrun in a way that doesn't require internet access?
> 
> --- Original Message ---
> On Monday, August 15th, 2022 at 12:12 PM, Bruce Horrocks  
> wrote:
> 
> 
>>> On 15 Aug 2022, at 13:03, amano.kenji via ntg-context ntg-context@ntg.nl 
>>> wrote:
>>> 
>>> TexLive has texmfcnf.lua that doesn't really work with texlive-context 
>>> installed by linux distributions.
>>> 
>>> Arch Linux has its own patched version of texmfcnf.lua.
>>> 
>>> It seems I'd be better off with a linux package for ConTeXt LMTX.
>>> 
>>> How can I build and install ConTeXt LMTX on Gentoo Linux or any linux 
>>> distribution?
>>> 
>>> I wish it was as simple as ./configure, make, and make install.
>> 
>> 
>> Install instructions for LMTX on Linux are here:
>> https://wiki.contextgarden.net/Installation
>> 
>> 
>> It's pre-built so there are no make steps.
>> 
>> Try it and ask again if you have problems. :-)
>> 
>> —
>> Bruce Horrocks
>> Hampshire, UK

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] How can I make a Gentoo Linux package for ConTeXt LMTX?

2022-08-15 Thread Bruce Horrocks via ntg-context


> On 15 Aug 2022, at 13:03, amano.kenji via ntg-context  
> wrote:
> 
> TexLive has texmfcnf.lua that doesn't really work with texlive-context 
> installed by linux distributions.
> 
> Arch Linux has its own patched version of texmfcnf.lua.
> 
> It seems I'd be better off with a linux package for ConTeXt LMTX.
> 
> How can I build and install ConTeXt LMTX on Gentoo Linux or any linux 
> distribution?
> 
> I wish it was as simple as ./configure, make, and make install.

Install instructions for LMTX on Linux are here:


It's pre-built so there are no make steps.

Try it and ask again if you have problems. :-)

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Changing the caption on a split table

2022-08-13 Thread Bruce Horrocks via ntg-context


> On 3 Aug 2022, at 00:26, Bruce Horrocks via ntg-context  
> wrote:
> 
> I have a 5-page table placed using
> 
> \setupcaption [table] [way=bytext,prefixsegments=none]
> \placetable[split]{My long table}{...}
> 
> The caption for the first table page is "Table 1a  My Long table"; for the 
> second table page it is "Table 1b  My long table" and so on. I'd like to 
> change these to be "Table 1  My Long table" then "Table 1 (cont'd) My long 
> table" for the remaining pages.
> 
> I've tried \setupcaption[table][suffix={(cont'd)] but that affects all the 
> pages. How can I set it for the second and subsequent pages only, please?

The solution turned out to be really simple (for small tables at least - less 
fun if you have hundreds of pages!). Just use:

\defineconversion[Contd][~,{ (cont’d)},{ (cont’d)},{ (cont’d)},{ (cont’d)},{ 
(cont’d)},
   { (cont’d)},{ (cont’d)},{ 
(cont’d)},{ (cont’d)},{ (cont’d)},
   { (cont’d)},{ (cont’d)},{ 
(cont’d)},{ (cont’d)},{ (cont’d)},
   { (cont’d)},{ (cont’d)},{ 
(cont’d)},{ (cont’d)},{ (cont’d)} ]
\setupfloatsplitting[conversion=Contd]

This results in "Table 1 My Long table", "Table 1 (cont’d) My Long table" and 
so on.

—
Bruce Horrocks
Hampshire, UK

___
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] Changing the caption on a split table

2022-08-02 Thread Bruce Horrocks via ntg-context
I have a 5-page table placed using

\setupcaption [table] [way=bytext,prefixsegments=none]
\placetable[split]{My long table}{...}

The caption for the first table page is "Table 1a  My Long table"; for the 
second table page it is "Table 1b  My long table" and so on. I'd like to change 
these to be "Table 1  My Long table" then "Table 1 (cont'd) My long table" for 
the remaining pages.

I've tried \setupcaption[table][suffix={(cont'd)] but that affects all the 
pages. How can I set it for the second and subsequent pages only, please?

—
Bruce Horrocks
Hampshire, UK

___
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] Any way to configure \setuphead to run a setups on the stop command?

2022-07-26 Thread Bruce Horrocks via ntg-context
If I use \definehead [Chapter] [chapter] and then \setuphead[Chapter][...] I 
can specify setups to run before and after \startChapter.

Is there any way to specify setups that are run before & after \stopChapter?

My real problem is that I have a double-sided book with new chapters starting 
on a right hand page. If an extra left-hand page gets added then that extra 
page is blank except for the header which continues from the previous chapter. 
This makes the page look a bit odd and I'd rather the header was blank.

I can fix this by ensuring each chapter emits a final page (to ensure the 
headers on the last text-bearing page of the chapter are shown) and then 
clearing the header temporarily using: 
\stopChapter\page\setupheader[state=empty]

This works so I wondered if there was a way of adding it to \stopChapter ?

I can edit each individual chapter file easily enough so no need to add it as a 
feature if it's not already available in some way.

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] If a Font Has Ligature Glyphs But No Feature?

2022-07-20 Thread Bruce Horrocks via ntg-context


> On 20 Jul 2022, at 22:11, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> Am 20.07.22 um 21:40 schrieb Bruce Horrocks via ntg-context:
> 
>> \definefontfeature [venetian-301-demi-ligatures] [v1=yes,v3=yes]
>> \definefontfeature [venetian-301-BT-ligatures]   [v2=yes,v3=yes]
>> Note that the names v1, v2 and v3 are entirely arbitrary. Also, the 
>> \starttypescript section sets the font features to be just those I've 
>> defined - potentially losing whatever 'default' would provide. But since the 
>> font doesn't seem to have a lot of features in the first place I've so far 
>> not noticed any problems. I'm sure a real expert could tell you how to 
>> retain 'default' and add the ligatures, if needed.
> 
> Hi Bruce, you can simply inherit your feature sets from default:
> 
> \definefontfeature [venetian-301-demi-ligatures][default][v1=yes,v3=yes]
> \definefontfeature [venetian-301-BT-ligatures][default][v2=yes,v3=yes]
> 
> I’d like to borrow your example for my book, if you don’t object.

Thank-you for the tip, and please feel free to use my example in your book.

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] If a Font Has Ligature Glyphs But No Feature?

2022-07-20 Thread Bruce Horrocks via ntg-context


> On 20 Jul 2022, at 05:31, Michael Urban via ntg-context  
> wrote:
> 
> Aside from purchasing a real font product from Linotype at enormous expense 
> and hoping it is better equipped, is there a way to coerce ConTeXt into using 
> the ligature glyphs for fi and fl?

Yes - I had to do the same for a font called Venetian 301 for which I found 
these 4 files:

FilenameName as it appears to MacOS
--
Venetian301BT-Roman.otf Venetian 301 Regular
Venetian301BT-Italic.otfVenetian 301 Italic
Venetian301BT-Bold.otf  Venetian 301 Bold
venetian-301-demi-bt.ttfVenetian Dm BT Demi

They each had the fi and fl ligatures, but at different character positions 
depending on which file, and they weren't recognised by default. So I used the 
following code to add them (and add en and em dash substitution as well).

%%  start
\startluacode
fonts.handlers.otf.addfeature {
name = "v1",-- these character substitutions will be applied to 
venetian-301-demi-bt
type = "ligature",
data = {
[0xF001] = { "f", "i" },
[0xF002] = { "f", "l" },
}
}
fonts.handlers.otf.addfeature {
name = "v2",-- these character substitutions will be applied to 
Venetian301BT
type = "ligature",
data = {
[0xFB01] = { "f", "i" },
[0xFB02] = { "f", "l" },
}
}
fonts.handlers.otf.addfeature {
name = "v3",-- these character substitutions will be applied to both
type = "ligature",
data = {
[0x2013] = { "-", "-" },  -- en dash
[0x2014] = { "-", "-", "-" }, -- em dash
}
}
\stopluacode
\definefontfeature [venetian-301-demi-ligatures] [v1=yes,v3=yes]
\definefontfeature [venetian-301-BT-ligatures]   [v2=yes,v3=yes]

\starttypescript [serif] [myBookFont]
  \definefontsynonym [Serif]   [file:venetian-301-demi-bt] 
[features=venetian-301-demi-ligatures]
  \definefontsynonym [SerifBold]   [file:Venetian301BT-Bold]   
[features=venetian-301-BT-ligatures]
  \definefontsynonym [SerifItalic] [file:Venetian301BT-Italic] 
[features=venetian-301-BT-ligatures]
\stoptypescript
%%  end

Note that the names v1, v2 and v3 are entirely arbitrary. Also, the 
\starttypescript section sets the font features to be just those I've defined - 
potentially losing whatever 'default' would provide. But since the font doesn't 
seem to have a lot of features in the first place I've so far not noticed any 
problems. I'm sure a real expert could tell you how to retain 'default' and add 
the ligatures, if needed.

Regards,
—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] Metafun : save memory content ?

2022-07-19 Thread Bruce Horrocks via ntg-context


> On 19 Jul 2022, at 04:28, Fabrice L via ntg-context  
> wrote:
> 
> Complementary question : I saw that the « pos_a » « pos_b » of the example 
> could not take numerical value, for example pos_1, pos_2.. How can I use 
> metafun to write a macro to save the contents of hundreds of variable in this 
> object, something like :
> 
> getparameters "MyData » [
>   for i=1 upto 100 :
>   pos_decimal(i) = ThePosition[i],
>   endfor ;
> ] ;
> 
> If this is possible, then this is wonderful and open news doors ! 

I've adapted this example from the metafun-p manual by adding some "write" 
statements.

\starttext
\startMPpage
  
numeric done[][], i, j, n ; n := 0 ;
forever :
i := round(uniformdeviate(10)) ;
j := round(uniformdeviate(10)) ;
if unknown done[i][j] :
drawdot
(i*cm,j*cm)
withpen pencircle scaled 0.5cm
withcolor darkred;
n := n + 1 ;
done[i][j] := n ;

write "done[" & tostring(i) & "][" & tostring(j) & "] := " & 
tostring(n) & " ;" to "mp_test_file.txt" ;

fi ;
exitif n = 10 ;

endfor ;

write EOF to "mp_test_file.txt" ;
   
\stopMPpage
\stoptext

This results in the expected graphic but also a local file (in the same 
directory as the source) called "mp_test_file.txt" that contains:

done[9][1] := 1 ;
done[4][3] := 2 ;
done[5][3] := 3 ;
done[5][1] := 4 ;
done[2][9] := 5 ;
done[8][6] := 6 ;
done[9][10] := 7 ;
done[9][7] := 8 ;
done[10][2] := 9 ;
done[6][5] := 10 ;

I think, with a bit of judicious use of "write" statements to add some ConTeXt 
/ MP setup code, it would be possible to include the output from the previous 
run as MP source of the next run.

Hope this helps, or at least provides some food for thought.

(Note you need to delete the mp_test_file.txt before re-running else it fails.)

—
Bruce Horrocks
Hampshire, UK

___
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] New tabulate features broken under new maths release

2022-07-09 Thread Bruce Horrocks via ntg-context
Hi Hans,

A few months back you announced some new tabulate features and gave some 
examples, from which I have taken the following MWE:

\starttext
\starttabulate[|lG{}|lG{}|]
\NC \showglyphs \setalignmentcharacter{=}111=111 \NC 
\setalignmentcharacter{=}111=111 \NC\NR
\stoptabulate
\stoptext


This works under "ConTeXt  ver: 2022.01.10 08:36 LMTX  fmt: 2022.1.13  int: 
english/english" but fails to compile under "ConTeXt  ver: 2022.07.06 21:42 
LMTX  fmt: 2022.7.9  int: english/english" with the Lua error:

callback error: 
...-64/tex/texmf-context/tex/context/base/mkxl/node-ali.lmt:366: attempt to 
index a nil value (field '?')
stack traceback:
...-64/tex/texmf-context/tex/context/base/mkxl/node-ali.lmt:366: in 
upvalue 'openup'
...-64/tex/texmf-context/tex/context/base/mkxl/node-ali.lmt:596: in 
upvalue 'third_pass'
...-64/tex/texmf-context/tex/context/base/mkxl/node-ali.lmt:613: in 
upvalue 'nodes_handlers_fixmathalign'
[string "local tonut  = nodes.tonut..."]:17: in function <[string 
"local tonut  = nodes.tonut..."]:8>
(...tail calls...)
...-64/tex/texmf-context/tex/context/base/mkxl/node-pro.lmt:148: in 
function <...-64/tex/texmf-context/tex/context/base/mkxl/node-pro.lmt:146>  

Narrowing it down a bit, it seems to be the use of G{} as the MWE works with a 
plain \starttabulate[|l|l|] on the latest ConTeXt.

—
Bruce Horrocks
Hampshire, UK

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


Re: [NTG-context] lmtx installation paths not working

2022-06-15 Thread Bruce Horrocks via ntg-context


> On 14 Jun 2022, at 12:20, Jano Kula via ntg-context  
> wrote:
> 
> Do you have an idea how to fix problem?
> I will be thankful for an advice, it is quite urgent (everything was working 
> yesterday).

Do you have an anti-virus product installed?

In the past I've noticed that Symantec sometimes gives a false positive on some 
of the ConTeXt files as they are installed and silently deletes them thinking 
they contain malware.

The result is a broken ConTeXt because files are missing but you have no idea 
which files are missing. :-(

Try temporarily disabling AV and then do a complete re-install into an empty 
C:/data/context directory.

—
Bruce Horrocks
Hampshire, 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] Contractions in ligature suppression word list

2022-06-06 Thread Bruce Horrocks via ntg-context


> On 6 Jun 2022, at 06:37, Thangalin via ntg-context  wrote:
> 
> Attached are tweaked endings for words like "wolf" to include contracted 
> endings, but they are being ignored. This makes for a minor inconsistency:
> 
>   wolfing -- no ligature
>   wolfish -- no ligature
>   wolfin -- no ligature (incorrect spelling, though)
>   wolfin' -- ligature
> 
> Any ideas? I tried adding various -in suffixes without luck:
> 
> suffixes = [[
> in,
> in',
> in’,
> ing
> ]],
> 
> See https://wiki.contextgarden.net/Ligatures#Word_suppression for an example 
> usage.
> 
> Thank you!
> 

I'm probably missing something here but...

1) The file you attached doesn't include the word "wolfing", nor "wolfin". I 
assume they need to be added into the f|i section? Wolfish *is* present so I'm 
not sure why it's being ignored unless there is an error being generated as a 
result of point (2) below, causing the whole file to be ignored.

2) Your suffixes list has comma separators - all the other word lists use 
whitespace as a separator.

3) Lastly, dumb question but... have you checked that you edited the right 
file? In my ConTeXt install there are two "lang-en.llg" files - one under 
/context-osx-64/tex/texmf-context/tex/context/patterns/lmtx and the other 
under .../patterns/mkxl

—
Bruce Horrocks
Hampshire, 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] Compiling context files in command line

2022-06-04 Thread Bruce Horrocks via ntg-context


> On 4 Jun 2022, at 06:21, Jaroslav Hajtmar via ntg-context 
>  wrote:
> 
> Hello ConTeXist.
> After a long time, I turn to the conference for help.
> I use command line to batch process of many ConTeXt files. Is it possible at 
> the end off compile proces to move the created PDF to another directory 
> (subdirectory of current directory) using the command line commands? Somehow 
> I can't do it or maybe I'm making a mistake somewhere. 
> 
> Renaming works but moving into subdirectory I can't do it for some reason. 
> What could be the problem? Is it even possible do it? I work with OS X in 
> bash.
> 
> Simple example of my use:
> context —mode=mymode  --result=subdir/mypdffilename.pdf processedfile.tex
> 
> My nontrivial using (content of my bash file) 
> context --purgeall --mode=THISSECTIONONLYHARD 
> --arguments="o=_identifikacni_udaje,k=1,pk=1,ppk=1,t=,s=14" 
> —result="pdfresult/svp_identifikacni_udaje.pdf" _identifikacni_udaje
> context --purgeall --mode=THISSECTIONONLYHARD 
> --arguments="o=_charakteristika_skoly,k=2,pk=1,ppk=1,t=,s=15" 
> --result="pdfresult/svp_charakteristika_skoly.pdf" _charakteristika_skoly
> context --purgeall --mode=THISSECTIONONLYHARD 
> --arguments="o=_charakteristika_svp,k=3,pk=1,ppk=1,t=,s=19" 
> --result="pdfresult/svp_charakteristika_svp.pdf" _charakteristika_svp
> context --purgeall --mode=THISSECTIONONLYHARD 
> --arguments="o=_zacleneni_prurezovych_temat,k=3,pk=1,ppk=1,t=,s=30" 
> --result="pdfresult/svp_zacleneni_prurezovych_temat.pdf" 
> _zacleneni_prurezovych_temat
> context --purgeall --mode=THISSECTIONONLYHARD 
> --arguments="o=_ucebni_plan,k=4,pk=1,ppk=1,t=,s=36" 
> --result="pdfresult/svp_ucebni_plan.pdf" _ucebni_plan
> 
> 
> In fact, it is used to create separate PDF files from one large complex 
> document, where individual chapters are cut out of the overall document in 
> pdf form.
> This creates a large number of PDF files that I do not want to be placed in 
> the current directory. Parameters are used to pass chapter numbers and page 
> numbers to ConTeXt, to  correct numbering in pdf files.
> 
> Can you please advise?

You could put the move command into the Bash script.
e.g.
context --purgeall --mode=THISSECTIONONLYHARD 
--arguments="o=_identifikacni_udaje,k=1,pk=1,ppk=1,t=,s=14" 
—result="svp_identifikacni_udaje.pdf" _identifikacni_udaje
mv "svp_identifikacni_udaje.pdf" "pdfresult"

—
Bruce Horrocks
Hampshire, 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] Compiling a large metapost document

2022-06-01 Thread Bruce Horrocks via ntg-context


> On 1 Jun 2022, at 22:30, Stefan Nedeljkovic via ntg-context 
>  wrote:
> 
> Dear Thomas,
> 
> I'm sorry for all the shortcomings of my question. I'll try to be more 
> concrete. If you won't download my file, could you at least give me a hint on 
> how to configure LMTX?
> 
> I Tried editing the file context/tex/texmf/web2c/texmfcnf.lua, and running 
> context --generate, context --make, but the error persists. I'm new to 
> context and I don't know how to configure this file. Running --usage reveals 
> in the log that the category "token" is exceeded. I tried the aforementioned 
> editing of the conf file, but the log stays the same.

For the benefit of others, the error is:

tex memory  > bumping category 'token' failed, details: all=8000 | 
ini=495183 | max=1000 | mem=1000 | min=100 | ptr=10002079 | 
set=1000 | stp=25 | top=1000

I can't see where max token memory is defined to try and increase it. The only 
reference seems to be in ~/tex/texmf-context/tex/context/base/mkxl/luat-cod.lmt 
but uncommenting and increasing had no obvious effect.

—
Bruce Horrocks
Hampshire, 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] Compiling a large metapost document

2022-06-01 Thread Bruce Horrocks via ntg-context
Hi Stefan,

What exactly are you asking for help with?

The previous file was 12MB and simply ran out of resource when compiled. The 
new file is 812KB and compiles provided you remove the references to 
\setxheight[...] because \setxheight generates an error.


> On 1 Jun 2022, at 17:43, Stefan Nedeljkovic via ntg-context 
>  wrote:
> 
> Just fixed the file, here is the new link: 
> https://drive.google.com/file/d/16jTzHbaqxPmhgmNaDOBRijlhlmUCnH4j/view?usp=sharing
> 
> On Wed, Jun 1, 2022 at 4:48 PM Stefan Nedeljkovic  wrote:
> Dear list,
> 
> I have a large .tex file with metapost embedded in it and want to compile it, 
> but it fails. Here is a link to the file (~12MB): 
> https://drive.google.com/file/d/1t-6mxFmGp-nzpl0RrPgNFq8KRvpplgDv/view?usp=sharing
> 
> Do you know of a way to compile it?
> BTW, the file is automatically generated by a Python script.
> 
> Sincerely,
> Stefan

—
Bruce Horrocks
Hampshire, 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] XML Namespaces and XML Setups

2022-05-24 Thread Bruce Horrocks via ntg-context
I haven't seen it explicitly documented - my cue to add it to the Wiki I guess!

I work with XML a fair bit and, IMHO, the WWW consortium docs do a very poor 
job of explaining namespaces because they make them seem much more complicated 
than they are. Essentially, a tag with a namespace identifier is just another 
tag i.e. treat all the characters, including the colon, as the tag name. Armed 
with that knowledge I just created a second tag definition in the sample code 
you posted.

> On 24 May 2022, at 09:50, Duncan Hothersall  wrote:
> 
> Yes, it does! Thanks Bruce. Is this documented somewhere already and I missed 
> it?
> 
> Cheers.
> 
> Duncan
> 
> On Mon, 23 May 2022 at 21:14, Bruce Horrocks  wrote:
> Does this help?
> 
> \startxmlsetups xml:demo:base
>   \xmlsetsetup{#1}{tag}{xml:demo:tag}
>   \xmlsetsetup{#1}{o:tag}{xml:demo:otag} %% <---
> \stopxmlsetups
> \xmlregisterdocumentsetup{demo}{xml:demo:base}
> \startxmlsetups xml:demo:tag
>   \xmlflush{#1}
> \stopxmlsetups
> \startxmlsetups xml:demo:otag   %% <---
>   {\bf \xmlflush{#1}}
> \stopxmlsetups
> \starttext
> \startbuffer[test]
> 
>xmlns:o="NameSpaceO">
>   text text
> 
> \stopbuffer
> \xmlprocessbuffer{demo}{test}{}
> \stoptext
> 
> > On 23 May 2022, at 09:07, Duncan Hothersall via ntg-context 
> >  wrote:
> > 
> > I found this unanswered question on the list from November 2020 and find 
> > today that I have the same question. How can one handle elements with the 
> > same name but in different namespaces? How should the different 
> > \startxmlsetups commands be written?
> > 
> > Thanks.
> > 
> > Duncan
> > 
> > On Mon, 16 Nov 2020 at 13:37, Christoph Reller  
> > wrote:
> > Dear List,
> > 
> > Consider the following MWE:
> > 
> > \startxmlsetups xml:demo:base
> >   \xmlsetsetup{#1}{tag}{xml:demo:tag}
> > \stopxmlsetups
> > \xmlregisterdocumentsetup{demo}{xml:demo:base}
> > \startxmlsetups xml:demo:tag
> >   %\doif{\xmlnamespace{#1}}{o}{NameSpaceO:}
> >   \xmlflush{#1}
> > \stopxmlsetups
> > \starttext
> > \startbuffer[test]
> > 
> >  >   xmlns:o="NameSpaceO">
> >   text text
> > 
> > \stopbuffer
> > \xmlprocessbuffer{demo}{test}{}
> > \stoptext
> > 
> > My questions:
> > - Is there a good way to have a separate XML setup for each XML namespace?
> > - Alternatively, one has to do the distinction within the same XML setup. 
> > In this case, how do we get the complete namespace? (In this example: 
> > "NameSpaceA" and "NameSpaceO")
> > 
> > Thanks in advance for your help!
> > 
> > Cheers, Christoph

—
Bruce Horrocks
Hampshire, 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] XML Namespaces and XML Setups

2022-05-23 Thread Bruce Horrocks via ntg-context
Does this help?

\startxmlsetups xml:demo:base
  \xmlsetsetup{#1}{tag}{xml:demo:tag}
  \xmlsetsetup{#1}{o:tag}{xml:demo:otag} %% <---
\stopxmlsetups
\xmlregisterdocumentsetup{demo}{xml:demo:base}
\startxmlsetups xml:demo:tag
  \xmlflush{#1}
\stopxmlsetups
\startxmlsetups xml:demo:otag   %% <---
  {\bf \xmlflush{#1}}
\stopxmlsetups
\starttext
\startbuffer[test]


  text text

\stopbuffer
\xmlprocessbuffer{demo}{test}{}
\stoptext

> On 23 May 2022, at 09:07, Duncan Hothersall via ntg-context 
>  wrote:
> 
> I found this unanswered question on the list from November 2020 and find 
> today that I have the same question. How can one handle elements with the 
> same name but in different namespaces? How should the different 
> \startxmlsetups commands be written?
> 
> Thanks.
> 
> Duncan
> 
> On Mon, 16 Nov 2020 at 13:37, Christoph Reller  
> wrote:
> Dear List,
> 
> Consider the following MWE:
> 
> \startxmlsetups xml:demo:base
>   \xmlsetsetup{#1}{tag}{xml:demo:tag}
> \stopxmlsetups
> \xmlregisterdocumentsetup{demo}{xml:demo:base}
> \startxmlsetups xml:demo:tag
>   %\doif{\xmlnamespace{#1}}{o}{NameSpaceO:}
>   \xmlflush{#1}
> \stopxmlsetups
> \starttext
> \startbuffer[test]
> 
>xmlns:o="NameSpaceO">
>   text text
> 
> \stopbuffer
> \xmlprocessbuffer{demo}{test}{}
> \stoptext
> 
> My questions:
> - Is there a good way to have a separate XML setup for each XML namespace?
> - Alternatively, one has to do the distinction within the same XML setup. In 
> this case, how do we get the complete namespace? (In this example: 
> "NameSpaceA" and "NameSpaceO")
> 
> Thanks in advance for your help!
> 
> Cheers, Christoph
> ___
> 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
> ___

—
Bruce Horrocks
Hampshire, 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] Metapost examples seems broken

2022-05-22 Thread Bruce Horrocks via ntg-context
It's archived here


which might suffice until the author gets his certificates sorted out?


> On 22 May 2022, at 09:41, Jan-Erik Hägglöf via ntg-context 
>  wrote:
> 
> HI!
> 
> I have issues to access the very most useful place to get inspiration to 
> write MetaFun code.
> 
> Google Chrome reports security issues
> 
> Maybe this could be off topic in this forum, if so, My apologize in advance. 
> But maybe someone knows the author of this site
> 
> https://tex.loria.fr/prod-graph/zoonekynd/metapost/metapost.html
> 

—
Bruce Horrocks
Hampshire, 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] How to add margin around standalone MetaPost?

2022-05-20 Thread Bruce Horrocks via ntg-context
The arrow looks fine to me in ConTeXt ver: 2022.01.10 08:36 LMTX. (See attached 
PDF)

> On 20 May 2022, at 17:56, Vincent Hennebert via ntg-context 
>  wrote:
> 
> Take the following MetaPost file:
> 
> beginfig(0)
>  ahlength := 20;
>  linejoin := mitered;
>  drawarrow origin--(40,0) withpen pencircle scaled 5;
> endfig;
> 
> Render it into PDF with ConTeXt. Witness the cut out ends of the arrow.
> How to fix that?
> 
> Being able to add some margin would be a solution, which may be
> desirable anyway in some cases. Is that possible?
> 
> Thanks,
> Vincent

—
Bruce Horrocks
Hampshire, UK


tt.pdf
Description: Adobe PDF document
___
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] ConTeXt meeting 2023(!)

2022-05-18 Thread Bruce Horrocks via ntg-context


> On 17 May 2022, at 07:49, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> Would that make a difference for you?

Seven days is a big time commitment, unless you are a major user of ConTeXt. Is 
there a possibility to split it up into "professional" during the week and 
"hobbyist" over the weekend so people could come for just the weekend, or the 
whole week?

—
Bruce Horrocks
Hampshire, 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] ignore not closed tags in XML input

2022-05-18 Thread Bruce Horrocks via ntg-context


> On 18 May 2022, at 17:00, Pablo Rodriguez via ntg-context 
>  wrote:
> 
> 
> Sorry for explaining myself so poorly.
> 
> One of the not irrelevant tasks for me is finding examples of XML code.

Perhaps you could start by typesetting a technical source rather than prose?

I suggest trying to typeset the UK Meteorological Office's Shipping Forecast :-)

- web page version
  


- XML source data
  


- as broadcast on the Radio
  

It's a good (in my opinion) source because it is amenable to being printed in 
several different ways: one might be to simply copy the webpage's layout, while 
another could be to use columns to fit more onto a single page of text.



Alternatively, a much more demanding exercise would be to typeset the user 
manual for the XML editing software "Oxygen".
  

The XML source for the manual is here:
  


—
Bruce Horrocks
Hampshire, 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] Table breaks incorrectly between pages

2022-05-15 Thread Bruce Horrocks via ntg-context
Too slow!!

I'd already added https://wiki.contextgarden.net/TABLE#Tables_in_page_headers.

> On 15 May 2022, at 12:00, śrīrāma via ntg-context  wrote:
> 
> On 5/15/22 2:20 PM Wolfgang Schuster via ntg-context wrote:
>> Use the TABLEnested environment in your document header which was added
>> to avoid problems like in your example.
>> 
>> \startsetups headertext
>> \bTABLEnested[setups=headertable,option=stretch]
>> ...
>> \eTABLEnested
>> \stopsetups
> 
> Splendid (as always)! Definitely a better solution for Stefan's document.
> 
> I added a section in the wiki making a note of this:
>  https://wiki.contextgarden.net/TABLE#Headers_with_TABLEs
> 
> Thanks Wolfgang! Until now, I did not even know of the 'nested' type for 
> TABLE.
> 
>  Sreeram
> 

—
Bruce Horrocks
Hampshire, 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] Crediting copyright on photographs

2022-05-05 Thread Bruce Horrocks via ntg-context
Thank-you Adam, Hraban and Richard for your suggestions.

In the end it was remarkably simple:

\starttext
\definecollector[example]
\setcollector [example] {\externalfigure[cow][width=6cm,frame=off]}
\setcollector [example] [corner={right,bottom},location={right,top}]
{\rotate[rotation=90]{\copyright A great artist}}
\placefigure [ ] [fig:cow] {A fine figure of a cow} 
{\composedcollector{example}}
\stoptext

In the above the cow is drawn with the figure caption below as normal and with 
the copyright text running upwards along the edge of the right-hand edge of the 
image. And if you want to fine tune the space between the image and the text 
then it's easy to \framed the text and play around with the size and offsets.

—
Bruce Horrocks
Hampshire, 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
___


[NTG-context] Crediting copyright on photographs

2022-05-04 Thread Bruce Horrocks via ntg-context
I need to include the copyright acknowledgement / photographer credit on an 
image but I'm not sure what's the best way to do it.

Option 1: I can add the acknowledgement to the end of the \placefigure caption 
text:

e.g.   \placefigure{A picture of a cow. Image of a cow that may or may not be 
under copyright anymore.}{\externalfigure[cow][height=6cm]}

then the copyright bit will appear in the Table of Figures which I don't really 
want to happen. Is there a way to truncate this?


Option 2: some magazines print the copyright credit running up the side of the 
image, independently of the caption. I'd quite like to do this and wondered if 
anyone had already written something they could share?

—
Bruce Horrocks
Hampshire, 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] Word wrap of 'part' titles

2022-04-18 Thread Bruce Horrocks via ntg-context


> On 18 Apr 2022, at 22:10, Wolfgang Schuster via ntg-context 
>  wrote:
> 
> Bruce Horrocks via ntg-context schrieb am 18.04.2022 um 22:46:
>> In the MWE below the 'part' title is centred but on one line only and, 
>> because it is a long title, the beginning and end are lost off the sides of 
>> the page.
>> 
>> If it were a 'chapter' title then I could insert '\\' to cause a line break 
>> at that point. However this does not seem to work for 'part'.
>> 
>> Is there a way of making 'part' titles wrap the same way that 'chapter' 
>> titles do?
>> 
>> % ---begin---
>> \define[2]\placePartTitle{\midaligned{#2}}
>> 
>> \definehead [Part] [part]
>> \setuphead[Part]
>> [ placehead=yes,
>> style={\tfd},
>> command=\placePartTitle,
>> ]
> 
> \setuphead
> [Part]
> [placehead=yes,
> style=\tfd,
> align=middle,
> number=no]

Thanks very much for the quick and helpful reply.

—
Bruce Horrocks
Hampshire, 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
___


[NTG-context] Word wrap of 'part' titles

2022-04-18 Thread Bruce Horrocks via ntg-context
In the MWE below the 'part' title is centred but on one line only and, because 
it is a long title, the beginning and end are lost off the sides of the page.

If it were a 'chapter' title then I could insert '\\' to cause a line break at 
that point. However this does not seem to work for 'part'.

Is there a way of making 'part' titles wrap the same way that 'chapter' titles 
do?

% ---begin---
\define[2]\placePartTitle{\midaligned{#2}}

\definehead [Part] [part]
\setuphead[Part]
  [ placehead=yes,
style={\tfd},
command=\placePartTitle,
  ]
  
\starttext
\startPart[title={A very long part title that needs to be wrapped manually}]
Some body text
\stopPart
\stoptext
%---end---

—
Bruce Horrocks
Hampshire, 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] $\sin \theta$ behave differently in metafun

2022-04-16 Thread Bruce Horrocks via ntg-context

> On 16 Apr 2022, at 05:56, śrīrāma via ntg-context  wrote:
> 
> Hi Hans and Mikael (and others on the list),
> 
> I can confirm that even with the newest LMTX [2022.04.15 20:20] the above 
> might 
> actually be a bug. mfunctions inside MP strings are not properly rendred. A  
> tiny MWE:
> 
>  \starttext
>\startMPcode
>draw textext("\m{\max_i x_i}");
>\stopMPcode
>  \stoptext
> 
> Could trace it down to '\math_function_handle_label' [math-ini] but not sure 
> what MP is doing. Also looked into mp-mlib, mlib-pps but could not figure it 
> out. I request you to kindly look into it.

The MWE works fine[1] in 
system  > ConTeXt  ver: 2022.01.10 08:36 LMTX  fmt: 2022.1.13  int: 
english/english
if that helps track down when the breaking change was made.

[1] Caveat: since the OP doesn't actually describe what is going wrong I may be 
mistaken.
—
Bruce Horrocks
Hampshire, 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] Setting up zint on a mac with macOS Montery Version 12.3.1

2022-04-12 Thread Bruce Horrocks via ntg-context


> On 12 Apr 2022, at 21:04, Keith McKay  wrote:
> 
> Hi All
> I created the symbolic link as suggested by Bruce and Luis and still got the 
> error message 
> 
> optional> unable to locate library 'libzint'
> 
> in my text editor. I use TeXworks. However, I thought I would try running 
> from the Terminal app and it worked. It found libzint and output the pdf with 
> both barcodes and the qrcode. I have no idea why it works in the Terminal and 
> not TexWorks, I'm guessing I have a path issue which I need to investigate.

Could be a path issue - or some other environment variable. This link should 
help you decide what needs to go where:


> Notes
> 1) My machine is a mac-mini-M1 with macos Monterey and I'm running the latest 
> ConTeXt version
> 2) Bruce noted that my Homebrew was installed in a non-standard location so I 
> checked on the Hombrew website and it is installed in opt/homebrew for Apple 
> Silicon i.e the M1 chip. Maybe Bruce's homebrew was installed on an earlier 
> version.

Ah, I'm on an Intel Mac which still uses the old approach. Apologies for the 
red herring.

> Thanks to Luis and Bruce for their suggestions.
> Best Wishes
> Keith McKay

—
Bruce Horrocks
Hampshire, 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] fatal error in LMTX

2022-04-12 Thread Bruce Horrocks via ntg-context


> On 12 Apr 2022, at 18:14, Pablo Rodriguez via ntg-context 
>  wrote:
> 
> I wonder whether it would be possible that ConTeXt or LuaMeTaTeX could
> be more verbose about an opened environment that isn’t closed.


$ mtxrun --script check  filename.tex

is something I learned from this list.

—
Bruce Horrocks
Hampshire, 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] Setting up zint on a mac with macOS Montery Version 12.3.1

2022-04-10 Thread Bruce Horrocks via ntg-context
Hi Keith,

> On 10 Apr 2022, at 14:49, Keith McKay via ntg-context  
> wrote:
> 
> Hi All
> 
> I have been struggling today trying to setup and use the Barcode module zint 
> in ConTeXt and failed. I have followed the instructions on the wiki ( 
> https://wiki.contextgarden.net/Barcodes ) but with some changes as follows. 
> Which maybe why I failed.
> 
> 1) I downloaded Zint using Homebrew since I'm using macOS, and installed it 
> according to the instructions.
> 
> 
> 2) Since I'm using LMTX I looked for the file libzint.dylib and found it in 
> /opt/homebrew/Cellar/zint/2.10.0/lib . This is different from the path given 
> on the wiki. The directory contained three files, two of which were aliases,  
> libzint.2.10.dylib and libzint.dylib, and an exe file libzint.2.10.0.0.dylib

You have Hombrew installed in a non-standard location. Mine is in 
/usr/local/Cellar with the executables linked into /usr/local/bin.

But, assuming other Homebrew commands work when run from Terminal then you 
might still be okay.

> 3) I created the path $TEXROOT/tex/texmf-osx-64/bin/lib/luametatex/zint and 
> copied libzint.2.10.0.0.dylib into but replaced dylib with 'so' as suggested 
> on the wiki instructions. So I basically added  lib/luametatex/zint to 
> texmf-osx-64/bin .

"Yes" to creating the path but "no" to copying. Create a symbolic link instead.

So, in Terminal:

  $ cd $TEXROOT/tex/texmf-osx-64/bin/lib/luametatex/zint

  # In my case I used the following:
  $ ln -s /usr/local/Cellar/zint/2.10.0/lib/libzint.dylib libzint.so

  # For you with Homebrew in a different location, try:
  $ ln -s /opt/homebrew/Cellar/zint/2.10.0/lib/libzint.dylib libzint.so

Then steps 4 and 5 as below. I ran the MWE below: the ISBN worked, the ISBNX 
didn't, the QR code did. This is on Monterey.

> 4) I ran mtxrun --generate to update the database.
> 
> 5) I ran the MWE below but no barcode appeared. The console output shows:
>  
> 
> modules > using user prefixed file 'libs-imp-zint'
> modules > 'zint' is loaded
> 
>  however further down the output it gives:
> 
> 
> optional> unable to locate library 'libzint'
> 
> I have tried renaming libzint2.10.0.0.so to libzint.so, but still no barcode. 
> Is their something I am missing? Tips or hints appreciated.
> Best Wishes
> Keith McKay
> 
> %% MWE 
> \usemodule[zint]
> \starttext
> \barcode[alternative=isbn,text=9783865419026,width=4cm]
> \barcode[alternative=isbnx, text=9783865419026, width=4cm]
> \barcode[alternative=qrcode, text={https://wiki.contextgarden.net}, width=3cm]
> \stoptext

—
Bruce Horrocks
Hampshire, 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] processdatabasefile styling of table cells

2022-04-06 Thread Bruce Horrocks via ntg-context


> On 6 Apr 2022, at 12:18, juh+ntg-context--- via ntg-context 
>  wrote:
> 
> 
> Hi all,
> 
> I include tables via csv files like this
> 
> \processdatabasefile[test][test.csv]
> 
> I was able to style the tables with this:
> 
> \setupTABLE [ split=yes, header=repeat, option=stretch,
> loffset=.5ex,roffset=.5ex]
> 
> \setupTABLE [row] [odd]
> [background=color,backgroundcolor=hs-hellblau,]
> 
> \setupTABLE [start] [spaceinbetween=25pt]
> 
> \defineseparatedlist
>   [preislistecsv]
>   [separator={;}, % tab
>before=\bTABLE,after=\eTABLE,
>first=\bTR,last=\eTR,
>left=\bTD,right=\eTD]
> 
> Is it possible to align decimal numbers in cells to the right?

This previous announcement from Hans might help.


> The data differs a lot. Sometimes only the last column contains decimal 
> numbers, sometimes the last two columns.
Not sure what will happen here - try it and see. Whenever my table layouts go 
wildly wrong, Context usually manages to display something rather than fail 
with an error code. :-)

—
Bruce Horrocks
Hampshire, 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] Make footnote/endnote number not superscript?

2022-03-21 Thread Bruce Horrocks via ntg-context
Thank-you all - the textcommand= was the necessary magic incantation. 

I will certainly use the linknote suggestion, not least because I'll still need 
regular footnotes as well.

And if I can pluck up courage to "move" the \setupnote Wiki page over to the 
new style (I don't know how to do an "undo" if it all goes wrong!) I will 
document the parameters discovered so far.


> On 21 Mar 2022, at 18:25, Pablo Rodriguez via ntg-context 
>  wrote:
> 
> On 3/20/22 22:18, Rik Kabel via ntg-context wrote:
>> On 2022-03-20 17:07, Wolfgang Schuster via ntg-context wrote:
>>> [...]
>>> \setupnote[footnote][textcommand=]
>>> [...]
>> You might want to define a separate set of notes, for example,
>> linknotes, defined as Wolfgang suggests, so
>> [...]
>> You can define multiple streams of footnotes and endnotes.
> Hi Bruce,
> 
> following the conversation, this might be a sample of what I think you
> intend to achieve:
> 
> \definenote[linknote]
> \setupnote[linknote]
> [textcommand={\ }, textstyle=, location=text]
> \setupnotation[linknote]
> [alternative=serried, numberstyle={\switchtobodyfont[12pt]},
>  style={\switchtobodyfont[12pt]}, numbercommand=]
> \starttext
> 
> \dorecurse{25}
> {First\footnote{Footnote one}.
>  See my video at link\linknote{yewtu.be/my-great-video.}. }
> 
> \title{Links}
> \placenotes[linknote]
> 
> \stoptext
> 
> I hope it may help,
> 
> Pablo

—
Bruce Horrocks
Hampshire, 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
___


[NTG-context] Make footnote/endnote number not superscript?

2022-03-20 Thread Bruce Horrocks via ntg-context
I'm editing a book that will be printed, however the authors have included URLs 
which will no doubt suffer from "bit rot" in no time at all. I think it will 
make the main text cleaner if I use endnotes rather than include the URL 
in-line in the text or as a (distracting) footnote. So when the author writes 
"See my video at " I will print "See my video at link 1". At 
the back of the book, in an appendix somewhere, I then use \placenotes to 
display a table of the actual URLs for any readers that want to type them in. 

I want the "link 1" bit to be normal text rather than superscript so it's more 
visible. Using the \setupnote[textstyle=...] command I can change the style of 
the number but not the superscript placing.

Is there a way to remove the superscript placing, please?

Alternative solutions welcome: the URLs printed in the book will be mirrored on 
a web page associated with the book for as long as possible so that content 
that vanishes over time can be replaced with Internet Archive links as they are 
discovered. However the order of the book isn't finalised yet so I'd like the 
numbering to be sequential regardless of whether I move a chapter around later 
on. This is partly the reason for using \endnote because I can use a reference 
elsewhere in the text if necessary.

Thanks in advance.
—
Bruce Horrocks
Hampshire, 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] New upload is DOA on my M1 Mac

2022-03-16 Thread Bruce Horrocks via ntg-context


> On 15 Mar 2022, at 22:31, Gavin via ntg-context  wrote:
> 
> Hi Thomas,
> 
>> I can confirm that context version: 2022.03.12 17:56 is running fine on my 
>> MacBook M1.
> 
> Thanks for that. I’ll troubleshoot my installation.
> 
>> And excuse my snark, but….
> 
> Snark excused.

Ditto - working for me as well.

I completely deleted everything and re-installed using the 64-bit MacOS ARM 
image on this page.


The normal install steps worked: i.e unzip; move the "context-osx-arm64" parent 
directory to where you want it to be (/home/Users//Applications) in my 
case; ran the install script  using the command ". ./install.sh" and it all 
installed nicely. I then added the path it told me about to my .zprofile file 
and to the engine file that I use. Logged out and in just to make sure the 
paths were picked up and it all works from both command line and from TeXShop.

—
Bruce Horrocks
Hampshire, 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] New upload is DOA on my M1 Mac

2022-03-13 Thread Bruce Horrocks via ntg-context


> On 12 Mar 2022, at 19:55, Gavin via ntg-context  wrote:
> 
> Hi Hans,
> 
>> i uploaded a new installer / uopdates with mojca's bin
> 
> Thanks for putting that together. Unfortunately, same result:
> 
>   TeXShop produces no output in console
>   "mtxrun —generate” produces "zsh: killed mtxrun --generate"
> 
> 
> JP,
> 
> The control-open trick seemed like a good idea, but it didn’t change my 
> results. TeXShop findes an old version from TeXLive, probably because it 
> can’t use the new one. In Terminal I still get “permission denied."

The instance of mtxrun that TeXShop finds is entirely down to path settings 
and/or TexShop preferences settings (in its 'engine' files) and nothing to do 
with the security permissions.

Regarding the security permissions there is something else to check: go to 
System Preferences -> Security & Privacy -> Privacy tab -> Full Disk Access.
Make sure 'TeXShop.app' and 'Terminal.app' are both in the list.

If that still doesn't work then there is one more thing but it will be a PITA. 
:-(

And that is to install Xcode and the Xcode developer tools. This then gives you 
another Privacy entry in the left hand list called "Developer Tools" and, above 
the apps list on the right, the description reads "Allow the apps below to run 
software locally that does not meet the system's security policy." Add 
Terminal.app here.

—
Bruce Horrocks
Hampshire, 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] help with facing page image

2022-03-07 Thread Bruce Horrocks via ntg-context


> On 7 Mar 2022, at 03:49, jbf via ntg-context  wrote:
> 
> I wonder if someone can help me untangle the current little mess I seem to be 
> creating!
> 
> Author wants an image on facing page to each of 10 chapters in the bodypart 
> of the document. Assume that everything else is working properly for this 
> document (double-sided etc.), but other than before chapter 1, I can't seem 
> to get my facing page image to appear where it should!
> 

A simpler solution as you only have 10 chapters might be to 'manually' add the 
facing page rather than fiddle with the definition of \startchapter.

For example:

\definestartstop [ChapterPreface]
  [ before={\setups{ChapterPrefaceSetup}},
after={\page}
  ]

% which gives you the commands \startChapterPreface ... \stopChapterPreface 
which I put immediately before \startchapter in the text.

% Then use a setup to prepare the page for your image (you may only need 
\page[left] but also remember you need to stop page headers/footers etc from 
the previous chapter)
\startsetups ChapterPrefaceSetup
  \page[left]
  \setupheader[state=empty]
  % etc
\stopsetups

% If the page setup is complicated then you might need another setup to clean 
it up afterwards. In this example there is just the "after=" in the definition.

% Now you can print your images by using:

\starttext
\startChapterPreface
  \externalfigure[cow.pdf]
\stopChapterPreface
\startchapter[title={firstchapter}}
...
\stopchapter

\startChapterPreface
  \externalfigure[another_cow.pdf]
\stopChapterPreface
\startchapter{title={second chapter}]
...
\stopchapter
\stoptext

Hope this helps.
—
Bruce Horrocks
Hampshire, 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] Problems with itemize with several columns

2022-02-25 Thread Bruce Horrocks via ntg-context

> On 24 Feb 2022, at 22:10, Xavier B. via ntg-context  
> wrote:
> 
> Even if I change 
> \startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i divisió} 
> Opereu:
> \startitemize[a, columns, three]
> 
> 
> for
> 
> \startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i divisió} 
> Opereu:
> \startitemize[a, columns]
> 
> 
> the 'c' jumps.
> 
> Isn't ConTeXt capable of handle that?

Please see the attached PDF which is your sample with the command 
\showmakeup[vbox] added after \starttext

The green line shows how much space is needed to fully print item (b).  Item 
(c) will need the same amount of space, shown by the red line. However, this 
would take you into the footer area (shown by the blue arrows), so item (c) is 
split: the item label fits into the space at the bottom of the column and so is 
printed there; the fraction doesn't fit and so is moved to the next column.

We can confirm this theory by setting the footer to nothing with the command 
\setuplayout[footer=0mm] and then the columns are as you wish. However that 
only works for this example and the situation would inevitably arise again.

The solution to your problem would be some way of forcing the item body to stay 
with the label. I don't know what that command is - hopefully someone here can 
tell us.

—
Bruce Horrocks
Hampshire, UK


columns annotated.pdf
Description: Adobe PDF document
___
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] Problems with itemize with several columns

2022-02-23 Thread Bruce Horrocks via ntg-context


> On 23 Feb 2022, at 11:28, Xavier B. via ntg-context  
> wrote:
> 
> In my previous post 
> [https://mailman.ntg.nl/pipermail/ntg-context/2022/105138.html], I don't know 
> the reason, but the attached code des not display very well in mailing list. 
> I put it here:
> 
> \defineenumeration
>  [exercici]
>  [alternative=serried, before={\blank[medium]\testpage[1]}, text={Exercici}, 
> stopper={.\space}, width=fit, headstyle=\ss, distance=0.25em, width=fit, 
> headcolor=exercici_color, title=yes, titlestyle=\ss, titledistance=0em, 
> left={\bgroup\bf}, right={\egroup}, after={\blank[big]}, prefix=yes, 
> prefixsegments=section, way=section]
[snip]

Removing "alternative=serried" gives a more grid like layout and (possibly 
coincidentally) the problem of the 'c' and 'h' labels being orphaned at the 
bottom of the page goes away.

However the Exercici 1.3 heading is now too close to the end of the previous 
set. Perhaps changing your "before=" setting might improve things.

This is on version 2022.01.10 08:36
—
Bruce Horrocks
Hampshire, 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] How to stop columns from splitting up items in a list?

2022-01-29 Thread Bruce Horrocks via ntg-context


> On 29 Jan 2022, at 14:45, Joel via ntg-context  wrote:
> 
> I am writing a workbook that contains a materials list in front of some craft 
> activities.
> 
> I found that simply displaying a bulleted list can take up lots of space on 
> the page, so instead put the list in three columns. The problem is, if there 
> is an item with a somewhat long description, it can be split across columns. 
> See the example below:
> 
> \starttext
> \startcolumns[n=3]%
> \startitemize[1]%
>  \item pizza cutter
>  \item a word processor (or notebook paper)
>  \stopitemize%
>  \stopcolumns%
> \stoptext
> 
> In the example, it split the second item across the columns.
> 
> How can I create columns that don't allow the item to split across them?
> 

Have you tried 

\startitemize[columns,three]

instead of \startcolumns?

There are examples in the manual on page 16


The spacing can be adjusted as well if the default is too big.

—
Bruce Horrocks
Hampshire, 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] How to stop \placefigure from floating off to some other page?

2022-01-29 Thread Bruce Horrocks via ntg-context
On 29 Jan 2022, at 21:30, Joel via ntg-context  wrote:
> 
> When I used `\placefigure`, ConTeXt often puts the figure on a completely 
> different page, my readership of young students is getting confused where the 
> image is. How can I have all of my `\placefigure` in the entire document 
> appear exactly where called, even if that means having to place it on a new 
> page with lots of space before it or even a new page afterwards? I need it to 
> show up in the order it was called. I think 
> `\setupexternalfigures[location=]` should provide the solution, but cann't 
> figure what is the correct location, I'm not seeing that in the manual 
> anywhere.

Use the force Luke...

e.g.
\placefigure [force] [fig1] {Caption} {\externalfigure [filename.png]}

The location= option is for where on the page (e.g. in a margin, in the main 
text) the picture will go, the actual page it appears on is controlled by 
'here' or 'force' or the default which is to float along until it finds what it 
thinks is a good place.

—
Bruce Horrocks
Hampshire, 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] How to add entire chapter's page ranger for index entry?

2022-01-23 Thread Bruce Horrocks via ntg-context


> On 23 Jan 2022, at 21:40, Joel via ntg-context  wrote:
> 
> I am adding items to an index simply using `\index{word}`.
> 
> There are a few cases where instead of printing just the page number where 
> `\index{word}` is placed, I need the entire page range for that chapter to be 
> displayed. For instance, if Chapter 3 spans page 22-50, and I place 
> `\index{word}` in Chapter 3, I need the index to display "word 22-50", but 
> only for that entry...not for all index entries.
> 
> How to add entire chapter's page ranger for index entry?


\startchapter[title={My chapter title}]
\startregister[index][anIdentifier]{word}

The text...

\stopregister[index][anIdentifier]
\stopchapter

—
Bruce Horrocks
Hampshire, 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] \setupheadertexts not working when text contains \subject

2022-01-14 Thread Bruce Horrocks via ntg-context


> On 14 Jan 2022, at 07:48, Hans Hagen  wrote:
> 
> Ponder this:
> 
>  [{\stylePageHeader{\structureuservariable{author}}}]
> 
> versus this:
> 
>  [{\stylePageHeader{\namedstructureuservariable{chapter}{author}}}]
> 
> and you can guess what happens.

Thank-you for the quick response. It looks like I've been very lucky in my use 
of \structureuservariable so far. :-)
—
Bruce Horrocks
Hampshire, 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
___


[NTG-context] \setupheadertexts not working when text contains \subject

2022-01-13 Thread Bruce Horrocks via ntg-context
I've found an unexpected interaction between \setupheadertexts and the \subject 
command, and I'm hoping that someone can tell me what I'm doing wrong.

Version:  current version: 2022.01.10 08:36

I'm trying to set a book whereby
- chapter title pages have no headers
- left hand (even) pages have the chapter title in the left header and the book 
title in the right header
- right hand (odd) pages have the book title in the left header and the 
author's name in the right header

The following MWE does this perfectly provided the \subject line is 
commented-out. When the \subject line is included then the author name 
disappears - there's just a blank space in the header.

MWE:
\setuppagenumbering
  [ alternative=doublesided,
location={footer},
  ]
\definefont [stylePageHeader] [Serif at 10pt]
  
\startsetups ChapterSetup
  \setupheadertexts
[{\stylePageHeader {My Book}}]  
[{\stylePageHeader{\structureuservariable{author}}}]
[{\stylePageHeader{\getmarking[Chapter]}}]  [{\stylePageHeader {My 
Book}}]  
  \setupheader[state=empty]
\stopsetups

\definehead [Chapter] [chapter]
\setuphead[Chapter]
  [ page=right,
number=no,
before={\setups{ChapterSetup}},
  ]
  
\starttext
\startChapter[title={The Strange Case of the Missing Header}] [author={Bruce}]

\dorecurse{10}{
%\subject{A heading}
\input Knuth
\par
}

\stopChapter
\stoptext


—
Bruce Horrocks
Hampshire, 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] Setting table of contents depth by number rather than by list

2021-12-24 Thread Bruce Horrocks via ntg-context


> On 24 Dec 2021, at 16:45, Jason Ross via ntg-context  
> wrote:
> 
> Dear list,
> 
> Is it possible to set the maximum table of contents depth to a number rather 
> than providing an explicit list of section names?
> 
> 
> Background:
> 
> I am developing an exporter for Org mode. In Org, users can specify the 
> number of levels they want in the table of contents with a number. I 
> currently do this by having the sectioning commands be known to the exporter 
> so I can generate a command like
>\setupcombinedlist
>  [content]
>  [list={section,subsection}]
> for n=2.
> 
> I'm considering using  \start/stopsectionlevel for sectioning commands 
> instead. That way, users could add \definesectionlevels to the document 
> preamble to use whatever sectioning scheme they wanted. However, this would 
> mean that the exporter wouldn't know what sectioning commands to use the TOC 
> setup.

Can you not specify a full list of sections in your exporter code and then 
truncate that list to the appropriate value of n before generating the ConTeXt 
source from the truncated list?

Assuming you are using an Emacs macro to do the export then the following code 
will return the first 2 from the list of section types:

(let ((list '("part" "chapter" "section" "subsection" "subsubsection" 
"subsubsubsection" "subsubsubsubsection")))
  (butlast list (- (length list) 2)))

I stole that from StackOverflow so I'll leave it to you work out how to get 
your depth variable substituted for the 2. :-)

Note that you probably don't want "part" but I include it for completeness. 
Best to start with "chapter".
—
Bruce Horrocks
Hampshire, 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] Contextual removal of some ligatures using fonts.handlers.otf.addfeature (LuaTeX 1.13.2)

2021-12-24 Thread Bruce Horrocks via ntg-context


> On 24 Dec 2021, at 18:34, Thomas Savary via ntg-context  
> wrote:
> 
> Hello, dear list !
> 
> In order to fix a few bugs in some OpenType features included in EB Garamond 
> font provided by Google Fonts, I am trying to remove some ligatures 
> (erroneous in some contexts) with fonts.handlers.otf.addfeature.
> 
> I must be missing something, because I can't get it to work.
> 
> Here is a minimal —non working—example :-)
> (The attempted removal (“f_i” → “fi” only before “o”) is of course 
> irrelevant. I chose it just for the sole purpose of this test, to provide a 
> simple example. What I am trying to achieve is more complex, with other 
> ligatures.)
> 
> fonts.handlers.otf.addfeature{
> name = "unfio",
> type = "chainsubstitution",
> lookups = {
> { type = "multiple",
> data = { [ "f_i" ] = { "f", "i" } }
> }
> }
> rules = {
> { after = { { "o" } },
> current = { { "f_i" } },
> lookups = { 1 } }
> }
> }
> }
> 
> Could someone please explain to me what I did wrong ?

Firstly, you have an extra } in the example above.

Secondly, rules need to come inside a data section. Thus (untested):

fonts.handlers.otf.addfeature{
name = "unfio",
type = "chainsubstitution",
lookups = {
{
type = "substitution",
data = {
[ "f_i" ] = { "f", "i" }
}
}
},
data = {
rules = {
{
after = { { "o" } },
current = { { "f_i" } },
lookups = { 1 }
}
}
}
}

Regards,
—
Bruce Horrocks
Hampshire, 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] Critical Editions?

2021-12-24 Thread Bruce Horrocks via ntg-context


> On 24 Dec 2021, at 12:07, Hans Hagen via ntg-context  
> wrote:
> 
> a lot related to numbering, referencing and notes and much of that is present
> 
> so if you can team up with other critical edition users ... i suppose that 
> Idris can send you his onthology-so-far

I'm not a user but was intrigued by Juergen's original post. In an effort to 
educate myself I found this page 
 and thought about how those 
examples might be set using ConTeXt instead. It didn't take long to realise 
that Juergen pretty much has it exactly right with his sample code.

If it would help I could have a go at setting one or two of those examples and 
put it onto the Wiki somewhere?

The only real question I have to those who produce critical editions for real: 
are the examples I've linked to useful and appropriate to be copied?

—
Bruce Horrocks
Hampshire, 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] Found a weird URL that breaks things

2021-12-19 Thread Bruce Horrocks via ntg-context
Thanks Wolfgang. I had tried \# which I normally use to escape a hash but it 
didn't work. I was unaware of \letterhash.

> On 19 Dec 2021, at 17:37, Wolfgang Schuster 
>  wrote:
> 
> Bruce Horrocks via ntg-context schrieb am 19.12.2021 um 18:12:
>> Hi,
>> 
>> The following MWE won't compile for me:
>> 
>> \setupinteraction [state=start]
>> \starttext
>> Click me:
>> \goto{https://forum.swissmicros.com/viewtopic.php?f=2=22236#p22236}
>> [url(https://forum.swissmicros.com/viewtopic.php?f=2=22236#p22236)]
>> \stoptext
>> 
>> under "mtx-context | current version: 2021.12.10 11:41"
>> 
>> \useURL fails as well so I assume it's in the URL parser.
> 
> The hash (#) is a special character in TeX and you have to either replace it 
> with something safe like \letterhash or in case of \useurl you can put all 
> settings in a asciimode block, e.g.
> 
> \startasciimode
> \useurl [...]
> \stopasciimode
> 
> Wolfgang

—
Bruce Horrocks
Hampshire, 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
___


[NTG-context] Found a weird URL that breaks things

2021-12-19 Thread Bruce Horrocks via ntg-context
Hi,

The following MWE won't compile for me:

\setupinteraction [state=start]
\starttext
Click me: 
\goto{https://forum.swissmicros.com/viewtopic.php?f=2=22236#p22236}
[url(https://forum.swissmicros.com/viewtopic.php?f=2=22236#p22236)]
\stoptext

under "mtx-context | current version: 2021.12.10 11:41"

\useURL fails as well so I assume it's in the URL parser.

—
Bruce Horrocks
Hampshire, 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] TeXWorks and synctex SOLVED

2021-12-13 Thread Bruce Horrocks via ntg-context
For those searching in future, the minimum needed to make synctex work with 
ConTeXt and TeXShop on macOS Monterey is:

1) Reasonably new LMTX. I have version 2021.12.10 11:41. (It might well work 
going back a few versions but not too far.)

2) TeXShop version 4.68

3) TeXShop -> Preferences -> Engines -> Alternate path *must* be set to your 
LMTX installation.
   For me on an Intel Mac that is: 
/Users/bruce/Applications/context-osx-64/tex/texmf-osx-64/bin

TeXShop uses this path to launch the program it needs to convert a synctex 
location into a file name
and line number. If this path is wrong then the editor just does nothing.

4) These two lines at the top of each source file you want to sync to/from:

% !TEX useAlternatePath
% !TEX useConTeXtSyncParser

5) Either --synctex="1" on the command line in the .engine file or 
\setupsynctex [state=start, method=max]
somewhere in your source (which can be in the current file or in an environment 
file).

6) Most times you will need to quit and restart TeXShop when you change any of 
the above.


You *do not* need:

1) You do not need the "ConTeXt2021.engine" file: you can use your own engine 
file as long as it invokes your local LMTX. So, for me, the two key commands in 
the .engine file are:

set path=(/Users/bruce/Applications/context-osx-64/tex/texmf-osx-64/bin $path 
/Library/TeX/texbin /usr/texbin /usr/local/bin)
mtxrun --script context --autogenerate "$1"

2) You do not need the following magic line:

% !TEX TS-program = ConTeXt2021

If you do include it then it will override the engine you select from the drop 
down.


Hopefully this answer will help others with this problem:- at least until the 
version of ConTeXt shipped with TexShop is new enough to support the new 
synctex and then there won't be any need to configure anything.


> On 13 Dec 2021, at 09:45, Bruce Horrocks via ntg-context  
> wrote:
> 
> I'm having trouble getting the new synctex to work on a Mac. I've completely 
> re-installed MacTeX and TeXWorks and synctex works fine for LaTeX documents. 
> But for ConTeXt no combination of magic lines etc will work for me. The 
> symptoms are... nothing - no errors but no synching, either way.
> 
> Q1: is there a log file created somewhere or a debugging flag that can be 
> turned on which will tell me what is happening when I try to jump from PDF to 
> editor or vice versa?
> 
> Q2: Is this the same error as reported at the bottom of 
> https://wiki.contextgarden.net/SyncTeX ? Or has that been fixed?
> 
> PS: \enabletrackers[system.synctex.visualize] works as expected - i.e. the 
> .synctex file seems to be correct.

—
Bruce Horrocks
Hampshire, 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
___


[NTG-context] TeXWorks and synctex

2021-12-13 Thread Bruce Horrocks via ntg-context
I'm having trouble getting the new synctex to work on a Mac. I've completely 
re-installed MacTeX and TeXWorks and synctex works fine for LaTeX documents. 
But for ConTeXt no combination of magic lines etc will work for me. The 
symptoms are... nothing - no errors but no synching, either way.

Q1: is there a log file created somewhere or a debugging flag that can be 
turned on which will tell me what is happening when I try to jump from PDF to 
editor or vice versa?

Q2: Is this the same error as reported at the bottom of 
https://wiki.contextgarden.net/SyncTeX ? Or has that been fixed?

PS: \enabletrackers[system.synctex.visualize] works as expected - i.e. the 
.synctex file seems to be correct.
—
Bruce Horrocks
Hampshire, 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] [DKIM] using the newcolumnsets module

2021-12-09 Thread Bruce Horrocks via ntg-context


> On 9 Dec 2021, at 16:32, Hans Hagen via ntg-context  
> wrote:
> 
> On 12/9/2021 1:27 PM, Jeong Dal via ntg-context wrote:
> 
>> error messages:
> 
>> Documents/com~apple~CloudDocs/texMain/ColumnsetTest.tex', result 
>> '/Users/graph/Library/Mobile 
> 
>> Documents/com~apple~CloudDocs/texMain/ColumnsetTest.tex''" terminated with 
>> exit code: 1.*
> no clue ... does lmtx also fail? is it an apple binary issue?
> 
> 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
> -

It works fine for me under macOS Monterey and LMTX version:

  mtx-context | current version: 2021.12.03 15:20

Dalyoung: the error line that Hans quoted implies that your .tex file is on 
your iCloud drive. Try moving it to a local, hard drive.

—
Bruce Horrocks
Hampshire, 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] Sum and mathalignment

2021-11-30 Thread Bruce Horrocks via ntg-context


> On 30 Nov 2021, at 19:34, Alexandre Christe via ntg-context 
>  wrote:
> 
> Dear list,
> 
> 
> 
> What I've done is to play with mathalignment and \framed. Here is a MWE:
> 
> \starttext
> \defineoverlay[midrule][{\blackrule[height=.02cm,width=5.5cm]}]
> 
> \framed[frame=off,background=midrule,boffset=.65cm]{\startformula
>   
> \startmathalignment[n=12,align={middle,middle,middle,middle,middle,middle,middle,middle,middle,middle,middle,middle}]
> \NC \NC S_6 \NC= \NC 1 \NC+ \NC 2 \NC+ \NC\dots \NC+ \NC 5 \NC+ \NC 6 \NR
> \NC + \NC S_6 \NC= \NC 6 \NC+ \NC 5 \NC+ \NC\dots \NC+ \NC 2\NC+ \NC 1 \NR
> \NC\NC 2S_6 \NC= \NC 7 \NC+ \NC 7 \NC+ \NC\dots \NC+ \NC 7 \NC+ \NC 7 \NR
>   \stopmathalignment
> \stopformula}
> \stoptext
> 
> Is there a simpler way to typeset something like this?

How about:

\usecolors[svg]
\starttext
\ssa\bold
\starttabulate[|r|CT{red}c|c|CT{yellow}c|c|CT{green}c|c|CT{cyan}c|c|CT{blue}c|c|CT{darkmagenta}c|]
\NC   S = \NC 1 \NC + \NC 2 \NC + \NC 3 \NC + \NC 4 \NC + \NC 5 \NC + \NC 6 
\NC\NR
\NC + S = \NC 6 \NC + \NC 5 \NC + \NC 4 \NC + \NC 3 \NC + \NC 2 \NC + \NC 1 
\NC\NR
\HL[cornflowerblue]
\NC  2S = \NC 7 \NC + \NC 7 \NC + \NC 7 \NC + \NC 7 \NC + \NC 7 \NC + \NC 7 
\NC\NR
\stoptabulate
\stoptext

—
Bruce Horrocks
Hampshire, 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] Font Problem

2021-11-10 Thread Bruce Horrocks via ntg-context


> On 10 Nov 2021, at 21:11, skyhorse--- via ntg-context  
> wrote:
> 
> 
> 
> I'm using the linux version which is about a week to two weeks old.
> I've installed in in:
> /opt/context-lmtx
> 
> Which now contains the directories:
>$ ls /opt/context-lmtx
>  -->   bin  context-linux-64.zip  installation.pdf  install.sh  tex
> 
> Does this help in getting closer to solving the font problem for ubuntu that 
> I'm using with the stand alone?

That looks right for the root directory but there's a lot more than that for a 
working install, of course.

In your first email you said you used the command "txrun": I've no idea what 
that is because I've never needed it.

I just use the 'context' command so all you need do to check the install is 
working is (from your home directory) to run the command

  $ context --version

If that gives sensible output (about 6 lines) then do

  $ context my_example.tex

where "my_example.tex" is the name of the file containing your maths expression 
example as plain text. Hopefully you will get a successful run through 
resulting in a 'my_example.pdf' file containing a typeset version of the 
expression.

If after that it's still not working then report back to this mailing list with 
the error details.

Regards,
—
Bruce Horrocks
Hampshire, 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] adding module to ConTeXt basic installation

2021-11-06 Thread Bruce Horrocks via ntg-context
On 6 Nov 2021, at 10:55, A A via ntg-context  wrote:
> 
> Dear All,
> 
> I installed ConTeXt on my windows machine using the instructions provided 
> here:
> 
>  - https://wiki.contextgarden.net/Installation
> 
> I would like to now render some python code in my pdf. For this I need to 
> install this module: https://github.com/adityam/filter  
> 
> How do I add this module to my current installation? Thanks for your 
> consideration.

I'm not quite sure what you mean by 'render' Python code. If you just mean to 
typeset it using a monospaced font so that the indentation is preserved then a 
simple \definetyping is probably all that you need.

e.g.
\definetyping[PythonSource][style=\mono]
\starttext
This is taken from Rosetta Code:\par
\startPythonSource
def eratosthenes2(n):
multiples = set()
for i in range(2, n+1):
if i not in multiples:
yield i
multiples.update(range(i*i, n+1, i))
 
print(list(eratosthenes2(100)))
\stopPythonSource
\stoptext

If the source code is in a file then you can read the file directly with:
\typefile [PythonSource] [ ] {filename.py}

If you wanted to typeset your code with syntax highlighting/colouring then 
there are more advanced options to \definetyping that can be used and there is 
also the Vim module.


Regards,
—
Bruce Horrocks
Hampshire, 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
___


  1   2   >