[NTG-context] MkIV and LMTX difference in comma list expansion

2020-10-26 Thread Rik Kabel

Hello list,

Another difference, perhaps the result of my lack of knowledge, but a 
difference.


The following example produces different results for the fourth 
sequence, with the index being passed one item under MkIV and two items 
under LMTX.


(The code is stripped out of a much more complex bit to show the issue.)

   % macros=mkvi
   \starttexdefinition unexpanded startBlockQuotation
    \dosingleempty\dostartBlockQuotation
   \stoptexdefinition
   \starttexdefinition dostartBlockQuotation [#SETUPS]
    \getrawparameters[BlockQuotation]
  [index=,#SETUPS]
    \expandafter\processcommalist
  \expandafter[\BlockQuotationindex]\doIndexIt{}
   \stoptexdefinition
   \starttexdefinition stopBlockQuotation
   \stoptexdefinition

   \starttexdefinition doIndexIt #INDEXTERM
  indexer sees #INDEXTERM\
  \index{#INDEXTERM}
   \stoptexdefinition

   \starttext

   \startBlockQuotation[index=aaa]
 \startparagraph
  1 \quad when indexing aaa.
 \stopparagraph
   \stopBlockQuotation
   \startBlockQuotation[index={aab}]
 \startparagraph
  2 \quad when indexing \{aab\}.
 \stopparagraph
   \stopBlockQuotation
   \startBlockQuotation[index={aac, aad}]
 \startparagraph
  3 \quad when indexing \{aac, aad\}.
 \stopparagraph
   \stopBlockQuotation
   \startBlockQuotation[index={{aae, aaf}}]
 \startparagraph
  4 \quad when indexing \{\{aae, aaf\}\}.
 \stopparagraph
   \stopBlockQuotation
   \startBlockQuotation[index={{{aag, aah}}}]
 \startparagraph
  5 \quad when indexing \{\{\{aag, aah\}\}\}.
 \stopparagraph
   \stopBlockQuotation
   \startBlockQuotation[index={{aai, aaj},{aak, aal}}]
 \startparagraph
  6 \quad when indexing \{\{aai, aaj\},\{aak, aal\}\}.
 \stopparagraph
   \stopBlockQuotation
   \startBlockQuotation[index={{{aam, aan}},{{aao, aap}}}]
 \startparagraph
  7 \quad when indexing \{\{\{aam, aan\}\},\{\{aao, aap\}\}\}.
 \stopparagraph
   \stopBlockQuotation
   \placeindex
   \stoptext

Did I misuse the comma list processing, or is this a bug?

--
Rik

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

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


Re: [NTG-context] Which version of MkIV should we use?

2020-10-26 Thread Rik Kabel

On 10/26/2020 04:37, Hans Hagen wrote:

On 10/26/2020 12:09 AM, Rik Kabel wrote:

Hello all,

I have noticed some differences between the MkIV installed as part of 
LMTX and the MkIV installed via first-setup.


Which should be used going forward when one wants to use MkIV?

(One difference: \contextkind is defined in file context.mkiv 
installed via first-setup. It is not defined in the file of the same 
name installed as part of LMTX. Another, more significant difference, 
is loading modules.)


mkiv works with luatex, lmtx needs luametatex

currently the functionality is mostly the same but further development 
happens in lmtx


so, if mkiv works for you, just keep using it .. you can try your 
document with lmtx and normally that should work ok


there is a distinction between

- core functionality (seldom changes)
- tricky things (migh tbe done better in lmtx)
- more radical new things hard to do in regular tex (will be in lmtx 
only)


the luametatex engine is more advanced than luatex (which we cannot 
change any more in fundamental ways as it's also used outside context) 
but with luametatex we can do (maybe) crazy things; the luametatex 
enfine has all kind of improvements in the rendening, adds 
functionality that makes implementations somewhat cleaner, is faster 
and uses less memory, redesigns/organizes some internals (e.g. get rid 
of the sometimes fuzzy accumulated engine mix), adds more interfaces 
in lua, is self contained, etc ... see presentation(s) last ctx meeting.


currently i'm applying some of the more drastic new thing: more 
advance macro argument parsing options, several levels of (macro) 
protection, etc which actually might lead to issues (simple to deal 
with as most are interface related, not functionality)


so ... you can use mkiv and/or snapshot the current lmtx and/or try 
the latest greatest when it showsup


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-


Hans,

Let me rephrase the question.

With the following example:

   \starttext

   \contextkind

   \stoptext

The standalone installation returns a document containing "beta" and 
context --luatex with the LMTX installation complains of an undefined 
control sequence.


The file context.mkiv differs between the two installations.

If the two are expected to differ, I am asking which is the reliable 
version.


You had stated in an earlier email that the --luatex option provided to 
an LMTX installation will produce an MkIV result, but that does not seem 
to still be the case.


--
Rik

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

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


[NTG-context] Which version of MkIV should we use?

2020-10-25 Thread Rik Kabel

Hello all,

I have noticed some differences between the MkIV installed as part of 
LMTX and the MkIV installed via first-setup.


Which should be used going forward when one wants to use MkIV?

(One difference: \contextkind is defined in file context.mkiv installed 
via first-setup. It is not defined in the file of the same name 
installed as part of LMTX. Another, more significant difference, is 
loading modules.)


--
Rik

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

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


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

2020-10-21 Thread Rik Kabel

Hello list,

About two months ago (2020-08-26) I described a difference between LMTX 
and MkIV in the setting of index registers entries, and more 
particularly, in the trimming of text to fit the available width 
therein. I have now created a smallish example to demonstrate the problem.


I do notice that the problem is very sensitive to the width settings, 
and slight variations in width create different results with both engines.


This ConTeXt input:

   \definepapersize [pinched crown quarto]
 [width=6.69in,
  height=9.61in]
   \setuppapersize  [pinched crown quarto]
   \setuplayout [width=fit,
  backspace=1.4in,    cutspace=1in,
  leftmargin=0.65in,  rightmargin=0.65in]

   \setupregister   [index]
 [n=2, balance=no, maxwidth=4cm]

   \starttext

   \startchapter[title={Index Test}]

   \index{Anonymous+Felix quem faciunt aliena pericula cautum}
   \index{{Diderot, Denis}+Et des boyaux du dernier prêtre, Serrons le
   cou du dernier roi}
   \index{{Dunne, Finley Peter}+Thrust ivrybody, but cut th’ ca-ards}
   \index{Eisenhower+Dwight D.+influence … by the military-industrial
   complex}
   \index{Eisenhower+Dwight D.+plundering, for our own ease and
   convenience, the precious resources of tomorrow}

   \placeindex

   \stopchapter
   \stoptext

produces, with MkIV:

and with LMTX:

The example code shows one other instance as well, in the fourth indexed 
entry.


Beside looking uglier, this results in a couple more pages for the same 
number of index entries.


As I noted in my first description of the problem, this may not be 
unique to register processing, and perhaps it is an issue with 
limitatetext or doboundtext, or something else entirely.


--
Rik

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

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


[NTG-context] Index formatting difference LMTX and MkIV

2020-08-26 Thread Rik Kabel

Hello list,

I have an index which uses multilevel indexing (a+b+c) to insert entries 
which contain snips of text. LMTX behaves differently from MkIV when 
trimming that text, resulting in line wrapping which does not happen 
with MKiV. I am not sure when this began -- I just picked up work again 
on this project this week after a hiatus of a couple of months.


This does not occur in every instance, but it happens often enough in 
this 20 page two-column index to add another full page, and it looks 
ugly in comparison (although perhaps no index looks good).


The source is the same for both LMTX and MkIV. There is no explicitly 
conditional coding.


With MkIV, I get:

With LMTX, I get:


I am struggling to prepare a MWE, but will try to do so if there is no 
obvious difference to those who ken the code. The problem may not be 
unique to register creation, but I have not noticed other appearances of 
the issue in the text.


--
Rik


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

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


[NTG-context] \setupbackend in MkIV

2020-05-25 Thread Rik Kabel
I cannot get a PDF/A document produced with the latest MkIV beta 
2020.05.18 16:46 (LMTX works without issue). Using the example from the 
wiki (https://wiki.contextgarden.net/PDF/A) I get the error stating:


... \p_file {\backendparameter {xmpfile}}\ifempty
  \p_file \else
   \clf_setxmpf...
   \setup_backend ...end [#1]\the \everysetupbackend

   l.11 ...ISO coated v2 300\letterpercent\space (ECI)]
   mtx-context | fatal error: return code: 1


Removing either of the \setupbackend instructions still results in the 
same error.


Same issue for PDF/X.

Is it a bug, or is it me?

--
Rik

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

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


Re: [NTG-context] How to define a font with an effect as a font with \definefont

2020-05-23 Thread Rik Kabel


On 5/23/2020 15:50, Gerben Wierda wrote:



On 23 May 2020, at 20:06, Wolfgang Schuster 
> wrote:


Pablo Rodriguez schrieb am 23.05.2020 um 20:02:

On 5/23/20 11:52 AM, Gerben Wierda wrote:

[]
Actually, my setup is Optima with Helvetica used for Cyrillic:

\definefallbackfamily
[archimate]
[ss]
[Helvetica]
[preset=range:cyrillic,
   tf=style:light,
   it=style:lightoblique,
   bf=style:regular,
   bi=style:oblique,
   force=yes,
   rscale=1.0]
\definefontfamily [archimate] [ss] [Optima]
\setupbodyfont[archimate]

And I would like the effect to work on just the Optima font (which is a
bit light for this use)

Hi Gerben,
this code may work for you:


Don't forget to apply the "default" features to get ligatures and 
kerning.



\definefontfeature
  [effect-widen]
  [effect={width=.2,delta=0.3}]
\definefallbackfamily
  [archimate]
  [ss]
  [Helvetica]
  [preset=range:cyrillic,
   tf=style:light,
   it=style:lightoblique,
   bf=style:regular,
   bi=style:oblique,
   force=yes,
   features={effect-widen}]


features={default,effect-widen}]


\definefontfamily
[archimate]
[ss]
[Optima]
[features={effect-widen}]


features={default,effect-widen}]


Does this apply the effect only to Latin characters in Optima and not 
to Cyrcillic characters in Helvetica? I am trying to understand the 
syntax and if I read this it seems to get applied to cyrillic in this 
case.


G




Wolfgang
___



Well, you could try it. With one small correction (line 10 here), and 
effects exaggerated for demonstrations, it works just fine:


   \definefontfeature
  [effect-widen]
  [effect={width=4.2,delta=0.3}]
   \definefallbackfamily
  [archimate]
  [ss]
  [Calibri]
  [preset=range:cyrillic,
   force=yes,
   features=default]
   \definefontfamily`
    [archimate]
    [ss]
    [Calibri]
    [features={default,effect-widen}]
   \setupbodyfont[archimate]

   \starttext
  \doloopoverlist{\tf, \it, \bf, \bi}{
    \recursestring{{\russian\hyphenatedword{Николаевич}\
   \hyphenatedword{typography}}}\par}
   \stoptext

Gives:

(I don't have your fonts, but this illustrates more clearly the 
difference in handling for the two family definitions.)


--
Rik

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

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


Re: [NTG-context] Getting width of text to be typeset

2020-05-23 Thread Rik Kabel


On 5/22/2020 19:49, Rik Kabel wrote:


If the OP simply wants the width of a string, one can use 
\setwidthof#1\to#2.


\define\String{pqrs}
\setwidthof{\String}\to\Wdth
\String\ is \Wdth\ wide.

\setwidthof{{\tfb\em\String}}\to\Wdth
{\tfb\em\String} is \Wdth\ wide.

I do not know if that is different from the width of the same string 
unboxed from the paragraph. There may be some adjustments made in 
justification, expansion, and such that are not treated.



Correcting my post (thank you, Floris), the format is a bit different 
than I had written. The following works:


   \starttext
   \define\String{pqrs}
   \setwidthof\String\to\WdthA
   {\String} is \WdthA\ wide.

   \define\String{\tfx\em pqrs}
   \setwidthof\String\to\WdthB
   {\String} is \WdthB\ wide.

   \define\String{\ss pqrs}
   \setwidthof\String\to\WdthC
   {\String} is \WdthC\ wide.
   \stoptext


Giving:

--
Rik

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

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


Re: [NTG-context] Getting width of text to be typeset

2020-05-22 Thread Rik Kabel


On 5/22/2020 18:18, Hans Hagen wrote:

On 5/23/2020 12:03 AM, Hans Hagen wrote:

On 5/22/2020 11:22 AM, cont...@vivaldi.net wrote:

Hello,

is it possible to get somehow the width of the "material" (box?) of 
the current line which is "ready" to be typeset?


See the case:


\starttext

   some text

   pqrs % Here I need to get width (or content) of the text from the 
begin of the current line,

    % i.e. width of the text "pqrs".
    % (Depending of the width I will decide what to do later.)

\stoptext


I am too laical to know how to "inject" TeX workflow or whether to 
access LuaTeX internals (nodes?) to get the desired information.


- Is it possible somehow?

Too easy ...

\startluacode
 function document.whatever()
 context(nodes.hpack(tex.getnest().head.next).width)
 end
\stopluacode

\unexpanded\def\widthuptohere{\dimexpr\ctxlua{document.whatever()}sp\relax} 



\starttext

 \dorecurse {10} {
 snippet #1\scratchdimen\widthuptohere\ has 
\the\scratchdimen\ width\par

 }

\stoptext

but still you have to wikify it ... maybe i'll make it a low level 
helper (but than you also need to wikify that because i have no clue 
where to explain it)

Actually, one needs to flush a bit

\startluacode
    function document.whatever()
    local h = nodes.hpack(tex.getnest().head.next)
    local w = h.width
    h.list = nil
    nodes.free(h)
    context(w)
    end
\stopluacode

\unexpanded\def\widthuptohere{\dimexpr\ctxlua{document.whatever()}sp\relax} 



\starttext

    \dorecurse {10} {
    snippet #1\scratchdimen\widthuptohere\ has \the\scratchdimen\ 
width\par

    }

\stoptext

not that it matters much, because it's unlikely that you leak more 
than a dozen nodes in a run.


Hans

If the OP simply wants the width of a string, one can use 
\setwidthof#1\to#2.


   \define\String{pqrs}
   \setwidthof{\String}\to\Wdth
   \String\ is \Wdth\ wide.

   \setwidthof{{\tfb\em\String}}\to\Wdth
   {\tfb\em\String} is \Wdth\ wide.

I do not know if that is different from the width of the same string 
unboxed from the paragraph. There may be some adjustments made in 
justification, expansion, and such that are not treated.


--
Rik

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

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


Re: [NTG-context] output file name query

2020-05-22 Thread Rik Kabel


On 5/22/2020 11:39, Henning Hraban Ramm wrote:

Am 22.05.2020 um 15:09 schrieb Wolfgang Schuster 
:

Alan Bowen schrieb am 22.05.2020 um 14:33:

In my project, I process a single product file by enabling various modes. What 
I would like to do is to vary the name of the output PDF file in each instance.
So, in processing a file, how does one go directly from prd_filename.tex to 
myfilename.pdf rather than to prd_filename.pdf—assuming that it is possible?
Any tips or pointers to what I should be reading will be greatly appreciated.

1. Drop the weird (sorry Hraban) naming system and use myfilename for your 
product.

I force nobody to use that.


2. Use the result option on the command line, e.g. "context --result=myfilename 
prd_filename.tex".

But that still produces a "prd_filename.*" first and then renames it, making it 
impossible to keep a "prd_filename.pdf". Or did that change recently?

My workflows are adapted to that behaviour: "prd_*.pdf" is just the temporary 
version, none of those leaves my computer, but only nicely named PDFs (usually 
MyProductName_-mm-dd.pdf).


3. Ask Hans to add the result option to the first line of the document which is 
read by the context script before it creates the PDF.

% result="myfilename"
\starttext
...
\stoptext

That contradicts the mode approach. It would be nice if we could set (or can 
we?) the result from within the product, depending on a mode – since the 
product is renamed only later anyway, that could be viable.

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

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



Why not simply wrap it in a script or use make? (I set up a makefile for 
each project, but scripts are fine for smaller stuff that has fewer 
dependencies. Make is available on Windows, so that is not an impediment.)


--
Rik

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

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


Re: [NTG-context] LMTX not working in Windows 10

2020-05-19 Thread Rik Kabel


On 5/19/2020 12:12, Pablo Rodriguez wrote:

On 5/19/20 5:55 PM, Wolfgang Schuster wrote:

Pablo Rodriguez schrieb am 19.05.2020 um 16:42:

[...]
I’m getting exactly the same error on Windows (x64).

Where could we get the latest binary?

You can download the binary from the following link but only the 32bit
version for Windows is up-to-date.

http://dl.contextgarden.net/build/luametatex/

Wolfgang,

many thanks for the information.

Pablo
--
http://www.ousia.tk
___


Hallelulah! I now have a working LMTX again.

The version at 
http://dl.contextgarden.net/build/luametatex/x86_64-w64-mingw32/luametatex.exe, 
when put into place, did the job.


--
Rik

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

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


Re: [NTG-context] left protruding quotations

2020-05-14 Thread Rik Kabel


On 5/14/2020 11:21, Wolfgang Schuster wrote:

Michael Guravage schrieb am 14.05.2020 um 10:37:
When I start a paragraph with a \quote or a \quotation the left 
quotemark does not protrude, but when I use Unicode quotes it does. I 
would prefer to use the commands. Any suggestions on how I can 
achieve proper left protrusion without resorting to Unicode characters?


\setupquotation [method=font]
\setupquote [method=font]


Interestingly, \setupquotation in this situation provides protrusion for 
both \quote and \quotation open marks, while \setupquote does so only 
for \quote open marks, so only one is needed if you want it for both, 
and neither works if you want it for only \setupquotation. Perhaps it is 
different with some other language-specific marks.


--
Rik

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

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


Re: [NTG-context] error during the installation of luametatex

2020-05-09 Thread Rik Kabel


On 5/9/2020 12:26, Giulio Bertellini wrote:

*
*
*about LuaMetaTeX, Version 2.06.02*  On Mac OS Catalina 10.15.4 .
Hope this may convey some useful information. On Mac OS Catalina 
10.15.4 ( Mac mini late 2012, I5, 16GB RAM), using the current LMTX 
version just downloaded from Pragma Ade, I installed Context LMTX and 
tested the download by compiling the Metafun manual sources as 
indicated below:



>>>> sh-3.2# context metafun


resolvers | formats | executing runner 'run luametatex format': 
/System/Volumes/Data/opt/data/context/tex/texmf-osx-64/bin/luametatex 
--jobname="metafun" 
--fmt=/System/Volumes/Data/opt/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt 
--lua=/System/Volumes/Data/opt/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui 
cont-yes.mkiv --c:currentrun=1 --c:fulljobname="./metafun" 
--c:input="./metafun" --c:kindofrun=1 --c:maxnofruns=9 
--c:texmfbinpath="/System/Volumes/Data/opt/data/context/tex/texmf-osx-64/bin"


This is LuaMetaTeX, Version 2.06.02

open source > level 1, order 1, name 'cont-yes.mkiv'

system>

system> ConTeXtver: 2020.05.09 15:37 MKIV betafmt: 2020.5.9int: 
english/english


system>

system> 'cont-new.mkiv' loaded

open source > level 2, order 2, name 
'/System/Volumes/Data/opt/data/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'


system> beware: some patches loaded from cont-new.mkiv

close source> level 2, order 2, name 
'/System/Volumes/Data/opt/data/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'


system> files > jobname 'metafun', input './metafun', result 'metafun'

*
*
*Final result of this compilation:*

mkiv lua stats> used engine: luametatex version: 2.0602, functionality 
level: 20200508, format id: 498, compiler: clang


mkiv lua stats> control sequences: 51925 of 65536 + 10

mkiv lua stats> lua properties: engine: lua 5.4, used memory: 179 MB, 
ctx: 166 MB, max: 168 MB, hash chars: min(64,40), symbol mask: utf (τεχ)


mkiv lua stats> runtime: 20.702 seconds, 392 processed pages, 392 
shipped pages, 18.936 pages/second


system| total runtime: 113.221 seconds of 113.291 seconds




Please consider that this mac mini is quite old and I am running mac 
OS Catalina on an external SSD.   This was the first installation on 
Mac of Context today. I am quite happy with the results.


I  wish to express my appreciation for the outstanding work that Hans 
and the entire Context contributors team have carried out with focus 
and perseverance through the years.  Hello to Otared and Luigi with 
whom I  was in contact many years ago at the time of MKII .


I also installed the same LMTX Context release on the Linux Subsystem 
for  Microsoft Windows 10 and on different versions of Arch Linux. 
with the same excellent results.


Thanks again for the excellent work,

Giulio

Giulio Bertellini

On Sat, May 9, 2020 at 4:41 PM Rik Kabel <mailto:cont...@rik.users.panix.com>> wrote:



On 5/9/2020 09:33, Hans Hagen wrote:

On 5/9/2020 3:27 PM, Rik Kabel wrote:


On 5/9/2020 02:52, Hans Hagen wrote:

looks like a wrong binary .. should be 2.06.02 .. can you try
this binary:

http://dl.contextgarden.net/build/luametatex/x86_64-darwin/

(the farm generates two binaries for osx and it looks like the
legacy machine has gone off line which happens when osx updates
itself and gets stuck half way, i'll look into it)

Hans



I have the following update log entries (left column is EDT),
indicating a roll-back of the binary:

    2020-05-07T10:59:03  ConTeXt updated from 2020.04.30T11:15 to
    2020.05.07T11:03
    2020-05-07T10:59:03  LuaMetaTeX updated from 2.05.01 to 2.06.01
    2020-05-07T10:59:03  LuaMetaTeX functionality updated from
20200402
    to 20200506
    2020-05-07T10:59:03
    2020-05-08T15:14:26  ConTeXt updated from 2020.05.07T11:03 to
    2020.05.08T20:50
    2020-05-08T15:14:26  LuaMetaTeX downdated from 2.06.01 to
2.05.01
    2020-05-08T15:14:26  LuaMetaTeX functionality downdated from
    20200506 to 20200402
    2020-05-08T15:14:26
    2020-05-09T09:19:39  ConTeXt updated from 2020.05.08T20:50 to
    2020.05.09T08:55
    2020-05-09T09:19:39    LuaMetaTeX unchanged at 2.05.01
    2020-05-09T09:19:39    LuaMetaTeX functionality unchanged at
20200402
    2020-05-09T09:19:39

Perhaps there is an problem with the installation files?

no, i uploaded a new lmtx only (not sure why the date is old then)


what version does the binary report?



It reports what the log says. My update program simply scrapes the
version report. The version report in full is:

This is LuaMetaTeX, Version 2.05.01

Execute 'luametatex --credits' for credits

Re: [NTG-context] error during the installation of luametatex

2020-05-09 Thread Rik Kabel


On 5/9/2020 09:33, Hans Hagen wrote:

On 5/9/2020 3:27 PM, Rik Kabel wrote:


On 5/9/2020 02:52, Hans Hagen wrote:
looks like a wrong binary .. should be 2.06.02 .. can you try this 
binary:


http://dl.contextgarden.net/build/luametatex/x86_64-darwin/

(the farm generates two binaries for osx and it looks like the 
legacy machine has gone off line which happens when osx updates 
itself and gets stuck half way, i'll look into it)


Hans


I have the following update log entries (left column is EDT), 
indicating a roll-back of the binary:


    2020-05-07T10:59:03  ConTeXt updated from 2020.04.30T11:15 to
    2020.05.07T11:03
    2020-05-07T10:59:03  LuaMetaTeX updated from 2.05.01 to 2.06.01
    2020-05-07T10:59:03  LuaMetaTeX functionality updated from 20200402
    to 20200506
    2020-05-07T10:59:03
    2020-05-08T15:14:26  ConTeXt updated from 2020.05.07T11:03 to
    2020.05.08T20:50
    2020-05-08T15:14:26  LuaMetaTeX downdated from 2.06.01 to 2.05.01
    2020-05-08T15:14:26  LuaMetaTeX functionality downdated from
    20200506 to 20200402
    2020-05-08T15:14:26
    2020-05-09T09:19:39  ConTeXt updated from 2020.05.08T20:50 to
    2020.05.09T08:55
    2020-05-09T09:19:39    LuaMetaTeX unchanged at 2.05.01
    2020-05-09T09:19:39    LuaMetaTeX functionality unchanged at 
20200402

    2020-05-09T09:19:39

Perhaps there is an problem with the installation files?

no, i uploaded a new lmtx only (not sure why the date is old then)


what version does the binary report?



It reports what the log says. My update program simply scrapes the 
version report. The version report in full is:


   This is LuaMetaTeX, Version 2.05.01

   Execute 'luametatex --credits' for credits and version details.

   There is NO warranty. Redistribution of this software is covered by
   the terms
   of the GNU General Public License, version 2 or (at your option) any
   later
   version. For more information about these matters, see the file
   named COPYING
   and the LuaTeX source.

   Functionality : level 20200402
   Support   : cont...@ntg.nl
   Copyright : The Lua(Meta)TeX Team(s) (2005-2020+)

   The LuaMetaTeX project is related to ConTeXt development. This macro
   package
   tightly integrates TeX and MetaPost in close cooperation with Lua.

And the context version report is:


   mtx-context | ConTeXt Process Management 1.03
   mtx-context |
   mtx-context | main context file:
   C:/LMTX/tex/texmf-context/tex/context/base/mkiv/context.mkiv
   mtx-context | current version: 2020.05.09 08:55
   mtx-context | main context file:
   C:/LMTX/tex/texmf-context/tex/context/base/mkiv/context.mkxl
   mtx-context | current version: 2020.05.09 08:55

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

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


Re: [NTG-context] error during the installation of luametatex

2020-05-09 Thread Rik Kabel


On 5/9/2020 02:52, Hans Hagen wrote:
looks like a wrong binary .. should be 2.06.02 .. can you try this 
binary:


http://dl.contextgarden.net/build/luametatex/x86_64-darwin/

(the farm generates two binaries for osx and it looks like the legacy 
machine has gone off line which happens when osx updates itself and 
gets stuck half way, i'll look into it)


Hans


I have the following update log entries (left column is EDT), indicating 
a roll-back of the binary:


   2020-05-07T10:59:03  ConTeXt updated from 2020.04.30T11:15 to
   2020.05.07T11:03
   2020-05-07T10:59:03  LuaMetaTeX updated from 2.05.01 to 2.06.01
   2020-05-07T10:59:03  LuaMetaTeX functionality updated from 20200402
   to 20200506
   2020-05-07T10:59:03
   2020-05-08T15:14:26  ConTeXt updated from 2020.05.07T11:03 to
   2020.05.08T20:50
   2020-05-08T15:14:26  LuaMetaTeX downdated from 2.06.01 to 2.05.01
   2020-05-08T15:14:26  LuaMetaTeX functionality downdated from
   20200506 to 20200402
   2020-05-08T15:14:26
   2020-05-09T09:19:39  ConTeXt updated from 2020.05.08T20:50 to
   2020.05.09T08:55
   2020-05-09T09:19:39    LuaMetaTeX unchanged at 2.05.01
   2020-05-09T09:19:39    LuaMetaTeX functionality unchanged at 20200402
   2020-05-09T09:19:39

Perhaps there is an problem with the installation files?

--
Rik

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

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


Re: [NTG-context] how to interrupt doublesided in particular instance

2020-05-06 Thread Rik Kabel


On 5/6/2020 00:54, jbf wrote:
So simple, Wolfgang. Thanks. I had got close amid all the varieties I 
was trying out to achieve the same result. Perhaps my closest was: 
\setuphead[chapter][pagebreak=chapterverso], but it couldn't quite cut 
it!


Julian

On 6/5/20 1:57 pm, Wolfgang Schuster wrote:

jbf schrieb am 06.05.2020 um 01:31:

Hi list,

I have a document set up in a standard way 
(\setuppagenumbering[alternative=doublesided]) to ensure that new 
chapters always begin on a recto page, but in one particular 
instance only, I want the new chapter to start on the next (verso) 
page instead of creating a blank then starting on the recto side.


I thought I might have been able to force that with \page[no] 
immediately after the previous chapter concluded or before 
\chapter{My new chapter}, but this command is ignored (and may well 
be the wrong command to achieve what I want).


Is there a way to interrupt the setup so the new chapter in this 
case can start on the verso page?


Create a new heading for chapters which can start on left/right pages.

\setuppagenumbering[alternative=doublesided]

\definehead[mychapter][chapter]

\setuphead[mychapter][page=yes]

\starttext

\chapter{Right page}

\chapter{Right page}

\mychapter{New page}

\chapter{Right page}

\stoptext

Wolfgang

___ 



You may want the new /mychapter/ head to appear in the TOC and pdf 
bookmarks as well, so take a look at /\setupcombinedlist/ and 
/\placebookmarks/.


--
Rik

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

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


Re: [NTG-context] Three-deep itemize fails on LMTX

2020-05-04 Thread Rik Kabel


On 5/4/2020 17:13, Wolfgang Schuster wrote:

Rik Kabel schrieb am 04.05.2020 um 23:07:


List,

The following example works with MkIV latest, but fails with LMTX 
latest (Win10 x64). The complaint is ! Missing math style, treated as 
\displaystyle.


\starttext
  \startitemize
  \item
    Level 1 first
    \startitemize
    \item
  Level 2 first
  \startitemize
  \item
    Level 3 first
  \stopitemize
    \stopitemize
  \stopitemize
\stoptext

The culprit is the third level of itemize -- without that it is clean 
on both engines.


I would appreciate knowing if other folks have the same problem, and 
if so, if there is a workaround until a fix can be posted.




It's a math problem.

\starttext
\m{}
\stoptext

Wolfgang


Better MWE, still the same problem.

Thank you for the confirmation.

--
Rik

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

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


[NTG-context] Three-deep itemize fails on LMTX

2020-05-04 Thread Rik Kabel

List,

The following example works with MkIV latest, but fails with LMTX latest 
(Win10 x64). The complaint is ! Missing math style, treated as 
\displaystyle.


   \starttext
  \startitemize
  \item
    Level 1 first
    \startitemize
    \item
  Level 2 first
  \startitemize
  \item
    Level 3 first
  \stopitemize
    \stopitemize
  \stopitemize
   \stoptext

The culprit is the third level of itemize -- without that it is clean on 
both engines.


I would appreciate knowing if other folks have the same problem, and if 
so, if there is a workaround until a fix can be posted.


--
Rik

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

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


[NTG-context] LMTX rollback?

2020-04-27 Thread Rik Kabel

My update script reports:

   2020-04-27T12:40:53  ConTeXt updated from 2020.04.19T19:43 to
   2020.04.26T19:59
   2020-04-27T12:40:53  LuaMetaTeX updated from 2.05.02 to 2.05.01
   2020-04-27T12:40:53  LuaMetaTeX functionality updated from 20200413
   to 20200402

Is this an intentional rollback or a website issue?

--
Rik

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

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


Re: [NTG-context] Hyphentation/Linebreak after x characters

2020-04-23 Thread Rik Kabel


On 4/23/2020 17:50, Wolfgang Schuster wrote:

Benjamin Buchmuller schrieb am 23.04.2020 um 23:16:

Hi Rik,

Thanks for the fast reply! Your example works indeed nicely. However, 
within this solution my problem has shifted now (fully) towards 
breaking after the same number of characters, which seems to work for 
your sample string, but not for the sequences that I need to place.


What I would like to achieve is something like:

5’-GATTGCTTACTCCTGGTTGG
TCTTACATTCTGTCGCCTC
CTACTAGAGCCGGCATATT
CTAGAAGGGCCGCCTTCATGTGG
etc.

(There might be hyphens or not, this is not so much important to me.)

But what I get is currently:

5'-GATTGCTTACTCCTG-
GTTGGTCTTACATTCT-
GTCGCCTCCTACTA-
GAGCCGGCATATTCTA-
GAAGGGCCGCCTTCATGTGGC-
etc.

Which looks ragged with \tt. Certainly, this is because ConTeXt 
applies the default hyphenation pattern. But I guess, there might be 
no “no language” pattern or is there? Also, I agree, it’s a bit odd 
that nright/nleft seem to make no difference towards the result.


Hans posted a solution for a similar problem a few years ago [1]
which can be adapted to your problem.

\startluacode

 local shared = {
 start  = 1,
 length = 1,
 before = nil,
 after  = nil,
 left   = false,
 right  = false,
 }

 local all = table.setmetatableindex({ }, function(t,k)
 return shared
 end)

 languages.hyphenators.traditional.installmethod("dna",
 function(dictionary,word,n)
 return all
 end
 )
\stopluacode

\definehyphenationfeatures
  [dna]
  [characters=all,
   alternative=dna]

\starttext

\startframedtext[width=6cm,style=mono]
  \sethyphenationfeatures[dna]
  \setuphyphenation[method=traditional]
  GATTGCTTACTCCTGGTTGG%
  TCTTACATTCTGTCGCCTC%
  CTACTAGAGCCGGCATATT%
  CTAGAAGGGCCGCCTTCATGTGG%
\stopframedtext

\stoptext

[1] https://mailman.ntg.nl/pipermail/ntg-context/2017/089106.html

Wolfgang


And without lua, just two lines of ConTeXt with a bit of TeX:

   \define[1]\DNA{\handletokens #1\with\DNAspacer}
   \define[1]\DNAspacer{#1\hskip 2.3pt plus .1pt}
   \define[2]\mycommandc{
    \startxrow
    \startxcell o#1 \stopxcell
    \startxcell {\tt\WORD{\DNA{5'-#2}}}\stopxcell
    \stopxrow
    }
   \starttext
   \setupxtable[width=5cm]
   \startxtable
   
\mycommandc{C}{gattgcttactcctggttggtcttacattctgtcgcctcctactagagccggcatattctagaagggccgccttcatgtggcctagggcaccatcgcgtacgagggcaatgagtttaccgctgcgaagtctctacgtcacggccaaccacagtcctgctcccaacgaaatttagacgctgtcgtgaaacctgaattcgaggataagccgcgtcatgaagagtctactg}
   \stopxtable
   \stoptext

Modify the skip as you see fit.

--
Rik

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

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


Re: [NTG-context] Hyphentation/Linebreak after x characters inside \WORD?

2020-04-23 Thread Rik Kabel


On 4/23/2020 15:01, Benjamin Buchmuller wrote:

Sorry, I have just realized that the problem might not be \WORD{} actually, so 
this one hyphenates:

\define[2]\mycommand{
\startxrow
\startxcell o#1 \stopxcell
\startxcell \tt\WORD #2 \stopxcell
\stopxrow
}

Whereas these ones don’t:


\define[2]\mycommand{
\startxrow
\startxcell o#1 \stopxcell
\startxcell \tt\WORD #2-3' \stopxcell
\stopxrow
}

\define[2]\mycommand{
\startxrow
\startxcell o#1 \stopxcell
\startxcell 5'-\tt\WORD #2 \stopxcell
\stopxrow
}

Assuming that this has to do with the presence of “-“ which will be the 
preferred breakpoint. So, I guess the questions boils down to how to define the 
second argument of

\definebreakpoint[mybreaks][][nright=12,nleft=12,type=1]

in this case or how to “deactivate” the default \setbreakpoints[compound]?



On 23 Apr 2020, at 20:46, Benjamin Buchmuller  
wrote:

Hi again,

I am reading a CSV file into ConTeXt which contains long DNA sequences (>> 40 
characters) to place in xtables. So far, this works fine. However, I need to 
uppercase the entries and need to \tt them. When I do this inside \WORD however, they 
don’t hyphenate any more.

I’m using:

\defineseparatedlist
[mylist]
[
separator={,}, quotechar={"},
command=\mycommand
]

\define[2]\mycommand{
\startxrow
\startxcell o#1 \stopxcell
\startxcell 5’-{\tt\WORD{#2}}-3' \stopxcell
\stopxrow
}

Since I don’t have access to each entry, I cant place hyphenation marks 
directly. Is there a way to tell ConTeXt to hyphenate after say, 12 characters?

Thanks for your help.


Benjamin


The following works for me:

   \define[2]\mycommanda{
    \startxrow
    \startxcell o#1 \stopxcell
    \startxcell \tt\WORD #2 \stopxcell
    \stopxrow
    }

   \define[2]\mycommandb{
    \startxrow
    \startxcell o#1 \stopxcell
    \startxcell \tt\WORD #2-3' \stopxcell
    \stopxrow
    }

   \define[2]\mycommandc{
    \startxrow
    \startxcell o#1 \stopxcell
    \startxcell 5'-\tt\WORD #2 \stopxcell
    \stopxrow
    }

   \definebreakpoint[mybreaks][][nright=12,nleft=12,type=1]
   \setbreakpoints[mybreaks]

   \starttext

   \setupxtable[width=5cm]
   \startxtablex
   \mycommanda{A}{lsfkgjfkgshgkhigewhgajkdkfkalhfdklahfkhaakfakfh}
   \mycommandb{B}{lsfkgjfkgshgkhigewhgajkdkfkalhfdklahfkhaakfakfh}
   \mycommandc{C}{lsfkgjfkgshgkhigewhgajkdkfkalhfdklahfkhaakfakfh}
   \stopxtable

   \stoptext

Producing:

Indeed, it produces the same when nleft and nright are both set to 1 or 
12 or 100, but not when setbreakpoints is removed.


If you are trying to do something else, please provide an MWE.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] unwanted with epub

2020-03-04 Thread Rik Kabel


On 3/3/2020 16:51, Hans van der Meer wrote:
In producing epub s are appearing (on the -raw.xml file) that 
are unwanted and seem spurious to me. For example aftersome macro's.
Can someone tell me what triggers a ? In the pdf output such 
breaks are absent.


dr. Hans van der Meer

There are many situations in which the export contains break elements 
that don't appear to be associated with aspects of the pdf output.  See, 
for example, the following messages from 2018 in which I noted a few of 
them:


 * Spurious breaks in export when blank line ends paragraph
   
 * More spurious problems in exports
   
 * Unexpected  in XML output
   

If you provide an example of your ConTeXt source demonstrating the 
problem, perhaps someone on the list can help.


--
Rik

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

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


Re: [NTG-context] Quick question about dual output pdf and epub

2020-03-03 Thread Rik Kabel
Instructions for creating the .epub from the export are contained in the 
log file.


On 3/3/2020 15:58, Hans van der Meer wrote:

I followed your advice and added the setup:


You need
  \setupbackend[export=yes]
in your document.

This, however, does not result in an .epub file but an export directory 
containing an html and xhtml file (only partially conformant to the equivalent 
pdf).

Can I get the output as an .epub file? Some more changes needed?


On Tue, 3 Mar 2020 19:37:47 +0100
Hans van der Meer  wrote:


and then run with --mode=epub

I am running with:
mtxrun --autogenerate --mode=epub --script context "$1"
but no epub document is generated, just the same result.pdf I get without that 
mode.

You need

  \setupbackend[export=yes]

in your document. When you put the setup above in a "epub"
mode you create a epub-document only when you enable the mode
which is recommended because it can have side effects for
the normal PDF.

To avoid these side effects make an extra ConTeXt run
by enabling the mode to get the epub file.

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

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

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

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

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

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


Re: [NTG-context] attachments working again (issue with /EmbeddedFiles)

2020-02-13 Thread Rik Kabel


On 2/13/2020 03:56, Hans Hagen wrote:

On 2/13/2020 12:45 AM, Rik Kabel wrote:

Perhaps there is something in the difference between annotations and 
attachments that results in different treatments by the various viewers.
it has always been that messy; there's also the annotation symbol 
treatment that can differ; it doesn't help that acrobat changed 
behaviour a couple of times i think


this is why the whole attachment handling was as it is: some 
comprimise that kind of made them show up ok on the average; but 
validatin spoiled this and now we're stick with these incompatible 
viewer behaviour .. not much we can do about it i fear


(For instance, i remember that at some point acrobat showed 
attachments twice in some lists. Often these features ended up in 
specs without viewer support yet so probably not well tested for 
interferences either.)


Hans


The further I look into bookmark, annotation, and attachment handling by 
a number of viewers, the more confusing things appear. And Acrobat still 
shows attachments twice under some circumstances, with the helpful 
flyover for one entry giving the location as the associated page number, 
and for the other giving it as the attachments tab.


What is more troublesome on the ConTeXt side is the validation issue 
with the appearance dictionary for visible attachments.


The difference between validators when looking at the hidden attachment 
in my example hinges on the handling of the attachment mime type. I have 
filed a defect report with VeraPDF, which appears to be rejecting valid 
mime type that includes a charset clause.


--
Rik

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

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


Re: [NTG-context] attachments working again (issue with /EmbeddedFiles)

2020-02-12 Thread Rik Kabel
Following up on my viewer observations, I downloaded Evince for Windows 
version 2.32 and see something that might be meaningful.


Evince has a side-panel with a drop-down for selecting Thumbnails, 
Index, Attachments, Layers, or Annotations. Those that are not present 
in the document are greyed out.


For the document with the pushpin (which Evince does display) the 
available choices are Thumbnails and Annotations. The Annotations 
selection shows the attached file on a tree under Page 1.


For the document with the hidden attachment, both the Attachments and 
the Annotations choices are available. When Annotations is selected, the 
message "/Document contains no annotations/" is shown. When Attachments 
is selected, the attachment is properly listed.


Perhaps there is something in the difference between annotations and 
attachments that results in different treatments by the various viewers.


--
Rik

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

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


Re: [NTG-context] attachments working again (issue with /EmbeddedFiles)

2020-02-12 Thread Rik Kabel

On 2/12/2020 14:20, Pablo Rodriguez wrote:

On 2/8/20 10:13 PM, Rik Kabel wrote:


Not quite ready yet. When the hidden method is used, it passes the
online validator[1], but fails VeraPDF[2] for clause 6.8-1. When
visible, it fails the online validator stating that the appearance
dictionary doesn't contain an entry, and fails VeraPDF for clauses 6.8-1
and 6.3.3-1.

Hi Rik,

as for 6.8-1, did you set MIME type of the attached file (such as in
"type={application/pdf}")?


Oddly, the bookmarks do not appear either way under MkIV, and they do
not appear when the attachment is visible under LMTX. The bookmarks do
appear with a hidden attachment under LMTX.

As far as I understand, only LMTX will receive regular updates now. (But
Hans knows better .)

I get both visible attachments and bookmarks in LMTX (latest and
previous latest [“latest” is the new beta]).

Could you provide a minimal sample that shows the issue?

Pablo
--
http://www.ousia.tk


Hello Pablo (and everyone else),

Here is my test file. You can use "context --mode=hidden file.tex" to 
hide the pushpin, or  leave out the mode to expose it.


   %%  Test file for pdf3a compliance.
   %%
   %%  So far, this fails when the attachment is included. Other than the
   %%handling of attachments, ConTeXt does a good job with the various
   %%PDF/A variants.
   %%
   %%  Testing done locally with the VeraPDF validator (most recently with
   %%version 1.14.8) and online with the 3-Heights validator found at
   %%https://www.pdf-online.com/osa/validate.aspx (current 2020-01-20).
   %%
   %%  This is not a minimal example.
   \definemode  [hidden][keep]
   \setuplanguage   [en]
   \setuppapersize  [A6,landscape]
   \setuppagenumbering  [location=]
   \setuptagging[state=start]
   \setupinteraction[state=start]
   %setupbackend[format={pdf/a-3u},
   \setupbackend[format={pdf/a-3a},
  level=0,
  profile={default_gray.icc},
  intent={ISO coated v2 300\letterpercent\space (ECI)}]
   \setupstructure  [state=start,
  method=auto]
   \setupcolors [pagecolormodel=auto,
  start=yes,
  rgb=no,
  cmyk=no]
   \setupbodyfont   [palatino,18pt]
   \starttext

 This document was produced using version \contextversion\ of
 \ConTeXt\ \doifelse{\texenginename}{luametatex}{LMTX}{\contextmark}
 with the version \texengineversion\ of \texenginename.

 


 \attachment[file=./\jobname.tex,
 method={\doifmodeelse{hidden}{hidden}{normal}},
 type={text/plain;charset=UTF-8}]
 The source code for this document is attached as a plain text file. It
 should show up in the pdf bookmarks for the document\doifmodeelse
 {hidden}{}{ and through the icon at the start of this paragraph}.

   \stoptext

I have tested with LMTX 2020.02.11 16:41.

*Mime type*

 * You can see that the mime type is set in the ConTeXt file and it
   appears in the resulting pdf, although not knowing enough about the
   pdf file structure I do not know if it appears correctly.

*Validation*

 * With the pin hidden, VeraPDF 1.14.8 complains about two occurrences
   of clause 6.8 test 1 failure. With the pin exposed, it complains
   about one occurrence of clause 6.8 test 1 failure and one occurrence
   of clause 6.3.3 test 1 failure (appearance dictionary).
 * With the pin hidden, pdf-online.com declares the  valid. With the
   pin exposed, pdf-online.com fails it because "[t]he appearance
   dictionary doesn't contain an entry." They are aware of the
   difference between their report and that of VeraPDF.

*Viewing*

 * Acrobat Reader DC shows the pushpin, changes the pointer, and
   displays flyover text when appropriate and shows the bookmark for
   both variants.
 * SumatraPDF shows the pushpin, changes the pointer, and displays
   flyover text when appropriate. It does not show the bookmark when
   the pushpin is visible, but does show it when it is hidden.
 * MuPDF does not show the pushpin, instead leaving empty space, when
   it should be visible. It does not show bookmarks or any other
   indication that there is an attachment for either variant. (MuPDF
   can show bookmarks for some other documents.)
 * Firefox 73 does not show the pushpin when it should be visible, but
   does change the pointer and show the attachment name as a flyover.
   Firefox 73 does show the bookmark for both variants.
 * Chrome 80 does not show the pushpin when it should be visible, but
   does show the attachment name as a flyover. Chrome 80 does not show
   the bookmark for either variant. (Chrome 80 does show bookmarks for
   some other PDF document.)
 * The three viewers listed here that do not show the pushpin do
   reserve the appropriate space ­ ­– changing the symbol to

Re: [NTG-context] attachments working again (issue with /EmbeddedFiles)

2020-02-08 Thread Rik Kabel


On 2/8/2020 12:32, Pablo Rodriguez wrote:

On 2/8/20 1:45 PM, Peter Rolf wrote:

[...]

I attached the current code, so you and Rik are able to test it if you
want (creating a new format is required). Best contact me off-list if
you run into new problems.

Hi Peter,

the new version is fine for me.

 From what I see, /F is now set to 4 (print).

Many thanks for your help,

Pablo
--
http://www.ousia.tk


Not quite ready yet. When the hidden method is used, it passes the 
online validator[1], but fails VeraPDF[2] for clause 6.8-1. When 
visible, it fails the online validator stating that the appearance 
dictionary doesn't contain an entry, and fails VeraPDF for clauses 6.8-1 
and 6.3.3-1.


Oddly, the bookmarks do not appear either way under MkIV, and they do 
not appear when the attachment is visible under LMTX. The bookmarks do 
appear with a hidden attachment under LMTX.


The results are generally better than before this updated lpdf-wid.lua.

[1] https://www.pdf-online.com/osa/validate.aspx

[2] Version 1.14.8, which I believe is the current version

--
Rik

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

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


Re: [NTG-context] attachments working again (issue with /EmbeddedFiles)

2020-02-07 Thread Rik Kabel


On 2/7/2020 14:46, Pablo Rodriguez wrote:

many thanks for having fixed the issues with attachments (in latest beta
from 2020.02.07 18:36). I haven’t tested attachments with PDF/A-3a.


PDF/A-3a attachments still fail validation with the same issues.

--
Rik

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

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


Re: [NTG-context] Epub export css buglets

2020-01-17 Thread Rik Kabel

On 1/10/2020 10:59, Rik Kabel wrote:

Here ya go, about as minimal as I can imagine:

\setupbackend [export=yes]
\setupexport  []
\starttext
!
\stoptext

and in the resulting export styles directory, I get:

g:\yoiks-export\styles>grep "namespace\|weight.*italic\|text-width" *.css
yoiks-defaults.css:@namespace context 
url('http://www.pragma-ade.com/context/export') ;
yoiks-defaults.css: font-weight : italic ;
yoiks-images.css:@namespace context url('%namespace%') ;
yoiks-styles.css:@namespace context url('%namespace%') ;
yoiks-styles.css:text-width : justify !important ;
yoiks-templates.css:@namespace context url('%namespace%') ;

So:

  * three unexpanded %namespace%s,
  * one invalid property (text-width),
  * and one incorrect property (font-weight should be font-style).

The *namespace* and *text-width* issues are now fixed, but the 
*font-weight : italic* fault in default.css remains.


I also note that the W3C CSS validator reports for styles.css:

   11     document, div.document     inherited is not a hyphens value :
   inherited

That validator (and others) also report a number of issues for the 
@counter-style rule, which seems to have changed significantly since 
this CSS was developed. Validators report a number of smaller issues as 
well.


I understand that export output is a low-priority feature.

--
Rik


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

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


Re: [NTG-context] Keep photographer in one line in a caption

2020-01-11 Thread Rik Kabel

On 1/11/2020 14:31, Henning Hraban Ramm wrote:

Yet another small problem:
I my photo captions, the photographer should be right aligned and in one line, 
i.e. if it doesn’t fit into the last line of the caption, it should move to the 
next line. ATM I’m clueless...

That’s not enough (also not a MWE):

\define[1]\Foto{\hfill\hbox{\tfx Foto: #1}}


Best, Hraban


Doesn't \wordright do what you want?

--
Rik

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

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


Re: [NTG-context] fancy chapter setup

2020-01-11 Thread Rik Kabel
pter head
 [Lettrine=yes,setFirst=5W]

   ...

   \stopchapter

   \startchapter[reference={cha:more},
  title={more stuff}]
  [lettrine=yes]

   ...

   \stopchapter


--
Rik Kabel



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

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


Re: [NTG-context] Epub export css buglets

2020-01-10 Thread Rik Kabel

On 1/9/2020 11:25, Hans Hagen wrote:

On 1/6/2020 7:08 PM, Rik Kabel wrote:

A couple of small issues with the css for epub output.

First, back-exp.lua creates, in \jobname-styles.css

    @namespace context url('%namespace%') ;

This should probably be:

    @namespace context url('http://www.pragma-ade.com/context/export') ;

That file also has:

    document,
    %namespace%div.document {
 font-size  : %size% !important ;
 max-width  : %width% !important ;
 text-width : %align% !important ;
 hyphens    : %hyphens% !important ;
    }

which contains the invalid css property text-width. Perhaps that 
should be text-align or text-justify.


Something else appears to be creating, in \jobname-defaults.css:

    pubfld[detail="title"],
    div.pubfld.title {
 display : inline ;
 font-weight : italic ;
    }

which incorrectly assigns italic to font-weight when of course it  is 
a font-style as far as css is concerned. This can be seen in file 
export-example.css in the distribution.

can you make a mwe ...



Here ya go, about as minimal as I can imagine:

   \setupbackend [export=yes]
   \setupexport  []
   \starttext
   !
   \stoptext

and in the resulting export styles directory, I get:

   g:\yoiks-export\styles>grep "namespace\|weight.*italic\|text-width" *.css
   yoiks-defaults.css:@namespace context 
url('http://www.pragma-ade.com/context/export') ;
   yoiks-defaults.css: font-weight : italic ;
   yoiks-images.css:@namespace context url('%namespace%') ;
   yoiks-styles.css:@namespace context url('%namespace%') ;
   yoiks-styles.css:text-width : justify !important ;
   yoiks-templates.css:@namespace context url('%namespace%') ;

So:

 * three unexpanded %namespace%s,
 * one invalid property (text-width),
 * and one incorrect property (font-weight should be font-style).

--
Rik

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

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


[NTG-context] Epub export css buglets

2020-01-06 Thread Rik Kabel

A couple of small issues with the css for epub output.

First, back-exp.lua creates, in \jobname-styles.css

   @namespace context url('%namespace%') ;

This should probably be:

   @namespace context url('http://www.pragma-ade.com/context/export') ;

That file also has:

   document,
   %namespace%div.document {
font-size  : %size% !important ;
max-width  : %width% !important ;
text-width : %align% !important ;
hyphens: %hyphens% !important ;
   }

which contains the invalid css property text-width. Perhaps that should 
be text-align or text-justify.


Something else appears to be creating, in \jobname-defaults.css:

   pubfld[detail="title"],
   div.pubfld.title {
display : inline ;
font-weight : italic ;
   }

which incorrectly assigns italic to font-weight when of course it  is a 
font-style as far as css is concerned. This can be seen in file 
export-example.css in the distribution.


--
Rik

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

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


Re: [NTG-context] issues with attachments

2019-12-26 Thread Rik Kabel


On 12/18/2019 11:32, Pablo Rodriguez wrote:

Hi Hans,

I accidentally discovered that file attachment generates two entries in
Acrobat, such as this sample:

 \setuppapersize[A5]
 \showframe
 \setupinteraction[state=start]
 \setupinteractionscreen[option=attachment]
 \starttext
 a\attachment[file=xml-mkiv.pdf, name={attached.pdf}]
 \stoptext

This happens with latest beta (from 2019.12.17) in both MkIV and MkXL.

https://www.pdfa.org/wp-content/uploads/2018/10/PDF20_AN002-AF.pdf#search=usability
warns about the use of both /EmbeddedFiles and /FileAttachment
annotations. Acrobat seems to be the problematic software.

I think it is fine to have /FileAttachment annotations for
"method=normal" and /EmbeddedFiles for "method=hidden".

Would be also possible that the entries in /Embeddedfiles use the value
for "name" instead of "file" (when specified)?

And for the /EmbeddedFile annotation, would it be possible to add the
value for /Size entry (uncompressed size of the file in bytes,
https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#page=112)
in the /Params dictionary?

This is the way to avoid that Acrobat displays no uncompressed size but
real uncompressed size (I guess both values would be very similar, when
not the same).

Many thanks for your help,

Pablo
--
http://www.ousia.tk



I second this request. The bookmark is taking on the file= name, and not 
that of name=. It would be better to take the name=, or to add a 
bookmark= key.


--
Rik

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

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


Re: [NTG-context] Adjust kern for one character

2019-12-26 Thread Rik Kabel


On 12/26/2019 08:40, Hans Hagen wrote:

On 12/26/2019 1:41 PM, Rik Kabel wrote:

Okay, I have progressed further but have run into something (else) I 
cannot understand. Consider the following example:


    \definefontfeature   [myserif] [mode=node,kern=yes,xkern=yes]
    \definefontfeature   [mysans]  [mode=node,kern=yes,xkern=no]
    \definefontfeature   [none]    [mode=node]
    \definefontfamily    [mykerns] [serif] [Baskervaldx] 
[features=myserif]
    \definefontfamily    [mykerns] [sans]  [Dejavusans] 
[features=mysans]
    \definefontfamily    [default] [serif] [Baskervaldx] 
[features=default]
    \definefontfamily    [default] [sans]  [Dejavusans] 
[features=default]

    \definefontfamily    [nokerns] [serif] [Baskervaldx] [features=none]
    \definefontfamily    [nokerns] [sans]  [Dejavusans] [features=none]
    \definefontfamily    [legends] [mono]  [Dejavusansmono] 
[features=default]


    \startluacode
   fonts.handlers.otf.addfeature {
   name = "kern",
   type = "kern",
   data = {
   ["x"] = { ["x"] = -300 },
   [" "] = { ["A"] = 1000 }
   }
   }
   fonts.handlers.otf.addfeature {
   name = "xkern",
   type = "kern",
   data = {
   ["x"] = { ["x"] = 500 },
   [" "] = { ["J"] = 500 }
   }
   }
    \stopluacode

    \startbuffer[Sample]
   g, Jaxxb AJon
    \stopbuffer

    \define[2]\Test{
   {\switchtobodyfont[#1]#2\getbuffer[Sample]}}

    \setupbodyfont[legends]

    \starttext
    \starttabulate[|l|l|l|]
    \NC test \NC  Serif    \NC Sans 
\NC \NR
    \NC nokerns  \NC  \Test{nokerns}{\tf}  \NC \Test{nokerns}{\ss}  
\NC \NR
    \NC default  \NC  \Test{default}{\tf}  \NC \Test{default}{\ss}  
\NC \NR
    \NC mykerns  \NC  \Test{mykerns}{\tf}  \NC \Test{mykerns}{\ss}  
\NC \NR

    \stoptabulate
    \stoptext

It shows, as far as I see, that the kern feature type supports " ", 
but only when it is named kern. When it is named xkern, as here, it 
does not support spaces, but does support other characters.
Indeed it's currently bound to 'kern' (mostly for convenience and a 
little for performance) but it's not that hard to make it a bit more 
flexible (but not today).


Hans


Thank you for the confirmation. I look forward to the update.

--
Rik

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

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


Re: [NTG-context] Adjust kern for one character

2019-12-26 Thread Rik Kabel


On 12/23/2019 18:45, Rik Kabel wrote:


On 12/22/2019 21:34, Henri Menke wrote:



On 12/23/19 3:33 PM, Henri Menke wrote:

On 12/23/19 2:30 PM, Rik Kabel wrote:


On 12/22/2019 17:40, mf wrote:

Il 22/12/19 22:19, Rik Kabel ha scritto:

List,

Is there a way in ConTeXt to adjust the left-side kern for one
character? The cap J in the font I am using is being set too 
close to

the preceding characters and I would rather not insert a thinspace
before each. (Inserting a thinspace is sufficient, but finer control
is welcome.)


\definecharacterspacing[distantJ]
\setupcharacterspacing[distantJ]["004A][left=.15,alternative=1] % 
004A

is the unicode hex index of letter J
\starttext
    normal: AJB\par
    \setcharacterspacing[distantJ] more space on the left: AJB\par
    \resetcharacterspacing normal again: AJB\par
\stoptext


Thank you for that, Massi.

Unfortunately, that is too blunt an instrument in this case -- in
addition to the body font where the problem exists, it works on the
heading and titling font, which does not share the problem.

As Henri's answer hints, I was a bit unclear in my request. It is a 
kern

between a word space and the cap J that is the issue. Perhaps a font
feature file is the place to do such a thing.


\startluacode
fonts.handlers.otf.addfeature {
  name = "kern",
  type = "kern",
  data = {
  [" "] = {
  ["J"] = 1000 % exaggerated value


Should of course be a Lua comment

    ["J"] = 1000 -- exaggerated value


  }
  }
}
\stopluacode

\setupbodyfont[modern] % have to reload the font

\starttext

No Jokes!

\stoptext


Henri,

This looks very promising. It works, mostly. That is, all fonts that 
use default fontfeatures pick up the change. So, for example, the 
companion sansserif for my body font also gets it even though that is 
not what I want.


I can remove kerning from the default fontfeatures and add it back 
just for the problematic font, but that means no kerning for the sans 
font.


Is there a way to apply this to one font only (serif upright, bold, 
italic, ...) or even a single face (upright), perhaps by giving it a 
unique name? I have tried a few variations but had no success. The 
fonts-mkiv manual has very little on this, and the cld manual nothing.


Okay, I have progressed further but have run into something (else) I 
cannot understand. Consider the following example:


   \definefontfeature   [myserif] [mode=node,kern=yes,xkern=yes]
   \definefontfeature   [mysans]  [mode=node,kern=yes,xkern=no]
   \definefontfeature   [none][mode=node]
   \definefontfamily[mykerns] [serif] [Baskervaldx][features=myserif]
   \definefontfamily[mykerns] [sans]  [Dejavusans] [features=mysans]
   \definefontfamily[default] [serif] [Baskervaldx][features=default]
   \definefontfamily[default] [sans]  [Dejavusans] [features=default]
   \definefontfamily[nokerns] [serif] [Baskervaldx][features=none]
   \definefontfamily[nokerns] [sans]  [Dejavusans] [features=none]
   \definefontfamily[legends] [mono]  [Dejavusansmono] [features=default]

   \startluacode
  fonts.handlers.otf.addfeature {
  name = "kern",
  type = "kern",
  data = {
  ["x"] = { ["x"] = -300 },
  [" "] = { ["A"] = 1000 }
  }
  }
  fonts.handlers.otf.addfeature {
  name = "xkern",
  type = "kern",
  data = {
  ["x"] = { ["x"] = 500 },
  [" "] = { ["J"] = 500 }
  }
  }
   \stopluacode

   \startbuffer[Sample]
  g, Jaxxb AJon
   \stopbuffer

   \define[2]\Test{
  {\switchtobodyfont[#1]#2\getbuffer[Sample]}}

   \setupbodyfont[legends]

   \starttext
   \starttabulate[|l|l|l|]
   \NC test \NC  Serif\NC  Sans \NC \NR
   \NC nokerns  \NC  \Test{nokerns}{\tf}  \NC  \Test{nokerns}{\ss}  \NC \NR
   \NC default  \NC  \Test{default}{\tf}  \NC  \Test{default}{\ss}  \NC \NR
   \NC mykerns  \NC  \Test{mykerns}{\tf}  \NC  \Test{mykerns}{\ss}  \NC \NR
   \stoptabulate
   \stoptext

It shows, as far as I see, that the kern feature type supports " ", but 
only when it is named kern. When it is named xkern, as here, it does not 
support spaces, but does support other characters.


If I can get support for a separate feature name, I can easily apply 
this corrective kern to the single problematic font.


I also tried a goodie file, but it, too, did not support the " ".

--
Rik

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

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


Re: [NTG-context] Adjust kern for one character

2019-12-23 Thread Rik Kabel


On 12/22/2019 21:34, Henri Menke wrote:



On 12/23/19 3:33 PM, Henri Menke wrote:

On 12/23/19 2:30 PM, Rik Kabel wrote:


On 12/22/2019 17:40, mf wrote:

Il 22/12/19 22:19, Rik Kabel ha scritto:

List,

Is there a way in ConTeXt to adjust the left-side kern for one
character? The cap J in the font I am using is being set too close to
the preceding characters and I would rather not insert a thinspace
before each. (Inserting a thinspace is sufficient, but finer control
is welcome.)


\definecharacterspacing[distantJ]
\setupcharacterspacing[distantJ]["004A][left=.15,alternative=1] % 004A
is the unicode hex index of letter J
\starttext
    normal: AJB\par
    \setcharacterspacing[distantJ] more space on the left: AJB\par
    \resetcharacterspacing normal again: AJB\par
\stoptext


Thank you for that, Massi.

Unfortunately, that is too blunt an instrument in this case -- in
addition to the body font where the problem exists, it works on the
heading and titling font, which does not share the problem.

As Henri's answer hints, I was a bit unclear in my request. It is a 
kern

between a word space and the cap J that is the issue. Perhaps a font
feature file is the place to do such a thing.


\startluacode
fonts.handlers.otf.addfeature {
  name = "kern",
  type = "kern",
  data = {
  [" "] = {
  ["J"] = 1000 % exaggerated value


Should of course be a Lua comment

    ["J"] = 1000 -- exaggerated value


  }
  }
}
\stopluacode

\setupbodyfont[modern] % have to reload the font

\starttext

No Jokes!

\stoptext


Henri,

This looks very promising. It works, mostly. That is, all fonts that use 
default fontfeatures pick up the change. So, for example, the companion 
sansserif for my body font also gets it even though that is not what I want.


I can remove kerning from the default fontfeatures and add it back just 
for the problematic font, but that means no kerning for the sans font.


Is there a way to apply this to one font only (serif upright, bold, 
italic, ...) or even a single face (upright), perhaps by giving it a 
unique name? I have tried a few variations but had no success. The 
fonts-mkiv manual has very little on this, and the cld manual nothing.


--
Rik

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

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


Re: [NTG-context] Adjust kern for one character

2019-12-22 Thread Rik Kabel


On 12/22/2019 17:40, mf wrote:

Il 22/12/19 22:19, Rik Kabel ha scritto:

List,

Is there a way in ConTeXt to adjust the left-side kern for one 
character? The cap J in the font I am using is being set too close to 
the preceding characters and I would rather not insert a thinspace 
before each. (Inserting a thinspace is sufficient, but finer control 
is welcome.)



\definecharacterspacing[distantJ]
\setupcharacterspacing[distantJ]["004A][left=.15,alternative=1] % 004A 
is the unicode hex index of letter J

\starttext
  normal: AJB\par
  \setcharacterspacing[distantJ] more space on the left: AJB\par
  \resetcharacterspacing normal again: AJB\par
\stoptext


Thank you for that, Massi.

Unfortunately, that is too blunt an instrument in this case -- in 
addition to the body font where the problem exists, it works on the 
heading and titling font, which does not share the problem.


As Henri's answer hints, I was a bit unclear in my request. It is a kern 
between a word space and the cap J that is the issue. Perhaps a font 
feature file is the place to do such a thing.


--
Rik

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

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


[NTG-context] Adjust kern for one character

2019-12-22 Thread Rik Kabel

List,

Is there a way in ConTeXt to adjust the left-side kern for one 
character? The cap J in the font I am using is being set too close to 
the preceding characters and I would rather not insert a thinspace 
before each. (Inserting a thinspace is sufficient, but finer control is 
welcome.)


--
Rik

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

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


Re: [NTG-context] Disappearing font feature

2019-12-22 Thread Rik Kabel

On 12/22/2019 06:08, Hans Hagen wrote:


btw, this happens often, like with oldstyle, the wished default is the 
hard coded default so one has to enable/disable


now, what you miss is that you define a font without applying any 
features ...




Thank you, Hans,

I see now that SS01 reverses the default setting for the font. The 
default for the italic faces is the single-storey form, so I need only 
apply the changed feature to the upright faces to get what I want.


--
Rik


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

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


[NTG-context] Disappearing font feature

2019-12-21 Thread Rik Kabel

List,

I have a strange case of a font feature disappearing when many fonts are 
used.


In creating a sampler for the Jost* font (free at 
https://indestructibletype.com/Jost.html) and using its feature ss01 to 
get single-storey lower-case a, the font reverts to the default 
two-storey a when many weights are shown. When I create the fonts with 
\definefontfamily, the upright weights are fine and the italic weights 
revert. When I create the fonts with \definefont, the reverse is the case.


Below is the demonstration for the \definefont variation and a snip of 
the failing result.


   \definebodyfontenvironment[13pt]
 [interlinespace=15pt]

   \setuplayout [backspace=0pt,
  topspace=30pt,
  width=middle,
  height=middle,
  location=middle,
  header=0pt,
  footer=0pt]

   \setuppagenumbering  [location=]

   \definefontfeature   [default]
 [default]
 [ss01=yes]

   \definefont  [JHair] [jost-100-hairline]
   \definefont  [JThin] [jost-200-thin]
   \definefont  [JLigh] [jost-300-light]
   \definefont  [JBook] [jost-400-book]
   \definefont  [JMedi] [jost-500-medium]
   \definefont  [JSemi] [jost-600-semi]
   \definefont  [JBold] [jost-700-bold]
   \definefont  [JHeav] [jost-800-heavy]
   \definefont  [JBlac] [jost-900-black]

   \definefont  [JHairI][jost-100-hairlineitalic]
   \definefont  [JThinI][jost-200-thinitalic]
   \definefont  [JLighI][jost-300-lightitalic]
   \definefont  [JBookI][jost-400-bookitalic]
   \definefont  [JMediI][jost-500-mediumitalic]
   \definefont  [JSemiI][jost-600-semiitalic]
   \definefont  [JBoldI][jost-700-bolditalic]
   \definefont  [JHeavI][jost-800-heavyitalic]
   \definefont  [JBlacI][jost-900-blackitalic]

   \startbuffer [Sampler]
 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
 a b c d e f g h i j k l m n o p q r s t u v w x y z à ë í ô ç
 1 2 3 4 5 6 7 8 9 0 ` \texttilde\ - = !  @ \# \$ \letterpercent\ ^ \&
 * ( ) _ + [ ] \textbackslash\ ; ' , . / \{ \} \| : " < > ?
 \fontname\font
   \blank   [line]
   \stopbuffer

   \setupalign  [middle]

 
   \starttext

   \obeylines

   \JHair \getbuffer[Sampler]
   \JThin \getbuffer[Sampler]
   \JLigh \getbuffer[Sampler]
   \JBook \getbuffer[Sampler]
   \JMedi \getbuffer[Sampler]
   \JSemi \getbuffer[Sampler]
   \JBold \getbuffer[Sampler]
   \JHeav \getbuffer[Sampler]
   \JBlac \getbuffer[Sampler]
   \page
   \JHairI\getbuffer[Sampler]
   \JThinI\getbuffer[Sampler]
   \JLighI\getbuffer[Sampler]
   \JBookI\getbuffer[Sampler]
   \JMediI\getbuffer[Sampler]
   \JSemiI\getbuffer[Sampler]
   \JBoldI\getbuffer[Sampler]
   \JHeavI\getbuffer[Sampler]
   \JBlacI\getbuffer[Sampler]

   \stoptext

Below is the demonstration for the \definefontfamily variation and a 
snip of the expected result, although the italics fail.


   \definebodyfontenvironment[13pt]
 [interlinespace=15pt]

   \setuplayout [backspace=0pt,
  topspace=15pt,
  width=middle,
  height=middle,
  location=middle,
  header=0pt,
  footer=0pt]

   \setuppagenumbering  [location=]

   \definefontfeature   [default]
 [default]
 [ss01=yes]
   \definefontfamily[up-one]
 [sansserif]
 [Jost]
 [tf={style:hairline,features},
  bf={style:thin,features},
  bi={style:light,features},
  it={style:book,features}]
   \definefontfamily[up-two]
 [sansserif]
 [Jost]
 [tf={style:medium,features},
  bf={style:semi,features},
  bi={style:bold,features},
  it={style:heavy,features}]
   \definefontfamily[up-three]
 [sansserif]
 [Jost]
 [tf={style:black,features},
  bf={style:black,features},
  bi={style:black,features},
  it={style:black,features}]
   \definefontfamily[it-one]
 [sansserif]
 [Jost]
 [tf={style:hairlineitalic,features},
  bf={style:thinitalic,features},
  bi={style:lightitalic,features},
  

[NTG-context] blank[\lineheight] works with LMTX, fails with MkIV

2019-12-20 Thread Rik Kabel

MkIV fails with

   tex error   > tex error on line 3 in file 
c://Users/micro/Desktop/fail.tex: ! Missing \endcsname inserted

given the following mwe:

   \starttext
   a
   \blank[\lineheight]
   z
   \stoptext

Not critical as there are lots of ways to do this, but it seems strange 
that it should work in one and not the other.


--
Rik

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

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


Re: [NTG-context] LMTX Tagging and overlay

2019-12-16 Thread Rik Kabel

Fixed in 20191216 update.

Thank you.

--
Rik


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

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


Re: [NTG-context] LMTX Tagging and overlay

2019-12-15 Thread Rik Kabel
Tested with 20191212 and 20191215, still not working. Is anyone else 
been able to confirm the issue?


--
Rik

On 12/10/2019 23:36, Rik Kabel wrote:


Dear list,

With the example below (perhaps not minimal, but I have stripped out 
as much as I could), the second page is set completely in the color of 
the overlay. This also happens when a layer is used instead of an 
overlay. When tagging is turned off, the colors are what they should 
be. When a few lines are removed from the first page, the colors are 
correct as well, but ...


Attached is the resulting pdf.

LMTX 20191206 only. MKIV 20191206 is fine.

Error on my part, or bug?

% \definelayer   [WatermarkOverlay]
%    [repeat=yes,
% width=\paperwidth,
% height=\paperheight]
% \setlayerframed    [WatermarkOverlay]
%    [preset=center]
%    [foregroundcolor=red,frame=off]
% {\scale[factor=max]{\rotate[rotation=60.0]{~Oops!~}}}

\defineoverlay   [WatermarkOverlay]
 [{\framed[frame=off,
   foregroundcolor=red]
  {\scale[factor=max]
   {\rotate[rotation=60.0]
    {~Oops!~]

\setupbackgrounds    [page]
 [background=WatermarkOverlay]

%setuptagging    [state=stop]
\setuptagging    [state=start]

\setuplanguage   [en]
 [spacing=packed]
\setupinterlinespace [2.2ex]
\definenarrower  [MidOneEm]
 [middle=1em]
\setuplayout [topspace=0.25in,
  footerdistance=0in,
  height=fit,
  width=27em,
  footer=0.5in,
  bottom=0.25in,
  backspace=1.1in]
\definepapersize [octavo]
 [width=6in,
  height=9in]
\setuppagenumbering  [location=]
\setuppapersize  [octavo]
\setupbodyfont   [Termes,10pt]

\starttext

\starttitle  [title={N aa aaa }]

\startsubject    [title={B}]
  Faaa aaa {\em Naa Yaaa T}  aa C 22, 9990 (
  999):
\startnarrow [MidOneEm]
  {\bi Maaa Fa, 86; R Laaa aaa Pa Ta Ba a La}

  Da.~Fa, a  aa aaa Ja I aa Raaa,
aa aa
  a  Ta Ia aa Wa Haa  1925 aa 1928. Ha
  aaa  a aa a aa Caaa Ta Ra Sa aaa
  aa M 1930 a aaa   a aaa aa aa 83a Sa
  aaa Caa Paaa Waaa. A a a, aa   aaa aa
  a, aaa  aa aa aa a aaa aa aa aa
  “aaa a a a.”

  “P a aa,” R Fa  aa aaa aa aa
  aaa, “aaa a  aa aa aa, aa a,
  aa a, aa aa aaa  aaa  aa aa
   aa aaa aa,  a aa aa
 aaa
  aaa . Taa a aaa aa aaa , aaa aaa
  aaa a a.”

  Eaa, aa aaa a Paa aa a “ a” aaa
  aaa a aaa S P aaa aaa Paaa
aaa aa
  Na Ta.

  Aaa aa aaa  aa aaa  a.

  A aa  Caaa Ua Laa Sa aa 1933, aa aaa
  aaa aa aaa aaa Aaaa-Naaa La aaa aaa aaa Ga-Aaaa
  Baaa. Ha aaa  aaa aa aaa Naa Yaaa B aa Ra aaa
  aaa aa aaa aaa. Ha aa a  aa aaa
aa aaa
  aa Naa Yaaa S.
\stopnarrow

  Fa  aa aa aaa  aaa aaa a aa aaa
  R Ra Caa.

  A aa aaa Faaa 30, 1967 {\em Naa Yaaa T} 
  ( 38), aaa , Da.~Ea Oaa Fa, aaa a 
aa
  aa {\em Taa Jaa aa Daa}. Saa aaa a  aaa aaa
  a aaa   aa  aa aaa aaa
  Ia aa Raaa aaa Ha aa aa  a .

  Taa Fa’a aa aaa, Faaa M.~Fa (1894–1949) aaa a
  a aa a aa MIT. T aaa aaa, Wa A.~Fa
  (aaa  I  aaa aa’a aa aa a aaa
  ) aaa aa aaa  a aa aaa U.S.~H Maaa
Ma
  aaa aa aa Daaa aa Raaa aaa  aaa Ca aa Ja
  Maaa Ca Aaa Gaa aaa aaa W Ja Raa
  Oaaa.%
\startfootnote
  T aaa aa  a  I  aa Da.~Fa aa a
  a aa

Re: [NTG-context] Ebooks with ConTeXt?

2019-12-11 Thread Rik Kabel


On 12/11/2019 10:45, Henning Hraban Ramm wrote:

Am 2019-12-11 um 16:17 schrieb Rik Kabel :

On 12/11/2019 01:10, Jan U. Hasecke wrote:

Ebooks are xhtml so styles are limited to the capabilities of css. I
fear that initials has to be left flowing images.


Sorry, but if I understand what you mean by initials, that is not the case. 
Consider

.lettrine>p::first-letter {
 font-size: 3rem ;
 line-height  : 0 ;
}

This might be the right CSS instruction, but when I tried that last year, only 
one reader interpreted it correctly.

and ::* are badly supported.

Best, Hraban

Works fine with Calibre, I have not used any other readers. Is this an 
epub 2/3 issue?


--
Rik

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

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


Re: [NTG-context] Ebooks with ConTeXt?

2019-12-11 Thread Rik Kabel


On 12/11/2019 01:10, Jan U. Hasecke wrote:

Ebooks are xhtml so styles are limited to the capabilities of css. I
fear that initials has to be left flowing images.


Sorry, but if I understand what you mean by initials, that is not the case. 
Consider

   .lettrine>p::first-letter {
    font-size    : 3rem ;
    line-height  : 0 ;
   }

This produces a raised large character at the beginning of a paragraph. It does 
not automatically accommodate leading quotation marks and such, so some tuning 
may be needed, and of course you have to tag the paragraph with the appropriate 
class.

Similarly, you can set the first line of a paragraph to smallcap.

--
Rik

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

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


[NTG-context] LMTXL Tagging and overlay

2019-12-10 Thread Rik Kabel

Dear list,

With the example below (perhaps not minimal, but I have stripped out as 
much as I could), the second page is set completely in the color of the 
overlay. This also happens when a layer is used instead of an overlay. 
When tagging is turned off, the colors are what they should be. When a 
few lines are removed from the first page, the colors are correct as 
well, but ...


Attached is the resulting pdf.

LMTX 20191206 only. MKIV 20191206 is fine.

Error on my part, or bug?

   % \definelayer   [WatermarkOverlay]
   %    [repeat=yes,
   % width=\paperwidth,
   % height=\paperheight]
   % \setlayerframed    [WatermarkOverlay]
   %    [preset=center]
   %    [foregroundcolor=red,frame=off]
   % {\scale[factor=max]{\rotate[rotation=60.0]{~Oops!~}}}

   \defineoverlay   [WatermarkOverlay]
 [{\framed[frame=off,
   foregroundcolor=red]
  {\scale[factor=max]
   {\rotate[rotation=60.0]
    {~Oops!~]

   \setupbackgrounds    [page]
 [background=WatermarkOverlay]

   %setuptagging    [state=stop]
   \setuptagging    [state=start]

   \setuplanguage   [en]
 [spacing=packed]
   \setupinterlinespace [2.2ex]
   \definenarrower  [MidOneEm]
 [middle=1em]
   \setuplayout [topspace=0.25in,
  footerdistance=0in,
  height=fit,
  width=27em,
  footer=0.5in,
  bottom=0.25in,
  backspace=1.1in]
   \definepapersize [octavo]
 [width=6in,
  height=9in]
   \setuppagenumbering  [location=]
   \setuppapersize  [octavo]
   \setupbodyfont   [Termes,10pt]

   \starttext

   \starttitle  [title={N aa aaa }]

   \startsubject    [title={B}]
  Faaa aaa {\em Naa Yaaa T}  aa C 22, 9990 (
  999):
   \startnarrow [MidOneEm]
  {\bi Maaa Fa, 86; R Laaa aaa Pa Ta Ba a La}

  Da.~Fa, a  aa aaa Ja I aa Raaa, aa aa
  a  Ta Ia aa Wa Haa  1925 aa 1928. Ha
  aaa  a aa a aa Caaa Ta Ra Sa aaa
  aa M 1930 a aaa   a aaa aa aa 83a Sa
  aaa Caa Paaa Waaa. A a a, aa   aaa aa
  a, aaa  aa aa aa a aaa aa aa aa
  “aaa a a a.”

  “P a aa,” R Fa  aa aaa aa aa
  aaa, “aaa a  aa aa aa, aa a,
  aa a, aa aa aaa  aaa  aa aa
   aa aaa aa,  a aa aa  aaa
  aaa . Taa a aaa aa aaa , aaa aaa
  aaa a a.”

  Eaa, aa aaa a Paa aa a “ a” aaa
  aaa a aaa S P aaa aaa Paaa aaa aa
  Na Ta.

  Aaa aa aaa  aa aaa  a.

  A aa  Caaa Ua Laa Sa aa 1933, aa aaa
  aaa aa aaa aaa Aaaa-Naaa La aaa aaa aaa Ga-Aaaa
  Baaa. Ha aaa  aaa aa aaa Naa Yaaa B aa Ra aaa
  aaa aa aaa aaa. Ha aa a  aa aaa
   aa aaa
  aa Naa Yaaa S.
   \stopnarrow

  Fa  aa aa aaa  aaa aaa a aa aaa
  R Ra Caa.

  A aa aaa Faaa 30, 1967 {\em Naa Yaaa T} 
  ( 38), aaa , Da.~Ea Oaa Fa, aaa a  aa
  aa {\em Taa Jaa aa Daa}. Saa aaa a  aaa aaa
  a aaa   aa  aa aaa aaa
  Ia aa Raaa aaa Ha aa aa  a .

  Taa Fa’a aa aaa, Faaa M.~Fa (1894–1949) aaa a
  a aa a aa MIT. T aaa aaa, Wa A.~Fa
  (aaa  I  aaa aa’a aa aa a aaa
  ) aaa aa aaa  a aa aaa U.S.~H Maaa Ma
  aaa aa aa Daaa aa Raaa aaa  aaa Ca aa Ja
  Maaa Ca Aaa Gaa aaa aaa W Ja Raa
  Oaaa.%
   \startfootnote
  T aaa aa  a  I  aa Da.~Fa aa a
  a aa aaa aa’a .
   \stopfootnote
   \ T , Ja Fa H, aaa a aa aa aaa 
   a aa aa aaa aa aa.
   \stopsubject

   \startsubject   

Re: [NTG-context] Filling a page with \thinrules

2019-12-07 Thread Rik Kabel

On 12/7/2019 04:10, Otared Kavian wrote:

Hi Rik,

Thanks a lot for the link to that message dating back to 2010…

I tried to put that solution on the wiki but I could not create a new page. 
I'll try later.

For the record, below is a transcript of what I adapted from Wolfgang's 
solution, but maybe nowadays one could also right a more readable lua code to 
achieve the same.

Best regards: Otared K.

\define\thinrulesfillpage%
{
\hphantom{Answer} % this is necessary, I don't know why...
\blank  

\scratchcounter\dimexpr(\pagegoal-\pagetotal-2\lineheight)/(\dimexpr\lineheight+2.2ex\relax)\relax
\thinrules[n=\number\scratchcounter,inbetween={\blank[2.2ex]}]
\page
}

\showframe
\starttext
\dorecurse{2}{\input knuth.tex\par}

\thinrulesfillpage

\thinrulesfillpage

\input ward.tex
\thinrulesfillpage

\stoptext


On 7 Dec 2019, at 03:49, Rik Kabel  wrote:

On 12/6/2019 17:50, Otared Kavian wrote:

Hi all,

I am preparing a test for my students where I would like to have the statement 
of the problem on the top of a page and the remainder to the bottom of that 
page filled with \thinrules, for them to write the solution. And sometimes 
there might be an empty page filled with thinrules when the solution to the 
exercise is longer.

The following minimal example gives the idea of what I want to achieve, but 
since the statement of each exercise may be longer or shorter, I would like 
ConTeXt to compute how many \thinrules can be put in the remainder of the page.
That is, can one imagine a macro named (say) \fillpagewiththinrules which puts 
the exact number of thinrules before ejecting the page?
Is this possible or have I to do it by hand for each page?

\showframe
\starttext
\dorecurse{2}{\input knuth.tex\par}

\thinrules[n=20] % On the first page I can put 20 thinrules

\page

\thinrules[n=40] % On an empty page I can put 40 thinrules
\page

\input ward.tex

\thinrules[n=37] % On the third page there can be 37 thinrules

\stoptext

Thanks for any hint and help,
Best regards: Otared K.


It looks like Wolfgang answered this a while back. See Re: [NTG-context] Room 
for comment on the backside of form. .

--
Rik



Replace the \hphantom{...} with \dontleavehmode.

--
Rik

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

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


Re: [NTG-context] Filling a page with \thinrules

2019-12-06 Thread Rik Kabel

On 12/6/2019 17:50, Otared Kavian wrote:

Hi all,

I am preparing a test for my students where I would like to have the statement 
of the problem on the top of a page and the remainder to the bottom of that 
page filled with \thinrules, for them to write the solution. And sometimes 
there might be an empty page filled with thinrules when the solution to the 
exercise is longer.

The following minimal example gives the idea of what I want to achieve, but 
since the statement of each exercise may be longer or shorter, I would like 
ConTeXt to compute how many \thinrules can be put in the remainder of the page.
That is, can one imagine a macro named (say) \fillpagewiththinrules which puts 
the exact number of thinrules before ejecting the page?
Is this possible or have I to do it by hand for each page?

\showframe
\starttext
\dorecurse{2}{\input knuth.tex\par}

\thinrules[n=20] % On the first page I can put 20 thinrules

\page

\thinrules[n=40] % On an empty page I can put 40 thinrules
\page

\input ward.tex

\thinrules[n=37] % On the third page there can be 37 thinrules

\stoptext

Thanks for any hint and help,
Best regards: Otared K.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


It looks like Wolfgang answered this a while back. See Re: [NTG-context] 
Room for comment on the backside of form 
. 
.


--
Rik

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

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


[NTG-context] PDF/A-3a attachment support query

2019-12-05 Thread Rik Kabel

Hello list,

The following document fails PDF/A-3a validation. It passes without the 
attachment.


   \setuplanguage   [en]
   \setuptagging    [state=start]
   \setupinteraction    [state=start]
   \setupbackend    [format={pdf/a-3a},profile={default_gray.icc},
  intent={ISO coated v2 300\letterpercent\space
   (ECI)}]
   \setupstructure  [state=start,method=auto]
   \setupcolors [pagecolormodel=auto,start=yes,rgb=no,cmyk=no]
   \setupbodyfont   [Palatino,10pt]
   \starttext

  Attaching a plain text file.

   % \attachment    [file=test.tex,
   % type={text/plain;charset=UTF-8}]
   % The \ConTeXt\ source code for this document is attached here.
  \attachment    [file=testa.pdf,
  type={application/pdf}]
  A successfully validated pdf/a-3a file is attached here.

   \stoptext

pdf-online <https://www.pdf-online.com/osa/validate.aspx>reports:

   Validating file "test.pdf" for conformance level pdfa-3a
   The key F is required but missing.
   The appearance dictionary doesn't contain an entry.
   File specification 'testa.pdf' not associated with an object.
   The document does not conform to the requested standard.
   The document doesn't conform to the PDF reference (missing required
   entries, wrong value types, etc.).
   The document contains hidden, invisible, non-viewable or
   non-printable annotations.
   The document contains annotations or form fields with ambigous or
   without appropriate appearances.
   The document does not conform to the PDF/A-3a standard.
   Done.

My understanding is that 3-a should support both pdf and non-pdf 
attachments. This fails in a similar manner with both pdf/a-3a-validated 
files and with plain text files. I also tested with verapdf, and it also 
rejected the document with an attachment.


Is this my error, or is it not yet supported?

--
Rik Kabel


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

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


Re: [NTG-context] MKIV: error, no format found with name: cont-en, aborting

2019-11-14 Thread Rik Kabel
This issue has been resolved with a new luatex dll in the Win64 bin 
directory (perhaps elsewhere as well, but I only have Win64).


Thank you to all who worked on it.

--
Rik

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

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


Re: [NTG-context] MKIV: error, no format found with name: cont-en, aborting

2019-11-13 Thread Rik Kabel

On 11/13/2019 11:14, Hans Hagen wrote:

On 11/13/2019 4:54 PM, Rik Kabel wrote:

On 11/13/2019 10:15, Hans Hagen wrote:

On 11/13/2019 3:01 PM, Rik Kabel wrote:



On 11/13/2019 04:14, Hans Hagen wrote:

On 11/13/2019 9:51 AM, luigi scarso wrote:

sent from
** cont...@rik.users.panix.com <mailto:cont...@rik.users.panix.com>

Note from admin: the email is in defer state because
"Message body is too big: 159549 bytes with a limit of 100 KB"
I have kept the initial part.

"""""
Dear list,

Since the 20191029 update I have not been able to create a 
document via
MKIV, suffering from the subject error message (error, no format 
found

with name: cont-en, aborting).

I have tried cache clearing, regeneration, and complete fresh 
installs.
None work. I suspect it is something on my system, but cannot 
think of a

relevant change except possibly a Win10-64 system update.

Attached is the log from the latest install try (with filenames of
copied files removed).

LMTX has no problems.

All suggestions welcome.

Also with todays version?

Hans


Yes. Just did a fresh install, getting current version: 2019.11.12 
23:58, and have the same result.

any messages? there should be something

resolvers   | formats |
resolvers   | formats | format path  : 
c:/data/develop/tex-context/tex/texmf-cache/luatex-cache/context/764bd4e1ce0f004ab3cec90018f8b80a/formats/luametatex

resolvers   | formats | luatex engine    : luametatex
resolvers   | formats | lua startup file : 
c:/data/develop/context/sources/luat-cod.lua
resolvers   | formats | context file : 
c:/data/develop/context/sources/cont-en.mkxl

resolvers   | formats | run time : 10.141 seconds
resolvers   | formats | return value : okay
resolvers   | formats |

at the end (or some not found messages)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___ 

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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

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



I get the following (grepping for resolvers.*formats) from the install:

    resolvers   | formats | using tex source file
'c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-en.mkiv'
    resolvers   | formats | using specification file
'c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/context.lus'
    resolvers   | formats | using tex source path
    'c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv'
    resolvers   | formats | changing to format path
'c:/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex'
    resolvers   | formats | executing runner 'make luatex format':
    luatex --ini
--lua=c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/luat-cod.lua 
c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-en.mkiv     
\dump

    resolvers   | formats |
    resolvers   | formats | format path  :
c:/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex
    resolvers   | formats | luatex engine    : luatex
    resolvers   | formats | lua startup file :
c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/luat-cod.lua
    resolvers   | formats | context file :
c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-en.mkiv
    resolvers   | formats | run time : 1.513 seconds
    resolvers   | formats | return value : error
    resolvers   | formats |
    resolvers   | formats | using tex source file
'c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-en.mkiv'
    resolvers   | formats | using specification file
'c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/context.lus'
    resolvers   | formats | using tex source path
    'c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv'
    resolvers   | formats | changing to format path
'c:/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex'
    resolvers   | formats | executing runner 'make luatex format':
    luatex --ini
--lua=c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/luat-cod.lua 
c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-en.mkiv     
\dump

    resolvers   | formats |
    resolvers   | formats | format path  :
c:/ConTeXt/tex/texmf-cache/luatex-cache

Re: [NTG-context] MKIV: error, no format found with name: cont-en, aborting

2019-11-13 Thread Rik Kabel

On 11/13/2019 10:15, Hans Hagen wrote:

On 11/13/2019 3:01 PM, Rik Kabel wrote:



On 11/13/2019 04:14, Hans Hagen wrote:

On 11/13/2019 9:51 AM, luigi scarso wrote:

sent from
** cont...@rik.users.panix.com 
<mailto:cont...@rik.users.panix.com>


Note from admin: the email is in defer state because
"Message body is too big: 159549 bytes with a limit of 100 KB"
I have kept the initial part.

"""""
Dear list,

Since the 20191029 update I have not been able to create a document 
via

MKIV, suffering from the subject error message (error, no format found
with name: cont-en, aborting).

I have tried cache clearing, regeneration, and complete fresh 
installs.
None work. I suspect it is something on my system, but cannot think 
of a

relevant change except possibly a Win10-64 system update.

Attached is the log from the latest install try (with filenames of
copied files removed).

LMTX has no problems.

All suggestions welcome.

Also with todays version?

Hans


Yes. Just did a fresh install, getting current version: 2019.11.12 
23:58, and have the same result.

any messages? there should be something

resolvers   | formats |
resolvers   | formats | format path  : 
c:/data/develop/tex-context/tex/texmf-cache/luatex-cache/context/764bd4e1ce0f004ab3cec90018f8b80a/formats/luametatex

resolvers   | formats | luatex engine    : luametatex
resolvers   | formats | lua startup file : 
c:/data/develop/context/sources/luat-cod.lua
resolvers   | formats | context file : 
c:/data/develop/context/sources/cont-en.mkxl

resolvers   | formats | run time : 10.141 seconds
resolvers   | formats | return value : okay
resolvers   | formats |

at the end (or some not found messages)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___ 

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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

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



I get the following (grepping for resolvers.*formats) from the install:

   resolvers   | formats | using tex source file
   'c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-en.mkiv'
   resolvers   | formats | using specification file
   'c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/context.lus'
   resolvers   | formats | using tex source path
   'c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv'
   resolvers   | formats | changing to format path
   
'c:/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex'
   resolvers   | formats | executing runner 'make luatex format':
   luatex --ini
   --lua=c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/luat-cod.lua
   c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-en.mkiv  \dump
   resolvers   | formats |
   resolvers   | formats | format path  :
   
c:/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex
   resolvers   | formats | luatex engine    : luatex
   resolvers   | formats | lua startup file :
   c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/luat-cod.lua
   resolvers   | formats | context file :
   c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-en.mkiv
   resolvers   | formats | run time : 1.513 seconds
   resolvers   | formats | return value : error
   resolvers   | formats |
   resolvers   | formats | using tex source file
   'c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-en.mkiv'
   resolvers   | formats | using specification file
   'c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/context.lus'
   resolvers   | formats | using tex source path
   'c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv'
   resolvers   | formats | changing to format path
   
'c:/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex'
   resolvers   | formats | executing runner 'make luatex format':
   luatex --ini
   --lua=c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/luat-cod.lua
   c:/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-en.mkiv  \dump
   resolvers   | formats |
   resolvers   | formats | format path  :
   
c:/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex
   

Re: [NTG-context] MKIV: error, no format found with name: cont-en, aborting

2019-11-13 Thread Rik Kabel



On 11/13/2019 04:14, Hans Hagen wrote:

On 11/13/2019 9:51 AM, luigi scarso wrote:

sent from
** cont...@rik.users.panix.com 

Note from admin: the email is in defer state because
"Message body is too big: 159549 bytes with a limit of 100 KB"
I have kept the initial part.

"
Dear list,

Since the 20191029 update I have not been able to create a document via
MKIV, suffering from the subject error message (error, no format found
with name: cont-en, aborting).

I have tried cache clearing, regeneration, and complete fresh installs.
None work. I suspect it is something on my system, but cannot think of a
relevant change except possibly a Win10-64 system update.

Attached is the log from the latest install try (with filenames of
copied files removed).

LMTX has no problems.

All suggestions welcome.

Also with todays version?

Hans


Yes. Just did a fresh install, getting current version: 2019.11.12 
23:58, and have the same result.


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

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


Re: [NTG-context] How to sort list of sections?

2019-11-08 Thread Rik Kabel

On 11/7/2019 16:22, jdh wrote:

I get no difference using criterium=previous   versus   criterium=local.


Try this extended example to see the difference:

 \setuphead[section][number=no]
 \starttext
 \startchapter[title=foo]
  \placelist[section][criterium=local,order=title]
  \startsection[title={Beta}]  \input sapolsky \stopsection
  \startsection[title={Alpha}] \input sapolsky \stopsection
 \stopchapter
 \startchapter[title=bar]
  \placelist[section][criterium=local,order=title]
  \startsection[title={Alpha}] \input sapolsky \stopsection
  \startsection[title={Delta}] \input sapolsky \stopsection
 \stopchapter
 \startchapter[title=indices]
  First local:
  \placelist[section][criterium=local,order=title]
  Now previous:
  \placelist[section][criterium=previous,order=title]
 \stopchapter
 \stoptext

--
Rik

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

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


Re: [NTG-context] LMTX issue with multple question blocks

2019-11-07 Thread Rik Kabel

On 11/7/2019 11:06, Hans Hagen wrote:

On 11/7/2019 3:50 PM, Jan Willem Flamma wrote:

Dear list members,

The below MWE runs fine and generates a usable PDF.

If I uncomment the second question block and run the MWE on a OS X 
system it generates an unusable PDF and a nearly empty log file:


open source     > level 1, order 1, name 'cont-yes.mkiv'
system          >
system          > ConTeXt  ver: 2019.10.28 18:57 MKIV beta  fmt: 
2019.11.7  int: english/english

system          >
system          > 'cont-new.mkiv' loaded
open source     > level 2, order 2, name 
'/Users/JW/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'

system          > beware: some patches loaded from cont-new.mkiv
close source    > level 2, order 2, name 
'/Users/JW/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'


system          > files > jobname 'co-intro', input './co-intro', 
result 'co-intro'

fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
system          > synctex functionality is enabled, expect 5-10 pct 
runtime overhead!

open source     > level 2, order 3, name './co-intro.tex'
fonts           > preloading latin modern fonts (second stage)
fonts           > 'fallback modern-designsize rm 12pt' is loaded
open source     > level 3, order 4, name 'knuth.tex'
close source    > level 3, order 4, name 'knuth.tex'

I cannot reproduce the problem on a Windows system.

Can somebody on an OS X system check and confirm the issue?

What if you wipe the tuc file?

No message?

Hans


I can confirm the same problem on a Win64 problem. I get the same log 
file (with 2019.10.29 15:09 for the version and my file/directory names).


There is a console message that is, perhaps, meaningful:

   This is LuaMetaTeX, Version 2.00.0
   runtime error : input file 'virtual://block.question.' is not found,
   quitting
   mtx-context | fatal error: return code: 1

--
Rik

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

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


[NTG-context] Fails with MkIV works with LMTX

2019-10-28 Thread Rik Kabel

This works with the 20191028 LMTX beta, fails with the 20191028 MkIV beta:

   \starttext
   This\footnote{that}
   \stoptext

Error log:

   return {
 ["filename"]="c:/Users/micro/Desktop/fn.tex",
 ["lastcontext"]="\n ...s \\inheritmaintextcolor
   \\strc_itemgroups_push \n \n\\handlenoteinsert ...tes_synchronize
   \\the \\everybeforenoteinsert
   \n  \\insert
   \\currentnoteinsert...\n\\235>notation:note ...enoteinsert
   \\currentnote \\currentnotenumber
   \n  \\fi \\fi \\fi
   \\endgroup \\fi ...\n\\m_syst_action_nop ...dler
   \\currentconstructionhandler \\endcsname \n
   \\strc_constructions_finali...\nl.2
   This\\footnote{that}\n  ",
 ["lastluaerror"]="?",
 ["lasttexerror"]="! Undefined control sequence",
 ["linenumber"]=2,
 ["offset"]=10,
   }

Can anyone reproduce this? I have tried rebuilding.

--
Rik


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

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


Re: [NTG-context] Printing catchword or kustode

2019-10-07 Thread Rik Kabel

On 8/10/2019 10:14, Hans Hagen wrote:

On 8/10/2019 2:25 PM, Jan Ulrich Hasecke wrote:

Hi all,

Visiting a museum in Straßburg I saw an old book from Gutenbergs times 
where the
first word of the next page was printed below the last line of the 
current page.


The word, sometimes only a syllable of the first word from the next 
page, is
called catchword or Kustode. They used it to ensure that they bind the 
pages in

the right order.

I think that it can also be of help if you read a book.

Is this possible with ConTeXt?

not that hard to implement if really needed




Here is a vote for implementing it. I find myself writing catchwords by 
hand on speeches I have to give. An automated system of generating them 
would be most welcome.


I suggest that they should optionally be sensitive to the page spread. 
That is, for two-sided documents there should be an option to print them 
only on recto pages. Perhaps some tuning for length, defaulting to one 
word, as well. Placement is traditionally in the bottom inside of the 
outside margin (directly below the text block, flush right).


I do not know if this practice is found in RTL languages, but I do not 
see why it would not be adaptable to them as well.


--
Rik

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

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


Re: [NTG-context] Place footnote after reference

2019-07-22 Thread Rik Kabel

On 7/22/2019 12:34, Huseyin Özoguz wrote:


Hi,


But I admit that I do not understand the problem all that well. I have
never run into a situation where I want the footnote to explicitly
*not* appear with its reference (except in endnotes). If my grid
settings were that specific, I would be using endnotes anyway.


I have this problem everywhere in a 400-page project with hundrets of 
footnotes and no special grid settings at all. How would you solve 
this situation (my minexamle):


\showgrid
\starttext
\input tufte
\input tufte \footnote{Footnote 1}
\input tufte
\input tufte \dorecurse{35}{Blub or what }\footnote{Footnote 2} \input tufte
\stoptext

The problem is, that Context (or Tex) skips lines, which is poor typesetting, 
too many even than necessary in some cases, and that is not suitable. Endnotes 
are no solutions aswell, I need footnotes. So the solution to have reference 
and footnote not on the same page seems the least bad workaround, if possible 
at all.

Thanks
Huseyin

--
Huseyin Özoguz

E-Mail:h.oezo...@mmnetz.de


Have you tried \setupnote[footnote][before={\blank[none]}] ?

--

Rik

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

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


[NTG-context] Endnote list difference, MKIV and LMTX

2019-04-11 Thread Rik Kabel

List,

With the following example, endnotes are set differently with MKIV and 
LMTX – incorrectly under LMTX. (MKIV 20190404, LMTX 20190411)


The problem disappears if /either//or both/ of the first two lines are 
removed, but of course those usually serve an important purpose.


   \setupbodyfont [12pt]
   \setupindenting[yes,small]
   \starttext
   \chapter{Testing}
   \dorecurse{5}{\samplefile{ward}\endnote{\samplefile{lorem}}\par}
   \chapter{Notes}
   \placenotes[endnote]
   \stoptext

A workaround is to place \placenotes in a group with indenting turned off.

--
Rik

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

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


[NTG-context] Referencing the page on which an endnote was generated

2019-04-09 Thread Rik Kabel

List,

I would like to create headings for the endnotes appendix chapter of a 
book with headings like "Notes for pages x–y" but can find no way to 
capture x and y.


Is there a way to get those page numbers to insert into the header?

--
Rik


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

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


Re: [NTG-context] endnotes customizing how?

2019-04-09 Thread Rik Kabel

On 4/9/2019 11:19, Hans van der Meer wrote:
In typesetting my endnotes with \placenotes[endnote] I seem unable to 
unfluence the text characteristics.

I tried things like
(1) \setupnotes[endnote][textcolor=blue]
(2) changed fonts before the \ bgroup\bf\placenote\egroup call
(3)
\startsetups[setups:endnotes]
\setupwhitespace[0pt]
\stopsetups
% textstyle influences endnotemarker in the text.
\setupnote[endnote][textcommand=\hifnmarker,before=\directsetup{setups:endnotes}]

(4)\setupnotes[endnote][bodyfont=italic]

Where (3) made a difference in linespacing, nothing else does.
How can one determine the text characteristics of the endnotes?

dr. Hans van der Meer



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

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


Not sure exactly what you want, but if it helps, here is what I have 
used. \setupnote handles the in-text reference to the note, 
\setupnotation handles the note itself. The choice of SignalStyle 
depends on the appearance of the chosen font's superiors, if they exist.


   \define[1]\SignalStyle{\high{\small\hairspace#1}}
   %definefontfeature [f:su]
   %  [sups=yes]
   %define[1]\SignalStyle{\feature[+][f:su]{\hairspace#1}}

   \setupnote [endnote][
  textseparator={,},
  textstyle=\SignalStyle,
  location=none,
  bodyfont=,
 ]


   \setupnotation[endnote]
  [headstyle=\small,
   numbercommand=,
   after={\blank[halfline]},
  ]

--
Rik

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

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


[NTG-context] Layer failure with LMTX

2019-04-07 Thread Rik Kabel

List,

The following example works as expected with MKIV but fails for me with 
LMTX.


   \setuppapersize[A7]
   \setuppagenumbering [location=]

   \definelayer [pageNumber][
  x=\dimexpr\pagewidth-\cutspace\relax,
  y=\topspace,
  width=\pagewidth,
  height=\pageheight,
 ]

   \startsetups [setupPage]
\setlayer[pageNumber]
{\hskip\leftmargindistance
  \inframed[frame=off,leftframe=on,loffset=1em]{\userpage}}
   \stopsetups

   \setupbackgrounds[page]
 [setups=setupPage,
  background=pageNumber]
   \starttext
   \page[empty]
   \stoptext

--
Rik

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

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


Re: [NTG-context] Search path for typescripts

2019-03-01 Thread Rik Kabel

On 2/28/2019 22:42, Aditya Mahajan wrote:

On Thu, 28 Feb 2019, Rik Kabel wrote:


List,

What is the proper place to put a custom typescript file to make it 
accessible to multiple projects?


For testing I placed copies in"
1)  the local directory
2)  /texmf/fonts
3)  /tex/texmf-local/fonts/


A typescript file is simply a tex file, so the usual rules for storing 
tex file applies. You should try a sub-directory of:


$TEXMFHOME/tex/context/

or

$TEXMFLOCAL/tex/context/

Aditya 


Thank you,  Aditya.

I had the file at the wrong place in the local tree (with my fonts). 
Moving it to  ./tex/context indeed solves the problem.


--
Rik

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

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


[NTG-context] Search path for typescripts

2019-02-28 Thread Rik Kabel

List,

What is the proper place to put a custom typescript file to make it 
accessible to multiple projects?


For testing I placed copies in"
1)  the local directory
2)  /texmf/fonts
3)  /tex/texmf-local/fonts/

A standard version (uncustomized) exists as part of the distribution in:
4)  /tex/texmf-context/tex/context/fonts/mkiv/

luatools 

finds the file in 1, 4, and 2.

That is, after the local directory it immediately takes the standard 
installation directory, never looking in the places one might store 
local versions meant to override the distribution files. It might get to 
one of those directories (/texmf/fonts) if there is no standard 
file in the distribution, but that is not the case here.


I did not see an appropriate environment variable to control this. It 
does not seem sensitive to TEXMF or OSFONTDIR.


So, where do I place the customized typescript, or how do I tell ConTeXt 
where to look?


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

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


Re: [NTG-context] Output problem with nodes.toutf utility function (latest beta 02.26.2019)

2019-02-27 Thread Rik Kabel

On 2/27/2019 11:53, Joseph Canedo wrote:


Dear list,

I use lua function nodes.toutf to print text being typeset in log 
output for debugging purposes etc… and I noticed output is now 
different for some characters/glyphs.


I use EB Garamond font, which might explain.

Before, for example output was :

user    > margin > margin box text Thareh.

Now it is :

user    > margin > margin box text areh.

The « Th » was replaced by some  placeholder perhaps for unknown 
character?


Please note that typeset text is not impacted, it seems correct.

Joseph

The dlig feature for EBGaramond causes "Th" to be replaced by a 
ligature. Look carefully at your typeset text and you will likely see 
that the "T" and "h" are joined.


--
Rik

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

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


Re: [NTG-context] em-dash ligature is converted to en-dash in the generic fontloader

2019-02-25 Thread Rik Kabel

On 2/25/2019 15:45, Henri Menke wrote:

On 26/02/19 3:55 AM, Ulrike Fischer wrote:

Am Sat, 23 Feb 2019 17:11:12 +0100 schrieb Hans Hagen:


because  followed by -- is pretty obscure ... a replace could be
seen as --- and when hyphenated as - -- and such ... it's about time
that texies start using the proper unicode symbols instead of these
funny ligatures

well the problem with the proper unicode symbols is that at first
they are not so easy to input (that could be handled by the editor)
and that they are not so visible. - - — look quite the same in my
editor, even more if the screen is not so large and when my eyes
tire. If -- wouldn't work I would resort to a command like \ndash
instead only to get a better visual clue what's in the document.

But regardless from the input method. How can one enable a line
break after an em-dash when \automichyphenmode is 1?  The only way I
found is to explicitly insert a penalty:

\starttext
\hsize=2pt

dash---\penalty1 dash

dash—\penalty1 dash

dash\discretionary{---}{}{---}dash

dash\discretionary{—}{}{—}dash


\stoptext


dash|---|dash

dash|—|dash

--
Rik

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

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


[NTG-context] externalfigure broken with 20190222 beta

2019-02-23 Thread Rik Kabel

With the following example, I get:

   ...eXt/tex/texmf-context/tex/context/base/mkiv/grph-inc.lua:238: attempt to 
call upvalue 'imgwrap' (a nil value)

with the current (20190222) beta.

   \setupexternalfigures[location=default]
   \starttext
   \externalfigure[cow.pdf]
   \stoptext

Down for just me, or for everyone?

--
Rik

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

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


[NTG-context] Compilation fails on 20190210 beta with Unidentified user defined whatsit

2019-02-11 Thread Rik Kabel
The following works well with previous versions and fails on the 
20190210 beta.


   \defineenumeration[ID]
  [before=\dontleavehmode,
   alternative=inright]
   \starttext
  \ID[id1]This is only a test.
   \stoptext

The problem appears to be associated with the inright alternative.

--
Rik

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

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


Re: [NTG-context] right figure at bottom of page can narrow text block on whole next page

2019-02-06 Thread Rik Kabel

On 1/29/2019 06:48, Sanjoy Mahajan wrote:

\definepapersize[bookcrop][width=137mm,height=221mm]
\setuppapersize [bookcrop][bookcrop]

\setuplayout[marking=on,
   location=middle,
   backspace=13.5mm,
   width=middle,
   topspace=32bp,
   header=10bp, headerdistance=26bp,
   footerdistance=16bp, footer=10bp,
   height=578bp,
]

\setupinterlinespace[line=1.3em]
\setupbodyfont[times,10bp]

\starttext

\input knuth

Silly para

Silly para

\placefigure[right]{}{\framed[width=100bp,height=75.75bp]{\null}}

\input knuth

\dorecurse{8}{\par Silly para}

\placefigure[right]{}{\framed[width=100bp,height=60.75bp]{\null}}

\dorecurse{32}{Silly text }

\dorecurse{3}{\input knuth \par}

\stoptext


This has come up a few times on this list. Hans has stated a reluctance 
to make a change or add an option to discard the unused vertical space 
(see https://www.mail-archive.com/ntg-context@ntg.nl/msg21273.html from 
March 2007, and most recently 
https://www.mail-archive.com/ntg-context@ntg.nl/msg86872.html in January 
2018).


The workaround that Hans suggests in that last post , adding the flag 
'high', almost resolves the issue in your example.


--
Rik

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

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


Re: [NTG-context] Bidi-related register problem

2019-01-27 Thread Rik Kabel

On 1/27/2019 12:07, Hans Hagen wrote:

On 1/27/2019 12:59 AM, Rik Kabel wrote:

Here is a much-closer-to minimal example.


  \setupregister   [index] [maxwidth=4cm]
  \setupdirections [bidi=on,method=two]
  \starttext
  .\index{Mairzy doats and dozy doats and liddle lamzy divey}
  \placeindex
  \stoptext

With the \setupdirections line removed, all is well. However, that 
line is otherwise required. Setting bidi off around \placeindex is 
not an option either, since some index entries require it.
Tricky ... i'll catch it but better use method tree then (later this 
year i might redo some r2l code)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-


That allows the compilation to complete, but method=three breaks other 
stuff. Try this:


   \starttext
   \setupdirections [bidi=on,method=three]
   \rightaligned{(( How is this?}
   \stoptext

(I also see problems with boxes set in the margin where before they were 
set centered in the textblock, but cannot construct an example yet.)


--
Rik

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

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

Re: [NTG-context] Bidi-related register problem

2019-01-26 Thread Rik Kabel

And shorter still, isolating the problem to something in \limitatetext:

 \setupdirections [bidi=on,method=two]
 \starttext
 \limitatetext {Mairzy doats and dozy doats and liddle lamzy divey} {4cm}
 \stoptext

--
Rik

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

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

Re: [NTG-context] Bidi-related register problem

2019-01-26 Thread Rik Kabel

Here is a much-closer-to minimal example.


 \setupregister   [index] [maxwidth=4cm]
 \setupdirections [bidi=on,method=two]
 \starttext
 .\index{Mairzy doats and dozy doats and liddle lamzy divey}
 \placeindex
 \stoptext

With the \setupdirections line removed, all is well. However, that line 
is otherwise required. Setting bidi off around \placeindex is not an 
option either, since some index entries require it.



--
Rik Kabel

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

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

[NTG-context] Bidi-related register problem

2019-01-24 Thread Rik Kabel
Recent betas have introduced a bidi-related problem with register 
processing.


In the following example, compilation generates a recoverable error when 
register processing has to trim an entry to fit maxwidth. The error is:


luatex warning  > node filter: error: 
...eXt/tex/texmf-context/tex/context/base/mkiv/typo-dub.lua:496: attempt to index 
local 'stacktop' (a nil value)

Removing the maxwidth constraint, or setting it to a much wider value, 
allows error-free compilation.


Without \setupdirections[bidi=on,method=two] there is no problem, but 
without it RTL texts are not handled properly. This is a recent change; 
bidi=global worked a few months ago. (I have not tried with LTR text in 
a default-RTL document).


   % macros=mkvi
   \defineregister[Mindex]
   \setupregister [Mindex]
   [n=2,
maxwidth=4cm,
balance=no]

   \starttexdefinition unexpanded MIndex
  \dosinglegroupempty\doMIndex
   \stoptexdefinition

   \starttexdefinition unexpanded doMIndex #MARKER
  \def\Marker{#MARKER}%
  \dosinglegroupempty\doMIndexFull
   \stoptexdefinition

   \starttexdefinition doMIndexFull #ITEM
  \doifelse{#ITEM}{}
{\expanded{\Mindex{\Marker}}}
{\expanded{\Mindex{\Marker+#ITEM}}}
   \stoptexdefinition

   \setupdirections [bidi=on,method=two]

   \setupbodyfont   [libertinus,11pt]

   \starttext

   \startparagraph
  \MIndex{One}{Mairzy doats and dozy doats and liddle lamzy divey}

  \input jojomayer

   \stopparagraph

   \startparagraph
   סלאם שלום
   \stopparagraph

   \placeregister[Mindex]
   \stoptext

--
Rik Kabel


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

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

Re: [NTG-context] Manipulating the left blank page when chapter starts on the right page

2019-01-12 Thread Rik Kabel

On 1/12/2019 16:08, Jan U. Hasecke wrote:

Hi Aditya,

Am 12.01.19 um 20:11 schrieb Aditya Mahajan:

On Sat, 12 Jan 2019, Jan U. Hasecke wrote:


Hi all,

in my document \startchapter and \starttitle starts a new chapter on the
right (odd) page. So sometimes, there is a blank even page just before a
new chapter.

I would like to manipulate this blank even page.

There are several things I would like to do, eg. having no headers and
footers, setting the background color to a named color, placing an image
or some graphics on the page.

Is there a way to define such a page, name it and call it in
\startchapter so that it is placed on the left side.

See https://tex.stackexchange.com/q/457428/323

Thanks a lot, but I wasn't looking for a way to just delete page numbers
but to style the empty page in arbitrary ways.

Maybe it is better to do this manually.

I would let chapter open on even pages too and just insert a styled page
by hand.

juh



I place an epigraph on verso page before a few chapters with the following:

   \definehead[ChapterEpigraph][title]
   \setuphead [ChapterEpigraph][
  page={yes,left},
  insidesection=\vfill,
  aftersection={\vfill\vfill},
  header=empty,
  placehead=no,
 ]

   %% The following always creates a verso page if there is an
   %%   epigraph to set or not.

   \startsetups chapter:epigraph
\doifelsebuffer{ChapterEpigraph}
{\page[yes,header,footer,left]
 \dontleavehmode
 \vfill
 \getbuffer   [ChapterEpigraph]
 \resetbuffer [ChapterEpigraph]
 \vfill
 \vfill
}
{\page[yes,header,footer,left]}
\page[yes,header,footer,right]
   \stopsetups

   <...>

   \stopchapter%   end previous chapter

   \startChapterEpigraph% no epigraph on next

   \stopChapterEpigraph

   \startchapter[reference={cha:no-epigraph-chapter},
  title={Chapter with no epigraph}]
   <...>

   \stopchapter%

   \startChapterEpigraph

   

   \stopChapterEpigraph

   \startchapter[reference={cha:next-chapter},
  title={Chapter with epigraph}]

   <...>

I am not sure where I got the hints for this. I haven't revisited it for 
a while, and it does look like there is some redundant use of \vfill, 
but it worked for me. You may be able to build on it.


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

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

Re: [NTG-context] modifying kerning breaks opentype ligatures (and other features)

2018-12-11 Thread Rik Kabel

On 12/11/2018 15:54, Rik Kabel wrote:

On 12/11/2018 07:06, Hans Hagen wrote:

On 12/11/2018 11:34 AM, mf wrote:


But i should consider all the text parts with a modified kerning 
and disable kerning around character sequences like "ff", "ffi", 
"fl" and so on. Luckily, the XHTML markup "knows" where the kerning 
is modified:


A paragraph with a modified kerning

should become

A paragraph with a modified kerning

Where ... (dk=Disable Kerning) are tags to be inserted 
automatically before feeding the XHTML into ConTeXt.

I'm not very happy or proud about it, but it can be done.
Do you think it can be better done inside ConTeXt?

I nearly managed to do it in ConTeXt, but I can't create the "" 
elements right (the "new_dk_element" function is wrong):


did you play with

\definefontfeature[whatever][keepligatures=auto]

\definecharacterkerning [extrakerning] [factor=0.125,features=whatever]

\starttext
    \setcharacterkerning[extrakerning]
    effe fietsen
\stoptext


Nice! It recognizes the difference between ccmp and liga, so now we 
have (almost perfect) support for Sperrdruck! There is a ZWNJ in the 
following example (between t and z inZeitzone) that gets expanded, 
leaving an enlarged gap.



And I spoke too soon (not unusual, I know). The ſi ligature is not 
broken up, but it should be. Only ck, ct, ch, and ſt and tz should be 
preserved.


So it looks like manual intervention is still required. (There are a few 
LaTeX packages that handle this well, chief among the microtype.)


--
Rik

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

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

Re: [NTG-context] modifying kerning breaks opentype ligatures (and other features)

2018-12-11 Thread Rik Kabel

On 12/11/2018 07:06, Hans Hagen wrote:

On 12/11/2018 11:34 AM, mf wrote:


But i should consider all the text parts with a modified kerning and 
disable kerning around character sequences like "ff", "ffi", "fl" 
and so on. Luckily, the XHTML markup "knows" where the kerning is 
modified:


A paragraph with a modified kerning

should become

A paragraph with a modified kerning

Where ... (dk=Disable Kerning) are tags to be inserted 
automatically before feeding the XHTML into ConTeXt.

I'm not very happy or proud about it, but it can be done.
Do you think it can be better done inside ConTeXt?

I nearly managed to do it in ConTeXt, but I can't create the "" 
elements right (the "new_dk_element" function is wrong):


did you play with

\definefontfeature[whatever][keepligatures=auto]

\definecharacterkerning [extrakerning] [factor=0.125,features=whatever]

\starttext
    \setcharacterkerning[extrakerning]
    effe fietsen
\stoptext


Nice! It recognizes the difference between ccmp and liga, so now we have 
(almost perfect) support for Sperrdruck! There is a ZWNJ in the 
following example (between t and z inZeitzone) that gets expanded, 
leaving an enlarged gap.


   \mainlanguage  [deo]
   \definefontfeature[frak][ccmp=yes,liga=yes]
   \definefont [FrakXIX] [UnifrakturMaguntia19.ttf*frak]
   \definefontfeature[whatever][keepligatures=auto]
   \definecharacterkerning [extrakerning] [factor=0.25,features=whatever]
   \define\Test{{\FrakXIX ſitzen/beſchütze/Zeit‌zone}}
   \starttext
\tex{setcharacterkerning}\par
\Test\par
{\setcharacterkerning[extrakerning]\Test}\par
\Test\par

\blank

\tex{kerncharacters}\par
\Test\par
{\kerncharacters[.25]{\Test}\par
\Test\par

   \stoptext

--
Rik

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

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

[NTG-context] Spurious missing character reports

2018-12-09 Thread Rik Kabel

List,

I have one document that after the 2018-11-18 update (beginning with 
12-01 and continuing to the current 12-07) has generated hundreds of 
spurious missing character messages in the log. A short extract:


   fonts   > start missing characters: 
C:/ConTeXt/tex/texmf/fonts/opentype/public/antt/AntykwaTorunskaCond-Regular.otf

   fonts   >   72  U+00021  !  EXCLAMATION MARK
   fonts   >  948  U+00022  "  QUOTATION MARK
   fonts   > 1302  U+00026  &  AMPERSAND
   fonts   > 345318  U+0002B  +  PLUS SIGN
   fonts   >  216  U+00030  0  DIGIT ZERO
   fonts   > 54270  U+00031  1  DIGIT ONE
   fonts   > 28590  U+00036  6  DIGIT SIX
   fonts   >  414  U+0003C  <  LESS-THAN SIGN
   fonts   > 116712  U+00040  @  COMMERCIAL AT
   fonts   > 1980  U+00042  B  LATIN CAPITAL LETTER B
   fonts   > 373878  U+00046  F  LATIN CAPITAL LETTER F
   fonts   >   48  U+00048  H  LATIN CAPITAL LETTER H
   fonts   > 3282  U+00049  I  LATIN CAPITAL LETTER I
   fonts   >   36  U+0004A  J  LATIN CAPITAL LETTER J
   fonts   > 1560  U+0004B  K  LATIN CAPITAL LETTER K
   fonts   >   12  U+0004C  L  LATIN CAPITAL LETTER L
   fonts   > 3810  U+0004E  N  LATIN CAPITAL LETTER N
   fonts   > 3402  U+00057  W  LATIN CAPITAL LETTER W
   fonts   >   48  U+0005A  Z  LATIN CAPITAL LETTER Z
   fonts   > 64206  U+0005B  [  LEFT SQUARE BRACKET
   fonts   > 3420  U+00062  b  LATIN SMALL LETTER B
   fonts   > 3888  U+00063  c  LATIN SMALL LETTER C
   fonts   > 2880  U+00069  i  LATIN SMALL LETTER I
   fonts   > 1284  U+0006B  k  LATIN SMALL LETTER K
   fonts   >  336  U+00070  p  LATIN SMALL LETTER P
   fonts   > 2118  U+0007B  {  LEFT CURLY BRACKET
   fonts   >  258  U+0007C  |  VERTICAL LINE
   fonts   >   12  U+0007E  ~  TILDE

   fonts   > stop missing characters

There are similar reports for the other fonts used in the document 
(Antykwa Torunska is used for heads, EBGaramond with Libertinus fallback 
for the body).


I have pared down the files to the following example which demonstrates 
the problem. I do not understand now all the features interact to cause 
this, but the reports disappear upon removing any (such as the 
seemingly-redundant \definebodyfontenvironment or the 
\switchtobodyfont[small]).


   \enabletrackers
  [fonts.missing]

   \definebodyfontenvironment
  [11pt]
  [a=1]

   \definefontfallback
  [fb:ebgr]
  [file:libertinusserif-regular]
  [0x204A]

   \starttypescript   [serif] [ebgaramond]
\definefontsynonym [Serif]
   [file:ebgaramond-regular]
   [fallbacks=fb:ebgr]
   \stoptypescript

   \define\Test{¡Missing!}

   \setupbodyfont
  [ebgaramond,11pt]
   \setupbodyfont
  [libertinus,11pt]

   \starttext

   \dorecurse{6}{
 \switchtobodyfont[small]
  \Test\par}

   \stoptext

While the messages appear to be incorrect, there is no apparent problem 
associated with them. I do not know if they point to some problem I have 
not recognized, or are truly spurious. (And I can eliminate them by 
turning off the tracker when I am sure that I have the needed coverage 
in the fallbacks.)


Of course, if I am doing something wrong I would like to correct it.

--
Rik

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

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

Re: [NTG-context] Issues using publications subsystem for non-bibliographic database

2018-12-08 Thread Rik Kabel

On 12/8/2018 14:50, Alan Braslau wrote:

On Sat, 8 Dec 2018 12:43:34 -0500
Rik Kabel  wrote:


It is also quite
useful in earlier stages of larger projects where it is important to
document sources (for circulation copies) but one is not ready to tackle
the design and generation of more formal backmatter.

In my incremental development, I place a bibliography at the end of a chapter, 
part, or even section - there is no need for this to be backmatter. Using 
modes, these then can remain or not be rendered as design advances.

Again, what is the point of pulling references if they do not refer to 
anything? In the Latex/bibtex workflow, the list is generated by bibtex, and 
this can, and does, lead to de-synchronization in a partial development process 
as you describe. Here, the list is generated and exists in lua, and we take 
great pains to insure that it remains synchronized.

Alan


The purpose is to reduce entry effort, prevent simple errors, ensure 
consistency across instances in the same and additional documents, and 
encourage reuse.


Or are you suggesting that a document like the paper I cited does not 
benefit from a bibliographic support subsystem?


--
Rik

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

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

Re: [NTG-context] Issues using publications subsystem for non-bibliographic database

2018-12-08 Thread Rik Kabel

On 12/8/2018 00:03, Alan Braslau wrote:
As I wrote, "rendering" to footnotes as elements of a "list" can be 
done, and your cross-reference *is* the footnote index. We have not 
written setups that do this already as I have never needed this format 
myself, although it is rather common in certain fields. "Pulling-in" 
blocks of text in general (without a basis) is not the aim. Again, the 
entire point is to associate fields to an entry, and the notion of a 
"list" is more general than a traditional bibliography list.


Well, you have my vote for moving it up the priority list. I would 
request that the implementation allow additional text beyond the 
rendered entry, as demonstrated in the cited example document, in the 
footnote (or endnote, or marginnote).


As you note, it is a common requirement in some fields. It is also quite 
useful in earlier stages of larger projects where it is important to 
document sources (for circulation copies) but one is not ready to tackle 
the design and generation of more formal backmatter.


--
Rik

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

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

Re: [NTG-context] Issues using publications subsystem for non-bibliographic database

2018-12-07 Thread Rik Kabel

On 12/7/2018 22:51, Alan Braslau wrote:

You can place references rendered as you need, not necessarily in one
single bibliography list, but they must be rendered somewhere,
otherwise numbering and cross-referencing is meaningless. In the case
of footnote references, each footnote contains a rendering (not a
citation) of a fragment of the list.

You are thinking too much in a standard frame, and I'm not sure what
you want to accomplish.

One "other use" case that I make is a catalog of hundreds of
mesophases. I "cite" them and their various properties throughout the
text, an my "list rendering" has become an index.

Alan

I would like simply to prepare a paper structured like the one found at 
https://tannerlectures.utah.edu/Greenblatt%20Lecture.pdf. There is no 
biblography; there are bibliographic references in footnotes. There is 
no interaction. The only cross-references are the footnote indices.


If I could in addition pull in blocks of text from a secondary database, 
that is lagniappe. Neither function requires rendering in a separate 
list or lists.


Certainly ConTeXt's bibliographic subsystem should be capable of 
supporting such a basic format as that, but I can see no way to get it 
to do so.


--
Rik

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

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

Re: [NTG-context] Issues using publications subsystem for non-bibliographic database

2018-12-07 Thread Rik Kabel

On 12/7/2018 18:01, Alan Braslau wrote:

On Fri, 7 Dec 2018 17:19:35 -0500
Rik Kabel  wrote:


As a followup, here is a close-to-minimal example which demonstrates the
failure when \placebtxrendering is omitted.

It is not a failure. The whole intent is to place an appropriate rendering that 
you can tailor to your specific needs. There is little sense in a 
cross-reference (link) or reference number if there is not sort of list.

Alan


That makes absolutely no sense. That means that an informal paper that 
puts all references in footnotes and has no bibliography and does not 
need cross-referencing or reference numbering cannot take advantage of a 
bibliographic database. And in fact, that is the case shown below. The 
footnotes appear only when the comment line is uncommented.


(I also tried \nocite[*] together with \placebtxrendering[method=none] 
and also with \placebtxrendering[criterium=none] for the rendering, but 
that does not help. It seems that the entries only display when 
something gets added to the rendering list.)


   \startbuffer[quotesources]
   @book{Schopenhauer1862v2,
  title   = {Parerga und Paralipomena},
  subtitle= {Kleine Philosophische Schriften},
  publisher   = {A. W. Hahn},
  year= {1862},
  volume  = {2},
  volumes = {2},
  author  = {Arthur Schopenhauer},
  editor  = {Julius Frauenstädt},
  address = {Berlin},
  language= {german},
   }
   @book{SchopenhauerPayne2000,
  title   = {Parerga and Paralipomena},
  subtitle= {Short Philosophical Essays},
  publisher   = {Oxford University Press Clarendon Press},
  address = {New York and Oxford},
  year= {2000},
  author  = {Arthur Schopenhauer},
  volumes = {2},
  origyear= {1974},
  origlanguage= {german},
  translator  = {Eric F. J. Payne},
   }
   \stopbuffer

   \loadbtxdefinitionfile
  [apa]
   \usebtxdefinitions
  [apa]
   \usebtxdataset
  [quotesources.buffer]

   \starttext

  As Artie said:\footnote{\placecitation[Schopenhauer1862v2]}

  Es wäre gut Bücher kaufen, wenn man die Zeit, sie zu
  lesen, mitkaufen könnte, aber man verweschelt meistens
  den Ankauf der Bücher mit dem Aneignen ihres Inhalts.

  Payne translates this as:\footnote{\cite[entry][SchopenhauerPayne2000]}

  Buying books would be a good thing if one could also
  buy the time to read them in: but as a rule the
  purchase of books is mistaken for the appropriation
  of their contents.

   %  \placebtxrendering [method=dataset]
   \stoptext

I understood §5.4 of the manual to mean that rendering definitions 
(created by \definebtxrendering and related setups) do not have an 
effect on \placecitation (and \cite[field][tag]) commands. Rereading it, 
I wonder if the meaning is supposed to be more than that, and to cover 
this situation?


Surely this can be changed!

--
Rik


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

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

Re: [NTG-context] Issues using publications subsystem for non-bibliographic database

2018-12-07 Thread Rik Kabel

List,

As a followup, here is a close-to-minimal example which demonstrates the 
failure when \placebtxrendering is omitted.


When run as given, the extract field content is not displayed. When the 
commented line is uncommented, the result includes the content.


   \startbuffer[quotedatabase]
   @quote{qSchopA02,
  extract = {Es wäre gut Bücher kaufen, wenn man die Zeit, sie zu
 lesen, mitkaufen könnte, aber man verweschelt meistens
 den Ankauf der Bücher mit dem Aneignen ihres Inhalts.},
  author  = {Schopenhauer, Arthur},
   }
   \stopbuffer
   \usebtxdataset
  [quotedb]
  [quotedatabase.buffer]
   \definebtxrendering
  [quotedb]
  [dataset=quotedb]
   \setupbtx
  [dataset=quotedb]

   \starttext

  Extract:\par
  \cite[extract][qSchopA02]

  Rendering:\par
   %  \placebtxrendering [quotedb][method=dataset]

  Completeness:\par
  \showbtxdatasetcompleteness[dataset=quotedb]
   \stoptext

The log does not indicate any issues.

Is this expected? Is \placebtxrendering required?

--
Rik

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

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

[NTG-context] Issues using publications subsystem for non-bibliographic database

2018-12-06 Thread Rik Kabel

List,

I am trying to use the publications subsystem to support a 
non-bibliographic database, as chapter 10 of mkiv-publications suggests 
one can. My example is a database of quotations.


I have been partially successful, which is another way of saying there 
are some issues I have not been able to resolve.


First, what goes into a specification lua file (I think that is what the 
document suggests I need) that says my author field should be handled as 
a bibliographic author field? There is some processing: {Schopenhauer, 
Arthur} gets displayed as ArthurSchopenhauer (with no space). Specifying 
an authorconversion in \setupbtx has no effect, so it looks like I have 
to do something else.


Second, how can I link one entry to another. The example shows my 
almost-working attempt, adding a linking key (translation in the 
example) and recursively using it in processing. This fails, but when I 
use the literal equivalent, it works. (And the recursion does not seem 
to be the problem.) I know that this description is not clear, but the 
example should demonstrate the issue.


Finally, the document loses all data from the quotation database when 
\placebtxrendering for that database is omitted.


I apologize for the larger-than-usual example size.

   %{[(

   \startbuffer[quotesources]
   @book{Schopenhauer1862v2,
  title   = {Parerga und Paralipomena},
  subtitle= {Kleine Philosophische Schriften},
  publisher   = {A. W. Hahn},
  year= {1862},
  volume  = {2},
  volumes = {2},
  author  = {Arthur Schopenhauer},
  editor  = {Julius Frauenstädt},
  address = {Berlin},
  language= {german},
   }
   @book{SchopenhauerPayne2000,
  title   = {Parerga and Paralipomena},
  subtitle= {Short Philosophical Essays},
  publisher   = {Oxford University Press Clarendon Press},
  address = {New York and Oxford},
  year= {2000},
  author  = {Arthur Schopenhauer},
  volumes = {2},
  origyear= {1974},
  origlanguage= {german},
  translator  = {Eric F. J. Payne},
   }
   \stopbuffer

   \startbuffer[quotedatabase]
   @quote{qSchopA02,
  extract = {Es wäre gut Bücher kaufen, wenn man die Zeit, sie zu
 lesen, mitkaufen könnte, aber man verweschelt meistens
 den Ankauf der Bücher mit dem Aneignen ihres Inhalts.},
  author  = {Schopenhauer, Arthur},
  born= {1788},
  died= {1860},
  work= {\cite[title][sources::Schopenhauer1862v2]},
  year= {1862},
  location= {chapter\btxnbsp24},
  translation = {\cite[tag][qPayneE01]},
  attribnote  = {The selection was inserted posthumously into the work,
 probably based on notes Schopenhauer left, by Julius
 Frauenstädt, his literary executor, and has appeared
 in different locations in various editions.},
   }
   @quote{qPayneE01,
  extract = {Buying books would be a good thing if one could also
 buy the time to read them in: but as a rule the
 purchase of books is mistaken for the appropriation
 of their contents.},
  author  = {Eric F. J. Payne},
  born= {1895},
  died= {1983},
  year= {1974/2000},
  work= {\cite[title][sources::SchopenhauerPayne2000]},
  page= {559},
   }
   \stopbuffer

   \loadbtxdefinitionfile
  [apa]
   \usebtxdefinitions
  [apa]
   \usebtxdataset
  [sources]
  [quotesources.buffer]
   \definebtxrendering
  [sources]
  [apa]
  [group=bib,
   dataset=sources]
   \setupbtx
  [sources]
  [specification=apa,
   dataset=sources]

   \usebtxdataset
  [quotedb]
  [quotedatabase.buffer]
   \definebtxrendering
  [quotedb]
  [group=quotes,
   sorttype=cite,
   numbering=no,
   dataset=quotedb]
   \setupbtx
  [specification=quotedb,
   authorconversion=normalshort,
   dataset=quotedb]

   \startsetups btx:quotedb:cite:attribnote
   {\rm\btxfield{attribnote}}
   \stopsetups
   \startsetups btx:quotedb:cite:born
   {\rm\btxfield{born}}
   \stopsetups
   \startsetups btx:quotedb:cite:died
   {\rm\btxfield{died}}
   \stopsetups
   \startsetups btx:quotedb:cite:location
   {\rm\btxfield{location}}
   \stopsetups
   \startsetups btx:quotedb:cite:page
   {\rm\btxfield{page}}
   \stopsetups
   \startsetups btx:quotedb:cite:work
   {\rm\btxfield{work}}
   \stopsetups
   \startsetups btx:quotedb:cite:extract
   {\rm\btxfield{extract}}
   \stopsetups
   \startsetups btx:quotedb:cite:title
   {\rm\it\btxfield{title}}
   \stopsetups

   \startsetups btx:quotedb:list:quote
  \limitatetext{\btxfield{extract}}{\textwidth}{\unknown}
  \blank[none]
  -\btxspace\btxflush{author}
  

Re: [NTG-context] PDF/A no longer compliant?

2018-11-29 Thread Rik Kabel

On 11/4/2018 07:27, luigi scarso wrote:



On Fri, Nov 2, 2018 at 7:06 PM Rik Kabel <mailto:cont...@rik.users.panix.com>> wrote:




it should be fixed in the next beta.



I am afraid it is not fixed. The compilation of the wiki example now 
fails with:


   lua error   > lua error on line 12 in file
   c://Users/micro/Projects/TeX/ConTeXt/pdfa.tex:
   ...ce0dde776fb1556f32e\formats\luajittex/lpdf-ini-macro.lua:236:
   attempt to call global 'pdfsetomitcidset' (a nil value)

and in a larger file, I also see:

   system  > lua > fatal error 1 in file
   
'C:/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/antykwatorunskacond-bold.tma'

I have deleted the lua cache and regenerated and so no different result.

I am running, per my log:

 ConTeXt was updated from version 2018.10.18 00:07 to version 
2018.11.29 19:46.

 LuaTeX was updated from version 1.09.0 6980 to version 1.09.0 6998.

--
Rik

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

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

Re: [NTG-context] can \REGISTER[key]{term} modify typesetting (adding space)?

2018-11-27 Thread Rik Kabel

On 11/27/2018 16:12, Wolfgang Schuster wrote:

The space after the register entry is only ignored when you put it
before the start of a paragraph because ConTeXt saves the content
and flushes it at the start of the next paragraph.

When the register entry appear within in a paragraph or when TeX
is in horizontal mode (like in your footnote) the space after the argument
stays and appears in the text. In this case you have to put a comment
after it to ignore the space which is generated from the line break in 
your

document.

Wolfgang


Rik Kabel schrieb am 27.11.18 um 21:17:


And now I can construct it, so here is a not-necessarily-minimal 
example. Note that the problem occurs in footnotes (and endnotes, 
left as an exercise to the curious).


\setuppapersize[A9]
\starttext
\startparagraph
Text
\startfootnote
Text
\stopfootnote
\stopparagraph
\startparagraph
\index{Strumpf}
Text
\startfootnote
\index{Strumpf}
Text
\stopfootnote
\stopparagraph\startparagraph
Text
\startfootnote
\index{Strumpf}%
Text
\stopfootnote
\stopparagraph
\stoptext

With the result:

What is unexpected is that the space does not appear in the body 
(non-footnote) text of the second paragraph. The difference between 
handling in notes and in body text seems discordant.


--
Rik

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

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

Re: [NTG-context] can \REGISTER[key]{term} modify typesetting (adding space)?

2018-11-27 Thread Rik Kabel

On 11/27/2018 08:43, Rik Kabel wrote:

On 11/27/2018 05:38, mf wrote:

In my setup, i have an index of names:

\defineregister[Nome][...]

The indexing of names can be toggled with a mode: --mode=AddNames

The setup is something like this:

\startmode[AddNames]
  \Name[key]{term}\xmlflush{#1}
\stopmode
\startnotmode[AddNames]
  \xmlflush{#1}
\stopnotmode

I noticed that \Name[key]{term} adds some space, leading to a 
different typesetting of the paragraph in rare cases (especially in a 
paragraph full of names).


Can \Name[key]{term} add some space, or should i look for a different 
bug in my setup?


Sorry, no MWE; i tried, but i could not reproduce the problem in a 
minimal example.


This has been a long-standing issue with registers in straight 
(non-XML) code. I always follow a \index{} with a % to avoid it. I 
suspect that will help here as well, splitting onto two lines, as


\Name[key]{term}%
\xmlflush{#1}

or perhaps

\Name[key]{term}\letterpercent
\xmlflush{#1}

Have you tried this?

(I cannot construct an MWE at this point either.)

And now I can construct it, so here is a not-necessarily-minimal 
example. Note that the problem occurs in footnotes (and endnotes, left 
as an exercise to the curious).


   \setuppapersize[A9]
   \starttext
   \startparagraph
   Text
   \startfootnote
   Text
   \stopfootnote
   \stopparagraph
   \startparagraph
   \index{Strumpf}
   Text
   \startfootnote
   \index{Strumpf}
   Text
   \stopfootnote
   \stopparagraph\startparagraph
   Text
   \startfootnote
   \index{Strumpf}%
   Text
   \stopfootnote
   \stopparagraph
   \stoptext

With the result:

--
Rik

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

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

Re: [NTG-context] can \REGISTER[key]{term} modify typesetting (adding space)?

2018-11-27 Thread Rik Kabel

On 11/27/2018 05:38, mf wrote:

In my setup, i have an index of names:

\defineregister[Nome][...]

The indexing of names can be toggled with a mode: --mode=AddNames

The setup is something like this:

\startmode[AddNames]
  \Name[key]{term}\xmlflush{#1}
\stopmode
\startnotmode[AddNames]
  \xmlflush{#1}
\stopnotmode

I noticed that \Name[key]{term} adds some space, leading to a 
different typesetting of the paragraph in rare cases (especially in a 
paragraph full of names).


Can \Name[key]{term} add some space, or should i look for a different 
bug in my setup?


Sorry, no MWE; i tried, but i could not reproduce the problem in a 
minimal example.


This has been a long-standing issue with registers in straight (non-XML) 
code. I always follow a \index{} with a % to avoid it. I suspect that 
will help here as well, splitting onto two lines, as


   \Name[key]{term}%
   \xmlflush{#1}

or perhaps

   \Name[key]{term}\letterpercent
   \xmlflush{#1}

Have you tried this?

(I cannot construct an MWE at this point either.)

--
Rik

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

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

Re: [NTG-context] PDF/A output fails validation

2018-11-22 Thread Rik Kabel

On 11/22/2018 12:43, luigi scarso wrote:



On Thu, Nov 22, 2018 at 12:45 AM luigi scarso <mailto:luigi.sca...@gmail.com>> wrote:




On Thu, Nov 22, 2018 at 12:38 AM Rik Kabel
mailto:cont...@rik.users.panix.com>>
wrote:

With the latest beta, PDF/A fails validation in a new way.

Using the example document in the wiki
<https://wiki.contextgarden.net/PDF/A>, PDF/A-1a validation
fails the online validator
<https://www.pdf-online.com/osa/validate.aspx> [2] with:

The key MarkInfo is required but missing.
The key StructTreeRoot is required but missing.
The key CIDSet is required but missing.
The document does not conform to the requested standard.
The document contains fonts without embedded font programs
or encoding information (CMAPs).
The document doesn't provide appropriate logical structure
information.
The document does not conform to the PDF/A-1a standard.

while with PDF/A-1b requested, the MarkInfo and StructTreeRoot
issues are not reported. (A-2a and A-3a fail in the same was
as A-1a.)

[1] https://wiki.contextgarden.net/PDF/A

[2] https://www.pdf-online.com/osa/validate.aspx



Thank you for the report, I will check asap.


these look ok now

\nopdfcompression
\setupinteraction
  [title=TITLE,
   subtitle=SUBTITLE,
   author=AUTHOR,
   keyword={{KEYWORD1, KEYWORD2}, KEYWORD3}]

%% For PDF/A
\setupbackend[
%format={pdf/a-1b:2005}, % OK
%format={pdf/a-1a:2005}, % OK
%format={pdf/a-2a},      % OK
format={pdf/a-3a},       % OK
profile={srgb.icc,default_gray.icc},
intent=ISO coated v2 300\letterpercent\space (ECI)]

%% Tagged PDF
%% method=auto ==> default tags by Adobe
\setupbackend[export=yes]
\setupstructure[state=start,method=auto]

\starttext

\chapter[chap:testing]{Testing}

\input knuth

\input tufte

\input knuth

\placefigure[middle][fig:foo]
  {This is an image}
  {\externalfigure[cow.jpg]}

\input tufte

\input knuth

\input tufte

\stoptext

--
luigi


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

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


Still fails here, using the code you posted, with:

   Validating file "pdfa.pdf" for conformance level pdfa-3a
   The key MarkInfo is required but missing.
   The key StructTreeRoot is required but missing.
   The document does not conform to the requested standard.
   The document doesn't provide appropriate logical structure information.
   The document does not conform to the PDF/A-3a standard.

I am running on W10-64 with:

  the local LuaTeX version is   1.09.0 6998 on Lua 5.3.5,
  the local ConTeXt timestamp is    2018-11-18 13:15 UTC

--
Rik



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

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

[NTG-context] PDF/A output fails validation

2018-11-21 Thread Rik Kabel

With the latest beta, PDF/A fails validation in a new way.

Using the example document in the wiki 
, PDF/A-1a validation fails the 
online validator  [2] with:


   The key MarkInfo is required but missing.
   The key StructTreeRoot is required but missing.
   The key CIDSet is required but missing.
   The document does not conform to the requested standard.
   The document contains fonts without embedded font programs or
   encoding information (CMAPs).
   The document doesn't provide appropriate logical structure information.
   The document does not conform to the PDF/A-1a standard.

while with PDF/A-1b requested, the MarkInfo and StructTreeRoot issues 
are not reported. (A-2a and A-3a fail in the same was as A-1a.)


[1] https://wiki.contextgarden.net/PDF/A

[2] https://www.pdf-online.com/osa/validate.aspx

--
Rik

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

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

[NTG-context] Startparagraph, was Re: German introduction to context

2018-11-02 Thread Rik Kabel

On 11/2/2018 07:28, Hans Hagen wrote:


normally \startparagraph is not needed


Hans,

Can you explain in a bit more detail about when \startparagraph is needed.

Is it needed to generate properly tagged paragraphs in a tagged pdf 
document, or is that tagging done by other means?


Under what circumstances is it useful?

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

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

[NTG-context] PDF/A no longer compliant?

2018-11-02 Thread Rik Kabel
The example file in the wiki  (at https://wiki.contextgarden.net/PDF/A) 
no longer verifies as compliant PDF/A. VeraPDF rejects it, and 
https://www.pdf-online.com/osa/validate.aspx complains:



x107.pdf
Compliance  pdfa-1b
Result  Document does not conform to PDF/A.
Details 

Validating file "x107.pdf" for conformance level pdfa-1b

Invalid content of XMP packet header attribute 'begin': '??'.

The property 'pdfx:ConTeXt.Support' is not defined in schema 'PDF/X ID 
Schema'.


The property 'pdfx:TeX.Support' is not defined in schema 'PDF/X ID Schema'.

The property 'pdfx:LuaTeX.Version' is not defined in schema 'PDF/X ID 
Schema'.


The property 'pdfx:LuaTeX.Functionality' is not defined in schema 'PDF/X 
ID Schema'.


The property 'pdfx:LuaTeX.LuaVersion' is not defined in schema 'PDF/X ID 
Schema'.


The property 'pdfx:LuaTeX.Platform' is not defined in schema 'PDF/X ID 
Schema'.


The document does not conform to the requested standard.

The document's meta data is either missing or inconsistent or corrupt.

The document does not conform to the PDF/A-1b standard.

Done.

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

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

Re: [NTG-context] Issue with ligatures before dashes

2018-10-30 Thread Rik Kabel

On 10/30/2018 13:58, Hans Hagen wrote:

On 10/30/2018 5:32 PM, Rik Kabel wrote:

In one 300-page book, this hits a few times (off-course, 
oft-repeated,...). Not the worst problem, but clearly a regression.
i think i know what happens ... fwiw, it's not related to the engine 
(nothing really changes there nor will change but 1.07 probably is 
equivalent to a by now way older context version) ... it all has to do 
with some heuristics wrr to discretionary interference ...


Hans


So not an regression, but an un-caught side-effect of other changes.

In any case, 1.07 will be with us for a while -- it is part of TL18, so 
probably part of some distros.


--
Rik


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

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

[NTG-context] Issue with ligatures before dashes

2018-10-30 Thread Rik Kabel
This was reported on the LuaLatex list yesterday, and I extended the 
example to include ConTeXt compounds. From my test folder:


   %% No ligatures before dashes! Reported as: “ligatures before
   %%   dashes not working with LuaLaTeX 1.07.0” on comp.tex.luatex,
   %%   2018-10-29 by Toni Dietze. This is also a problem with ConTeXt,
   %%   and is a problem with compounds as well. The problem is worse
   %%   with 1.09.0: With 1.07.0 (6686) it fails with the bare hyphen
   %%   but had no problem with en-dash, em-dash, and the compounds
   %%   shown below. With luatex 1.09.0 (6930) it fails with bare
   %%   hyphen and all shown compounds except |=|.

   \starttext
  \setupTABLE[c][1,3][align=left]
  \setupTABLE[c][2,4][loffset=1em,roffset=1em]
  \setupTABLE[r][each][offset=0pt]
  \bTABLE[frame=off]
   \bTABLEhead
\bTR[align=center,bottomframe=on]
  \bTH[nc=2] Non-compound\eTH
  \bTH[nc=2] Compound\eTH
\eTR
   \eTABLEhead
   \bTABLEbody
\bTR
  \bTD - \eTD \bTD off-course\eTD
  \bTD \|-\| \eTD \bTD off|-|course\eTD
\eTR
\bTR
  \bTD – \eTD \bTD off–course\eTD
  \bTD \|–\| \eTD \bTD off|–|course\eTD
\eTR
\bTR
  \bTD — \eTD \bTD off—course\eTD
  \bTD \|—\| \eTD \bTD off|—|course\eTD
\eTR
\bTR
  \bTD   \eTD \bTD  \eTD
  \bTD \|_\| \eTD \bTD off|_|course\eTD
\eTR
\bTR
  \bTD   \eTD \bTD  \eTD
  \bTD \|=\| \eTD \bTD off|=|course\eTD
\eTR
   \eTABLEbody
  \eTABLE
   \stoptext

In one 300-page book, this hits a few times (off-course, 
oft-repeated,...). Not the worst problem, but clearly a regression.


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

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

Re: [NTG-context] Possible seeindex enhancement

2018-10-27 Thread Rik Kabel

On 10/25/2018 16:39, Rik Kabel wrote:


List,

I am looking for a way to modify the text used for \seeindex (in 
English, "see") to have two types of seeindex result in the same index 
register. I would like to produce, for example,


pseudepigraphy, 103,/see also obliteration/

and at the same time be able to produce the standard

Marut, Ret,/see Traven, B./

For the first of these in print documents (no interaction required) I 
can use \seeindex{pseudepigraphy}{also obliteration}, but that does 
not produce an interactive link.


Can anyone suggest how to accomplish this?

--
Rik



Following up on my post, here is an MWE demonstrating the lack of 
interaction, which is expected because {also obliteration} is not indexed:


   \setupinteraction [state=start]
   \setupregister[index]
  [check=no]
   \seeindex {pseudepigraphy}
   {also obliteration}
   \seeindex {Matilda effect}
   {obliteration}
   \seeindex {Marut, Ret}
   {Traven, B.}
   \starttext
  Something, but could be only \tex{dontleavhmode}.
  \index{obliteration}
  \index{pseudepigraphy}
  \index{Traven, B.}
   \placeindex
   \stoptext

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

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

[NTG-context] Possible seeindex enhancement

2018-10-25 Thread Rik Kabel

List,

I am looking for a way to modify the text used for \seeindex (in 
English, "see") to have two types of seeindex result in the same index 
register. I would like to produce, for example,


   pseudepigraphy, 103,/see also obliteration/

and at the same time be able to produce the standard

   Marut, Ret,/see Traven, B./

For the first of these in print documents (no interaction required) I 
can use \seeindex{pseudepigraphy}{also obliteration}, but that does not 
produce an interactive link.


Can anyone suggest how to accomplish this?

--
Rik
//


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

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

[NTG-context] Bibliography sort and name-hyphenation issues

2018-10-24 Thread Rik Kabel

List,

Given this example:

 \enabletrackers   [publications.authorhash]
 \startbuffer  [bib]
@book{dalambert1743,
   title   = {Traite de Dynamique},
   author  = {Jean Le Rond d’Alembert},
   publisher   = {David l’aîné},
   address = {Paris},
   language= {french},
   year= {1743},
}
@book{darwin1871,
   author  = {Charles Darwin},
   title   = {The Descent of Man and Selection in
  Relation to Sex},
   year= {1871},
   publisher   = {John Murray},
   address = {London},
}
@book{dee1564,
   author  = {John Dee},
   title   = {Monas Hieroglyphica},
   year= {1564},
   publisher   = {Gulielmus Sylvius},
   address = {Antwerp}
   language= {latin},
}
@book{defoe1704,
   author  = {Daniel Defoe},
   title   = {An Essay on the Regulation of the Press},
   year= {1704},
   publisher   = {sine nomine},
   address = {London},
}
@book{montaigne1908,
   title   = {The Essayes of {Michael} {Lord} of {Montaigne}},
   subtitle= {Done into {English} by {John} {Florio}},
   volumes = {3},
   volume  = {1},
   author  = {Montaigne, Michel de},
   introduction= {Thomas Seccombe},
   translator  = {John Florio},
   origlanguage= {latin},
   publisher   = {Grant Richards},
   address = {London},
   year= {1908},
   origyear= {1603},
}
@book{digbyetal1712,
   author  = {John Digby and others},
   title   = {{Epicurus’s} Morals},
   publisher   = {Sam. Briscoe},
   year= {1712},
   address = {London},
}
@book{querard1850,
   author  = {Joseph-Marie Quérard},
   title   = {Les supercheries littéraires dévoilées, galerie
  des auteurs apocryphes, supposés, déguisés,
  plagiaires, et des éditeurs infidèles, littérature
  française},
   year= {1850},
   publisher   = {Imprimerie Maulde et Renou},
   address = {Paris},
   language= {french},
}
 \stopbuffer
 \usebtxdefinitions[apa]
 \usebtxdataset[bib.buffer]
 \starttext
   \placebtxrendering  [method=dataset]
 \stoptext

I expect to see a bibliography (reference list in APA terms) in the order:

   d'Alembert
   Darwin
   Dee
   Defoe
   de Montaigne
   Digby
   Quérard

But the actual result is quite different (see attached), with de 
Montaigne following Digby, no hyphen between the initials in the Quérard 
entry, and an odd handling of d’Alembert. (The authorhash does have the 
hyphen for the Quérard entry.)


So, the question is, what can be done to get the desired (APA defined) 
order (alphabetize letter-by-letter, ignoring spaces, capitalization, 
hyphens,  apostrophes, periods, and accent marks)?


Beyond that, what can be done to get Montaigne sorted with M entries 
(displayed as “Montaigne, M. de” or “de Montaigne, M.”)?


--
Rik



huh.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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Unexpected space after hyphen in xml/html export

2018-10-11 Thread Rik Kabel

On 10/10/2018 15:11, Rik Kabel wrote:

On 10/10/2018 14:50, Rik Kabel wrote:

On 10/8/2018 18:32, Hans Hagen wrote:


Alas, it is fixed for that particular occurence, but it still 
occurs 29 times in the document (using today's beta).


A more extended search shows that there are also spaces afters 
en-dashes (in "Press|–|Citizen" and  in "Miniatur|–|Bibliothek der 
Deutschen Classiker"), but none after em-dashes. Unfortunately, my 
attempts to reproduce this in a smaller document have so far failed.

well, you know: no mwe, no solution
And here is the mwe. The culprit, it appears, is bidi. I have tried 
all documented options (but not all combinations) for 
\setupdirections, and the only one under which there is no problem is 
"off". With bidi active, there is a spurious space wherever a 
linebreak is introduced. As the example demonstrates, this is not a 
function of the compounds, but of hyphenation in general.


\setupbackend [export=yes]
\setupdirections  [bidi=on]
\starttext
abraca% adjust to cause hyphenation with your textwidth
abra|-|cadabra abra|-|cadabra abra|-|cadabra abra|-|cadabra
abra|-|cadabra abra|-|cadabra abra|-|cadabra abra|-|cadabra
abra|-|cadabra abra|-|cadabra abra|-|cadabra abra|-|cadabra
abra-cadabra abra-cadabra abra-cadabra abra-cadabra
abra-cadabra abra-cadabra abra-cadabra abra-cadabra
abra-cadabra abra-cadabra abra-cadabra abra-cadabra
\stoptext

(The problem appears in the export html/xml file, not in the pdf.)

Not a function of explicit compounds (||) but of hyphenation of 
compounds. Normal hyphenation does not bring about the problem.


I also note that \setupdirection with every option combination I have 
tried has no discernible effect on my export output, and can safely be 
removed from the export mode of my document, so for me this issue 
disappears.

I do not know if this is the general case.
--
Rik
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Unexpected space after hyphen in xml/html export

2018-10-10 Thread Rik Kabel

On 10/10/2018 14:50, Rik Kabel wrote:

On 10/8/2018 18:32, Hans Hagen wrote:


Alas, it is fixed for that particular occurence, but it still occurs 
29 times in the document (using today's beta).


A more extended search shows that there are also spaces afters 
en-dashes (in "Press|–|Citizen" and  in "Miniatur|–|Bibliothek der 
Deutschen Classiker"), but none after em-dashes. Unfortunately, my 
attempts to reproduce this in a smaller document have so far failed.

well, you know: no mwe, no solution
And here is the mwe. The culprit, it appears, is bidi. I have tried 
all documented options (but not all combinations) for 
\setupdirections, and the only one under which there is no problem is 
"off". With bidi active, there is a spurious space wherever a 
linebreak is introduced. As the example demonstrates, this is not a 
function of the compounds, but of hyphenation in general.


\setupbackend [export=yes]
\setupdirections  [bidi=on]
\starttext
abraca% adjust to cause hyphenation with your textwidth
abra|-|cadabra abra|-|cadabra abra|-|cadabra abra|-|cadabra
abra|-|cadabra abra|-|cadabra abra|-|cadabra abra|-|cadabra
abra|-|cadabra abra|-|cadabra abra|-|cadabra abra|-|cadabra
abra-cadabra abra-cadabra abra-cadabra abra-cadabra
abra-cadabra abra-cadabra abra-cadabra abra-cadabra
abra-cadabra abra-cadabra abra-cadabra abra-cadabra
\stoptext

(The problem appears in the export html/xml file, not in the pdf.)

Not a function of explicit compounds (||) but of hyphenation of 
compounds. Normal hyphenation does not bring about the problem.


--
RIk

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

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

Re: [NTG-context] Unexpected space after hyphen in xml/html export

2018-10-10 Thread Rik Kabel

On 10/8/2018 18:32, Hans Hagen wrote:


Alas, it is fixed for that particular occurence, but it still occurs 
29 times in the document (using today's beta).


A more extended search shows that there are also spaces afters 
en-dashes (in "Press|–|Citizen" and  in "Miniatur|–|Bibliothek der 
Deutschen Classiker"), but none after em-dashes. Unfortunately, my 
attempts to reproduce this in a smaller document have so far failed.

well, you know: no mwe, no solution
And here is the mwe. The culprit, it appears, is bidi. I have tried all 
documented options (but not all combinations) for \setupdirections, and 
the only one under which there is no problem is "off". With bidi active, 
there is a spurious space wherever a linebreak is introduced. As the 
example demonstrates, this is not a function of the compounds, but of 
hyphenation in general.


   \setupbackend [export=yes]
   \setupdirections  [bidi=on]
   \starttext
   abraca% adjust to cause hyphenation with your textwidth
   abra|-|cadabra abra|-|cadabra abra|-|cadabra abra|-|cadabra
   abra|-|cadabra abra|-|cadabra abra|-|cadabra abra|-|cadabra
   abra|-|cadabra abra|-|cadabra abra|-|cadabra abra|-|cadabra
   abra-cadabra abra-cadabra abra-cadabra abra-cadabra
   abra-cadabra abra-cadabra abra-cadabra abra-cadabra
   abra-cadabra abra-cadabra abra-cadabra abra-cadabra
   \stoptext

(The problem appears in the export html/xml file, not in the pdf.)
--
Rik
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

  1   2   3   4   5   >