Re: [NTG-context] cannot update ConTeXt to 2022.09.16

2022-09-21 Thread Marco Patzer via ntg-context
On Mon, 19 Sep 2022 17:16:19 +0200
Pablo Rodriguez via ntg-context  wrote:

> Could anyone confirm the issue?

I can confirm. On a fresh install I'm getting

  2022.09.11 20:44

Marco
___
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] [secure site not available]

2022-09-15 Thread Marco Patzer via ntg-context
On Wed, 14 Sep 2022 19:19:05 +0200
Pablo Rodriguez via ntg-context  wrote:

> https://lmtx.pragma-ade.nl, https://pragma-ade.nl and
> https://pragma-ade.com seem to use a certificate that is only valid
> for https://lmtx.pragma-ade.com (according to Firefox).

Correct. This is a misconfigured webserver, so the error is valid.

> Each domain (and subdomain) requires its own certificate.

That's not quite correct AFAIK. Let's encrypt supports wildcard
certificates, so

  lmtx.pragma-ade.nl and
   pragma-ade.nl

could be covered by the same certificate. And each certificate can
also cover multiple domains (SAN). So one certificate should be
enough for all abovementioned (sub)domains.

> (And non-automatic certificate renewal is a real pain [I have to
> add].)

I totally agree on that one.

Certbot definitely supports wildcard certificates and AFAIK you can
just specify multiple domains with the “-d” option.

Marco
___
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] Typearea module fails with “Missing number”

2022-08-29 Thread Marco Patzer via ntg-context
On Mon, 29 Aug 2022 09:30:34 +0200
Marco Patzer via ntg-context  wrote:

> The typearea module fails on LMTX (runs ok with MkIV):
> 
>   tex error   > tex error on line 89 in file
> /usr/local/share/context-lmtx/tex/texmf-modules/tex/context/third/typearea/t-typearea.tex:
> Missing number, treated as zero

Sorry, forgot the MWE:

  \usemodule[typearea]
  \starttext\null\stoptext

Marco
___
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] Typearea module fails with “Missing number”

2022-08-29 Thread Marco Patzer via ntg-context
Hi!

The typearea module fails on LMTX (runs ok with MkIV):

  tex error   > tex error on line 89 in file 
/usr/local/share/context-lmtx/tex/texmf-modules/tex/context/third/typearea/t-typearea.tex:
 Missing number, treated as zero

LMTX 2022.08.25 19:21

Marco
___
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] Database of translations (was: Simple question)

2022-05-10 Thread Marco Patzer via ntg-context
On Tue, 10 May 2022 00:15:30 +0200
Gerben Wierda via ntg-context  wrote:

> What is the easiest way to have a ‘database’ of translations for
> strings and maybe links?

Here's an idea:

\usemodule [translate]

%% \mainlanguage [nl]

\assigntranslation [en=alpha, nl=beta]\to\TRfoo
\translateinput [foo] [\TRfoo]

\assigntranslation [en=gamma, nl=delta]\to\TRbar
\translateinput [bar] [\TRbar]

\enableinputtranslation

\starttext
  foo bar
\stoptext

It's not a good solution, but it's a start. There's also

  \translate [en=foo, nl=bar]

But I don't know how to combine it with \translateinput. That would
remove the need of the \TR… macros.

Marco
___
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] Switching fonts changes framedtext justification

2022-04-03 Thread Marco Patzer via ntg-context
On Sat, 2 Apr 2022 17:36:35 -0700
Thangalin via ntg-context  wrote:

> The following code produces framed text areas, each having different
> justification:
> 
> […]
> How would you ensure that both text areas remain fully justified?

I don't have that Emoji font, but replacing it with other fonts,
framedtext justifies the text here.

Are you sure it's not a tolerance issue? Frames don't inherit the
tolerance from the main environment¹. Try with

  \setupframedtext
[align=verytolerant]
%% [align={verytolerant, stretch}]

Marco

¹ https://wiki.contextgarden.net/Command_old/setuptolerance
___
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] tilde character

2022-03-14 Thread Marco Patzer via ntg-context
On Mon, 14 Mar 2022 18:36:08 +0100
Henning Hraban Ramm via ntg-context  wrote:

> How do I get the default tilde character from a font?

\starttext
  \startasciimode
a~b
  \stopasciimode

  a\textasciitilde b
\stoptext

Marco
___
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] Errors compiling the MetaFun manual

2022-03-12 Thread Marco Patzer via ntg-context
Hi!

I tried to compile the MetaFun manual from

  /doc/context/sources/general/manuals/metafun

and ran into a few issues. I don't know if that's expected or if
it's supposed to work on a current LMTX.

Attached are the first two issues. It takes a while to boil it down
to MWEs. Let me know if I should report the other errors, too.

I'm not using the failing bits myself, so I don't need fix for that.
Motivation is to help find issues with the current release.

Marco
%% metafun > log > error: A primary expression can't begin with ';'
\starttext

\startMPcode
  uniquelist(a) ;
  draw topath(a,--) ysized 2cm
  withpen pencircle scaled 1mm
  withcolor .625yellow ;
  drawpoints topath(a,--) ysized 2cm
  withpen pencircle scaled 1mm
  withcolor .625red ;
  drawpointlabels topath(a,--) ysized 2cm ;
\stopMPcode

\stoptext
%% metapost> trace >  unknown string ta
%% metafun > log >
%% metafun > log > error: Equation cannot be performed (unknown string=vacuous)
\setupbackgrounds
  [page]
  [background={foreground,foregraphics}]

\defineoverlay [foregraphics] [\positionoverlay{foregraphics}]

\starttext

\startMPpositiongraphic{mypos:line}
  path pa, pb, pab ; numeric na, nb ; string ta, tb ;
  ta := texstr("from") ;
  tb := texstr("to") ;
  na := positionpage(ta) ;
  nb := positionpage(tb) ;
  pa := positionbox(ta) ;
  pb := positionbox(tb) ;
  pa := fullcircle xsized (bbwidth(pa)+4pt) shifted center pa ;
  pb := fullcircle xsized (bbwidth(pb)+4pt) shifted center pb ;
  if na = nb :
pab := center pa -- center pb ;
pab := pab cutbefore (pab intersectionpoint pa) ;
pab := pab cutafter  (pab intersectionpoint pb) ;
pickup pencircle scaled 1pt ;
draw pab withcolor .625yellow ;
positioninregion ;
  fi ;
\stopMPpositiongraphic
\startpositionoverlay{foregraphics}
  \setMPpositiongraphic{G-1}{mypos:line}{to=G-2}
\stoppositionoverlay

First we have defined an \hpos {G-1} {\strut overlay}.

\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] \asciimode and MetaPost in LMTX result in “Isolated expression”

2022-03-12 Thread Marco Patzer via ntg-context
On Sat, 12 Mar 2022 22:27:38 +0100
Henning Hraban Ramm via ntg-context  wrote:

> My current and most MP-heavy project so far, fails in asciimode with
> "Extra }, or forgotten \endgroup"

You can't just run “normal” projects with \asciimode. Chances are,
constructs are being used that are invalid in asciimode.

But as far as I understand, it should be sufficient running it
without asciimode just with the \ctxcatcodes snippet in place to
test if that breaks something.

> No time to investigate why, ATM.

No problem. Thanks for checking.

Marco
___
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] \asciimode and MetaPost in LMTX result in “Isolated expression”

2022-03-12 Thread Marco Patzer via ntg-context
On Sat, 12 Mar 2022 15:51:16 +0100
Hans Hagen  wrote:

> you can try this
> (in cont-new.tex):
> 
> \prependtoks
>  \setcatcodetable\ctxcatcodes
> \to \everyMPgraphic
> 
> and then do lots of tests with and without asciimode so see if this 
> doesn't interfere

I run almost every document with \asciimode, so I can surely test
that aspect, but I'm not using MetaPost a lot these days. I ran a
few projects and it seems to work fine. But that's not what I'd call
extensive testing.

I think compiling the MetaPost manual would be a good test. But on
my machine this fails even without the \ctxcatcode fix in place.

Maybe someone else with more MetaPost-heavy workflows¹ can test
this, too?

Marco

¹ Hraban? nudge, nudge…
___
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] \asciimode and MetaPost in LMTX result in “Isolated expression”

2022-03-12 Thread Marco Patzer via ntg-context
On Mon, 31 Jan 2022 20:02:42 +0100
Marco Patzer via ntg-context  wrote:

> LMTX seems to have an issue with \asciimode and MetaPost:
> 
> \asciimode
> \starttext
>   \startMPcode
> fill unitsquare scaled 2cm;
>   \stopMPcode
> \stoptext
> 
> Results in:
> 
> metafun > log > error: Isolated expression

This is still an issue with today's ver: 2022.03.12 11:27 LMTX.

Marco
___
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] Few quick questions

2022-03-08 Thread Marco Patzer via ntg-context
On Tue, 08 Mar 2022 20:45:17 +0100
Christoph Hintermüller via ntg-context  wrote:

> Hans indicated a tool, a program, which allows to verify that that
> all start* stop* tag pairs are symmetric and placed in correct
> order. I just cant remember how it is called. Can anybody help
> here?

  mtxrun --autogenerate --script check 

The following will not report missing tags but will find other
common issues and report them on the console:

  context --errors='*' 

Marco
___
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] PageNumber in MetaFun

2022-03-02 Thread Marco Patzer via ntg-context
On Wed, 2 Mar 2022 13:15:18 +0100
"Thomas A. Schmitz via ntg-context"  wrote:

> try "RealPageNumber" instead of "PageNumber."

That works. Thanks for the quick reply.

Marco
___
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] PageNumber in MetaFun

2022-03-02 Thread Marco Patzer via ntg-context
Hi!

Has something changed regarding PageNumber? Take the following
example:

\starttext
  foo\page

  \startMPcode
if PageNumber==1:
  fill unitsquare scaled 1cm;
elseif PageNumber==2:
  fill fullcircle scaled 2cm;
fi
  \stopMPcode
\stoptext

LMTX 2022.01.21 20:13 produces a rectangle on page 2, an older MkIV
produces a circle on page 2. Is this expected behaviour?

