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
<https://web.archive.org/web/20210815171931/https://tex.loria.fr/prod-graph/zoonekynd/metapost/metapost.html>

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
  
<https://www.metoffice.gov.uk/weather/specialist-forecasts/coast-and-sea/shipping-forecast>

- XML source data
  
<https://www.metoffice.gov.uk/public/data/CoreProductCache/ShippingForecast/Latest>

- as broadcast on the Radio
  <https://www.radio-uk.co.uk/podcasts/random-shipping-forecast>

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".
  <https://www.oxygenxml.com>

The XML source for the manual is here:
  <https://github.com/oxygenxml/userguide/blob/master/DITA/UserManual.ditamap>


—
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:
<https://unix.stackexchange.com/questions/71253/what-should-shouldnt-go-in-zshenv-zshrc-zlogin-zprofile-zlogout>

> 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.
<https://www.mail-archive.com/ntg-context@ntg.nl/msg99681.html>

> 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.
<https://www.pragma-ade.nl/install.htm>

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
<http://www.pragma-ade.com/general/manuals/ma-cb-en.pdf>

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 
<https://www.djdekker.net/ledmac/examples.html> 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.
<https://anorien.csc.warwick.ac.uk/mirrors/CTAN/macros/context/contrib/context-vim/doc/context/third/vim/vim.txt>

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] \externafigure and \at do not work together

2021-10-31 Thread Bruce Horrocks via ntg-context
I thought it was necessary to use one of the derivations of \placefloat in 
order to get the reference generated. In your case this would be \placefigure 
thus:

\starttext
\placefigure [ ] [clock] { } {\externalfigure[clock.jpg]}
\at[clock] refers to a clock
\stoptext


> On 31 Oct 2021, at 12:49, a badin via ntg-context  wrote:
> 
> The fix is not really a fix thought, as it makes the image of the
> figure disappear.
> Still don't know how to make a .jpg work with \at
> 
> On Sun, 31 Oct 2021 at 13:07, a badin  wrote:
>> 
>> Hello, perhaps this is how it is supposed to work, but:
>> 
>> \externalfigure[clock.jpg][clock]
>> \starttext
>> \at[clock] refers to a clock
>> \stoptext
>> 
>> produces "?? refers to a clock", instead of "1 refers a clock" --- the
>> wiki of \at says, that labels of figures can be refered to. Is this a
>> bug, or can only some labels be refered to? I was able to fix it
>> using:
>> 
>> \reference[clock]{\externalfigure[clock.jpg]}
>> \starttext
>> \at[clock] refers to a clock
>> \stoptext
>> 
>> and
>> 
>> \externalfigure[clock][]
>> \starttext
>> \at
>> \stoptext
>> 
>> produces an interesting artwork... so I thought maybe this could be a
>> bug. LMTX 2021.10.21
>> 
>> Best,
>> Andrej
> ___
> 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] How do I get the first page of the chapter to display the page number in the footer in this setup?

2021-10-25 Thread Bruce Horrocks via ntg-context
Hi Gerben,

See below...

> On 24 Oct 2021, at 17:04, Gerben Wierda via ntg-context  
> wrote:
> 
> On 24 Oct 2021, at 16:38, Wolfgang Schuster 
>  wrote:
>> 
>> Gerben Wierda via ntg-context schrieb am 24.10.2021 um 15:42:
>>> My double-sided layout starts each chapter on a right page with a quote on 
>>> the opposing left page. I’d like to move the page number of that right page 
>>> to the footer, but haven’t been able to find how to do this is the 
>>> documentation. How can I do this?
>> 
>> \definetext
>>   [chapterfooter] % name
>>   [footer]% vertical location
>>   [pagenumber]% content
>> 
>> \setuphead
>>   [chapter]
>>   [header=empty,
>>footer=chapterfooter]
>> 
>> \starttext
>> 
>> \dorecurse{4}
>>   {\expanded{\chapter{Chapter \recurselevel}}
>>\dorecurse{10}{\samplefile{lorem}}}
>> 
>> \stoptext
>> 
>> Wolfgang
> 
> Yes, this works in a simple setup. But it doesn’t work in mine with my 
> LHS-quote/RHS-chapterstart setup using before and after on setup head.
> 
> Try this:
> 
> \setuplayout[location=doublesided]
> \setuppagenumbering[alternative=doublesided]
> 
> \definetext
>   [chapterfooter] % name
>   [footer]% vertical location
>   [pagenumber]% content
> 
> \setuphead[chapter]
>   [page=,
>header=empty,
>footer=chpaterfooter,
>sectionsegments=chapter,
>before={\setups[chapter:before]},
>after={\setups[chapter:after]}]
> 
> \startsetups chapter:before
> \page[left]
> \noheaderandfooterlines
> \startalignment[left,nothyphenated]
> \startnarrower[4*left]
> \em \getbuffer[chapter:quote]
> \stopnarrower
> \stopalignment
> \resetsetups[quote:text]
> \page[right]
> \blank[force,2*big]
> \stopsetups

Change chapter:before to be as follows (changes marked with %%)

\startsetups chapter:before
\page[left]
%noheaderandfooterlines %%
\setupheader[state=empty] %%
\setupfootertexts [] [pagenumber] [pagenumber] [] %%
\startalignment[left,nothyphenated]
\startnarrower[4*left]
\em \getbuffer[chapter:quote]
\stopnarrower
\stopalignment
\resetsetups[quote:text]
\page[right]
\blank[force,2*big]   
\setupfootertexts [] [] [] []  %%
\stopsetups

Is that what you were after?

> 
> \startsetups chapter:after
> \blank[3*big]
> \stopsetups
> 
> \definelist[chaptertext]
> \setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument]
> \define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}}
> 
> \starttext
> \startbuffer [chapter:quote]
> If you think good architecture is expensive, try bad architecture\crlf
> {\tf Brian Foote and Joseph Yoder}
> \stopbuffer
> 
> \chapter[h:one]{One}
> \ChapterAbstract{This is chapter abstract 1.}
> 
> \dorecurse{5}{\input tufte \par \input knuth}
> 
> \chapter[h:two]{Two}
> \ChapterAbstract{This is chapter abstract 2.}
> 
> \dorecurse{5}{\input tufte \par \input knuth}
> 
> \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] A book with sections

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


