Re: [NTG-context] Problem with word not hyphenating

2020-11-30 Thread Pablo Rodriguez
On 11/30/20 4:48 PM, Bruce Horrocks wrote:
> The word "re-implementation" refuses to hyphenate and consequently
> stick outs into the right margin.
>
> I've tried using \hyphenation but it makes no difference.
> [...]
> Any suggestions, please?

Hi Bruce,

here you have a sample:

  \setuphyphenation[method=traditional]
  \registerhyphenationexception[en][re-im-ple-men-ta-tion]
  \starttext
  \startTEXpage[offset=1em]
  \hyphenatedword{re-implementation}\\
  \hyphenatedword{re||implementation}\\
  \hyphenatedword{re--implementation}\\
  \hyphenatedword{reimplementation}
  \stopTEXpage
  \stoptext

If you comment the first line, only "||" allows hyphenation.

I hope it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new lmtx

2020-11-28 Thread Pablo Rodriguez
On 11/27/20 9:05 PM, Pablo Rodriguez wrote:
> [...]
> The link rectangle goes to the end of the line.

Hans,

many thanks for having fixed the issue in latest from today.

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new lmtx

2020-11-27 Thread Pablo Rodriguez
On 11/27/20 8:26 PM, Hans Hagen wrote:
> Hi,
>
> A new upload ... a few lua files cleaned up (stale code removed and so)
> ... hopefully for the best.

Many thanks for the new upload, Hans.

A new glitch (present in the previous version too) in PDF links:

  \setuppapersize[A9]

  \setupinteraction[state=start]

  \enabledirectives[references.border]

  \unexpanded\def\MyURL#1%

{\bgroup\goto{{\tt\hyphenatedurl{#1}}}[url(#1)]\egroup}

  \starttext

  a\footnote{\dorecurse{2}{longer }\MyURL{a.b/c.de}.

\dorecurse{5}{word }}\stopasciimode

  \stoptext


The link rectangle goes to the end of the line.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] inbetween in \setupnotation

2020-11-27 Thread Pablo Rodriguez
On 11/27/20 8:29 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 27.11.2020 um 19:48:
>> [...]
>>\setupnotation[footnote]
>>  [before={\blackrule[color=red]},
>>   after={\blackrule[color=blue]},
>>   inbetween={\blackrule[color=green]}]
>>\starttext
>>\dorecurse{18}{a\footnote{b} }
>>\stoptext
>>
>> I wonder why the green rule isn’t shown.
>>
>> I mean, I would expect to see it between footnotes.
>>
>> What am I missing or doing wrong?
>
> \setupnotation [footnote] [alternative=top]

Many thanks for your reply, Wolfgang.

I see that my approach is wrong. I need serried for the footnotes as an
alternative. Having the footnote number in a different line makes no
sense in my case.

Which is the best way to set the space between foootnotes that appear on
the same page?

The options after and before place the space after or before the last
and first footnote (which I would like to avoid).

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] inbetween in \setupnotation

2020-11-27 Thread Pablo Rodriguez
Dear list,

I have the following sample:

  \setupnotation[footnote]
[before={\blackrule[color=red]},
 after={\blackrule[color=blue]},
 inbetween={\blackrule[color=green]}]
  \starttext
  \dorecurse{18}{a\footnote{b} }
  \stoptext

I wonder why the green rule isn’t shown.

I mean, I would expect to see it between footnotes.

What am I missing or doing wrong?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] question about frames

2020-11-26 Thread Pablo Rodriguez
On 11/26/20 5:26 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 25.11.2020 um 22:43:
>> [...]
>> Which is the way to avoid any vertical space between frames?
>
> Variant 1:
>
> \offinterlineskip}

Many thanks for your reply, Wolfgang.

As always, your solution is straight to the point and works like a
charm. And it’s also highly instructive.

This is the first time I see \offinterlineskip. Thanks to “TeX for the
Impatient”, I see that this is a TeX command.

> Variant 2:
>
> \setuparranging
>[XY]

I wonder whether arranging is a more proper way of doing labels.

Maybe I’m too lazy, but I see this variant also as a more complex way to
achieve it.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Testing for LMTX

2020-11-26 Thread Pablo Rodriguez
On 11/26/20 8:06 PM, Jean-Philippe Rey wrote:
> [...]
> Do you know a way to distinguish between LMTX and MkIV ?

Hi Jean-Philippe,

I guess this is what you are looking for:

  \starttext
  \startTEXpage[offset=1em]
  \startlmtxmode LMTX\stoplmtxmode
  \startmkivmode MkIV\stopmkivmode
  \stopTEXpage
  \stoptext

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] question about frames

2020-11-26 Thread Pablo Rodriguez
On 11/26/20 9:42 AM, Henning Hraban Ramm wrote:
>> Am 25.11.2020 um 22:43 schrieb Pablo Rodriguez:
>> [...]
>> Which is the way to avoid any vertical space between frames?
>>
>> Sorry, this may be obvious, but I don’t know how to do it now.
>
> try offset=overlay
> don’t know if that goes all the way.

Many thanks for your reply, Hraban.

I’m afraid that offset is related to the space between frame and its
content.

Or at least, I couldn’t make it work.

> How about \blank[none,back,disable]?

Nope. But this contains the key to the solution.

\blank[-0.395mm] corrects the extra vertical space between frames in
this case.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] question about frames

2020-11-25 Thread Pablo Rodriguez
Dear list,

here is a minimal sample of frames to make up labels:

  \setuplayout[page]
  \starttext
  \dorecurse{16}{\dontleavehmode\dorecurse{4}
  {\framed[width=52.5mm, height=18.5mm, align=right]{\null}}\\}
  \stoptext

Which is the way to avoid any vertical space between frames?

Sorry, this may be obvious, but I don’t know how to do it now.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] RE : upload

2020-11-25 Thread Pablo Rodriguez
On 11/24/20 7:22 PM, Floris van Manen wrote:
> On 24/11/2020 18:28, Pablo Rodriguez wrote:
>> I’m afraid you are getting an old version, since the newer one reads:
>>
>> mtx-context | ConTeXt Process Management 1.04
>> mtx-context |
>> mtx-context | main context file:
>> /home/ousia/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv
>> mtx-context | current version: 2020.11.24 00:41
>> mtx-context | main context file:
>> /home/ousia/context/tex/texmf-context/tex/context/base/mkxl/context.mkxl
>> mtx-context | current version: 2020.11.24 00:41
>
> Well I can see that there is two versions.

Hi Floris,

the two versions you see are related to the code split mentioned by Hans
(my guess).

MkXL is now independent from MkIV. The version is the same, but there
are two codebases in the same distribution.

Think of it as MkII and MkIV contained in ConTeXt Standalone.

> But when unzipping the new context-linux-64.zip (nov 24 00:24)
> then run the install script
> sh ./install.sh
> will not solve the issue...

You shouldn’t need to download context-linux-64.zip.

Running install.sh on Linux should work fine again. No need to remove
tex/texmf-*.tma, either.

> So context is not working anymore.
> Any hints?

Just out of curiosity, could you fix your already installed ConTeXt version?

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] issue with links

2020-11-24 Thread Pablo Rodriguez
On 11/19/20 5:50 PM, Pablo Rodriguez wrote:
> Dear list,
>
> this MWE shows that links may be misbehaving again:
>
>   \setupindenting[yes, always, big]
>   \setupinteraction[state=start]
>   \enabledirectives[references.border]
>   \unexpanded\def\MyURL#1%
> {\bgroup\goto{{\tt\hyphenatedurl{#1}}}[url(#1)]\egroup}
>   \starttext
>   \dorecurse{10}{word }
>   \MyURL{https://www.mobileread.com/forums/showthread.php?t=183423}
>   \stoptext

Hans,

many thanks for having fixed the issue in current latest (2020.11.24 00:41).

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] RE : upload

2020-11-24 Thread Pablo Rodriguez
On 11/23/20 11:33 PM, Floris van Manen wrote:
> [...]
> I still get the error:
>
> csname overload > fatal error, protection level 4, control sequence
> 'textcontrolspace', properties 'immutable', file 'enco-ini.mkxl', line 315
>
> Also aafter the update I got two different current versions:
>
> $ context --version
> mtx-context | ConTeXt Process Management 1.04
> mtx-context |
> mtx-context | main context file:
> /home/vm/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2020.11.23 22:40
> mtx-context | main context file:
> /home/vm/context/tex/texmf-context/tex/context/base/mkiv/context.mkxl
> mtx-context | current version: 2020.11.19 11:28

Hi Floris,

I’m afraid you are getting an old version, since the newer one reads:

mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file:
/home/ousia/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2020.11.24 00:41
mtx-context | main context file:
/home/ousia/context/tex/texmf-context/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2020.11.24 00:41

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] upload

2020-11-23 Thread Pablo Rodriguez
On 11/23/20 6:55 PM, Hans Hagen wrote:
> Hi,
>
> I uploaded a next iteration of lmtx. From now on there are dedicated sub
> directories for mklx and mpxl, which is an indication that we're on the
> way to a full code split.

Hi Hans,

I’m afraid that there is an error that prevents the creation of the
format file:

loading > ConTeXt Encoding Macros / Initialization

csname overload > fatal error, protection level 4, control sequence
'textcontrolspace', properties 'immutable', file 'enco-ini.mkxl', line 315

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] RE : RE : RE : Issue with grid

2020-11-23 Thread Pablo Rodriguez
On 11/23/20 4:29 PM, Joseph wrote:
> Could reproduce this problem with ‘default’ font and even seeing it
> cumulating in same page. BTW, Perhaps you already fixed it locally.

Hi Joseph,

probably the approach has to be different.

Setting the whitespace to line fixes everything:

  \startsetups[*lessstrict]
  \widowpenalty=1000
  \clubpenalty=1000
  \brokenpenalty=1000
  \stopsetups

  \setuplayout[setups={*lessstrict}, grid=both]

  \showgrid

  \setupwhitespace[line]

  \starttext

  \dorecurse{8}
{\blank[line]Fin des psalmes.\par
 \blank[line]\input knuth\par}

  \stoptext

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Issue with grid

2020-11-22 Thread Pablo Rodriguez
On 11/22/20 5:03 PM, Joseph wrote:
> Dear list,
>
> In some cases with latest LMTX I see text not aligned to grid. MWE
> reproduces the problem (could not reproduce with default font).

Hi Joseph,

I think this is related to the fact that your paragraphs are hard to
break between pages, since they only contain two lines.

I think this paragraph break among pages is what triggers the issue you
mention.

> Typesetting MWE using online ConTeXt page shows correctly aligned text
> on grid.

https://live.contextgarden.net/ includes both LuaTeX 2.06 20200630 +
ConTeXt MkIV 2020.06.30 17:30.

> If number of itérations is changed from 8 to 7) problem does not appear,
> seems to be linked to the fact page is fully filled with lines.

Because the text fits in a single page.

> If one of the \blank lines is commented out problem does not occur either.

Because you avoid the problem of breaking the paragraph between pages.

You can also avoid that using the following (but it will work only with
your MWE, I know):

  \setuplayout[setups=*lessstrict]
  \startsetups[*lessstrict]
  \widowpenalty=1000
  \clubpenalty=1000
  \brokenpenalty=1000
  \stopsetups

  \setuplayout[setups={*lessstrict}]

  \showgrid

I think that the problem might be related to the (unsuccesful) avoidance
of orphans and widows in current latest.

But of course, Hans or Wolfgang know better.

Just in case it might help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] LMTX update 2020.11.17 ----> 11.19 | Paragraph indenting