Marco
___
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] \asciimode and MetaPost in LMTX result in “Isolated expression”

2022-01-31 Thread Marco Patzer via ntg-context
Hi!

LMTX seems to have an issue with \asciimode and MetaPost:

\asciimode
\starttext
  \startMPcode
fill unitsquare scaled 2cm;
  \stopMPcode
\stoptext

Results in:

metafun > log > error: Isolated expression
metafun > log >
metapost> trace >  E.dash.patterns
metapost> trace >  vardef
metafun > log >
metafun > log > I couldn't find an '=' or ':=' after the expression 
that is shown above this
error message, so I guess I'll just ignore it and carry on.
metafun > log >
metapost    > trace >  vardef dashpattern(text t) =

Marco

ConTeXt  ver: 2022.01.21 20:13 LMTX  fmt: 2022.1.21
___
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] Defining new float types fails in LMTX

2022-01-18 Thread Marco Patzer via ntg-context
On Sun, 16 Jan 2022 16:53:16 +0100
Marco Patzer via ntg-context  wrote:

> Still an issue with 2022.01.15 17:29.

Fixed as of 2022.01.18 10:48. Thanks Hans.

Marco
___
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] Defining new float types fails in LMTX

2022-01-16 Thread Marco Patzer via ntg-context
On Fri, 10 Dec 2021 18:22:46 +0100
Marco Patzer via ntg-context  wrote:

> On Fri, 10 Dec 2021 17:01:26 +0100
> Hans Hagen  wrote:
> 
> > no example code  
> 
> The MWE was included in the OP on 2021-10-30. But here it is again:

Still an issue with 2022.01.15 17:29.

Marco
___
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] local notes, "serried" (paragraph) or column style.

2021-12-29 Thread Marco Patzer via ntg-context
On Wed, 29 Dec 2021 08:29:34 -0300
Youssef Cherem via ntg-context  wrote:

> I've tried to implement some sort of affiliation description with
> local notes. I'd like them to be either in a single paragraph or in
> columns (e.g., 3), but the options `serried` or  `n=3` don't seem to
> work for text notes (they do work for notes at the bottom).
>
> […]
>
> \placelocalnotes[afiliação]

Maybe this helps:

\startcolumns [n=3]
  \placelocalnotes[afiliação]
\stopcolumns

Marco
___
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] Using a system font

2021-12-27 Thread Marco Patzer via ntg-context
On Sun, 26 Dec 2021 21:21:10 +4000
jdh via ntg-context  wrote:

> \starttext
>I want to use the Mathjax_Fraktur font, which the font-manager on
> Ubuntu reports that it has. 
>{\switchtobodyfont[Mathjax_Fraktur] .. but, this text doesn't show
> up in Mathjax_Fraktur.}
> 
> \stoptext

Try:

export OSFONTDIR=/usr/share/fonts
mtxrun --script fonts --reload

\definefontfamily [mainface] [serif] [Mathjax_Fraktur]
\setupbodyfont [mainface]

\starttext
  \samplefile{knuth}
\stoptext

Marco
___
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] Errors in source files return success

2021-12-26 Thread Marco Patzer via ntg-context
On Thu, 18 Nov 2021 19:27:25 +0100
Marco Patzer via ntg-context  wrote:

> Is there a way to return failure if *any* error is encountered or
> do they need to be enabled each individually?

A solution is to use patterns (supported in the upcoming upload):

  \enabledirectives
[logs.errors=*]

Alternatively use a compile-time switch:

  context --errors='*' 

This will make the return value reflect the presence of an error.
Further reading:

  https://wiki.contextgarden.net/Running_ConTeXt#--errors

Marco
___
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] upload

2021-12-25 Thread Marco Patzer via ntg-context
On Sat, 25 Dec 2021 12:44:31 +0100
Hans Hagen  wrote:

> because these are not errors in the sense of 'quit' ... for instance 
> missing references can be resolved in a second run

Ok, but that's what the context runner is for, not? It's smart and
knows when it's hitting the last run and if there are still
unresolved issues, it could then report the correct return value to
the environment. The runner is responsible for the final return
value, not the individual context run AFAIK.

> you need to be explicit:
> 
> \enabledirectives [logs.errors={missing references,missing
> characters}]

Ok, that works, great news. So if I understand you correctly,
there's no command to enable them *all* at once? Frankly, I'd expect
\enabledirectives [logs.errors] to enable them all (including the
correct return value), but apparently it only enables the reporting
and doesn't affect the return value.

That begs the question: Which error directives are available (so I
can manually enable them)?

Side note: A missing font is not an error:

  \enabledirectives [logs.errors]
  \definefontfamily [foo] [serif] [no font here really]
  \setupbodyfont [foo]
  \starttext foo \stoptext

But I guess that's just not supported.

Marco
___
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] upload

2021-12-25 Thread Marco Patzer via ntg-context
On Sat, 25 Dec 2021 11:55:31 +0100
Hans Hagen  wrote:

>  >mtxrun --autogenerate --script context --autopdf "oeps.tex"  
> 
> 
> 
> mkiv lua stats  > runtime: 0.485 seconds, 1 processed pages, 1
> shipped pages, 2.062 pages/second
> mtx-context | fatal error: return code: 1
> 
> so ... an error ... that's the most i can do

I did some more checking. It seems to return 1 on *some* errors, but
not on all the ones supported by --errors. This example e.g.
compiles with return code 0:

%% enables logging of errors
\enabledirectives [logs.errors]

%% missing font
\definefontfamily [foo] [serif] [no font here really]
\setupbodyfont [foo]

\starttext
  %% missing characters
  풜

  %% missing figure
  \externalfigure [foo]

  %% missing references
  See \in{section}[sec:none].
\stoptext

Marco
___
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] Defining new float types fails in LMTX

2021-12-25 Thread Marco Patzer via ntg-context
On Tue, 30 Nov 2021 15:51:24 +0100
Marco Patzer via ntg-context  wrote:

> There's an issue with defining new floats in LMTX in combination
> with bottom placement.
> 
> The following works in MkIV, but throws an error in LMTX:

Short followup: This issue is still present in 2021.12.25 00:55.

Marco
___
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] location=outer causes bad page break in LMTX

2021-12-25 Thread Marco Patzer via ntg-context
On Tue, 30 Nov 2021 14:13:52 +0100
Marco Patzer via ntg-context  wrote:

> In the following example “Lorem ipsum” sits on an otherwise empty
> page in LMTX. Output is as expected with MkIV.

This is now fixed in the latest version. Thanks Hans.

Marco
___
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] upload

2021-12-25 Thread Marco Patzer via ntg-context
On Fri, 24 Dec 2021 19:45:05 +0100
Hans Hagen via ntg-context  wrote:

> When wrapping up before the weekend I uploaded a new lmtx (bottom
> floats fixed afaiks

If you mean the issue I posted on 2021-11-30, then no. It still
throws an error here on my end.

> exit codes more reliable

The example I posted on 2021-12-15 still returns success when it
should fail. So regarding the exit codes I see no change here.

> side float coming loose from section head issue solved; ...).

That's fixed indeed. Thanks for looking into that.

Marco

LMTX 2021.12.25 00:55
___
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] Errors in source files return success

2021-12-15 Thread Marco Patzer via ntg-context
On Wed, 15 Dec 2021 20:48:29 +0100
Hans Hagen  wrote:

> You can check in the next upload:
> 
> - The 'failure' that you saw was actually a real lua error because I 
> hadn't adapted some fancy, a very old 'around' 2006 feature, seldom
> used as it's more 'an example of possibilities' code to luametatex
> yet ... fwiw, we still share some lua files between engines.

Thanks for looking into that. I'll check the next upload.

> - Afaiks you should now get return code 1 for other cases (say you
> give \foo without meaning). It's a it tricky as this info has to pass
> through several subsystems.

Hard TeX errors (like \undefined) already return 1.

> - The runaway error is actually kind of special (there are a few
> more) where the engine simply quits in confusion and doesn't exit
> hard as error (often because tex could somehow recover). If needed I
> can actually do a real error but it's not entirely compatible then
> (not that i care that much about compatibility in these shady areas.)

I'd vote to handle those as hard errors because

  1) Luametatex isn't focused on compatibility.
  2) The user explicitly requested error reporting (by providing --errors).
  3) No one is recovering tex runs these days.

Marco
___
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] Errors in source files return success

2021-12-15 Thread Marco Patzer via ntg-context
Hi Hans,

a followup to our conversation in the meeting: here's an MWE
demonstrating that errors aren't passed on to the runner script,
except for "logs.errors=missing characters", which in fact do return
failure, all others do return success.

%% enables logging of errors same as --errors
\enabledirectives
  [logs.errors]

\starttext

%% ### semi simple group … entered at line
\startalignment [middle]
  foo

\stoptext

Marco
___
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] Defining new float types fails in LMTX

2021-12-10 Thread Marco Patzer via ntg-context
On Fri, 10 Dec 2021 17:01:26 +0100
Hans Hagen  wrote:

> no example code

The MWE was included in the OP on 2021-10-30. But here it is again:

\setupfloat [figure]
  [default=bottom]  %% fails
  %% [default=top]  %% works

\definefloat
  [foo] [foos]
  [figure]

\starttext
  \startplacefigure [title=Foo]
\framed{Foo}
  \stopplacefigure

  \startplacefoo [title=Bar]
\framed{Bar}
  \stopplacefoo
\stoptext

Marco
___
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] Defining new float types fails in LMTX

2021-12-10 Thread Marco Patzer via ntg-context
On Tue, 30 Nov 2021 15:51:24 +0100
Marco Patzer via ntg-context  wrote:

> There's an issue with defining new floats in LMTX in combination
> with bottom placement.
> 
> The following works in MkIV, but throws an error in LMTX:

I don't know if the error changed or if I copied the wrong error
message in the OP, but a current LMTX throws:

  close source> level 1, order 2, name './t.tex'
  (\end occurred when parameter character 
  luatex warning  > print: bad string offset
   was incomplete)error (nodes): attempt to double-free glue node 2986, ignored

LMTX 2021.12.10 11:29

Marco
___
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] location=outer causes bad page break in LMTX

