[NTG-context] Question to lines in linetable

2019-04-27 Thread Tomas Hala
Hi all,

I tried linetable tables (mkiv, TL2017) because I need even
horizontal splitting. It works fine but I do not know how to make
either horizontal or vertical lines.

Have somebody got some experience with this?

Best wishes,

Tomáš

___
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 and system fonts

2019-04-27 Thread Aditya Mahajan

On Sat, 27 Apr 2019, Pablo Rodriguez wrote:


On 4/27/19 7:36 PM, Hans Hagen wrote:

On 4/27/2019 6:25 PM, Pablo Rodriguez wrote:

[...]
It seems as if LMTX couldn’t follow symlinks for directories in Linux.

On Windows, I will have to wait some days to have access to a computer
with it.

I tested linux on wsl and made a (soft) symlink there to a path under
/mnt/c and it just works. So i need more details.


I wish I could give more details.

Fonts are located in ~/Documents/ousia-fonts/. The soft link is
tex/texmf-fonts/ousia-fonts/.

If the soft symlink for the fonts directory is itself tex/texmf-fonts/,
ConTeXt LMTX handles the fonts right.


The texmf-fonts directory must follow TDS (tex document structure). 
Assuming that ~/Documents/ousia-fonts simply contains a bunch of 
directories with opentype fonts, I'd try symlinking it to


tex/texmf-fonts/font/opentype/data

Aditya___
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 and system fonts

2019-04-27 Thread Otared Kavian
Hi Pablo,

I don't know if this may help, but in principle in order to use systme fonts in 
LMTX you should invoke the mtxrun in the bin directory of your installation of 
LMTX. For me, working on MacOS, the following worked fine:

/context-osx-64/tex/texmf-osx-64/bin/mtxrun -generate

and then

/context-osx-64/tex/texmf-osx-64/bin/mtxrun --script font --reload

Best regards: OK

> On 27 Apr 2019, at 18:25, Pablo Rodriguez  wrote:
> 
> On 4/27/19 5:37 PM, Hans Hagen wrote:
>> On 4/27/2019 2:13 PM, Pablo Rodriguez wrote:
>>> [...]
>>> In Windows (I installed it again from scratch yesterday), system fonts
>>> (from c:/windows/fonts/) are simply ignored (I don’t know why).
>>> 
>>> In Linux, a symlink in tex/texmf-fonts/ to the directory where fonts are
>>> stored doesn’t work either.
>>> 
>>> The weird thing is that the ConTeXt Suite in both OSes works fine with
>>> system fonts or the mentioned symlink.
>> 
>> mtxrun --generate
>> mtxrun --script font --reload
> 
> I’m afraid it doesn’t work, Hans.
> 
> I even removed tex/texmf-cache/luatex-cache/, but no luck.
> 
> The only workaround I found in Linux is to add a symlinks to each font
> file. This works now.
> 
> It seems as if LMTX couldn’t follow symlinks for directories in Linux.
> 
> On Windows, I will have to wait some days to have access to a computer
> with it.
> 
> Many thanks for your help,
> 
> Pablo
> --
> http://www.ousia.tk
> ___
> 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] LMTX and system fonts

2019-04-27 Thread Pablo Rodriguez
On 4/27/19 7:36 PM, Hans Hagen wrote:
> On 4/27/2019 6:25 PM, Pablo Rodriguez wrote:
>> [...]
>> It seems as if LMTX couldn’t follow symlinks for directories in Linux.
>>
>> On Windows, I will have to wait some days to have access to a computer
>> with it.
> I tested linux on wsl and made a (soft) symlink there to a path under
> /mnt/c and it just works. So i need more details.

I wish I could give more details.

Fonts are located in ~/Documents/ousia-fonts/. The soft link is
tex/texmf-fonts/ousia-fonts/.

If the soft symlink for the fonts directory is itself tex/texmf-fonts/,
ConTeXt LMTX handles the fonts right.

I’m going to test this in a Linux live version, but I need to get an
empty USB stick first.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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 and system fonts

2019-04-27 Thread Hans Hagen

On 4/27/2019 6:25 PM, Pablo Rodriguez wrote:

On 4/27/19 5:37 PM, Hans Hagen wrote:

On 4/27/2019 2:13 PM, Pablo Rodriguez wrote:

[...]
In Windows (I installed it again from scratch yesterday), system fonts
(from c:/windows/fonts/) are simply ignored (I don’t know why).