2020-11-21 Thread Pablo Rodriguez
On 11/21/20 10:44 PM, Richard Mahoney wrote:
> Hello,
>
> I noticed yesterday that paragraph indenting appears to have changed between
> LMTX 2020.11.17 & 11.19. Usually the first paragraph after a section heading
> does not indent, as it does with all subsequent paragraphs. With 11.19
> the first  paragraph does have an indent. I've had to revert to 11.17.

Hi Richard,

Hans provided a patch at
https://mailman.ntg.nl/pipermail/ntg-context/2020/100284.html.

Choose the more correct one (as described by him, the second one) and
place in cont-new.mkiv, right before the final \protect.

Run "mtxrun --script cache --erase &&  mtxrun --generate" (so delete
cache and generate the basic files) and indenting will work again.

I hope it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] bizarre bug in xml

2020-11-20 Thread Pablo Rodriguez
On 11/20/20 10:52 PM, Wolfgang Schuster wrote:
> [...]
> Optional arguments (e.g. plus/minus values for \hskip) for commands are
> handled different in LMTX but it was always recommended to add \relax
> after the last value.

Hi Wolfgang,

the same would apply to \vskip, wouldn’t it?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] RE : \noindentation not working

2020-11-20 Thread Pablo Rodriguez
On 11/20/20 9:07 PM, Joseph wrote:
> Thanks. Does the fix apply for similar issue I raised with below where
> all paragraphs are indented (expected is that first par is not indented) ?
>
> \setupindenting[yes, next, 1em]
> \starttext
> \input knuth
> \stoptext

Yes, the fix solves your issue.

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] \noindentation not working

2020-11-20 Thread Pablo Rodriguez
On 11/20/20 8:07 PM, Hans Hagen wrote:
> [...]
> Here's a fix:
> [...]
> (we might need adapt some more code); actually more correct would be:
>
> \def\spac_indentation_remove
>{\ifzeropt\parindent \else
>   \begingroup
>   \ifnum\lastnodetype=\gluenodecode
> \unskip % we also need to check for the subtype
>   \orelse\ifnum\lastnodetype=\hlistnodecode
> \setbox\scratchbox\lastbox % we also need to check for the subtype
>   \else
> % forget about it
>   \fi
>   \endgroup
> \fi}

Many thanks for the fix, Hans.

I placed it in cont-new.mkiv (I thought there was a cont-new.mkxl, but I
couldn’t find it.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] \noindentation not working

2020-11-20 Thread Pablo Rodriguez
Dear list,

I have the following MWE:

  \showframe\showgrid
  \setupindenting[yes, always, big]
  \starttext
  \noindentation
  a

  a
  \stoptext

Using LMTX (2020.11.19 11:28), I get indentation with \noindentation.

Could anyone confirm this?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Bilingual text on facing pages

2020-11-19 Thread Pablo Rodriguez
On 11/18/20 8:03 PM, MANUEL GONZALEZ SUAREZ wrote:
> Hello everyone: 
>
> Do you know if we can make bilingual editions with ConTeXt, as they are
> done with the reledpar package for LaTeX? I have consulted this page
> (https://tex.stackexchange.com/questions/113899/parallel-text-in-context),
> but I don't really understand what can be done. I have tried the code
> with MKIV but it does not work well.

Hi Manuel,

parallel texts are something that need to be implemented by Hans.

From time to time, there is someone that comments this issue.

Sorry for not being helpful, but this depends on a unified proposal and
Hans being challenged to implement it.

Best wishes,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] issue with links

2020-11-19 Thread Pablo Rodriguez
Dear list,

this MWE shows that links may be misbehaving again:

  \setupindenting[yes, always, big]
  \setupinteraction[state=start]
  \enabledirectives[references.border]
  \unexpanded\def\MyURL#1%
{\bgroup\goto{{\tt\hyphenatedurl{#1}}}[url(#1)]\egroup}
  \starttext
  \dorecurse{10}{word }
  \MyURL{https://www.mobileread.com/forums/showthread.php?t=183423}
  \stoptext

Could anyone confirm this?

I experienced it first with the LMTX release from yesterday. MkIV (from
2020.01.30 14:13) doesn’t seem to be affected by this issue.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Section head placement wrong when the after key is used

2020-11-19 Thread Pablo Rodriguez
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 this case, a nasty trick could be "after={”\blackrule\blank[samepage,
Opt]}".

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new upload

2020-11-19 Thread Pablo Rodriguez
On 11/19/20 11:35 AM, Hans Hagen wrote:
> Hi,
>
> A new upload. Hopefully with the linux install fixed.

Many thanks for the new upload, Hans.

It fixes the issue in both Windows and Linux (I guess the same should
apply to macOS).

BTW, the message about resolver databases not found or outdated still
pops up. Althought this is a minor cosmetic issue.

 resolvers   | resolving | warning: no lua configuration files found
 resolvers   | resolving | no texmf paths are defined (using TEXMF)
 resolvers   | resolving |
 mtxrun  | the resolver databases are not present or outdated
 mtx-install | server   : lmtx.pragma-ade.com
 mtx-install | instance : install-lmtx
 mtx-install | platform : linux-64
 mtx-install | system   : unix
 mtx-install | updating tex/texmf, 1541 files
 mtx-install | updating tex/texmf-context, 3922 files

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new upload

2020-11-18 Thread Pablo Rodriguez
On 11/18/20 7:42 PM, Hans Hagen wrote:
> Hi,
>
> A new upload ... still some 150 tex files to go (from mkiv to lmtx
> speak) ... after that the lua ones ... some fixes applied, maybe some
> new temp issues introduced ... thanks for testing.

Many thanks for the new upload, Hans.

Even headings and lists are indented now:

  \showframe\showgrid
  \setupindenting[yes, always, big]
  \starttext
  \placelist[section]
  \dorecurse{5}
{\section{Section \recurselevel} \input{zapf}}
  \stoptext

I think this may be a bug.

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] upload

2020-11-18 Thread Pablo Rodriguez
On 11/17/20 3:15 PM, Hans Hagen wrote:
> On 11/17/2020 2:57 PM, Pablo Rodriguez wrote:
>> [...]
>> What are we doing wrong that prevents the update of the installation?
> I don't know. Nothing really changed in the installer.

It may be something unrelated, but I don’t know why the resolver
databases (I assume tex/texmf-*.tma) aren’t detected by the installer
(or it considers them outdated).

The second cuestion is that current is set to %S (but probably this is
only about not showing the right version).

  resolvers | resolving | warning: no lua configuration files found
  resolvers | resolving | no texmf paths are defined (using TEXMF)
  resolvers | resolving |
  mtxrun| the resolver databases are not present or outdated
  mtx-install   | server   : lmtx.pragma-ade.com
  mtx-install   | instance : install-lmtx
  mtx-install   | platform : linux-64
  mtx-install   | system   : unix
  mtx-install   | updating tex/texmf, 1541 files
  mtx-install   | updating tex/texmf-context, 3757 files
  mtx-install   | updating tex/texmf-linux-64, 6 files
  mtx-install   | skipping tex/texmf-linux-64/bin/context
  mtx-install   | skipping tex/texmf-linux-64/bin/mtxrun
  mtx-install   | current  : %S
  mtx-install   | target   : true
  mtx-install   | removing : mtxrun
  mtx-install   | removing : context
  mtx-install   | linked   : mtxrun
  mtx-install   | linked   : context

Just in case it might help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Index formatting difference LMTX and MkIV redux

2020-11-17 Thread Pablo Rodriguez
On 11/17/20 9:34 PM, Rik Kabel wrote:
> Bump.
>
> This is still a problem. Can anyone acknowledge that the problem exists
> outside my own installation? If so, is there a work-around? An explanation?

Hi Rik,

I can reproduce your problem, but I’m afraid I don’t know the
explanation for this or even a workaround.

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] upload

2020-11-17 Thread Pablo Rodriguez
On 11/17/20 12:55 PM, Hans Hagen wrote:
> Hi,
>
> I uploaded a new version of lmtx (and mkiv). We're still in the process
> of migrating code from mkiv to lmtx (using new features).

Hans,

many thanks for the new upload.

As I reported before, I’m afraid I’m not able to update LMTX unless I
remove the three tex/texmf-*.tma files (in both Windows and Linux).

Other users have reported that this is the only method to get the update
done. But this downloads all the files, overloading your servers (after
all, this isn’t an update, just a complete install over an already
installed system).

This used to work before LMTX from 2020.09.20.

In Linux, tex/install.sh from both versions (2020.11.17 and 2020.11.15)
are exactly the same. I used a diff tool to allow no error.

What are we doing wrong that prevents the update of the installation?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] How to reproduce a particular head/title style (reformat)

2020-11-15 Thread Pablo Rodriguez
On 11/15/20 7:53 PM, Garulfo wrote:
> [...]
> Initial PDF document:
> https://www.hautconseilclimat.fr/wp-content/uploads/2020/10/hcc_rapport_maitriser-lempreinte-carbone-de-la-france-1.pdf
> [...]
> ConTeXt output :
> https://wiki.contextgarden.net/images/4/45/2020_hcc_rapport_maitriser-l-empreinte-carbone-de-la-france.pdf
>
> Any feedback is welcome (even if source code is not really clean)

Congratulations, Garulfo.

It’s a really good work.

Just a comment, to get clean bookmarks and PDF info, use:

  \enabledirectives[references.bookmarks.preroll]
  \enabledirectives[interaction.identity.preroll]

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] different outputfilename

2020-11-15 Thread Pablo Rodriguez
Dear list,

I have the following sample:

  \enablemode[presentation]

  \doifmodeelse{typesetting}
{\disablemode[presentation]}
{\enablemode[typesetting]}

  \startmode[typesetting]
\environment[typeset-pages.tex]
  \stopmode

  \startmode[presentation]
\environment[presentation.tex]
  \stopmode

This help me to generate from the same XML files either text or
presentations (they are different elements in the XML itself).

I have to invoke ConTeXt as ($source.tex has the content described above):

  context --purgeall --environment=$source.tex $source.xml

But this approach has two shortcommings.

It always generates a single file and using the same file name
(\jobname.pdf).

Is there no way to get the file with the outputfilename set to
\jobname-presentation?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] non-ascii chars in cmd.exe (Windows)

2020-11-13 Thread Pablo Rodriguez
On 11/13/20 3:15 PM, Hans Hagen wrote:
> On 11/13/2020 2:49 PM, Pablo Rodriguez wrote:
>> [...]
>> Since console input is UTF-16LE, I guess I may need something in Lua
>> similar to 'regimes.translate(str, "utf16le")'.
>
> the console uses whatever code page you have configured and it also
> relates to the code page used for filenames .. the 16 bit values are
> used deep down and what you use gets translated into that (often folks
> still use some 8 bit code page so that then gets mapped) .. there is no
> way the system can know if what you provide is as it's bytes in whatever
> encoding used
>
> so, you need to look what your system is configured for

