Re: [NTG-context] How do I turn off indentation inside a \framed with align=?

2022-06-02 Thread Gerben Wierda via ntg-context
> On 19 May 2022, at 18:22, Wolfgang Schuster via ntg-context 
>  wrote:
> 
> You have to provide a minimal example, in the following the example the text 
> within the frame isn't indented.

I cannot always provide a minimal example (how much I would like to) as my TeX 
is produced in a pipeline from 5600 lines of lua and METAPOST code.

But luckily, in this case I can, the one using \phrasetext is indented, the 
other one is not.:

\setuplanguage[en][patterns={en}]\mainlanguage[en]

\definelabelclass[phrase]

\setupphrasetext[en][metamodelexplanation=  {Only direct relations are shown. 
Abstract elements are expanded so only real meta­model elements are shown. Uses 
the Mastering ArchiMate 9-colour scheme to assist learning and quick reading.}]

\starttext
\setupindenting[none]
\setupindenting[no]

\definelayer[coremodel][width=\textwidth,height=\textheight]
\setlayer[coremodel][preset=lefttop,voffset=0.6cm]{\framed[frame=off,align=flushleft,width=\textwidth]{\phrasetext{metamodelexplanation}}}
\setlayer[coremodel][preset=lefttop,voffset=6cm]{\framed[frame=off,align=flushleft,width=\textwidth]{Only
 direct relations are shown. Abstract elements are expanded so only real 
meta­model elements are shown. Uses the Mastering ArchiMate 9-colour scheme to 
assist learning and quick reading}}
\placelayer[coremodel]
\stoptext

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] issue with scite module

2022-06-02 Thread Max Chernoff via ntg-context

For the sake of consistency (with buff-imp-xml.lua), I think the patch
should read

> [...]

+local alsoname = lpatterns.utf8two + lpatterns.utf8three +
lpatterns.utf8four


I think that that pattern is a little too broad, since it will match any 
non-ASCII Unicode character. Things like U+202E (xkcd.com/1137), U+00A0 
(no-break space), etc are valid UTF-8 characters, but not valid XML tag 
names. Neither of these two characters are matched by the TeX catcode 
check. This doesn't make any real difference for a syntax highlighter 
though.



+local name = (R("az","AZ","09") + S("_-.") + + alsoname)^1


There's a doubled plus in the middle there. The patch works when I 
remove it.



But I’m afraid I cannot make it work on my computer (Linux64).

On another Win64 computer, both patches worked perfectly fine.


Hmm, that's really weird. Both patches work for me on my main Win64 
computer (after I fixed the extra plus). I also pulled the 
"contextgarden/context:lmtx" Docker image (Debian sid), and both patches 
worked there too. I get this from inside the container:


root@e8d29a32595c:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux bookworm/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/;
SUPPORT_URL="https://www.debian.org/support;
BUG_REPORT_URL="https://bugs.debian.org/;

root@e8d29a32595c:~# locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

root@e8d29a32595c:~# xxd test.tex
: 5c75 7365 6d6f 6475 6c65 5b73 6369 7465  \usemodule[scite
0010: 5d0a 5c73 7461 7274 7465 7874 0a5c 7374  ].\starttext.\st
0020: 6172 7454 4558 7061 6765 5b6f  7365  artTEXpage[offse
0030: 743d 3165 785d 0a5c 7479 7065 5b6f 7074  t=1ex].\type[opt
0040: 696f 6e3d 786d 6c5d 7b3c 616e 732f 3e7d  ion=xml]{}
0050: 0a5c 7479 7065 5b6f 7074 696f 6e3d 786d  .\type[option=xm
0060: 6c5d 7b3c c3a1 c3b1 c39f 2f3e 7d0a 5c73  l]{<../>}.\s
0070: 746f 7054 4558 7061 6765 0a5c 7374 6f70  topTEXpage.\stop
0080: 7465 7874 0a text

root@e8d29a32595c:~# context --version
mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file: [snip]
mtx-context | current version: 2022.05.11 11:36
mtx-context | main context file: [snip]
mtx-context | current version: 2022.05.11 11:36

ldd "$(type -p luametatex)"
linux-vdso.so.1 (0x7ffdbe9a5000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x7f4b034d4000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 
(0x7f4b034b3000)

libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x7f4b0336f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f4b03196000)
/lib64/ld-linux-x86-64.so.2 (0x7f4b03a55000)

Is this perhaps a weird locale or encoding issue? Maybe try compiling with:

LC_ALL=C.UTF-8 LANG=C.UTF-8 context test.tex

