Re: [NTG-context] Compiling context files in command line

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

Is it possible at the end off compile proces to move the created PDF to another 
directory (subdirectory of current directory)


You can try something like this:

\startluacode
luatex.wrapup(function()
local pdf = tex.jobname .. ".pdf"
file.copy(pdf, "subdirectory/" .. pdf)
os.remove(pdf)
end)
\stopluacode

\starttext
Hello!
\stoptext

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


[NTG-context] Certificate expired on pragma-ade.com

2022-06-04 Thread Max Chernoff via ntg-context
The TLS certificate for www.pragma-ade.com appears to have expired on 
"Thu, 02 Jun 2022 07:37:56 GMT". Firefox and Chrome both give 
"Certificate expired" errors when I try and connect. I can still access 
the site, although I need to click through a few warnings first.


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

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

Could anyone confirm the issue or explain me what I am missing?


Confirmed on Win64 with the same version.

But I did find a workaround: if I convert your example from NFC 
(composed) to NFD (decomposed), it compiles fine.


$ xxd xml.tex
: 5c75 7365 6d6f 6475 6c65 5b73 6369 7465  \usemodule[scite
0010: 5d0a 5c73 7461 7274 7465 7874 0a5c 7374  ].\starttext.\st
0020: 6172 7458 4d4c 20c3 b15c 7374 6f70 584d  artXML ..\stopXM
0030: 4c0a 5c73 746f 7074 6578 740aL.\stoptext.

$ context xml
[...]
ConTeXt  ver: 2022.05.11 11:36 LMTX  fmt: 2022.6.2
[...]
The file ended when scanning an argument.
[...]
mtx-context | fatal error: return code: 1

$ uconv -x any-nfd xml.tex | sponge xml.tex

$ xxd xml.tex
: 5c75 7365 6d6f 6475 6c65 5b73 6369 7465  \usemodule[scite
0010: 5d0a 5c73 7461 7274 7465 7874 0a5c 7374  ].\starttext.\st
0020: 6172 7458 4d4c 206e cc83 5c73 746f 7058  artXML n..\stopX
0030: 4d4c 0a5c 7374 6f70 7465 7874 0a ML.\stoptext.

$ context xml
[success]

This also gives us a hint as to what the problem is:

$ echo -n 'ñ' | xxd
: c3b1 ..

$ echo -n 'ñ' | uconv -x any-nfd | xxd
: 6ecc 83  ...

$ xxd xml.tex
0020: 6172 7458 4d4c 20c3 b15c 7374 6f70 584d  artXML ..\stopXM
   ^^ ^^
$ xxd xml.log
0570: 5c73 6c78 6465 6661 756c 747b c37d 7d5c  \slxdefault{.}}\
^^

The character "ñ" in UTF-8 NFC is "0xC3, 0xB1". The "0xC3" starts a 
2-byte character, while "0xB1" is a continuation character. In the error 
message from the log, we have "0xC3, 0x7D" which is a 2-byte leading 
byte followed by an ASCII character, which is invalid UTF-8.


I'm guessing that what's happening is the module code is just grabbing 
one character at a time, which works for ASCII, but can lead to orphaned 
characters in Unicode. The NFD form fixes this since the first byte of 
the line is the plain ASCII "n", which can freely be treated as a single 
byte.


This NFD workaround should hopefully "fix" things for basic Latin 
characters with accents, but it probably won't help with non-Latin 
characters since there isn't an ASCII character to decompose them into.


-- 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] \sciteinlinebuffer inherits margin properties

2022-06-04 Thread Otared Kavian via ntg-context
Hi Pablo,

The example you gave in your first message about the Scite module, that is:

  \usemodule[scite]
  \starttext
  \startXML ñ\stopXML
  \stoptext

gives an error on my machine (MacOS 11.6.5 and Context version 2022.05.11 
11:36), with Context saying: « The file ended when scanning an argument.»

I don’t know where the error comes from…

Best regards: OK

> On 4 Jun 2022, at 19:54, Pablo Rodriguez via ntg-context  
> wrote:
> 
> On 6/4/22 16:13, Otared Kavian via ntg-context wrote:
>> Hi Pablo,
>> 
>> Typesetting your two examples, I can reproduce on MacOS and Context
>> version 2022.05.11 11:36 what you are reporting.
> Many thanks for your help, Otared.
> 
> Would you be so kind to confirm the first issue I reported earlier
> (https://mailman.ntg.nl/pipermail/ntg-context/2022/105918.html)?
> 
> Many thanks for your help again,
> 
> 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
> ___

___
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] \sciteinlinebuffer inherits margin properties

