Re: [NTG-context] Clickable url problem with \useurl and \url

2021-10-12 Thread Rik Kabel via ntg-context


On 10/12/2021 03:44, Taco Hoekwater wrote:

Hi,


On 12 Oct 2021, at 04:30, Rik Kabel via ntg-context  wrote:

Hello List,

I notice an inconsistency in the clickable area when using \useurl. With the 
following example, both the \from and the \url are clickable in some lines (as 
noted iin the value of \from) but in others, the \from is clickable but not the 
\url.

It does seem sensitive to the urlL, but I cannot see a pattern.

It is the pdf viewer program that automatically interprets the \url-produced 
text and 'invents' a link, it is not
ConTeXt itself. The exact rules may therefore vary depending on the pdf viewer 
you use.

In Apple's Preview, all items are in fact clickable. But only \from produces 
actual pdf hyperlink annotations.


Should I use something other than \url[earlXX] here to get the clickable 
literal url from useurl?

This, maybe

\goto{\url[earlLH]}[url(earlLH)]

(perhaps wrapped in a short macro)

Best wishes,
Taco

—
Taco Hoekwater  E: t...@bittext.nl
genderfluid (all pronouns)

Indeed, that is the issue. I use Sumatra by default, but I see different 
results with other viewers. I will follow up, if needed, elsewhere.


And yes, for consistency I will look at something based on \goto to make 
explicit what should and should not be clickable.


Thank you for the explanation and suggestion.

--
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] Clickable url problem with \useurl and \url

2021-10-11 Thread Rik Kabel via ntg-context

Hello List,

I notice an inconsistency in the clickable area when using \useurl. With 
the following example, both the \from and the \url are clickable in some 
lines (as noted iin the value of \from) but in others, the \from is 
clickable but not the \url.


It does seem sensitive to the urlL, but I cannot see a pattern.

