Re: [NTG-context] footnote not appearing

2021-07-28 Thread jbf via ntg-context
You are correct Hans, I was using Mk IV luatex as the engine, though I 
could use lmtx. It's just that in a production environment I need to be 
absolutely sure things work (printers deadlines and that sort of thing!) 
and I know that the MkIV luatex scene always works. But I'll give the 
lmtx a run on this particular text without postponing and see how it 
goes, since I already have a working result from the other.


Julian

On 28/7/21 5:32 pm, Hans Hagen wrote:

On 7/27/2021 11:46 PM, jbf via ntg-context wrote:
No, in fact I discovered that \startpostponingnotes is what is 
needed. localfootnotes does work but places the footnote immediately 
below the framed text, and I wanted it to appear in the usual 
footnote location, which is achieved with startpostponingnotes


I assume that you use(d) mkiv/luatex and not lmtx/luametatex.

Footnotes are in tex speak 'inserts' and at some point they are 
filtered and added to the datastructure (list) that is taken into 
account when breaking a page.


When tex was written, the main application was books like those of Don 
Knuth where inserts like notes occur at the outer level. However, a 
macro package like context has all kind of complex deeply nested 
elements and there these notes just disappear. The main (and valid) 
reason is that it becomes kind of unpredictable what inserts are and 
where they have to go. (This is one reason why as soon as a macro 
package provides more functionality and control it also becomes much 
larger deep down.)


For this footnote-text-getting-lost problem, in mkii a solution became 
local notes and postponing.


In mmkiv it became a bit more clever and there is also an 
automigration features although in some cases that gives other side 
effects so it's not turned on by default.


In lmtx we use some new insert related features in luametatex so 
that's what I'll discuss next. (One can quit reading if not interested.)


Although it is still not trivial to deal with these things (keep in 
mind that users combine all mechanism which means that all mechanisms 
should be able to cooperate) in luametatex the inserts can bubble up 
which means that footnotes eventually will end up at the outer level.


So, if you use lmtx, ideally there is no need to use postponing (you 
can try your exapmle in lmtx without postponing).


For the curious ... the low level mechanisms involved in this can also 
be used for other purposes although currently this is not done. There 
is plenty of relative new functionality that can/will be applied some 
day.


Here is an example:

\setbox0\hbox{\strut this is just a test}

\setprelistbox 0\hbox{\strut \quad before}
\setpostlistbox0\hbox{\strut \quad after}

test \par \box0 \par test

Here \setprelistbox and \setpostlistbox are macros that (ab)use these 
hooks into lists. They will stay but keep in mind that when you use 
them they can interfere with for instance already present inserts.


Take this:

\starttext

\setbox0\hbox{\strut this is just a\footnote{oeps} test}
\setbox2\hbox{\strut this is just a\footnote{oeps} test}

\setprelistbox 0\hbox{\strut \quad before: \prelistbox0}
\setpostlistbox0\hbox{\strut \quad after: \postlistbox0}

\setprelistbox 2\hbox{\strut \quad before}
\setpostlistbox2\hbox{\strut \quad after}

test \par \box0 \par \box2 \par test

\stoptext

If you look carefully you'll see / can deduce what happens with 
inserts in luamatetatex.


Boxes are a major thing in tex, paragraphs are too, so here's another 
(already described elsewhere) trick with hooks,


(\wrapuppar{)}some text and some more text and ...

(\wrapuppar{\removeunwantedspaces)}some text and some more text and ...

test\wrapuppar{\crlf\ignorepars}

test

test\wrapuppar{\ignorepars}

test

test\wrapuppar{\removeunwantedspaces\ignorepars}

test

These are actually features that are already around and (so far) have 
proven to work ok. Especially the last examples are real tricky 
because you don't know if other mechanisms also use these (some 
already do) but all this box and pas stuff might eventually come with 
more high level interfaces (there is already one for the par stuff, 
not yet for the box stuff). But as with other such mechanism, one 
cannot rely on a naive approach and just assume the single case usage, 
only the user knows where it might interfere. On the other hand, low 
level box magick like the above will work ok because it's just that box.


Welcome to the world of (new) low level context trickery, which is and 
eventually will be described in the lowlevel-* manuals (after all I 
need topics for occasional presentations and those need to be new and 
if possible challenging.)