or

LC_ALL=POSIX LANG=POSIX context test.tex

I'm surprised Linux is the one not working here, since it's usually 
Windows that has text encoding issues with its weird hybrid of DOS 
codepages and UTF-16+BOM.


The only other thing that I can think of is a weird library issue with 
your distro, but LuaMetaTeX is statically linked. Not sure what else to 
check here.


-- Max
___
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] ugly bug

2022-06-02 Thread Wolfgang Schuster via ntg-context

Steffen Wolfrum schrieb am 01.06.2022 um 14:03:

Hi,

several times I got problems with my publishing house when they noticed that 
the headerlines jump up and down on pages that end/begin with qoutes (i.e. 
smaller interlineskip), see example below: on page 1 the blackrule is about 1mm 
higher than on page 2.

In the past I then used really laborious workarounds to get these single pages 
in the correct way (without jumping)… manual pagebreak, re-define layout etc.

But as the pages are hard to find it would be better that the layout would be 
reliable consistent.

How can this be solved?


\defineinterlinespace[steffen][line=4.2ex]

\starttext

\dorecurse{2}{\samplefile{lorem}\par}

\start
%\setuplocalinterlinespace[line=4.2ex]% wrong header alignment
\setuplocalinterlinespace[steffen]% correct header alignment
\dorecurse{4}{\samplefile{lorem}\par}
\stop

\dorecurse{2}{\samplefile{lorem}\par}

\stoptext

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] issue with scite module

2022-06-02 Thread Pablo Rodriguez via ntg-context
On 6/2/22 17:36, Pablo Rodriguez via ntg-context wrote:
> On 6/1/22 23:58, Max Chernoff via ntg-context wrote:
>>
>> local name = (R("az","AZ","09") + S("_-.") + 
>> lpeg.utfchartabletopattern(characters.csletters))^1
>
> I’m afraid I cannot make your proposed fix work.

Even with a brand new install, neither of both patches works for me.

I don’t know what I may be missing on my installation.

Do you have any hint about what I am doing wrong?

Many thanks for your help,

Pablo
___
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 with scite module

2022-06-02 Thread Pablo Rodriguez via ntg-context
On 6/1/22 23:58, Max Chernoff via ntg-context wrote:
>> Now, I still don’t understand LPEG and don’t know if there’s a general
>> “character” class that doesn’t need a list...

Many thanks for your reply, Hraban.

> The easiest way that I found was to just cheat and use everything with
> a TeX catcode 11 ("letters"):
>
>   local name = (R("az","AZ","09") + S("_-.") + 
> lpeg.utfchartabletopattern(characters.csletters))^1

Many thanks for your reply, Max,

I’m afraid I cannot make your proposed fix work.

For the sake of consistency (with buff-imp-xml.lua), I think the patch
should read (also attached to the message to avoid wrong line breaking):

--- scite-context-lexer-xml.lua 2022-06-01 17:24:38.625976000 +0200
+++
context/tex/texmf-context/context/data/scite/context/lexers/scite-context-lexer-xml.lua
2022-06-02 16:37:30.112824947 +0200
@@ -13,7 +13,7 @@
 -- todo: parse entities in attributes

 local global, string, table, lpeg = _G, string, table, lpeg
-local P, R, S, C, Cmt, Cp = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Cmt,
lpeg.Cp
+local P, R, S, C, Cmt, Cp, lpatterns = lpeg.P, lpeg.R, lpeg.S, lpeg.C,
lpeg.Cmt, lpeg.Cp, lpeg.patterns
 local type = type
 local match, find = string.match, string.find

@@ -41,7 +41,8 @@
 local equal= P("=")
 local ampersand= P("&")

-local name = (R("az","AZ","09") + S("_-."))^1
+local alsoname = lpatterns.utf8two + lpatterns.utf8three +
lpatterns.utf8four
+local name = (R("az","AZ","09") + S("_-.") + + alsoname)^1
 local openbegin= P("<")
 local openend  = P("") + P(">")

But I’m afraid I cannot make it work on my computer (Linux64).

On another Win64 computer, both patches worked perfectly fine.

Both machines run LMTX current latest. So I have an issue on my
installation that I have to fix first.

Many thanks for your help,

Pablo
--- scite-context-lexer-xml.lua	2022-06-01 17:24:38.625976000 +0200
+++ context/tex/texmf-context/context/data/scite/context/lexers/scite-context-lexer-xml.lua	2022-06-02 16:37:30.112824947 +0200
@@ -13,7 +13,7 @@
 -- todo: parse entities in attributes
 
 local global, string, table, lpeg = _G, string, table, lpeg