Example:

   \setupinteraction [state=start]
   \useurl[earlBA] [https://www.bartleby.com/sv/welcome.html]
 [] [Not clickable]
   \useurl[earlPD] [https://www.perseus.tufts.edu/hopper/]
 [] [Not clickable]
   \useurl[earlWC] [https://www.worldcat.org/]
 [] [Not clickable]
   \useurl[earlFC] [https://www.futilitycloset.com/]
 [] [Not clickable]
   \useurl[earlQU] [http://www.quote-unquote.org.uk/]
 [] [Not clickable]
   \useurl[earlAL] [https://www.aldaily.com/]
 [] [Not clickable]
   \useurl[earlTL] [http://stephanus.tlg.uci.edu/]
 [] [Not clickable]
   \useurl[earlQI] [https://quoteinvestigator.com/]
 [] [Clickable]
   \useurl[earlLH] [https://languagehat.com/]
 [] [Clickable]
   \useurl[earlSF] [https://stancarey.wordpress.com/]
 [] [Clickable]
   \starttext
   \from[earlLH]  (\url[earlLH]) \par
   \from[earlQI]  (\url[earlQI]) \par
   \from[earlFC]  (\url[earlFC]) \par
   \from[earlWC]  (\url[earlWC]) \par
   \from[earlQU]  (\url[earlQU]) \par
   \from[earlAL]  (\url[earlAL]) \par
   \from[earlSF]  (\url[earlSF]) \par
   \from[earlBA]  (\url[earlBA]) \par
   \from[earlPD]  (\url[earlPD]) \par
   \from[earlTL]  (\url[earlTL]) \par
   \stoptext

Should I use something other than \url[earlXX] here to get the clickable 
literal url from useurl?


--
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] Undefined control sequence \??markingfilter, with MWE to recreate

2021-10-09 Thread Rik Kabel via ntg-context

Note, this is not a problem in MkIV, just LMTX

On 10/9/2021 15:53, Rik Kabel via ntg-context wrote:


Error with 20211008 ConTeXt:

ConTeXt  ver: 2021.10.08 20:18 LMTX fmt: 2021.10.9  int:
english/english

...

tex error   > tex error on line 1 in file ./mmm.tex: Undefined
control sequence \??markingfilter




    \csname \??markingfilter
    \v!default \endcsname {chapter}
 \sectionheadmarkingtitle
    #1#2->\clf_markingtitle {#1}{#2
    }
 \strc_markings_get_yes
    ...rking \begincsname \??markingclass #1\endcsname
{#2}{#3}}\fi \orelse \ifparameter #2\or \markingcommand
{#1}{\csname \??markingfilter #2\endcsname {#1}}\else
\markingcommand {#1}{\csname \??markingfilter \v!default
\endcsname {#1}}
    \fi \endgroup ...


    \fi
 \page_layouts_process_element_indeed
    ...andcolor #1#2\begincsname \??layouttextstrut
\layoutelementparameter \c!strut \endcsname \ignorecrlf \edef
\p_width {\layoutelementparameter #3}\ifempty \p_width \else
\expandafter \page_layouts_process_element_limited \fi \p_text
    \endgroup
 \currentlayoutelement
    ...kern -\makeupwidth \fi \letfromlayoutelementparameter
\p_text \c!righttext \ifempty \p_text \kern \makeupwidth \else
\hbox to \makeupwidth \bgroup \hss
\page_layouts_process_element_indeed \c!rightstyle \c!rightcolor
\c!rightwidth
    \egroup \fi
 ...


    \stoptext

 1 >>
 2 %\setupheadertexts [][][{\it\getmarking[chapter]}][] % fails
 3 \setupheadertexts [][][{\getmarking[chapter]}][] % fails
 4 %\setupheadertexts [][][\getmarking[chapter]][] % succeeds

MWE to create. Note that the \it is not necessary to trigger the
error, just the braces.

%\setupheadertexts [][][{\it\getmarking[chapter]}][]  % fails
\setupheadertexts [][][{\getmarking[chapter]}][] % fails
%\setupheadertexts [][][\getmarking[chapter]][]   % succeeds

\starttext

\chapter{abc}
abc
\chapter{def}
def
\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
__
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] Undefined control sequence \??markingfilter, with MWE to recreate

2021-10-09 Thread Rik Kabel via ntg-context

Error with 20211008 ConTeXt:

   ConTeXt  ver: 2021.10.08 20:18 LMTX fmt: 2021.10.9  int: english/english

   ...

   tex error   > tex error on line 1 in file ./mmm.tex: Undefined
   control sequence \??markingfilter



   
    \csname \??markingfilter
    \v!default \endcsname {chapter}
\sectionheadmarkingtitle
    #1#2->\clf_markingtitle {#1}{#2
    }
\strc_markings_get_yes
    ...rking \begincsname \??markingclass #1\endcsname {#2}{#3}}\fi
   \orelse \ifparameter #2\or \markingcommand {#1}{\csname
   \??markingfilter #2\endcsname {#1}}\else \markingcommand
   {#1}{\csname \??markingfilter \v!default \endcsname {#1}}
    \fi \endgroup ...
   

    \fi
\page_layouts_process_element_indeed
    ...andcolor #1#2\begincsname \??layouttextstrut
   \layoutelementparameter \c!strut \endcsname \ignorecrlf \edef
   \p_width {\layoutelementparameter #3}\ifempty \p_width \else
   \expandafter \page_layouts_process_element_limited \fi \p_text
    \endgroup
\currentlayoutelement
    ...kern -\makeupwidth \fi \letfromlayoutelementparameter
   \p_text \c!righttext \ifempty \p_text \kern \makeupwidth \else \hbox
   to \makeupwidth \bgroup \hss \page_layouts_process_element_indeed
   \c!rightstyle \c!rightcolor \c!rightwidth
    \egroup \fi
 ...

   
    \stoptext

 1 >>
 2 %\setupheadertexts [][][{\it\getmarking[chapter]}][]  % fails
 3 \setupheadertexts [][][{\getmarking[chapter]}][] % fails
 4 %\setupheadertexts [][][\getmarking[chapter]][]   % succeeds

   MWE to create. Note that the \it is not necessary to trigger the
   error, just the braces.

   %\setupheadertexts [][][{\it\getmarking[chapter]}][]  % fails
   \setupheadertexts [][][{\getmarking[chapter]}][] % fails
   %\setupheadertexts [][][\getmarking[chapter]][]   % succeeds

   \starttext

   \chapter{abc}
   abc
   \chapter{def}
   def
   \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] Question on style-italic vs style=italicface

2021-09-26 Thread Rik Kabel via ntg-context

Wolfgang (off-list),

It is simply wrong to say that \italicface as defined gives only \it or 
\bi as a result. Look at the definition. If the current fontalternative 
is it \it it will give a \tf result. It is sensitive to the current 
state in a similar way that \em and \emph are, but it will always give 
an italic or roman result.


--
Rik

On 9/26/2021 18:37, Wolfgang Schuster via ntg-context wrote:

Rik Kabel via ntg-context schrieb am 27.09.2021 um 00:20:


So, I am asking whether, in places where folks often use 
style=italic, it might be better to consider style=italicface.


Bug report: \meaning\italicface gives:

protected macro:\relax \ifx \fontalternative \s!tf \it \orelse
\ifx \fontalternative
\s!bf \bi \else \tf \fi

This leaves out the transition from bi to bf. That transition is done 
by \emph, but \emph may give slanted while \italicface is always italic.




The \italicface command uses either \it or \bi as result but it never 
result in upright text and the "italic" in the name tells you this, 
there are commands (e.g. \boldface) with similar results. To get a 
slanted style you have to use the \slantedface command.


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
___


Re: [NTG-context] Question on style-italic vs style=italicface

2021-09-26 Thread Rik Kabel via ntg-context

On 9/26/2021 16:29, Wolfgang Schuster via ntg-context wrote:

Rik Kabel via ntg-context schrieb am 26.09.2021 um 22:13:


Hello list mavens,

What are the circumstances under which style=italicface should be 
used instead of style=italic. I note a difference when I define 
highlighting. I expected to see no difference in the line before and 
line after the hairline the example below, but see that italicface 
adapts to nesting, while italic does not:


Are there other places where this makes a difference?

\setupbodyfontenvironment
        [default]
    [em=italicface] %same with italic for this example
\definehighlight
    [emIt]
    [style=italic]
\definehighlight
    [emIf]
    [style=italicface]
\definehighlight
    [emEm]
    [style=\em]

\starttext

{\em abc {\em def} ghi}: \type{\em}

\emph{abc {\emph def} ghi}: \type{\emph}

\emEm{abc {\emEm def} ghi}: \type{\emEm \definehighlight[style=\em]}

\emIf{abc {\emIf def} ghi}: \type{\emIf
\definehighlight[style=italicface]}

\hairline

\emIt{abc {\emIt def} ghi}: \type{\emIt
\definehighlight[style=italic]}

\stoptext



The \em command has two special values which are allowed when you 
change the style with


    \setupbodyfontenvironment[default][em=...]

with the value "slanted" and "italic". When you choose one of them the 
result depends on the current weight (\tf or \bf) but with every other 
value you're just using whatever the style command/name provides.



When you pass "italicface" you're using a style which uses either \it 
or \bi dependant on the current weight. The result from the "italic" 
value doesn't depend on the behavior or the normal italic style (\it) 
which is the reason why you get different result when you use \em 
compared with \it.



Example:

\starttext

\tex{it}: normal {\it italic} {\bf bold {\it italic}}

\tex{italicface}: normal {\italicface italic} {\bf bold {\italicface 
italic}}


\tex{em}: normal {\em italic} {\bf bold {\em italic}}

\stoptext


Wolfgang 



Wolfgang,

I understand that mechanism, but I am asking a different question, I think.

When we specify style=\em or style=italic (and most examples I see use 
the later) in a setup of some sort, I think most folks expect similar 
behavior, but clearly it is not because italic does not track changes in 
emphasis. However, style=italicface does seem to match the behavior of 
style=\em (mostly, see the bug report below).


So, I am asking whether, in places where folks often use style=italic, 
it might be better to consider style=italicface.


Bug report: \meaning\italicface gives:

   protected macro:\relax \ifx \fontalternative \s!tf \it \orelse \ifx
   \fontalternative
   \s!bf \bi \else \tf \fi

This leaves out the transition from bi to bf. That transition is done by 
\emph, but \emph may give slanted while \italicface is always italic.


--
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] Question on style-italic vs style=italicface

2021-09-26 Thread Rik Kabel via ntg-context

Hello list mavens,

What are the circumstances under which style=italicface should be used 
instead of style=italic. I note a difference when I define highlighting. 
I expected to see no difference in the line before and line after the 
hairline the example below, but see that italicface adapts to nesting, 
while italic does not:


Are there other places where this makes a difference?

   \setupbodyfontenvironment
        [default]
    [em=italicface] %same with italic for this example
   \definehighlight
    [emIt]
    [style=italic]
   \definehighlight
    [emIf]
    [style=italicface]
   \definehighlight
    [emEm]
    [style=\em]

   \starttext

   {\em abc {\em def} ghi}: \type{\em}

   \emph{abc {\emph def} ghi}: \type{\emph}

   \emEm{abc {\emEm def} ghi}: \type{\emEm \definehighlight[style=\em]}

   \emIf{abc {\emIf def} ghi}: \type{\emIf
   \definehighlight[style=italicface]}

   \hairline

   \emIt{abc {\emIt def} ghi}: \type{\emIt \definehighlight[style=italic]}

   \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] no lua configuration files found

2021-09-19 Thread Rik Kabel via ntg-context


On 9/19/2021 07:46, Henning Hraban Ramm via ntg-context wrote:

I hope it’s again only me being stupid, but when I try to update my LMTX 
installation or make a new one, the install script always fails with the above 
warning.


~/lmtx_2021-09-19 $ . install.sh
mtxrun  | forcing cache reload
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf-local/web2c' from specification 
'selfautoparent:/texmf-local/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf-context/web2c' from specification 
'selfautoparent:/texmf-context/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf-dist/web2c' from specification 
'selfautoparent:/texmf-dist/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/hraban/texmf/web2c' from specification 'selfautoparent:/texmf/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf-local/web2c' from specification 
'selfautoparent:/texmf-local/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf-context/web2c' from specification 
'selfautoparent:/texmf-context/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf-dist/web2c' from specification 
'selfautoparent:/texmf-dist/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/hraban/texmf/web2c' from specification 
'selfautoparent:/texmf/web2c'
resolvers   | resolving |
resolvers   | resolving | warning: no lua configuration files found
resolvers   | resolving | no texmf paths are defined (using TEXMF)
resolvers   | resolving |
mtxrun  | the resolver databases are not present or outdated
mtx-install | provide valid server and instance

cp: /Users/hraban/lmtx_2021-09-19/tex/texmf-osx-64/bin/mtxrun: No such file or 
directory
cp: 
/Users/hraban/lmtx_2021-09-19/tex/texmf-context/scripts/context/lua/mtxrun.lua: 
No such file or directory
cp: 
/Users/hraban/lmtx_2021-09-19/tex/texmf-context/scripts/context/lua/mtx-install.lua:
 No such file or directory

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

   export PATH=/Users/hraban/lmtx_2021-09-19/tex/texmf-osx-64/bin:$PATH

If you run from an editor you can specify the full path to mtxrun:

   /Users/hraban/lmtx_2021-09-19/tex/texmf-osx-64/bin/mtxrun --autogenerate 
--script context --autopdf ...

The following settings were used:

   server   : lmtx.contextgarden.net,lmtx.pragma-ade.com,lmtx.pragma-ade.nl
   instance : install-lmtx
   extras   :
   ownpath  : /Users/hraban/lmtx_2021-09-19
   platform : osx-64


It looks like the root path is wrongly assumed, since I run the script from 
~/lmtx_2021-09-19, not just ~

TEXROOT is set to /Users/hraban/lmtx/tex (my previous installation), but get 
the same messages if I run the script there.

Same behavior with osx-64 and linux-64.


Hraban


Same here on Windows 10 x64:

   resolvers   | resolving |
   resolvers   | resolving | warning: no lua configuration files found
   resolvers   | resolving | no texmf paths are defined (using TEXMF)
   resolvers   | resolving |
   mtxrun  | the resolver databases are not present or outdated
   mtx-install | provide valid server and instance

--
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] new upload

2021-08-30 Thread Rik Kabel via ntg-context
The corrected upload (2021.08.30 16:23) still has an issue. The 
--autopdf option results in:


╰─► context --autopdf test.tex
lua error : function call: 
...TX/tex/texmf-context/scripts/context/lua/mtx-context.lua:488: attempt 
to call a nil value (global 'filenewsuffix')


Without autopdf things work as expected.

--
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] Indexing redux

2021-08-26 Thread Rik Kabel via ntg-context


On 8/26/2021 03:26, Taco Hoekwater wrote:

Hi Rik,


On 26 Aug 2021, at 03:14, Rik Kabel via ntg-context  wrote:

List,

I am trying to create an index with both "see" and "see also" cross-reference entries.[1] At this 
point, ConTeXt provides basic support for "see" entries via the \seeREGISTER command (it does not properly 
support references to sub-entries) and it provides no support at all for "see also" entries.

Can somebody suggest a way to generate these entries? Perhaps a way of 
inserting entries into the index before it is formatted, in the manner of 
\writetolist or \writebetweenlist? (MkII has \writetoregister, but that did not 
carry forward and I do not know if it would have helped here.)


Since strc-reg.mkiv starts with a number of ’todo’ comments, I think your best 
bet is to create an
actual functional example along with an explanation of what you want the 
typeset result to look
like in the cases where it is not doing what you want.

Generally, explicit examples / test files are the best way to get replies to 
questions
(either by Hans or anyone else).


The following produces what I am looking for, and a bit more. Page 3 of 
the output shows what I would like to see, page 4 is the generated 
index. I don't really need the "see under" and "see also under" 
variants, but they would be nice to have. I am indifferent to having 
stops before "see also"s. I would like to be able to turn checking on or 
off, so that generic directives (in the example, see also specific 
breeds) will not generate an error, while the Ford Prefect example will 
generate an error.



   \defineprocessor[also][color=blue]
   \defineprocessor[under][color=green]
   \defineprocessor[alsounder][color=orange]
   \define\seealsoindex\seeindex
   \define\seealsounderindex\seeindex
   \define\seeunderindex\seeindex
   \setupinteraction [state=start]
   \setupregister    [index][balance=no,check=no]

   %% seeindex entries may start on the same line as their head entry
   \seeindex {dog breeds+Wiener dog}{dog breeds+Dachshund}
   %%  The next example should not work,
   %%    since there is no main entry /Adams, Douglas/
   \seeindex {Prefect, Ford}{Adams, Douglas}

   %%  When referring to a subentry, the target must be a subentry,
   %%    but should display as if a main entry. The next example
   %%    should point to the /Adams+Douglas/ subentry, but it
   %%    should be formatted as if it were /Adams, Douglas/
   \seeindex {Dent, Arthur}{Adams+Douglas}

   %% The following two work as expected
   \seeindex {Matilda effect}{obliteration}
   \seeindex {Marut, Ret}{Traven, B.}

   %% seealso should be placed after as a subentry after real page
   references
   %% seealso should have an appropriate label (default English /see also/)
   \seealsoindex {pseudepigraphy}{also->obliteration}
   \seealsoindex {dog breeds}{also->breeding programs}
   \seealsoindex {dog breeds}{also->specific breeds}
   %% seealsounder is like seealso except that it refers to a main entry
   \seealsounderindex{Coton de Tulear}{alsounder->dog breeds}
   %% seeunder also is like seealso except that it refers to a main entry
   \seeunderindex    {Weimaraner}{under->dog breeds}
   \starttext
 Stuff
 \index{obliteration}
 \index{Adams+Douglas}\index{Adams+John}
 \index{Beagle}
 \index{dog breeds+Beagle}
 \index{dog breeds+Coton de Tulear}
 \index{dog breeds+Dachshund}
 \index{dog breeds+Weimaraner}
   \page
 More stuff
 \index{Adams+John Quincy}
 \index{misquotation}
 \index{pseudepigraphy}
 \index{Traven, B.}
 \index{Beagle}
 \index{Coton de Tulear}
 \index{breeding programs}
   \page
   \definedescription[Index][headstyle=bold,alternative=top,inbetween=]
   \startIndex{a}
 Adams\par
 \quad \reference[AdamsDouglas]{Adams, Douglas}Douglas\quad 1\par
 \quad John\quad 1\par
 \quad John Quincy\quad 2\par
   \stopIndex
   \startIndex{b}
 Beagle\quad 1, 2\par
 \reference[breedingprograms]{breeding programs}breeding
   programs\quad 2
   \stopIndex
   \startIndex{c}
 Coton de Tulear\quad 2.\par
 \quad {\em See also under} \in[dogbreeds]
   \stopIndex
   \startIndex{d}
 \reference[DentArthur]{Dent, Arthur}Dent, Arthur {\em see}
   \in[AdamsDouglas]\par
 \reference[dogbreeds]{dog breeds}dog breeds\par
 \quad \reference[dbBeagle]{dog breeds, Beagle}Beagle\quad 1\par
 \quad \reference[dbCoton]{dog breeds, Coton}Coton de
   Tulear\quad 1\par
 \quad \reference[dbDachshund]{dog breeds,
   Dachshund}Dachshund\quad 1\par
 \quad \reference[dbWeimaraner]{dog breeds,
   Weimarane

[NTG-context] Indexing redux

2021-08-25 Thread Rik Kabel via ntg-context

List,

I am trying to create an index with both "see" and "see also" 
cross-reference entries.[1] At this point, ConTeXt provides basic 
support for "see" entries via the \seeREGISTER command (it does not 
properly support references to sub-entries) and it provides no support 
at all for "see also" entries.


Can somebody suggest a way to generate these entries? Perhaps a way of 
inserting entries into the index before it is formatted, in the manner 
of \writetolist or \writebetweenlist? (MkII has \writetoregister, but 
that did not carry forward and I do not know if it would have helped here.)


I had brought this up to no response a couple of years ago.[2] I am 
hopeful that LMTX may offer a chance to get support for improved 
indexing, and in particular for "see" and "see also" entries.


[1] For definitions and usage of "see" entries, see 
https://docs.oasis-open.org/dita/v1.1/OS/langspec/langref/index-see.html. 
For "see also" entries, see 
https://docs.oasis-open.org/dita/v1.1/OS/langspec/langref/index-see-also.html. 
For a deeper dive, see the publicly available University of Chicago 
Manual of Style version 15 guide, chapter 18, available at 
https://press.uchicago.edu/Misc/Chicago/CHIIndexingComplete.pdf, or more 
recent versions not yet freely available online.


[2] See "Possible seeindex enhancement" at 
https://www.mail-archive.com/ntg-context@ntg.nl/msg89470.html.


--
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] Different footers for frontmatter and bodymatter

2021-08-18 Thread Rik Kabel via ntg-context


On 8/18/2021 05:32, noib3 via ntg-context wrote:
I'd like to have two different footer setups: one for the frontmatter 
(titlepage and table of contents) where the page number in roman 
numerals is reported as a single centered footer. Another for the 
bodymatter where the chapter is on the left footer and the pagenumber 
is on the right.


I can switch between roman numerals and numbers with

```
\defineconversionset
  [frontpart:pagenumber]
  []
  [romannumerals]

\defineconversionset
  [bodypart:pagenumber]
  []
  [numbers]
```

but I can't figure out how to have two different footer setups. Right 
now I have


```
\setupfootertexts
  [chapter]
  [pagenumber]
```


There are a few ways to do this.

 * You can explicitly change the footer settings in the body of the
   document (after \starttext) at any time. If placed within a group,
   the command is local to that group and reverts after the group is
   closed. If not, it applies to the remainder of the document unless
   otherwise overridden. This can be useful for a special page.
 * You can set it in the preamble within
   \startsectionblockenvironment[partname]..\stopsectionblockenvironment
   (where you can also define the number conversion. This is probably
   the easiest way to do it for documents differently-styled blocks.
 * You can forgo the \setupfootertexts commands completely and place
   the desired text in a separate layer. This may allow more precise
   control of the placement and formatting.

No doubt there are other mechanisms 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] New error "page order problem in tree at page"

2021-08-05 Thread Rik Kabel via ntg-context


On 8/5/2021 18:04, Hans Hagen wrote:

On 8/4/2021 9:26 PM, Rik Kabel via ntg-context wrote:

With today's LMTX release I see the warning:

    backend > tags > beware: page order problem in tree at 
page 1


This appears to be recently introduced to the code.

Should it be a concern? If so, where should I look to remedy it?


mwe ...


Here it is:

   \setuptagging [state=start]
   \starttext
 The problem involves tagging.
   \stoptext

This produces, in relevant part:

   system  >
   system  > ConTeXt  ver: 2021.08.06 01:21 LMTX  fmt:
   2021.8.5  int: english/english
   system  >
   system  > 'cont-new.mkxl' loaded
   open source > level 1, order 1, name
   'C:/ConTeXt_LMTX/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
   system  > beware: some patches loaded from cont-new.mkiv
   close source    > level 1, order 1, name
   'C:/ConTeXt_LMTX/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
   system  > files > jobname 'G:/order', input 'G:/order.tex',
   result 'G:/order'
   fonts   > latin modern fonts are not preloaded
   languages   > language 'en' is active
   open source > level 1, order 2, name
   'G:/Projects/Quotations/ConTeXt version/development/order.tex'
   fonts   > preloading latin modern fonts (second stage)
   fonts   > 'fallback modern-designsize rm 12pt' is loaded
   *backend > tags > beware: page order problem in tree at page 1*
   backend > xmp > using file
   'C:/ConTeXt_LMTX/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
   pages   > flushing realpage 1, userpage 1, subpage 1
   close source    > level 1, order 2, name 'G:/order.tex'
   system  > start used files
   system  > text: order
   system  > stop used files
   system  > start used 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
___


[NTG-context] \note[xx] gives unknown reference for \startfootnote, ok for \footnote

2021-08-04 Thread Rik Kabel via ntg-context

The following example:

   \starttext

   abc\footnote[fn:abc]{footnote abc}\ abc

   def
   \startfootnote[fn:def]
 footnote def
   \stopfootnote
   \ def

   No problem here: abc\note[fn:abc]

   Problem appears here: def\note[fn:def]

   \stoptext

Generates a missing reference error for a reference provided on 
\startfootnote (and \startendnote) accessed by \note:


   references  > start missing references
   references  >    1  [][fn:def]
   references  > stop missing references

ConTeXt  ver: 2021.08.04 17:51 LMTX  fmt: 2021.8.4

There was no problem with previous versions.

--
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] New error "page order problem in tree at page"

2021-08-04 Thread Rik Kabel via ntg-context

With today's LMTX release I see the warning:

   backend > tags > beware: page order problem in tree at page 1

This appears to be recently introduced to the code.

Should it be a concern? If so, where should I look to remedy 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
___


[NTG-context] Modules under LMTX, was Re: Use of lettrine module in LMTX

2021-07-25 Thread Rik Kabel

On 7/25/2021 16:14, Nicola wrote:

On 2021-07-23, Arthur Rosendahl  wrote:

On Fri, Jul 23, 2021 at 03:10:59PM +0200, Gerben Wierda wrote:

I just made a remark on ConTeXtgarden not mentioning this.

I am guilty and apologize for the bad advice. But I'd like to point out
that not *all* the modules are out of date, so you may still want to
retain the directory. For instance, the one I rely upon is the vim
module for typesetting code, and that one is compatible with LMTX. There
may be others.

Nicola


Indeed, there are modules that appear to work perfectly well with LMTX.

The fancybreak module has no issues in the way I use it.

Perhaps a list of modules known to run correctly with LMTX is called 
for, and perhaps a classification of modules to indicate which ConTeXt 
versions each supports, and a way to download a distribution-appropriate 
subset.


--
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] Heading for endnotes / grouped by chapter endnotes

2021-06-30 Thread Rik Kabel
For what its worth, I offer my endnote apparatus with updates for parts. 
It uses the standard note/notation mechanism, not a list, for endnotes. 
Perhaps it can be further adapted to the needs of this thread.


There is at least one small issue with it: I have to use \stopendnote 
even though I define \startEndnote. This causes issues with the linter 
(mtxrun --script check ) but seems otherwise harmless.


I am sure that others more versed in ConTeXt can find some ways to fix 
this and improve the overall approach. I welcome suggestions.


%--%
% Endnote apparatus adapted for parts
%
\mainlanguage  [en]
\language  [en]
\setupinteraction  [state=start]
\setuppagenumbering[alternative=doublesided]

\setupheadertexts [{\it\getmarking[part]}][{\it\getmarking[section]}]
[{\it\getmarking[chapter]}][{\it\getmarking[part]}]
\setupheads    [number=no]
\setuphead [part]
   [placehead=yes,
    header=empty]

%- footnote setup -%
% footnotes uses asterisk, dagger, ddagger... so that endnotes
%   and pagenotes have separate sequences. Change way= to suit
%   your footnote frequency

\setupnotation [footnote]
   [numberconversion=set 2,
    way=chapter]

%- endnote setup --%
% endnotes use numeric indices, reset by part

\setupnote [endnote][
    textseparator={,},
    textstyle=\high{\small\hairspace},
    location=none,
    bodyfont=]

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

%- endnote pages setup %

\definemarking [notePage]

\startsetups   [noteHeadingsText]
  {\em Notes for page
\doifelse{\fetchmark[notePage][top]}{\fetchmark[notePage][bottom]}
    { \getmarking[notePage][top]}
    {s \getmarking[notePage][top]–\getmarking[notePage][bottom]}}
\stopsetups

\starttexdefinition unexpanded startEndnote
  \dosingleempty\doStartEndnote
\stoptexdefinition

\starttexdefinition doStartEndnote [#1]
  \expanded{\dodoStartEndnote[#1][{\rawcountervalue[userpage]}]}
\stoptexdefinition

\starttexdefinition dodoStartEndnote [#1][#2]
  \startendnote[#1]
    \marking[notePage]{#2}\removeunwantedspaces
\stoptexdefinition

\starttexdefinition endnoteChapter
  \startchapter    [title=Notes]
\setupheadertexts[{\it\getmarking[part]}][\setups{noteHeadingsText}]
[\setups{noteHeadingsText}][{\it\getmarking[part]}]
  \placenotes  [endnote]
  \page
\setupheadertexts[{\it\getmarking[part]}][{\it\getmarking[section]}]
   [{\it\getmarking[chapter]}][part]
  \stopchapter
\stoptexdefinition

%--%

\starttext

\completecontent

\startpart[title=Part 1]
\dorecurse{3}{
  \startchapter[title=Chapter #1]
    If a man wants to read good books, he must make a point of
    avoiding bad ones; for life is short, and time and energy
    limited.
    \startfootnote
  T.\,Baily Saunders’ translation, in his 1891 {\em
  The Art of Literature}, of part of one of Arthur
  Schopenhauer’s essays.
    \stopfootnote
    \startEndnote
  {\language[deo]%
  Um das Gute zu lesen, ist eine Bedingung, dass man das
  Schlechte nicht lese: denn das Leben ist kurz, Zeit und
  Kräfte beschränkt.}
    \stopendnote

    \dorecurse{6}{
  \startsection[title=Section ##1]
    This followed by:

    {\it Repetitio est mater studiorum}. Any book that is at
    all important ought to be at once read through twice;
    partly because, on a second reading, the connection of the
    different portions of the book will be better understood,
    and the beginning comprehended only when the end is known;
    and partly because we are not in the same temper and
    disposition on both readings. On the second perusal we get a
    new view of every passage and a different impression of the
    whole book, which then appears in another light.
  \startEndnote
    {\language[deo]%
    Repetitio est mater studiorum. Jedes irgend wichtige
    Buch soll man sogleich zwei Mal lesen, theils weil man
    die Sachen das zweite Mal in ihrem Zusammenhange besser
    begreift und den Anfang erst recht versteht, wenn man
    das Ende kennt; theils weil man zu jeder Stelle das
    zweite Mal eine andere Stimmung mit bringt, als beim
    ersten, wodurch der Eindruct verschieden ausfällt und
    es ist, wie wenn man einen Gegenstand in anderer
    Beleuchtung sieht.}
  \stopendnote
  \stopsection
    }
  \stopchapter
}
\endnoteChapter

[NTG-context] log: use \thinspace instead of \,

2021-06-28 Thread Rik Kabel

All,

Examining recent log files, I see the message

   suggestion  > use \thinspace instead of \,

When was this instituted?

What does it mean? Has \, been deprecated? For many years it was 
recommended as a short form of \thinspace, and implementing the 
replacement would certainly result in much less readable source.


--
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] Soft-hyphen in Antykwa.

2021-06-27 Thread Rik Kabel


On 6/27/2021 14:14, Rik Kabel wrote:


On 6/27/2021 07:46, Hans Hagen wrote:

On 6/27/2021 12:38 AM, Rik Kabel wrote:

All,

In recent compilations of a document using Antykwa Torunska 
Condensed (in headings in the margin), I now have no hyphen at a 
word break, and see the following in the log:


    fonts   > checking > char ­ (U+000AD) in font
    'AntykwaTorunskaCond-Regular' with id 73: missing

Is there a way to restore the hyphen that once appeared? (ConTeXt  
ver: 2021.06.25 22:49 LMTX).


fixed in next upload


Thank you for the fix.

For the record, I note that this is still a problem in MkIV.

And additionally, for the record, erasing the font cache and 
regenerating got it back for MkIV (via --luatex).


--
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] Soft-hyphen in Antykwa.

2021-06-27 Thread Rik Kabel


On 6/27/2021 07:46, Hans Hagen wrote:

On 6/27/2021 12:38 AM, Rik Kabel wrote:

All,

In recent compilations of a document using Antykwa Torunska Condensed 
(in headings in the margin), I now have no hyphen at a word break, 
and see the following in the log:


    fonts   > checking > char ­ (U+000AD) in font
    'AntykwaTorunskaCond-Regular' with id 73: missing

Is there a way to restore the hyphen that once appeared? (ConTeXt  
ver: 2021.06.25 22:49 LMTX).


fixed in next upload


Thank you for the fix.

For the record, I note that this is still a problem in MkIV.

--
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] Soft-hyphen in Antykwa.

2021-06-26 Thread Rik Kabel



On 6/26/2021 18:38, Rik Kabel wrote:

All,

In recent compilations of a document using Antykwa Torunska Condensed 
(in headings in the margin), I now have no hyphen at a word break, and 
see the following in the log:


fonts   > checking > char ­ (U+000AD) in font
'AntykwaTorunskaCond-Regular' with id 73: missing

Is there a way to restore the hyphen that once appeared? (ConTeXt  ver: 
2021.06.25 22:49 LMTX).




More information, sorry for the lack of detail in the first post.

1. The problem appears to be associated with tagging. Set the state to 
stop, or remove the line, and the hyphen appears.


2. When HeadFont is libertinus, there is no problem.

Sample document:

\definefontfamily  [HeadFont]
   [rm]
   [Antykwa Torunska Cond]
\setuphead [chapter]
   [style=\HeadFont\tfa]
\setuphead [section]
   [alternative=margintext,
before={\blank[big]\blank},
insidesection={\blank[-line]\setupindenting[next]},
style=\HeadFont\tf]
\setupindenting[yes,
small]
\setuptagging  [state=start]
\setupbodyfont [libertinus,12pt]
\starttext
  \startchapter[title=Testing Antykwa Torunska Condensed breaks]
\input klein
\startsection  [title=Abracadabra]
  \input knuth
\stopsection
  \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
___


[NTG-context] Soft-hyphen in Antykwa.

2021-06-26 Thread Rik Kabel

All,

In recent compilations of a document using Antykwa Torunska Condensed 
(in headings in the margin), I now have no hyphen at a word break, and 
see the following in the log:


   fonts   > checking > char ­ (U+000AD) in font
   'AntykwaTorunskaCond-Regular' with id 73: missing

Is there a way to restore the hyphen that once appeared? (ConTeXt  ver: 
2021.06.25 22:49 LMTX).


--
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] Protrusion in notes, was Re: setupquotation[method=font] problem

2021-06-24 Thread Rik Kabel


On 6/24/2021 18:50, Rik Kabel wrote:
Thank you Wolfgang for the quick diagnosis and Hans for the fast 
turnaround.


Sorry, I was wrong about the turnaround -- I tested on my own patched 
copy, not the new download, but I am sure it will appear soon.


Follow-up question. Can protrusion be implemented in the first line of a 
footnote or endnote, as might improve the following? I have some 
page-long endnotes that benefit from having it in place, but do not like 
the inconsistent appearance.


Please excuse the hokey example:

   \setuplayout   [width=9cm,
    height=9cm]
   \definefontfeature [default]
   [default]
   [protrusion=quality]
   \setupalign    [hanging]
   \setupquotation    [method=font]
   \setupnote [endnote]
   [location=none]
   \setupnotation [footnote]
   [align=hanging]
   \showframe
   \starttext

   \quotation{{\em Cantharides}} is the reported message from Sir Francis
   Drake upon defeating the Spanish Armada.\endnote{\quotation{{\em
   Vovi}} is
   reportedly the message from James Broun|-|Ramsay on taking Oudh. Both
   are as likely as the attribution of \quotation{{\em peccavi}} to
   Napier after
   his defeat of the Ameer of Scinde.}\footnote{\quotation{{\em Vovi}} is
   reportedly the message from James Broun|-|Ramsay on taking Oudh. Both
   are as likely as the attribution of \quotation{{\em peccavi}} to
   Napier after
   his defeat of the Ameer of Scinde.}

   \placenotes[endnote]

   \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] setupquotation[method=font] problem

2021-06-24 Thread Rik Kabel

Thank you Wolfgang for the quick diagnosis and Hans for the fast turnaround.

--
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] setupquotation[method=font] problem

2021-06-24 Thread Rik Kabel
I get no quotation marks at all (and no protrusion) with 
\quotation{text} using \setupquotation[method=font]. This seems to have 
started earlier this month, but for the record, I am using ConTeXt  ver: 
2021.06.24 19:19 LMTX.


Wolfgang's example from a related thread earlier this month 
(https://www.mail-archive.com/ntg-context@ntg.nl/msg98669.html) should 
have quotation marks and protrusion for the third line, matching the 
second line.


   \definefontfeature
  [default]
  [default]
  [protrusion=quality,expansion=quality]

   \setupquotation
  [method=font]

   \setupalign[hz,hanging]

   \starttext

   oh hi there

   “you are so”

   \quotation{you are so}

   here here

   \stoptext

Similarly with \setupquote. Help, please!

--
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] injectors not working in LMTX?

2021-06-24 Thread Rik Kabel

In March, Pablo wrote:

   the following sample (from
   https://pragma-ade.com/general/manuals/workflows-mkiv.pdf#search=resort)
   doesn’t get right output with LMTX (current latest from 2021.03.25 14:04):

  \showinjector
  \setinjector[register][3][\column]
  \setinjector[list][2][{\blank[3*big]}]
  \starttext
\placelist[section][criterium=text]
\blank[3*big]
\placeregister[index][criterium=text]
\page
\startsection[title=Alpha] first \index{first}
\startsection[title=Beta] second \index{second}
\startsection[title=Gamma] third \index{third}
\startsection[title=Delta] fourth \index{fourth}
  \stoptext

   MkIV compiles this source fine, so I think this might be a bug.

   Many thanks for your help,

   Pablo

In trying to tune a toc, I discovered that this is still an 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] LMTX, BIdi, full paragraph, and spurious empty line

2021-06-24 Thread Rik Kabel


On 6/23/2021 19:44, Rik Kabel wrote:



On 6/23/2021 18:10, Hans Hagen wrote:

On 6/22/2021 4:52 AM, Rik Kabel wrote:

[...]ome an alternative way to do that.)
I'll send you a possible fix but it needs a bit of testing. It has to 
do with (probably spurious) spaces which means that the parbuilder 
then considers the dir node to be a reasoable breakpoint (well, kin 
dof okay as one gets what one asks for), but I'll be a bit more 
agressive in dealing with that.


Hans


Thank you, Hans, for looking into this so soon.

[...]



Hans and all,

I mistakenly put the new code in the wrong instance. When I put it in 
the right place and remade ConTeXt, all is well as far as my test 
examples go and the spurious lines are gone.


Thank you for the fix.

--
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, BIdi, full paragraph, and spurious empty line

2021-06-23 Thread Rik Kabel


On 6/23/2021 18:10, Hans Hagen wrote:

On 6/22/2021 4:52 AM, Rik Kabel wrote:

[...]ome an alternative way to do that.)
I'll send you a possible fix but it needs a bit of testing. It has to 
do with (probably spurious) spaces which means that the parbuilder 
then considers the dir node to be a reasoable breakpoint (well, kin 
dof okay as one gets what one asks for), but I'll be a bit more 
agressive in dealing with that.


Hans


Thank you, Hans, for looking into this so soon.

I did try what you sent, but see no difference. I have eliminated the 
changes to spaceskip as a cause and simplified the example, removing the 
spaceskip and delimitedtext.


New example, in which I get a spurious line after the third and fourth 
Walt Kelly entries:


   %% Demonstration of spurious line insertion on full paragraph with bidi

   \setupdirections [bidi=on,method=unicode]

   \enabletrackers  [typesetters.directions]
   %\showmakeup  [glue,dir]

   \definepapersize [Testing]
 [width=6.69in]
   \setuppapersize  [Testing]

   \setuplayout [width=fit,
  backspace=1.4in,
  cutspace=1in,
  leftmargin=0.65in,
  rightmargin=0.65in]

   \setupwhitespace [small]


   \setupbodyfont   [libertinus,11pt]

   \startbuffer[Test]
    Kelly, Cynthia C., ed. 2005. {\em Oppenheimer and the Manhattan
    Project: Insights into J.~Robert Oppenheimer, ‘Father of the
    Atomic Bomb’}. Singapore: World Scientific.

    Kelly, Walt. 1953. {\em The Pogo Papers}. New York, NY Simon
    & Schuster.

    Kelly, Walt. 1953. {\em The Pogo Papers}. New York NY Simon
    & Schuster.

    Kelly, Walt. 1953. {\em The Pogo Papers}. New York, NY: Simon
    & Schuster.

    Kelly, Walt. 1953. {\em The Pogo Papers}. New York,, NY: Simon
    & Schuster.

    Kelly, Walt. 1953. {\em The Pogo Papers}. New York; NY Simon
    & Schuster.

    Kuhn, Thomas S. 1962. {\em The Structure of Scientific
    Revolutions}. Chicago, IL: University of Chicago Press.

    Weinreich, Max. 1945. “Der YIVO un di problemen fun undzer
    tsayt (דער ייִוואָ און די פּראָבלעמען פֿון אונדזער צײַט).”
    {\em YIVO Bleter} 25 (1): 3--18. The title is translated as
    {\em The YIVO and the problems of our time}, and also as
    {\em The YIVO faces the post-war world}.

   \stopbuffer

   \starttext

  \getbuffer[Test]

   \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] LMTX, BIdi, full paragraph, and spurious empty line

2021-06-21 Thread Rik Kabel

Hello all,

Last October Denis Maier complained about a spurious empty line 
generated with protrusion and bidi active and a full paragraph. (See 
https://www.mail-archive.com/ntg-context@ntg.nl/msg95916.html 
 or 
similar on your favorite mail archive.)


I have recreated the issue without involving protrusion. When a 
paragraph is very full and bidi is on, an extra line seems to be 
generated. Without bidi there is no extra line. This is quite sensitive, 
of course, to line width. I have probably 30 instances of it occurring 
in a tightly-set bibliography. I would assume that it may occur in any 
text, but have not noticed it in the body of my book.


I have created an example document that shows it. The problem disappears 
if bidi is turned off (comment out the first non-comment line) but of 
course then the RTL text is mis-set. In this example, the spurious line 
appears after the Walt Kelly entry.


This was tested under ConTeXt  ver: 2021.06.18 23:37 LMTX  fmt: 
2021.6.21, but is not a new problem with this version. /The problem does 
not occur with MKIV from the same installation./


   %% Demonstration of spurious line insertion on full paragraph with
   bidi active

   \setupdirections  [bidi=on,method=unicode]

   \definepapersize  [Testing]
  [width=6.69in]
   \setuppapersize   [Testing]

   \setuplayout  [width=fit,
   backspace=1.4in,
   cutspace=1in,
   leftmargin=0.65in,
   rightmargin=0.65in]

   \setupwhitespace  [small]

   \setupbodyfont    [libertinus,11pt]

   \define\SetupBib{
  \spaceskip 0.7\interwordspace plus .5\interwordstretch minus
   \interwordshrink
  \definedelimitedtext
    [Exdent]
    [leftmargin=1em,
 indenting={yes,-1em},
 indentnext=yes]}

   \starttext
  \input jojomayer

  \input klein

  \blank[2*line]

  \SetupBib
  \startExdent

    Kelly, Cynthia C., ed. 2005. {\em Oppenheimer and the Manhattan
    Project: Insights into J.~Robert Oppenheimer, ‘Father of the
    Atomic Bomb’}. Singapore: World Scientific.

    Kelly, Walt. 1953. {\em The Pogo Papers}. New York, NY: Simon
    & Schuster.

    Kuhn, Thomas S. 1962. {\em The Structure of Scientific
    Revolutions}. Chicago, IL: University of Chicago Press.

    Weinreich, Max. 1945. “Der YIVO un di problemen fun undzer
    tsayt (דער ייִוואָ און די פּראָבלעמען פֿון אונדזער צײַט).”
    {\em YIVO Bleter} 25 (1): 3--18. The title is translated as
    {\em The YIVO and the problems of our time}, and also as
    {\em The YIVO faces the post-war world}.

  \stopExdent
   \stoptext

Of course, there could be some other mechanism at work here than bidi, 
but changing that clears the problem in this instance. (It may be the 
adjustment to spaceskip that I use to tighten up the text in the 
bibliography, and if it is, I welcome an alternative way to do that.)


--
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 problem with doifmode in \setuplayout

2021-06-08 Thread Rik Kabel


On 6/8/2021 16:11, Wolfgang Schuster wrote:

Rik Kabel schrieb am 08.06.2021 um 18:14:


Hello all,

Odd issue with LMTX (works fine with --luatex). \doifelsemode causes 
a failure if it is used to set a simple value such as on, off, yes, 
no, ..., but works with a dimension. Perhaps better illustrated by an 
example:


\definemode    [aaa]
   [keep]
\setuplayout   [
    marking=\doifmodeelse{aaa}{off}{on},
%   marking=on,
    grid=\doifmodeelse{aaa}{yes}{no},
%   grid=yes,
    bottom=\doifmodeelse{aaa}{10mm}{20mm},
   ]
\starttext
   This is only a test.
\stoptext

The problem occurs whether or not the mode is enabled. In the 
example, it fails with the mode test in the either the marking= or 
grid= keys, but has no problem with it in the bottom= key.


The error message says:

The control sequence marked  should not appear
between \csname and \endcsname.

pointing to the enabled \doifmodeelse line.

The same issue occurs with the following, using \doifmode:

\definemode    [aaa]
   [keep]
\setuplayout   [
    marking=on,
    marking=\doifmode{aaa}{off},
   ]
\starttext
   This is only a test.
\stoptext

This did work without complaint a few months ago.



You can never be sure if these combinations (\doifXXX within 
\setupXXX) work without problems. The only reliable method in this 
case is:


% default setup

\setuplayout
    [marking=on]

% mode dependent setup

\startmode[aaa]

    \setuplayout
        [marking=off]

\stopmode


Wolfgang

Yes, that works. Of course, to say that you can never be sure if such 
combinations will work is not a welcome statement about the state of 
ConTeXt.


More recent LMTX releases also now break older documents that worked 
(with LMTX and MkIV) before. If there is an error in what was previously 
written that is only noticed because of tighter enforcement, that is one 
thing, but an undocumented change to supported behaviour is less to be 
desired. And that it works with dimensions but not on/off/yes/no is very 
strange and suggests some other problem may be lurking.


--
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 problem with doifmode in \setuplayout

2021-06-08 Thread Rik Kabel

Hello all,

Odd issue with LMTX (works fine with --luatex). \doifelsemode causes a 
failure if it is used to set a simple value such as on, off, yes, no, 
..., but works with a dimension. Perhaps better illustrated by an example:


   \definemode    [aaa]
   [keep]
   \setuplayout   [
    marking=\doifmodeelse{aaa}{off}{on},
   %   marking=on,
    grid=\doifmodeelse{aaa}{yes}{no},
   %   grid=yes,
    bottom=\doifmodeelse{aaa}{10mm}{20mm},
   ]
   \starttext
   This is only a test.
   \stoptext

The problem occurs whether or not the mode is enabled. In the example, 
it fails with the mode test in the either the marking= or grid= keys, 
but has no problem with it in the bottom= key.


The error message says:

   The control sequence marked  should not appear
   between \csname and \endcsname.

pointing to the enabled \doifmodeelse line.

The same issue occurs with the following, using \doifmode:

   \definemode    [aaa]
   [keep]
   \setuplayout   [
    marking=on,
    marking=\doifmode{aaa}{off},
   ]
   \starttext
   This is only a test.
   \stoptext

This did work without complaint a few months ago.

--
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] Hyphenation again

2021-06-06 Thread Rik Kabel


On 6/6/2021 12:11, Steffen Wolfrum wrote:

Hi,

yet another strange thing: «ap-plic-»

See code below, Steffen


\mainlanguage[en]

\startexceptions[en]
appli-ca​ble
obli-gated
\stopexceptions

\startexceptions[de]
appli-ca​ble
obli-gated
\stopexceptions

\startexceptions[it]
appli-ca​ble
obli-gated
\stopexceptions

\setuplayout[width=1cm]


\starttext

\currentmainlanguage

\currentlanguage

\hyphenatedword{applicable}

applicable

\hyphenatedword{obligated}

obligated

\blank

\language[de]

\currentmainlanguage

\currentlanguage

\hyphenatedword{applicable}

applicable

\hyphenatedword{obligated}

obligated

\blank


\mainlanguage[de]

\currentmainlanguage

\currentlanguage

\hyphenatedword{applicable}

applicable

\hyphenatedword{obligated}

obligated


\stoptext





Am 09.10.2020 um 16:38 schrieb Denis Maier :

Hi,
another weird thing:
In this example I use  \startexceptions to set hyphenation exceptions:

```
\mainlanguage[en]
\startexceptions[en]
appli-ca​ble
obli-gated
\stopexceptions

\setuplayout[width=1cm]

\starttext
\currentmainlanguage

\currentlanguage

\hyphenatedword{applicable}

applicable

\hyphenatedword{obligated}

obligated
\stoptext
```

What am I missing?

Best,
Denis


When I edit this example with Vim, I see, in part:

   \startexceptions[en]
   appli-ca<200b>ble
   obli-gated
   \stopexceptions

   \startexceptions[de]
   appli-ca<200b>ble
   obli-gated
   \stopexceptions

   \startexceptions[it]
   appli-ca<200b>ble
   obli-gated
   \stopexceptions

So it seems that the answer remains the same from when Denis posted a 
similar question a few months ago.


--
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] BibTeX inproceedings entries not rendered correctly in APA style

2021-05-28 Thread Rik Kabel


On 5/28/2021 16:33, Alan Braslau wrote:

On Fri, 28 May 2021 19:52:19 - (UTC)
Nicola  wrote:


If there is no publisher, then @unpublished is a better category.
APA explicitly, and for good reason, accounts for self-publishing,
indicating that the Author was the publisher.

Ah ok, that explains the output I was obtaining. So, I am using the
wrong bibliographic style for my purposes. In practice, at least in
Computer Science, publishers (and also editors) are often omitted in
references (it's more a "don't care", rather than a "don't know"
thing, though).


If a publisher does not exist, was it published?

If the publisher is unknown, then why not state that:
publisher="unknown publisher", or whatever?

Strictly speaking, your reasoning makes perfect sense, and I am all
for enforcing constraints if a given bibliographic style requires
them. But then, there might be alternatives for when one does not
need to adhere to those styles. Does ConTeXt (LMTX) currently provide
anything else besides apa and aps?

I have read the BibTeX manual looong time ago, but I remember that
there were mandatory and optional fields for each reference type. My
memory may fail me, but I think that Editor and Publisher were not
mandatory fields for inproceedings and article (I think Publisher is
mandatory for book). Is there a bibliographic style in ConTeXt that
follows those rules?

Bibliography management is very sophisticated in ConTeXt (much more
than LaTeX) and I have not grasped all of its details yet. It seems
to me that it has also evolved quite a bit in recent years. So, the
"ConTeXt way" of doing bibliographies still eludes me to some extent.

In writing the ConTeXt bibliography system, we tried to base this on
references, indeed following the original bibtex manual for its
definitions. The APA style follows the APA style guide as best as
possible.

The APS style is intended as a simple example of a numbered
bibliography minimalist style.

Multiple other styles exist out there, more or less well defined. The
problem is that most of them are not very rigorous, and they are
greatly abused. Many publishers follow their own (quirky) bibliography
styles.

The Context system started out as sort of a database handling
subsystem, useful in publishing. It is entirely tune-able, through
setups and parameters. However, the system is complex, so the
customization is not quite as easy as originally intended. Note that
the original bibtex system was conceived in order to have this
configurability, however few were those who mastered writing
bibliography styles, and even carefully crafted styles, for example as
implemented by the APS RevTeX, were buggy and had a number of known,
serious limitations requiring manual intervention.

We could, and have had the intention of, writing other bibliography
styles. But there must be a motivation as well as a clearly defined
specification, for otherwise we will be heading down a rabbit hole of
differing expectations and endless tweaking.

As to "don't care" concerning publishers, this is not very academic.
Indeed, many famous books have been published by various publishers, in
particular for different markets. It is important to say, for each one
might be slightly different, have different pagination for example, and
even certain edits of the text. One might also not pay attention to the
edition, but this too can lead to major differences (even, and
especially in computer science).


Thomas Schmitz, one of the originators of the bibliography project,
will tell you to take the APA style as a model, and then modify it as
you wish to your own needs. I further took this to heart, trying to
write the macros as somewhat standard definitions that one could modify
as needed without breaking the entire system.

And then there are clearly bugs that can be fixed. In the case of a
missing publisher, it is not simply left blank because the APA style
explicitly tells us to put "Author" when there is no defined publisher,
so this is a feature, not a bug.

Alan


The APA does not attempt to define bibliographies. It defines reference 
lists (and more specifically, reference lists for APA journal articles), 
and there is a difference. The reference list, as defined in the APA 
guide, simply exists to point the reader to the cited document (whatever 
'document' might mean). Bibliographies, as the APA guide acknowledges, 
can be much richer, although they do not say it that way.


Looking at the 6th edition of the APA guide (I have not reviewed the 7th 
edition guide, but as far as I know ConTeXt used the 6th edition), I 
note that example 36, a symposium contribution, does not have a 
publisher name. However, it does appear that ConTeXt would require a 
publisher for this and the following examples which have a DOI but no 
publisher. This may be an error, but whether on the part of the APA or 
ConTeXt or both I cannot say.


For books, the APA guide does not require a publisher if a URL is 
provided, and 

[NTG-context] Unnecessary loading of lm-mono

2021-05-26 Thread Rik Kabel
For a few revisions now, I have seen the following as the very first 
line of log files. It is not coming from my document. Is anybody else 
seeing it?


   fonts   > beware: no fonts are loaded yet, using 'lm mono'
   in box

Here is an example document that generates it:

   \setupbodyfont[libertinus,10pt]
   \starttext
   Hello world!
   \stoptext

It seems harmless, but it does result in loading an un-needed font.

   mkiv lua stats  > loaded fonts: 4 files: lmmono10-regular.otf,
   libertinusmath-bold.otf, libertinusmath-regular.otf,
   libertinusserif-regular.otf

--
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] BibTeX inproceedings entries not rendered correctly in APA style

2021-05-24 Thread Rik Kabel


On 5/24/2021 22:12, Alan Braslau wrote:

On Mon, 24 May 2021 17:53:49 -0400
Rik Kabel  wrote:


This is intended. Or rather, it is a side-effect of the intended
behavior.

If you add an editor ("editor={Baz, Bar}") you will get something
like:

 Foo, B. (1983). Title of the paper. In B. Baz (Ed.), /Booktitle/.
 Author.

And if you then add a publisher ("publisher={Paymefirst}") you will
get:

 Foo, B. (1983). Title of the paper. In B. Bar (Ed.), Booktitle.
 Paymefirst.

The APA presumes that you have both an editor and a publisher for
pieces contained in other works. It calls for the use of the author
as publisher if no publisher is present. It is silent about what to
do if you have no editor.

It looks like a missing editor field should be caught. What should the
rule be?

Actually, @inproceedings should not be used without an editor - makes
no sense. If the author of the paper happens to be the editor, then the
.bib data file should define this with an editor= field.

We can change the behavior if a clear case can be made as to what
fallback would make sense. Keep in mind the dictum: "garbage in/garbage
out"...

Alan


For the case of works within works (inproceedings, inbook, incollection, 
perhaps conference) I would think that the simplest solution is to 
simply drop it, so that in the example above one would simply get:


   Foo, B. (1983). Title of the paper. In /Booktitle/. Paymefirst.

Although I do think that, at least for inproceedings, lack of an editor 
should at least be flagged. A simple compilation of works may have no 
named editor, of I see no reason to require it for inbook or 
incollection. Cheap publishers regularly put out such collections of 
out-of-copyright works.


The implicit assumption that a work with no documented publisher is a 
self-published work is not especially to my liking -- publishers may 
have good reason to not identify themselves (think of the publishers of 
the works of Spinoza and, in part, Voltaire) -- but I understand that 
the APA thinks it important. Of course, if you cannot document the 
publisher for an entry, you can explicitly list it as unknown or /sine 
nomine/, as appropriate, to avoid the infelicity of having the author's 
name just stuck in there.


--
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] BibTeX inproceedings entries not rendered correctly in APA style

2021-05-24 Thread Rik Kabel


On 5/24/2021 16:28, Nicola wrote:

I don't know if this is restricted to inproceedings entries, but
consider the following test.bib:

 @inproceedings{Foo:1983,
   author = {Foo, Bar},
   booktitle = {Booktitle},
   pages = {34--39},
   title = {Title of the paper},
   year = {1983}
 }

When this is typeset:

 \usebtxdataset[test.bib]
 \usebtxdefinitions[apa]
 \starttext
   \cite[Foo:1983]
   \placelistofpublications
 \stoptext

the result is:

(Foo, 1983)
Foo, B. (1983). Title of the paper. In Title of the paper., Booktitle. Author.

I would expect:

(Foo, 1983)
Foo, B. (1983). Title of the paper. In Booktitle, p. 34–39.

or something similar.

I can reproduce it with ConTeXt from TeX Live 2021 and the current LMTX.
Is it a bug?

Nicola


This is intended. Or rather, it is a side-effect of the intended behavior.

If you add an editor ("editor={Baz, Bar}") you will get something like:

   Foo, B. (1983). Title of the paper. In B. Baz (Ed.), /Booktitle/.
   Author.

And if you then add a publisher ("publisher={Paymefirst}") you will get:

   Foo, B. (1983). Title of the paper. In B. Bar (Ed.), Booktitle.
   Paymefirst.

The APA presumes that you have both an editor and a publisher for pieces 
contained in other works. It calls for the use of the author as 
publisher if no publisher is present. It is silent about what to do if 
you have no editor.


The editor and publisher fields are described as required in 
mkiv-publications.pdf (page 85), however, you should be able to define 
your own customized btx handling (see chapter 6) to override this, 
removing both the editor and the publisher as requirements. Just a 
little coding.


(I have previously suggested that repeating the title in the case of a 
missing editor should not be done. The behavior has not been changed in 
last the two years.)


You should take careful note of the following from page 29 of that manual:

   /A note on the APA style: /We get the strong impression that the APA
   bibliography style standard was made with the implicit assumption
   that manual intervention would be involved in the editing and
   production process; It has been an arduous task to create a system
   capable of fully conforming to these specifications.

I will add that there is still quite a bit of work to do for APA and 
pretty much any other published style. Manual tuning (or editorial 
leniency) is required to conform in all but the most basic cases.


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] One chapter with different heading settings