Hans


Julian

On 27/7/21 7:42 pm, Henning Hraban Ramm via ntg-context wrote:
Am 27.07.2021 um 06:07 schrieb jbf via ntg-context 
:


Is there any reason why the following MWE does not produce the 
footnote at the bottom of the page? It seems like the use of 
framedtext is preventing it, but am not sure why. Can I get around 
this probl

Re: [NTG-context] ligature exceptions

2021-07-28 Thread Hans Hagen via ntg-context

On 7/28/2021 7:24 PM, Thomas A. Schmitz via ntg-context wrote:

Hi all,

just two quick questions: a couple of weeks ago, there was a long 
discussion on ligature exceptions in, e.g., German. Hans provided an 
elegant new mechanism (\startlanguageoptions). So my two questions:


1. Is the old mechanism (\replaceword[eg][Auflage][Au{fl}age]) now 
obsolete? I tried using it, but unwanted ligatures still occurred. If it 
is indeed deprecated, I'll add a note to the wiki (this would mean that 
the current texlive version does not have the new mechanism and the 
latest lmtx doesn't use the old one, so that's somewhat problematic).


it's not too hard to make it work, see attached, but the new one is 
nicer because it permits more detailed control


in luametatex you can do things like

Au{\norightligaturing f}lage

that is: each character can have a set of options; ok, one can do that 
with attributes but that is less efficients options have been introduced 
for ligatures, kerns, expansion etc (you can diff the attached lmt file 
with the lua file of the same name to see the difference in approach


2. Both mechanisms only work for complete words, is that right? So I 
can't just provide a pattern such as "uf|forder," I have to provide a 
full list with all inflected forms:


auf|fordern
auf|fordert
auf|fordernd
Auf|forderung
Auf|forderungen

and for 1-3 also the forms with a capital letter.


just lowercase will do

if you look at the example files you can see that there are pre/post 
snippets possibel so basically you can create something


pre [a|b|c] post

which saves some definitions (make we can have pre/post lists which will 
nicely explode into huge lists but memory is not the issue here)


while the replacement works by running over the node list, the second 
mechanism is using a callback at the hyphenation level (so per language) 
where each word is anyway checked against an exception list, so in 
addition that word can now be fed into a function and depending on 
outcome be fed back into the machinery


(there are trackers that give insight in the process)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
if not modules then modules = { } end modules ['lang-rep'] = {
version   = 1.001,
comment   = "companion to lang-rep.mkiv",
author= "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license   = "see context related readme files"
}

-- A BachoTeX 2013 experiment, probably not that useful. Eventually I used a 
simpler
-- more generic example. I'm sure no one ever notices of even needs this code.
--
-- As a follow up on a question by Alan about special treatment of dropped caps 
I wonder
-- if I can make this one more clever (probably in a few more dev steps). For 
instance
-- injecting nodes or replacing nodes. It's a prelude to a kind of lpeg for 
nodes,
-- although (given experiences so far) we don't really need that. After all, 
each problem
-- is somewhat unique.

local type, tonumber, next = type, tonumber, next
local gmatch, gsub = string.gmatch, string.gsub
local utfbyte, utfsplit = utf.byte, utf.split
local P, C, U, Cc, Ct, Cs, lpegmatch = lpeg.P, lpeg.C, 
lpeg.patterns.utf8character, lpeg.Cc, lpeg.Ct, lpeg.Cs, lpeg.match
local find = string.find

local zwnj =  0x200C
local grouped  = P("{") * ( Ct((U/utfbyte-P("}"))^1) + Cc(false) ) * P("}")-- 
grouped
local splitter = Ct((
#P("{") * (
P("{}") / function() return zwnj end
  + Ct(Cc("discretionary") * grouped * grouped * grouped)
  + Ct(Cc("noligature")* grouped)
)
  + U/utfbyte
)^1)

local stripper = P("{") * Cs((1-P(-2))^0) * P("}") * P(-1)

local trace_replacements = false  trackers.register("languages.replacements",   
  function(v) trace_replacements = v end)
local trace_details  = false  
trackers.register("languages.replacements.details", function(v) trace_details   
   = v end)

local report_replacement = logs.reporter("languages","replacements")

