Re: [NTG-context] notes by paragraph

2023-01-28 Thread Pablo Rodriguez via ntg-context
On 1/28/23 03:58, jbf via ntg-context wrote:
> Re my earlier question on footnotes by defined paragraph:
> 
> \start...stoplocalfootnotes and \placelocalfootnotes largely solves the
> issue (had forgotten that option), but I am still getting the footnotes
> repeated at the bottom of the page. I am obviously missing a setting.
> There are parts of this text that do require the usual footnotes at the
> bottom, so I would not want to turn off this option permanently. I have
> tried \setupnotation[footnote][display=no] but that is not working.

Hi Julian,

\setupnote[footnote][location=none] might help.

Since you don’t provide a minimal sample to play with, I cannot tell
whether this works or not.

Just in case it helps,

Pablo

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Best way to access casul fonts

2023-01-23 Thread Pablo Rodriguez via ntg-context
On 1/23/23 20:32, Mattias Märka via ntg-context wrote:
> Hi Pablo,
> 
> Yes, I want to mix casual with serif, sans-serif and so on. 
Hi Mattias (please, excuse my previous misspelling of your name),

here you have it:

  \definefontfamily[mainface][rm][TeX Gyre Pagella]
  \definefontfamily[mainface][ss][TeX Gyre Heros]
  \definefontfamily[mainface][tt][TeX Gyre Cursor]
  \definefontfamily[mainface][hw][Lucida Casual]
  \definefontfamily[mainface][cg][Lucida Casual]
  \setupbodyfont[mainface]
  \starttext
  \doloopoverlist{\rm,\ss,\tt,\hw,\cg}
{{\recursestring%
  The quick brown fox jumps over the lazy dog.\par}}
  \stoptext

Lucida Casual is handwriting and calligraphy in the sample. But you only
need one of them.

I hope it helps,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Best way to access casul fonts

2023-01-23 Thread Pablo Rodriguez via ntg-context
On 1/23/23 19:04, Mattias Märka via ntg-context wrote:
> Hi,
> 
> I'm trying to access Lucida Casual.

Hi Matthias,

With a relatively recent version of ConTeXt (LMTX or MkIV), the
following should work:

  \definefontfamily[myserif][rm][Lucida Casual]
  \starttext
  The quick brown fox jumps over the lazy dog.

  \setupbodyfont[myserif]
  The quick brown fox jumps over the lazy dog.
  \stoptext

This is the easiest way to access it.

Another question would be how to mix a casual font with serif,
sans-serif and mono typefaces.

Just in case it might help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] font features in the wiki

2023-01-22 Thread Pablo Rodriguez via ntg-context
Dear list,

since Hans has asked me for an addition to the wiki, I was thinking of
adding a complete explanation of font features.

I must admit that https://wiki.contextgarden.net/Featuresets wouldn’t be
the best way that I would choose to explain this.

Of course, I don’t want to impose my view on this topic.

I wonder whether it would make sense that I start a new article on font
features and when finished, see the way to merge the contents from the
featureset.

I’m especially asking Idris, Hraban and MHB.

Of course, I might be wrong and I’m happy to be corrected about my
proposal on font features in the wiki.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] rewrite for Greek in the wiki

2023-01-22 Thread Pablo Rodriguez via ntg-context
On 1/21/23 14:13, Thomas A. Schmitz via ntg-context wrote:
> Hi Pablo,
> 
> thanks for this; it is very informative and clear. Just one short remark 
> and one correction:

Many thanks for your review and your correction, Thomas.

> 1. "Before 1982, Greek ort[h]ography was polytonic." That's a bit of an 
> oversimplification.

Many thanks for noticing the typo in “orthography”.

The sentence you quote, it is an oversimplification (altough “from 1500”
is also “before 1982” 😅). I’m afraid I didn’t find the right way to
describe the difference between polytonic and monotonic systems.

I wanted to break the common misconception “if contemporary Greek is
monotonic, polytonic orthography is ancient Greek”. Either I’m totally
missing the whole question, or it is plainly wrong that polytonic means
ancient Greek (although ancient Greek is polytonic).

> [...]
> 2. I think it would be worth pointing out that unfortunately, Greek 
> lowercase letters with acute accent occur separately in two unicode 
> blocks: the combinations in U+03AC-U+03AF and U+03CC-U+03CF ("Greek 
> small letter X with tonos") are functionally identical to the 
> combinations in the U+1F7 block ("Greek small letter X with acute 
> accent").

Many thanks for pointing this out. I explicitly avoided, since it seems
to me a tricky question.

https://wiki.contextgarden.net/Greek#Monotonic_and_Acute_Accent is a way
of putting it.

> This is a source of confusion both in fonts and in programming,
> because some programs normalize these letters, so for string
> operations and searches, you may obtain surprising results.

“Charachter normalization” is tricky (for me, mainly with the Latin
alphabet).

https://wiki.contextgarden.net/Greek#On_“Character_Normalization” tries
to explain this.

> Thank you for the article!

Many thanks for your review,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] variable font not working

2023-01-22 Thread Pablo Rodriguez via ntg-context
Dear list,

using current latest (from 2023.01.15 14:04), the just released version
of Source Serif 4 Variable
(https://github.com/adobe-fonts/source-serif/releases/latest) and the
following sample:

  \usemodule[fonts-variable]
  \starttext
\showfontvariations[font=file:SourceSerif4Variable-Roman.otf]
  \stoptext

ConTeX outputs no text with that font.

Could anyone confirm the issue?

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] rewrite for Greek in the wiki

2023-01-21 Thread Pablo Rodriguez via ntg-context
Dear list,

just in case it might help, I’ve rewritten the Greek entry in the wiki:

  https://wiki.contextgarden.net/Greek

Although nobody seemed to have mentioned them (afaIk), there are two issues:

1. Hyphenation patterns are different for ancient, monotonic and modern
polytonic Greek. Greek ortography was polytonic before 1982.

ConTeXt includes patterns for ancient and monotonic Greek, but none for
modern polytonic Greek
(http://mirror.ctan.org/language/hyph-utf8/tex/generic/hyph-utf8/patterns/tex/hyph-el-polyton.tex).

Ironically, modern polytonic Greek patterns would be required to typeset
both the act and the decree that introduced the monotonic ortography.

2. Greek doesn’t seem to have language-dependent commands (such as
\currentdate).

In both cases, Hans will reply that nobody asked for any of them.

Of course, I totally agree. AfaIk, nobody asked for these features.

Just in case it might help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] wider font effect as font feature?

2023-01-20 Thread Pablo Rodriguez via ntg-context
Dear list,

I wanted to use a font with slightly wider effect, such as in:

  \definetweakedfont[wider][xscale=1.075]

Is there any way that it could be applied as a font feature?

Or how could I apply this effect everytime a \definefontfamily is used?

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Minor bug in Lua or ConTeXt

2023-01-18 Thread Pablo Rodriguez via ntg-context
On 1/18/23 19:07, Hans Hagen via ntg-context wrote:
> On 1/18/2023 6:47 PM, Pablo Rodriguez via ntg-context wrote:
> [...] 
>> If I’m not wrong (in my previous statement), I think this is
>> counterintuitive, since undefined commands are fine in TeX comments and
>> undefined variables are fine inside \startluacode … \stopluacode.
>
> I bet you'd complain if \the\scratchdimen would not expand. You cannot 
> expect context to completely parse what goes into lua beforehand, unless 
> you are willing to get a performance hit (apart from a waste of time).

I’m starting to understand that one cannot have it all.

I haven’t used so much Lua code to add an undefined TeX command in a
comment.

Different reply isn’t wrong, only it needs to be known in advance.

> Thanks for adding to the wiki,

I have discovered after the addition that this was explained before
(last paragraph from
https://wiki.contextgarden.net/Programming_in_LuaTeX#Calling_Lua_from_TeX).

To emphasize it visually, I abused the  element.

If any wiki wizard knows better, please tell.

Many thanks for your help,

Pablo

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Minor bug in Lua or ConTeXt

2023-01-18 Thread Pablo Rodriguez via ntg-context
On 1/18/23 14:41, Bruce Horrocks via ntg-context wrote:
> […] 
> Perhaps the Wiki only needs to point out that if you get a Lua
> related error and the error log lists the entire contents of \startluacode ...
> \stopluacode then a possible source of the error is a \command somewhere
> in there?

Hi Bruce,

from what I understand is that undefined TeX commands cannot be added to
Lua comments.

If I’m not wrong (in my previous statement), I think this is
counterintuitive, since undefined commands are fine in TeX comments and
undefined variables are fine inside \startluacode … \stopluacode.

So I added
https://wiki.contextgarden.net/Programming_in_LuaTeX#Undefined_Commands_in_Lua_Comments.

Let me know whether I missed something.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] multimedia inclusion added to the wiki

2023-01-18 Thread Pablo Rodriguez via ntg-context
On 1/18/23 17:45, Alan Braslau via ntg-context wrote:
> [...] 
> Thank you - this is indeed helpful.

Hi Alan,

many thanks for the kind words (also to Otared and Willi).

> I have two questions:
> 
> \userendering[key-name][video/mp4][video.mp4]
>   [embed=yes, auto]
> 
> It was my understanding that the mix of key=value with (single) option
> in the same comma-separated list does not work. Would someone clarify
> this?

This is the first time read something like that. I don’t know whether
something like this exists.

https://wiki.contextgarden.net/Multimedia_Inclusion#Including_Video
contains a sample with both keys.

Using the improved lpdf-wid.lmt included in
https://mailman.ntg.nl/pipermail/ntg-context/2023/107599.html, both keys
work.

> Secondly, I would have thought that embed=yes would include the
> multimedia file in the PDF stream. However,
> 
>   The resulting PDF document requires a video.mp4 file on the same
>   directory as your ConTeXt source file.
> 
> This should probably say "in the same directory as the PDF file", but
> is that true, or does it get embedded?

Sorry for the poor wording, it gets embedded. The source requires it for
generation (for the file to be embedded in the resulting PDF document).

I hope the new version is clearer now.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Minor bug in Lua or ConTeXt

2023-01-18 Thread Pablo Rodriguez via ntg-context
On 1/18/23 00:36, Bruce Horrocks via ntg-context wrote:
> ConTeXt  ver: 2023.01.04
> 
> The following MWE won't compile because of the \dummycommand line
> even though it is a comment. Not sure whether it's a minor bug or an
> unavoidable aspect of allowing embedded Lua.

Hi Bruce,

I think your code should read:

  \startluacode
  -- \\dummycommand
  \stopluacode
  \starttext
  Hello
  \stoptext

BTW, in pure Lua:

  a = "\a"
  b = "\\b"
  print(a..b)

outputs "\b".

Sorry, I lack the knowledge to explain this, but backslash seems to be
an special char in pure Lua too.

Just in case it might help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] multimedia inclusion added to the wiki

2023-01-16 Thread Pablo Rodriguez via ntg-context
Dear list,

just in case it might help, I have just added a new wiki article about
how to add multimedia in PDF documents.

  https://wiki.contextgarden.net/Multimedia_Inclusion

I hope it helps,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] question about multimedia renderings

2023-01-16 Thread Pablo Rodriguez via ntg-context
On 1/16/23 02:42, Michal Vlasák via ntg-context wrote:
> [...] 
> I would think that something like the attached could work. But in some
> cases it fails on the TeX side with something I am not sure about. I
> probably overlooked something. Anyways the idea is to just use the
> Start/StopRendering actions with the correct label.

Hi Michal,

many thanks for your reply.