2021-05-23 Thread Rik Kabel

On 5/23/2021 07:43, Jeroen wrote:
In the preamble I have the following setup for the chapter header 
setup. There is one chapter I want to have a different heading setup 
with some less spacing, what would be the easiest way to achieve this?


\setuphead
[section]
[style=bold,
before={\vskip4mm},
after={\vskip1.5mm}]

What I do for a chapter that has different requirements is to define a 
new heading based on my normal chapter. Be sure to include it in the 
contents list as well if you show a table of contents, and similarly 
include it in the pdf bookmarks.


There may be other, perhaps better ways to do it, but this works well.

   %% RVchapter can start on recto or verso, chapter on recto only

   \definehead [RVchapter][chapter]
   \setuphead  [RVchapter][
    page=yes,
    before=
   ]
   \setuphead  [chapter]  [
    style=\tfc\HeadFont,
    page={yes,right},
    ...,
       ]
   \setuphead  [section]  [
        style=\tfb\HeadFont,
    ...,
       ]
   \setupcombinedlist [content]
                       [list={chapter,RVchapter}]
   \placebookmarks [chapter,RVchapter,section,subsection,subsubsection]
           [chapter]
           [force=yes,number=no]

--
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] definelabel and TEXpage

2021-05-21 Thread Rik Kabel