> On 23 Oct 2021, at 14:51, Gerben Wierda via ntg-context  
> wrote:
> 
> 
>> On 23 Oct 2021, at 15:34, Wolfgang Schuster 
>>  wrote:
>> 
>>  Gerben Wierda via ntg-context schrieb am 23.10.2021 um 15:20:
>>> I’d like a book with chapters to have sections/parts, e.g. something that 
>>> groups a few \chapter elements together. Is there support for this in LMTX? 
>>> I.e. in such a way that it also shows up in the table of contents?
>> 
>> You can use \part.
> 
> Yes. Thanks. But that leads to additional questions:
> - how do I get the parts to show up in the table of contents? Because I tried 
> \part but it did not show up
> - how do I let chapters number on (not restart in each part, and not a x.y 
> number but simply ‘2. Chapter’
> - what is a good way to create actual RHS ‘title’ pages for each chapter?
> - how do I get parts to number with Roman numerals?

I define my own versions of \part and \chapter (called \Part and \Chapter) and 
specify a different display style using setups. The definition for \Part is 
below, \Chapter is very similar so I haven't included it.

%% Double rule above part title
\startsetups PartSetup
 \setupheader[state=empty]
 \par
 \startMPcode
   draw (0,2mm)--(TextWidth,2mm) withpen pensquare scaled 1.5mm ;
   draw (0,0)--(TextWidth,0) withpen pensquare scaled 1.0mm ;
   clip currentpicture to unitsquare yscaled 1cm xscaled TextWidth
 \stopMPcode
\stopsetups

\define[2]\placePartTitle{\midaligned{#2}}
%% The above line is what I use. You want Roman numerals so maybe adapt it to:
%% \define[2]\placePartTitle{\midaligned{\convertnumber[Romannumerals][#1] #2}}

\definehead [Part] [part]
\setuphead[Part]
 [ page=right,
   placehead=yes,
   style={\stylePartTitle}, %% this is just from a \definefont
   before={\setups{PartSetup}},
   command=\placePartTitle,
 ]

With \setuplayout[location=doublesided] this then comes out on the RHS.

For the ToC, I use:

\setuplist [alternative=b]
\setuplist [Part]
 [ headnumber=no,
   margin=0cm,
   width=0cm,
   distance=0cm,
   style=\tocStylePartTitle,
 ]
\setuplist [Chapter]
 [ headnumber=no,
   margin=1em,
   width=0cm,
   distance=0cm,
 ]
\setupcombinedlist [content] [list={Part,Chapter}]

then \placecontent prints the chapter titles indented under each part.

HTH
—
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 / 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] Test suite fonts/features-005.tex failing for me

2021-10-02 Thread Bruce Horrocks via ntg-context
In the test suite, the file fonts/features-005.tex is failing for me on latest 
lmtx. All three items appear the same each time i.e. no small caps and no 
old-style digits on the second and third.

<http://www.pragma-ade.com/context/latest/cont-tst.zip>

Can anyone else reproduce this, 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 / 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] Dumb question about ligatures

2021-10-02 Thread Bruce Horrocks via ntg-context
On 2 Oct 2021, at 00:46, Hans Hagen  wrote:
> 
> On 10/2/2021 12:35 AM, Bruce Horrocks via ntg-context wrote:
>> On 21 Sep 2021, at 02:47, Bruce Horrocks via ntg-context 
>>  wrote:
>>> 
>>> I'm using a TTF file that has no ligature capability as a built-in feature. 
>>> It does however have glyphs for fi and fl but ConTeXt isn't substituting 
>>> them.
>>> 
>>> So the question is: what do I need to do to persuade ConTeXt to do fi & fl 
>>> ligature substitution?
>> Any suggestions please? Is a font features file the 'right' way? I would 
>> have thought that there was a more traditional solution
> you can write your own feature (examplex in test suite and manuals) where you 
> map f + f onto ff

Thanks Hans - I keep forgetting about the test suite.

For the benefit of those coming here via the mail archive, I found what I 
needed in the cont-tst.zip test suite in the file fonts/extensions-001.tex
<http://www.pragma-ade.com/context/latest/cont-tst.zip>

Now my problem is that the font only has ligatures for fi and fl which is 
making my life di-ffi-cult. 
—
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] Dumb question about ligatures

2021-10-01 Thread Bruce Horrocks via ntg-context
On 21 Sep 2021, at 02:47, Bruce Horrocks via ntg-context  
wrote:
> 
> I'm using a TTF file that has no ligature capability as a built-in feature. 
> It does however have glyphs for fi and fl but ConTeXt isn't substituting them.
> 
> So the question is: what do I need to do to persuade ConTeXt to do fi & fl 
> ligature substitution?

Any suggestions please? Is a font features file the 'right' way? I would have 
thought that there was a more traditional solution
—
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] flushlayer

2021-09-28 Thread Bruce Horrocks via ntg-context
Latest LMTX. I noticed the following \flushlayer behaviour and wondered if it 
was a bug or something I've misunderstood?

\showframe
\setuppapersize [A5][A5]
\setuplayout[marking=on, location=middle]

\definelayer[coverlayer]
[width=\paperwidth, height=\paperheight]
\setupbackgrounds [paper] [background=coverlayer,state=start ]

\starttext
\setlayerframed [coverlayer]
   [width=60mm,height=60mm,hoffset=0mm,voffset=0mm]
   [frame=on]
   {Some framed text top left of paper}%
Hello world.
%\flushlayer[coverlayer]
\stoptext

The above works as expected: the framed text is at the top left of the paper. 
But if I change the last three lines to:

%Hello world.
\flushlayer[coverlayer]
\stoptext

(i.e. swap around the 'commenting out') then the framed text moves to the top 
left of the text area not the paper.

Is this intended?
—
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] \placeinitial to account for quotation mark

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


> On 25 Sep 2021, at 21:45, Thangalin via ntg-context  
> wrote:
> 
> Henri Menke provided a partial solution:
> 
> \defineinitial[two][method={first,auto}]
> \setuphead[chapter][
>   after={\placeinitial[two]},
>   page=no,
> ]
> 
> \starttext
> \chapter{Harriet Tubman}
> "Every great dream begins with a dreamer. Always remember, you have within
> you the strength, the patience, and the passion to reach for the stars to
> change the world.
> \chapter{Eleanor Roosevelt}
> Great minds discuss ideas; average minds discuss events; small minds
> discuss people.
> \stoptext
> 
> However, the leading quotation mark is gobbled. Is there any generic way of 
> detecting a leading quotation mark while keeping initial caps on the first 
> character?
> 

Not really generic, and maybe not what you want, but there is this:

\chapter{Eleanor Roosevelt}
\setupinitial[text={"G}]
reat minds discuss ideas; average minds discuss events; small minds
discuss people.

—
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] Dumb question about ligatures

2021-09-20 Thread Bruce Horrocks via ntg-context
I'm using a TTF file that has no ligature capability as a built-in feature. It 
does however have glyphs for fi and fl but ConTeXt isn't substituting them.

So the question is: what do I need to do to persuade ConTeXt to do fi & fl 
ligature substitution?
—
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] Smallcaps not working with a font that claims to have it - how can I confirm? SOLVED

2021-09-20 Thread Bruce Horrocks via ntg-context
Found it from an old email of Wolfgang's in the archive - not sure why I didn't 
see it before.

Solution is to use:

\definefontfeature[latin-smallcaps][smallcaps][script=latn]
\definefontsynonym [Squar] [name:SquarishSansCT-Regular] 
[features=latin-smallcaps]

instead of the first two lines in my example below.

> On 20 Sep 2021, at 10:53, Bruce Horrocks  wrote:
> 
> I'm trying to use smallcaps with a font called SquarishSansCT.
> 
> According to mtxrun it has smcp as a feature...
> 
> $ mtxrun --script font --list --info --pattern=squar
> [...]
> mtx-fonts   | gsub features:
> mtx-fonts   |
> mtx-fonts   |   feature  script   languages
> mtx-fonts   |
> mtx-fonts   |   c2sc grek dflt
> mtx-fonts   |latn dflt
> mtx-fonts   |   smcp grek dflt
> mtx-fonts   |latn dflt
> mtx-fonts   |
> 
> ...but I can't seem to get that feature to work in this MWE which works for 
> TexGyreSchola.
> 
> \definefontfeature [smallcaps] [always] [smcp=yes]
> \definefontsynonym [Squar] [name:SquarishSansCT-Regular] [features=smallcaps]
> \definefontsynonym [Schola] [name:texgyreschola-regular] [features=smallcaps]
> 
> \definefont [chapterTitle] [Squar at 18pt]
> \definefont [anotherTitle] [Schola at 18pt]
> 
> \starttext
> {\chapterTitle A Chapter Title}
> \par
> {\anotherTitle A Chapter Title}
> \stoptext
> 
> Have I missed something or is it the font?
> —
> 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 / 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] Smallcaps not working with a font that claims to have it - how can I confirm?

2021-09-20 Thread Bruce Horrocks via ntg-context
I'm trying to use smallcaps with a font called SquarishSansCT.

According to mtxrun it has smcp as a feature...