2021-12-06 Thread Marco Patzer via ntg-context
On Tue, 30 Nov 2021 14:13:52 +0100
Marco Patzer via ntg-context  wrote:

> In the following example “Lorem ipsum” sits on an otherwise empty
> page in LMTX. Output is as expected with MkIV. Has the interface
> changed or may it be a bug in LMTX?

Any ideas?

Marco
___
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] Bad linebreak in figure caption

2021-12-03 Thread Marco Patzer via ntg-context
On Fri, 3 Dec 2021 09:14:59 +0100
Taco Hoekwater  wrote:

> Captions have their own alignment setting:
> 
>  \setupcaption[figure][align={verytolerant,stretch}]

Thanks. Wikified:

  https://wiki.contextgarden.net/Command/setuptolerance

Is there a good reason why captions (as well as e.g. framed texts)
don't honour the global tolerance setting?

Marco
___
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] Bad linebreak in figure caption

2021-12-02 Thread Marco Patzer via ntg-context
On Mon, 29 Nov 2021 16:44:07 +0100
Marco Patzer via ntg-context  wrote:

> Why does ConTeXt not break the line between "unnecessary" and "FOO"?

Any ideas how to fix this?

Marco
___
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] Defining new float types fails in LMTX

2021-11-30 Thread Marco Patzer via ntg-context
Hi!

Apologies for spamming this list with my all the floaty stuff.
There's an issue with defining new floats in LMTX in combination
with bottom placement.

The following works in MkIV, but throws an error in LMTX:

  I'm ignoring this; it doesn't match any \if.
  mtx-context | fatal error: return code: 256

\setupfloat [figure]
  [default=bottom]  %% fails
  %% [default=top]  %% works

\definefloat
  [foo] [foos]
  [figure]

\starttext
  \startplacefigure [title=Foo]
\framed{Foo}
  \stopplacefigure

  \startplacefoo [title=Bar]
\framed{Bar}
  \stopplacefoo
\stoptext

Marco

LMTX 2021.11.26 11:38
___
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] Parameter order in float location matters

2021-11-30 Thread Marco Patzer via ntg-context
On Tue, 30 Nov 2021 14:05:23 +0100
Henning Hraban Ramm via ntg-context  wrote:

> Maybe you could define your own float type for the cases without
> caption?

I've done that for other options, too, I guess no-caption-floats get
a dedicated float type as well now. It's more robust than relying on
typing the correct parameter order each time.

BTW: creating new float types fails in LMTX, I'll post an MWE in
a new thread shortly.

Marco
___
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] location=outer causes bad page break in LMTX

2021-11-30 Thread Marco Patzer via ntg-context
Hi!

In the following example “Lorem ipsum” sits on an otherwise empty
page in LMTX. Output is as expected with MkIV. Has the interface
changed or may it be a bug in LMTX?

\starttext
\null\godown [15.5cm]

\samplefile{knuth}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
\startplacefigure [location=outer]
  \externalfigure
\stopplacefigure

\samplefile{knuth}
\stoptext

Marco

LMTX 2021.11.26 11:38
___
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] Parameter order in float location matters

2021-11-30 Thread Marco Patzer via ntg-context
On Tue, 30 Nov 2021 13:06:00 +0100
Henning Hraban Ramm via ntg-context  wrote:

> Well, in {bottom,top,here} it’s the order that TeX should try.

“location“ sets the location of the caption as well as the position
of the entire float. If you want to influence one, you'll also have
to specify the other, AFAIK. Which is a bit unfortunate since the
placement belongs in an environment and not the running text (it's a
style decision after all).

Take the following example:

\setupfloats [figure] [default=top]

\setupfloats [table]  [default=bottom]
%% \setupfloats [table]  [default=top]

\starttext
  \samplefile{knuth}

  \startplacefigure %% [location=top]  %% default
\externalfigure
  \stopplacefigure

  %% Goal here: turn off the caption, not influence the default placement
  %% needs to be adapted when the global style changes
  %% \startplacefigure [location=none] %% fails, messes up the placement
  \startplacefigure [location={top, none}] %% works
\externalfigure
  \stopplacefigure

  %% Goal here: turn off the caption, not influence the default placement
  %% needs to be adapted when the global style is changed to “top”
  \startplacetable [location={bottom, none}]
\externalfigure
  \stopplacetable
\stoptext

As far as I know there's no way to only turn off captions, so one
has to know the default placement value (which might be buried in an
environment file) and specify it again together with the “none”
option.

If you (or someone else) knows a way to disable the caption without
influencing the placement, I'm all ears.

Marco
___
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] Parameter order in float location matters

2021-11-30 Thread Marco Patzer via ntg-context
Hi!

Today I discovered that the parameter order in float location matters:

\starttext
  \samplefile{knuth}

  \startplacefigure [location={top,none}]  %% works: float is at the top
\externalfigure
  \stopplacefigure

  \startplacefigure [location={none,top}]  %% top is ignored here
\externalfigure
  \stopplacefigure
\stoptext

Not sure if that's how it's supposed to be. In any case, I didn't
expect it.

Marco
___
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] Bad linebreak in figure caption

2021-11-29 Thread Marco Patzer via ntg-context
Hi!

The caption "FOO" runs into the right figure's caption:

\setuplayout [width=18.4cm]
\setuptolerance [verytolerant, stretch]  %% even with stretch

\starttext
  \startplacefigure
\startfloatcombination
  \startplacefigure [title=Unexpectedly unnecessary FOO-BAR whatever]
\framed[width=.4\textwidth]{}
  \stopplacefigure
  \startplacefigure [title={Lorem ipsum dolor siit amet}]
\framed[width=.4\textwidth]{}
  \stopplacefigure
\stopfloatcombination
  \stopplacefigure
\stoptext

Why does ConTeXt not break the line between "unnecessary" and "FOO"?
How to kindly persuade it to do so?

Marco

LMTX 2021.11.26 11:38
___
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] Influence location of luametatex-cache

2021-11-29 Thread Marco Patzer via ntg-context
On Mon, 29 Nov 2021 12:07:51 +0100
Henning Hraban Ramm via ntg-context  wrote:

> > How to influence the location of the cache directory?  
> 
> Try to set TEXMFCACHE

That's it. Thanks Peter and Henning.

Marco
___
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] Influence location of luametatex-cache

2021-11-29 Thread Marco Patzer via ntg-context
Hi!

when LMTX is installed in a read-only location (e.g. /opt) it
creates a directory "luametatex-cache" in $HOME.

How to influence the location of the cache directory?

Marco
___
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] Automatic counting groupsuffix for subfigures

2021-11-24 Thread Marco Patzer via ntg-context
Hi!

I'd like to use subfigure numbering for floats. This works:

\useMPlibrary [dum]
\starttext

\startplacefigure [location=none]
  \startfloatcombination [nx=2]
\startplacefigure [title=Left, reference=ref:left, group=one, groupsuffix=a]
  \externalfigure
\stopplacefigure
\startplacefigure [title=Right, reference=ref:right, group=one, 
groupsuffix=b]
  \externalfigure
\stopplacefigure
  \stopfloatcombination
\stopplacefigure

See \in{image}[ref:right] (right) and \in{image}[ref:left] (left).
\stoptext

The output is correct, but the usage is verbose. I'd like to replace
the manual groupsuffix numbering with something automatic. ConTeXt
uses automatic numbering in many places so it seems strange to
number the subfigures manually.

I have tried using counters and labels, but something is always
messed up and I couldn't get it to work.

How to achieve automatic subfigure numbering without specifying the
groupsuffix manually?

Marco

LMTX 2021.11.22 22:27
___
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] Errors in source files return success

2021-11-18 Thread Marco Patzer via ntg-context
Hi!

ConTeXt can detect issues in the sources and report them on the
console with the argument --errors or with \enabledirectives
[logs.errors]. The return value is still “0” (=success) even with
errors present.

Right now I use a script that parses the log file and lets me know
if a run has issues. However, it would be great if context could
return a non-zero value if errors are present. I've found that

  \enabledirectives
[logs.errors=missing characters]

returns “1” if characters are missing. Lovely!

Undefined control sequences always return 1 (a TeX thing I believe
and not related to the macro package). But undefined control
sequences don't show up on the console as the other errors do if
general output (except errors) is silenced e.g. with

  context --silent --noconsole --nostatistics --errors 

The question is, what other directives can be enabled that make
context return a failure? Is there a way to return failure if *any*
error is encountered or do they need to be enabled each
individually? And is there a way to show hard TeX errors as
undefined control sequences as a “possible issue” if output is
silenced?

MWE:

%% enables logging of errors same as --errors AFAIK
\enabledirectives
  [logs.errors]

%% makes context return 1 on missing chars, great!
%% \enabledirectives
%%   [logs.errors=missing characters]

\starttext

%% missing characters
풜

%% missing figure
\externalfigure [foo]

%% \end occurred inside a group at level 1
%% ### semi simple group … entered at line
\startalignment [middle]
  foo

%% missing references
See \in{section}[sec:none].

%% undefined control sequence
%% \undefined

\stoptext

Marco
___
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] Space before/after combinations + centring

2021-11-17 Thread Marco Patzer via ntg-context
On Wed, 17 Nov 2021 20:17:52 +0100
Wolfgang Schuster  wrote:

> 2. There are no changes to adjust the vertical before and after a
> combination environment.

That's unfortunate.

> Local patches can also be tricky because ConTeXt tries to freeze
> the definitions of many user level commands which means they can't
> be redefined when you use a strict overload mode (look at the
> lowlevel security manual for this feature).

An overload like mine is probably exactly what the strict overload
mode is supposed to protect against.

> The most reliable way to center you combination blocks is to put
> them either in a float or put a framedtext environment around it.

The project comprises several hundred source files. That's why I
stayed away from rewriting the sources in the first place. I'll try
to bulk-change the sources.

Thanks for your explanations.

Marco
___
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] Space before/after combinations + centring

2021-11-17 Thread Marco Patzer via ntg-context
Hi!

I'm in the process of converting some projects to LMTX. Combinations
lacking “”before” and “after” keys (that place content before/after
the *entire* combination, rather than the individual cell pairs), I
came up with the following ugliness – which worked for longer than
it deserved:

\unprotect