On 5/21/2021 00:16, Wolfgang Schuster wrote:

Rik Kabel schrieb am 21.05.2021 um 04:31:

In the following example:

    \definelabel[BB][alternative=inright,headcolor=red,text=]
    \startTEXpage
    Where is the label?\BB
    \stopTEXpage

The label is not displayed if a TEXpage is used, but if the 
start/stop is changed to starttext/stoptext, all is well.


Is this expected?


Yes this is normal because a TEXPage has no margin areas.

\showframe

\starttext

\blackrule[width=\hsize,height=\vsize,color=green]

\startTEXpage[width=\paperwidth,height=\paperheight]
\blackrule[width=\hsize,height=\vsize,color=orange]
\stopTEXpage

\stoptext

Wolfgang



Indeed, and I would have seen this if I had not used the inright 
alternative.


Sorry for the noise.

--
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] Color problem

2021-05-21 Thread Rik Kabel

On 5/21/2021 00:26, Wolfgang Schuster wrote:

Aditya Mahajan schrieb am 21.05.2021 um 04:47:

On Thu, 20 May 2021, Rik Kabel wrote:


Consider the following example:

    \define \HighlightColor {red}

Why not just use:

\definecolor[HighlightColor][red]

and then use color=HighlightColor, etc.


This is the better way to create unique color names but the problem
in the example was the use of \define instead of \defineexpandable.