In Linux, a symlink in tex/texmf-fonts/ to the directory where fonts are
stored doesn’t work either.

The weird thing is that the ConTeXt Suite in both OSes works fine with
system fonts or the mentioned symlink.


mtxrun --generate
mtxrun --script font --reload


I’m afraid it doesn’t work, Hans.

I even removed tex/texmf-cache/luatex-cache/, but no luck.

The only workaround I found in Linux is to add a symlinks to each font
file. This works now.

It seems as if LMTX couldn’t follow symlinks for directories in Linux.

On Windows, I will have to wait some days to have access to a computer
with it.
I tested linux on wsl and made a (soft) symlink there to a path under 
/mnt/c and it just works. So i need more details.


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
___


Re: [NTG-context] LMTX and system fonts

2019-04-27 Thread Pablo Rodriguez
On 4/27/19 6:25 PM, Pablo Rodriguez wrote:
> [...]
> The only workaround I found in Linux is to add a symlinks to each font
> file. This works now.

I mean, to add a symlink in tex/texmf-font/ for each in the original
font directory.

But a symlink in tex/texmf-font/ for the font directory itself doesn’t work.

Pablo
--
http://www.ousia.tk
___
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 and system fonts

2019-04-27 Thread Pablo Rodriguez
On 4/27/19 5:37 PM, Hans Hagen wrote:
> On 4/27/2019 2:13 PM, Pablo Rodriguez wrote:
>> [...]
>> In Windows (I installed it again from scratch yesterday), system fonts
>> (from c:/windows/fonts/) are simply ignored (I don’t know why).
>>
>> In Linux, a symlink in tex/texmf-fonts/ to the directory where fonts are
>> stored doesn’t work either.
>>
>> The weird thing is that the ConTeXt Suite in both OSes works fine with
>> system fonts or the mentioned symlink.
>
> mtxrun --generate
> mtxrun --script font --reload

I’m afraid it doesn’t work, Hans.

I even removed tex/texmf-cache/luatex-cache/, but no luck.

The only workaround I found in Linux is to add a symlinks to each font
file. This works now.

It seems as if LMTX couldn’t follow symlinks for directories in Linux.

On Windows, I will have to wait some days to have access to a computer
with it.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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] No menu bar option for Adobe Reader

2019-04-27 Thread Paul Schalck
Hi,

I use the "Hide menu bar" option extensively in Adobe Acrobat Reader to get a 
cleaner interface. To this end, I usually hack lpdf-mis.lua after a ConTeXt 
upgrade to create a \setupinteractionscreen[option=nomenubar] switch.

I wonder if it would be possible to add this little feature to the source code. 
Perhaps it can be useful to others as well.

Greetings!

Paul

Attachment: patch + modified lpdf-mis.lua (from ConTeXt MkVI 2019.04.25)if not modules then modules = { } end modules ['lpdf-mis'] = {
version   = 1.001,
comment   = "companion to lpdf-ini.mkiv",
author= "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license   = "see context related readme files"
}

-- Although we moved most pdf handling to the lua end, we didn't change
-- the overall approach. For instance we share all resources i.e. we
-- don't make subsets for each xform or page. The current approach is
-- quite efficient. A big difference between MkII and MkIV is that we
-- now use forward references. In this respect the MkII code shows that
-- it evolved over a long period, when backends didn't provide forward
-- referencing and references had to be tracked in multiple passes. Of
-- course there are a couple of more changes.

local next, tostring, type = next, tostring, type
local format, gsub, formatters = string.format, string.gsub, string.formatters
local flattened = table.flattened

local backends, lpdf, nodes = backends, lpdf, nodes

local nodeinjections   = backends.pdf.nodeinjections
local codeinjections   = backends.pdf.codeinjections
local registrations= backends.pdf.registrations

local nuts = nodes.nuts
local copy_node= nuts.copy

local nodepool = nuts.pool
local pageliteral  = nodepool.pageliteral
local register = nodepool.register

local pdfdictionary= lpdf.dictionary
local pdfarray = lpdf.array
local pdfconstant  = lpdf.constant
local pdfreference = lpdf.reference
local pdfunicode   = lpdf.unicode
local pdfverbose   = lpdf.verbose
local pdfstring= lpdf.string
local pdfflushobject   = lpdf.flushobject
local pdfflushstreamobject = lpdf.flushstreamobject
local pdfaction= lpdf.action
local pdfminorversion  = lpdf.minorversion