\unexpanded\def\startcombination
  {\blank[halfline]%%
   \startalignment[middle]%%
   \dontleavehmode
   \bgroup
   \pack_combinations_push
   \dodoubleempty\pack_combinations_start}

\unexpanded\def\stopcombination
  {\bgroup\normalexpanded{\egroup{}\ntimes{{}{}}\c_pack_combinations_y}% brr
   \dostoptagged
   \egroup
   \pack_combinations_pop
   \egroup
   \stopalignment
   \goodbreak\blank[halfline]}

\protect

\starttext
  \startcombination [2*2]
\startcontent foo \stopcontent \startcaption 1 \stopcaption
\startcontent bar \stopcontent \startcaption 2 \stopcaption
  \stopcombination
\stoptext

I added vertical spacing and mid-aligned the content without having
to change the sources, that was the idea. However, this fails in
LMTX:

  Undefined control sequence \pack_combinations_start

Does LMTX offer finer control over the combinations or do I have to
rewrite the sources files (to either use floats or surround the
combinations with the required commands)?

Marco

LMTX: current version: 2021.11.16 22:36
___
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] Ampersand in \unprotect fails in LMTX

2021-07-09 Thread Marco Patzer
On Fri, 9 Jul 2021 14:29:20 +0200
Hans Hagen  wrote:

> > As \& works for MkIV as well as LMTX, there's an easy workaround.
> > But maybe this isn't intended behaviour and needs checking.
> intended ... author passes different through the system in lmtx
> (better)

Apparently not only author. Also title, subtitle, …

> \starttext
>
> \unprotect
>\setupinteraction
>  [\c!author=\detokenize{Foo & Bar}]
> \protect

That works as well.

> but why unprotect and not just
> 
> \setupinteraction
>[author={Foo & Bar}]

That's just an MWE to demonstrate the problem. The actual code is
part of a module (therefore it's \unprotect'ed).

> of course \& also works ok.

I'll convert to \&. Thanks for the quick reply.

Marco
___
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] Ampersand in \unprotect fails in LMTX

2021-07-09 Thread Marco Patzer
Hi!

the following example compiles with MkIV but fails in LMTX:

\unprotect
  \setupinteraction
[\c!author={Foo & Bar}] %% {Foo \& Bar} works for MkIV and LMTX
\protect

\starttext\null\stoptext

LMTX:

  1 \unprotect
  2   \setupinteraction
  3 [\c!author={Foo & Bar}]
  4 >>  \protect
  5
  6 \starttext\null\stoptext
  7
  I can't figure out why you would want to use a tab mark here. If some right 
brace
  up above has ended a previous alignment prematurely, you're probably due for 
more
  error messages.
  mtx-context | fatal error: return code: 256

As \& works for MkIV as well as LMTX, there's an easy workaround.
But maybe this isn't intended behaviour and needs checking.

ConTeXt  ver: 2021.07.06 18:49 LMTX

Marco
___
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: different output if dots are used in the file name

2021-07-08 Thread Marco Patzer
On Thu, 8 Jul 2021 10:34:32 +0200
Hans Hagen  wrote:

> Now, to the issue of names like 10.11.12.13 ... here .13 is the
> suffix, like it or not, so in principle we then get
> 
> 10.11.12.log
> 10.11.12.tuc
> 10.11.12.pdf

It's not that I use files without (.tex, .mkiv, ...) suffixes, but
your 10.11.12.13 example is processed by MkIV without problems:

10.11.12.pdf
10.11.12.tua
10.11.12.log

LMTX, however doesn't like it:

10.11.pdf
10.11.tua
10.log


> if not then indeed there is some issue.

According to my tests LMTX doesn't work like you describe it should.

> Now, although it's quite some 
> work, one can think of seeing .13 as part of the filename, in which
> case the lookupe becomes
> 
> 10.11.12.13.tex

Just to make it clear: I don't use files without .tex/.mkvi/etc.
suffix. So I don't expect 10.11.12.13 to work, but 10.11.12.tex
should in fact work as far as I understand.

Marco
___
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: different output if dots are used in the file name

2021-07-07 Thread Marco Patzer
On Wed, 7 Jul 2021 12:25:29 -0600
Alan Braslau  wrote:

Thank you for your reply.

> Windows, I believe, does not take kindly to filenames containing
> multiple dots.

Disclaimer: I don't use Windows, I know nothing about Windows. But I
downloaded a Windows 10 VM and fired it up, installed LMTX, created
a file (in the default editor):

  # file name: 10.10.10.tex
  \starttext
  foo
  \stoptext

Then I ran

install.bat
setpath.bat

# LMTX
context 10.10.10.tex
  → 10.10.pdf
  → 10.log

# MkIV
context --luatex 10.10.10.tex
  → 10.10.10.pdf
  → 10.10.10.log

So I can't confirm your findings. MkIV works exactly the same on a
vanilla Windows 10 VM than it does on a Unix system and produces
correct output files with multiple dots. No issues there.

> Therefore, Hans never uses such filenames and does not expect them,
> either, so I am not surprised that this yields unpredictable results.
> 
> An unfortunate side-effect of dealing with Windows.

My short test above seems to suggest that it's not an OS issue since
Unix and Windows behave exactly the same. MkIV (which seems to work
fine on Windows) as well as the LMTX issue. But maybe I did
something wrong there, in that case please let me know.

And Hans said “I'll look at it” a while back, so I just wanted to
send a reminder.

Since it worked in MkIV it looks like a regression. I mean it used
to work. Several of my projects rely on source files with multiple
dots. I know it's not common to have multiple dots, but I hope
there's chance it might be fixed.

But maybe Hans can chime in and clarify.

Marco
___
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: different output if dots are used in the file name

2021-07-06 Thread Marco Patzer
On Thu, 28 May 2020 18:18:51 +0200
Hans Hagen  wrote:

> > LMTX:
> > 10.10.10.tex → 10.10 (not even a PDF suffix)
> > 10.10.11.tex → 10.10 (file 10.10 is over-written)
> > 11.10.11.tex → 11.10 (no suffix)

I've checked again with 2021.07.06 18:49 LMTX

  10.10.10.tex → 10.10.pdf + 10.log
  10.10.11.tex → 10.10.pdf (file 10.10.pdf and 10.log are over-written)
  11.10.11.tex → 11.10.pdf

> > MkIV is way more predictable and consistent in that regard.  
> I'll look at it but not today ... first I need to play with some
> other (neat) stuff and run tests.

A gentle reminder.

As by my tests, something has changed in the last months, but the
behaviour is still weird (e.g. log files differ from pdf file or
10.10.10.tex results in 10.10.pdf).

Is there a chance you can look at that at some point?

Marco
___
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] midi

2021-02-03 Thread Marco Patzer
On Wed, 3 Feb 2021 22:15:59 -0500
Fabrice L  wrote:

> I usually do images ; if you or the list ever want to see more, the
> site https://art-aleatoire.com <https://art-aleatoire.com/> is to
> show my work, and all you can see there is made by me using 100%
> MetaFun

That is some impressive work! Well executed and very creative.

Thanks for posting that link.

Marco
___
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] Continued chapter numbers

2021-01-07 Thread Marco Patzer
On Thu, 7 Jan 2021 00:02:20 +0100
Wolfgang Schuster  wrote:

> > \definestructureresetset is the same as \defineresetset. I assume
> > that \definestructureresetset is the preferred way. But both will
> > work.  
> 
> No, \defineresetset is the main command and \definestructureresetset
> is a alias for backwards compatibility.

Thanks for the info. I updated the wiki.

Marco
___
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] Continued chapter numbers

2021-01-06 Thread Marco Patzer
On Thu, 7 Jan 2021 07:09:46 +1100
jbf  wrote:

> I had searched everywhere on the wiki and in the manuals for
> something like this, based on 'reset' but could not find it.

AFAIK it's not mentioned in the manuals. But a variant is on the
wiki “Independent Section Numbering”:

  https://wiki.contextgarden.net/Titles

  \definestructureresetset
[default][1,1,0][1] %% reset part, chapter, but not section

  \setuphead
[sectionresetset=default]

\definestructureresetset is the same as \defineresetset. I assume
that \definestructureresetset is the preferred way. But both will
work.

Marco
___
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] Continued chapter numbers

2021-01-06 Thread Marco Patzer
On Wed, 6 Jan 2021 20:24:07 +1100
jbf  wrote:

> I need chapter numbers to continue sequentially across several parts.
> At the moment, when Part 2 begins, it begins with Chapter 1 once
> more, while it should be (in continued sequence) Chapter 4.

\defineresetset
  [jbfreset] [] [0]

\setuphead
  [chapter]
  [sectionresetset=jbfreset]

Marco
___
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] Part label and chapter numbers

2021-01-04 Thread Marco Patzer
On Tue, 5 Jan 2021 08:32:33 +1100
jbf  wrote:

> and apologies if you didn't think I provided an MWE.

The idea is that people can just copy-paste the code into an editor
and keep tweaking. It doesn't have to produce the correct output,
but it should compile. If you add an MWE you're more likely to get a
response.

> Of the three issues below, only the first is not resolved, meaning
> that part=Section\nobreakspace does not make any difference, or put
> another way, at least it stops things from throwing an error, but the
> result I get is not 'Section 1. My title' but simply '1. My  title'.

Here's what an MWE with the code I posted looks like:

\setuphead
  [part]
  [placehead=yes,
   bodypartlabel=part]

\setuplabeltext
  [part=Section\nobreakspace]

\setuplabeltext
  [chapter=Chapter\nobreakspace]

\setuphead
  [chapter]
  [conversion=Words]

\setuphead
  [chapter]
  [sectionsegments=chapter]

\setuphead
  [section]
  [sectionsegments=chapter:section]

\starttext
  \startpart [title=Mypart]
\startchapter [title=Some Chapter]
  \startsection [title=Some Section]
\samplefile{knuth}
  \stopsection
\stopchapter
  \stoppart
\stoptext

And the string “Section 1 Mypart” shows up there.

> Below is exactly what I have in my preamble. Note that I have also 
> included \setuphead [section] which is the true 'section' level below 
> 'chapter'. Is it possible that this causes some confusion? 
> Unfortunately, the author still wants 'Part' to be actually named as 
> 'Section'!
> 
> \setuphead
>    [part]
>    [
>    placehead=yes,
>    page=no,
>    bodypartlabel=part
> ]