Your code fixes the "auto" option. At least with the following sample:

  \setupinteraction[state=start]
  \unexpanded\def\IncludeVideo[#1]
   {\definerenderingwindow[#1]
  [width=\textwidth, height=\textwidth,
  framecolor=red]
\userendering[#1][video/mp4][#1]
  [embed=yes, auto]
\placerenderingwindow[#1][#1]}
  \starttext
  \null\page
  \startTEXpage[offset=1em, pagestate=start]
\IncludeVideo[video-1.mp4]
  \stopTEXpage
  \null\page
  \startTEXpage[offset=1em, pagestate=start]
\IncludeVideo[video-2.mp4]
  \stopTEXpage
  \null\page
  \stoptext

I attach a diff and complete file with the the fix from today and the
addition of controls, volume, repeat and opacity you sent me some days
ago (already sent in
https://mailman.ntg.nl/pipermail/dev-context/2022/003957.html).

Just in case Hans may review your code and merge into ConTeXt.

Many thanks for your help,

Pablo--- /home/ousia/Desktop/lpdf-wid.lmt
+++ /home/ousia/mkxl/lpdf-wid.lmt
@@ -64,6 +64,10 @@
 local v_compress   = variables.compress
 local v_list   = variables.list
 local v_title  = variables.title
+local v_controls   = variables.controls
+local v_volume = variables.volume
+local v_repeat = variables["repeat"]
+local v_opacity= variables.opacity
 
 local lpdf = lpdf
 
@@ -615,7 +619,7 @@
 -- sound is different, no window (or zero) so we need to collect them and
 -- force them if not set
 
-local ms, mu, mf = { }, { }, { }
+local mu, mf = { }, { }, { }
 
 local function delayed(label)
 local reserved = mu[label]
@@ -623,7 +627,7 @@
 reserved = pdfreserveobject()
 mu[label] = reserved
 end
-return pdfreference(reserved)
+return reserved
 end
 
 local function checkedreference(ref)
@@ -639,16 +643,16 @@
 local openpage  = specification.openpage
 local closepage = specification.closepage
 local option= settings_to_hash(specification.option)
-if option[v_auto] then
-if not openpage or openpage == "" then
-openpage = variables.StartCurrentRendering
-end
-if not closepage or closepage == "" then
-closepage = variables.StopCurrentRendering
-end
-end
 openpage  = checkedreference(openpage)
 closepage = checkedreference(closepage)
+if option[v_auto] then
+if not openpage then
+openpage = executers.startrendering(label)
+end
+if not closepage then
+closepage = executers.stoprendering(label)
+end
+end
 if openpage or closepage then
 actions = pdfdictionary {
 PO = openpage,
@@ -656,13 +660,8 @@
 }
 end
 local page = tonumber(specification.page) or texgetcount("realpageno") -- todo
-local r = mu[label] or pdfreserveobject() -- reserve, child refers to parent
-local a = pdfdictionary {
-S  = pdfconstant("Rendition"),
-R  = mf[label],
-OP = 0,
-AN = pdfreference(r),
-}
+local r = delayed(label) -- reserve, child refers to parent
+local a = executers.startrendering(label)
 local bs, bc = pdfborder()
 local d = pdfdictionary {
 Subtype = pdfconstant("Screen"),
@@ -676,7 +675,6 @@
 local width = specification.width or 0
 local height = specification.height or 0
 context(nodeinjections.annotation(width,height,0,d(),r)) -- save ref
-return pdfreference(r)
 end
 
 -- some dictionaries can have a MH (must honor) or BE (best effort) capsule
@@ -713,7 +711,7 @@
  --  B = start,
  -- }
  -- }
-local parameters = pdfdictionary {
+local permissions = pdfdictionary {
 Type = pdfconstant("MediaPermissions"),
 TF   = pdfstring("TEMPALWAYS"), -- TEMPNEVER TEMPEXTRACT TEMPACCESS TEMPALWAYS / needed for acrobat/wmp
 }
@@ -733,6 +731,20 @@
 forcereference = option[v_list] ~= v_no,
 }
 end
+local media_play_params = pdfdictionary {
+Type = pdfconstant("MediaPlayParams"),
+BE   = pdfdictionary {
+C  = option[v_controls] and option[v_controls] ~= v_no or false,
+V  = tonumber(option[v_volume]) or 100,
+RC = tonumber(option[v_repeat]) or 1,
+},
+}
+local media_screen_params = pdfdictionary {
+Type = pdfconstant("MediaScreenParams"),
+BE   = pdfdi

[NTG-context] question about multimedia renderings

2023-01-15 Thread Pablo Rodriguez via ntg-context
Dear list,

I’m planning to add an explanation about multimedia inclusion to the
wiki, but first I wanted to discuss an issue I have found.

I have the following sample (adapted from scrn-wid.mklx):

  \setupinteraction[state=start]
  \starttext
  \null\page
  \definerenderingwindow[myrenderingwindow]
[width=\textwidth, height=\textwidth,
 %openpageaction=StartCurrentRendering,
 %closepageaction=StopCurrentRendering,
 openpageaction=StartRendering{\currentrendering},
 closepageaction=StopRendering{\currentrendering},
 framecolor=red]
  \startTEXpage[offset=1em, pagestate=start]
  \userendering[key-name][video/mp4][video.mp4]
[embed=yes,
 auto,
 ]
  \placerenderingwindow[myrenderingwindow][key-name]
  \stopTEXpage
  \null\page
  \stoptext

\userendering[][][auto] would enable automatic play or stop when the
page with the rendering is reached or left (respectively).

I cannot get it working. Neither do work the commented lines in
\definerenderingwindow.

Inspecting the PDF code, the screen annotation only gets an additional
actions dictionary
(https://opensource.adobe.com/dc-acrobat-sdk-docs/standards/pdfstandards/pdf/PDF32000_2008.pdf#G11.2096829)
with /PO and /PC entries, when open and close page actions are set to
StartRendering{\currentrendering} and StopRendering{\currentrendering}.

Just for reference, this is the screen annotation object with the
additional actions dictionary:

  13 0 obj
  <<
/Type /Annot
/A <<
  /AN 13 0 R
  /OP 0
  /R 12 0 R
  /S /Rendition
>>
/AA <<
  /PC <<
/AN 13 0 R
/OP 1
/R 12 0 R
/S /Rendition
  >>
  /PO <<
/AN 13 0 R
/OP 0
/R 12 0 R
/S /Rendition
  >>
>>
/Border [ 0 0 0 ]
/P 14 0 R
/Subtype /Screen
/T 
/Rect [ 12.353668 12.353668 437.54664 437.54664 ]
  >>
  endobj

And this is what I get with \userendering[][][auto]:

  13 0 obj
  <<
/Type /Annot
/A <<
  /AN 13 0 R
  /OP 0
  /R 12 0 R
  /S /Rendition
>>
/Border [ 0 0 0 ]
/P 14 0 R
/Subtype /Screen
/T 
/Rect [ 12.353668 12.353668 437.54664 437.54664 ]
  >>
  endobj

Could anyone be so kind to confirm the issue?

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Is the Society of Biblical Literature (SBL) style files for ConTeXt incompatible with \setupinteraction[state=start]?

2023-01-15 Thread Pablo Rodriguez via ntg-context
On 1/15/23 17:57, Joel via ntg-context wrote:
> When I am using the SBL ConTeXt files for citations, if I add a line
> `\setupinteraction[state=start` my code starts complaining:
> [...]
> Is this package incompatible with interaction?

Hi Joel,

unless I’m missing your point,
https://github.com/jjmccollum/context-sbl/issues/new is the place to
report your issue.

BTW, I downloaded current master
(https://github.com/jjmccollum/context-sbl/archive/refs/heads/main.zip)
and the test file compiles just fine with and without
\setupinteraction[state=start].

The undefined command from your error message (\currentbtxloctext) seems
to be defined in four setups from tex/publ-imp-sbl.mkvi:

  \def\currentbtxloctext{\btxparameter{loctext}}

The setups containing the definitions are btx:sbl:cite:inlinelong,
btx:sbl:cite:inlineshort, btx:sbl:cite:inline and btx:sbl:cite:shorthand.

Your code might be triggering an unwanted effect and the module
developer may fix it.

Just in case it might help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] binaries in latest

2023-01-12 Thread Pablo Rodriguez via ntg-context
Dear list,

as already reported in another thread, bimaries (for Linux64) weren’t
updated with current latest (2023.01.04 11:35),

Just in case it might help others (and to fix the issue), deleting the
file tex/texmf-linux-64.tma allows the download of newer binaries
(although the name for your platform should be different in other OS).

Just in case it might help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] issue with font

2023-01-01 Thread Pablo Rodriguez via ntg-context
On 1/1/23 12:38, Hans Hagen via ntg-context wrote:
> On 1/1/2023 11:55 AM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> I don’t know what is wrong in the font, but it would be great to be able
>> to use it with ConTeXt.
> Hm, i will catch it but am not going to look into the reason (like some 
> issue in the font). When I zoom in I wonder if typewriter fonts really 
> looked like that so there might be more accurate typewriter emulations 
> out there that you can try.

Many thanks for your fast reply, Hans.

The thing with that font is that it contains polytonic Greek and other
scripts.

Many thanks for your help,

Pablo

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] issue with font

2023-01-01 Thread Pablo Rodriguez via ntg-context
Hans,

I have the following sample.

  \starttext
  \definedfont[TruetypewriterPolyglott-mELa.ttf]
  \input zapf
  \stoptext

I get a fatal error in the font file (both LMTX and MkIV).

Font is https://www.fontspace.com/truetypewriter-polyglott-font-f14955
(direct donwnload from https://www.fontspace.com/get/family/zmmx1)

I don’t know what is wrong in the font, but it would be great to be able
to use it with ConTeXt.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] numbering questions

2022-12-31 Thread Pablo Rodriguez via ntg-context
On 12/31/22 18:23, Henning Hraban Ramm via ntg-context wrote:
> I’m playing with some examples of section numbering.
> 
> * Is there a setup to influence the order of number segments? I.e. can I 
> have “section.chapter.part“ instead of “part.chapter.section”?

I thought sectionsegments=section:chapter would work, but it doesn’t.

> * How can I format the segments, e.g. to get two or three digits each 
> (leading zeros)?

The easy part is to have the leading zeros, but I cannot get it working
with numbercommand or deepnumbercommand.

  \startluacode
  function document.leadingzeros(str)
local lzeros = 3-str:len()
return ("0"):rep(lzeros)
  end
  \stopluacode
  \unexpanded\def\lzeros#1%
{\cldcontext{document.leadingzeros("#1")}}

> * I can force a section number with “ownnumber”, but the next one is 
> back in the previous scheme. Itemize has “start”. How can I start 
> section chapter numbering at 3 (or -1 or whatever; I know I can start at 
> 0 with “zero”) and let ConTeXt continue from there?

\setupheadnumber[chapter][3] % will start with 4

I hope it helps. »Einen guten Rutsch ins Neujahr!«

Happy New Year to all!

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] language identifier for all languages

2022-12-30 Thread Pablo Rodriguez via ntg-context
Hi Hans,

as already mentioned in a previous thread
(https://mailman.ntg.nl/pipermail/ntg-context/2022/106713.html), I think
it might be useful to have an identifier for any language, such as in:

  \setuphyphenation[method=traditional]
  \registerhyphenationexception[*][macOS]
  \registerhyphenationexception[any][macOS]
  \registerhyphenationexception[it][macOS]

  \startbuffer
  \currentlanguage: \hyphenatedword{macOS}
  \stopbuffer
  \starttext
  \startTEXpage[offset=1em]
  \getbuffer

  \language[it]\getbuffer
  \stopTEXpage
  \stoptext

I think this is better than having other commands to add hyphenation
exceptions for all languages.

I wonder whether Steffen would be fine with this addition.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new upload

2022-12-27 Thread Pablo Rodriguez via ntg-context
On 12/27/22 21:13, Hans Hagen via ntg-context wrote:
>>
>> I don’t know what may be wrong here.
> me neither so i need to check it

I’m afraid I’m getting the same error with newer upload
(https://mailman.ntg.nl/pipermail/ntg-context/2022/107492.html).

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new upload

2022-12-27 Thread Pablo Rodriguez via ntg-context
On 12/27/22 18:04, Hans Hagen via ntg-context wrote:
> Hi,
> 
> I uploaded lmtx. There have been some additions to tabulate.

Hi Hans,

many thanks for the new upload, but I’m afraid I get this error in LMTX
(MkIV works fine):

  \starttext
  \null
  \stoptext

resolvers   | formats | executing runner 'run luametatex format':
~/context/tex/texmf-linux-64/bin/luametatex --jobname="./a.tex"
--fmt=~/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
--lua=~/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
 --c:currentrun=1 --c:fulljobname="./a.tex" --c:input="./a.tex"
--c:kindofrun=1 --c:maxnofruns=9
--c:texmfbinpath="~/context/tex/texmf-linux-64/bin"
mtx-context | fatal error: return code: 1

I have erased and generated the cache with "mtxrun --generate".

I don’t know what may be wrong here.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] New c-o-w: The XMas gift for ConTeXt users

2022-12-27 Thread Pablo Rodriguez via ntg-context
On 12/27/22 00:57, Zdeněk Svoboda via ntg-context wrote:
> Hello ConTeXt community!
> [...] 
> I'm excited to share my project with the ConTeXt community and hope that 
> it will be a useful resource for someone. If you're interested in trying 
> it out, you can find it at https://www.context-on-web.eu/. I'd love to 
> hear any feedback or suggestions you have. If you find a bug or 
> encounter an error while using the application, please let me know (and 
> cc: th...@mendelu.cz) the steps you took that caused it.

Hi Zdeněk,

your site is pretty impressive. Congratulations for your awesome work!

It surely will help users, especially the ones new to ConTeXt.

Many thanks for your excellent work,

Pabllo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Help for using fonts Nupuram

2022-12-23 Thread Pablo Rodriguez via ntg-context
On 12/23/22 13:50, Pablo Rodriguez via ntg-context wrote:
> On 12/23/22 12:00, Alain Delmotte via ntg-context wrote:
> Color should be fine. I’m checking what may be wrong with weight.

Alain,

nothing is wrong with weight (https://pdf.ousia.tk/wght.pdf):

  \starttext
\startTEXpage[offset=1em, width=12em]
\dorecurse{20}
  {\definefontfeature[\recurselevel]
[axis={wght={\the\numexpr\recurselevel * 50\relax}},
  colr={\recurselevel}]
   \definedfont[Nupuram-Color.colrv1.otf*\recurselevel]abcde }
\stopTEXpage
  \stoptext

It works fine with LMTX (but not with MkIV [not sure whether this is
intended]).

Just in case it helps,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Help for using fonts Nupuram

2022-12-23 Thread Pablo Rodriguez via ntg-context
On 12/23/22 12:00, Alain Delmotte via ntg-context wrote:
> Hi!
> 
> I am trying to run the example Hans published on the 1st of December
> with a new upload.
> It is about using the variable font Nupuram.

Hi Alain,

you mean https://mailman.ntg.nl/pipermail/ntg-context/2022/107279.html.

> After looking to contextgarden,I tried to put the "Nupuram" sub-folder
> or only the folders with .otf in different places of my context-lmtx
> folder, and using "mtxrun --script font --reload".
> But the example of Hans didn't work.

After installing fonts, I always run:

  mtxrun --scripts cache --erase && mtxrun --generate

This helps to remove all the cache (so it doesn’t interfere with new
features to read fonts [among other things]).

> Then I install the .ttf font files in Windows\fonts; it works, but 1)
> trying to install the Nupuram-VF.ttf, I have the message that
> Nupuram-Regular is already installed; and 2) I get the font in the
> example, but no changes of width or colour.

Install either the variable font or the singular fonts. And also install
OTF or TTF. This prevents clashes with font names.

https://smc.org.in/downloads/fonts/nupuram/Nupuram.zip doesn’t contain
the color version.

https://smc.gitlab.io/fonts/Nupuram/fonts/Nupuram-Color.zip contains it.
From fonts/Nupuram-Color/otf-color/ copy Nupuram-Color.colrv1.otf (to
the directory below).

After having copied the font to texmf-fonts/, run "mtxrun --scripts
cache --erase && mtxrun --generate".

Color should be fine. I’m checking what may be wrong with weight.

> So, now I deleted all the Nupuram everywhere.
> How could I have it fully working under context-lmtx?
> 
> I have different places for fonts in my context-lmtx:
> - texmf-fonts  empty

This is the right directory to copy you fonts. It doesn’t get modified
(so contents won’t be erased after an update).

Other directories aren’t designed to contain user fonts.

I hope it helps now. Happy holiday season,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] xtables regression with LMTX 2022-12-21

2022-12-22 Thread Pablo Rodriguez via ntg-context
On 12/22/22 21:14, Rik Kabel via ntg-context wrote:
> With the latest (2022-12-21) LMTX I see a regression in xtables. The
> following code:
> […]
> The problem appears to be LMTX-specific. (I did not save 2022-12-15 for
> testing, but did not see the problem with that version.)

Hi Rik,

I can confirm that the regression only arises in LMTX and in current
latest. With LMTX from 2022.12.15 18:12, the xtable is fine.

It seems to be related to the replacement of \newdimen and \newcount
with \newdimension and \newinteger (which Hans mentioned in
https://mailman.ntg.nl/pipermail/ntg-context/2022/107452.html).

Just in case it helps,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] move glyph vertically

2022-12-22 Thread Pablo Rodriguez via ntg-context
On 12/22/22 13:18, Hans Hagen via ntg-context wrote:
> On 12/22/2022 12:54 PM, Pablo Rodriguez via ntg-context wrote:
>> […]
>> Could anyone tell me how could I move vertically single glyphs?
>> […]
> 
> so:
> 
> \startluacode
> fonts.handlers.otf.addfeature {
> name = "gpos_test",
> type = "single",
> data = {
>   [ '¿' ] = { 0, 400 },
>   [ '¡' ] = { 0, 400 },
> }
> }
> \stopluacode

Many thanks for your fast reply and help, Hans.

Pablo

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] move glyph vertically

2022-12-22 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \startluacode
   fonts.handlers.otf.addfeature {
   name = "gpos_test",
   type = "single",
   data = {
 [ '¿' ] = 1000,
 [ '¡' ] = 1000,
   }
   }
  \stopluacode
  \definefontfeature[ktest][gpost_tes=yes]

  \starttext
  \startTEXpage[offset=1em]
  \feature[+][gpos_test]
  ¿? ¡!
  \stopTEXpage
  \stoptext

This tries to move vertically the opening question and exclamation
marks, so they are at the same height that its closing counterparts.

I thought there may be a GPOS feature that could achieve this, but I
must admit I have no idea about how to achive it.

In my document, this should only work with the slanted feature.

Could anyone tell me how could I move vertically single glyphs?

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] upload

2022-12-21 Thread Pablo Rodriguez via ntg-context
On 12/21/22 17:20, Hans Hagen via ntg-context wrote:
> [...] 
> Some other possible speedups are on-hold till I have better test cases.

Many thanks for the improvements in the new release, Hans.

I have some documents, but I should be reluctant to send longs, because
I’m almost confident that my code is poorly written (to say the least).

The attachment contains a log for a 72 page document with just text
(from XML sources [XHTML generated by pandoc from Markdown file]).

[Since attachments over 100KB aren’t allowed, only the last two runs are
included in the log file.]

With current latest from today, I get:

mkiv lua stats  > runtime: 2.167 seconds, 72 processed pages, 72 shipped
pages, 33.225 pages/second
mtx-context | purged files: xml-context.log, xml-context.tuc
system  | total runtime: 8.779 seconds of 8.818 seconds

Exactly the same sources with previous latest (from 2022.12.15):

mkiv lua stats  > runtime: 2.410 seconds, 72 processed pages, 72 shipped
pages, 29.877 pages/second
mtx-context | purged files: xml-context.log, xml-context.tuc
system  | total runtime: 9.310 seconds of 9.350 seconds

So, the improvement is clear in current latest.

Many thanks again for the improvement,

Pabloresolvers   | formats | executing runner 'run luametatex format': ~/context/tex/texmf-linux-64/bin/luametatex --jobname="./xml-context.xml" --fmt=~/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=~/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui  --c:currentrun=3 --c:environment="xml-context.tex" --c:fulljobname="./xml-context.xml" --c:input="./xml-context.xml" --c:kindofrun=2 --c:maxnofruns=9 --c:purgeall --c:texmfbinpath="~/context/tex/texmf-linux-64/bin"
structure   > lists > out of order sectionsblocks, maybe use \setsectionblock
structure   > lists > out of order sectionsblocks, maybe use \setsectionblock
structure   > lists > out of order sectionsblocks, maybe use \setsectionblock
structure   > lists > out of order sectionsblocks, maybe use \setsectionblock
system  > 
system  > ConTeXt  ver: 2022.12.21 17:13 LMTX  fmt: 2022.12.21  int: english/english
system  > 
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name '~/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 1, order 1, name '~/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > 'cont-loc.mkxl' loaded
open source > level 1, order 2, name '~/context/tex/texmf-local/cont-loc.mkxl'
close source> level 1, order 2, name '~/context/tex/texmf-local/cont-loc.mkxl'
system  > files > jobname './xml-context', input './xml-context.xml', result './xml-context'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 3, name 'xml-context.tex'
open source > level 2, order 4, name '~/from-pandoc-to-context/pandoc-xhtml.tex'
close source> level 2, order 4, name '~/from-pandoc-to-context/pandoc-xhtml.tex'
colors  > 'rgb' color space is supported
colors  > 'cmyk' color space is supported
fonts   > checks > registering extra script 'auto'
fonts   > bodyfont '15pt' is defined (can better be done global)
fonts   > bodyfont '18pt' is defined (can better be done global)
close source> level 1, order 4, name 'xml-context.tex'
system  > processing as xml: ./xml-context.xml
xml > core > ignoring public entities 'html' as '-//W3C//DTD XHTML 1.0 Transitional//EN' from 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'
structures  > begin of sectionblock 'whatcomesfirst'
structures  > bookmark: [Portada]
structure   > sectioning > hiddentitle @ level 2 : 0.0 -> [Portada]
fonts   > bodyfont '25pt' is defined (can better be done global)
fonts   > bodyfont '30pt' is defined (can better be done global)
fonts   > bodyfont '20pt' is defined (can better be done global)
backend > xmp > using file '~/context/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
pages   > flushing realpage 2, userpage 2, subpage 2
structures  > bookmark: [Título]
structure   > sectioning > hiddentitle @ level 2 : 0.0 -> [Título]
pages   > flushing realpage 3, userpage 3, subpage 3
structures  > bookmark: [Derechos de autor]
structure   > sectioning > hiddentitle @ level 2 : 0.0 -> \xmlflush {main::24}
pages   > flushing realpage 4, userpage 4, subpage 4
structures  > bookmark: [Dedicatoria]
structure   > sectioning > hiddentitle @ level 2 : 0.0 -> \xmlflush {main::29}
pages   > flushing realpage 5, userpage 5, subpage 5
pages   

Re: [NTG-context] save the date: TUG 2023 14–16th of July in Bonn, Germany!

2022-12-21 Thread Pablo Rodriguez via ntg-context
On 12/19/22 20:59, Henning Hraban Ramm via ntg-context wrote:
> Not much more to say, it’s still only announced somewhat inofficially...

Many thanks for the announcement, Hraban.

I’ve just found https://tug.org/tug2023/.

Just in case it might help,

Pablo



___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] issues with variable fonts in latest