$ mtxrun --script font --list --info --pattern=squar
[...]
mtx-fonts   | gsub features:
mtx-fonts   |
mtx-fonts   |   feature  script   languages
mtx-fonts   |
mtx-fonts   |   c2sc grek dflt
mtx-fonts   |latn dflt
mtx-fonts   |   smcp grek dflt
mtx-fonts   |latn dflt
mtx-fonts   |

...but I can't seem to get that feature to work in this MWE which works for 
TexGyreSchola.

\definefontfeature [smallcaps] [always] [smcp=yes]
\definefontsynonym [Squar] [name:SquarishSansCT-Regular] [features=smallcaps]
\definefontsynonym [Schola] [name:texgyreschola-regular] [features=smallcaps]

\definefont [chapterTitle] [Squar at 18pt]
\definefont [anotherTitle] [Schola at 18pt]

\starttext
{\chapterTitle A Chapter Title}
\par
{\anotherTitle A Chapter Title}
\stoptext

Have I missed something or is it the font?
—
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 the double pages of part beginnings

2021-09-13 Thread Bruce Horrocks via ntg-context
In the absence of any other replies I think...

(a) your example is a good one. The only improvement would be to turn it into a 
2 across, 3 or 4 down set of mini pages imposed onto a larger one so that it 
can be rendered on the Wiki page without taking too much space. (I don't know 
how to do that - my experiments didn't go well!)

(b) the Titles page seems to be the right place for it, but that page is 
already quite long. Maybe your example could be put into its own page with a 
link from the Titles page examples section?


> On 12 Sep 2021, at 19:58, Christian Dekant via ntg-context 
>  wrote:
> 
> Thank you, this works nicely. I put up a (minimal) working example of the 
> adapted code (it inserts an empty page, if the peceding chapter ends on an 
> even page) on the wiki, see
> 
> https://wiki.contextgarden.net/User_talk:Christian.Dekant
> 
> Is this interesting for other users as well? (Maybe on 
> https://wiki.contextgarden.net/Titles?) If not ... I guess it will do no harm 
> on my discussion page.
> 
> All the best
> Christian
> 
> Am 11.09.21 um 13:25 schrieb Wolfgang Schuster:
>> Christian Dekant via ntg-context schrieb am 10.09.2021 um 19:25:
>>> Dear List,
>>> 
>>> I am trying to set up double pages at the beginning of a new part in such a 
>>> way that:
>>> - on an odd/right-hand page there will be number and the title typeset in 
>>> some fashion, and
>>> - on the even/left-hand page there should be a full (printpaper)size image.
>> 
>> https://www.mail-archive.com/ntg-context@ntg.nl/msg94581.html
>> 
>> Wolfgang
>> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

—
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] Use MetaPost to distort images?

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


> On 3 Sep 2021, at 11:28, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> Hi, is it possible to apply geometric transformations to images using 
> MetaPost?
> 
> This is again way over my head, but I’m still trying different methods to let 
> a ConTeXt document look more “hand-made”.
> 
> In my example*, I added frame and shadow to a photo and _distorted_ it 
> slightly to have it look like a postcard was glued on the page (with a piece 
> of tape). I’d like to automate and randomize that process.
> 
> I guess I could achieve something similar with ImageMagick (not with 
> GraphicsMagick), but if it would be possible inside LMTX that would be great.

No idea about MetaPost but "Fred's ImageMagic Scripts" 
<http://www.fmwconcepts.com/imagemagick/index.php> is a fantastic resource. 
Start with "vintage" 1, 2 & 3 towards the bottom.

The site is a little idiosyncratic in that you click and nothing appears to 
happen. This is because all the pages start with the same table of scripts at 
the top so you have to scroll down to see an example of the effect achieved by 
the script you just selected.

—
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] Why does HerosBold give bold italic?

2021-08-25 Thread Bruce Horrocks via ntg-context

> On 25 Aug 2021, at 13:56, Wolfgang Schuster 
>  wrote:
> 
> Bruce Horrocks via ntg-context schrieb am 25.08.2021 um 14:28:
>> Why does HerosBold give bold italic instead of just bold?
>> 
>> \definefont[TestA][name:Heros at 14pt]
>> \definefont[TestB][name:HerosBold at 14pt]
>> \definefont[TestC][name:HerosItalic at 14pt]
>> \starttext
>> \TestA {The quick brown}
>> \TestB {fox jumps over}
>> \TestC {the lazy dog}
>> \stoptext
> 
> I guess you try to use TeX Gyre Heros, when this is the case you use the 
> wrong names for the font. The correct names are in the following example.
> 
> Another problem is how you use the new font commands, unlike many other user 
> created commands \definefont creates a switch and you have to move the left 
> braces before the command.
> 
> \definefont [TestA] [name:texgyreheros*default at 14pt]
> \definefont [TestB] [name:texgyreherosbold*default at 14pt]
> \definefont [TestC] [name:texgyreherositalic*default at 14pt]
> 
> \starttext
> {\TestA The quick brown}
> {\TestB fox jumps over}
> {\TestC the lazy dog}
> \stoptext
> 
> 
> In my cases it is easier to use \switchtobodyfont rather than using a fixed 
> font style, below is a modified version of your example above. While the 
> example itself isn't very useful the method can be used to change the font 
> for a header, typing environment etc.
> 
> \usebodyfont[heros]
> 
> \starttext
> \style[style={\switchtobodyfont[heros,14pt]}]{The quick brown}
> \style[style={\switchtobodyfont[heros,14pt]\bf}]{fox jumps over}
> \style[style={\switchtobodyfont[heros,14pt]\it}]{the lazy dog}
> \stoptext

Thanks Wolfgang. I always get very confused when ConTeXt 'nearly' works and 
this was one of those times. Your \style example is interesting and I'll bear 
it in mind but at the moment I only need this for some one-off title page text 
rather than body text.

—
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] Why does HerosBold give bold italic?

2021-08-25 Thread Bruce Horrocks via ntg-context
Why does HerosBold give bold italic instead of just bold?

\definefont[TestA][name:Heros at 14pt]
\definefont[TestB][name:HerosBold at 14pt]
\definefont[TestC][name:HerosItalic at 14pt]
\starttext
\TestA {The quick brown}
\TestB {fox jumps over}
\TestC {the lazy dog}
\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
___


[NTG-context] Something broke between 2021.07.23 and 2021.08.19

2021-08-23 Thread Bruce Horrocks via ntg-context
I re-processed a previous issue of a journal and found that it no longer 
compiled. It worked fine in versions up to and including 2021.07.23 but fails 
by version 2021.08.19 19:48. It may have failed a little earlier than this - I 
don't always refresh every release.

The error in the console log is:

[...]
open source > level 2, order 9, name 'covers/inside-front-cover.tex'
tex error   > tex error on line 24 in file covers/inside-front-cover.tex: 

lua error:

registered function call [396]: 
...-64/tex/texmf-context/tex/context/base/mkxl/anch-pos.lmt:1286: attempt to 
call a nil value (upvalue 'texgetparstate')
stack traceback:
...-64/tex/texmf-context/tex/context/base/mkxl/anch-pos.lmt:1286: in 
function <...-64/tex/texmf-context/tex/context/base/mkxl/anch-pos.lmt:1262>
(...tail calls...)  
[...]

Unfortunately I can't create an MWE any smaller than a project with about 3 
sub-directories and half a dozen files. I don't really want to post it all here 
but happy to send a zip to Hans. (When it works it only creates a two page PDF 
so 'minimal' in that sense.)


Secondly, something a bit specific to Macos also broke for the latest version. 
Previously I had:
  \definefont [RPN] [Menlo*bold at 12pt]

but had to change that to 
  \definefont [RPN][file:Menlo.ttc at 12pt]