I think that codepage is named locale codepage (as different from the
one in the console [or whatever chcp should change]).

I wonder whether this is named codeset in this Windows tool:

  > wmic os get locale, oslanguage, codeset
  CodeSet  Locale  OSLanguage
  1252 0c0a3082

> (this is independent of the output to the console which is what the
> 65001 does)

It seems that UTF-8 as locale codepage is only available in Win10.

An easy workaround is to rewrite the batch file to:

 chcp 65001
 set /P "name=Name? "
 context --arguments="name={%name%}" document.tex

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] non-ascii chars in cmd.exe (Windows)

2020-11-13 Thread Pablo Rodriguez
On 11/12/20 10:55 PM, Hans Hagen wrote:
> On 11/12/2020 10:39 PM, Pablo Rodriguez wrote:
>> Dear list,
>>
>> I have the following sample:
>>
>>\starttext
>>\startluacode
>>io.write(' Name? ')
>>document.name = io.read() or ''
>>\stopluacode
>>\cldcontext{document.name} is the name.
>>\stoptext
>> [...]
>> I’m using current latest (ConTeXt MkIV 2020.11.08 12:42).
>>
>> I’m not sure what I am missing or whether I have hit a bug.
>
> This has been discussed before I think. It has to do with how you
> configured your system (what encoding) and how consisteltly you take
> that into account. If you have some mixed setup, just don't use non-ascii.

Many thanks for your reply, Hans.

I use chcp 65001. I have no problem displaying UTF-8 messages and
passing arguments with UTF-8 characters.

> Anyway, in LMTX all file, commandline and systemn operations are utf 8
> and on windows get translated into wide system calls so there it should
>   work ok if you use utf8.

Well, according to https://ss64.com/nt/cmd.html the console uses
UTF-16LE. Or UCS-2 (as described in
https://devblogs.microsoft.com/commandline/windows-command-line-unicode-and-utf-8-output-text-buffer/#console-built-in-a-pre-unicode-dawn).

Since console input is UTF-16LE, I guess I may need something in Lua
similar to 'regimes.translate(str, "utf16le")'.

How can I convert a string from UTF-16LE (into UTF-8)?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] non-ascii chars in cmd.exe (Windows)

2020-11-12 Thread Pablo Rodriguez
Dear list,

I have the following sample:

  \starttext
  \startluacode
  io.write(' Name? ')
  document.name = io.read() or ''
  \stopluacode
  \cldcontext{document.name} is the name.
  \stoptext

Running it on Linux, I can input non-ascii characters.

When running in Windows, if the input chars contains a non-ascii one,
document.name is empty.

I have no problem passing arguments from cmd with Unicode characters
(such as in '--arguments="name={αβγ}"'.

I’m using current latest (ConTeXt MkIV 2020.11.08 12:42).

I’m not sure what I am missing or whether I have hit a bug.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] problems with signature fields

2020-11-12 Thread Pablo Rodriguez
On 11/12/20 12:24 AM, Hans Hagen wrote:
> On 11/11/2020 9:46 PM, Pablo Rodriguez wrote:
>> Hans,
>
>> Back then, I thought it was an minor improvement. Now I realized that
>> this two objects for signature fiels are only valid for Acrobat.
>
> the other tools should be fixed ... indirect objects are pretty valid

Many thanks for your reply, Hans.

I totally agree, these tools need to be fixed.

I reported the issue to one of the projects more than two years ago. I’m
still waiting for a message about the issue report.

>> Would it be possible that signature fields may have only one object, so
>> that mupdf-gl and other tools have no problem signing fields PDF
>> documents generated by ConTeXt?
> all is possible but i'm not sure if i want to uglify the implementation
> for the sake of buggy viewers

In Windows (and I guess in macOS), saving a copy with Acrobat Reader DC
seems to unify both objects.

But I’m afraid Acrobat for Linux is too old for that (9.5.5).

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] problems with signature fields

2020-11-11 Thread Pablo Rodriguez
Hans,

I have the following sample:

  \setupinteraction[state=start]

  \starttext
  \startTEXpage[offset=1em]
   \definefield[x][signature]
   \field[x]
  \stopTEXpage
  \stoptext

I can only use Acrobat to sign PDF documents with signature fields
generated by ConTeXt. Other tools sign the PDF document not producing a
valid signature (Acrobat cannot read or validate it).

From the source, signature has two objects (copied from the sample above):

  2 0 obj
  <<
/DA (/rmtf 11.9552 Tf 1.1955 Ts 0 0 0 rg 0 0 0 RG)
/DV 
/F 4
/FT /Sig
/Ff 0
/Kids 1 0 R
/MaxLen 1024
/Q 0
/Subtype /Widget
/T 
/V 
  >>
  endobj

  4 0 obj
  <<
/Type /Annot
/DA (/rmtf 11.9552 Tf 1.1955 Ts 0 0 0 rg 0 0 0 RG)
/F 4
/Parent 2 0 R
/Q 0
/Subtype /Widget
/Rect [ 14.033054 14.033054 70.40415 25.08072 ]
  >>
  endobj

One of the tools that has issues with two objects for the signature
field is the latest version (1.18) from mupdf-gl.

mupdf-gl adds the signature value to the child (object 4) and not to its
parent (object 2).

I’m afraid this is also the same issue that AutoFirma (a e-signing tool
developed by the Spanish government
[https://firmaelectronica.gob.es/Home/Descargas.html]) has with these
signature fields.

When both objects are merged in one (as Acrobat Reader does when saving
a copy), both tools generate documents contaning signatures totally
unproblematic to be read validated by Acrobat.

I suggested merging both objects back in 2017. You told me that
simplifyng this would introduce too much complexity in ConTeXt only to
save some bytes.

Back then, I thought it was an minor improvement. Now I realized that
this two objects for signature fiels are only valid for Acrobat.

I wonder whether this improvement might be also easier to make in LMTX.

Would it be possible that signature fields may have only one object, so
that mupdf-gl and other tools have no problem signing fields PDF
documents generated by ConTeXt?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] UTF-8 characters being dropped from typefile

2020-11-11 Thread Pablo Rodriguez
On 11/11/20 10:08 AM, n...@scorecrow.com wrote:
> Sorry for this really, really basic question but...
>
> I have the following 3 line source file:
>
> \starttext
> \typefile{test-listing.txt}
> \stoptext

Hi Bruce,

a MWE that shows your problem would be:

  \setupbodyfont[cursor]
  \starttext
  \startTEXpage[offset=1em]
  a ▸
  \stopTEXpage
  \stoptext

> Which explains why the character is being dropped. What I don't
> understand is why is LMMono12-Regular being used? I thought I had
> read somewhere that TeX Gyre fonts were now the default (I'm on
> ConTeXt  ver: 2020.11.05 23:01 LMTX) ?

Latin Modern are the default fonts in ConTeXt.

BTW, TeX Gyre Cursor doesn’t seem to contain the character you mention.

> If not, is there an installation level config  setting to make them
> the default or do I need to work out the relevant \start ...
> \stoptypescript commands?

I think the first line in the sample above shows a simple approach.

I hope it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] page ends with a section title followed by a table

2020-11-10 Thread Pablo Rodriguez
On 11/10/20 5:23 PM, Sylvain Hubert wrote:
> My mistake, but the problem survives the fix:
>
>     \setuphead[section][after={\blank[samepage,big]}]
>     \starttext
>     \showframe
>     \dorecurse{50}{a }
>     \startsection[title=spec]
>     \startxtable
Hi Sylvain,

no fix is required when you allow the table to be split:

\startxtable[split=yes]

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] page ends with a section title followed by a table

2020-11-10 Thread Pablo Rodriguez
On 11/10/20 9:55 AM, Sylvain Hubert wrote:
> Dear List,
>
> In the following example, the section title appears at the very end of
> the first page.
> [...]
> Does anyone know where to adjust the penalty in this case, so that the
> section title can be repositioned to the next page?

Hi Sylvain,

  \setuphead[title]
[before={\blank[preference, big],
 after={\blank[samepage, big]]

In this case, the blank space before sets a preference for inserting a
page break. The blank space after requires to be in the same page with
next paragraph.

Of course, you don’t need both simultaneously.

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] indentation of item separators

2020-11-09 Thread Pablo Rodriguez
On 11/9/20 8:09 PM, Sylvain Hubert wrote:
> Dear List,
>
> In the following example, what is indented is the text instead of the
> numbers.
> [...]
> Does anyone know how to indent the whole item group altogether?

Hi Sylvain,

margin is the option here, not indenting.

You can see the difference:

  \showframe\showgrid
  \starttext
  \startitemize[n, packed][indenting=2em]
  \item abc
  \stopitemize
  \startitemize[n, packed][margin=2em]
  \item def
  \stopitemize
  \startitemize[n, packed][margin=2em,indenting=2em]
  \item ghi
  \stopitemize
  \stoptext

I hope it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] main text runs in the footnote area

2020-11-09 Thread Pablo Rodriguez
Hans,

I have the following sample:

  \starttext
  \dorecurse{25}{This is a sentence\footnote{And this is a footnote}. }

  \startitemize[n, columns, three, packed]
  \dorecurse{25}{\item This is an item}
  \stopitemize

  \input{zapf}\footnote{This is a footnote}

  \startitemize[n, columns, two]
  \dorecurse{15}{\item This is an item}
  \stopitemize
  \stoptext

The body text runs in the footnote area, as some of us have already
reported.

I know that avoiding lists (especially when they contain columns) would
mitigate the problem. But some of my documents need both multiple-column
lists and footnotes.

Would it be possible that main text never runs in the footnote area?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] issues with fonts and font effects

2020-11-08 Thread Pablo Rodriguez
On 11/8/20 11:36 AM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 08.11.2020 um 11:22:
>> [...]
>> With all features defined, paragraph width is wrong using
>> "effect={width=1.0}".
>
> Add auto=yes: \definefontfeature [ef1] [effect={width=1.0,auto=yes}]

Many thanks for your explanation, Wolfgang.

The "auto" key is news to me. I thought this was the default before.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] "page i/n" in footer

2020-11-08 Thread Pablo Rodriguez
On 11/8/20 11:48 AM, Sylvain Hubert wrote:
> Indeed, \setupfooterexts is much clearer for page numbering. Thanks for
> the help!.
>
> Btw, do you know whether there is any difference between \lastpagenumber
> and \lastuserpagenumber mentioned both by Wolfgang and by the excursion
> book ?

Besides Wolfgang’s reply (way far more authoritative than mine), my
approach is basic.

grep the and read the source:

  $ grep -irl lastpagenumber ~/lmtx
~/lmtx/mlib-int.lua
~/lmtx/mlib-int.lmt
~/lmtx/meta-pag.mkiv
~/lmtx/mult-def.lua
~/lmtx/strc-pag.mkxl
~/lmtx/strc-pag.mkiv

~/lmtx is only a symlink for
~/context/tex/texmf-context/tex/context/base/mkiv/.

I created that symlink, because grepping for commands or options is a
way to learn by reading the code.

Not that I understand the whole, but I see which options are available
and I can check some samples included.

strc-pag.mkxl is your friend here. There are three page series. You
could even create more page series (not normally needed).

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] \switchtobodyfont behaves differenctly with splitted parameters