2022-06-04 Thread Pablo Rodriguez via ntg-context
On 6/4/22 16:13, Otared Kavian via ntg-context wrote:
> Hi Pablo,
>
> Typesetting your two examples, I can reproduce on MacOS and Context
> version 2022.05.11 11:36 what you are reporting.
Many thanks for your help, Otared.

Would you be so kind to confirm the first issue I reported earlier
(https://mailman.ntg.nl/pipermail/ntg-context/2022/105918.html)?

Many thanks for your help again,

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] \sciteinlinebuffer inherits margin properties

2022-06-04 Thread Otared Kavian via ntg-context
Hi Pablo,

Typesetting your two examples, I can reproduce on MacOS and Context version 
2022.05.11 11:36 what you are reporting.

Best regards: Otared

> On 4 Jun 2022, at 14:11, Pablo Rodriguez via ntg-context  
> wrote:
> 
> Dear list,
> 
> I have my third sample with scite:
> 
>  \usemodule[scite]
>  \setuptyping[margin=yes]
>  \starttext
>  \startbuffer[b]b\stopbuffer
>  \startTEXpage[offset=1em]
>  a \sciteinlinebuffer[none][b] a\par
>  a \typeinlinebuffer[b][option] a
>  \stopTEXpage
>  \stoptext
> 
> I’m on Linux64 and using current latest from 2022.05.11 11:36.
> 
> For some strange reason, \sciteinlinebuffer inherits the margin option
> from \setuptyping and it indents the whole paragraph.
> 
> Could anyone confirm the issue?
> 
> 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
> ___

___
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] \sciteinlinebuffer inherits margin properties

2022-06-04 Thread Pablo Rodriguez via ntg-context
Dear list,

I have my third sample with scite:

  \usemodule[scite]
  \setuptyping[margin=yes]
  \starttext
  \startbuffer[b]b\stopbuffer
  \startTEXpage[offset=1em]
  a \sciteinlinebuffer[none][b] a\par
  a \typeinlinebuffer[b][option] a
  \stopTEXpage
  \stoptext

I’m on Linux64 and using current latest from 2022.05.11 11:36.

For some strange reason, \sciteinlinebuffer inherits the margin option
from \setuptyping and it indents the whole paragraph.

Could anyone confirm the issue?

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
___


[NTG-context] extra space after \sciteinlinebuffer

2022-06-04 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample (running current latest from 2022.05.11
11:36 on Linux64):

  \usemodule[scite]
  \starttext
  \startbuffer[b]b\stopbuffer
  \startTEXpage[offset=1em]
  a \sciteinlinebuffer[none][b] a\par
  a \typeinlinebuffer[b][option] a
  \stopTEXpage
  \stoptext

I get an unwanted extra space after \sciteinlinebuffer.

Am I missing something or have I hit a bug?

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
___


[NTG-context] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2022-06-04 Thread Cron Daemon via ntg-context
rsync: failed to connect to rsync.pragma-ade.nl (213.125.29.165): No route to 
host (113)
rsync error: error in socket IO (code 10) at clientserver.c(125) 
[Receiver=3.1.2]
___
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] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2022-06-04 Thread Cron Daemon via ntg-context
rsync: failed to connect to rsync.pragma-ade.nl (213.125.29.165): No route to 
host (113)
rsync error: error in socket IO (code 10) at clientserver.c(125) 
[Receiver=3.1.2]
___
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] issue with scite module

2022-06-04 Thread Pablo Rodriguez via ntg-context
Dear list,

I have this minimal sample (with current latest from 2022.05.11 11:36 on
Linux64):

  \usemodule[scite]
  \starttext
  \startXML ñ\stopXML
  \stoptext

Commenting out the first line avoids compilation error.

Replacing ñ with n also allows compilation.

I think there may be an error in m-scite.mkiv.

The inclusion of non-ASCII characters in XML code seems to leave an
unclosed argument.

Could anyone confirm the issue or explain me what I am missing?

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-04 Thread Pablo Rodriguez via ntg-context
On 6/3/22 00:52, Max Chernoff via ntg-context wrote:
>> 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.

Hi Max,

many thanks for your reply.

At best, the patch is only a suggestion and Hans will merge the code he
sees it fits.

>> +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.

I noticed it too just after sending the message to the list, but I had
to solve the issue with my installation first.

>> 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).

It was a stupid mistake on my side. The patch I sent before points to
the error:

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

I was compiling the sample file in the directory where the unmodified
version of "scite-context-lexer-xml.lua" was running.

ConTeXt was reading the unmodified file and not the modified one, but
that was all my fault.

Now I have to find a MWE for issues I’m experiencing with XML sources
and using the scite module.

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
___