2022-12-15 Thread Pablo Rodriguez via ntg-context
On 12/15/22 19:40, Pablo Rodriguez via ntg-context wrote:
> [...]
> No, erased by hand and I attach the output from the just updated latest.
> 
> In red, I attach the results for 'mono=1', 'mono=1, casl=.75' and
> 'crsv=1' (from Inkscape).

Sorry, this attachment includes right results from Inkscape.

Pablo

recursive.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] \setuplanguage[explicitrighthyphenchar=-1] only works for English

2022-12-15 Thread Pablo Rodriguez via ntg-context
Hans,

sorry for insisting again, but I’m still experiencing this issue in
latest current (from less than an hour ago):

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

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

  \definehyphenationfeatures
 [underscore]
 [righthyphenchar="FE000]

  \setuphyphenation[method=traditional]%
  \sethyphenationfeatures[underscore]%
  \setuplanguage
[explicitrighthyphenchar=-1]
  \setupinteractionscreen[option=singlesided]
  \starttext
  \doloopoverlist
{es,en,uk,de,nl,pt,fr,it,deo,da,sv,af,no,nb,pl,cs,sk,hr,sl,fi,et,hu}
  {\mainlanguage[\recursestring]
  \startTEXpage[offset=1em, width=5em]
\hsize\zeropoint
\recursestring: \\
\tt
\hyphenatedword{legibility-legible}
  \stopTEXpage}
  \stoptext

pt, hr and et don’t break the line at the hyphen. af breaks the line at
the hyphen adding an underscore just below the hyphen.

Either I’m missing something extremely basic, or
"\setuplanguage[explicitrighthyphenchar=-1]" only works for English.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] issues with variable fonts in latest

2022-12-15 Thread Pablo Rodriguez via ntg-context
On 12/15/22 17:39, Hans Hagen via ntg-context wrote:
> On 12/15/2022 5:00 PM, Pablo Rodriguez via ntg-context wrote:
>> Dear Hans,
>>
>> since you mentioned current latest (2022.12.09 16:34) regarding to
>> variable fonts today, I have found the following issues with Recursive
>> (comparing it with https://www.recursive.design/#toolbar):
> maybe old font cache content?

No, erased by hand and I attach the output from the just updated latest.

In red, I attach the results for 'mono=1', 'mono=1, casl=.75' and
'crsv=1' (from Inkscape).

Do you get the results in red with latest LMTX?

Many thanks for your help,

Pablo

recursive.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] issues with variable fonts in latest

2022-12-15 Thread Pablo Rodriguez via ntg-context
Dear Hans,

since you mentioned current latest (2022.12.09 16:34) regarding to
variable fonts today, I have found the following issues with Recursive
(comparing it with https://www.recursive.design/#toolbar):

  \definefontfeature[serifa]
[axis={wght=500}]
  \definefontfeature[monor]
[axis={wght=500,mono=1}]
  \definefontfeature[handy]
[axis={wght=500,mono=1,casl=0.75}]
  \definefontfeature[cali]
[axis={wght=500,crsv=1}]
  \definefontfamily[mainface][rm][Recursive]
[features={default, serifa}]
  \definefontfamily[mainface][tt][Recursive]
[features={default, monor}]
  \definefontfamily[mainface][hw][Recursive]
[features={default, handy}]
  \definefontfamily[mainface][cg][Recursive]
[features={default, cali}]
  \setupbodyfont[mainface]
  \starttext
  \startTEXpage[offset=1em]
  \scale[width=\textwidth]
{\rm áéíóúijrf}
  \scale[width=\textwidth]
{\tt áéíóúijrf}
  \scale[width=\textwidth]
{\hw áéíóúijrf}
  \scale[width=\textwidth]
{\cg áéíóúijrf}
  \stopTEXpage
  \stoptext

'mono=1' misplaces the dot in i and j and the accent in i (all to the
left). It also misses bottom lines in i, r and f. And it also misses the
upper left stroke in r.

'crsv=1' gives no alternate glyphs.

I use Recursive for a project and I discovered the issues.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] extra hyphen in underscore hyphenation