local glyph_code = nodes.nodecodes.glyph
local glue_code  = nodes.nodecodes.glue

local spaceskip_code = nodes.gluecodes.spaceskip
local xspaceskip_code= nodes.gluecodes.xspaceskip

local nuts   = nodes.nuts

local getnext= nuts.getnext
local getprev= nuts.getprev
local getattr= nuts.getattr
local getid  = nuts.getid
local getsubtype = nuts.getsubtype
local getchar= nuts.getchar
local isglyph= nuts.isglyph

local setlink= nuts.setlink
local setnext= nuts.setnex

Re: [NTG-context] Different Typing Styles

2021-07-28 Thread Bruce Horrocks via ntg-context


> On 28 Jul 2021, at 13:13, Jeroen via ntg-context  wrote:
> 
> Is there a way to have two different styles of typing. I tried the following, 
> but it does not seem to work.
> 
> \setuptyping[abc][style=\ttx]
> \setuptyping[def][style=\ttxx]
> 
> \starttext
> 
> \starttyping[abc]
> example
> example
> \stoptyping
> 
> \starttyping[def]
> example
> example
> \stoptyping
> 
> \stoptext
> 

Use \definetyping (and \start..\stop) instead so:

\definetyping[abc][style=\ttx]
\definetyping[def][style=\ttxx]

\starttext

\startabc
example
example
\stopabc

\startdef
example
example
\stopdef

\stoptext

Probably best to capitalise Abc & Def as well just in case you choose a name 
that is already in use.

—
Bruce Horrocks
Hampshire, UK

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

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


Re: [NTG-context] A not so short introduction to ConTeXt Mark IV

2021-07-28 Thread Kevin Vigouroux via ntg-context
Here is an example to clarify my previous comment.

#+BEGIN_SRC xml
  

  

  

  reviewed


  translated

  
  

  Bonjour

  


  Hello
  Bonjour

  

  
#+END_SRC 
-- 
Best regards,
Kevin Vigouroux
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] ligature exceptions

2021-07-28 Thread Thomas A. Schmitz via ntg-context

Hi all,

just two quick questions: a couple of weeks ago, there was a long 
discussion on ligature exceptions in, e.g., German. Hans provided an 
elegant new mechanism (\startlanguageoptions). So my two questions:


1. Is the old mechanism (\replaceword[eg][Auflage][Au{fl}age]) now 
obsolete? I tried using it, but unwanted ligatures still occurred. If it 
is indeed deprecated, I'll add a note to the wiki (this would mean that 
the current texlive version does not have the new mechanism and the 
latest lmtx doesn't use the old one, so that's somewhat problematic).


2. Both mechanisms only work for complete words, is that right? So I 
can't just provide a pattern such as "uf|forder," I have to provide a 
full list with all inflected forms:


auf|fordern
auf|fordert
auf|fordernd
Auf|forderung
Auf|forderungen

and for 1-3 also the forms with a capital letter.

Thank you!

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

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


Re: [NTG-context] A not so short introduction to ConTeXt Mark IV

2021-07-28 Thread Kevin Vigouroux via ntg-context
I am not a translator but I think that working from XLIFF documents
would make the translation a bit easier.

XLIFF makes it possible to follow the translation process, at least
partially.

For example, if the translation tools implement the "Change Tracking
Extension" module defined in the latest XLIFF specification (v2.1), you
can track the status of elements. The "property" attribute can indicate
a new level: for example, the translator who changed the "state" (XLIFF
attribute) of the translation: initial, translated, reviewed, final.

[1] https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xliff
[2] http://docs.oasis-open.org/xliff/xliff-core/v2.1/xliff-core-v2.1.pdf

Unfortunately, translators would need to use translation tools based on
the latest XLIFF specification (v2) to take advantage of this. However,
someone will eventually be able to use the tools at their disposal.

Garulfo  writes:

> Does anybody has a guide about "how to set up a documentation
> translation project with git ?".
> One requirement will probably to define how propositions are
> officially validated. Does it requires Joaquín to learn how to use git
> ? Can we just work by sending files (or patches) to Joaquín who will
> update with a single git command ?
-- 
Best regards,
Kevin Vigouroux
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : 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 Styles of Typing

