Re: [NTG-context] Puzzle (for me)

2020-03-31 Thread Henri Menke
On 01/04/20, 01:20, Gerben Wierda wrote:
> I have a string with double quotes that needs to become a text in a box in 
> METAPOST. METAPOST is used to create an image consisting of boxes and 
> connections.
> 
> Basically, the approach is now something like this:
> 
> TeX: calls Lua code with \ctxlua{filename}
> Lua: context.startMPpage
> Lua: read XML. String in XML in filename read by Lua
>   Here we know the dimensions in which the string must be typeset and wrapped 
> around because that is also in the XML
> Lua: A context() call contains METAPOST code that calls a METAPOST vardef 
> (‘draw box’) with the string as argument
> METAPOST: Draws box and call TeX to typeset string using textext(), returns 
> picture object
> TeX: Typeset string
> 
> In short:
> TeX, calls
>   Lua, reads XML and executes context( MP code) that gets executed on 
> stopMPpage
>   MP code calls TeX which typesets the string
> 
> But, if the string contains double quotes (”) this will fail in METAPOST 
> because the double quotes in the string will be printed in METAPOST code that 
> is created by Lua and thus mess up METAPOST.
> 
> So, what can I do?

To get a double quote in a MetaPost string like this

"embedded " double quote"
  ^
  |___ oeps

use the ditto variable which expands to a string containing the double
quote character like so

"embedded " & ditto & " double quote"

Cheers, Henri

> 
> G
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Puzzle (for me)

2020-03-31 Thread Gerben Wierda
I have a string with double quotes that needs to become a text in a box in 
METAPOST. METAPOST is used to create an image consisting of boxes and 
connections.

Basically, the approach is now something like this:

TeX: calls Lua code with \ctxlua{filename}
Lua: context.startMPpage
Lua: read XML. String in XML in filename read by Lua
  Here we know the dimensions in which the string must be typeset and wrapped 
around because that is also in the XML
Lua: A context() call contains METAPOST code that calls a METAPOST vardef 
(‘draw box’) with the string as argument
METAPOST: Draws box and call TeX to typeset string using textext(), returns 
picture object
TeX: Typeset string

In short:
TeX, calls
Lua, reads XML and executes context( MP code) that gets executed on 
stopMPpage
MP code calls TeX which typesets the string

But, if the string contains double quotes (”) this will fail in METAPOST 
because the double quotes in the string will be printed in METAPOST code that 
is created by Lua and thus mess up METAPOST.

So, what can I do?

G
___
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] macOS

2020-03-31 Thread Willi Egger
If I understand the policy of Apple correctly, then it is that \usr is not 
meant to be a directory to be used by the user and therefore spotlight by 
default will not index anything in that directory. When opening Finder then the 
mentioned folder is not even shown i.e. it is hidden and spotlight will 
accordingly not index such directories.

Willi

> On 31 Mar 2020, at 10:44, Gerben Wierda  wrote:
> 
> I already had done all of that including command line versions like ‘sudo 
> mdutil -E’
> 
> It turns out macOS apparently excludes /usr (amongst other things) and I 
> haven’t found a way to configure that. So, when ConTeXt is installed in 
> /usr/local (which is pretty typical), SpotLight doesn’t find the manuals, 
> whereas when it has been installed in — say — /Applications, it will find 
> them.
> 
> G
> 
>> On 31 Mar 2020, at 06:21, janerik.hagglof  wrote:
>> 
>> Maybe this is the solution, haven't tried it myself.
>> 
>> https://support.apple.com/en-us/HT201716
>> 
>> Janne
>> 
>> 
>> 
>> Med Vänlig Hälsning 
>> 
>> Jan-Erik Hägglöf
>> 
>> 
>>  Originalmeddelande 
>> Från: Gerben Wierda 
>> Datum: 2020-03-30 23:52 (GMT+01:00)
>> Till: mailing list for ConTeXt users 
>> Ämne: [NTG-context] macOS
>> 
>> Spotlight on macOS can help me to find the right documentation. 
>> 
>> When I copy the contents of the folder (the manuals for ConTeXt) from its 
>> original location 
>> /usr/local/context-osx-64/tex/texmf-context/doc/context/documents/general/manuals
>>  to ~/Downloads/TestFolder they are indexed and found by Spotlight.
>> 
>> But not in their original location. Why? And how do I fix this, because I 
>> want the manuals and such in /usr/local to be found.
>> 
>> Any Mac user who knows?
>> 
>> G
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> ___
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> ___
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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] Fwd: Is de string interpretatie van het lua context() commando separaat benaderbaar?

2020-03-31 Thread Hans Hagen

On 3/31/2020 4:43 PM, Gerben Wierda wrote:

The lua context() command has a string interpretation, e.g.

function moduledata.test( astring)
   local testone = "{Hello}, \"(a)\" [World]!"
   context( "%!tex!", testone)
end

Two questions:
- Have all the lua commands been documented somewhere e.g. in a 
reference manual? Especially the basic context() command?