2022-12-10 Thread Pablo Rodriguez via ntg-context
On 12/8/22 13:14, Hans Hagen via ntg-context wrote:
> [...] 
> \setuplanguage
>   [explicitrighthyphenchar=-1]

Sorry for insisting, Hans, but many languages (excepting en and uk) seem
nor to recogize this option:

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

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

  \definehyphenationfeatures
 [underscore]
 [righthyphenchar="FE000]

  \setuphyphenation[method=traditional]%
  \sethyphenationfeatures[underscore]%
  \setuplanguage
[explicitrighthyphenchar=-1]
  \setupinteractionscreen[option=singlesided]
  \starttext
  \doloopoverlist
{es,en,uk,de,nl,pt,fr,it,deo,da,sv,af,no,nb,pl,cs,sk,hr,sl,fi,et,hu}
  {\mainlanguage[\recursestring]
  \startTEXpage[offset=1em, width=5em]
\hsize\zeropoint
\recursestring: \\
\tt
\hyphenatedword{legibility-legible}
  \stopTEXpage}
  \stoptext

pt, hr and et don’t break the line at the hyphen. af breaks the line at
the hyphen adding an underscore just below the hyphen.

Either I’m missing something extremely basic, or
"\setuplanguage[explicitrighthyphenchar=-1]" only works for English.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Seems to be a bug with \definelayout

2022-12-10 Thread Pablo Rodriguez via ntg-context
On 12/9/22 21:23, peter.hopcroft--- via ntg-context wrote:
> I’ve rewritten my last email. The context below produces the pdf in
> the screenshot below.
> 
> I expect the layout[short] to be applied to pages 2 and 3. It is. But
> there seem to be 2 bugs:
> 
> 1 - Pages 4, 5 and 6 have the [short] layout. They should have the
> default layout.
> 
> 2 - On pages 5 and 6, the text flows beyond the bottom of the frame.
> It should stop at the bottom of the frame.

Hi Peter,

as in my reply from yesterday, this seems to fix your bugs:

  \showframe
  \setuppapersize[A4][A3,landscape] \setuparranging[2SIDE]
  \setuplayout[backspace=80mm, width=100mm, topspace=50mm, header=0mm,
  footer=0mm, height=200mm, margindistance=10mm, leftmargin=40mm]

  \definelayout[short][backspace=80mm, width=100mm, topspace=50mm,
  header=0mm, footer=0mm, height=80mm, margindistance=10mm,
  leftmargin=40mm]

  \starttext
  \definelayout[even][reset]
  \definelayout[odd][reset]
  \definelayout[2][short]
  \definelayout[3][short]
  \dorecurse{10}{\input{knuth} }
  \stoptext

It seems that you need to reset the layout in all other pages (where the
special layout isn’t applied).

I hope it helps,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] two issues with variable fonts

2022-12-09 Thread Pablo Rodriguez via ntg-context
On 12/6/22 21:07, Henning Hraban Ramm via ntg-context wrote:
> Am 06.12.22 um 19:56 schrieb Pablo Rodriguez via ntg-context:
>> [...]
>> Hi Hraban,
>>
>> I have just added a first draft about variable font usage:
>> https://wiki.contextgarden.net/Variable_Fonts.
>>
>> Would you be so kind to improve it?
> 
> As I wrote: I never used variable fonts.
> While it would be interesting to try, I’ll hardly find time until new
> year.
Sorry, Hraban, I totally misread your message.

Now I realize that my original message doesn’t make sense.

Sorry for the noise and the inconveniences.

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] \definelayout[pagenumber][layout] behaving strangely

2022-12-09 Thread Pablo Rodriguez via ntg-context
On 12/9/22 05:42, peter.hopcroft--- via ntg-context wrote:
> The pdf from the tex below looks wrong to me, screenshot attached.
> It’s always like this when the page number in the second
> \definelayout is 1 more than the page number in the first. For other
> pairs of numbers, it behaves like I expect: the short layout is only
> on those 2 pages.
Hi Peter,

I must confess it isn’t totally clear to me whether I’m getting your point.

The following might achieve what you intend:

  \definelayout[odd][reset]
  \definelayout[even][reset]
  \definelayout[2][short]
  \definelayout[3][short]

Just in case it might help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] extra hyphen in underscore hyphenation

2022-12-08 Thread Pablo Rodriguez via ntg-context
On 12/8/22 13:14, Hans Hagen via ntg-context wrote:
> On 12/8/2022 12:33 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> What am I missing here?
> 
> \setuplanguage
>   [explicitrighthyphenchar=-1]

Many thanks for your fast reply, Hans.

I’m afraid it doesn’t work here:

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

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

  \definehyphenationfeatures
 [underscore]
 [righthyphenchar="FE000]

  \setuphyphenation[method=traditional]%
  \sethyphenationfeatures[underscore]%
  \setuplanguage
[explicitrighthyphenchar=-1]
  \mainlanguage[es]
  \starttext
  \startTEXpage[offset=1em, width=4em]
\hsize\zeropoint\tt
\hyphenatedword{legibility-legible}
  \stopTEXpage
  \stoptext

Results are the same with "\mainlanguage[es]" or "\mainlanguage[nl]".

If "\mainlanguage" is placed after "\setuplanguage", the extra unwanted
hyphen appears.

If "\mainlanguage" is placed before "\setuplanguage", hyphenation for
the second word doesn’t work at all (and the extra unwanted hyphen
appears in my actual document).

I don’t know what I’m missing here and it seems to be a picky issue to
provide a MWE.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] extra hyphen in underscore hyphenation

2022-12-08 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

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

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

  \definehyphenationfeatures
 [underscore]
 [righthyphenchar="FE000]

  \sethyphenationfeatures[underscore]%
  \setuphyphenation[method=traditional]%

  \starttext
  \startTEXpage[offset=1em, width=4em]
\hsize\zeropoint\tt
\hyphenatedword{legibility-legible}
  \stopTEXpage
  \stoptext

In current latest (and in many versions before), I get an extra hyphen
in the next line after the hyphen, such as:

   ity-
   -leg

As far as I can remember, I would say this used to work before (no extra
hyphen was added in the next line.

What am I missing here?

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] two issues with variable fonts

2022-12-06 Thread Pablo Rodriguez via ntg-context
On 12/4/22 22:16, Henning Hraban Ramm via ntg-context wrote:
> [...]
> An increasing number of fonts in the Google repository is (becoming) 
> variable. So far, I only used the additionally provided fixed versions...

Hi Hraban,

I have just added a first draft about variable font usage:
https://wiki.contextgarden.net/Variable_Fonts.

Would you be so kind to improve it?

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] two issues with variable fonts

2022-12-06 Thread Pablo Rodriguez via ntg-context
On 12/4/22 11:53, Hans Hagen via ntg-context wrote:
> [...]
> assuming that i can motivate myself (read: the fonts look nice) i can 
> probably sort out all the side effects

Many thanks for the fixes in the new beta, Hans.

> i'll check if we can deal with tags instead of names as not all fonts 
> have nice names for the axis defined (which might be why one ends up 
> with all these predefined instances)

Many thanks to for allowing tag values for using axes.

Pablo

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] How to display the pages of a particular section in another PDF?

2022-12-06 Thread Pablo Rodriguez via ntg-context
On 12/6/22 09:05, Hans Hagen via ntg-context wrote:
> On 12/6/2022 1:39 AM, Joel wrote:
>> Thanks so much! It took some work for me to figure out how to make it 
>> work, but it now works great!
> i added \firstsectionpage and \lastsectionpage that (i guess) Pablo will 
> document at the wiki

Many thanks for the implementation, Hans.

https://wiki.contextgarden.net/Including_pages_from_PDF_documents
contains the new information (please, Joel, could you check whether the
explanation is clear?).

But I’m afraid I’m seeing a potential problem here, if the source PDF is
doublesided, \lastsectionpage from a reference may be an empty page.

Many thanks for your help,

Pablo

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] TEXpage cropping math

2022-12-05 Thread Pablo Rodriguez via ntg-context
On 12/5/22 13:42, Mikael Sundqvist via ntg-context wrote:
> Hi,
> 
> One usually need an offset.

... or even none (which seems to work in this case):

  \startTEXpage[offset=none]
$E_1$
  \stopTEXpage

Just in case it might help,

Pablo

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] How to display the pages of a particular section in another PDF?

2022-12-05 Thread Pablo Rodriguez via ntg-context
On 12/5/22 18:30, Hans Hagen via ntg-context wrote:
> On 12/5/2022 5:39 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> it would be great to have something like:
>>
>>\loadsection  [1] [2] [3]
>> [...]
> that is not flexible ... we're talking about a rather special 
> application, so what I can add is a simple helper that returns the first 
> and last page of a section

That would be great for me.

> keep in mind that it is also a biut fragile as one never know where the 
> last one ends

I wondered whether \doifreference{\lastsectionpage[file][reference]}
would make sense here, but this would probably be a way of unnecesarily
complicating things...

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] How to display the pages of a particular section in another PDF?

2022-12-05 Thread Pablo Rodriguez via ntg-context
On 12/5/22 13:13, Hans Hagen via ntg-context wrote:
> On 12/4/2022 11:30 PM, Joel via ntg-context wrote:
>> I can use this code to display page 5 from a PDF:
>> [...]
>> \externalfigure[filename.pdf][section=17A]
>
> prototype attached (first process crap, then load)

Hi Hans,

it would be great to have something like:

  \loadsection  [1] [2] [3]

  1 FILE
  2 REFERENCE
  3 inherits from \setupexternalfigure

Just in case it may be relevant to the discussion.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] issue with OT feature in LMTX

2022-12-04 Thread Pablo Rodriguez via ntg-context
On 12/4/22 13:34, Hans Hagen via ntg-context wrote:
> On 12/3/2022 2:04 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> Am I missing something or have I hit a bug in LMTX?
> more a bug in your approach: you specify a range where you also 
> overwrite private slots (that happen to be used for caps)  .. at t he 
> cost of runtime i'll add a check against overwriting these

Many thanks for the fix, Hans.

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] two issues with variable fonts

2022-12-04 Thread Pablo Rodriguez via ntg-context
On 12/4/22 11:53, Hans Hagen via ntg-context wrote:
>> [...]
> i'll check if we can deal with tags instead of names as not all fonts 
> have nice names for the axis defined (which might be why one ends up 
> with all these predefined instances)

Many thanks for your reply, Hans.

Tags instead of names seems more consistent to me. At least when
comparing it with OpenType features. And I think that "optical size" was
the first key I see containing a space.

Many thank sfor your help,

Pablo

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] issue with OT feature in LMTX

2022-12-03 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample (using current latest from 2022.12.01 13:05):

  \definefallbackfamily[mainface][rm][Noto Emoji]
[range={0x1F004-0xFE837}, force=yes]
  \definefontfamily[mainface][rm][TeX Gyre Pagella]
  \setupbodyfont[mainface]

  \definestructureconversionset
  [sectionnumbers]
  [0,n,Characters,g,n]
  [n]

  \definefontfeature[section]
[smcp=yes,
 c2sc=yes]

  \setupheads[sectionconversionset=sectionnumbers]

  \setuphead[section][style={\feature[+][section]}]

  \starttext
  \section{Just text}
  {\feature[+][section]Just text}
  \stoptext

LMTX outputs no small caps and it fallbacks to Noto Emoji. LuaTeX gives
the right output.

Am I missing something or have I hit a bug in LMTX?

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] two issues with variable fonts

2022-12-03 Thread Pablo Rodriguez via ntg-context
On 12/3/22 01:01, Hans Hagen via ntg-context wrote:
> On 12/2/2022 8:17 PM, Hans Hagen via ntg-context wrote:
> 
>>> Also in the last instances (at least, pages 19 to 25), kerning or
>>> interletter spacing clearly needs to be improved.
>> no clue (ok, a little)
> sort of fixed but no upload yet (probably next week)

Many thanks for all your fixes, Hans.

BTW, using https://github.com/googlefonts/amstelvar/tree/main/fonts with
the following source:

  \usemodule[fonts-variable]
  \starttext
\showfontvariations[font=file:Amstelvar-Roman.ttf]
\showfontvariations[font=file:Amstelvar-Italic.ttf]
  \stoptext

Font is missing in instances from pages 4, 8-11 (regular font) and 21-23
(italic font).

Glyphs seem wrong on pages 12-13 (regular font) and interletter spacing
is clearly not right in the instance from pages 24-25.

I don’t know whether this has already been fixed with your improvements
yesterday.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] accessing ital axis in variable font