First, there a bunch of (U+00A0) NO-BREAK SPACEs in your code. I
don't know if that's added by your mail client or if that's actually
in your code. If it's also in the code: Context doesn't like it. The
NO-BREAK SPACEs have to go.

Second, you have a space (new line) after “bodypartlabel=part”. Add
a comma, percent sign or move the closing bracket after the word
“part”.

Marco
___
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] Part label and chapter numbers

2021-01-04 Thread Marco Patzer
On Mon, 4 Jan 2021 13:22:55 +1100
jbf  wrote:

> Issue 1:
> 
> Parts need to be called 'Section' (Section 1, section 2 etc.).

\setuphead
  [part]
  [placehead=yes,
   bodypartlabel=part]

\setuplabeltext
  [part=Section\nobreakspace]

> Issue 2:
> 
> While the above 'sections' are numbered in arabic numbers, Chapters
> are meant to be in words.

\setuplabeltext
  [chapter=Chapter\nobreakspace]

\setuphead
  [chapter]
  [conversion=Words]

> Issue 3 might already be solved once I resolve Issue 2!
> 
> But given that I have parts, the chapters at the moment come out as 
> Chapter 1.1... Chapter 2.1 etc. and I simply want Chapter One,
> Chapter Two and so on

\setuphead
  [chapter]
  [sectionsegments=chapter]

\setuphead
  [section]
  [sectionsegments=chapter:section]

> Any thoughts?

An MWE would have been nice to have.

Marco
___
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] Orphan issue with \startitemize

2020-11-26 Thread Marco Patzer
On Thu, 26 Nov 2020 21:11:25 +
Bruce Horrocks  wrote:

> With \dorecurse{34} all of the items move to the second page even
> though only one extra line has been added and there is now quite a
> large gap at the bottom of the first page.
> 
> Is there a setting that controls this a bit more precisely, please?
> (So that \dorecurse{34} and possibly even 35 would still split one
> and three.)

You could adjust the clubpenalty and widowpenalty:

\startsetups [mypenalties]
  %% \setdefaultpenalties
  \setpenalties\widowpenalties {2}{100}
  \setpenalties\clubpenalties  {2}{100}
\stopsetups

\setuplayout [setups=mypenalties]

Marco
___
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] Subfigures, referencing and resetting counter

2020-11-23 Thread Marco Patzer
On Wed, 18 Nov 2020 20:22:24 +0100
Marco Patzer  wrote:

> I struggle with referencing subfigures.
>
> […]

Any ideas?

Marco
___
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] Section head placement wrong when the after key is used

2020-11-19 Thread Marco Patzer
On Thu, 19 Nov 2020 16:53:52 +0100
Pablo Rodriguez  wrote:

> On 11/19/20 11:55 AM, Marco Patzer wrote:
> > Hi!
> > [...]
> > What's the reason the section head stays on the previous page when
> > the “after” is used and how to fix this?  
> 
> Hi Marco,
> 
> by default (according to strc-def.mkiv), \section has "after=\blank".
> 
> In some cases, I had used "after={”\blank[samepage, medium]}" to
> prevent similar issues.

In my actual document I already use \blank[halfline]. Changing this
to \blank[halfline, samepage] fixes it.

Thank you very much.

Marco
___
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] Section head placement wrong when the after key is used

2020-11-19 Thread Marco Patzer
Hi!

In the following example the 2nd section head stays on page one when
the “after” key is used. If the blackrule is commented out the
section head moves to page two as intended.

What's the reason the section head stays on the previous page when
the “after” is used and how to fix this?

\setuphead
  [section]
  [after=\blackrule]  %% works as desired when commenting this one out

\starttext
  \startsection [title=Foo]
\samplefile{knuth}
  \stopsection

  \startsection [title=Bar]
\framed[height=15cm]{}
\samplefile{knuth}
  \stopsection
\stoptext

Marco
___
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] Subfigures, referencing and resetting counter

2020-11-18 Thread Marco Patzer
Hi!

I struggle with referencing subfigures. Combinations can't be
referenced to my knowledge, that's why I went with another float for
the inner subfigure. Example:


\useMPlibrary[dum]

\definefloat
  [subfigure]
  [subfigures]
  [figure]

\setupcaptions
  [subfigure]
  [numberconversion=characters,
   numberstopper=)]

\setuplabeltext
  [subfigure=]

\definecounter
  [subfigure]
  [way=bytext]

\starttext

\startplacefigure [title=First, reference=first]
  \startfloatcombination [nx=2, ny=1]
\startplacesubfigure
  \externalfigure
\stopplacesubfigure
\startplacesubfigure [reference=fig:firstsub]
  \externalfigure
\stopplacesubfigure
  \stopfloatcombination
\stopplacefigure

\startplacefigure [title=Second, reference=second]
  \startfloatcombination [nx=2, ny=1]
\startplacesubfigure
  \externalfigure
\stopplacesubfigure
\startplacesubfigure [title=beta, reference=fig:secondsub]
  \externalfigure
\stopplacesubfigure
  \stopfloatcombination
\stopplacefigure

See \in{figure}[first],
\in{figure}[fig:firstsub] and
\in{figure}[fig:secondsub].

\stoptext


How to reset the counter for the subfigure to start anew for each
new figure?

The second issue is the referencing of subfigures. The MWE shows
“figure b)” and “figure d)” rather than “figure 1b)” and “figure
2b)”. How to include the outer float counter in the reference?

Marco
___
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] Input file name containing full stop "."

2020-09-09 Thread Marco Patzer
On Wed, 9 Sep 2020 10:56:09 +0200
Christoph Reller  wrote:

> I am using ConTeXt LMTX Version 2020.09.05 21:18 with an input file
> named, e.g., "test.test.tex". When compiling, ConTeXt generates files
> "test.log", "test.tua", "test.pdf".
> 
> ConTeXt MKIV used to produce files "test.test.log", "test.test.tua",
> "test.test.pdf".

Same issue here. (BTW: That's the main reason I'm still on MkIV.)

  https://mailman.ntg.nl/pipermail/ntg-context/2020/098260.html

Marco
___
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] Store images and text in the right margin

2020-07-03 Thread Marco Patzer
On Fri, 3 Jul 2020 08:40:22 +0200
Fabrice Couvreur  wrote:

> Thanks, it works but only for a comment and a picture. Indeed, if I
> add a comment and an image, the first image is placed on the second
> comment. Fabrice
> 
> \starttext
> \startuserdata[margintext]
>  \input ward
> \stopuserdata
> \marginfigure{\externalfigure[dummy][width=\rightmarginwidth,location=high]}

\marginfigure{\externalfigure[dummy][width=\rightmarginwidth,location=top]}

> \startuserdata[margintext]
>  \input ward
> \stopuserdata
> \marginfigure{\externalfigure[dummy][width=\rightmarginwidth,location=high]}

\marginfigure{\externalfigure[dummy][width=\rightmarginwidth,location=top]}

Marco
___
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] Store images and text in the right margin

2020-07-02 Thread Marco Patzer
On Thu, 2 Jul 2020 17:20:07 +0200
Fabrice Couvreur  wrote:

Try:

> \useMPlibrary[dum]
> 
> \setuppapersize[A4]
> 
> \setuplayout
>   [width=12cm,
>rightmargin=5cm]
> 
> \definemargindata[marginfigure][inright]
> \setupmargindata [marginfigure][command=\vbox,align=middle]

\setupmargindata [marginfigure][command=\vbox,align=middle,stack=yes]

> \startsetups [userdata:margintext]
>   \margindata
> [inright]
> [%style=\smallbodyfont,
>  style={\switchtobodyfont[9pt]},
>  width=\rightmarginwidth,

  stack=yes,

>  align={flushleft,broad}]
> {{\bf Remarque — }\getinlineuserdata}
> \stopsetups

> \marginfigure{\externalfigure[dummy][width=\rightmarginwidth]}

\marginfigure{\externalfigure[dummy][width=\rightmarginwidth,location=high]}

Marco
___
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] Using \defineoverlay for a framed text

2020-06-16 Thread Marco Patzer
On Tue, 16 Jun 2020 14:37:17 +0200
Marco Patzer  wrote:

> On Tue, 16 Jun 2020 14:17:09 +0200
> Willi Egger  wrote:
> 
> > I try to use a Metapost drawing as a background to a framed text. —
> > I can not make it working though…
> > 
> > \startuniqueMPgraphic{Markings}
> > %{Markings:\overlaywidth:\overlayheight} fill OverlayBox enlarged
> > 5mm withcolor blue; \stopuniqueMPgraphic
> > 
> > \defineoverlay[Marks]{\useMPgraphic{Markings}}  
> 
> \defineoverlay[Marks][{\useMPgraphic{Markings}}]

Better:

\defineoverlay[Marks][\useMPgraphic{Markings}]

Marco
___
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] Using \defineoverlay for a framed text

2020-06-16 Thread Marco Patzer
On Tue, 16 Jun 2020 14:17:09 +0200
Willi Egger  wrote:

> I try to use a Metapost drawing as a background to a framed text. — I
> can not make it working though…
> 
> \startuniqueMPgraphic{Markings}
> %{Markings:\overlaywidth:\overlayheight} fill OverlayBox enlarged 5mm
> withcolor blue; \stopuniqueMPgraphic
> 
> \defineoverlay[Marks]{\useMPgraphic{Markings}}

\defineoverlay[Marks][{\useMPgraphic{Markings}}]

Marco
___
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] Installing Modules with ConTeXt LMTX

2020-06-01 Thread Marco Patzer
On Mon, 01 Jun 2020 19:58:59 +0200
Sebastian Miele  wrote:

> I want to try the t-letter module. I have a fresh install of ConTeXt
> LMTX from today. The page https://wiki.contextgarden.net/Modules has
> sections "Installation by hand" and "ConTeXt standalone", but no
> section on ConTeXt LMTX.
> 
> The section on ConTeXt standalone mentions a --modules switch to
> first-setup.sh in order to include modules. This cannot work with the
> install.sh from ConTeXt LMTX, as it does not pass any command line
> arguments to mtxrun.