local formattedtimestamp   = lpdf.pdftimestamp
local adddocumentextgstate = lpdf.adddocumentextgstate
local addtocatalog = lpdf.addtocatalog
local addtoinfo= lpdf.addtoinfo
local addtopageattributes  = lpdf.addtopageattributes
local addtonames   = lpdf.addtonames

local pdfgetmetadata   = lpdf.getmetadata

local texset   = tex.set

local variables= interfaces.variables

local v_stop   = variables.stop
local v_none   = variables.none
local v_max= variables.max
local v_bookmark   = variables.bookmark
local v_fit= variables.fit
local v_doublesided= variables.doublesided
local v_singlesided= variables.singlesided
local v_default= variables.default
local v_auto   = variables.auto
local v_fixed  = variables.fixed
local v_landscape  = variables.landscape
local v_portrait   = variables.portrait
local v_page   = variables.page
local v_paper  = variables.paper
local v_attachment = variables.attachment
local v_layer  = variables.layer
local v_lefttoright= variables.lefttoright
local v_righttoleft= variables.righttoleft
local v_title  = variables.title
local v_nomenubar  = variables.nomenubar

local positive = register(pageliteral("/GSpositive gs"))
local negative = register(pageliteral("/GSnegative gs"))
local overprint= register(pageliteral("/GSoverprint gs"))
local knockout = register(pageliteral("/GSknockout gs"))

local omitextraboxes   = false

directives.register("backend.omitextraboxes", function(v) omitextraboxes = v end)

local function initializenegative()
local a = pdfarray { 0, 1 }
local g = pdfconstant("ExtGState")
local d = pdfdictionary {
FunctionType = 4,
Range= a,
Domain   = a,
}
local negative = pdfdictionary { Type = g, TR = pdfreference(pdfflushstreamobject("{ 1 exch sub }",d)) } -- can be shared
local positive = pdfdictionary { Type = g, TR = pdfconstant("Identity") }
adddocumentextgstate("GSnegative", pdfreference(pdfflushobject(negative)))
adddocumentextgstate("GSpositive", pdfreference(pdfflushobject(positive)))
initializenegative = nil
end

local function initializeoverprint()
local g = pdfconstant("ExtGState")
local knockout  = pdfdictionary { Type = g, OP = false, OPM  = 0 }
local overprint = pdfdictionary { Type = g, OP = true,  OPM  = 1 }

Re: [NTG-context] Strange backgroundcolors with showgrid and luacode

2019-04-27 Thread Pablo Rodriguez
On 4/27/19 4:34 PM, Wolfgang Schuster wrote:
>> [...]
>> Is it intended that all nine lines are black?
>
> Yes, because there are no predefined palets with the names red, green or
> blue.
>
> \definepalet
>    [red]
>    [ light=lightred,
>     normal=middlered,
>   dark=darkred]
Wolfgang,

many thanks for the explanation.

Pablo
--
http://www.ousia.tk
___
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 and system fonts

2019-04-27 Thread Hans Hagen

On 4/27/2019 2:13 PM, Pablo Rodriguez wrote:

Dear list,

fonts are my main problem using LMTX (on both Windows and Linux platforms).

In Windows (I installed it again from scratch yesterday), system fonts
(from c:/windows/fonts/) are simply ignored (I don’t know why).

In Linux, a symlink in tex/texmf-fonts/ to the directory where fonts are
stored doesn’t work either.

The weird thing is that the ConTeXt Suite in both OSes works fine with
system fonts or the mentioned symlink.

What am I missing here?

mtxrun --generate
mtxrun --script font --reload

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


Re: [NTG-context] Strange backgroundcolors with showgrid and luacode

2019-04-27 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 27.04.2019 um 16:07:

I found this code in ConTeXt (syst-aux.mkiv):
 \starttext
 \doloopoverlist {red,green,blue} {
  \setuppalet[\recursestring]
  \doloopoverlist {light,normal,dark} {
  \blackrule[color=\recursestring, width=\textwidth]\par
  }
  }
 \stoptext

Is it intended that all nine lines are black?


Yes, because there are no predefined palets with the names red, green or 
blue.


\definepalet
  [red]
  [ light=lightred,
   normal=middlered,
 dark=darkred]

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] Strange backgroundcolors with showgrid and luacode