\defineexpandable\HighlightColor{red}

Wolfgang


Wolfgang and Aditya,

Thank you both for the lesson.

Is the difference between MkIV (--luatex) and LMTX due to stricter 
application of expandability in LMTX?


--
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] Color problem

2021-05-20 Thread Rik Kabel

Consider the following example:

   \define \HighlightColor {red}
   \definehighlight[RED][color=\HighlightColor]
   \definelabel[AA][alternative=inright,headcolor=\HighlightColor,text=]
   \definelabel[BB][alternative=inright,headcolor=red,text=]
   \noheaderandfooterlines
   \starttext
   \hsize3cm
   Is the label red?\AA

   Is the label red?\BB

   \RED{Is this line red?}
   \stoptext

When run with --luatex, I get the colors I expect, as:

When run as lmtx, I get this:

All test were run with ConTeXt  ver: 2021.05.20 11:08 MKIV  fmt: 2021.5.20.

This worked very well for a long time, then became a problem a while 
ago, then it resolved, and once more it is a 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] definelabel and TEXpage

2021-05-20 Thread Rik Kabel

In the following example:

   \definelabel[BB][alternative=inright,headcolor=red,text=]
   \startTEXpage
   Where is the label?\BB
   \stopTEXpage

The label is not displayed if a TEXpage is used, but if the start/stop 
is changed to starttext/stoptext, all is well.