As far as I understand there is no built-in method. You have to
install them manually. Relevant thread:

  https://mailman.ntg.nl/pipermail/ntg-context/2020/097022.html

Marco
___
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] mtxrun exit code

2020-05-29 Thread Marco Patzer
On Fri, 29 May 2020 11:20:22 +0200
Hans van der Meer  wrote:

> I am producing a series of files in a shell script with mtxrun
> --autogenerate --script context input Doing exit mtxrun... shows
> there is no exit number to test in the shell

The exit code from mtxrun works here:

printf '%s\n' '\bye' > good.tex && mtxrun --autogenerate --script context 
good.tex; echo $?
0

printf '%s\n' '\by' > bad.tex && mtxrun --autogenerate --script context 
bad.tex; echo $?
1

Marco
___
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: different output if dots are used in the file name

2020-05-28 Thread Marco Patzer
On Thu, 28 May 2020 18:18:51 +0200
Hans Hagen  wrote:

> > MkIV (everything's predictable and fine):
> > 10.10.10.tex → 10.10.10.pdf
> > 10.10.11.tex → 10.10.11.pdf
> > 11.10.11.tex → 11.10.11.pdf
> > 
> > LMTX:
> > 10.10.10.tex → 10.10 (not even a PDF suffix)
> > 10.10.11.tex → 10.10 (file 10.10 is over-written)
> > 11.10.11.tex → 11.10 (no suffix)
> > 
> > MkIV is way more predictable and consistent in that regard.  
> I'll look at it but not today ... first I need to play with some
> other (neat) stuff and run tests.

OK, thanks. No hurry. The production projects run on some oldish
2019 MkIVs anyway. I'm trying to get my feet wet with lmtx and run
it on some projects to check how usable and compatible it is.

Marco
___
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: different output if dots are used in the file name

2020-05-28 Thread Marco Patzer
On Thu, 28 May 2020 17:33:19 +0200
Hans Hagen  wrote:

> On 5/28/2020 2:49 PM, Marco Patzer wrote:
> > Hi!
> > 
> > LMTX and MkIV behave differently if dots are used in the file
> > name. Example:
> > 
> >printf '%s\n' '\starttext\null\stoptext' > foo.10.tex && context
> > foo.10.tex
> > 
> > MkIV: → foo.10.pdf
> > LMTX: → foo.pdf
> > 
> > Is this intentional?  
> 
> consider it to be so

That's unfortunate.

1) The editor workflow with simple suffix replacement .tex → .pdf to
   open the corresponding PDF file doesn't work any more with lmtx.
   New logic is needed to find the correct pdf file name.

2) A project (of mine) that uses item numbers as file names
   (containing dots) compile to the same pdf:

   MkIV (everything's predictable and fine):
   10.10.10.tex → 10.10.10.pdf
   10.10.11.tex → 10.10.11.pdf
   11.10.11.tex → 11.10.11.pdf

   LMTX:
   10.10.10.tex → 10.10 (not even a PDF suffix)
   10.10.11.tex → 10.10 (file 10.10 is over-written)
   11.10.11.tex → 11.10 (no suffix)

MkIV is way more predictable and consistent in that regard.

Marco
___
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: different output if dots are used in the file name

2020-05-28 Thread Marco Patzer
On Thu, 28 May 2020 17:33:19 +0200
Hans Hagen  wrote:

> On 5/28/2020 2:49 PM, Marco Patzer wrote:
> > Hi!
> > 
> > LMTX and MkIV behave differently if dots are used in the file
> > name. Example:
> > 
> >printf '%s\n' '\starttext\null\stoptext' > foo.10.tex && context
> > foo.10.tex
> > 
> > MkIV: → foo.10.pdf
> > LMTX: → foo.pdf
> > 
> > Is this intentional?  
> 
> consider it to be so

That's unfortunate.

1) The editor workflow with simple suffix replacement .tex → .pdf to
   open the corresponding PDF file doesn't work any more with lmtx.
   New logic is needed to find the correct pdf file name.

2) A project (of mine) that uses item numbers as file names
   (containing dots) compile to the same pdf:

   MkIV (everything's predictable and fine):
   10.10.10.tex → 10.10.10.pdf
   10.10.11.tex → 10.10.11.pdf
   11.10.11.tex → 11.10.11.pdf

   LMTX:
   10.10.10.tex → 10.10 (not even a PDF suffix)
   10.10.11.tex → 10.10 (file 10.10 is over-written)
   11.10.11.tex → 11.10 (no suffix)

MkIV is way more predictable and consistent in that regard.

Marco
___
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: different output if dots are used in the file name

2020-05-28 Thread Marco Patzer
Hi!

LMTX and MkIV behave differently if dots are used in the file
name. Example:

  printf '%s\n' '\starttext\null\stoptext' > foo.10.tex && context foo.10.tex

MkIV: → foo.10.pdf
LMTX: → foo.pdf

Is this intentional?

This is LuaMetaTeX, Version 2.06.05
current version: 2020.05.25 23:39

Marco
___
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: natural table error namespace 'naturaltablelocal', key ', '

2020-05-28 Thread Marco Patzer
Hi!

With LMTX the following example results in

  setup   > error in line 7, namespace 'naturaltablelocal', key ','
  setup   > error in line 7, namespace 'naturaltablelocal', key ','

The file runs without error in MkIV. Has something changed or is it
a bug?

  \starttext
\bTABLE
  \bTR
\bTD \samplefile{knuth} \eTD
\bTD \samplefile{knuth} \eTD
  \eTR
\eTABLE
  \stoptext


This is LuaMetaTeX, Version 2.06.05
current version: 2020.05.25 23:39

Marco
___
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] Styling of included buffers or files

2020-05-17 Thread Marco Patzer
On Sun, 17 May 2020 18:16:13 +0200
"Jan U. Hasecke"  wrote:

> I am currently writing a text where I want to include text snippets
> either by including files or including buffers.
> 
> What is the best way to style all these included buffers?
> 
> I know that I can do something like this:
> 
> \startcolumns
> \getbuffer[Muenchen]
> \stopcolumns
> 
> Or do something with \defineparagraph
> 
> Is it somehow possible to apply styles to all buffers that gets
> included via \getbuffer by defining a special getbuffer-style?

\setupbuffer has before and after keys which can be used. Example:

\setupbuffer
 [before=\blank\blackrule\startnarrower\BufferStyle,
  after=\stopnarrower\blackrule\blank]

%% alternatively define custom buffers
\definebuffer
 [foobar]

\setupblackrules
  [width=1cm,
   height=1pt,
   color=gray]

\definehighlight
  [BufferStyle]
  [style=smallitalic,
   color=blue]

\startbuffer
  \samplefile{knuth}
\stopbuffer

\starttext
  \samplefile{knuth}
  \getbuffer
  \samplefile{knuth}

\stoptext

Marco
___
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] Retrieving original value of enviroment variable HOME

2020-05-11 Thread Marco Patzer
On Mon, 11 May 2020 12:50:51 +0200
cont...@vivaldi.net wrote:

> so I made a new parallel installation, following exactly instructions 
> here:
> 
>https://wiki.contextgarden.net/Windows_10_64_bit_Installation_2019
> 
> I forced 32b version due to some reasons.
> 
> But I'm still getting the same LuaTeX version:

I had the same issue. You have to add --context=latest:

  https://mailman.ntg.nl/pipermail/ntg-context/2020/097651.html

Marco
___
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 version stuck at 2020.01.30

2020-05-05 Thread Marco Patzer
On Tue, 5 May 2020 20:38:55 +0200
Wolfgang Schuster  wrote:

> Marco Patzer schrieb am 05.05.2020 um 20:26:
> > Hi!
> > 
> > Has something changed regarding the installation/update procedure?
> > ConTeXt seems to be stuck at 2020.01.30 and downloading the newest
> > version results in that very version.
> 
> https://mailman.ntg.nl/pipermail/ntg-context/2020/097651.html

I vaguely remember someone mentioning it on the list at some
point, but failed to find it.

Thanks for the pointer. I'm back on track now.

Marco
___
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] ConTeXt version stuck at 2020.01.30

2020-05-05 Thread Marco Patzer
Hi!

Has something changed regarding the installation/update procedure?
ConTeXt seems to be stuck at 2020.01.30 and downloading the newest
version results in that very version.

Steps to reproduce:

  rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh .
  sh ./first-setup.sh
  . tex/setuptex
  context --version
  → current version: 2020.01.30 14:13

According to

  https://minimals.contextgarden.net/current/context/

the directory “latest” seems to contain the latest version, rather
than the “beta”. first-setup.sh however uses the “beta” directory.

Has something changed and first-setup.sh hasn't been updated to
reflect that change? Or is something else going on? Adapting
first-setup.sh to mirror from the “latest” directory seems to fetch
the latest version:

  rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh .
  sed -s '/\/bin\/mtxrun/s/--context=beta/--context=latest/' first-setup.sh
  sh ./first-setup.sh
  . tex/setuptex
  context --version
  → current version: 2020.04.30 11:10

Marco
___
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] mailing list behaviour (was: Spurious newlines at beginning of startstop pair)

2019-11-29 Thread Marco Patzer
On Fri, 29 Nov 2019 12:10:46 +0100
Henning Hraban Ramm  wrote:

> The problem seems to be that traditional mailing lists like this just
> don’t work with modern security standards.
> 
> I didn’t check how secure NTG’s mail server is configured, but
> changing subject and sender of every message is regarded harmful. Not
> doing that would mean that: 
> * I can’t filter mails (visually or rule based) by subject any more.

Sorting can easily be done using other headers , e.g. “List-Id”.

> * A lot of replies would only go to the sender.

Very true.

> * The connection of threads would get lost.

Why? Threads are arranged by the “References” and “In-Reply-To”
headers which are not modified.

Marco
___
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] Watchmode

2019-11-29 Thread Marco Patzer
On Fri, 29 Nov 2019 11:07:01 +0100
Denis Maier  wrote:

> is there a watchmode for ConTeXt?

I'm not aware of such a feature.

> So that I can it once and ConTeXt will re-typeset a file once
> there are changes?