to get it compile. I thought it was something odd about Menlo (which is a Macos 
system font) at first which is why I changed to using the name: syntax but when 
this other problem came up I realised it too had worked previously.

—
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] Size of root symbol

2021-08-22 Thread Bruce Horrocks via ntg-context


> On 18 Aug 2021, at 17:06, Aditya Mahajan via ntg-context  
> wrote:
> 
> On Wed, 18 Aug 2021, Bruce Horrocks via ntg-context wrote:
> 
>> Is there a simple way to get both root signs in this MWE to be the same size?
>> 
>> \starttext
>> \startformula
>> \sqrt[3]{4n} \ne \sqrt[3] {n}
>> \stopformula
>> \stoptext
> 
> Make the quantities whose roots are being taken to be of the same size.
> 
> \starttext
> 
> % The simplest solution:
> \startformula
> \sqrt[3]{4n} \ne \sqrt[3] {\vphantom{4} n}
> \stopformula

Thanks Aditya, the \vphantom solution works for me -> now Wikified.

—
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] Losing a character during line break at a hyphen

2021-08-22 Thread Bruce Horrocks via ntg-context


> On 22 Aug 2021, at 10:27, Hans Hagen  wrote:
> 
> On 8/22/2021 1:27 AM, Bruce Horrocks via ntg-context wrote:
>>> On 22 Aug 2021, at 00:12, Bruce Horrocks via ntg-context 
>>>  wrote:
>>> 
>>> Not sure whether this is a ligature problem or a hyphenation problem or 
>>> both!
>> Smaller MWE - it's not hyphenation:
>> \starttext Diffe \stoptext
>> gives "Dife".
> if you're in a hurry you can patch font-ots.lmt, line 922
> 
>ligature = ligature.ligature
>else
>ligature = ligature.ligature
>end
> 
> and remake the format

Thanks Hans, your patch is working for me.

—
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] Losing a character during line break at a hyphen

2021-08-21 Thread Bruce Horrocks via ntg-context


> On 22 Aug 2021, at 00:12, Bruce Horrocks via ntg-context  
> wrote:
> 
> Not sure whether this is a ligature problem or a hyphenation problem or both!

Smaller MWE - it's not hyphenation:

\starttext Diffe \stoptext

gives "Dife".

—
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] Losing a character during line break at a hyphen

2021-08-21 Thread Bruce Horrocks via ntg-context
Not sure whether this is a ligature problem or a hyphenation problem or both!In the following MWE, the line breaks at the hyphen following "Diffe", but oneof the f's is lost so the PDF shows "Dife-".Latest LMTX, version 2021.08.19 19:48\starttextTwenty years after receiving it as a Christmas present, I have finally gotaround to reading The Code Book by Simon Singh. Written in 1999, whenE-commerce was still relatively new, the book provides accessible explanationsof the workings of Diffe-Hellman-Merkle key exchange, and Rivest, Shamir andAdleman (RSA) public-key cryptography.\stoptextOutput PDF attached.—Bruce HorrocksHampshire, UK

test.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] Strange new behaviour of the mailing list

2021-08-21 Thread Bruce Horrocks via ntg-context


> On 1 Aug 2021, at 15:16, Bruce Horrocks via ntg-context  
> wrote:
> 
>> 
>> On 31 Jul 2021, at 22:02, Henning Hraban Ramm via ntg-context 
>>  wrote:
>> 
>>> 
>>> Am 31.07.2021 um 21:19 schrieb Bruce Horrocks :
>>> 
>>> On 31 Jul 2021, at 14:56, Henning Hraban Ramm via ntg-context 
>>>  wrote:
>>>> 
>>>> Ah, I didn’t recognize you mean this.
>>>> 
>>>> Since the mail goes through the mailing list software, the sender must not 
>>>> be the original sender any more – ntg.nl is not allowed to send emails for 
>>>> a different domain. Many securely configured mail servers reject “faked” 
>>>> sender addresses, as they should. Look up DANE etc.
>>> 
>>> That's all well and good but it obscures the sender in your mail client. If 
>>> you look at the screen shot you can see that the older emails all display 
>>> the sender's name in the list. Under the new system (just the topmost 
>>> entry, shown selected) every email comes from "ntg-context@ntg.nl" which is 
>>> completely useless when you want to visually scan down the list for a 
>>> particular person.
>> 
>> It doesn’t make sense to argue about this, but it’s apparently a setting (or 
>> unchangeable behavior) of your Email app.
>> 
>> My Apple Mail 12.4 on Mojave shows the same message like attached (dark 
>> mode).
> 
> I'm on Big Sur and I don't get the "name via ntg-context" display for a 
> single message that your screen clip shows, so it looks like there has been a 
> change in behaviour of Apple's mail client as well.

Late reply, but for the benefit of anyone looking through the archive, I traced 
the cause of my problem to an entry in Contacts that had ntg-context@ntg.nl as 
the email address and no other details. Apple Mail decides to use this instead 
of the From: header when displaying the mailing list emails.

—
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] Size of root symbol

2021-08-18 Thread Bruce Horrocks via ntg-context
Is there a simple way to get both root signs in this MWE to be the same size?

\starttext
\startformula
\sqrt[3]{4n} \ne \sqrt[3] {n}
\stopformula
\stoptext

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 / 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] Strange new behaviour of the mailing list

2021-08-01 Thread Bruce Horrocks via ntg-context

> On 31 Jul 2021, at 22:02, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
>> 
>> Am 31.07.2021 um 21:19 schrieb Bruce Horrocks :
>> 
>> On 31 Jul 2021, at 14:56, Henning Hraban Ramm via ntg-context 
>>  wrote:
>>> 
>>> Ah, I didn’t recognize you mean this.
>>> 
>>> Since the mail goes through the mailing list software, the sender must not 
>>> be the original sender any more – ntg.nl is not allowed to send emails for 
>>> a different domain. Many securely configured mail servers reject “faked” 
>>> sender addresses, as they should. Look up DANE etc.
>> 
>> That's all well and good but it obscures the sender in your mail client. If 
>> you look at the screen shot you can see that the older emails all display 
>> the sender's name in the list. Under the new system (just the topmost entry, 
>> shown selected) every email comes from "ntg-context@ntg.nl" which is 
>> completely useless when you want to visually scan down the list for a 
>> particular person.
> 
> It doesn’t make sense to argue about this, but it’s apparently a setting (or 
> unchangeable behavior) of your Email app.
> 
> My Apple Mail 12.4 on Mojave shows the same message like attached (dark mode).

I'm on Big Sur and I don't get the "name via ntg-context" display for a single 
message that your screen clip shows, so it looks like there has been a change 
in behaviour of Apple's mail client as well.

—
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] Strange new behaviour of the mailing list

2021-07-30 Thread Bruce Horrocks via ntg-context
On 30 Jul 2021, at 22:24, Otared Kavian via ntg-context  
wrote:
> 
> Hi all,
> 
> I noticed that beginning July 27th, the messages distributed by the ConTeXt 
> mailing list appear to be from
> 
>   Mailing list for ConTeXt users
> 
> without the actual name of the sender appearing. It may be dependent on the 
> mail client I am using (Mail.app on MacOS 11.4), but I wonder whether 
> something has changed on mailing list server, and whether if there is 
> something I can do to have the old behaviour (which was convenient when one 
> wanted to follow up mails from some specific contributors). 
> 
> Also has anybody else noticed this change?
> 
> Thanks in advance for any hint.
> Best regards: Otared

I see the same thing, also on Macos. Looking at an older message, I see that 
the Reply-To: header has changed from

Reply to: Bruce Horrocks ,
  mailing list for ConTeXt users 

to

Reply to: mailing list for ConTeXt users 