2022-12-03 Thread Pablo Rodriguez via ntg-context
On 12/2/22 19:18, Hans Hagen via ntg-context wrote:
> On 12/2/2022 6:20 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> But I’m afraid I cannot use weight (when invoked as 'wght'). Optical
>> sizes don’t seem to work.
>>
>> What am I missing here?
>
> \definefontfeature[myaxisa][axis={weight=200,optical size=12}]
> \definefontfeature[myaxisb][axis={weight=200,optical size=42}]
> \definefontfeature[myaxisc][axis={weight=200,optical size=72}]

Many thanks for your reply, Hans.

In order to be able to start an entry in the wiki about variable fonts,
axes are only accesible using their name (not their tag) in the axis
section (not in the design axis section), aren't they?

And each font feature requires a new font instance (unlike other font
features such as small caps or many other OpenType features), doesn't it?

> btw, we don't check for optical size in relation to the asked size anyway

I don't know whether this is too complex to be implemented, but it would
ease the use of optical sizes in this case.

Many thanks for your help,

Pablo

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] two issues with variable fonts

2022-12-02 Thread Pablo Rodriguez via ntg-context
Hi Hans,

I have two issues with variable fonts (using current latest from yesterday):

1. Using the following sample:

 \usemodule[fonts-variable]
 \starttext
  \showfontvariations[font=file:grenze.ttf]
 \stoptext

With the fonts from
https://github.com/Omnibus-Type/Grenze/tree/master/fonts-/gx, I get the
following error message:

lua error:
  run callback [6]:
...ext/tex/texmf-context/tex/context/base/mkxl/lpdf-emb.lmt:84: number
(local 'n') has no integer representation
stack traceback:
   ...base/mkxl/lpdf-emb.lmt:84: in upvalue 'tocardinal2'
   ...base/mkxl/lpdf-emb.lmt:771: in local 'writer'
   ...base/mkxl/lpdf-emb.lmt:2358: in field 'integer index'
   ...base/mkxl/lpdf-ini.lmt:828: in upvalue 'run'
   ...base/mkxl/lpdf-ini.lmt:859: in field 'finalizedocument'
   ...base/mkxl/lpdf-lmt.lmt:3413: in field '?'
   ...base/mkxl/luat-run.lmt:58: in function
 <...ext/tex/texmf-context/tex/context/base/mkxl/luat-run.lmt:56>   


mtx-context | fatal error: return code: 1

This crashes LuaMetaTeX but not LuaTeX.

2. The other font is Recursive
(https://github.com/arrowtype/recursive/tree/main/fonts/recursive_for_googlefonts).

 \usemodule[fonts-variable]
 \starttext
  \showfontvariations[font=file:recursive.ttf]
 \stoptext

There are some some instances (in pages 4 to 14) that don’t have the
font (only Latin Modern Roman).

Also in the last instances (at least, pages 19 to 25), kerning or
interletter spacing clearly needs to be improved.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] accessing ital axis in variable font

2022-12-02 Thread Pablo Rodriguez via ntg-context
On 12/1/22 21:44, Hans Hagen via ntg-context wrote:
> On 12/1/2022 7:54 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> As explained before, they don’t work for me. How can I access to the
>> italic and the optical size axes?
>
> there is no axis defined for italic (it's a design axis so that's 
> probably why you have two fonts one with italic in the name)
> 
> so, just forget about it

Many thanks for your reply, Hans.

It seems that Literata has what they call an upright italic
(https://raw.githubusercontent.com/googlefonts/literata/main/Documentation/DS_Literata3.pdf#search=upright).

But I’m afraid I cannot use weight (when invoked as 'wght'). Optical
sizes don’t seem to work.

The following code shows the issue I’m experiencing:

  \definefontfeature[myaxis][axis={wght=100, opsz=1.0}]
  \definefontfamily[mainface][rm][Literata]
[features={default, myaxis}, designsize=auto]
  \setupbodyfont[mainface]
  \starttext
  \scale[width=\textwidth]
{\switchtobodyfont[7pt]\tf Regular, \it Italic}
  \scale[width=\textwidth]
{\switchtobodyfont[12pt]\tf Regular, \it Italic}
  \scale[width=\textwidth]
{\switchtobodyfont[36pt]\tf Regular, \it Italic}
  \scale[width=\textwidth]
{\switchtobodyfont[72pt]\tf Regular, \it Italic}
  \stoptext

What am I missing here?

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] accessing ital axis in variable font

2022-12-01 Thread Pablo Rodriguez via ntg-context
Dear list,

using the Literata variable fonts from
https://github.com/googlefonts/literata/tree/main/fonts/variable, I have
the following source:

  \definefontfeature[myaxis][axis={weight=500, italic=1}]
  \definefontfamily[mainface][rm][Literata][features={default, myaxis}]
  \setupbodyfont[mainface]
  \starttext
  \input zapf\par
  \it\input zapf
  \stoptext

Other axes than weight (and only when not invoked as 'wght') don’t work
for me (using latest from 2022.12.01 13:05).

I have used the following source (it seems to be a goodie from current
latest):

 \usemodule[fonts-variable]
 \starttext
  \showfontvariations[font=file:literata-italic.ttf]
  \showfontvariations[font=file:literata.ttf]
 \stoptext

It reports that the Literata fonts have three (design) axes: wght, opsz
and ital. ital is only a design axis.

As explained before, they don’t work for me. How can I access to the
italic and the optical size axes?

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Do environment files add implicit \starttext ... \stopttext

2022-11-18 Thread Pablo Rodriguez via ntg-context
On 11/18/22 15:52, Wolfgang Schuster via ntg-context wrote:
> Pablo Rodriguez via ntg-context schrieb am 15.11.2022 um 16:06:
>> [...]
>> It looks like when --environment is used, ConTeXt assumes that the main
>> source only contains text. Which makes sense (at least, to me).
> 
> The reason why this does work has nothing to do with the environment
> file, the only  thing which is responsible to get a PDF with output
> is the \setupbodyfont line.

Many thanks for your explanation, Wolfgang.

Now it is perfectly clear to me why this worked.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Do environment files add implicit \starttext ... \stopttext

2022-11-15 Thread Pablo Rodriguez via ntg-context
On 11/15/22 13:22, Denis Maier via ntg-context wrote:
> Hi,
> 
> if I process an XML buffer, I’ve noticed I need to wrap the
> \xmlprocessbuffer in a \starttext ... \stoptext pair.
> []
> However, if I have the XML and the setups in dedicated files, there
> seems to be no need for \starttext ... \stoptext.
> [] 
> Therefore my question:
> 
> Does the use –environment automatically wrap the processed file in
> \starttext ... stoptext ?

Hi Denis,

try a source file with this contents:

  \ConTeXt\ is great.

with the following environment:

  \setuppapersize[A6]
  \setupbodyfont[pagella]

It looks like when --environment is used, ConTeXt assumes that the main
source only contains text. Which makes sense (at least, to me).

Just in case it might help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new upload

2022-11-15 Thread Pablo Rodriguez via ntg-context
On 11/14/22 23:02, Hans Hagen via ntg-context wrote:
> Hi,
> 
> I uploaded a new version.

Hi Hans,

many thanks for the new upload.

Now it is updated fine in my rather weird Windows system (at work).

Many thanks for the new version again,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] \xmldocument vs #1 in \xmlsetsetup

2022-11-14 Thread Pablo Rodriguez via ntg-context
On 11/14/22 14:00, Denis Maier via ntg-context wrote:
> Hi,
> 
> most examples in the mkiv-xml manual use #1 with \xmlsetsetup, e.g.
> 
> \startxmlsetups xml:demo:base
>   \xmlsetsetup{#1}{document|section|p}{xml:demo:*}
> \stopxmlsetups
> 
> However, in quite a few occasions I’ve noticed the usage of \xmldocument
> instead of #1.
> 
> What exactly is the difference ?

Hi Denis,

I have just found the following explanation
(https://www.pragma-ade.com/general/manuals/xml-mkiv.pdf#search=xmlself):

  The macro \xmldocument expands to the current document id. There is
  also \xmlself which expands to the current node number (#1 in setups).

Now I think that I have abused \xmldocument too much, since I should
have used #1. But I’m afraid I haven’t got much different results.

I must also confess that a proper explanation would be helpful (to me in
order) to understsand when \xmldocument should not be used.

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Page break with placement of a figure at the bottom of the page

2022-11-13 Thread Pablo Rodriguez via ntg-context
On 11/13/22 11:32, Fabrice Couvreur via ntg-context wrote:
> Hi Pablo,
> Indeed but I posted these two files in a previous post.

Hi Fabrice,

the output from your ie_3.tex is too big for the list, so
https://pdf.ousia.tk/ie_3.pdf contains it.

I see no problem there, but I think that the output from
https://mailman.ntg.nl/pipermail/ntg-context/2022/107191.html may come
from a different source.

BTW, I couldn’t find "ie_3.tex" in
https://mailman.ntg.nl/pipermail/ntg-context/2022.txt.gz (which seems to
be generated with messages previous to current date).

If you sent the files before, it is fine to include a link to the
relevant message in the list (such as the first link included in this
message).

BTW, it might be worth considering a GitHub or GitLab repository for not
minimal samples. There files may be stored (and the whole repository
might be deleted when not needed).

I hope it helps,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Page break with placement of a figure at the bottom of the page

2022-11-13 Thread Pablo Rodriguez via ntg-context
On 11/12/22 15:09, Fabrice Couvreur via ntg-context wrote:
> Hi Pablo and Bruce,
> Please try to figure out what is not working.
> I'm sorry but I forgot in my previous post files.

Hi Fabrice,

I get empty files when compiling premiere-modules.tex and
premiere-macros.tex and error message with tikz-style.tex.

I guess a fourth file invoking the other three files may be missing here.

Pablo

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Page break with placement of a figure at the bottom of the page

2022-11-12 Thread Pablo Rodriguez via ntg-context
On 11/11/22 21:58, Bruce Horrocks via ntg-context wrote:
>> On 10 Nov 2022, at 17:06, Fabrice Couvreur via ntg-context wrote:
>>
>> Hi,
>> Sorry to come back to you, but it seems to me that there is enough space 
>> here.
>> Fabrice
> 
> For some reason your PNG images came through in extremely low
> resolution. Without having the ConTeXt source it's hard to say for sure
> what's happening - for example, I would have expected the text on the
> second page to be at the bottom of the first even if there wasn't room
> for the image - because that was what was happening in your first example.

Hi Fabrice and Bruce,

I agree that the source would be helpful to say what may be hard for
ConTeXt.

In any case, ConTeXt has a hard time with pagebreaks when you combine
elements that need both horizontal and vertical calculation, such as in:

  \starttext
  \dorecurse{64}
  {\input knuth\footnote{\input zapf}

  \startitemize[a, columns, eight, packed]
  \dorecurse{64}{\item\currentitemnumber}
  \stopitemize}
  \stoptext

There is a similar issue with paragraph notes.

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Page break with placement of a figure at the bottom of the page

2022-11-09 Thread Pablo Rodriguez via ntg-context
On 11/9/22 17:51, Fabrice Couvreur via ntg-context wrote:
> Hi,
> I find that for some time (but maybe the problem comes from me !), the
> placement of a figure at the bottom of the page causes a page break when
> it seems to me that there is enough space, which poses some problems in
> the pagination of my documents.

Hi Fabrice,

your figure requires about 7¼ lines (one line before, six for the image
itself, and some extra space after it).

Your layout for the first page only allows 43 lines and sample text ends
on line 37.

Replace \showframe with \showgrid and you will see that there might be
not enough space to fit the image in the first page.

Add "bottomspace=7.25mm" to the layout for the first page and the image
will fit in the first page.

Just in case it might help,

Pablo

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] \jobname and \doifelse

2022-11-06 Thread Pablo Rodriguez via ntg-context
On 11/6/22 11:21, Hans Hagen via ntg-context wrote:
> [...]
> More relevan tis that you'r on TeX where catcodes matter
> (here letter vs other)
> 
>\doifelse{\inputfilebarename}{oeps}
>  {yes}{no}
> 
>\doifelse{\detokenize\expandafter{\jobname}}{\detokenize{oeps}}
>  {yes}{no}

Many thanks for your explanation, Hans.

I think I have to start studying basic notions in TeX.

Many thanks for your help again,

Pablo

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] \jobname and \doifelse

2022-11-06 Thread Pablo Rodriguez via ntg-context
On 11/5/22 16:55, Wolfgang Schuster via ntg-context wrote:
> Pablo Rodriguez via ntg-context schrieb am 05.11.2022 um 16:30:
>>
>>\doifelse{\jobname}{a}
>>  {yes}{no}
>>
>> I get "no" as in TeX and "yes" with Lua, being "a.tex" the source file.
>>
>> The TeX conditional used to work before.
>>
> Are you sure the check worked in the past?

Many thanks for your reply, Wolfgang.

I thought this used to work before.

Now I realize I have to check the use of \doif{\jobname} and
\doifelse{\jobname} in all my documents.

> The content of \jobname has catcode 12 while you "a" you check against 
> has catcode 11, and even when \jobname result in "a" they are different 
> because the catcodes differ.