2020-11-08 Thread Pablo Rodriguez
On 11/8/20 11:18 AM, Sylvain Hubert wrote:
> Hi Pablo,
>
> thanks for the suggestion. Here's the minimal example which shows the
> difference:
>
>     \definefontfamily[face][rm][dejavuserif]
>     \starttext\switchtobodyfont[face, 24pt]ɑ\stoptext
>
> this should warn:
>
>     fonts           > checking > char ɑ (U+00251) in font
> 'LatinModernMath-Regular-4' with id 10: missing

Well, you are switching before setting up a body font.

I don’t know whether this might be a bug in ConTeXt (see previous
report), but I would set up the body font always first:

\definefontfamily[face][rm][dejavuserif]
\definefontfamily[deface][rm][dejavusans]
\setupbodyfont[deface]
\starttext a\switchtobodyfont[face, 24pt]ɑ\stoptext

> while
>
>     \definefontfamily[face][rm][dejavuserif]
>     \starttext\switchtobodyfont[face, 24pt]ɑ\stoptext
>
> produces the expected result despite a harmless warning.

I guess the command reads:

\switchtobodyfont[face]ɑ

This might also be related to the issue just reported.

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] issues with fonts and font effects

2020-11-08 Thread Pablo Rodriguez
Hans,

this sample comes from Sylvain’s message:

%~ \definefontfeature[ef1][effect={width=1.0}]
\definefontfeature[ef2][effect={width=}]
\definefontfamily[face1][rm][gabriola]
[features={default, ef1}]
\definefontfamily[face2][rm][gabriola]
[features={default, ef2}]
\starttext
\switchtobodyfont[face1]\dorecurse{100}{a b c }

\switchtobodyfont[face2]\dorecurse{100}{a b c }

\switchtobodyfont[palatino]\dorecurse{100}{a b c }
\stoptext

\setupbodyfont[palatino] or \switchtobodyfont[palatino] don’t seem to
work at all.

Results are different if feature ef1 is defined or not.

With all features defined, paragraph width is wrong using
"effect={width=1.0}".

Could you check this?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] weird behavior of font.feature.effect

2020-11-08 Thread Pablo Rodriguez
On 11/8/20 12:57 AM, Sylvain Hubert wrote:
> Dear List,
>
> I'm confused by the result of the following example (see attached):
>
>     \definefontfamily[face1][rm][gabriola][it={features:{default}}]

Hi Sylvain,

this is the same as:

  \definefontfamily[face1][rm][gabriola]

Just in case, "slanted" is an already defined feature. It slants the font.

>     \definefontfamily[face2][rm][gabriola][it={features:{default,
> effect={}}}]
>     \definefontfamily[face3][rm][gabriola][it={features:{default,
> effect={width=1.0}}}]

BTW, the documentation is clear
(http://texdoc.net/texmf-dist/doc/context/presentations/bachotex/2018/bachotex-2018-fonteffects.pdf#search=fontfeature):
font features should be defined as such before being deployed.

> Could someone explain:

I will try from what I understand.

> 1. What does "effect" mean?

A ConTeXt (and not OpenType) font feature?

> Why does "effect={}" embolden the fonts even though nothing ({}) is
> given as arguments?
"effect={}" may be reading default values (it might be intended behavior
or not).

But it also could be reading or calculating from previously defined values.

> 2. Similarly, what does "width" do? Why does "width=1.0" shrink the
> width of the line instead of doing nothing?

This might be a bug, because of all the code improvements.

I’m reporting a proper bug.

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] \switchtobodyfont behaves differenctly with splitted parameters

2020-11-08 Thread Pablo Rodriguez
On 11/8/20 2:35 AM, Sylvain Hubert wrote:
> Dear List,
>
> after hours of debugging, I finally found out that
> \switchtobodyfont[face, 20pt] does NOT behave the same with
> \switchtobodyfont[face]\switchtobodyfont[20pt]. In my case the latter is
> the correct one, while the former does nothing but falling back to
> latinmodern.
>
> Does anyone know when or why \switchtobodyfont behaves differently with
> splitted and joined parameters?

Hi Sylvain,

as a general rule, it helps when there is a minimal sample that provides
the problematic behavior.

I don’t get diffferent results:

  \definefontfamily[mainface][rm][TeX Gyre Pagella]
  \definefontfamily[face][rm][TeX Gyre Heros]
  \setupbodyfont[mainface]
  \startbuffer
  In my case, the latter is the correct one, while the former does
  nothing but falling back to latinmodern.\par
  \stopbuffer

  \starttext
  \getbuffer
  \switchtobodyfont[face]\switchtobodyfont[20pt]
  \getbuffer
  \switchtobodyfont[face, 20pt]
  \getbuffer
  \stoptext

Correct the sample to show what I got wrong from your message.

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] "page i/n" in footer

2020-11-08 Thread Pablo Rodriguez
On 11/8/20 2:58 AM, Sylvain Hubert wrote:
> Dear List,
>
> Does anyone know how to set the footer to be "page i/n" where i=current
> page number, n=total number of page? I've tried
>
>     \setuppagenumbering[location=footer, command=\groupedcommand{page
> }{/\lastcounter[userpage]}]
>
> but \lastcounter[userpage] results in empty string.

Hi Sylvain,

  \setupfootertexts[\pagenumber/\lastpagenumber]
  \starttext
  \dorecurse{25}{\null\page}
  \stoptext

I never used you approach with \setuppagenubering (all being said).

This might help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Font protrusion and expansion

2020-11-07 Thread Pablo Rodriguez
On 11/7/20 9:51 PM, Tommaso Gordini wrote:
> Thanks Hans and thanks Pablo.  So, \usetypescript is not needed?

Hi Tommaso,

I never used (or needed) any typescript.

But I think they aren’t needed anymore with \definefontfamily and
\definefallbackfamily.

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Font protrusion and expansion

2020-11-07 Thread Pablo Rodriguez
On 11/7/20 7:54 PM, Tommaso Gordini wrote:
> Hello to all.
>
> I am writing to you just to know if the following code, with which I
> would like to activate the protrusion and expansion of characters in my
> document, is correct. Is the command order okay?
>
> If I wanted to use another font, are there other things to write?

Hi Tommaso,

in the next sample, replace TeX Gyre Pagella with the font family name
and it will work fine:

  \definefontfeature
[default]
[default]
[expansion=quality,protrusion=quality]
  \definefontfamily[mainface][rm][TeX Gyre Pagella]
  \setupbodyfont[mainface]
  \setupalign[hz,hanging]
  \starttext
  \input{zapf}
  \stoptext

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Scheherazade New loading issue

2020-11-07 Thread Pablo Rodriguez
On 11/7/20 6:58 PM, Alan Bowen wrote:
> Though Scheherazade New font loads properly with the today’s LMTX, I
> cannot get it to load with LMTX from 2020.09.20 (which I must stay with
> for now because the latest one has its own complaints about my files).
>
> \definefallbackfamily[mainface][][Scheherazade New]
> [range=arabic]
> \definefontfamily[mainface][rm][STIX Two Text] 
> \setupbodyfont [mainface, 24pt]
>
> \starttext
> Arabic—ؼ
>
>  {\bf ؼ} 
> \stoptext

Hi Alan,

I have just downloaded and compiled your sample:

system  > ConTeXt  ver: 2020.09.20 23:02 LMTX  fmt: 2020.11.7
int: english/english
[...]
mkiv lua stats  > loaded fonts: 4 files: scheherazadenew-bold.ttf,
scheherazadenew-regular.ttf, stix2text-bold.otf, stix2text-regular.otf

Please, run "mtxrun --script cache --erase &&  mtxrun --generate" and I
think the new compilation will be fine. It seems to be that your
previous ConTeXt version cannot find fonts installed later.

BTW, "\definefallbackfamily[mainface][][Scheherazade New]" should read
"\definefallbackfamily[mainface][rm][Scheherazade New]". But it doesn’t
affect your issue.

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] How to define a {\bf}-compatible fake-bold switcher?

2020-11-07 Thread Pablo Rodriguez
On 11/7/20 6:18 PM, Sylvain Hubert wrote:
> Thank you so much, Pablo. This is exactly what I needed.
>
> Could you also tell me where you have learnt these features? I had been
> searching for this for hours but \effect was still the best of what I've
> got. Indeed, googling 'context+tex+boldened' or 'contextgarden+boldened'
> results in nothing useful.

Well, I asked for that feature
(https://mailman.ntg.nl/pipermail/ntg-context/2018/091128.html), which
Ulrike Fischer requested a year before
(https://mailman.ntg.nl/pipermail/ntg-context/2017/090091.html).

And that year, BachoTeX included a presentation with the implemented
feature (also included in LMTX @
tex/texmf-context/doc/context/presentations/bachotex/2018/bachotex-2018-fonteffects.pdf
[also with sources]).

I was very interested on that particular feature, because the previous
fake bold feature was simple stretching.

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] How to quote the section names in advance like the table of contents?

2020-11-07 Thread Pablo Rodriguez
On 11/7/20 4:32 PM, Sylvain Hubert wrote:
> Dear List,
>
> say I have three sections in the document:
>
>     \section{foo} ... \section{bar} ... \section{baz} ...
>
> Now I would like to auto generate a heavily customized table of contents
> like the following text, which cannot be done by the stock \placecontent
> in general, and put it into the preface:
>
>    This book has 3 sections: foo, bar, and baz.

How about the following?

\starttext
as in \about[section-one], \about[section-two],
\about[section-three]...

\section[section-one]{Section One}
\section[section-two]{Section Two}
\section[section-three]{Section Three}
\stoptext

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] How to define a {\bf}-compatible fake-bold switcher?

2020-11-07 Thread Pablo Rodriguez
On 11/7/20 4:06 PM, Sylvain Hubert wrote:
> [...]
> Could anyone help me define a {\bf}-aware version of \fakebf which can
> render the "4 5 6" in the example above in latinmodern's bold?

Hi Sylvain,

there is an already defined font feature that fakes boldened fonts:
boldened (and also boldened-10, boldened-15, boldened-20 and boldened-25
[boldened is actually boldened-30]).

But I don’t use \definefont myself, so this is my sample:

\definefontfamily[mainface][rm][Latin Modern Sans]
[bf={style:tf, features:{default, boldened}}]
\setupbodyfont[mainface]
\starttext
normal \bf boldened
\stoptext

Handle with care, since faked fonts are to be used sparingly,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] issue with LMTX and itemize

2020-11-07 Thread Pablo Rodriguez
On 11/7/20 4:11 PM, Alan Bowen wrote:
> Hi, Pablo—
>
> Shouldn’t it be either 
> \item a
> or
> \startitem a\stopitem
> ?
Hi Alan,

of course, the sample reads:

\starttext
\startitemize
\startitem a\stopitem
\stopitemize
\stoptext

But the issue still happens on my LMTX installation.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] wrong /Rect in link annotations

2020-11-07 Thread Pablo Rodriguez
On 11/7/20 2:40 PM, Hans Hagen wrote:
> On 11/7/2020 12:47 PM, Pablo Rodriguez wrote:
>> [...]
>> I’m afraid that with current latest rectangles for links got to the end
>> of the line when nothing stops them.
>>
>> Could anyone confirm the issue?
>>
>> BTW, I include the makeup, because previously this issue only took place
>> within makeups.
> no, it has to do with the period not being there i.e. it's the last item
> on the list
>
> so, this is not an issue in the latest upload but older