Idea:

file='somefile.tex'
while true; do
  inotifywait --event modify "$file"
  context --batchmode "$file"
done

Marco
___
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] Images run into each other when using side floats

2019-10-30 Thread Marco Patzer
On Wed, 30 Oct 2019 18:48:43 +0100
Wolfgang Schuster  wrote:

> Marco Patzer schrieb am 30.10.2019 um 17:16:
> > On Wed, 30 Oct 2019 11:55:17 -0400 (EDT)
> > Aditya Mahajan  wrote:
> >  
> >> On Wed, 30 Oct 2019, Marco Patzer wrote:
> >>  
> >>> Hi!
> >>>
> >>> Some images run into each other when using floats. The following
> >>> example illustrates this. The second image (or frame) runs into
> >>> the side figure frame. How to prevent this?
> >>>
> >>> \setupfloat [figure] [default=left]
> >>>
> >>> \starttext
> >>>   \samplefile{knuth}
> >>>
> >>>   \startplacefigure [title=Foo]
> >>> \framed [width=5cm, height=5cm]{}
> >>>   \stopplacefigure
> >>>
> >>>   \samplefile{ward} \blank  
> >> Add:
> >>
> >> \dontleavehmode  
> > Thanks for the nudge in the right direction.
> >
> > Is there a way to include the \dontleavehmode in the combinations?  
> No.

Thanks for the answer and the quick help. Then I'll change the
sources.

Marco
___
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] Images run into each other when using side floats

2019-10-30 Thread Marco Patzer
On Wed, 30 Oct 2019 11:55:17 -0400 (EDT)
Aditya Mahajan  wrote:

> On Wed, 30 Oct 2019, Marco Patzer wrote:
> 
> > Hi!
> >
> > Some images run into each other when using floats. The following
> > example illustrates this. The second image (or frame) runs into the
> > side figure frame. How to prevent this?
> >
> > \setupfloat [figure] [default=left]
> >
> > \starttext
> >  \samplefile{knuth}
> >
> >  \startplacefigure [title=Foo]
> >\framed [width=5cm, height=5cm]{}
> >  \stopplacefigure
> >
> >  \samplefile{ward} \blank  
> Add:
> 
> \dontleavehmode

Thanks for the nudge in the right direction.

Is there a way to include the \dontleavehmode in the combinations?
The frame is actually a combination (removed while creating MWE).
The before key from \setupcombinations doesn't seem to do the right
thing here. If that's possible I can leave the sources as they are.

\setupfloat [figure] [default=left]

\starttext
  \samplefile{knuth}

  \startplacefigure [title=Foo]
\framed [width=5cm, height=5cm]{}
  \stopplacefigure

  \samplefile{ward} \blank

  \dontleavehmode
  \startcombination [1*1]
\startcontent \framed [width=4cm, height=4cm]{} \stopcontent
\startcaption Foo \stopcaption
  \stopcombination

  \samplefile{knuth}
\stoptext

Marco
___
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] Images run into each other when using side floats

2019-10-30 Thread Marco Patzer
Hi!

Some images run into each other when using floats. The following
example illustrates this. The second image (or frame) runs into the
side figure frame. How to prevent this?

\setupfloat [figure] [default=left]

\starttext
  \samplefile{knuth}

  \startplacefigure [title=Foo]
\framed [width=5cm, height=5cm]{}
  \stopplacefigure

  \samplefile{ward} \blank
  \framed [width=4cm, height=4cm]{}
  \samplefile{knuth}
\stoptext

context 2019.10.29 15:00

Marco
___
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] Using \currentreferencenumber triggers “has a hidden number” in log file

2019-07-18 Thread Marco Patzer
Hi,

I use

  \enabletrackers
[structures.referencing.empty]

to catch references by number to sections without a number. The log
file contains “has a hidden number…” in that case. I have a command
that uses \currentreferencenumber which triggers the “has a hidden
number…” warning in the log file. But that command takes care not to
output the contents of that variable. But merely using it in an
\doif\currentreferencenumber is sufficient to trigger the log
message. Example:

\enabletrackers
  [structures.referencing.empty]

\def\foo[#1]{%%
  \doifreferencefoundelse{#1}{%%
\doifelse\currentreferencenumber\emptyreference
{Foo}{Bar}}%%
}

\setuphead
  [section] [number=no]

\starttext
  \startsection [title=Foo, reference=sec:foo]
\samplefile{knuth}
  \stopsection
  \foo[sec:foo]
\stoptext

Then check the log file for “has a hidden number”.

1) How to not trigger the log message when checking
   \currentreferencenumber? Or alternatively

2) Is there a better way to find invisible references?

Marco
___
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] Spacing after combination

2019-07-16 Thread Marco Patzer
On Tue, 16 Jul 2019 21:09:15 +0200
Wolfgang Schuster  wrote:

> A alternative to using floats is to put the combination in a 
> linecorrection environment, i.e.
> 
> \startlinecorrection
>    \startcombination [2*2]
>    ...
>    \stopcombination
> \stoplinecorrection
> 
> or
> 
> \startlinecorrection[blank]
>    \startcombination [2*2]
>    ...
>    \stopcombination
> \stoplinecorrection

I hadn't thought of this. That's better suited than a float.
However, I'd prefer to not have another environment around the
combinations, but if there's no other way, I'd settle for your
approach. So far that seems to be the best choice.

Thanks for the quick response.

Marco
___
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] Spacing after combination

2019-07-16 Thread Marco Patzer
Hi!

Is there a way to influence the spacing after a combination is
placed?

\useMPlibrary [dum]

\starttext

\startcombination [2*2]
  \startcontent \externalfigure  \stopcontent
  \startcaption Foo\stopcaption
  \startcontent \externalfigure  \stopcontent
  \startcaption Bar\stopcaption
  \startcontent \externalfigure  \stopcontent
  \startcaption Lorem  \stopcaption
  \startcontent \externalfigure  \stopcontent
  \startcaption Ipsum  \stopcaption
\stopcombination

\samplefile{knuth}

\stoptext

I know I could wrap it in a float and use the float to control the
spacing, but it would be great if I could do without that float.

Marco
___
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] Distance between two Columns

2019-02-28 Thread Marco Patzer
On Thu, 28 Feb 2019 10:43:48 +
Ursula Hermann  wrote:

> I have the following example. I would like to have two columns that
> are in the distance small.

I'm not sure if I understand you correctly. You want to change the
distance between the columns? That can be done with:

  \setupcolumns
[distance=2cm]

> So I have tried:
> 
> \setuppapersize[A5]
> \startcolumns
> \defineframed
>[tightframed][width=5cm,width.1\textwidth,align=right]

1. Usually you don't define stuff in the main text. That's what the
   setup area (before \starttext) if for.
2. width is specified twice
3. width.1\textwidth is not valid, an = sign is missing

> \tightframed{Small}
> \column
> \tightframed{A really really long line that is split at 5cm}

\stopcolumns is missing.

Furthermore, \start/stoptext is missing. That results in the
monospaced font. I'd write your example as follows:

\setuppapersize
  [A5]

\defineframed
  [tightframed]
  [width=5cm,
   %% width=.1\textwidth,
   align=right]

\setupcolumns
  [distance=.5cm]

\starttext

\startcolumns
  \tightframed{Small}
\column
  \tightframed{A really really long line that is split at 5cm}
\stopcolumns

\stoptext

Marco
___
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] Frame

2019-02-21 Thread Marco Patzer
On Thu, 21 Feb 2019 18:24:29 +0100
Wolfgang Schuster  wrote:

> > \startprettyblock
> >\noindentation  
> 
> You don’t need \noindentation when you add “next” to the indenting
> options.

That's even better (meaning cleaner source). I didn't know that
option.

Marco
___
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] Pretty printer for matlab

2019-02-21 Thread Marco Patzer
On Thu, 21 Feb 2019 15:10:27 +0100
Otared Kavian  wrote:

> Thanks for pointing to that module, which I didn't know because I
> never use vim… I just tested it and seems fine, but I would need to
> modify some of the keywords of Matlab in order to adapt them to
> Scilab. However I didn't find where those keywords are defined in the
> vim module.

They're not defined in the vim module. The vim module is just a way
to use vim's syntax highlighting in context. The syntax should be
defined in the vim files .vim in the vim directory, e.g.
/usr/share/vim/vim81/syntax/.vim if I'm not mistaken.

Have you tried using “syntax=scilab”?

Marco
___
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] Pretty printer for matlab

2019-02-21 Thread Marco Patzer
On Thu, 21 Feb 2019 14:25:03 +0100
Otared Kavian  wrote:

> Is there a pretty printer file to typeset Matlab codes?

How about Aditya's vim module? It supports Matlab:

\usemodule [vim]
\definevimtyping [matlab] [syntax=matlab]
\starttext
\startmatlab
  …
\stopmatlab
\stoptext

Marco
___
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] Frame

2019-02-21 Thread Marco Patzer
On Thu, 21 Feb 2019 10:50:21 +
Ursula Hermann  wrote:

> Here is my example:
> 
> \setuppapersize[A5]
> \setupcolors[state=start]

This is the default, no need to start the colours any longer.