I see now. Not that I fully understand what catcodes are, but
\doifsamestringelse should be what I have used here (as suggested in
https://wiki.contextgarden.net/System_Macros/Branches_and_Decisions#.5Cdoifsamestringelse.2C.5Cdoifsamestring.2C.5Cdoifnotsamestring).

Just a final question: \doif compares both strings and catcodes and
\doifsamestring compares only strings. Or am I missing something here too.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] \jobname and \doifelse

2022-11-05 Thread Pablo Rodriguez via ntg-context
Dear list,

using current latest (2022.10.22 11:23), I have the following sample:

  \starttext
  \doifelse{\jobname}{a}
{yes}{no}
  \jobname

  \startluacode
  if tex.jobname == "a" then
context("yes")
  else
context("no")
  end
  \stopluacode
  \stoptext

I get "no" as in TeX and "yes" with Lua, being "a.tex" the source file.

The TeX conditional used to work before.

Am I missing something or have I hit a bug?

I’m on Linux64 (if this may be relevant).

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] How to make a row of text have vertical centering in tabulate environment?

2022-10-25 Thread Pablo Rodriguez via ntg-context
On 10/25/22 02:35, Joel via ntg-context wrote:
> I have a simple tabulate environment like this:
> [...]
> I'd like to vertically center the content in the one marked row. By
> default, they seem to place each cell aligned to the top, but how can I
> adjust them vertically so the text is vertically centered just in
> specific rows?

Hi Joel,

I have no experience with tabulates, but I wouldn’t be surprised if they
didn’t support vertical alignment.

You can achieve that with xtables:

  \starttext
  \startxtable[frame=off, option={stretch, width}]
\startxrow[topframe=on, bottomframe=on]
  \startxcell[nx=2]
Cause
  \stopxcell
  \startxcell
Effect
  \stopxcell
\stopxrow
\startxrow[bottomframe=on]
\startxcell[width=.45\textwidth,  align=lohi]
text a
  \stopxcell
  \startxcell[width=.1\textwidth,  align=lohi]
text b
  \stopxcell
  \startxcell[width=.45\textwidth, align=center]
\input knuth
  \stopxcell
\stopxrow
  \stopxtable
  \stoptext

xtables-mkiv.pdf contains all the details.

Just in case it might help,

Pablo

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] never add a hyphen to break a URL

2022-10-25 Thread Pablo Rodriguez via ntg-context
On 10/25/22 12:11, Steffen Wolfrum via ntg-context wrote:
> [...]
> …. strange, on my machine your example doesn't open the link.
>
> Please have a look here: only the last one («works …») opens the link. Why?

URIs only accept letters belonging to the US-ASCII
(https://datatracker.ietf.org/doc/html/rfc3986#section-2.3).

Other ones (such as "ö") have to be escaped. This is why only the sample
containing the escaped "ö" (as "%C3%B6" [which TeX needs to escape
again]) worked for you.

It seems that depending on the PDF viewer (and I guess the browser),
unescaped chars in URIs are a must or not.

I’m using Evince and SumatraPDF (with Wine). Firefox opens the links
fine (even using its internal viewer).

Maybe Acrobat is more picky when passing unescaped chars in URIs.

I hope it might help,

Pablo

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] never add a hyphen to break a URL

2022-10-24 Thread Pablo Rodriguez via ntg-context
On 10/24/22 18:54, Steffen Wolfrum via ntg-context wrote:
> Hi,
>
> according to the Chicago Manual of Style we should «never add a hyphen to 
> break a URL»:
>
> (https://www.chicagomanualofstyle.org/qanda/data/faq/topics/URLs/faq0008.html)

Hi Steffen,

I think this is not even a question of style.

myhouse.com and my-house.com are different domains.

> Is there a switch to forbid \useURL adding hyphens?

\hyphenatedurl{} is the way to go. Although you add a hyphen (and a
blank space [spaces as part of urls need to be escaped) to your url.

I would also enclose the url inside \startasciimode...\stopasciimode to
avoid escaping the percent sign.

The percent sign has to be escaped as \letterpercent (otherwise, you get
\%) in text.

A simpler approach would read (there is a single url, instead of two
[less typos in the end]):

\setupinteraction[state=start]

\starttext

\def\MyURL[#1]{\goto{\tt\hyphenatedurl{#1}}[url(#1)]}

\MyURL[https://litteraturbanken.se/författare/CollijnI/titlar/ActaEtProcessusCanon/sida/614/faksimil?show_search_work&s_query=retractata&s_lbworkid=lb487378&s_mediatype=faksimil&s_word_form_only]
\stoptext

But https://wiki.contextgarden.net/URL has more info.

Just in case it might help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Fwd: Hyphenation in multi-language projects

2022-10-24 Thread Pablo Rodriguez via ntg-context
On 10/24/22 17:09, Hans Hagen via ntg-context wrote:
>> [...]
>> Hans, is there any news regarding Pablos wish?
> no, because I'm in a different tex mode ...

Steffen,

meanwhile, a way of crappy cheating...

  \setuphyphenation[method=traditional]
  \doloopoverlist{en,nl,de,es,it,fr,da,fi}
{\registerhyphenationexception[\recursestring][Joha-nnes]}
  \starttext
  \startTEXpage[offset=1em]
  \hyphenatedword{Johannes}\\
  \nl \hyphenatedword{Johannes}\\
  \de \hyphenatedword{Johannes}\\
  \es \hyphenatedword{Johannes}\\
  \language[it] \hyphenatedword{Johannes}\\
  \language[fi] \hyphenatedword{Johannes}\\
  \fr \hyphenatedword{Johannes}\\
  \da \hyphenatedword{Johannes}\\
  \stopTEXpage
  \stoptext

Ugly code, but it might do the trick in some scenarios.

Just in case it might work,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] issue with variable font

2022-10-23 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample (using current latest from 22022.10.22 11:23):

  \definefontfeature
[book]
[axis={weight=700}]
  \definefontfamily[mainface][rm]
[Commissioner][features={default, book}]
  \setupbodyfont[mainface, 25pt]
  \starttext
  \startTEXpage[offset=1ex, align=center]
  EFT ΕΘΞ

  \blank[quarterline]
  \dontleavehmode
  \externalfigure[commissioner][width=.25\textwidth]
  \stopTEXpage
  \stoptext

The external figure is the output from Inkscape 1.1.2. I attach the
generated PDF document from the source above.

The variable font from Commissioner can be downloaded from
https://github.com/kosbarts/Commissioner/releases/download/1.000/Commissioner_1.000.zip.

ConTeXt seems to misread the font strokes (paths [or whatever the right
name might be]), since Inkscape has no problems with it.

Could anyone be so kind to confirm the issue?

Many thanks for your help,

Pablo


a.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Setting the size of \small

2022-10-21 Thread Pablo Rodriguez via ntg-context
On 10/21/22 00:59, Leah Neukirchen via ntg-context wrote:
> Hi,
>
> playing around with \definebodyfontenvironment with latest LMTX,
> I found this possibly buggy behavior:
>
> \definebodyfontenvironment[12pt][small=6pt] % x=6pt works here
> \setupbodyfont[12pt]
> \starttext
> normal {\tx tx} {\small small}
> \stoptext
>
> With \definebodyfontenvironment[12pt][x=6pt] I can resize \tx fine,
> but for \small it doesn't work.

Hi Leah,

I don’t know whether it may be a bug, but this works:

  \definebodyfont[12pt]
  \definebodyfontenvironment[12pt][small=100pt, x=100pt]
  \setupbodyfont[12pt]
  \starttext
  normal {\tx tx} {\small small}
  \stoptext

It might be that \small could be hardcoded by default.

Sorry for changing sizes, but I wanted to know for sure it was working.

Just in case it might help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] \showstruts displaces text in LMTX

2022-10-19 Thread Pablo Rodriguez via ntg-context
Dear list,

compiling the following sample with current latest (2022.10.15 10:37):

  \showframe
  \showstruts
  \setuppapersize[A6]
  \setupnotation[footnote]
[alternative=serried]
  \starttext
   a\footnote{\input zapf}
  \stoptext

I get the text in the footnote is displaced. It only happens with LMTX
(not with MkIV) and not with previous latest.

Could anyone confirm the issue?

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Suboptimal German hyphenation

2022-10-19 Thread Pablo Rodriguez via ntg-context
On 10/19/22 16:47, Leah Neukirchen via ntg-context wrote:
>> [...]
>> Many prefixes have two letters, so changing the default may be
>> reasonable.  But there are more experienced German typographers on
>> this list who can chime in.
>
> After some research, I found the recommendation in
> Forssman, de Jong: Detailtypografie (4. Aufl, 2008, S. 124f.) to
> use 2/3 for German justified texts, and 3/4 to 5/5 for ragged text.
> They also recommend to never hyphenate words with 5 letters, not sure
> that can be encoded.

Hi Leah,

Hans added hyphenmin some time ago:

  \setuplanguage[de][lefthyphenmin=2, righthyphenmin=3, hyphenmin=6]
  \setuplanguage[deo][lefthyphenmin=2, righthyphenmin=3, hyphenmin=5]
  \mainlanguage[de]
  \starttext
  \startTEXpage[offset=1em]
  \hyphenatedword{davon}
  \deo\hyphenatedword{davon}
  \stopTEXpage
  \stoptext

It is technically on the wiki, but it lacks proper “wikification”.

I hope it helps,

Pablo

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new upload

2022-10-18 Thread Pablo Rodriguez via ntg-context
On 10/17/22 22:40, Hans Hagen via ntg-context wrote:
> On 10/17/2022 7:12 PM, Pablo Rodriguez via ntg-context wrote:
>> […]
>> The problem is clearly not the speed of the internet connection. I use
>> internet with the standard speed.
>>
>> There are two things that strike me as possible causes.
>> […]
> so then just do a complete install

Many thanks for your reply, Hans.

A complete install has revealed the real cause of the slow download: the
antivirus software (that works like crap).

The time that I thought it was downloading each single file, it was
really analyzing it.

Even worse, when the AV software didn’t like the contents of the file,
it saved an empty file (I have seen it with text and PDF documents).

I had a backup copy, so it updated it (manually) with what a new install
for Win64 (which I got in Linux64).

>> 2. The whole download is http instead of https.
>
> sure, but if you have the curl(lib) installed in principle one could do
> a secure install (I didn't really test it but it's in there)

curl is installed in both Linux and Windows (and there was no secure
install on any of them).

And according to lines 634-640 from mtx-install.lua, if curl isn’t
installed, the installation script should quit:

  if environment.argument("secure") then
usecurl = checkcurl()
if not usecurl then
  report("no curl installed, quitting")
  os.exit()
end
  end

Or what am I missing here?

>> Is there anything that I could to to improve the download process?
> If per-file is slow at you end you can try to just install the whole lot
> (just delete the tex tree or at least the tma file that stores the
> hashes) because then the zip is downloaded and installed (one fetch).

Many thanks for your suggestion, since it helped to discover the real
cause of the non-working update.

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new upload

2022-10-17 Thread Pablo Rodriguez via ntg-context
On 10/15/22 11:28, Hans Hagen via ntg-context wrote:
> […]
> just run twice as the script will pick up

Hi Hans,

I have tried updating ConTeXt in Windows this morning and I’m afraid it
hasn't worked.

Until I can manage this, I think I will download (to the extend that is
possible [and if this works at all]) a Win64 distribution using Linux64
with "--platform=win64".

The problem is clearly not the speed of the internet connection. I use
internet with the standard speed.

There are two things that strike me as possible causes.

1. Depending of which update is pending, the script announces a
different number of files to be downloaded.

The problem is that each individual file download seems to require a
complete connection.

I mean, it takes about ten seconds to establish a connection for each
file. It is irrelevant how big the file actually is.

After that, it isn’t much harder to download the LMTX binary than a tiny
text file.

For most files, they aren’t downloaded in the first connection (they may
require more than three downloads). It doesn’t seem to depend on size.

This is what makes it hard to reach even 10% in the download.

And even if some files may have been downloaded, once the script quits,
the already downloaded files need to be downloaded again (since the main
download process wasn’t completed).

2. The whole download is http instead of https.

Sorry, but this may be causing the delay in the connections (because
they may be being filtered by the company proxy [and I don’t want to ask]).

https://lmtx.pragma-ade.nl seems to be the only source used (in Windows)
and its certificate is only valid for lmtx.pragma-ade.com (according to
Firefox).

Even using "./install.sh --secure --platform=win64" (I’m on Linux now,
no Windows here), I get:

mtx-install | instance : install-lmtx
mtx-install | platform : windows
mtx-install | system   : unix
mtx-install | fetching
'http://lmtx.pragma-ade.com/install-lmtx//texmf.zip'
 […]
mtx-install | fetching
'http://lmtx.pragma-ade.com/install-lmtx//texmf-context.zip'

I don’t know whether this is a bug or it is intended.

BTW, "local function checkurl()" on line 52 of mtx-install.lua ends with:

  and find(s,"rotocols")

I think it might read (although this doesn’t seem to change anything in
my case):

  and find(s,"protocols")

Is there anything that I could to to improve the download process?

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] debugging lmtx and firefox (was: TeXGyre Heros on Firefox)

2022-10-16 Thread Pablo Rodriguez via ntg-context
On 7/25/22 14:00, juh+ntg-context--- via ntg-context wrote:
> [...]
> They hint to LuaMetaTex as the cause of the problem. You can follow the
> discussion here.
>
> https://bugzilla.mozilla.org/show_bug.cgi?id=1781022

Hi juh,

this should have been fixed in current latest. So I think it may be safe
to close the issue.

Sorry, but I cannot access to my Mozilla account temporarily (and I
think you may close your issue without having to ask administrators).

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] list not following "focus=standard"