Is this expected?

--
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] Change to wordright behavior?

2021-04-21 Thread Rik Kabel

On 4/18/2021 22:12, Rik Kabel wrote:


Dear all,

At some time in the last couple of years the behavior of \wordright 
seems to have changed, at least in the following situation. With the 
following example:


\starttext
\hsize3cm
  Aaa\wordright{Aaa}\par
  \sc{Bbb\wordright{Bbb}}\par
  {\sc Ccc\wordright{Ccc}}\par
  \sc{Ddd}\wordright{\sc{Ddd}}\par
\stoptext

Produces:

The second and third lines with \wordright (Bbb and Ccc) each generate 
two lines. They previously produced one line each. Placing each part 
of the line in its own \sc addresses it here (Ddd), but it does seem 
that it should not be necessary to do that. Was this an intentional 
change?


--
Rik


This has been fixed in the 20210421 release. Thank you.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] Change to wordright behavior?

2021-04-18 Thread Rik Kabel

Dear all,

At some time in the last couple of years the behavior of \wordright 
seems to have changed, at least in the following situation. With the 
following example:


   \starttext
   \hsize3cm
  Aaa\wordright{Aaa}\par
  \sc{Bbb\wordright{Bbb}}\par
  {\sc Ccc\wordright{Ccc}}\par
  \sc{Ddd}\wordright{\sc{Ddd}}\par
   \stoptext

Produces:

The second and third lines with \wordright (Bbb and Ccc) each generate 
two lines. They previously produced one line each. Placing each part of 
the line in its own \sc addresses it here (Ddd), but it does seem that 
it should not be necessary to do that. Was this an intentional change?


--
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] Using \overloaded

2021-01-24 Thread Rik Kabel

On 1/24/2021 04:33, Wolfgang Schuster wrote:

Rik Kabel schrieb am 24.01.2021 um 05:13:

Hans and all,

Preparing my standard environments for future strict enforcement of 
overloading prevention, I have run into one issue.