2019-04-27 Thread Pablo Rodriguez
On 4/27/19 2:03 PM, Wolfgang Schuster wrote:
> [...]
> It's my fault, in this case there is only a single command to create and
> change palet values.

Many thanks for your explanation, Wolfgang.

I found this code in ConTeXt (syst-aux.mkiv):

\starttext
\doloopoverlist {red,green,blue} {
 \setuppalet[\recursestring]
 \doloopoverlist {light,normal,dark} {
 \blackrule[color=\recursestring, width=\textwidth]\par
 }
 }
\stoptext

Is it intended that all nine lines are black?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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] precompose combining characters

2019-04-27 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setupbodyfont[gentium, 60pt]
\starttext
Combined: τῇ

Precomposed: τῇ
\stoptext

Is there an automatic way in LuaTeX to get the precomposed character
from combining ones without having to add a feature?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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] LMTX and system fonts

2019-04-27 Thread Pablo Rodriguez
Dear list,

fonts are my main problem using LMTX (on both Windows and Linux platforms).

In Windows (I installed it again from scratch yesterday), system fonts
(from c:/windows/fonts/) are simply ignored (I don’t know why).

In Linux, a symlink in tex/texmf-fonts/ to the directory where fonts are
stored doesn’t work either.

The weird thing is that the ConTeXt Suite in both OSes works fine with
system fonts or the mentioned symlink.

What am I missing here?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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 backgroundcolors with showgrid and luacode

2019-04-27 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 27.04.2019 um 13:25:

On 4/27/19 12:21 PM, Wolfgang Schuster wrote:

Marcus Vinicius Mesquita schrieb am 27.04.2019 um 12:18:

\definepalet[layout][grid=black]

\setuppalet
    [layout]
    [grid=black]

Many thanks, Marcus Vinicius and Wolfgang, for your replies.

This is the only way it works:

 \definepalet[layout][grid=black]
 %~ \setuppalet[layout] [grid=black]
 \showgrid
 \starttext
 \ConTeXt\ is awesome!
 \stoptext

I don’t know whether I’m missing something, but \showsetups{setuppalet}
only shows this:

 \setuppalet [.*.]

 * NAME

Many thanks for your help,


It's my fault, in this case there is only a single command to create and 
change palet values.


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
___


[NTG-context] underscore hyphenation in LMTX

2019-04-27 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\startluacode
function document.addfunnyhyphen(tfmdata)
local underscore = utf.byte("_")
local char   = tfmdata.characters[underscore]
tfmdata.characters[0xFE000]   = {
width= 0,
height   = 0,
depth= 0,
commands = {
{ "right", -char.width },
{ "down", char.depth },
{ "slot", 1, underscore },
}
}
end

utilities.sequencers.appendaction("aftercopyingcharacters","after",
"document.addfunnyhyphen")
\stopluacode

\definehyphenationfeatures
  [whatever]
  [righthyphenchar="FE000]

\setuphyphenation[method=traditional]
\sethyphenationfeatures[strict, whatever]

\setuppapersize[A10, lanscape]

\starttext
\startmakeup[standard]
\hsize\zeropoint
\tt definebodyfont
\stopmakeup
\stoptext

I get the underscore hyphenation with latest ConTeXt beta (LuaTeX-1.10),
but not with latest LMTX (LuaTeX-2.0).

Am I missing something here?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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] suggestion for LMTX

2019-04-27 Thread Pablo Rodriguez
On 4/27/19 1:15 PM, Hans Hagen wrote:
> On 4/27/2019 12:22 PM, Pablo Rodriguez wrote:
>> Hi Hans,
>>
>> compiling the following sample with LMTX
>> [...]
>>   \contextmark
>> [...]
>> outputs MKIV.
>>
>> Wouldn’t LMTX be a better option than LMTX?
>
> Why? Although there are some fundamental differences deep down, the LMTX
> version has the MKIV functionality. There might be a point where we bind
> a frozen version of MKIV to LuaTeX, but only when the code base becomes
> too hybrid to my taste. Of course there will be functionality only
> available when you use LMTX, but that is something Wolfgang and I need
> to figure out wrr the interface specification. Also, Alan and I need to
> deal with in the MetaFun code and documentation. At some point Taco and
> Mojca might want granularity in the Wiki. We'll see. I have no clue when
> users will have switched to lmtx for production anyway, as it's not
> something we want to enforce. (fwfw: I run lmtx by default.)

Well, it was only an idea... which seems to be wrong.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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 backgroundcolors with showgrid and luacode