> {\framed
>[width=10cm,
>background=color,backgroundcolor=darkblue,
>foreground=color,foregroundcolor=white,
>align={flushleft}]
> {The Earth, as a habitat for animal life, is in old age and has a
> fatal illness. Several, in fact.\par \setupindenting[yes, small]
> It would be happening whether humans had ever evolved or not.
> 
> \externalfigure[cow.pdf][width=1cm]}
> 
> \setupwhitespace[small]
> \starttext
> Below, we have two separate columns; but up here, for the nonce, we
> have but the one.
> 
> \startcolumns[n=2]  % Two columns, please
> Text, text, text \dots
> all in the first column
> \column
> Words, words, words \dots
>all in the second column.
> And look ye here! Even more words!
> \stopcolumns
> \stoptext
> Why can‘t I see the cow?

You're missing

  \setupexternalfigures
[location=default]

Without setting the location context doesn't check the system
directories for the sample images.

Furthermore, you're typesetting before \starttext. That's why your
font is monospaced.

And I try to separate content from style. That's why I move all
style information before \starttext and after \starttext comes only
content and markup (if possible). Nothing wrong with mixing it, but
it's easier to read and easier to change the layout after the fact.
I'd write your example as follows.

\setuppapersize
  [A5]

\setupexternalfigures
  [location=default]

\setupindenting
  [yes, small]

\setupwhitespace
  [small]

\defineframedtext
  [prettyblock]
  [width=10cm,
   indenting={yes, small},
   background=color, backgroundcolor=darkblue,
   foreground=color, foregroundcolor=white,
   offset=2mm,
   align=flushleft]

\starttext

\startprettyblock
  \noindentation
  The Earth, as a habitat for animal life, is in old age and has a fatal
  illness. Several, in fact.

  It would be happening whether humans had ever evolved or not.

  \externalfigure[cow][width=1cm]
\stopprettyblock

Below, we have two separate columns; but up here, for the nonce, we have but
the one.

\startcolumns [n=2]
  Text, text, text \dots
  all in the first column
\column
  Words, words, words \dots
  all in the second column.
  And look ye here! Even more words!
\stopcolumns

\stoptext

Marco
___
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] Frame

2019-02-19 Thread Marco Patzer
On Tue, 19 Feb 2019 13:01:35 +
Ursula Hermann  wrote:

> I have:
> \framed
>   [height=3em,
>width=.5\textwidth,
>foregroundcolor=red,
>framecolor=blue,
>rulethickness=2pt,
>background=color,
>backgroundcolor=green]
> \starttext
> {Ich bin da.\par Du auch}
> \stoptext

Move the \starttext to the beginning:

\starttext
\framed
  [height=3em,
   width=.5\textwidth,
   foregroundcolor=red,
   framecolor=blue,
   rulethickness=2pt,
   background=color,
   backgroundcolor=green]
{Ich bin da.\par Du auch}
\stoptext

Marco
___
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] Frame with Color

2019-02-18 Thread Marco Patzer
On Mon, 18 Feb 2019 12:26:45 +
Ursula Hermann  wrote:

> \framed
>   [background=color,backgroundcolor=red,
>foreground=color,foregroundcolor=white

   foreground=color,foregroundcolor=white,

>   frame=off]
>   {\bf Wichtig}

Marco
___
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] degrade module

2019-02-18 Thread Marco Patzer
On Sun, 17 Feb 2019 12:14:14 +0100
Peter Münster  wrote:

> On Fri, Feb 15 2019, Marco Patzer wrote:
> 
> > - It's 99% Peter's code, he's the maintainer of the module and
> >   probably he should just fix his code.  
> 
> Done.
> 
> 
> > - My modification contains an ugly hack that just renames all files
> >   to pdf, regardless of the actual file type because I have no clue
> >   how to do that properly.  
> 
> I've included your hack, because I don't have any better idea...

ok

> > That code shouldn't make it into the distribution.  
> 
> Why not? Just because of the hack?

Yes. I didn't put much thought into it and assumed there is a better
solution.

Marco
___
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] degrade module

2019-02-15 Thread Marco Patzer
On Fri, 15 Feb 2019 11:48:51 +0100
Lutz Haseloff  wrote:

> Your Module with wrapper finally works for me as expected.

Great to hear it's finally working.

> Will it find its way into the distribution as an  enhanced degrade
> module?

Probably not, for the following reasons:

- It's 99% Peter's code, he's the maintainer of the module and
  probably he should just fix his code.

- My modification contains an ugly hack that just renames all files
  to pdf, regardless of the actual file type because I have no clue
  how to do that properly. That code shouldn't make it into the
  distribution.

- I'm not fluent in Lua and am therefore not the right person to
  maintain a Lua module.

Marco
___
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] degrade module

2019-02-15 Thread Marco Patzer
On Fri, 15 Feb 2019 10:22:48 +0100
Lutz Haseloff  wrote:

> but both scripts trow the same error on windows and linux-armhf:
> 
> grph-downsample.lua:32: bad argument #2 to 'format' (number has no
> integer representation)

It works here on linux-armhf. No Lua error. Maybe the file got
mangled during transmission.

I've uploaded a modified version to github, maybe try that one:

  https://github.com/mpfusion/context-downsample

It includes a wrapper so you can call it like any other module
(\usemodule[downsample]). It's still Peter's code, but with small
modifications, so it degrades jpg as well as png images at the same
time. It's a quick hack, but works here, also on armhf.

Marco
___
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] degrade module

2019-02-14 Thread Marco Patzer
On Fri, 15 Feb 2019 07:56:31 +0100
Lutz Haseloff  wrote:

> First i tried the grph-downsample.lua script.
> Unfortunately i get an error message
> grph-downsample.lua:31: bad argument #2 to 'format' (number has no
> integer representation) See attached log file.

I remember that error. The script worked up to a particular context
version. I believe a Lua upgrade broke it. The version attached
should work.

Marco
if not modules then modules = { } end modules ['t-downsample'] = {
  version   = 1.001,
  comment   = "companion to grph-inc.mkiv",
  author= "Peter Münster",
  copyright = "PRAGMA ADE / ConTeXt Development Team",
  license   = "see context related readme files"
}

local format = string.format
-- figures.cachepaths.path = "cache" -- should be setup-option
local function sample_down(oldname, newname, resolution)
	local request = figures.current().request
	local width = request.width
	local height = request.height
	if resolution == "" or (not width and not height) then
		print(format("Nothing to do: %s, %s, %s", oldname, newname, resolution))
		return
	end
	local inch = 72.27
	local image = img.scan{filename = oldname}
	local xy = image.xsize / image.ysize
	if not width then
		width = height * xy / 65536
	end
	if not height then
		height = width / xy / 65536
	end
	local xsize = resolution * width / inch
	local ysize = resolution * height / inch
	if xsize < image.xsize or ysize < image.ysize then
		local s = format("gm convert -strip -resize %dx%d %s %s",
		xsize, ysize, oldname, newname)
		print("Conversion: " .. s)
		os.execute(s)
	else
		print(format("Nothing to do: %s, %s, %s", oldname, newname, resolution))
		print(format("xsize = %d, ysize = %d", xsize, ysize))
	end
end

local formats = {"png", "jpg", "gif"}

for _, s in ipairs(formats) do
	figures.converters[s] = figures.converters[s] or {}
	figures.converters[s]["lowres." .. s] = sample_down
end
___
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] degrade module

2019-02-14 Thread Marco Patzer
On Thu, 14 Feb 2019 20:49:43 +0100
Lutz Haseloff  wrote:

> I wanted to use the degrade module with recent ConTeXt and LuaTeX.
> The minimal example from the degrade manual gives an error.
> See the attached log.
> Is there any chance to get the module working again?

I never used the degrade module. Instead I use the downsample.lua
script which works fine with a current beta. Maybe give it a try.

Apparently it's not on the wiki and if I remember correctly I got it
off the mailing list. Let me know if you can't find it.

Marco
___
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] State of the reference manual contextref.pdf

2019-02-11 Thread Marco Patzer
On Mon, 11 Feb 2019 09:11:53 +0100
Taco Hoekwater  wrote:

> Hi,
> 
> > On 11 Feb 2019, at 07:43, Hans Hagen  wrote:
> > 
> >   
> >> The wiki should reflect that, at least the old repo information
> >> (foundry.supelec.fr) should go. The manual can stay. But before
> >> removing the info on the wiki someone needs to confirm there's no
> >> repo any longer.  
> 
> Yes, the repo is gone.

Thanks for confirming. In case someone needs the sources, I uploaded
them to github (if no one objects). But I doubt I'll find the time
to keep it updated.

  https://github.com/mpfusion/context-contextman

> The page at https://wiki.contextgarden.net/Manuals feels a bit
> out-of-date anyway, but I removed the reference to supelec.fr
> right now.

While you're at it. This one points to supelec, too:

  https://wiki.contextgarden.net/Improving_the_manuals

> Clearly more work is needed on how to present the ConTeXt
> documentation, and that is something that we are still working on.

Never-ending story. But at least we should remove obviously
wrong/outdated information. If my wiki login still works and have
the permission, I can have a go myself some time this week.

> > Sure, so best coordinate this with taco who is cleaning up /
> > upgrading the wiki andhas a shadow to play with running. Actually
> > some more input on / help with that is welcome.  
> 
> And there is a mailing list to go with it:
> 
>   https://lists.contextgarden.net/mailman/listinfo/wiki

I didn't know there's a list for the wiki. Signed up.

Marco
___
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] State of the reference manual contextref.pdf

2019-02-10 Thread Marco Patzer
On Sun, 10 Feb 2019 17:43:09 +0100
Hans Hagen  wrote:

> that effort was changed in cooking up smaller independent manuals ...

Which I personally like. It provides more in depth knowledge.

> that ref manual still applies to much (encodings and fonts have
> changed of course)

I know about the state of the manual. The question is, if it's
frozen and abandoned and the source repo closed down or if it has
moved elsewhere. But as it seems it's no longer updated.

The wiki should reflect that, at least the old repo information
(foundry.supelec.fr) should go. The manual can stay. But before
removing the info on the wiki someone needs to confirm there's no
repo any longer.

Marco
___
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] State of the reference manual contextref.pdf

2019-02-10 Thread Marco Patzer
Hi!

I'm wondering about the state of the reference manual
contextref.pdf. The wiki states

  “ConTeXt reference manual. This is the most comprehensive and
   up-to-date general manual[…]” Date: September 27, 2013

There used to be SVN access on
foundry.supelec.fr/projects/contextman, but apparently it's
permanently down. Where is the manual hosted at the moment? The wiki
still points to foundry.supelec.fr:

  https://wiki.contextgarden.net/Improving_the_manuals

Some years ago there was a discussion about moving it to github. But
I doubt that has ever taken place.

Marco
___
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] Automatic thousands separation in \unit

2019-02-09 Thread Marco Patzer
On Tue, 5 Feb 2019 12:22:29 +0100
Marco Patzer  wrote:

> Is there a way to hook the \spaceddigits into \unit somehow?

I tried to add \spaceddigits to the \unit command, but it didn't
work. If someone has an idea how to do that, I'd greatly appreciate.

Marco
___
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   3   4   5   6   7   8   9   10   >