I had been using the following construction to change the formatting 
of URLs:


    \let\OrigHyphenatedurl\hyphenatedurl
    \starttexdefinition hyphenatedurl #URL
   \begingroup
     \URLfont\OrigHyphenatedurl{#URL}
   \endgroup
    \stoptexdefinition



You can use a hook to change the font for \hyphenatedurl.

\starttext

\hyphenatedurl{https://wiki.contextgarden.net/Main_Page}

\appendtoks
  \it
\to \everyhyphenatedurl

\hyphenatedurl{https://wiki.contextgarden.net/Main_Page}

\stoptext



This results in the following warning about overloading \hyphenatedurl:

    csname overload > warning, protection level 3, control sequence
    'hyphenatedurl', properties 'permanent protected', file
    'env_layout.mkvi', line 1

I have tried adding \overloaded to indicate the intentional 
overloading, but \overloaded cannot be used with \starttexdefinition, 
so I rewrote it as:


    \let\OrigHyphenatedurl\hyphenatedurl
    \overloaded\define[1]\hyphenatedurl{%
   \begingroup%
     \URLfont\OrigHyphenatedurl{#1}%
   \endgroup}%

but that (and also with \overloaded\def\hyphenatedurl#1...) gives the 
same (except for the line number) warning:


    csname overload > warning, protection level 3, control sequence
    'hyphenatedurl', properties 'permanent protected', file
    'env_layout.mkvi', line 822

So, what is the proper way to indicate intentional overloading? Or 
should this redefinition be done in another way?



The best solution is *to not* overload commands because there are either
alternative ways to achieve the desired result or other commands which
can be used.


\overloadmode=4

\starttext

\permanent\def\mycommand#1{[#1]}

\mycommand{Old definition}

\pushoverloadmode

\aliased\let\originalmycommand\mycommand

\permanent\def\mycommand#1%
  {{\it\originalmycommand{#1}}}

\popoverloadmode

\mycommand{New definition}

\stoptext


Wolfgang


Thank you, Wolfgang (and Hans),

The hook is perfect for this. I had avoided that construction for a long 
time thinking that it is too low-level, but looking at it again it seems 
to be the right thing here.


I can find no information on \aliased and the push/pop for overloademode 
and such, so will leave documenting that in the wiki to somebody with a 
few more clues.


--
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] Using \overloaded

2021-01-23 Thread Rik Kabel

Hans and all,

Preparing my standard environments for future strict enforcement of 
overloading prevention, I have run into one issue.


I had been using the following construction to change the formatting of 
URLs:


   \let\OrigHyphenatedurl\hyphenatedurl
   \starttexdefinition hyphenatedurl #URL
  \begingroup
    \URLfont\OrigHyphenatedurl{#URL}
  \endgroup
   \stoptexdefinition

This results in the following warning about overloading \hyphenatedurl:

   csname overload > warning, protection level 3, control sequence
   'hyphenatedurl', properties 'permanent protected', file
   'env_layout.mkvi', line 1

I have tried adding \overloaded to indicate the intentional overloading, 
but \overloaded cannot be used with \starttexdefinition, so I rewrote it as:


   \let\OrigHyphenatedurl\hyphenatedurl
   \overloaded\define[1]\hyphenatedurl{%
  \begingroup%
    \URLfont\OrigHyphenatedurl{#1}%
  \endgroup}%

but that (and also with \overloaded\def\hyphenatedurl#1...) gives the 
same (except for the line number) warning:


   csname overload > warning, protection level 3, control sequence
   'hyphenatedurl', properties 'permanent protected', file
   'env_layout.mkvi', line 822

So, what is the proper way to indicate intentional overloading? Or 
should this redefinition be done in another way?


(Also, it is interesting that the line number in the first warning 
message does not point to the actual line.)


--
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] Display reference number as Roman number

2021-01-06 Thread Rik Kabel

On 11/24/2020 22:09, Rik Kabel wrote:


Hello all,

What I thought should be a simple conversion escapes me.

I have a reference (created originally via a label defined by 
\definelabel) that, when referenced as \in[label] or 
\ref[number][label] displays a number, and that is how I normally use 
it. However, I want to display it in one instance as a Roman numeral. 
\Romannumerals{\in[label]} complains that it is not being fed a number.


How can I display the label number in Roman number format in this one 
instance?


--
Rik

Okay, I have something that works. Perhaps not optimally, but it is 
functional.


   \definelabel[Qa]
   \definecounter[SAVE][numberconversion=R]
   \starttext
   This is labeled.\Qa\par
   This is labeled.\Qa[REF]\par
   \setcounter[SAVE][{\rawcountervalue[Qa]}]
   See \in[REF].\par
   See \ref[number][REF].\par
   See \in[REF].\par
   This is labeled.\Qa\par
   See \convertedcounter[SAVE].\par
   \stoptext

If you can improve it, please do. A solution that lets me use the label 
name (Qa here) and convert the associated number would be nice.


--
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] thinrules width

2020-12-14 Thread Rik Kabel

Hello list, and developers in particular,

I note that thinrules (and its setup, setupthinrules, and relatives 
thinrule and hairline) does not have a width setting, and always sets a 
rule (or rules) the full width of the text area (less any text set on 
the same line.


No problem, but I do see (non-authoratative) references in the mailing 
list to such a parameter, and more problematically, I note that the 
default ConTeXt template for Pandoc includes the line:


\setupthinrules[width=15em] % width of horizontal rules

Before reporting an issue to the Pandoc team, I just want to confirm 
that this is, in fact, both the case (as reading the source and my 
testing indicate) and the intent (which I cannot attest).


I would further suggest that Pandoc should be using setupblackrule with 
appropriate height, depth, rulethickness, and width. I suspect that 
Pandoc typography is not sensitive to control of the actual placement 
relative to the baseline, as ConTeXt supports, but a pointer to a clear 
explanation of the interaction of height, depth, and rulethickness would 
be 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
___


[NTG-context] Uploaded LuaMetaTeX version

2020-12-04 Thread Rik Kabel

My update log says:

   2020-12-04T11:32:59  ConTeXt updated from 2020.12.01T17:52 to
   2020.12.03T19:02
   2020-12-04T11:32:59  LuaMetaTeX downdated from 2.08.03 20201123 549
   to 2.05.01 20200402 491

That is quite a change!

On 12/4/2020 07:01, Hans Hagen wrote:

On 12/4/2020 11:19 AM, Henning Hraban Ramm wrote:

Hi,
with latest LMTX, the size (width) of external figures is ignored in 
floats, while it works outside of floats and with MkIV. It also works 
with metapost figures (e.g. dum library).



\setupexternalfigure[location=default]

\starttext

\startplacefigure[location=here]
\externalfigure[cow][width=2cm]
\stopplacefigure

\stoptext

(fixed in next upload)


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

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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 do I get rid of the ct and st ligatures in EBGaramond?

2020-12-02 Thread Rik Kabel


On 12/2/2020 13:34, Hans Hagen wrote:

On 12/2/2020 5:54 PM, Joey McCollum wrote:
If you're using Octavio Pardo's version of EB Garamond 
(https://github.com/octaviopardo/EBGaramond12 
), then these ligatures 
are covered (along with the Th ligature) by the "dlig" (discretionary 
ligatures) feature, so you'll need to disable that. Unfortunately, 
this will also disable the Th ligature. This is a known, open issue 
for the font: https://github.com/octaviopardo/EBGaramond12/issues/20 
.

One of these examples where opensource fails ...

https://github.com/octaviopardo/EBGaramond12
https://github.com/georgd/EB-Garamond

A while ago I replaced AB on my machine in oirdert to test some issue 
so now I have to replace it again? Which one is the real one? Which 
one is the original? Which one are we supposed to support / configure?


\definefontfeature[whatever][default][rlig=yes]
% \definefontfeature[whatever][default][rlig=yes,dlig=yes] % those st 
and ct ligs


\definefontfamily [english] [rm] [EB Garamond] [features=whatever]
\definefontfamily [english] [mm] [Stix Two Math]

\setupbodyfont[english]

\starttext
    fi fl ffi ffl ct st
\stoptext

Using the ones pointed from google fonts.

Hans


Hello all,

I am the one who posted issue #20 for the font back in January 2018. The 
report simply states that there is no way to get dlig without also 
getting hlig, and includes an easily reproducible demonstration (using 
LibreOffice on the assumption that it is more accessible for testing). 
Since then, there has been a PR submitted. Crickets. No action.


As to which version of the font should be used, Georg Duffner 
transferred stewardship of the font to Octavio Pardo in 2017 or so. 
Pardo added support for faces beyond roman and italic (bold, semibold, 
extrabold). Some work was done a couple of years ago to support variable 
fonts, but nothing that can be used has yet come out of that effort. To 
a casual observer, the development and maintenance appears to be 
abandoned. I am sure that many would be happy to see work on this font 
resume, but projects like this are difficult to take over and support is 
thin.


So, if you can find that satisfies your requirements as it is, use it. 
The Duffner versions (pre-Pardo) do not have this particular issue, and 
if you do not need emboldened faces or other updates Pardo may have 
implemented, that should work. Or look elsewhere. Although the range and 
licensing of EB Garamond was certainly attractive, there are plenty of 
Garamonds in the world.


--
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 do I get rid of the ct and st ligatures in EBGaramond?

2020-12-02 Thread Rik Kabel


On 12/2/2020 13:59, T. Kurt Bond wrote:

Interesting.

Here is a an example that sort of works, Variant 1:

\definefontfamily[english] [rm] [ebgaramond] [features={default,
dlig=no}]
\setupbodyfont[english,10pt]
\starttext

Variant 1:
Does this look like EBGaramond?

fi fl ffi ffl ct st
\stoptext


However, it turns of *all* the ligatures.

Here is an example that works as expected, Variant 2:

\definefontfeature[english][dlig=no]
\definefontfamily[ebgaramond] [rm] [EB Garamond]
 [features={default,english}]
\setupbodyfont[ebgaramond,10pt]

\starttext

Variant 2:
Does this look like EBGaramond?

fi fl ffi ffl ct st
\stoptext


It turns off just the ct and st ligatures.

I've attached the generated PDF files for both variants.


No, it turns off other ligatures as well, so is not a generally workable 
solution. (Try *fj* and *ſi*, for two examples.)


--
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] framedtext is (still) broken in LMTX

2020-11-30 Thread Rik Kabel


On 11/30/2020 15:05, Wolfgang Schuster wrote:

Rik Kabel schrieb am 30.11.2020 um 18:15:

On 11/29/2020 17:15, Hans Hagen wrote:

On 11/29/2020 10:33 PM, Rik Kabel wrote:
With ConTeXt  ver: 2020.11.28 13:18 LMTX  fmt: 2020.11.29 the 
*\framedtext* output is consistently *0.8\textwidth*. MkiV gives 
the expected result.


    \starttext
    \framedtext{Fail}\par
    \framedtext[width=fit]{Fail}\par
    \framedtext[width=3cm]{Fail}\par
    \framedtext[width=0.8\textwidth]{Fine by accident}\par
    \framedtext[width=\textwidth]{Fail}\par
    \framed{Fine}\par
    \framed[width=fit]{Fine}\par
    \framed[width=3cm]{Fine}\par
    \framed[width=0.8\textwidth]{Fine}\par
    \framed[width=\textwidth]{Fine}\par
    \stoptext

fixed in next upload (tomorrow)




Sadly, *\framedtext* still appears to have a problem with the default 
width, although with today's update one can now explicitly set the 
width. (Nothing I can find in the docs suggests that *\framedtext* 
has a different default width than *\framed*. Perhaps I missed it.)




There is nothing wrong with framedtext, the command always used a 
fixed width as default setting.


Wolfgang



Wikified.


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] framedtext is (still) broken in LMTX

2020-11-30 Thread Rik Kabel


On 11/29/2020 17:15, Hans Hagen wrote:

On 11/29/2020 10:33 PM, Rik Kabel wrote:
With ConTeXt  ver: 2020.11.28 13:18 LMTX fmt: 2020.11.29 the 
*\framedtext* output is consistently *0.8\textwidth*. MkiV gives the 
expected result.


    \starttext
    \framedtext{Fail}\par
    \framedtext[width=fit]{Fail}\par
    \framedtext[width=3cm]{Fail}\par
    \framedtext[width=0.8\textwidth]{Fine by accident}\par
    \framedtext[width=\textwidth]{Fail}\par
    \framed{Fine}\par
    \framed[width=fit]{Fine}\par
    \framed[width=3cm]{Fine}\par
    \framed[width=0.8\textwidth]{Fine}\par
    \framed[width=\textwidth]{Fine}\par
    \stoptext

fixed in next upload (tomorrow)




Sadly, *\framedtext* still appears to have a problem with the default 
width, although with today's update one can now explicitly set the 
width. (Nothing I can find in the docs suggests that *\framedtext* has a 
different default width than *\framed*. Perhaps I missed it.)


New overwrought example:

   \definelayer  [HRule]
   [x=0mm,y=0pt,width=\textwidth,height=\textheight]
   \setlayer [HRule]
  [hoffset=0pt,voffset=10em]
   {\blackrule[color=green,height=1pt,width=10cm]}
   %setupframedtext  [offset=0pt]
   \definelayer  [VRule]
   [x=0mm,y=0pt,width=\textwidth,height=\textheight]
   \setlayer [VRule]
  [hoffset=0.75\textwidth,voffset=0pt]
  {\blackrule[color=red,height=10em,width=1pt]}
   \setupbackgrounds [text]
  [background={HRule,VRule}]
   \setupframedtext  [offset=0pt]
   \starttext
   \framed{default width for \tex{framed} is {\tt fit}}\par
   \framedtext{default width for \tex{framedtext} is not {\tt fit}. It
   appears to be 0.75\tex{textwidth}}\par
   \framedtext[width=10cm]{explicit width for \tex{framedtext} now
   works}\par
   \framedtext[width=fit]{{\tt fit} width for \tex{framedtext} now
   works}\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] framedtext is (still) broken in LMTX

2020-11-29 Thread Rik Kabel
With ConTeXt  ver: 2020.11.28 13:18 LMTX  fmt: 2020.11.29 the 
*\framedtext* output is consistently *0.8\textwidth*. MkiV gives the 
expected result.


   \starttext
   \framedtext{Fail}\par
   \framedtext[width=fit]{Fail}\par
   \framedtext[width=3cm]{Fail}\par
   \framedtext[width=0.8\textwidth]{Fine by accident}\par
   \framedtext[width=\textwidth]{Fail}\par
   \framed{Fine}\par
   \framed[width=fit]{Fine}\par
   \framed[width=3cm]{Fine}\par
   \framed[width=0.8\textwidth]{Fine}\par
   \framed[width=\textwidth]{Fine}\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] Another LMTX small issue

2020-11-25 Thread Rik Kabel
The following code generates an error message in the log under LMTX 
2020.11.24 19:02 but compilation continues with no apparent issue.


   \starttext
   \framedtext{abc}
   \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] Display reference number as Roman number

2020-11-24 Thread Rik Kabel

Hello all,

What I thought should be a simple conversion escapes me.

I have a reference (created originally via a label defined by 
\definelabel) that, when referenced as *\in[label]* or 
*\ref[number][label]* displays a number, and that is how I normally use 
it. However, I want to display it in one instance as a Roman numeral. 
*\**Romannumerals{\in[label]}* complains that it is not being fed a number.


How can I display the label number in Roman number format in this one 
instance?


--
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] RE : upload

2020-11-23 Thread Rik Kabel

On 11/23/2020 17:02, Hans Hagen wrote:

On 11/23/2020 9:42 PM, Joseph wrote:

After running install.bat I see error :

new attempt

The following works with the mkiv installation and with the lmtx install 
and context --luatex. It fails with an undefined control sequence error 
when run with context lmtx without the --luatex switch.


   \version[draft]
   \starttext
   Hi!
   \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 MkIV difference in expansion

2020-11-21 Thread Rik Kabel


On 11/21/2020 10:05, Wolfgang Schuster wrote:

Rik Kabel schrieb am 20.11.2020 um 00:18:


You are right about not quite understand.


There are cases where you want to pass a command to another command as 
it is without replacing it with its content, e.g. when you store the 
\TeX logo in the table of content the \TeX command should be written 
in the register and not the content of the command.


In the following example the first line prints the definition of the 
\TeX logo but in many cases you ant to preserve the command as in the 
second line.


\starttext

\tex{TeX} = \detokenize\expandafter{\TeX}

\blank

\tex{TeX} = \detokenize{\TeX}

\stoptext


To make it easier to keep the command eTeX added a new command 
\protected which can be used before \def to achieve this (ConTeXt 
provides the same thing under the name \unexpanded).


The following example shows how you can use \protected\def to keep 
always the current meaning of \foo when you print the content of \bar.


\starttext

\def\foo{foo}

\edef\bar{\foo}

\def\foo{bar}

\startlines
bar=\bar
foo=\foo
\stoplines

\blank

\protected\def\foo{foo}

\edef\bar{\foo}

\protected\def\foo{bar}

\startlines
bar=\bar
foo=\foo
\stoplines

\stoptext


A problem in older TeX engines is that \csname ...\endcsname didn't 
respect this protection and replaced the protected command with its 
content, recently Hans changed this behavior in LMTX which lead to the 
error message in your document.



Does this mean that I can have the same definitions in MkIV and LMTX 
(after some future update), or should I hunt down the \defines in 
both, or that I should fork (or mode test) my source environment 
files, one set for LMTX and one for MkIV?



When you use \define to store arguments which are passed as arguments 
to other command you have to change this to \defineexpandable but its 
best to do this in MkIV and LMTX because protected commands are the 
wrong thing in this case. Even though it would work in MkIV in some 
cases you run into problems when you pass argument to Lua.


Wolfgang


Thank you, Wolfgang, for the explanation and examples.

I have in fact already gone through and replaced the impacted 
occurrences of \define with \defineexpandable. LMTX made it easy to 
identify them.


--
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] Problem with setupcharacterspacing and comma

2020-11-21 Thread Rik Kabel

On 11/21/2020 04:46, Hans Hagen wrote:

On 11/21/2020 4:57 AM, Rik Kabel wrote:

Hello all,

Playing with define/setup/set characterspacing, I have come across 
some odd, perhaps buggy, behavior. This applies to both MkIV 
2020.11.19 11:23 and LMTX 2020.11.19 11:28.


The problem is that character spacing is not effected for the left 
side of the comma character. It is handled as expected for other 
characters that I have tested, but I have not performed extensive tests.


Example code:

    \definecharacterspacing[Test]
    \setupcharacterspacing [Test] ["002C] [left
    =.25,right=1,alternative=1] % ,
    \setupcharacterspacing [Test] ["0065]
    [left=0.5,right=1,alternative=1] % e
    \setupcharacterspacing [Test] ["003B]
    [left=0.5,right=1,alternative=1] % e
    \startTEXpage[offset=1em]
    abc; def, g

    \setcharacterspacing[Test]abc; def, g
    \stopTEXpage

remove the space between "left" and "="

I should have know better than to copy as I did from the source code 
without analyzing it sufficiently! In typo-spa.mkiv I found:


   \setupcharacterspacing [frenchpunctuation] ["003A] [\c!left
   =.25,\c!alternative=1] % : ...

I see (now) that the space disappears when the \c!left macro is 
processed. Mea culpa. I owe you a beer.


--
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] Problem with setupcharacterspacing and comma

2020-11-20 Thread Rik Kabel

Hello all,

Playing with define/setup/set characterspacing, I have come across some 
odd, perhaps buggy, behavior. This applies to both MkIV 2020.11.19 11:23 
and LMTX 2020.11.19 11:28.


The problem is that character spacing is not effected for the left side 
of the comma character. It is handled as expected for other characters 
that I have tested, but I have not performed extensive tests.


Example code:

   \definecharacterspacing[Test]
   \setupcharacterspacing [Test] ["002C] [left
   =.25,right=1,alternative=1] % ,
   \setupcharacterspacing [Test] ["0065]
   [left=0.5,right=1,alternative=1] % e
   \setupcharacterspacing [Test] ["003B]
   [left=0.5,right=1,alternative=1] % e
   \startTEXpage[offset=1em]
   abc; def, g

   \setcharacterspacing[Test]abc; def, g
   \stopTEXpage


Output:

--
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 MkIV difference in expansion

2020-11-19 Thread Rik Kabel


On 11/19/2020 17:03, Hans Hagen wrote:

On 11/19/2020 9:41 PM, Wolfgang Schuster wrote:

Rik Kabel schrieb am 19.11.2020 um 21:20:

Another LMTX/MkIV difference, this time with expansion:

    \define\Align{yes}
    \starttext
    \startalignment[\Align]
     This works with MkIV but fails with LMTX, complaining: {\tt
     tex error on line 3 in file G:/expand.mkvi: The file ended
     when scanning an argument.}
    \blank
    It works in both when \tex{def} or \tex{defineexpandable} is
    used instead of \tex{define}.
    \blank
    What changed?
    \stopalignment
    \stoptext

It may well be that I have been abusing some laxity in MkIV and that 
LMTX is a bit stricter in what it accepts, but I would like to know 
if this is an expected difference.


You have to wait for Hans to get an answer but here is a minimal 
example.


\starttext

\protected\def\testparameter{test}
%\def\testparameter{test}

\def\test[#1]%
{\expandafter\let\expandafter\testargumentlist\csname#1\endcsname}

\test[\testparameter]

\stoptext
Often arguments to commands like \startsomething[xx] let the xx end up 
in some \(if)csname expansion. A protected (\unexpanded in context 
speak) macro doesn't expand inside for instance an \edef (or 
comparable expandable situation). Now, from that it makes perfect 
sense to also not let it expand inside a \csname or \ifcsname. One 
reason is that when it does expand, you can get a pretty wild (nested) 
sequence of nested expansions and one can be pretty sure that we then 
don't have a proper csname. This is why in luatex we have a catch for 
running wild csname checking.


The original \ifcsname test was inherited from etex. The \protected 
feature also comes from etex. But \csname is a tex natural.
In pdftex (and luatex) a protected macro inside an \(if)csname does 
expand which to makes no sense and smells like a bug. Or maybe it was 
tricky to catch (the implementation of protected a bit of a hack).


In luametatex protected macros are native and in the process I also 
decided to *not* expand them in a \(if)csname where I expect (as said) 
protected macros to behave like in an edef. I nice side effect is that 
running wild no longer happens (but we still catch it) which can save 
quite some useless backup token list construction (needed because tex 
has to push back stuff in order to be able to report an error).


So, when you still don't understand it (which I can understand) I'm 
sure Wolfgang can explain it better now.


\starttext

  \def\foo{foo}
\protected\def\oof{oof}

\csname foo\endcsname
\csname oof\endcsname
\csname \foo\endcsname

% error in luametatex, ok in pdftex/luatex:

% \csname \oof\endcsname

\ifcsname  foo\endcsname yes\else nop\fi
\ifcsname  oof\endcsname yes\else nop\fi
\ifcsname \foo\endcsname yes\else nop\fi

% nop in luametatex (error intercepted), yes in pdftex/luatex

\ifcsname \oof\endcsname yes\else nop\fi

\stoptext

Now, one can argue that if I consider it a but in the other engines, 
why I don't argue that it should be solved. Well, there is too much 
legacy code already that might use it as feature so it will not 
change. But in luametatex we can 'fix' these things. (We also use the 
csname in a rather predictable way in context so i don't expect issues 
in the core.)


Hans


You are right about not quite understand.

Does this mean that I can have the same definitions in MkIV and LMTX 
(after some future update), or should I hunt down the \defines in both, 
or that I should fork (or mode test) my source environment files, one 
set for LMTX and one for MkIV?


--
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 MkIV difference in expansion

2020-11-19 Thread Rik Kabel

Another LMTX/MkIV difference, this time with expansion:

   \define\Align{yes}
   \starttext
   \startalignment[\Align]
    This works with MkIV but fails with LMTX, complaining: {\tt
    tex error on line 3 in file G:/expand.mkvi: The file ended
    when scanning an argument.}
   \blank
   It works in both when \tex{def} or \tex{defineexpandable} is
   used instead of \tex{define}.
   \blank
   What changed?
   \stopalignment
   \stoptext

It may well be that I have been abusing some laxity in MkIV and that 
LMTX is a bit stricter in what it accepts, but I would like to know if 
this is an expected difference.


--
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 fails with custom tags (MkIV continues to work)

2020-11-18 Thread Rik Kabel
Documents fail with an error when they include \startelement[tagname]. 
This started on or before the 2020.11.17T12:42 LMTX update, and 
continues with 2020.11.18 19:16 LMTX. MkIV continues to work as expected.


Example:

   \setelementbackendtag[myTag]
   \setelementnature[myTag][mixed]

   \starttext

 \startelement[myTag] % <---

  This works with MkIV but fails with LMTX, complaining: {\tt
  tex error on line 17 in file G:/extract.mkvi: The file ended
  when scanning an argument.}

  It works in LMTX when marked lines are removed, but\unknown

 \stopelement  % <---

   \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] reusableMPgraphic not working

2020-11-18 Thread Rik Kabel


On 11/18/2020 08:11, Bruce Horrocks wrote:

Just working through the Metafun manual and have hit a problem. In the 
following MWE the green circle appears but the blue one doesn't. Surely 
reusable graphics must be so commonly used that it has to be me that's doing 
something wrong?

(Context version is: 2020.11.05 23:01)

\starttext
\startuseMPgraphic{name1}
  fill fullcircle scaled 100pt withcolor green ;
\stopuseMPgraphic
Green circle: \useMPgraphic{name1}

\startreusableMPgraphic{name2}
  fill fullcircle scaled 100pt withcolor blue ;
\stopreusableMPgraphic
Blue circle:\reuseMPgraphic{name2}
\stoptext



Works as expected here, producing both circles. I am using 2020.11.17 12:39, 
both LMTX and MkIV.

--
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] Index formatting difference LMTX and MkIV redux

2020-11-17 Thread Rik Kabel

Bump.

This is still a problem. Can anyone acknowledge that the problem exists 
outside my own installation? If so, is there a work-around? An explanation?


On 10/21/2020 21:42, Rik Kabel wrote:


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] fancybreak fails in LMTX

2020-11-07 Thread Rik Kabel

Hello all,

The following example produces the expected output in MkIV, but fails in 
LMTX (both dated 2020-11-07). The modules directory was copied into the 
LMTX tree from the MkIV tree, and the log indicates that the module is 
loaded. It gives no other clues. The output has a blank line where the 
break should be, as shown in the included snips.


   \usemodule  [fancybreak]
   \definesymbol   [asterisms][*\qquad fancybreak\qquad *]
   \setupfancybreak[indentnext=no,symbol=asterisms]

   \starttext
  Before
   \fancybreak
  After
   \stoptext

MkIV output:

LMTX output:

--
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] new upload

2020-11-06 Thread Rik Kabel

On 11/6/2020 16:03, Pablo Rodriguez wrote:

On 11/6/20 8:42 PM, Hans Hagen wrote:

Hi,

Again a new lmtx upload. As these days are all about counting and
numbers ... of the 19K visible macros some 14K are now flagged.

Many thanks for the new release, Hans.

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

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


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

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

Many thanks for your help,

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

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


Same problem on WIndows 10. I have taken to simply doing a fresh install 
to get updates. Minor frustration.


--
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-28 Thread Rik Kabel

On 10/26/2020 08:05, Rik Kabel wrote:

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.




My apologies to Hans and the list. My MkIV installation reverted to the 
2020-01-30 release at some point in late September or early October. I 
have corrected that and now see no differences other than version 
strings in the source directory.


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


  1   2   3   4   5   >