-local P, R, S, C, Cmt, Cp = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Cmt, lpeg.Cp
+local P, R, S, C, Cmt, Cp, lpatterns = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Cmt, lpeg.Cp, lpeg.patterns
 local type = type
 local match, find = string.match, string.find
 
@@ -41,7 +41,8 @@
 local equal= P("=")
 local ampersand= P("&")
 
-local name = (R("az","AZ","09") + S("_-."))^1
+local alsoname = lpatterns.utf8two + lpatterns.utf8three + lpatterns.utf8four
+local name = (R("az","AZ","09") + S("_-.") + + alsoname)^1
 local openbegin= P("<")
 local openend  = P("") + P(">")
___
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-02 Thread Stefan Nedeljkovic via ntg-context
Thanks for the advice, Hans. I'll try that!

On Thu, Jun 2, 2022 at 12:17 PM Hans Hagen via ntg-context <
ntg-context@ntg.nl> wrote:

> On 6/1/2022 8:34 PM, Thomas A. Schmitz via ntg-context wrote:
> >
> >
> > On 6/1/22 19:35, Stefan Nedeljkovic via ntg-context wrote:
> >> Sorry, i just updated the file, should now compile, but fail due to
> >> resources. Are the configuration options to context that would enable
> >> this file to be compiled?
> > The question still stands: what do you expect us to do? Hunt for a
> > problem through a huge file? What have you done to identify this
> > problem? Is there a minimal example?
> due to a mail server crash i lost todays and last nights mail sop here s
> a partial reply
>
> (Just put that large mp blob in a file and call that one instead of
> passing through tex's tokenizer:
>
> \startMPpage
>  input test.mp ;
> \stopMPpage
>
> then in order to save runtime do
>
> draw image (
> draw (220.852, 127.175) ;
> draw (226.248, 128.606) ;
> draw (221.840, 129.541) ;
> draw (280.733, 100.927) ;
> draw (276.968, 83.053) ;
> draw (251.644, 83.879) ;
> ) withpen pencircle scaled 0.16875 withcolor (0.976, 0.702, 0.204) ;
>
>
> 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] Compiling a large metapost document

2022-06-02 Thread Hans Hagen via ntg-context

On 6/1/2022 8:34 PM, Thomas A. Schmitz via ntg-context wrote:



On 6/1/22 19:35, Stefan Nedeljkovic via ntg-context wrote:
Sorry, i just updated the file, should now compile, but fail due to 
resources. Are the configuration options to context that would enable 
this file to be compiled?
The question still stands: what do you expect us to do? Hunt for a 
problem through a huge file? What have you done to identify this 
problem? Is there a minimal example?
due to a mail server crash i lost todays and last nights mail sop here s 
a partial reply


(Just put that large mp blob in a file and call that one instead of 
passing through tex's tokenizer:


\startMPpage
input test.mp ;
\stopMPpage

then in order to save runtime do

draw image (
draw (220.852, 127.175) ;
draw (226.248, 128.606) ;
draw (221.840, 129.541) ;
draw (280.733, 100.927) ;
draw (276.968, 83.053) ;
draw (251.644, 83.879) ;
) withpen pencircle scaled 0.16875 withcolor (0.976, 0.702, 0.204) ;


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] Compiling a large metapost document

2022-06-02 Thread Stefan Nedeljkovic via ntg-context
I just bumped it to double the size, did mtxrun --reload, context
--generate and the error is still
tex memory  > bumping category 'token' failed, details: all=8000 |
ini=4
We ran into troubles scanning an argument.

On Thu, Jun 2, 2022 at 9:20 AM Thomas A. Schmitz via ntg-context <
ntg-context@ntg.nl> wrote:

>
> On 01.06.22 23:30, Stefan Nedeljkovic wrote:
> > 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.
> >
>
> That is the correct file, and I would assume that the category
> "luametatex.tokensize" (line 135) would be the correct one to edit. Is
> that the one you've edited, e.g. by bumping size to double its current
> value?
>
> Thomas
>
> ___
> 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] Compiling a large metapost document

2022-06-02 Thread Thomas A. Schmitz via ntg-context


On 01.06.22 23:30, Stefan Nedeljkovic wrote:
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.




That is the correct file, and I would assume that the category 
"luametatex.tokensize" (line 135) would be the correct one to edit. Is 
that the one you've edited, e.g. by bumping size to double its current 
value?


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