Well, because install.sh changed, I wasn’t able to update after
2020.09.20 23:02 until two days ago.

In that version, only the makeup triggered the wrong rectangle.

> i will hack a solution but eventually will split off the lmtx/mkiv code
> for those bits and pieces (takes some time so it will happen after the
> flagging effort)

These are really good news.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] issue with LMTX and itemize

2020-11-07 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\starttext
\startitemize
\item a\stopitem
\stopitemize
\stoptext

With latest LMTX from today, I don’t get any item marker.

Could you confirm the issue?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] another error message in LMTX

2020-11-07 Thread Pablo Rodriguez
On 11/7/20 1:29 PM, Hans Hagen wrote:
> [...]

Many thanks for your in-depth explanation, Hans.

This sample triggers the error:

\appendtoks
   \unexpanded\def\doverbatimspace{\char32\hskip\zeropoint}%
\to \everyenableelements

\setuptagging[state=start]

\starttext
\starttyping
mtxrunjit --generate
\stoptyping

\startitemize[n]
\startitem a\stopitem
\stopitemize
\stoptext

I have no idea why.

Many thanks for your help,

Pablo


> well, the clue is there: you have
>
> you have a \hskip or \vskip someplace that is not properly terminated by
> \relax so tex keeps scanning for optional plus|minus keywords and in
> your case runs into "mtxrunjit"
>
> in luametatex we have a slightly different keyword scanner
>
> - in traditional tex it will just push back the 'non valid' keyword and
> continue
>
> - but that actually obscures a potentential error when the \hskip is
> burried deep: maybe you are typesetting "minus" as is and then it *is* a
> valid keyword and probably an error wil be that no valid dimension is seen
>
> - so, you'rve just been lucky so far
>
> so, this new keyword scanner is more picky in the sense that when it
> notices a potential keywors start it will complain earlier which might
> actually catch potential errors ealier (in this case all follow up words
> that start with a 'p' or 'm'
>
> another change in scanning is that in many cases order no longer
> matters; for instance in scanning skips it's a 'plus' spec followed by a
> 'minus' spec but in rules it can be mized 'width', 'height', 'depths'
>   in any order and repetitive
>
> in luametatex (unless there is good reason) the order doesn't matter,
> and often repetition is ok (so, multiple plus and minus in a skip and in
> any order where the last one counts)
>
> this also permits for instance an order like:
>
>  \dontleavehmode
>  \hbox to 20pt xoffset  3cm{1\hss}
>  \hbox to 20pt {\hss2\hss}
>  \hbox to 20pt xoffset -3cm{\hss3}
>
> where previously the 'to' spec always came last and multiple 'to' are
> okay (offsets etc are a lmtx feature, and it means many more keywords
> have to be scanned, which was one reason for cooking up a better
> mechanism, even if right from the start that was already rather optimized).
>
> now, in principle this brings the possibility to support partial
> keywords, so 'xo' 'xoff' etc (in fact i only need to change a few lines
> of code) which can be handy when for instance one passes many
> attributes) but first i want the main machinery to be stable
>
> actually, this was already there for a while; the good news is that all
> this doesn't harm performance (we actually gain some here, not that it's
> normally noticeable)
>
> so: more flexibility, better performance, earlier interception but of
> course the later might demand users to fix code (i actually had to fix
> context in one spot for this lookahead issue).
>
> (I'll add \relaxes to the after handling but that just obscures the issue.)


--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Works in ConTeXt, fails in LMTX

2020-11-07 Thread Pablo Rodriguez
On 11/7/20 1:09 PM, n...@scorecrow.com wrote:
> Some more details on the font inclusion problem I posted about the other day.

Hi Bruce,

I think that current LMTX has issues with Bondi12CPlus.TTF.

Hans, could you have a look at it? I reproduce can the same issue.

> \definefont[fontCoverTitle][name:brushwood at 94pt]
> \starttext
> This text in default font.
>
> \fontCoverTitle{EXAMPLE}
> \stoptext
>
> works as expected in
>
>   ConTeXt  ver: 2020.03.10 14:44 MKIV beta  fmt: 2020.4.18  int: 
> english/english
>
> but fails (the brushwood font isn't included) in
>
>   ConTeXt  ver: 2020.11.05 23:01 LMTX  fmt: 2020.11.7  int: english/english

I would run first, before compiling again:

  mtxrun --script cache --erase --make && mtxrun --generate

If this doesn’t work, could you replace the your \definefont with the
following version?

  \definefont[fontCoverTitle][file:BrushWood.TTF at 94pt]

(Please, adapt name and cases accordinly.)

If that doesn’t work, please include the full path.

The full path should help LMTX to find the file and it should also give
some info why LMTX cannot find the font by name.

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new upload

2020-11-07 Thread Pablo Rodriguez
On 11/7/20 12:53 PM, Pablo Rodriguez wrote:
> [...]
> I have a simpler approach that might help you:
>
>  curl -I http://pragma-ade.com/context/latest/cont-tmf.zip

Improved message:

echo "" && curl -I http://pragma-ade.com/context/latest/cont-tmf.zip
2>&1 | grep Last-Modified && echo ""

So you don’t mix access time with last modification.

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new upload

2020-11-07 Thread Pablo Rodriguez
On 11/7/20 11:40 AM, Floris van Manen wrote:
> Dear Hans,
>
> Would it be possible to have a simple text file with the latest release
> version (or date) tag in it? Next to the folder containing the actual
> install script files? In that case it is easy to check that version tag
> by comparing with the local copy and decide if a further download and
> install is needed.

Dear Floris,

I have a simpler approach that might help you:

 curl -I http://pragma-ade.com/context/latest/cont-tmf.zip

I added a file with that to $HOME/bin/ and it works fine when invoking it.

To check which version you have installed on your computer:

export PATH=$PATH:$HOME/context/tex/texmf-linux-64/bin/ && context
--version && luametatex --version

Of course, you might need no export or adapt $PATH accordingly to your
ConTeXt directory.

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] wrong /Rect in link annotations

2020-11-07 Thread Pablo Rodriguez
Dear list,

I have the following sample:

  \setupinteraction[state=start]
  \enabledirectives[references.border]
  %~ \definemakeup[slide]
  \define[1]\newurl{\goto{\tt\hyphenatedurl{#1}}[url(#1)]}

  \starttext
  %~ \startmakeup[slide]
  \newurl{a}

  compared to \newurl{a}.
  %~ \stopmakeup
  \stoptext

I’m afraid that with current latest rectangles for links got to the end
of the line when nothing stops them.

Could anyone confirm the issue?

BTW, I include the makeup, because previously this issue only took place
within makeups.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] \setuparranging broken in LMTX?

2020-11-07 Thread Pablo Rodriguez
On 11/7/20 12:25 PM, Hans Hagen wrote:
> On 11/7/2020 10:57 AM, Pablo Rodriguez wrote:
>> [...]
>> With a simple PDF document, I cannot make \setuparranging work in LMTX.
>> Using latest from 2020.11.06 20:34.
>> [...]
> a bit too agressive checking in the engine .. i'll fix it

Hans,

many thanks for the fix.

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] another error message in LMTX

2020-11-07 Thread Pablo Rodriguez
Hans,

using latest from yesterday, I get the following error:

 tex error   > tex error on line 22 in file cont-yes.mkiv: Valid
 keyword expected, likely 'minus'

  mt
 xrunjit
 
 \relax
  \buff_verbatim_type_buffer_indeed ...rrentregime
 }tab{\typingparameter \c!tab }method{\p_buff_option
 }escape{\typingparameter \c!escape }nature{display}\relax
 \dostoptagged \endofverbatimlines \dostoptagged \stoppacked
 \typingparameter \c!after

 [...]

 You started a keyword but it seems to be an invalid one. The first
 character(s) might give you a clue. You might want to quit unwanted
 lookahead with \relax.

This comes from a book with > 300pp. It compiles perfectly fine with
MkIV, so the typo might be in LMTX itself.

I wonder whether it would be possible to add the invalid keyword (and
related command) to the error message. This would mean something like:

 tex error   > tex error on line 22 in file cont-yes.mkiv: Valid
 keyword expected, got "invalid one" (related to "command").

This would help a lot to figure out where to start searching for clues
for a MWE.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new upload

2020-11-07 Thread Pablo Rodriguez
On 11/7/20 10:48 AM, Otared Kavian wrote:
> Hi Pablo,
>
> I had the same issue as the one you were reporting (on MacOS 10.14.6).
> I removed the three files
>
> texmf-context.tma
> texmf-osx-64.tma
> texmf.tma
>
> [...] and I think I will get the new version uploaded by Hans (my
> internet connection is very slow…).

Hi Otared,

I don’t know which one, but I think the LMTX installer may have a bug
that prevents updating the installation in all platforms (at least, it
seems to be so in Windows, macOS and Linux).

I thnk that removing the tex/texmf-*.tma files, allows a new
installation. It may overwrite all files (modified or not). But it might
be that this doesn’t remove deprecated files.

> Thank you for the hint…

It was by pure chance that I discovered that this might work.

But I’m glad to see that this may help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] \setuparranging broken in LMTX?

2020-11-07 Thread Pablo Rodriguez
Dear list,

I have the following sample:

  \setuparranging[2TOP]
  \setuplayout[page]
  \starttext
  \insertpages[file.pdf]
  \stoptext

With a simple PDF document, I cannot make \setuparranging work in LMTX.
Using latest from 2020.11.06 20:34.

It works perfectly fine with MkIV.

Could anyone confirm this issue?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] expansion and protrusion working again

2020-11-06 Thread Pablo Rodriguez
Dear list,

one of the features I noticed in current latest (from yesterday
[2020.11.06]) is that hz and hanging are working again.

Huge thanks to Hans and Wolfgang for enabling this again.

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new upload

2020-11-06 Thread Pablo Rodriguez
On 11/7/20 12:02 AM, mf wrote:
> [...]
> I can confirm that on my Debian 10 64bit: no update until I removed
>
> texmf-context.tma
> texmf-linux-64.tma
> texmf.tma
>
> in the tex subdir.

I had to remove these files to update from LMTX from 2020.10.20 to
version from 2020.11.05.

But I had to remove these files again to upgrade from 2020.11.05 to
2020.11.06.

I wonder whether the same happens in Windows (I haven’t checked it yet).

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] messages on undefined control sequences

2020-11-06 Thread Pablo Rodriguez
Hans,