So I suggest that there is little you can do as it appears to be a 
configuration change on the mailing list server; and Apple Mail doesn't have 
the facilities to easily allow you to re-write that header

—
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] Different Typing Styles

2021-07-28 Thread Bruce Horrocks via ntg-context


> On 28 Jul 2021, at 13:13, Jeroen via ntg-context  wrote:
> 
> Is there a way to have two different styles of typing. I tried the following, 
> but it does not seem to work.
> 
> \setuptyping[abc][style=\ttx]
> \setuptyping[def][style=\ttxx]
> 
> \starttext
> 
> \starttyping[abc]
> example
> example
> \stoptyping
> 
> \starttyping[def]
> example
> example
> \stoptyping
> 
> \stoptext
> 

Use \definetyping (and \start..\stop) instead so:

\definetyping[abc][style=\ttx]
\definetyping[def][style=\ttxx]

\starttext

\startabc
example
example
\stopabc

\startdef
example
example
\stopdef

\stoptext

Probably best to capitalise Abc & Def as well just in case you choose a name 
that is already in use.

—
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] mp-geo Metapost package with ConTeXt

2021-07-17 Thread Bruce Horrocks


> On 16 Jul 2021, at 20:55, Hans Hagen  wrote:
> 
> On 7/15/2021 10:30 PM, Bruce Horrocks wrote:
>> On 15 Jul 2021, at 18:58, Hans Hagen  wrote:
>>> 
>>> I was wondering about that too. I admit that I looked into maps years ago 
>>> but never could find quality data files.
>> Does this help?
>> <https://www.naturalearthdata.com>
> i was halfway writing as reader for that fiel format when i noticed that is 
> is also quite low res so i gave up on that and started playing (extending) 
> with an more interesting alternative that mojca and i wrote years ago at a 
> meeting

Off the top of my head I'm not aware of any higher resolution sources of global 
data - what scale were you thinking of?

For the UK there are free maps down to street level, either as a single file or 
API. The API details are here:
<https://www.ordnancesurvey.co.uk/business-government/products/maps-api>

The license allows free use for apps made available to the public.

—
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] mp-geo Metapost package with ConTeXt

2021-07-15 Thread Bruce Horrocks
On 15 Jul 2021, at 18:58, Hans Hagen  wrote:
> 
> I was wondering about that too. I admit that I looked into maps years ago but 
> never could find quality data files.

Does this help?
<https://www.naturalearthdata.com>

—
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] Problem with chapter numbering

2021-07-14 Thread Bruce Horrocks
On 13 Jul 2021, at 18:47, Fabrice Couvreur  wrote:
> 
> Hi,
> For my book, the header for each chapter should be like the attached image. I 
> don't know if I am using the best method, but the result looks like what I 
> want. Nevertheless, I am having a problem.
> I don't understand why the first chapter is not numbered while the second is 
> with number 1 etc.
> Thanks.
> Fabrice

You were nearly there. Use:

\unexpanded\def\processheadnumber#1%
   {\getmarking[chapternumber][current]}

—
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] weekend upload

2021-07-11 Thread Bruce Horrocks


> On 9 Jul 2021, at 17:29, Hans Hagen  wrote:
> 
> This weekend upload has something new for metapost animation lovers:

Forgive my ignorance but what exactly am I supposed to be seeing here? I run 
the example and get two rows of ten boxes. They don't move so it's not like an 
animated GIF was put into the PDF and they don't appear to be consecutive 
frames that could be joined into an animated GIF.

—
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] Rolling out a pandoc-context publication workflow in an organization

2021-07-01 Thread Bruce Horrocks
On 1 Jul 2021, at 07:02, Jan U. Hasecke  wrote:
> 
> If we use the current lmtx distribution, all editors would have to install 
> ConTeXt with the install.sh script on their private computers, then we would 
> either call a post installation script to clone the repositories in 
> texmf-project or to clone them in another folder and set links to 
> texmf-project. Linking seems better as I am not sure what "context generate" 
> would do with the .git folder inside the repositories.

One option you might try, if your cooperative has a web-server available to 
editors, is to store your own ConTeXt repository. That way you can update the 
LMTX version when you are ready to.

This works because "install.sh" can have a "--server" parameter supplied. By 
default it goes to lmtx.pragma-ade.com/install-lmtx but if you were to copy the 
install-lmtx directory and host the copy on your own server at the same path, 
then you could 'freeze' your LMTX version until you were ready to change.

Since editors might run the install.sh themselves, you would probably want to 
tweak your local copy of install.sh to only install from your own server.

When a new version of LMTX comes out, and when you have the time, you can 
install normally on a test machine and run whatever regression tests you want. 
Once happy you take a fresh copy of 
"https://lmtx.pragma-ade.com/install-lmtx/texmf-context.zip; onto your server 
and ask your editors to run install.sh at their own convenience.

—
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] 15th International ConTeXt Meeting (early bird closes)

2021-06-30 Thread Bruce Horrocks

> On 30 Jun 2021, at 15:23, Taco Hoekwater  wrote:
> 
> Just a quick reminder that early bird registration for the ConTeXt meeting 
> 2021
> in Bassenge officially ends today. I’ll be a bit lenient about the actual 
> money 
> transfer, but you should fill in the registration form today or at the very 
> last
> tomorrow, if you want to be eligible for the early bird discount.
> 
>   https://meeting.contextgarden.net/
> 
> In other news, there is now an abstracts page with lots of talk topics added 
> by Hans himself. Check that out as well!

In other news the early bird deadline in the table header row on the linked 
page is 11th July.

;-)

—
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] typescripts and variants

2021-06-23 Thread Bruce Horrocks

> On 23 Jun 2021, at 07:43, Henning Hraban Ramm  wrote:
> 
> You can combine whatever you like in one typescript, but you’re restricted to 
> six styles (regular, italic, slanted, bold, bold italic, bold slanted). You 
> can just “abuse” the italic or slanted styles for your other weights.

If we're restricted to six styles why does this Wiki page show seven?

<https://wiki.contextgarden.net/Simple_Typescript_Example>

Not meant as a criticism - just a naive question from someone who is puzzled.
—
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] LMTX install

2021-05-23 Thread Bruce Horrocks
I just setup a Mint virtual machine as a test and it all worked as expected so 
I'm not sure why you're having a problem. However you wrote earlier that you 
are using "Mint 21" but I can only find "Mint 20.1 LTS" - I assume that's what 
you meant?

If so then I suggest that you create a new Linux user and try installing under 
that new user. If it works then it's something in your user account. If it 
fails then ... well, we're no worse off. :-)

> On 23 May 2021, at 11:14, jbf  wrote:
> 
> Then something is not making sense (to me).
> 
> .bashrc clearly shows: export 
> PATH=$PATH:/home/me/bin/context/tex/texmf-linux-64/bin, so does that not mean 
> that bin can be found via the path? So why does 'context myfile.tex' not work?
> 
> If I run a full path (. /home/me/bin/context/tex/texmf-linux-64/bin/mtxrun 
> context myfile.tex) I get the message 'cannot execute binary file' and yet 
> mtxrun is executable. I checked. Clearly I am making a basic error, but 
> cannot work out what.

—
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] LMTX install

2021-05-23 Thread Bruce Horrocks
On 23 May 2021, at 07:52, jbf  wrote:
> 
> Someone will quickly clarify what I am doing wrong here. Have used mkiv until 
> now but decided to download and install LMTX in /home/me/bin/context.
> 
> I then ran  export PATH=/home/me/bin/context/tex/texmf-linux-64/bin:$PATH as 
> the install script indicated at the end.
> 
> When running mk iv, I always first ran a setup line (in my case it was . 
> /home/me/Documents/Freedom/Context/tex/setuptex). Do I need to run a setup 
> also for LMTX installed as above? And what one, because there is no 
> 'setuptex' as far as I can see. If I just run context myfile.tex I get the 
> mtxrun  | unknown script 'context.lua' or 'mtx-context.lua' message. 
> Does this mean my 'path' command didn't work (and why not? It should have) or 
> do I still need to run a setup before I try to compile?