2019-04-27 Thread Pablo Rodriguez
On 4/27/19 12:21 PM, Wolfgang Schuster wrote:
> Marcus Vinicius Mesquita schrieb am 27.04.2019 um 12:18:
>> \definepalet[layout][grid=black]
> \setuppalet
>    [layout]
>    [grid=black]

Many thanks, Marcus Vinicius and Wolfgang, for your replies.

This is the only way it works:

\definepalet[layout][grid=black]
%~ \setuppalet[layout] [grid=black]
\showgrid
\starttext
\ConTeXt\ is awesome!
\stoptext

I don’t know whether I’m missing something, but \showsetups{setuppalet}
only shows this:

\setuppalet [.*.]

* NAME

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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] suggestion for LMTX

2019-04-27 Thread Hans Hagen

On 4/27/2019 12:22 PM, Pablo Rodriguez wrote:

Hi Hans,

compiling the following sample with LMTX

 \starttext
 \contextmark

 \contextbanner
 \stoptext

outputs MKIV.

Wouldn’t LMTX be a better option than LMTX?


Why? Although there are some fundamental differences deep down, the LMTX 
version has the MKIV functionality. There might be a point where we bind 
a frozen version of MKIV to LuaTeX, but only when the code base becomes 
too hybrid to my taste. Of course there will be functionality only 
available when you use LMTX, but that is something Wolfgang and I need 
to figure out wrr the interface specification. Also, Alan and I need to 
deal with in the MetaFun code and documentation. At some point Taco and 
Mojca might want granularity in the Wiki. We'll see. I have no clue when 
users will have switched to lmtx for production anyway, as it's not 
something we want to enforce. (fwfw: I run lmtx by default.)


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
___


Re: [NTG-context] problems with "pagecomment"

2019-04-27 Thread Mohammad Hossein Bateni
I see.  Thanks for the explanation.

So the following works:

---
\unprotect
\setvalue{startNotes}%
  {\global\settrue\c_page_comment_enabled
   \grabbufferdatadirect{pagecomment}{startpagecomment}{stopNotes}}
\protect
\def\stopNotes{}
--

What does the second argument to \grabbufferdatadirect mean?  Nothing
changes when I modify that.

The point of redefining the pagecomment environment for me was to style it
a bit: add \righttoleft at the beginning, and surround the content in
startstopnarrower.  How can I inject prepend/append to a buffer's content?

The solution I can think of is to use a different buffer
"pagecomment_internal" in the above definition, and then build buffer
"pagecomment" using that.

Thanks,
~MHB

On Sat, Apr 27, 2019 at 1:24 AM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Mohammad Hossein Bateni schrieb am 27.04.2019 um 05:16:
> > Hi,
> >
> > Look at the following MWE:
> >
> >
> > \setuppagecomment[state=start,location=right]
> > %\definestartstop[Notes]
> > %[before=\startpagecomment,after=\stoppagecomment]
> > \def\startNotes{\startpagecomment}
> > \def\stopNotes{\stoppagecomment}
> >
> > \starttext
> > \input knuth
> > \startpagecomment
> > Hello
> > \stoppagecomment
> > \page
> > \input tufte
> > \startNotes
> > Testing
> > \stopNotes
> > \stoptext
> >
> >
> > This snippet does not compile.  Page comments work when I use the
> > commands \startpagecomment and \stoppagecomment directly (like in the
> > first page), but when I invoke via macros (as in the second page),
> > ConTeXt produces errors.
> >
> > What is wrong there?
>
> The pagecomment environment uses the buffer mechanism to store the content
> of the environment but a limitation of buffers is that you can't put
> them into other
> commands because the scan for a certain delimiter, e.g. \stoppagecomment.
>
> 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
___


[NTG-context] suggestion for LMTX

2019-04-27 Thread Pablo Rodriguez
Hi Hans,

compiling the following sample with LMTX

\starttext
\contextmark

\contextbanner
\stoptext

outputs MKIV.

Wouldn’t LMTX be a better option than LMTX?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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 backgroundcolors with showgrid and luacode

2019-04-27 Thread Wolfgang Schuster

Marcus Vinicius Mesquita schrieb am 27.04.2019 um 12:18:

\definepalet[layout][grid=black]

\setuppalet
  [layout]
  [grid=black]

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] Strange backgroundcolors with showgrid and luacode