this is a standard eror message now:

 tex error   > tex error on line 9 in file cont-yes.mkiv: Undefined
 control sequence

  \strc_sectioning_empty_correction \ifconditional
 \c_strc_sectioning_empty \penalty \plustenthousand \vskivskip
 -\lineheight \kern \zeropoint \prevdepth \strutdepth \fi
  \strc_sectioning_after_yes ...l \c_strc_sectioning_auto_break
 \spac_vspacing_same_page \currentheadlevel \plusone \fi
 \strc_sectioning_empty_correction
 \headparameter \c!after \strc_sectioning_depth_correction \fi
  \strc_sectioning_handle ...synchonization \let \getheadtitle
 \fullheadtitle \strc_rendering_place_head_text \dostoptagged
 \strc_sectioning_after_yes
 \orelse \ifconditional \c_strc_sectioning_hidden
 \strc_sectioning_register {#1}{#2}{#3}\strc_sectioning_report \let
 \gethe...

  \syst_modes_set_yes #1->\settrue \c_syst_modes_set_done #1
 \doifelsenextoptionalcs \syst_modes_set_start \syst_modes_set_quit

  \CoverPageTitle \startmodeset [**en, **uk] {\hiddentitle
 {[Cover page]}}[**es] {\hiddentitle {[Portada]}}
 [**deo,**de,**de-de,**de-at,**de-ch] {\hiddentitle
 {[Bildtitelseite]}}\stopmodeset

  \22>:coverpage ...,**de,**de-de,**de-at,**de-ch] {\hiddentitle
 {[Bildtitelseite]}}\stopmodeset }\doifdefined
 {hiddentitle}{\CoverPageTitle }
 \setupbodyfont [svb]{\scale [width=.35\textwidth ]{\sc
 \getvariable {coverpage}{author}}}\vfill \scale [width=\textwidth]...
 \setuppapersize[A6]

Would it be possible that LMTX adds the undefined command at the end of
the tex error line? I mean something similar to:

 tex error   > tex error on line 9 in file cont-yes.mkiv: Undefined
 control sequence (vskivskip)

It would help a lot to detect wrong commands.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new upload

2020-11-06 Thread Pablo Rodriguez
On 11/6/20 8:42 PM, Hans Hagen wrote:
> Hi,
>
> Again a new lmtx upload. As these days are all about counting and
> numbers ... of the 19K visible macros some 14K are now flagged.

Many thanks for the new release, Hans.

I’m afraid that I cannot update unless I remove tex/texmf*.tma.

I’m on Linux-64bit and I wonder whether I’m the only user affected by
this issue.

> Question: do we really need all these 'named characters'  or can we at
> some point ditch many .. I assume that users who key in greek and
> cyrillic use unicode nowdays (no hurry, just wondering).

As for Greek enconding, I never used anything else than UTF-8.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] store data in the first run for later runs?

2020-11-06 Thread Pablo Rodriguez
Dear list,

I have the following sample:

  \starttext
  \startTEXpage[offset=1em]

  \startmode[*first]
  \startluacode
  io.write(" What’s your name?")
  document.user_name = io.read()
  document_data = { "\\def\\UserName{" .. document.user_name .. "}" }
  io.savedata(tex.jobname.."_document-tmp-data.txt", document_data)
  \stopluacode
  \stopmode

  \input{\jobname_document-tmp-data.txt}
  \UserName, nice to meet you.
  \stopTEXpage
  \stoptext

This prompts user input on the first run, but I have to save to an
external file to be able to read it in next runs.

Just in case you might wonder, the actual code requires "--purgeall".

Is there no way to save that in the .tuc file for later runs?

I have tried
https://wiki.contextgarden.net/System_Macros/Key_Value_Assignments#Multi-pass_data
(as Aditya suggested to me), but runs after the first one see to empty
the data in the Lua table.

Adapting a sample from the wiki:

  \starttext

  \definedataset[somedataset]
  \startmode[*first]
  \setdataset[somedataset][wantscake=yes, wantsdeath=no]
  \stopmode

  Do you want cake? \datasetvariable{somedataset}{1}{wantscake}.\\
  BTW, do you want death? \datasetvariable{somedataset}{1}{wantsdeath}.
  \stoptext

I wonder whether there is no cleaner way to do this.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] install.sh not working on Linux (Ubuntu 20.04)?

2020-11-06 Thread Pablo Rodriguez
On 11/6/20 5:14 PM, Floris van Manen wrote:
> On 06/11/2020 16:49, Jairo A. del Rio wrote:
>> Is anyone else having problems with recent ConTeXt updates on Linux?
>> Since last month, install.sh isn't doing anything. However, when I go to
>> Pragma ADE's website, I can download newer releases and they work fine
>> (e.g. --permitloadlib works now). I'm not so picky about manual
>> downloads, but I think install.sh is (or was) quite better. I'm on
>> Ubuntu 20.04, in case it helps. Thank you very much.
>
> yes I had a similar experience.
> After downloading a fresh install.sh new updates became available again.
> (Pop!OS 20.10)

Hi Jairo and Floris,

I reported a similar issue some days ago.

I think I have solved it (no extensive checking yet) by deleting the
three texmf*.tma files on the tex/ directory.

If you still have a copy of your older installation, you may try this
(but please make a backup of the older installation first).

Just in case it might help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] What is "cutspace" and "bottomspace"?

2020-11-05 Thread Pablo Rodriguez
On 11/5/20 4:11 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 05.11.2020 um 16:08:
>> [...]
>>
>> \setuplayout[width=fit, cutspace=0.01cm] does the trick.
>
> Use "width=middle".

Many thanks for your reply, Wolfgang.

I found something weird here.

Compare the four options:

  %~ \setuplayout[width=middle, backspace=0.001mm]
  %~ \setuplayout[width=fit, backspace=0.001mm]
  %~ \setuplayout[width=middle, cutspace=0.001mm]
  %~ \setuplayout[width=fit, cutspace=0.001mm]
  \starttext \showframe \showsetups \stoptext

Each of the options gives a different result.

I thought the same might happen with topspace and bottomSpace. I’m
afraid this is also different:

  %~ \setuplayout[height=middle, topspace=0.001mm]
  %~ \setuplayout[height=fit, topspace=0.001mm]
  %~ \setuplayout[height=middle, bottomspace=0.001mm]
  %~ \setuplayout[height=fit, bottomspace=0.001mm]
  \starttext \showframe \showsetups \stoptext

I wonder whether there might be a bug here.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Why is the textarea not centered by default?

2020-11-05 Thread Pablo Rodriguez
On 11/5/20 11:28 AM, Sylvain Hubert wrote:
> Dear List,
>
>     \starttext \showframe \showsetups \stoptext
>
> This minimal example without further configuration shows that the
> default value for backspace, textwidth and paperwidth are 2.5cm, 15cm,
> 21cm resp., which means that the textarea is horizontally 0.5cm off the
> center by default, and one can indeed see a clear extra margin on the
> right side.

Hi Sylvain,

you can avoid this with the following code (althought the "height"
option is probably not needed):

  \setuplayout[width=middle, height=middle]

> This seems weird but I'm no expert of typesetting, so does anyone know
> why it has been set like that?

I’m not expert on typesetting, but I read somewhere (too long ago to be
able to remember when) that printed papers should have wider outer
margins to put your fingers on it.

See the following the output from:

  \setuppagenumbering[alternative=doublesided]
  \starttext \showframe \showsetups \stoptext

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] What is "cutspace" and "bottomspace"?

2020-11-05 Thread Pablo Rodriguez
On 11/5/20 11:16 AM, Sylvain Hubert wrote:
> Dear List,
>
> according to https://wiki.contextgarden.net/Command/setuplayout ,
> "cutspace" and "bottomspace" are the counterparts of "backspace" and
> "topspace", and "If cutspace is set to 0, it is taken to be equal to the
> backspace". But in fact, the following document stays the same no matter
> what value is given to cutspace.
>
> \setuplayout[cutspace=0.01cm]
> \starttext x  \showframe \stoptext
>
> Has anyone actually used these two parameters?

Hi Sylvain,

\setuplayout[width=fit, cutspace=0.01cm] does the trick.

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] cannot update LMTX

2020-11-04 Thread Pablo Rodriguez
On 11/4/20 8:41 PM, Otared Kavian wrote:
> Hi Pablo,
>
> For some unknown reason despite having tried to update lmtx several
> times, I still have version 2020.09.20 23:02.
Hi Otared,

this is exactly the same version I have.

> Indeed I do a backup before any update in order to be able to go
> back to a working version…
It is a reasonable practice, as one never knows what could go wrong.

> What did you do in order to get version 2020.11.04 09:40 ?

I did a fresh install (as Sylvain suggested). Although I only wanted to
test that a fresh install was working.

I’m going to wait until I upgrade my local version. The backup is
already done.

Many thanks for your reply,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] cannot update LMTX

2020-11-04 Thread Pablo Rodriguez
On 11/4/20 4:18 PM, Otared Kavian wrote:
> Hi Pablo,
>
> I get the same result as you. I think the reason is that Hans has not
> yet issued a newer version (he said in a message a few days ago that
> by mistake he might have uploaded a new version, but that we should
> be careful not to update yet…).

Hi Otared,

current latest is from today (2020.11.04 09:40).

I read the message and this is why I checked a version newer than
2020.10.30 (in both Linux and Windows) before asking about the issue.

I perform a backup before updating ConTeXt, so experimental versions
should be no problem for me.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] cannot update LMTX

2020-11-04 Thread Pablo Rodriguez
Dear list,

after latest from 2020.09.20, I afraid I get this error when running
install.sh on Linux or install.bat on Windows (both 64bit):

mtx-install | updating tex/texmf, 1541 files
mtx-install | updating tex/texmf-context, 3757 files
mtx-install | changed  :   0 % :24110 :
tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
mtx-install |
tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
trying again:
mtx-install | changed  :   0 % :24110 :
tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
mtx-install |
tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
trying again:
mtx-install | changed  :   0 % :24110 :
tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
mtx-install |
tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
trying again:
mtx-install | changed  :   0 % :24110 :
tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
mtx-install |
tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
trying again:
mtx-install | changed  :   0 % :24110 :
tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
mtx-install |
tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
try again later:

If you want to run ConTeXt everywhere, you need to adapt the path, like:

I don’t know what has changed to prevent the update.

Could anyone confirm this issue with current LMTX?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Loading modules in Windows

2020-10-31 Thread Pablo Rodriguez
On 10/31/20 11:09 AM, Jeroen wrote:
> Many thanks. Would you perhaps have the method to install third party
> modules by hand in Windows. I have found a way to do it in Linux only.
> Jeroen

Hi Jeroen,

the method shouldn‘t be different for Windows.

Copy the contents of the tex/texmf-modules/ directory from MkIV to LMTX
and run "mtxrun --script cache --erase &&  mtxrun --generate". Then you
can normally (the first run after that will generate the format file).

I had done that in both Windows and Linux and it works perfectly fine.

I hope it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] invoking ConTeXt from .bat file in Win7

2020-10-28 Thread Pablo Rodriguez
On 10/28/20 5:44 PM, Aditya Mahajan wrote:
> On Wed, 28 Oct 2020, Pablo Rodriguez wrote:
>>> [...]
>> I’d really appreciate to know how to request an extra pass in ConTeXt.
>
> As the manual says, "This mode is set if the last run in a session
> is taking place. Normally this is not known in advance, unless one has
> asked for an additional imposition pass."
>
> Why do you want to use the last mode for this? The new information
> can lead to an extra line-break or extra page-break, which might then need
> an extra run to resolve correctly. So, it might be better to ask the
> information in the first run and save it in the tuc file using the two
> pass mechanism:
>
> https://wiki.contextgarden.net/Command/datasetvariable