2021-07-28 Thread Henning Hraban Ramm via ntg-context

> Am 28.07.2021 um 14:14 schrieb Jeroen via ntg-context :
> 
> Is there a way to have two different types of typing. I tried the following, 
> but it does not seem to work.
> 
> \setuptyping[abc][style=\ttx]
> \setuptyping[def][style=\ttxx]
> 
> \starttext
> 
> \starttyping[abc]
> text
> text
> \stoptyping


You can try

\starttyping[style=\ttx]

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
___


Re: [NTG-context] Different Styles of Typing

2021-07-28 Thread Hans Hagen via ntg-context

On 7/28/2021 2:14 PM, Jeroen via ntg-context wrote:
Is there a way to have two different types of typing. I tried the 
following, but it does not seem to work.


\setuptyping[abc][style=\ttx]
\setuptyping[def][style=\ttxx]

\starttext

\starttyping[abc]
text
text
\stoptyping

\starttyping[def]
text
text
\stoptyping

\stoptext

in lmtx we can do this

\definetyping[abc] \setuptyping[abc][style=\ttx]
\definetyping[def] \setuptyping[def][style=\ttxx]

\unprotect

\tolerant\def\buff_verbatim_typing_start_yes[#1]#*[#2]%
  {\let\m_typing\currenttyping
   \ifhastok={#1}%
 \setupcurrenttyping[#1]%
   \orelse\ifcstok{#1}\v!continue
 \lettypingparameter\c!continue\v!yes
   \orelse\iftok{#1}\emptytoks
 % assume typing
   \orelse\ifcstok{#1}\v!typing
 % no overload
   \else
 \edef\currenttyping{#1}%
   \fi
   \ifparameter#2\or
 \setupcurrenttyping[#2]%
   \fi
   \typingparameter\c!before\relax
   \startpacked[\v!blank]%
   \buff_verbatim_setup_line_numbering
   \buff_verbatim_initialize_typing_one
   \buff_verbatim_setup_keep_together

\normalexpanded{\buff_verbatim_type_block{\e!start\m_typing}{\e!stop\m_typing}}}

\protect

\starttext

\starttyping[abc][color=red]
[text]
text
\stoptyping

\starttyping[def][style=\sl]
text
text
\stoptyping

\startdef
text
text
\stopdef

\stoptext

but first i want wolfgangs opinion on this (possible side effects and such)

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] LMTX mtxrun --script fonts --reload --force isn't finding fonts in tex/texmf-fonts

2021-07-28 Thread Hans Hagen via ntg-context

On 7/28/2021 1:45 PM, Henning Hraban Ramm via ntg-context wrote:



Am 28.07.2021 um 11:46 schrieb Hans Hagen :

On 7/28/2021 10:31 AM, Henning Hraban Ramm via ntg-context wrote:

Am 28.07.2021 um 08:50 schrieb Hans Hagen via ntg-context :

On 7/27/2021 11:44 PM, T. Kurt Bond via ntg-context wrote:

Hello.
I'm trying to get LMTX to use my fonts on Fedora 33 Linux.  I've got LMTX 
installed in the directory /sw/versions/context/lmtx and I've put copies of the 
fonts I'd like to use in /sw/versions/context/lmtx/tex/texmf-fonts.  Some of 
them are truetype and some of them are opentype.  When I run
mtxrun --script fonts --reload --force
it says
fonts   | names | scanning path
'/sw/versions/context/lmtx/tex/texmf-fonts' for otf files
fonts   | names | 0 otf files checked,  okay
and later
fonts   | names | scanning path
'/sw/versions/context/lmtx/tex/texmf-fonts' for ttf files
fonts   | names | 0 ttf files checked,  okay
Any ideas of what I'm doing wrong?


did you add the /fonts subpath?

  /sw/versions/context/lmtx/tex/texmf-fonts/fonts/data

i normally put them in

   data/whatever/whataverer*.otf

(data is kind of generic, there is no need to distinguish between various font 
types)

When I added your “Lost in fonts” article to the CGJ, I did exactly that with 
the included TYFA* fonts.
They were not recognized in the same folder as the article or in 
texmf-fonts/fonts/data/tyfa, even after several force reloads; they were only 
found when I added them to the system font directory (~/Library/Fonts on MacOS).

did you also do mtxrun --generate beforehand?


I didn’t because that’s part of the install script, isn’t it? I run that more 
or less daily.

But it doesn’t change anything – deleted the fonts from Library, they’re still in 
texmf-fonts, --generate, --reload --force => fonts not found.

Since my texmf-fonts is a symlink (to avoid the same tree in several 
installations), I also checked if a “real” directory solves the problem – no.


No clue ... maybe --verbose helps ... i assume that mtxrun --generate 
shows the path being seen.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Different Styles of Typing

2021-07-28 Thread Jeroen via ntg-context
Is there a way to have two different types of typing. I tried the
following, but it does not seem to work.

\setuptyping[abc][style=\ttx]
\setuptyping[def][style=\ttxx]

\starttext

\starttyping[abc]
text
text
\stoptyping

\starttyping[def]
text
text
\stoptyping

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

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


[NTG-context] Different Typing Styles

2021-07-28 Thread Jeroen via ntg-context
Is there a way to have two different styles of typing. I tried the
following, but it does not seem to work.

\setuptyping[abc][style=\ttx]
\setuptyping[def][style=\ttxx]

\starttext

\starttyping[abc]
example
example
\stoptyping

\starttyping[def]
example
example
\stoptyping

\stoptext


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : 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 mtxrun --script fonts --reload --force isn't finding fonts in tex/texmf-fonts

2021-07-28 Thread Henning Hraban Ramm via ntg-context

> Am 28.07.2021 um 11:46 schrieb Hans Hagen :
> 
> On 7/28/2021 10:31 AM, Henning Hraban Ramm via ntg-context wrote:
>>> Am 28.07.2021 um 08:50 schrieb Hans Hagen via ntg-context 
>>> :
>>> 
>>> On 7/27/2021 11:44 PM, T. Kurt Bond via ntg-context wrote:
 Hello.
 I'm trying to get LMTX to use my fonts on Fedora 33 Linux.  I've got LMTX 
 installed in the directory /sw/versions/context/lmtx and I've put copies 
 of the fonts I'd like to use in /sw/versions/context/lmtx/tex/texmf-fonts. 
  Some of them are truetype and some of them are opentype.  When I run
mtxrun --script fonts --reload --force
 it says
fonts   | names | scanning path
'/sw/versions/context/lmtx/tex/texmf-fonts' for otf files
fonts   | names | 0 otf files checked,  okay
 and later
fonts   | names | scanning path
'/sw/versions/context/lmtx/tex/texmf-fonts' for ttf files
fonts   | names | 0 ttf files checked,  okay
 Any ideas of what I'm doing wrong?
>>> 
>>> did you add the /fonts subpath?
>>> 
>>>  /sw/versions/context/lmtx/tex/texmf-fonts/fonts/data
>>> 
>>> i normally put them in
>>> 
>>>   data/whatever/whataverer*.otf
>>> 
>>> (data is kind of generic, there is no need to distinguish between various 
>>> font types)
>> When I added your “Lost in fonts” article to the CGJ, I did exactly that 
>> with the included TYFA* fonts.
>> They were not recognized in the same folder as the article or in 
>> texmf-fonts/fonts/data/tyfa, even after several force reloads; they were 
>> only found when I added them to the system font directory (~/Library/Fonts 
>> on MacOS).
> did you also do mtxrun --generate beforehand?

I didn’t because that’s part of the install script, isn’t it? I run that more 
or less daily.

But it doesn’t change anything – deleted the fonts from Library, they’re still 
in texmf-fonts, --generate, --reload --force => fonts not found.

Since my texmf-fonts is a symlink (to avoid the same tree in several 
installations), I also checked if a “real” directory solves the problem – no.

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
___


Re: [NTG-context] Adobe Acrobat accessibility criteria

2021-07-28 Thread Hans Hagen via ntg-context

On 7/28/2021 5:05 AM, Connor P. Jackson wrote:
My prior message got stuck in Moderation Limbo because I attached a PDF, 
so resending without the attachments:


Apologies, I realized about an hour after I hit send that I should have 
submitted an MRE! Here is an MRE adapted from the wiki page on PDF/A 
:


---

\setupinteraction[title=MyTitle,state=start]


\setupinteractionscreen[option={title}]


\setupbackend[

format={pdf/a-1a:2005},

profile={default_cmyk.icc,default_rgb.icc,default_gray.icc},

intent=ISO coated v2 300\letterpercent\space (ECI)]


%% Tagged PDF

%% method=auto ==> default tags by Adobe

\setupbackend[export=yes]

\setupstructure[state=start,method=auto]


\starttext


\chapter[chap:testing]{Testing}


Here is some text


\useURL[url1][https://xkcd.org][][Here  is a 
link to xkcd]\from[url1]



\stoptext


---

Including \setupinteractionscreen[option={title}] fixed the title issue 
(#1)! Thanks for that. I will add that to my default template.



And to see #s 2 and 3, I can send a PDF where I have fixed those errors 
in Adobe Acrobat—adding a link-OBJR tag and setting the Tab Order. Is 
there a preferred method since the listserv doesn’t seem to like large 
attachments?

your file is large because you also embed a profile .. this is more minimal

\setuptagging[state=start]

\setupstructure[state=start,method=auto]

\starttext

\chapter[chap:testing]{Testing}

Here is some text

\useURL[url1][https://xkcd.org][][Here is a link to xkcd]\from[url1]

\goto{next page}[page(2)]

\page test

\stoptext

anyway, adding this - yet another weird - tag related object is doable 
but i'll send you some files to test off list (the tagging code is 
already somewhat old but lucky me it's not that complex so i could 
figure it out without official pdf spec)


(when it works ok i also need to backport to mkiv)

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Using ConTeXt Lua libraries

2021-07-28 Thread Hans Hagen via ntg-context

On 7/28/2021 10:54 AM, Jairo A. del Rio via ntg-context wrote:

Hi everyone!

I want to know the proper way to load ConTeXt Lua modules/libraries /en 
masse/. such as those listed in cld-mkiv, without actual typesetting in 
order to write some scripts. I thought about creating a .cld file with 
no output, but I suspect there's a better way. Thanks in advance.


not sure what you mean ... when you do

   mtxrun --script yourscript.lua

you basically have most libs (there are ways to add more and create a 
proper stub but that's a different topic)


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] LMTX mtxrun --script fonts --reload --force isn't finding fonts in tex/texmf-fonts

2021-07-28 Thread Hans Hagen via ntg-context

On 7/28/2021 10:31 AM, Henning Hraban Ramm via ntg-context wrote:



Am 28.07.2021 um 08:50 schrieb Hans Hagen via ntg-context :

On 7/27/2021 11:44 PM, T. Kurt Bond via ntg-context wrote:

Hello.
I'm trying to get LMTX to use my fonts on Fedora 33 Linux.  I've got LMTX 
installed in the directory /sw/versions/context/lmtx and I've put copies of the 
fonts I'd like to use in /sw/versions/context/lmtx/tex/texmf-fonts.  Some of 
them are truetype and some of them are opentype.  When I run
mtxrun --script fonts --reload --force
it says
fonts   | names | scanning path
'/sw/versions/context/lmtx/tex/texmf-fonts' for otf files
fonts   | names | 0 otf files checked,  okay
and later
fonts   | names | scanning path
'/sw/versions/context/lmtx/tex/texmf-fonts' for ttf files
fonts   | names | 0 ttf files checked,  okay
Any ideas of what I'm doing wrong?


did you add the /fonts subpath?

  /sw/versions/context/lmtx/tex/texmf-fonts/fonts/data

i normally put them in

   data/whatever/whataverer*.otf

(data is kind of generic, there is no need to distinguish between various font 
types)


When I added your “Lost in fonts” article to the CGJ, I did exactly that with 
the included TYFA* fonts.
They were not recognized in the same folder as the article or in 
texmf-fonts/fonts/data/tyfa, even after several force reloads; they were only 
found when I added them to the system font directory (~/Library/Fonts on MacOS).

did you also do mtxrun --generate beforehand?

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


[NTG-context] Using ConTeXt Lua libraries

2021-07-28 Thread Jairo A. del Rio via ntg-context
Hi everyone!

I want to know the proper way to load ConTeXt Lua modules/libraries *en
masse*. such as those listed in cld-mkiv, without actual typesetting in
order to write some scripts. I thought about creating a .cld file with no
output, but I suspect there's a better way. Thanks in advance.

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

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


Re: [NTG-context] Question about \groupedcommand{}{}

2021-07-28 Thread Fabrice Couvreur via ntg-context
Hi Wolfgang,
Thank you for this nice solution.
Fabrice

Le mar. 27 juil. 2021 à 21:31, Wolfgang Schuster via ntg-context <
ntg-context@ntg.nl> a écrit :

> Fabrice Couvreur via ntg-context schrieb am 27.07.2021 um 18:57:
> > Hi,
> > The name of the environment must always end with a dot both with a title
> > and without title. How to do ?
> > Thanks
> > Fabrice
> >
> > [...]
>
>
> You can create simple dummy environments to test the parameters.
>
> \defineenumeration
>[grouptest]
>[title=yes,
>  text={dummy text},
> titleleft=,
>titleright=,
>   headcommand=\groupedcommand{[}{]},
> numbercommand=\groupedcommand{(}{)},
>  titlecommand=\groupedcommand{<}{>}]
>
> \starttext
>
> \startgrouptest [title={dummy title}]
> \unknown
> \stopgrouptest
>
> \startgrouptest
> \unknown
> \stopgrouptest
>
> \blank[2*line]
>
> \setupenumeration
>[grouptest]
>[number=no]
>
> \startgrouptest [title={dummy title}]
> \unknown
> \stopgrouptest
>
> \startgrouptest
> \unknown
> \stopgrouptest
>
> \stoptext
>
> 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] footnote not appearing

2021-07-28 Thread Henning Hraban Ramm via ntg-context


> Am 27.07.2021 um 23:46 schrieb jbf via ntg-context :
> 
> No, in fact I discovered that \startpostponingnotes is what is needed. 
> localfootnotes does work but places the footnote immediately below the framed 
> text, and I wanted it to appear in the usual footnote location, which is 
> achieved with startpostponingnotes

Yes, sorry, saw your second message too late.

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
___


Re: [NTG-context] LMTX mtxrun --script fonts --reload --force isn't finding fonts in tex/texmf-fonts

2021-07-28 Thread Henning Hraban Ramm via ntg-context

> Am 28.07.2021 um 08:50 schrieb Hans Hagen via ntg-context 
> :
> 
> On 7/27/2021 11:44 PM, T. Kurt Bond via ntg-context wrote:
>> Hello.
>> I'm trying to get LMTX to use my fonts on Fedora 33 Linux.  I've got LMTX 
>> installed in the directory /sw/versions/context/lmtx and I've put copies of 
>> the fonts I'd like to use in /sw/versions/context/lmtx/tex/texmf-fonts.  
>> Some of them are truetype and some of them are opentype.  When I run
>>mtxrun --script fonts --reload --force
>> it says
>>fonts   | names | scanning path
>>'/sw/versions/context/lmtx/tex/texmf-fonts' for otf files
>>fonts   | names | 0 otf files checked,  okay
>> and later
>>fonts   | names | scanning path
>>'/sw/versions/context/lmtx/tex/texmf-fonts' for ttf files
>>fonts   | names | 0 ttf files checked,  okay
>> Any ideas of what I'm doing wrong?
> 
> did you add the /fonts subpath?
> 
>  /sw/versions/context/lmtx/tex/texmf-fonts/fonts/data
> 
> i normally put them in
> 
>   data/whatever/whataverer*.otf
> 
> (data is kind of generic, there is no need to distinguish between various 
> font types)

When I added your “Lost in fonts” article to the CGJ, I did exactly that with 
the included TYFA* fonts.
They were not recognized in the same folder as the article or in 
texmf-fonts/fonts/data/tyfa, even after several force reloads; they were only 
found when I added them to the system font directory (~/Library/Fonts on MacOS).

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
___


Re: [NTG-context] footnote not appearing

2021-07-28 Thread Hans Hagen via ntg-context

On 7/27/2021 11:46 PM, jbf via ntg-context wrote:
No, in fact I discovered that \startpostponingnotes is what is needed. 
localfootnotes does work but places the footnote immediately below the 
framed text, and I wanted it to appear in the usual footnote location, 
which is achieved with startpostponingnotes


I assume that you use(d) mkiv/luatex and not lmtx/luametatex.

Footnotes are in tex speak 'inserts' and at some point they are filtered 
and added to the datastructure (list) that is taken into account when 
breaking a page.


When tex was written, the main application was books like those of Don 
Knuth where inserts like notes occur at the outer level. However, a 
macro package like context has all kind of complex deeply nested 
elements and there these notes just disappear. The main (and valid) 
reason is that it becomes kind of unpredictable what inserts are and 
where they have to go. (This is one reason why as soon as a macro 
package provides more functionality and control it also becomes much 
larger deep down.)


For this footnote-text-getting-lost problem, in mkii a solution became 
local notes and postponing.


In mmkiv it became a bit more clever and there is also an automigration 
features although in some cases that gives other side effects so it's 
not turned on by default.


In lmtx we use some new insert related features in luametatex so that's 
what I'll discuss next. (One can quit reading if not interested.)


Although it is still not trivial to deal with these things (keep in mind 
that users combine all mechanism which means that all mechanisms should 
be able to cooperate) in luametatex the inserts can bubble up which 
means that footnotes eventually will end up at the outer level.


So, if you use lmtx, ideally there is no need to use postponing (you can 
try your exapmle in lmtx without postponing).


For the curious ... the low level mechanisms involved in this can also 
be used for other purposes although currently this is not done. There is 
plenty of relative new functionality that can/will be applied some day.


Here is an example:

\setbox0\hbox{\strut this is just a test}

\setprelistbox 0\hbox{\strut \quad before}
\setpostlistbox0\hbox{\strut \quad after}

test \par \box0 \par test

Here \setprelistbox and \setpostlistbox are macros that (ab)use these 
hooks into lists. They will stay but keep in mind that when you use them 
they can interfere with for instance already present inserts.


Take this:

\starttext

\setbox0\hbox{\strut this is just a\footnote{oeps} test}
\setbox2\hbox{\strut this is just a\footnote{oeps} test}

\setprelistbox 0\hbox{\strut \quad before: \prelistbox0}
\setpostlistbox0\hbox{\strut \quad after: \postlistbox0}

\setprelistbox 2\hbox{\strut \quad before}
\setpostlistbox2\hbox{\strut \quad after}

test \par \box0 \par \box2 \par test

\stoptext

If you look carefully you'll see / can deduce what happens with inserts 
in luamatetatex.


Boxes are a major thing in tex, paragraphs are too, so here's another 
(already described elsewhere) trick with hooks,


(\wrapuppar{)}some text and some more text and ...

(\wrapuppar{\removeunwantedspaces)}some text and some more text and ...

test\wrapuppar{\crlf\ignorepars}

test

test\wrapuppar{\ignorepars}

test

test\wrapuppar{\removeunwantedspaces\ignorepars}

test

These are actually features that are already around and (so far) have 
proven to work ok. Especially the last examples are real tricky because 
you don't know if other mechanisms also use these (some already do) but 
all this box and pas stuff might eventually come with more high level 
interfaces (there is already one for the par stuff, not yet for the box 
stuff). But as with other such mechanism, one cannot rely on a naive 
approach and just assume the single case usage, only the user knows 
where it might interfere. On the other hand, low level box magick like 
the above will work ok because it's just that box.


Welcome to the world of (new) low level context trickery, which is and 
eventually will be described in the lowlevel-* manuals (after all I need 
topics for occasional presentations and those need to be new and if 
possible challenging.)


Hans


Julian

On 27/7/21 7:42 pm, Henning Hraban Ramm via ntg-context wrote:

Am 27.07.2021 um 06:07 schrieb jbf via ntg-context :

Is there any reason why the following MWE does not produce the 
footnote at the bottom of the page? It seems like the use of 
framedtext is preventing it, but am not sure why. Can I get around 
this problem and still have framed text?


Julian

\setupframed[location=middle]

\startframedtext[width=.77\makeupwidth,corner=round]
The poems of St John of the Cross have been important for me in 
recent years. This is John’s prayer from a verse in his Spiritual 
Canticle:\footnote{John of the Cross, {\em Spiritual Canticle}, 
stanza 32.  }


\startblockquote
You looked with love upon me, and deep within, your eyes imprinted 
grace. This mercy set me free, held in your lov