You don't say which Linux you are using so I would first check to see that 
 /home/me/bin/context/tex/texmf-linux-64/bin/mtxrun
is executable.

I assume that you followed the instructions on the wiki page here?
<https://wiki.contextgarden.net/Installation>

(Sorry to be so pedantic but it helps us to know exactly what you have done.)

—
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] Issue running ConTeXt from TeX Live 2019 on Alpine Linux 3.12

2021-05-06 Thread Bruce Horrocks
On 3 May 2021, at 09:29, Nicola  wrote:
> 
> 
> Sorry, my explanation of what I am trying to achieve was a bit too
> terse.
> 
> There is a little wonderful app on the App Store, called iSH
> (https://github.com/ish-app/ish), which essentially allows you to run
> a 32-bit x86 Alpine Linux distribution on the iPad. One feature of the
> app is that it can import and mount several "file systems". One way to
> create such a file system is to export a Docker container.
> 
> So, what one can do is create a Docker container in some other device (I
> use my laptop), configure it as desired, then export it into a .tar
> archive, copy it into the iPad, and import it into iSH. This is better
> than installing/building packages directly inside the app, because (a)
> compiling on the iPad is extremely slow, and (b) some packages may raise
> errors if one tries to install them inside the app (TeX Live being one
> of them: this link explains the issue and the Docker workaround:
> https://github.com/ish-app/ish/issues/1123).
> 
> iSH emulates x86_32 and uses Musl. AFAICS, ConTeXt LMTX currently only
> provides a 64-bit download for Linux Musl. So, the next best alternative
> is to use ConTeXt from TeX Live.
> 
> So, this is where I am at: I am trying to make ConTeXt work inside an
> x86 Alpine Linux Musl container, using the official Alpine package.


Thank-you for the explanation - that's much clearer.

I've experimented a bit with Docker and I've managed to get a stand-alone LMTX 
install to work under a 32-bit Alpine Linux that has had the glibc library 
added. This should - fingers crossed - work in iSH.

You need to set up a working directory containing:
- the 32-bit LMTX downloaded from 
"http://lmtx.pragma-ade.nl/install-lmtx/context-linux.zip;
- the file "Dockerfile" that is attached to this email
- the modified LMTX install file "alpine-glibc-install.sh" that is attached to 
this email
- a subdirectory "sources" where you can place a hello world tex file

Use the following commands to build and run the container:

  $ docker build . -t context-alpine-glibc
  $ docker run -it -v $(pwd)/sources:/src context-alpine-glibc /bin/ash

The run command bind mounts the sub-directory "sources" so that it is 
accessible from within the container as the /src directory.[2]

Once you are in the container run these commands to process the hello world 
document:

  # cd /src
  # context hello_world.tex

There's no PDF viewer installed so you'll need to view it from the host in 
"sources". On the Mac this works as expected. Over to you to try in iSH. :-)


[1] The install.sh file needs to be hacked because the CPU architecture check 
(uname -m) returns the word size of the host computer, not the container, so I 
just hard-coded the values. :-)

[2] On Windows use something like:
  $ docker run -it -v %cd%/sources:/src context-alpine-glibc /bin/ash


—
Bruce Horrocks
Hampshire, UK


Dockerfile
Description: Binary data


alpine-glibc-install.sh
Description: Binary data
___
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] Issue running ConTeXt from TeX Live 2019 on Alpine Linux 3.12

2021-05-02 Thread Bruce Horrocks


> On 1 May 2021, at 21:35, Nicola  wrote:
> 
> On 2021-05-01, Bruce Horrocks  wrote:
>>> On 30 Apr 2021, at 19:53, Nicola  wrote:
>>> 
>>> I'd like to run ConTeXt on Alpine Linux (ultimately, to run it on an
>>> iPad with the iSH app). I am currently testing it with Docker. This is
>>> what I have done:
>>> 
>>>  docker pull econcz/x86-alpine-glibc:ish-import
>> 
>> Why is your first line not
>> 
>>  $ docker pull alpine
> 
> I was following the documentation of iSH, which is where I want to use
> the container eventually. But I may probably use the alpine image as
> well, which is more up to date and allows me to install TeX Live 2020.
> 
>> I would start with that then test each new step at the interactive
>> shell before adding to the compose file and moving onto the next step.
> 
> Unfortunately, even with the image above I get the same errors.

Sorry for the late reply - I missed this in the thread.

You're not going to be able to get the Docker container to run on the iPad if 
that's what you were ultimately hoping. This is because of the different 
processor types used by most PCs versus the iPad. As far as I know there is no 
way to get Docker installed on a PC to cross-compile for the ARM architecture 
of an iPad; and even if you could, the resulting image would have to be 
cryptographically signed by a registered Apple developer and then signed by 
Apple or it won't run. The iSH documentation that I briefly looked at used a 
'side-load' technique i.e. relied on what's called a 'jailbroken' iPad. This 
invalidates your warranty yadda yadda and you don't really want to go there 
except perhaps for the intellectual exercise.

The next best alternative would be to run TeX Live plus LMTX on a PC and 
connect to it remotely using the iPad. This could be via a text-only terminal 
app or a remote desktop app.

The remote PC that you connect to could be yours at home (cheap but carries a 
security risk unless you know what you're doing) or in the cloud (requires a 
subscription but the security is less of an issue since you build the machine 
to be disposable on the assumption that hackers will get to it).

Either way, I don't think Docker is the first choice solution (unless, perhaps, 
you have a home NAS that supports Docker - yet another option).

If you still want to build a Docker container then please say so - as I'm sure 
it could be done.

—
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] Issue running ConTeXt from TeX Live 2019 on Alpine Linux 3.12

2021-05-01 Thread Bruce Horrocks


> On 30 Apr 2021, at 19:53, Nicola  wrote:
> 
> I'd like to run ConTeXt on Alpine Linux (ultimately, to run it on an
> iPad with the iSH app). I am currently testing it with Docker. This is
> what I have done:
> 
>docker pull econcz/x86-alpine-glibc:ish-import

Why is your first line not

   $ docker pull alpine

?

I would start with that then test each new step at the interactive shell before 
adding to the compose file and moving onto the next step.
—
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] margin in TocEntry definition

2021-03-11 Thread Bruce Horrocks


> On 11 Mar 2021, at 22:22, jbf  wrote:
> 
> Thanks for trying, Bruce. That earlier question you refer to was for a 
> similar situation and the answer resolved that one at the time (it was my 
> question even then!) but not the precise one I am facing now.
> 
> The problem, you see, is that \startalignment only offers a few key words 
> like flushleft, middle etc. and not what I need this time, which is a precise 
> indentation feature like .5cm. I suppose my real problem is not being 
> sufficiently au fait with how definitions work. I just can't seem to get a 
> definition that gives me a result like
> 
> Chapter title
>author . page number
> 
> the \startalignment approach with flushleft would not give me the indentation 
> obviously, and middle does not work for what I need, and either of them also 
> pushes the page number line down onto the next line, which I don't want. I 
> tried \skip .5cm, so:
> 
> \define[1]\SectionTocEntry{%
> #1\crlf% title
> \hskip 
> .5cm\doifnot{\structurelistuservariable{author}}{}{\structurelistuservariable{author}}%
> }
> 
> But the \hskip is ignored at the beginning of a line. I wonder if there is 
> something else I can substitute it for?

D'oh! Sorry - completely forgot about the indent.

Best I can come up with at the moment is this - but I'm not sure how to get 
leading dots.