Many thanks for your reply, Aditya.

Your approach is really interesting, but I don’t know how to mix it with
the first run mode.

  \startmode[*first]
  \startluacode
  io.write("\n\n Document URL?")
  document.url_address = io.read()
  \stopluacode

  \definedataset[document_data]
  \setdataset[document_data]
  [url=\cldcontext{document.url_address}]
  \stopmode

  \starttext
  \startTEXpage[offset=1em]
  \datasetvariable{document_data}{1}{url}
  \stopTEXpage
  \stoptext

How could I make this sample or a similar approach work?

What I need it to avoid entering the same address more than once.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] invoking ConTeXt from .bat file in Win7

2020-10-28 Thread Pablo Rodriguez
On 10/27/20 9:40 PM, Pablo Rodriguez wrote:
> Dear list,
>
> I have the following sample:
>
>   \mainlanguage[es]
>   \setupbodyfont[dejavu]
>   \starttext
>
>   %~ \startmode[*last]
> \startluacode
> io.write("¿Cuál es el mensaje? ")
> document.message = io.read()
> \stopluacode
>   %~ \stopmode
>
>   El mensaje es: \cldcontext{document.message}
>   \stoptext
>
> I have two questions about it.
>
> How can I invoke an extra run (as mentioned at
> http://www.pragma-ade.com/general/manuals/mmodes.pdf#search=last) to be
> able to use the *last mode in the code above?
>
> The other question is that the sample above works fine in Linux. I guess
> macOS would be also fine. But in Windows (Win7 in my case), I get
> garbage for "¿". "chcp 65001" in the .bat file doesn’t make any
> difference. How can I get non-ASCII chars displayed right? (Echoing
> UTF-8 characters in the same batch file works perfectly right.)

Partially replying to myself.

Adding a space at the beginning of io.write, displays the space and the
UTF-8 sequence (given "chcp 65001") right.

This isn’t the perfect solution, but it works for me.

I’d really appreciate to know how to request an extra pass in ConTeXt.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] invoking ConTeXt from .bat file in Win7

2020-10-27 Thread Pablo Rodriguez
Dear list,

I have the following sample:

  \mainlanguage[es]
  \setupbodyfont[dejavu]
  \starttext

  %~ \startmode[*last]
\startluacode
io.write("¿Cuál es el mensaje? ")
document.message = io.read()
\stopluacode
  %~ \stopmode

  El mensaje es: \cldcontext{document.message}
  \stoptext

I have two questions about it.

How can I invoke an extra run (as mentioned at
http://www.pragma-ade.com/general/manuals/mmodes.pdf#search=last) to be
able to use the *last mode in the code above?

The other question is that the sample above works fine in Linux. I guess
macOS would be also fine. But in Windows (Win7 in my case), I get
garbage for "¿". "chcp 65001" in the .bat file doesn’t make any
difference. How can I get non-ASCII chars displayed right? (Echoing
UTF-8 characters in the same batch file works perfectly right.)

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] help with filename containing spaces

2020-10-17 Thread Pablo Rodriguez
Dear list,

I have this sample:

\setupinteraction[state=start]
\starttext
\def\cB{file.pdf}
\def\cC{file with spaces.pdf}
%~ \def\PathName{\cldcontext{[[\env{completepath}]]}}
\def\PathName{%
\cldcontext{string.gsub([[\env{completepath}]], "", "/")}}
no spaces: \doifelsefileexists{\PathName\cB}{yes}{no}
\attachment[file={\PathName\cB}]\\
with spaces: \doifelsefileexists{\PathName\cC}{yes}{no}
\attachment[file={\PathName\cC}]
\stoptext

It works fine in Linux with spaces in file names. I invoke it with:

context --purgeall --arguments="pathname={~/}" ~/a

But in Windows, the actual invocation involves a loop in a batch file.
Without the loop, it would read (for drag and drop):

context --purgeall --arguments="completepath=%~dp1" file-above.tex

I don’t get the attachment only with the file that has spaces in its
name (the file is also reported as not existing). The file without
spaces in the its name is being attached and reported as existing.

Does anyone know what might be preventing ConTeXt in Windows not to
recognize the existing file with spaces in its name?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Some interaction questions

2020-10-13 Thread Pablo Rodriguez
On 10/13/20 10:14 PM, Denis Maier wrote:
> [...]
> So, I just added this to my environment file:
>
> \appendtoks
>    \def\em{\space}
> \to \simplifiedcommands
>
> But, the \em still shows up in the PDF metadata. Is this still the
> recommended way to do this? Or is there an easier way? I guess, even if
> this would remove the \em, that would still leave the braces in place.
> (I'd prefer to remove them as well, but I've no idea how that could work.)

Hi Denis,

\enabledirectives[interaction.identity.preroll] is your friend here.

I think it would be better to update the wiki with these infos.

Many thanks for improving the wiki ,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] need help comparing strings