2022-10-16 Thread Pablo Rodriguez via ntg-context
On 10/16/22 13:28, Pablo Rodriguez via ntg-context wrote:
> [...]
> So, line 40 of that file ("local cheat = true") needs a conditional that
> I’m not able to provide (I have no idea how it would read).
>
> Basically, if \setupinteraction[focus=standard], please don’t cheat 😅.

Or even more accurate, cheat only if focus in \setupinteraction is fit
or tight (other options include positions inside pages).

Pab

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] list not following "focus=standard"

2022-10-16 Thread Pablo Rodriguez via ntg-context
On 10/14/22 23:24, Pablo Rodriguez via ntg-context wrote:
> Hi Hans,
>
> I have the following sample:
>
>   \setupinteraction[state=start,
> focus=standard]
>   \starttext
>   \completecontent
>   \section{section}
>   a\footnote{\contextversion}
>   \stoptext

Hans,

I have found the cause of the misbehavior in strc-lst.lua, lines 898-903:

if cheat and references then
-- this permits runs=2 with interactivity
local internal = references.internal
usedinternals[internal] = true
usedviews[internal] = references.view
end

So, line 40 of that file ("local cheat = true") needs a conditional that
I’m not able to provide (I have no idea how it would read).

Basically, if \setupinteraction[focus=standard], please don’t cheat 😅.

Sorry, but I don’t even know which file (strc-lst.lua or lpdf-ano) has
to be modified.

I hope the issue is clearer now.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new upload

2022-10-15 Thread Pablo Rodriguez via ntg-context
On 10/15/22 09:41, Hans Hagen via ntg-context wrote:
> On 10/14/2022 4:14 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> Many thanks for the new version, Hans.
>>
>> I have discovered that it includes in
>> tex/texmf-context/source/luametatex what should be the LMTX source
>> (about 11MB).
>
> It zips to 2 MB and totals to less of a picture on a fancy phone ...

Many thanks for your reply, Hans.

At least on my system, I think every file is downloaded uncompressed.

With a low speed connection (here, the service isn’t great all the
time), having to download over 400 files is a killer.

The storage space on disk is irrelevant, I totally agree with you.

I wish I could say that large updates such as these weren’t a problem in
some cases. But sometimes this isn’t true here.

With incremental updates, the downloading process takes way shorter in
subsequent updates (as Alan pointed out). But the first time it might
take too much (so the script quits).

> the idea is to provide the user with all he needs as archive so no
> dependencies (apart from a compiler). Also by including the source we
> can sort of guaranteed that you get what you expect to work with the tex
> files (no interference with distribution patches our of our control). It
> has always been part of the plan with luametatex. So ... it will not be
> optional.

I asked to make this optional not to avoid having the source, but to be
able to complete the update process.

I’m not extremely confident, but I hope I will manage to update ConTeXt
at the office (next working day).

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] list not following "focus=standard"

2022-10-14 Thread Pablo Rodriguez via ntg-context
Hi Hans,

I have the following sample:

  \setupinteraction[state=start,
focus=standard]
  \starttext
  \completecontent
  \section{section}
  a\footnote{\contextversion}
  \stoptext

With version from 2022.09.11 20:44, the link from the TOC reads in the
PDF file:

  4 0 obj
  <<
  /D [ 1 0 R /Fit ]
  /S /GoTo
  >>
  endobj

Instead of being a named destination, such as in:

  5 0 obj
  <<