\starttext

\define[3]\SectionToCEntry{
  #2\crlf
  \leftaligned
  \bgroup
\hskip 0.5cm
\structurelistuservariable{author}
\rightaligned
 \bgroup
   #3
 \egroup
  \egroup
}

\setuplist
  [chapter]
  [alternative=command,
   command=\SectionToCEntry,
   after=\endgraf]

\completecontent

\startchapter
  [title={This is my chapter title}]
  [author={Dummy Name}]
\input Tufte
\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] margin in TocEntry definition

2021-03-11 Thread Bruce Horrocks

> On 11 Mar 2021, at 02:20, jbf  wrote:
> 
> Hi list,
> 
> I have:
> 
> \define[1]\SectionTocEntry{%
> #1\crlf% title
> \doifnot{\structurelistuservariable{author}}{}{\structurelistuservariable{author}}%
>   }
> 
> which successfully gives me a ToC with:
> 
> Chapter title
> Author name
> 
> But I want the author name indented by .5cm and do not know how to use 
> 'margin' in the above definition, or some other way of getting the 
> indentation. I have tried various versions of 'margin' before the \doifnot 
> part of the definition, but to no avail.

There is a very similar previous question that might be what you are looking 
for.
<https://www.mail-archive.com/ntg-context@ntg.nl/msg97548.html>

Try that but use 'flushleft' instead of 'middle'.

—
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] Possible problem with context using the ARM 64bit download for Apple Silicon M1

2021-02-23 Thread Bruce Horrocks
On 23 Feb 2021, at 19:20, Hans Hagen  wrote:
> 
> On 2/23/2021 8:10 PM, Keith McKay wrote:
>> Thanks for your reply Hans.
>> I half suspected that the ARM version was experimental but thought I should 
>> report it anyway.
>> Much as I would love to donate an ARM mini to the farm the best I can do is 
>> offer to compile on my mac mini Silicon M1, however, I would have to add the 
>> caveat that this is something I have never done so would need a lot of hand 
>> holding.
> it would mean opening up your machien to mojca, adding it to the compile farm 
> etc etc .. not a good idea, keeping it running 24/7 because we cannot afforc 
> to miss a binary ... so we just wait till these arm machines make in into our 
> homes .. no hurry i guess

Are the source files and test cases in a Git / Mercurial / Fossil / whatever 
repository somewhere? It would be easy enough to set up an automated daily 
check to see if there had been a change and then trigger a fresh build.

It doesn't even need to be that integrated - just a check on the latest intel 
binary and if that has been touched then trigger a download and local compile.

If Keith's scripting skills aren't up to it then I could do it and then 
developer sign and upload the resulting binary to OneDrive or similar.

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] Lua code and table

2021-02-17 Thread Bruce Horrocks


> On 17 Feb 2021, at 17:40, Fabrice Couvreur  
> wrote:
> 
> Hi, The code works, but is it possible to make it shorter ? 
> Thank you
> Fabrice
> 

You can reduce the size of the test by storing the pattern in a table:

\startluacode
  local background_one = {
   align = "middle",
   style = "type",
   background = "DiagonalRule",
  }

  local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H" }
  local pattern_1 = { 
".XXX..XX",
"X...XXX.",
"X..X.XXX",
"X.X.X..X",
".X.X.XX.",
".XX.X...",
"XXX.X...",
"X.XX" }
  context.startxtable({"align={middle,lohi}, 
width=0.8cm,offset=0.8ex,bodyfont=9pt,framecolor=cyan"})
  context.startxrow()
  context.startxcell({"frame=off"})
  context()
  context.stopxcell()
  for _, letter in ipairs(letters_1) do
context.startxcell()
context(letter) context.stopxcell()
  end
  context.stopxrow()
   for i, letter in ipairs(letters_1) do
  context.startxrow()
context.startxcell()
context(letter)
    context.stopxcell()
  for j = 1, 8 do
context.startxcell( string.sub(pattern_1[i],j,j) == "X" and background_one )
  context()
  context.stopxcell()
  end
  context.stopxrow()
  end
  context.stopxtable()
\stopluacode

—
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] A not so short introduction to ConTeXt Mark IV

2021-01-05 Thread Bruce Horrocks


> On 5 Jan 2021, at 20:31, Garulfo  wrote:
> 
> Hi all,
> 
> I saw that Mojca created a directory
> https://github.com/contextgarden/not-so-short-introduction-to-context
> 
> Joaquín, if you agree, and if
> - you provide me with the spanish + english source codes
> - Mojca provide you and me with github write access (garulfogb account)
> 
> i could :
> 1/ push the current code
> 2/ start to write a github wiki page (+ link on contextgarden) to describe :
> - for you : how to update from your own computer (the official source)
> - for any user : how to use git to get the source + link to this list for 
> discussion.
> 
> Does anybody has a guide about "how to set up a documentation translation 
> project with git ?".
> One requirement will probably to define how propositions are officially 
> validated. Does it requires Joaquín to learn how to use git ? Can we just 
> work by sending files (or patches) to Joaquín who will update with a single 
> git command ?

I think we need to be really clear about what we want to achieve here.

1) Is it just making the source plus the PDF available for download? If so then 
there are plenty of simpler ways to do that than using Git.

2) If it is to gather feedback on things like typos then we don't need Git. For 
example I spotted a missing ']' in the English translation so all I need is a 
way to submit a 'bug report' not access to the source.

3) So what is left? To provide a way for translators to be notified of changes 
to the original? To provide a collaboration mechanism for significant changes 
to the document?

I don't see that Git adds much in the way of value unless Joaquín and the 
translators are already very familiar with it -- because the learning curve is 
very steep and recovering from mistakes (made to the repository itself rather 
than to the document content) can sometimes be extremely difficult.

--
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] xrightarrow specific size issue

2021-01-02 Thread Bruce Horrocks


> On 1 Jan 2021, at 14:25, Johann Birnick  wrote:
> 
> Hi Aditya,
> 
> I know the syntax, my problem is about the options for the length of the 
> arrow.
> 
> For example
> 
> \xrightarrow[big]{abc}
> 
> gives a longer arrow than
> 
> \xrightarrow{abc}
> 
> According to different manuals also specific lengths should be possible. But
> they don't work. I think it's a bug. (because the example from a documentation
> doesn't work)
> 
> Best regards,
> Johann

I'm not sure which manual you are looking in to find a reference to the ability 
to add a specific dimension.

In the source I can only find named sizes of 'none', 'normal', 'small', 
'medium' and 'big'. You can 'kludge' these by extending the length of the text 
using hard spaces. Alternatively there is \rightarrowfill which you might be 
able to put into a frame of the desired width?

\starttext
$1\xrightarrow[none]{blah} 1$
\par
$2\xrightarrow[normal]{blah} 2$
\par
$3\xrightarrow[small]{blah} 3$
\par
$4\xrightarrow[medium]{blah} 4$
\par
$5\xrightarrow{~~~blah~~~} 5$
\par
$6\xrightarrow[big]{blah} 6$
\par
$7\rightarrowfill 7$
\par
\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] checkbox in fields show the word yes

2020-12-11 Thread Bruce Horrocks


> On 11 Dec 2020, at 08:21, Floris van Manen  wrote:
> 
> 
> 
> On 11/12/2020 08:46, Jan U. Hasecke wrote:
>> as nobody answered I would like too repeat my question.
> 
> This is what I see


On a Mac running BigSur...
1) using the TeXShop built-in PDF viewer I see the word "yes" inside the box
2) in the 'Preview' app I see "yes" in the box
3) using Adobe Acrobat Reader DC I get:
  a) Initially a blank / grey box
  b) Hovering the mouse over the grey bit displays "yes" and the cursor changes 