2020-10-13 Thread Pablo Rodriguez
On 10/13/20 7:14 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 13.10.2020 um 19:06:
>> [...]
>> In any case, I cannot compare to a number:
>>
>>\startluacode
>>  userdata = userdata or {}
>>  function userdata.numbersfname(name)
>>  return string.match(name, "%d+")
>>  end
>>\stopluacode
>>
>>\define[1]\numbersfname
>>{\cldcontext{userdata.numbersfname([==[#1]==])}}
>
> Untested:
>
> \defineexpandable[1]\numbersfname
>    {\cldcontext{userdata.numbersfname([==[#1]==])}}

I’m afraid it doesn’t work.

  \startluacode
userdata = userdata or {}
function userdata.numbersfname(name)
return string.match(name, "%d+")
end
  \stopluacode

  \defineexpandable[1]\numbersfname
{\cldcontext{userdata.numbersfname([==[#1]==])}}

  \starttext
  \numbersfname{abc123}

  \numbersfname{\env{fname}}
  \doifelse{\numbersfname{\env{fname}}}{123}{yes}{no}
  \stoptext

Just curious about what the difference might be.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] need help comparing strings

2020-10-13 Thread Pablo Rodriguez
On 10/13/20 5:33 PM, Pablo Rodriguez wrote:
> [...]
>   \starttext
>   \ctxlua{ d = [[\env{fname}]] }
>
>   d: \cldcontext{d}\\
>   \doifelse{\cldcontext{d:match("\letterpercent d+")}}
>   {123}{yes}{no}
>   \stoptext
> [...]
> 3. I’m trying this on a Linux box, but on Windows I would say that Lua
> variable "d" is empty.

Just for the record, this sample also works in Windows.

The Lua variable isn’t empty and the conditional outputs "yes".

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] need help comparing strings

2020-10-13 Thread Pablo Rodriguez
On 10/13/20 6:14 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 13.10.2020 um 17:33:
>> [...]
>> 2. Is there no Lua version of \getvariable{...}{...}?
>
> There is no need because everything is stored in a Lua table.
> [...]
>   local argumentlist  = document.arguments.arguments
>   local argumenttable = utilities.parsers.settings_to_hash(argumentlist)
>
>   context(argumenttable["fname"])

Many thanks for your reply, Wolfgang.

This is exactly what I need.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] need help comparing strings

2020-10-13 Thread Pablo Rodriguez
On 10/13/20 5:54 PM, Aditya Mahajan wrote:
> On Tue, 13 Oct 2020, Pablo Rodriguez wrote:
>> [...]
>> Could anyone explain me what I’m missing here?

Many thanks for your reply, Aditya.

> I find it simpler to write macros where there is clean communicating
> between tex and lua. For example:
> [...]
> \define[1]\numbersfname
> {\cldcontext{userdata.numbersfname([==[#1]==])}}

This is the first time I see that way of wrapping an argument.

In any case, I cannot compare to a number:

  \startluacode
userdata = userdata or {}
function userdata.numbersfname(name)
return string.match(name, "%d+")
end
  \stopluacode

  \define[1]\numbersfname
  {\cldcontext{userdata.numbersfname([==[#1]==])}}

  \starttext
  \numbersfname{abc123}

  \numbersfname{\env{fname}}
  \doifelse{\numbersfname{\env{fname}}}{123}{yes}{no}
  \stoptext

I don’t know why both strings don’t match.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] need help comparing strings

2020-10-13 Thread Pablo Rodriguez
Dear list,

I have the following sample:

  \starttext
  \def\numbersfname
{\cldcontext{string.match([[\env{fname}]], "\letterpercent d+")}}
  \ctxlua{ c = context.getvariable("environment", "fname") or "a" }
  \ctxlua{ d = [[\env{fname}]] }

  tex: \numbersfname\\
  \doifelse{}
  {123}{yes}{no}\\
  c: \cldcontext{c}\\
  \doifelse{\cldcontext{c:match("\letterpercent d+")}}
  {123}{yes}{no}\\
  d: \cldcontext{d}\\
  \doifelse{\cldcontext{d:match("\letterpercent d+")}}
  {123}{yes}{no}
  \stoptext

For compilation, I run the command:

  context --purgeall --arguments=fname={abc123} test-file.tex

These things are failing:

1. I don’t know how to get \numbersfname equal to "123". I don’t know
what I’m doing wrong.

2. Is there no Lua version of \getvariable{...}{...}?

3. I’m trying this on a Linux box, but on Windows I would say that Lua
variable "d" is empty.

I need to get the number from \env{fname} and I don’t know what I’m
missing. \doif is the way to test whether it’s right.

Could anyone explain me what I’m missing here?

Many thanks,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] bug with hz in LMTX?

2020-10-13 Thread Pablo Rodriguez
On 10/13/20 1:36 PM, Hans Hagen wrote:
> On 10/12/2020 4:59 PM, Pablo Rodriguez wrote:
>> [...]
>> On page 36 (https://pdf.ousia.tk/wrong-font-expansion.pdf#page=36),
>> lines 4, 11 and 20 are wrong.
>>
>> Current LMTX (LuaTeX 2.07 20200920 + ConTeXt MkIV 2020.09.20 23:02) has
>> the issue, while MkIV (LuaTeX 1.11 7226 + ConTeXt MkIV 2020.01.30 14:13)
>> has no problem with that.
>>
>> I think this might be a bug. Could you confirm the issue?
> I need to keep count of how frequently i suggest typo also
>
>   \setupalign[verytolerant,stretch]
>
> when one uses hz and/or protrusion. I don't know why folks expect
> expansion and protrusion to give better (or intended) output when the
> other constraints are such that tex either not even ends up in the phase
> where expansion is applied, or when fitting the constraints is only
> possible with excessive and visible expansion. When expansion is max or
> min and there is not enough spacing to stretch and shrink the results
> will not get better. Read: expansion is a last resort in getting things
> right. Also, protrusion actually add to the constraints so that is never
> a way to get a better fit.

Many thanks for your reply, Hans.

If both expansion and protrusion add problems to line breaking, I’m
disabling both features in my documents.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Some interaction questions

2020-10-13 Thread Pablo Rodriguez
On 10/13/20 11:40 AM, Denis Maier wrote:
> Hi,
>
> I have a few more question regarding interaction/PDF bookmarks and PDF
> links:
>
> - How can you ignore Commands in bookmarks? Like when instead of "The
> concept of {\em bookmarks}", I'd prefer to just have "The concept of
> bookmarks". I know I can just use something like
> \startchapter[title=The concept of {\em bookmarks},
>      bookmark=The concept of bookmarks]
> But is there an setting for that?

Hi Denis,

I think this is what you want:

  \enabledirectives[references.bookmarks.preroll]

> - When clicking on a link, the focus switches to the target page. Is it
> possible to go to the line of the target? (Would be nice for switching
> between notes and text. Otherwise linking between notes and note markers
> would be quite pointless.)

"focus=standard" in \setupinteraction.

With a minimal sample:

  \setupinteraction[state=start, focus=standard]
  \enabledirectives[references.bookmarks.preroll]
  \placebookmarks[chapter]
  \starttext
  \completecontent
  \chapter{The concept of {\em bookmarks}}
  \stoptext

I hope it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] bug with hz in LMTX?

2020-10-12 Thread Pablo Rodriguez
Dear list,

I have the following sample:

  \showframe\showgrid
  \setuplayout[width=middle]
  \definefontfamily[mainface][rm][TeX Gyre Pagella]
  [features={default, quality}]
  \setupbodyfont[mainface, 20pt]
  \setupalign[hanging, hz]
  \starttext
  \dorecurse{25}{\input{zapf}\input{cuomo}}
  \stoptext

On page 36 (https://pdf.ousia.tk/wrong-font-expansion.pdf#page=36),
lines 4, 11 and 20 are wrong.

Current LMTX (LuaTeX 2.07 20200920 + ConTeXt MkIV 2020.09.20 23:02) has
the issue, while MkIV (LuaTeX 1.11 7226 + ConTeXt MkIV 2020.01.30 14:13)
has no problem with that.

I think this might be a bug. Could you confirm the issue?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Lua equivalent of \getvariable{}{}

2020-10-11 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\starttext
\ctxlua{ context.setvariable("environment", "filename", "abc123") }
\ctxlua{ c = context.getvariable("environment", "filename") or "a" }
\ctxlua{ d = [[\env{filename}]] }

c: \cldcontext{c}\\
\doifelse{\cldcontext{c:match("\letterpercent d+")}}
{123}{yes}{no}\\
d: \cldcontext{d}\\
\doifelse{\cldcontext{d:match("\letterpercent d+")}}
{123}{yes}{no}
\stoptext

Which is the Lua equivalent of \getvariable{}{}? I get nil now.

BTW, I wonder why \setvariable prints the variable, botn in Lua and ConTeXt.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] problem with string matching

2020-10-10 Thread Pablo Rodriguez
Dear list,

I have this sample:

\starttext
\startluacode
a = "asdfasd123"
b = a:match("%d+")
context(b)
c = "123"
context(c)
if b==c then context("yes") else context("no") end

function document.numbers_only(str)
  context(str:gsub("[%a%p]", ""))
end

function document.only_numbers(str)
  context(str:match("%d+"))
end

function document.compare_strings(one, two)
  if one == two then context("Yes") else context ("No") end
end
\stopluacode

\unexpanded\def\numbersonly#1%
{\ctxlua{document.numbers_only("#1")}}

\unexpanded\def\onlynumbers#1%
{\ctxlua{document.only_numbers("#1")}}

\unexpanded\def\comparestrings#1#2%
{\ctxlua{document.compare_strings("#1", "#2")}}

\def\rstring{abc123}

\numbersonly{abc123}

\onlynumbers{abc123}

\doifelse{\numbersonly{\rstring}}{abc123}{yes}{no}

\doifelse{abc123}{\onlynumbers{\rstring}}{yes}{no}

\comparestrings{\numbersonly{\rstring}}{123}

\comparestrings{123}{123}, \comparestrings{1}{123}
\stoptext

I need to extract the digits from a string, which actually comes from
the "--arguments" option in the command line.

I need to compare the string with real numbers. But for some reason
unknown to me, this is more complex than I thought.

Could anyone explain me what I am doing wrong?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] \doifelse not working, \doiftextelse breaking

2020-10-09 Thread Pablo Rodriguez
On 10/9/20 5:10 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 09.10.2020 um 16:31:
>> [...]
>> Which are the improvements to the command added by \do*argument?
>
> You can add a space between both arguments. You version expects this
>
>      \startswith [...][...]
>
> while the extended code allows this
>
>      \startswith [...] [...]

Many thanks for your explanation, Wolfgang.

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] \doifelse not working, \doiftextelse breaking

2020-10-09 Thread Pablo Rodriguez
On 10/9/20 4:08 PM, Wolfgang Schuster wrote:
> [..]
> You need a % at the end of the definition, otherwise TeX expects a space
> after the second argument to end the command.
>
> \unexpanded\def\startswith[#1][#2]%
>{...}

Many thanks for your ultra-fast reply, Wolfgang.

Now I see muy mistake. In my previous command definitions with two
arguments, the opening brace was right after the second argument.

> To improve your command and allow a space between both arguments you can use
>
> \unexpanded\def\startswith
>{\dodoubleargument\dostartswith}
>
> \def\dostartswith[#1][#2]%
>{...}

Now I see with \dosingleargument, \dodoubleargument and
\dotripleargument are there.

Which are the improvements to the command added by \do*argument?

> or just add a dummy parameter and use #1 and #3 to pass the arguments
>
> \unexpanded\def\startswith[#1]#2[#3]%
>{...}

This is shorter, but it looks to creepy (even for my code).

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] \doifelse not working, \doiftextelse breaking

2020-10-09 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\starttext
\startluacode
function document.starts_with(str, start)
  if str:sub(1, #start) == start then
context(start)
  end
end
\stopluacode

\unexpanded\def\startswith[#1][#2]
{\cldcontext{document.starts_with("#1", "#2")}}

\startswith[getjobid764572121][getjobid]

yes:
\doifelse{\startswith[getjobid764572121][getjobid]}{getjobid}
{yes}{no}

no:
\doifelse{\startswith[getjobid764572121][getjobid]}{}
{yes}{no}

%% \doiftextelse{\startswith[getjobid764572121][getjobid]}
% {yes}{no}
\stoptext

I don’t know why comparing doesn’t work with \doifelse.

I’m surprised that \doiftextelse breaks when \startswidth if inside.

How could i make \startswith work inside \doiftext?

Or how could I catch positives when command contents start with a given
string?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Hyperref-style borders around clickable links

2020-10-08 Thread Pablo Rodriguez
On 10/8/20 12:03 PM, Denis Maier wrote:
> Am 08.10.2020 um 11:49 schrieb Henning Hraban Ramm:
>> [...]
>> And that this is PDF (viewer) styling, not TeX/MP, so there’s
>> probably no further interface, even if it’s possible to set several
>> properties of link borders in e.g. Acrobat.
>
> Anyplace where I can find out more about this?
Hi Denis,

the PDF reference
(https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#nameddest=G11.1696585)
contains the information about border styles (also for link annotations).

But ConTeXt hasn’t those styles implemented.

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Hyperref-style borders around clickable links

2020-10-08 Thread Pablo Rodriguez
On 10/8/20 11:40 AM, Denis Maier wrote:
> Am 08.10.2020 um 11:36 schrieb Henning Hraban Ramm:
>>> Am 08.10.2020 um 10:41 schrieb Denis Maier :
>>>
>>> Ok, found a (partial) solution myself in Pablo's question from yesterday...
>>>
>>>  \setupinteraction[state=start]
>>>  \enabledirectives[references.border]
>>>
>>> does that. But how do I configure the borders? Color? Style and so? 
>>> Couldn't find anything on the Wiki.
>> \setupinteraction[color=,contrastcolor=,]
>> lets all links use the basic text color (usually black).
>> You can also set the style.
> Yep, I have that already in my settings.
>>
>> The frames are meant for debugging, probably you can redefine the color;
> So, you would advice against using these frames?

Sorry, Hraban, these link rectangles are always there. Otherwise there
would be no link annotations.

What "\enabledirectives[references.border]" is width to border and color
(so they can be displayed).

See
https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#nameddest=G11.1951136.

Just in case it helps,

Paboo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] playing with Windows drag & drop

2020-10-07 Thread Pablo Rodriguez
On 10/7/20 4:45 PM, cont...@vivaldi.net wrote:
> Hello Pablo,
>
> slight correction:
>
>  .bat
> call lua.exe -e "os.execute('echo context --purgeall
> --arguments=PDFdocument=' .. ([[%1]]):gsub([[\]], '/') .. ' b.tex')"
> 

Many thanks for your reply, Lukas.

I found another workaround at the ConTeXt file (b.tex).

  \cldcontext{string.gsub([[\env{PDFdocument}]], "", "/")}

I don’t know why I needed to add "" instead of "\\". (otherwise, I
kept getting "C://Users//username//Desktop//document.pdf" and similar ones).

Many thanks for your help,

Pablo


> On 2020-10-07 16:23, cont...@vivaldi.net wrote:
>> Hello Pablo,
>>
>> sometimes I do something hacky like the following in similar
>> situations (not tested now):
>>
>>  .bat
>> call lua.exe -e "os.execute('echo context --purgeall
>> --arguments=PDFdocument=' .. ([[%1]]):gsub([[\]], '/') .. ' b.tex')"
>> 
>>
>> Best regards,
>>
>> Lukas
>>
>>
>> On 2020-10-06 16:18, Pablo Rodriguez wrote:
>>> Dear list,
>>>
>>> I have a minimal sample file:
>>>
>>>   \starttext
>>> \insertpages[\env{PDFdocument}]
>>>   \stoptext
>>>
>>> I invoke it in Windows, using the following batch file:
>>>
>>>   @echo off
>>>   REM ~ context --purgeall --arguments="PDFdocument=%1" b.tex
>>>
>>> I’m afraid it only works if the batch file and the PDF document are on
>>> the same directory.
>>>
>>> I guess this is related to "\" in Windows paths. Is there a way to
>>> make
>>> it work with the sample above?
>>>
>>> Many thanks for your help,
>>>
>>> Pablo
>>> --
>>> http://www.ousia.tk

--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] xml bookmarks + chapter no. in header

2020-10-07 Thread Pablo Rodriguez
On 10/7/20 5:06 PM, Tomas Hala wrote:
> Hi,
>
> I tried
> \setuphead[section][expansion=yes]
> with no effect before I wrote my question to the list here.
>
> With the \setuphead, the .tuc file still contains macro names instead of the 
> text:
>  ["title"]="\\expanded \\name ",
> whereas without it only:
>  ["title"]=" \\name ",
>
> So is there any way how to solve it?

Sorry, Tomáš, for not giving a reply to you.

I noticed that your case didn’t work with my approach.

But the problem is different in that case, I think (Wolfgang may correct
me [or explain this better]).

Expansion in list and bookmarks seems to be different:

\setupinteraction[state=start]
\setupinteractionscreen[option=bookmarks]
\placebookmarks[section][section]
\setuphead[title][page=no]
\starttext

%~ \placelist[section] % this doesn’t work
\def\name{aa}
\placelist[section]
 \startsection[title=\name, list=\expanded\name] \stopsection
\def\name{bb}
\startsection[title=\name, list=\expanded\name] \stopsection
\completecontent

\stoptext

I’m afraid I don’t know why.

Sorry not helping,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


  1   2   3   4   5   6   7   8   9   10   >