/D (#3)
/S /GoTo
  >>
  endobj

  11 0 obj
  <<
/D [ 1 0 R /XYZ 61.65861 129.0214 null ]
  >>
  endobj

  40 0 obj
  <<
/Limits [ (#3) (content) ]
/Names [ (#3) 11 0 R (*3) 10 0 R (content) 7 0 R ]
  >>
  endobj

This is the problem originally reported by Sylvain
(https://mailman.ntg.nl/pipermail/ntg-context/2022/106836.html).

I apologize, but I’m afraid I cannot provide a patch.

Could you take a look at it?

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] issues with current latest

2022-10-14 Thread Pablo Rodriguez via ntg-context
On 10/14/22 16:34, Alain Delmotte via ntg-context wrote:
> Hi!

Hi Alain,

many thanks for your help.

> For me it works! And
>
> also for this!

I’m afraid that I cannot make latest from 2022.10.14 10:16 with LuaTeX.

I’m on Linux64. I hope I may make it work with Win64.

As for the issue with the links, I have already discovered what is wrong
with them (wrong object reference).

Many thanks for your help again,

Pablo

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] ToC filler dots not aligned

2022-10-14 Thread Pablo Rodriguez via ntg-context
On 10/14/22 17:29, Schister, Roman via ntg-context wrote:
> Hi,
>
> If I typeset a table of contents with the latest version of ConTeXt
> on my computer (2022.09.11 20:44 LMTX), the filler dots used in list
> alternative C aren’t aligned [...]
Hi Roman,

I compiled your code with version from 2022.09.11 20:44.

I attach an overlay of the results from both LuaMeTaTeX (in red) and
LuaTeX (in darkgreen).

It seems that MkIV is doing fine, but LMTX isn’t aligning the dots (for
some reason unknown to me).

Latest from 2022.10.14 10:16 gives exactly the same result for LMTX, and
MkIV doesn’t work for me.

Just in case it might help,

Pablo


a.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] issues with current latest

2022-10-14 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \setuppapersize[A7]
  \setupinteraction[state=start,
color=darkred,
contrastcolor=darkred,
focus=standard]
  \starttext
  \completecontent
  \startsection[title={sec}, list=(before \&\ now), reference=a]
  \page
  \in[a] (after 2022.10.14 10:16)
  \stopsection
  \stoptext

If I try to compile with LuaTeX (after deleting the cache), I get the
following error:

lua error   > lua error on line 1 in file a.tex:

...tex/texmf-context/tex/context/fonts/mkiv/common-math.lfg:100: attempt
to index a nil value (field 'subsets')
stack traceback:
...tex/texmf-context/tex/context/fonts/mkiv/common-math.lfg:100: in
field 'moveitalics'
.../context/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg:103: in
main chunk
[C]: in function 'dofile'
...ext/tex/texmf-context/tex/context/base/mkiv/good-ini.lua:78: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/good-ini.lua:68>
(...tail calls...)

It is also caused by the minimal:

  \starttext
   \null
  \stoptext

And with the first source, \in hyperlink doesn’t work at all.

Sylvain reported an issue with the \completecontent list (not honoring
"focus=standard"), but with current latest the \in hyperlink doesn’t
work at all.

Could anyone confirm the issues?

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new upload

2022-10-14 Thread Pablo Rodriguez via ntg-context
On 10/14/22 10:21, Hans Hagen via ntg-context wrote:
> Hi,
>
> I uploaded a new version. Apart from a few fixes / extensions already
> mentioned here (or known to those who wanted it) the main changes are in
> the math goodie files (work in progress, we will clean them up later) as
> part of improving the rendering of math.

Many thanks for the new version, Hans.

I have discovered that it includes in
tex/texmf-context/source/luametatex what should be the LMTX source
(about 11MB).

I wonder whether this could be made optional. Internet speed is not
constant where I live and it was impossible for me to update at work
(after many attempts to download the newer version).

Just in case it would be possible, modules (also as an option) would be
more useful for many of us.

Many thanks for your excellet work,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

2022-10-13 Thread Pablo Rodriguez via ntg-context
On 10/13/22 00:50, Max Chernoff via ntg-context wrote:
> On Wed, 2022-10-12 at 13:14 +0200, Leah Neukirchen wrote:
>> [...]
>> The last version of font-cff.lua should also copy the hinting-related
>> values of the CFF properly (/BlueScale, /StemSnap[HV] etc).
>> We fixed that on the side. ;)
>
> Yay!

Many thanks for your work fixing this, Leah and Hans.

The only remaining question is then when the new version will be be
released.

Many thanks again for your work,

Pablo

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Help test a LMTX bug fix: tweaks in PDF generation

2022-10-10 Thread Pablo Rodriguez via ntg-context
On 10/9/22 17:33, Leah Neukirchen via ntg-context wrote:
> [...]
> So please: Try to preview and then try to print the attached PDF;
> and report back if either preview or printout does not look like
> the attached reference PNG image (i.e. something is missing,
> the fonts look different, or have wrong relative size.)

Hi Leah,

I used Acrobat DC, SumatraPDF and Firefox in Windows and all programs
displayed and printed your document fine (Canon imageRUNNER ADVANCE).

I had no issues before printing LMTX-generated documents.

Many thanks for your work fixing the issues (wrong font display and
printing with some printers),

Pablo

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

2022-10-05 Thread Pablo Rodriguez via ntg-context
On 10/3/22 20:57, Leah Neukirchen via ntg-context wrote:
>> [...]
>> \setupbackend[level=0,compresslevel=0]
>> \starttext
>> Just a line of text.
>> \stoptext
>> [...]
>
> On Acrobat DC on macOS, there is a visible difference between the two files:

Hi Leah,

this issue also happens with PDF.js included in Firefox. TeX Gyre Heros
is even clearer with dubious hinting.

It has been already reported
(https://bugzilla.mozilla.org/show_bug.cgi?id=1781022).

But even with variable fonts from Adobe
(https://github.com/adobe-fonts/source-code-pro/releases/latest),
Acrobat has issues with the following code:

\definefontfeature
[book]
[axis={weight=600}]

  \definefontfamily
[mainface]
[rm]
[SourceCodeVariable]
[features={book,none}]

  \setupbodyfont[mainface, 100pt]

  \starttext
  \startTEXpage[offset=1em]
  AefKkQrt4
  \stopTEXpage
  \stoptext

It happens both with LuaMetaTeX and LuaTeX. When playing with certain
levels of zooming, some blank spots are displayed inside the characters
(printing is fine).

BTW, as Hans explained
(https://mailman.ntg.nl/pipermail/ntg-context/2022/106840.html), the
following top line avoids your printing issue (by setting LuaTeX as the
engine, instead of LuaMetaTeX):

  % engine=luatex

Just in case it might help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Missing letters and numbers in printout

2022-09-29 Thread Pablo Rodriguez via ntg-context
On 9/29/22 15:54, Angel M Alganza via ntg-context wrote:
> On Wed, Sep 28, 2022 at 03:59:07PM +0200, Hans Hagen via ntg-context wrote:
> [...]
>> but lmtx is and will stay as default
>
> Too bad the default won't work as expected (it did before or, at least
> with TeXLive distribution,) sometimes, for some people or for some of
> their files.

Hi Ángel,

there is nothing that prevents this to be fixed (as far as I know).

TeXLive is still using LuaTeX as default for ConTeXt. This will be
hopefully changed in next release of TeX Live (according to
https://mailman.ntg.nl/pipermail/ntg-context/2022/106829.html by Hans
himself).

The following code relates to an issue I had with ConTeXt myself:

  \setuppapersize[A5][A4, landscape]
  \doifmodeelse{broken-printer}
{\setuparranging[2UP,doublesided]
 \setupinteractionscreen[option={portrait, paper}]}
{\setuparranging[2UP]
\setupinteractionscreen[option={landscape, paper}]}
  \starttext
  \dorecurse{32}
{\input knuth\par}
  \stoptext

In a copyshop I used to go (more than four years ago), they had a
printer that didn’t understand duplex printing when pages were in
landscape orientation.

The guy of the copyshop was a really nice person, but I didn’t want to
bother him with
https://opensource.adobe.com/dc-acrobat-sdk-docs/standards/pdfstandards/pdf/PDF32000_2008.pdf#search=DuplexFlipShortEdge.

The printout was wrong, since page was flipped on the long edge. Only
the other duplex printing option (besides Simplex) worked with that printer.

The bug was clear on the printer interpreter. I thought of writing to
the printer manufacturer so that they fix their printers. But it wasn’t
worth the effort.

In your case, I don't know why LMTX generated documents misbehave with
the PDF interpreter from your printer. It might be that font embedding
is flawed, or that the interpreter is at fault.

But unless you find out which code is wrong here, you may experience
issues, but there is nothing to fix in this case.

Sorry for repeating myself, but you know way better than mine that this
is code and it requires (a lot of) analysis to find the cause here.

Just in case it helps,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] strange issue with hyphens

2022-09-28 Thread Pablo Rodriguez via ntg-context
Dear list,

I’m experiencing a weird issue with hyphenation:

  \setuphyphenation
[method=traditional]

  \starttext
  \hyphenatedword{a-legibility-c}

  \sethyphenationfeatures
[strict]
  \hyphenatedword{a-legibility-c}
  \stoptext

I need the setup hyphenation commands to get underscore hyphenation.

But how can I make that strict hyphenation features behave as standard
hyphenation ones?

I mean, that the first hyphen doesn’t get doubled and that hyphenation
is also enabled after the first hyphen.

I don’t know whether the strict hyphenation features are misbehaving
here or I am missing something very basic here.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] TOC colors and in-page anchors

2022-09-28 Thread Pablo Rodriguez via ntg-context
On 9/28/22 12:20, Sylvain Hubert via ntg-context wrote:
> Thanks for the pointers, but unfortunately I cannot reproduce the second
> fix with either the system pdf viewer or the browser one.

Hi Sylvain,

it seems that ConTeXt is basically ignoring "focus=standard" in lists.

Compare both links here:

  \setupinteraction[state=start,
color=darkred,
contrastcolor=darkred,
focus=standard]
  \starttext
  \completecontent
  \section[a]{b}
  \about[a]
  \stoptext

And this is a regression. I think it was introduced in latest from
2022.07.06 21:42, since latest from 2022.05.11 11:36 has no issue with this.

Hans, could you see what preventing this from working as expected?

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Missing letters and numbers in printout

2022-09-28 Thread Pablo Rodriguez via ntg-context
On 9/28/22 15:30, Angel M Alganza via ntg-context wrote:
> On Tue, Sep 27, 2022 at 04:03:06PM +0200, Pablo Rodriguez via
> ntg-context wrote:
>> [...]
>> I think that this PDF document will be fine with your printer.
>
> It was.  I printed it this morning without any problem.  Thank you!

Glad to read it helped, Ángel.

I had the suspicion, because font embedding seems to be changed in LMTX.

There have been minor issues in the past with this (I cannot recall
whether I experienced one or two myself).

> If compiling with --luatex option seem to have more chances to produce a
> complete product, shouldn't it be convenient for this option to be the
> default?

Well, that is probably too much to say (I mean, that "--luatex"
generates more accurate PDF documents).

What you are experiencing might be a pretty extreme case. And you are
taking for granted that the PDF interpreter from your printer is 100%
accurate (which might not be the case).

The PDF specification deals with font embedding (to the best of my
knowledge) at
https://opensource.adobe.com/dc-acrobat-sdk-docs/standards/pdfstandards/pdf/PDF32000_2008.pdf#nameddest=G8.1695688.

Unless the code to be fixed (or even adapted) can be detected and
improved, there is nothing to do here.

> I would expect 'context file.tex' to work "out of the box" and
> produce a correct and complete PDF output.  Would it be possible to have
> that changed?  Or is there maybe any other potentially undesirable side
> effect?

The main issue would be pretending to use with LuaTeX some features
available only in LuaMetaTeX.

> Also, I guess that can be configured somehow so, what would need to be
> changed to have 'context file.txt' to compile using luatex instead of
> LuaMetaTeX?

I agree with Hans that LuaMetaTeX is here to stay. He may correct me,
but as far as I understand it, LuaMetaTeX is LuaTeX-2.0.

I hope it might help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Missing letters and numbers in printout

2022-09-27 Thread Pablo Rodriguez via ntg-context
On 9/26/22 23:04, Angel M Alganza via ntg-context wrote:
> On Mon, Sep 26, 2022 at 10:44:55PM +0200, Hans Hagen via ntg-context wrote:
>
>> mtxrun --script pdf --info oeps.pdf
> [...]
> mtx-pdf | creation date > D:20220920071929+02'00'
> mtx-pdf | modification date > D:20220920071929+02'00'
> mtx-pdf | cropbox   > pages: 1-1, width: 841.889758, height: 
> 595.27559

Hans,

many thanks for the pdf script in mtxrun.

I have two suggestions:

1. Would it be possible that dates could be in a more friendly format
such as the following one?

  creation date > 2022-09-20 07:19:29 +02:00

2. Would it be possible that page dimensions would be in mm (or cm),
with an option for other length units?

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Missing letters and numbers in printout

2022-09-27 Thread Pablo Rodriguez via ntg-context
On 9/26/22 20:26, Angel M Alganza via ntg-context wrote:
> On Mon, Sep 26, 2022 at 07:10:40PM +0200, Pablo Rodriguez via ntg-context 
> wrote:
> [...]
>> There might be a workaround (or a way of testing this), compiling the
>> PDF document with LuaTeX instead of with LuaMetaTeX.
>
> It seems it is compiled with LuaTeX:
>
> $ pdfinfo a6.pdf
> Title:  a6
> Creator:LuaMetaTeX 2.09 20220429 + ConTeXt LMTX 2022.05.11 11:36
> Producer:   LuaMetaTeX-2.09

No, this was compiled with LuaMetaTeX.

>> If you compile it invoking "context source.tex", use "context --luatex
>> source.tex".
>
> When I try that I get:
>
> $ context --luatex a6lua.tex
> [...]
> mtxrun  | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua'

In that case, run "context --luatex --generate" first and then "context
--luatex a6lua.tex".

This would give you a pure LuaTeX-compiled PDF document.

I think that this PDF document will be fine with your printer.

I hope it helps,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new hash for buffer (as file)

2022-09-26 Thread Pablo Rodriguez via ntg-context
On 9/26/22 02:05, Max Chernoff via ntg-context wrote:
>
> Hi Pablo,
>
>> But now I don’t understand is the following issue: if the saved file
>> contains "\r\n", why does basic Notepad the new lines?
>>
>> "\r\n" are the chars to get new lines in Windows. Or what am I missing here?
>
> I'm not too sure what you're asking here, but Notepad was somewhat-
> recently updated to handle both CRLF and LF line endings:
>
>https://devblogs.microsoft.com/commandline/extended-eol-in-notepad/

Hi Max,

I realized later that I was doing something wrong. My fault here.

> [...]
> Also, you should probably check to make sure that the results of the
> file don't depend on the current code page on Windows. Try writing out a
> buffer from ConTeXt with the following contents:
>
>АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя
>
> First, run "chcp 65001" before running "context" and record the size of the
> file written. Then, run "chcp 1251" and run "context" again. Hopefully the
> file size doesn't change; but if it does, then that means that the binary
> content of any file written will depend on the system's default code page,
> which would complicate making reproducible hashes.

For more than two decades, all my TeX sources are written in UTF-8.

I thought that ConTeXt would output the same character encoding as in
the source file when saving a buffer.

I haven’t found this issue and I’d say that all my saved buffers are
UTF-8 encoded.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] PDF viewer

2022-09-26 Thread Pablo Rodriguez via ntg-context
On 9/26/22 16:44, Willi Egger via ntg-context wrote:
> Hi Pablo,
>
> Hraban refers to Paulo Ney de Souza from US. He recently joined the
> ConTeXt meeting and indeed he mentioned that TUG had a fund raising
> campaign which was successful.
Many thanks for your replies, Hraban and Willi.

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Missing letters and numbers in printout

2022-09-26 Thread Pablo Rodriguez via ntg-context
On 9/26/22 16:06, Angel M Alganza via ntg-context wrote:
> Hello,

Hi Ángel,

> [...]
> I tried printing the same file (from the same USB drive) into a
> different printer, this time connected to a computer, and sending the
> file from it, which worked just fine.  My guess is that the first
> printer in missing the font the document uses, whereas the second
> printer received the font from the computer (Devuan Linux), which has
> the appropriate font.  Could that be correct?

From my experience, this is possible, but maybe not highly probable.

By default, ConTeXt includes fonts by default, as far as I can remember
(I have been using it for over a decade).

> In all previous ocasions I used the version of ConTeXt included in
> Texlive on Devuan, but a few months ago I decided to install ConTeXt
> using the official distribution instead.  Could that explain the change
> in behaviour I'm seeing?  Could it be that the previous versions I used
> somehow embeded the fonts into the PDF file but the current one doesn't?

Again, I’d very surprised if that were the case.

BTW, is TeX Gyre Heros the font with missing chars in the printed
version of your PDF document?

I think that your printer is having issues with the embedded font in
your PDF document.

There might be a workaround (or a way of testing this), compiling the
PDF document with LuaTeX instead of with LuaMetaTeX.

If you compile it invoking "context source.tex", use "context --luatex
source.tex".

It might be that your printer has problems with the way LuaMetaTeX
embeds the fonts in the PDF (while it has none with LuaTeX).

But the way to know for sure which tools generated your PDF document and
whether fonts are embedded, "pdfinfo your-file.pdf" and "pdffonts
your-file.pdf" are your friends.

Both infos for the following source:

  \setupbodyfont[helvetica]
  \starttext
  \input zapf
  \stoptext

$ pdffonts a.pdf
name  type encoding emb sub uni object ID
-   --- --- --- -
TeXGyreHeros-Regular  CID Type 0C  Identity-H   yes yes yes  1  0

$ pdfinfo a.pdf
Title:  a
Creator:LuaMetaTeX 2.10 20220918 + ConTeXt LMTX 2022.09.11 20:44
Producer:   LuaMetaTeX-2.10
CreationDate:   Mon Sep 26 18:29:02 2022 CEST
ModDate:Mon Sep 26 18:29:02 2022 CEST
Tagged: no
UserProperties: no
Suspects:   no
Form:   none
JavaScript: no
Pages:  1
Encrypted:  no
Page size:  595.276 x 841.89 pts (A4)
Page rot:   0
File size:  7531 bytes
Optimized:  no
PDF version:1.7

Otherwise, the only option about your documents is guessing.

Just in case it might help,

Pablo



___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new hash for buffer (as file)

2022-09-25 Thread Pablo Rodriguez via ntg-context
On 9/23/22 17:06, Pablo Rodriguez via ntg-context wrote:
> On 9/23/22 06:01, Max Chernoff via ntg-context wrote:
>> […]
>>return utilities.sha2.hash256(
>>str:gsub(string.char(0x0D), string.char(0x0A))
>>)
> […]
> this works perfectly fine with Linux "str:gsub('\r','\n')", but I can’t
> make it work in Windows.

Hi again Max,

this seems to solve the issue in Windows too:

  \startbuffer[test]
  just a test
  and another one
  \stopbuffer

  \starttext
  \startluacode
  require("util-sha")

  function sha256(str)
if os.name == "windows" then
  return utilities.sha2.hash256(str:gsub("\r", "\r\n"))
else
  return utilities.sha2.hash256(str:gsub("\r", "\n"))
end
  end
  \stopluacode

  \def\shabuffer#1%
{\cldcontext{sha256(buffers.raw("#1"))}}

  \def\shafile#1%
{\cldcontext{utilities.sha2.hash256(io.loaddata("#1"))}}

  \shabuffer{test}

  \savebuffer[test][temporary-αβγ, prefix=no]

  \shafile{temporary-αβγ}

  \stoptext

But now I don’t understand is the following issue: if the saved file
contains "\r\n", why does basic Notepad the new lines?

"\r\n" are the chars to get new lines in Windows. Or what am I missing here?

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] PDF viewer

2022-09-25 Thread Pablo Rodriguez via ntg-context
On 9/25/22 17:24, juh via ntg-context wrote:
> Am Thu, Sep 22, 2022 at 06:47:50PM -0600 schrieb Max Chernoff via ntg-context:
>> I think that pdf.js (the Firefox PDF viewer) meets most of these
>> requirements. There are a few requirements that it doesn't meet, but
>> it's open source and written in JavaScript, so we should be able to add
>> anything that's missing.
>
> I found a nasty bug in firefox.
>
> https://mailman.ntg.nl/pipermail/ntg-context/2022/105212.html
>
> https://bugzilla.mozilla.org/show_bug.cgi?id=1781022

As Jonathan Kew explained, TeX Gyre Heros is also poorly displayed with
Acrobat. The issue may be trickier than we thought (since fixing Firefox
with Heros+LMTX is only part of the issue).

Just as a personal note, I tend to avoid using Heros with LMTX, since
resulting PDF documents may be displayed (poorly on screen) with Acrobat.

I wonder whether this is related to common code for both Acrobat and
Firefox (originally comming from
https://lists.nongnu.org/archive/html/freetype-devel/2013-05/msg0.html).

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] line numbering for \setuptyping

2022-09-25 Thread Pablo Rodriguez via ntg-context
On 9/24/22 19:56, Pablo Rodriguez via ntg-context wrote:
> [...]
> Which \setuplinenumbering is applied to typing fragments?
>
> Just in case my question isn’t clear: how can I get "step=3" in the
> sample above?

Hi there,

I reply this question myself: "step" is a key in "\setuptyping"
("\setuplinenumbering[typing]" won’t work here).

Other options for line numbering are configured with
"\setuplinenumbering[typing]".

Just in case it might help for future reference,

Pablo


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


<    1   2   3   4   5   6   7   8   9   10   >