from I-beam to hand
  c) Single clicking displays the word "yes"
  d) Move focus to another app and the word "yes" is replaced with a tick mark 
in the box
  e) Move focus back to Acrobat, hover over the box and the tick mark changes 
to "yes"
  f) Click the tick and the box changes to "yes"
  g) Move focus to another app and the box changes to blank i.e. unticked

I've no idea whatsoever what to do about it or suggest which is why I didn't 
reply before.

--
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] Quirk with \userpagenumber, datasets and the .tuc file

2020-12-09 Thread Bruce Horrocks
Here's an odd quirk...

I wanted to get at some of my dataset data for use outside of ConTeXt so I 
thought I would just extract it from the .tuc file. MWE:

  \definedataset [MyDS][delay=yes]
  \starttext
  \input tufte
  \setdataset [MyDS]
[ title={Test title},
  page={\userpagenumber},
]
  \stoptext

In the TUC file I get:

  utilitydata.job.datasets.collected={
   ["MyDS"]={
{
 ["index"]=1,
 ["order"]=1,
 ["page"]="1\\relax ",
 ["realpage"]=1,
 ["title"]="Test title",
},
   },
  }

Note the \\relax following the page number. This isn't a problem for me at the 
moment but I wondered if it is something that needs to be looked at?

--
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] Scite and Mac OS

2020-12-05 Thread Bruce Horrocks

> On 5 Dec 2020, at 11:48, MANUEL GONZALEZ SUAREZ  
> wrote:
> 
> Regarding the first question, Scite comes from the App Store. I have 
> downloaded and installed it. When I open Scite, I can open .tex files without 
> problem, but when I try to compile, I get an error. On the other hand, there 
> is no syntax highlighting nor do they appear in the taskbar> options, the 
> preferences to configure ConTeXt.properties, etc.
>  Thank you.

I never thought to look on the App store - but now I have ... I won't be 
buying. ;-)

For that kind of money I suggest you email the author for help. Failing that I 
assume you have tried everything suggested here 
<http://www.pragma-ade.com/general/manuals/scite-context-readme.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 / 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] Scite and Mac OS

2020-12-04 Thread Bruce Horrocks


> On 4 Dec 2020, at 08:18, MANUEL GONZALEZ SUAREZ  
> wrote:
> 
> Hello everyone:
> I don't know if anyone can help me. I have installed the Scite editor on a 
> Mac OS Catalina computer and I cannot configure the editor to work with 
> ConTeXt files. Could someone give me some quick setup instructions? With 
> Windows and Linux I have no problems.
> Thank you.
> M. González.

I don't have it installed and when I Googled I couldn't find what appeared to 
be a definitive pre-built image. So the first question is: where did you get 
your image from?

Secondly, what exactly do you mean by "configure the editor to work with 
ConTeXt files"? Simply open them? Or understand the syntax to allow syntax 
highlighting? Or something else?

To open them you need to pick an extension - I use .tex - then option-click a 
.tex file -> choose 'other' -> find Scite in the list of apps -> tick "Always 
open with" -> click Open and it should then associate Scite with .tex files.

--
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] Placing extra bookmarks?

2020-12-02 Thread Bruce Horrocks


> On 2 Dec 2020, at 18:42, Hans Hagen  wrote:
> 
> On 12/2/2020 12:10 AM, Bruce Horrocks wrote:
>> On 1 Dec 2020, at 16:37, Henning Hraban Ramm  wrote:
>>> 
>>>> Am 01.12.2020 um 15:36 schrieb Bruce Horrocks :
>>>> 
>>>> I have \placebookmarks[chapter] in my doc and all is fine except that I'd 
>>>> like to force an extra bookmark at the top of the list that jumps to the 
>>>> cover page. However there is no chapter title, or other built in style on 
>>>> the cover.
>>>> 
>>>> I tried inserting \bookmark[chapter]{The Cover} but nothing happened - no 
>>>> error, no bookmark.
>>>> 
>>>> Any suggestions please? There's no need to bookmark to a specific point - 
>>>> just going to page 1 would be enough.
>>> 
>>> Did you enable interactions? \setupinteractions[state=start]
>>> 
>>> But when I recently tried to manually set some bookmarks instead of visible 
>>> chapter titles, I also didn’t get any; didn’t investigate further yet.
> there are some examples in the test suite (sections/bookmarks-*.tex)
> 
> You can specify bookmarks when you use \startsection etc an dalso add them 
> any place to named lists.

Thanks Hans - I never thought to look in the test cases (d'oh!).

For the benefit of those searching the archives in the future, here is an MWE 
adapted from one of the test cases that places one bookmark via a chapter 
heading and one manually that is not linked to any document section.

\enabletrackers[references.bookmarks,backend.resources] % For debug only

\setupinteraction
  [state=start]

\setupinteractionscreen
  [option=bookmark]

\definelist
  [mylist]
  
\placebookmarks[chapter,mylist]

\starttext
\input zapf
\bookmark[mylist]{Bookmark not linked to a section heading}
\input zapf

\page[yes]
\startchapter[title=Tufte]
\input tufte
\stopchapter
\stoptext

I shall add it to 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 / 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] Placing extra bookmarks?

2020-12-01 Thread Bruce Horrocks
On 1 Dec 2020, at 16:37, Henning Hraban Ramm  wrote:
> 
>> Am 01.12.2020 um 15:36 schrieb Bruce Horrocks :
>> 
>> I have \placebookmarks[chapter] in my doc and all is fine except that I'd 
>> like to force an extra bookmark at the top of the list that jumps to the 
>> cover page. However there is no chapter title, or other built in style on 
>> the cover.
>> 
>> I tried inserting \bookmark[chapter]{The Cover} but nothing happened - no 
>> error, no bookmark.
>> 
>> Any suggestions please? There's no need to bookmark to a specific point - 
>> just going to page 1 would be enough.
> 
> Did you enable interactions? \setupinteractions[state=start]
> 
> But when I recently tried to manually set some bookmarks instead of visible 
> chapter titles, I also didn’t get any; didn’t investigate further yet.

Thanks for the suggestion, but I already had \setupinteraction[state=start] 
set. (Note 'interaction' - no 's')

I eventually found a previous thread on the mailing list archive.
<https://www.mail-archive.com/ntg-context@ntg.nl/msg86919.html>

From that I was able to add the following to my document setup:

  \definehead [Bookmark] [title] 
[ placehead=empty,
  before={},
  after={},
]
  \setupinteraction[state=start]
  \setupinteractionscreen[option=bookmark] 
  \placebookmarks[chapter,heading,Bookmark][chapter][force=yes]

And then in the text where I want each extra bookmark to appear I use:

  \Bookmark[title={The text of the bookmark}]
  
This works but is a bit of a kludge because it assumes that you aren't using 
'title' sections in your document already. If you are then they will all appear 
in the PDF bookmarks.

Also note that the bookmark is inserted at the chapter/title level. If you want 
a sub-bookmark then you need to add another custom heading, viz:

  \definehead [SubBookmark] [subject] 
[ placehead=empty,
  before={},
  after={},
]

and add it into the \placebookmarks list:

  \placebookmarks[chapter,heading,Bookmark,SubBookmark][chapter][force=yes]

and invoke it using:

  \SubBookmark[title={A sub-bookmark}]

In the PDF, this will be nested under the previous higher-level bookmark.

Given that this is a kludge, and that the \bookmark command doesn't seem to 
work at all, perhaps it can be resurrected into a new form, something like:

  \bookmark[n][focus]{Text}

  - n is the level 1, 2, 3 etc
  - (optional) focus overrides \setupinteraction (assuming PDF allows it)
  - text is the text to show 

and have this insert a bookmark at that point, regardless of whatever the 
heading mechanism is doing?

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   >