2019-04-27 Thread Marcus Vinicius Mesquita
\definepalet[layout][grid=black]

On Sat, Apr 27, 2019, 07:04 Pablo Rodriguez  wrote:

> On 4/26/19 2:28 PM, Wolfgang Schuster wrote:
> > [...]
> > \showgrid highlights different page elements with colors but you can
> > change the output
> >
> > https://www.mail-archive.com/ntg-context@ntg.nl/msg90312.html
>
> Hi Wolfgang,
>
> is there any way to get the lines from \showgrid in black instead of red?
>
> Many thanks for your help,
>
> Pablo
> --
> http://www.ousia.tk
>
> ___
> 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] several blocks of text in the margin

2019-04-27 Thread Fabrice Couvreur
Hi
How to put several blocks of text in the margin without them encroaching
each other ?
Thank.
Fabrice

\setuplayout
  [width=12cm,
  rightmargin=5cm]

\definemathmatrix [pmatrix][matrix:parentheses][simplecommand=MATRIX]

\unexpanded\def\pcent#1{#1\,\%}

\defineuserdata [margintext] [alternative=margintext]

\defineuserdataalternative [margintext] [renderingsetup=userdata:margintext]

\startsetups [userdata:margintext]
  \margindata
[inright]
[%style=\smallbodyfont,
 style={\switchtobodyfont[9pt]},
 width=\rightmarginwidth,
 align={flushleft,broad}]
{{\bf Exemple — }\getinlineuserdata}
\stopsetups

\starttext
\startuserdata[margintext]
 Une population, à effectif stable, se répartit entre deux régions A et B.

  On suppose que chaque année :
  \startitemize[1]
  \item \pcent{30} des habitants de la région A déménagent pour la
région B (les autres restent dans la région A);
  \item \pcent{20} des habitants de la région B déménagent pour la
région A.
  \stopitemize
  La situation peut être représentée par le graphe probabiliste suivant
:

  Les sommets A et B représentent les régions A et B.

  \m{0,3} est la probabilité de passage de la région A vers la région B
; la probabilité de passage de la région A vers elle-même est donc égale à
\m{0,7}.

  En considérant les sommets dans l'ordre alphabétique, ,la matrice
\m{M} de transition du graphe est :
  \startformula
M=\MATRIX{0.7,0.3;0.2,0.8}.
  \stopformula
\stopuserdata
\dorecurse{4}{\input ward} %-> playing with the number to adjust
\startuserdata[margintext]
 Une population, à effectif stable, se répartit entre deux régions A et B.

  On suppose que chaque année :
  \startitemize[1]
  \item \pcent{30} des habitants de la région A déménagent pour la
région B (les autres restent dans la région A);
  \item \pcent{20} des habitants de la région B déménagent pour la
région A.
  \stopitemize
  La situation peut être représentée par le graphe probabiliste suivant
:

  Les sommets A et B représentent les régions A et B.

  \m{0,3} est la probabilité de passage de la région A vers la région B
; la probabilité de passage de la région A vers elle-même est donc égale à
\m{0,7}.

  En considérant les sommets dans l'ordre alphabétique, ,la matrice
\m{M} de transition du graphe est :
  \startformula
M=\MATRIX{0.7,0.3;0.2,0.8}.
  \stopformula
\stopuserdata
\input ward
\stoptext
___
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 backgroundcolors with showgrid and luacode

2019-04-27 Thread Pablo Rodriguez
On 4/26/19 2:28 PM, Wolfgang Schuster wrote:
> [...]
> \showgrid highlights different page elements with colors but you can
> change the output
>
> https://www.mail-archive.com/ntg-context@ntg.nl/msg90312.html

Hi Wolfgang,

is there any way to get the lines from \showgrid in black instead of red?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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] wrong intraword spacing

2019-04-27 Thread Pablo Rodriguez
On 4/22/19 6:27 PM, Hans Hagen wrote:
> On 4/22/2019 12:35 PM, Otared Kavian wrote:
>> Hi Pablo,
>>
>> Yes I get the same extra space after ff, with all th eflavors of luatex
>> based ConTeXt (mkiv, lmtx, and ConTeXt from TeXLIve 2018).
>> I attach the PDF.
> fixed in next beta but not extensively tested (no upload today) ..
> pretty old code that i need to review one day in the prespective of
> recent possibilities and so

Hans,

many thanks for the fix.

Pablo
--
http://www.ousia.tk
___
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
___