cld manual

- Is this string+arguments interpreter of context() available 
separately? I could use this to first let the string interpreter create 
a TeX-safe string after which I can manipulate the result before 
offering it to the context() command.

string.formatters


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Fwd: Is de string interpretatie van het lua context() commando separaat benaderbaar?

2020-03-31 Thread Gerben Wierda
The lua context() command has a string interpretation, e.g.

function moduledata.test( astring)
  local testone = "{Hello}, \"(a)\" [World]!"
  context( "%!tex!", testone)
end

Two questions:
- Have all the lua commands been documented somewhere e.g. in a reference 
manual? Especially the basic context() command?
- Is this string+arguments interpreter of context() available separately? I 
could use this to first let the string interpreter create a TeX-safe string 
after which I can manipulate the result before offering it to the context() 
command.

G___
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] Primes far too high in Lucida Type1

2020-03-31 Thread Tim Steenvoorden
Hi Wolfgang,

That 's a pity indeed. I played around a bit and found a dirty hack
using catcodes. Maybe not the best solution, but it works for me.
Posting it here for future reference.

```
\define\textprime{'}
\makecharacteractive '
\define'{\lowerbox{0.3ex}\hbox{\math{\textprime}}}
```

Cheers,
Tim

Op zo 29 mrt. 2020 om 21:04 schreef Wolfgang Schuster
:
>
> Tim Steenvoorden schrieb am 22.03.2020 um 12:10:
> > Hi all,
> >
> > I’m trying to typeset a document using Lucida Type1 fonts. Primes are
> > put way too high. Also, kerning with punctuation characters placed after
> > a prime are too wide. This can be seen in attached rendering of below
> > example.
> >
> > $e,\sigma \rightarrow e',\sigma’$
> >
> > Is there a quick way to fix this? I don’t have access tot the OTF
> > unfortunately. Running ConTeXt TeXlive 2019 on macOS 10.15.3.
>
> I'm sorry for the bad news but without a patch for the font (which can
> probably applied with a goodies file) there is nothing which can be
> done. As the Type 1 version of the Lucida fonts had a few problems in
> the last few years with ConTeXt MkIV I don't think Hans has much
> interest to fix them again (especially when you can expect new problems
> in the future).
>
> The best way here is to use another font or spend the money for the
> OpenType version.
>
> 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
___


Re: [NTG-context] Table-bug in lmtx?

2020-03-31 Thread Christian Prim
Hello Hans

many thanks for the fix!

Christian

Am Mo., 30. März 2020 um 22:45 Uhr schrieb Hans Hagen :

> On 3/30/2020 6:23 PM, Christian Prim wrote:
> > Hello list
> >
> > following MWE gives a strange error "(interwoven alignment preambles are
> > not allowed)" when processed with lmtx:
> >
> > \definetabletemplate[fosa][s0|xp(3.5cm)|lw(0.7cm)|xp(5cm)s2|lw(2.5cm)|]
> > \starttext
> > \starttable[fosa]
> > \NC Cell 1 \NC\Use3[p(8cm)]{A longer cell}\NC\AR
> > \MR
> > \NC Cell 1 \NC Cell 2 \NC Cell 3 \NC Cell 4 \NC\AR
> > \stoptable
> > \stoptext
> >
> > No problems in mkiv.
> > I think Use3 is the problem, but I'm not sure...
> I found the issue (in the engine) ... tomorrow I'll upload a new one.
>
> Hans
>
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
___
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] macOS

2020-03-31 Thread Gerben Wierda
I already had done all of that including command line versions like ‘sudo 
mdutil -E’

It turns out macOS apparently excludes /usr (amongst other things) and I 
haven’t found a way to configure that. So, when ConTeXt is installed in 
/usr/local (which is pretty typical), SpotLight doesn’t find the manuals, 
whereas when it has been installed in — say — /Applications, it will find them.

G

> On 31 Mar 2020, at 06:21, janerik.hagglof  wrote:
> 
> Maybe this is the solution, haven't tried it myself.
> 
> https://support.apple.com/en-us/HT201716
> 
> Janne
> 
> 
> 
> Med Vänlig Hälsning 
> 
> Jan-Erik Hägglöf
> 
> 
>  Originalmeddelande 
> Från: Gerben Wierda 
> Datum: 2020-03-30 23:52 (GMT+01:00)
> Till: mailing list for ConTeXt users 
> Ämne: [NTG-context] macOS
> 
> Spotlight on macOS can help me to find the right documentation. 
> 
> When I copy the contents of the folder (the manuals for ConTeXt) from its 
> original location 
> /usr/local/context-osx-64/tex/texmf-context/doc/context/documents/general/manuals
>  to ~/Downloads/TestFolder they are indexed and found by Spotlight.
> 
> But not in their original location. Why? And how do I fix this, because I 
> want the manuals and such in /usr/local to be found.
> 
> Any Mac user who knows?
> 
> G
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

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