[NTG-context] Re: (off-topic) hovering over links in Acrobat Reader

2024-06-20 Thread Pablo Rodriguez via ntg-context
On 6/19/24 21:55, Henning Hraban Ramm wrote:
> Am 19.06.24 um 19:16 schrieb Pablo Rodriguez via ntg-context:
>> Would you be so kind to test the attached document (and the one you may
>> generate from the sample source) hovering over the link frames in
>> Acrobat (ideally DC updated to latest)?
>>
>> At least, I would like to be sure what is going on here.
>>
>> Hovering over links is basic precaution before clicking them.
>>
>> To explain that to others, I’d rather know how Acrobat (Reader) behaves
>> in these cases.
>
> Build 24.2.20857.0 on MacOS 10.15.7:
> 1: no hover
> 2: https://contextgarden.net
> 3: https://contextgarden.net

Many thanks for your help, Hraban.

Thanks to your confirmation, I investigated the issue further (since
there had to be something different with my documents).

\setuptagging[state=start] is the culprit. "link" is the word displayed
when links are hovered over.

Many thanks for your help again,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \brokenpenalties query

2024-06-20 Thread Mikael Sundqvist
Hi again,

in fact, the \brokenpenalties is new. So using \setpenalties on it in
the past did not do anything, since \ifdefined#1 would never be
true...

/Mikael

On Wed, Jun 19, 2024 at 4:45 PM Hans Hagen via ntg-context
 wrote:
>
> On 6/19/2024 4:06 PM, Mikael Sundqvist wrote:
> > Hi,
> >
> > On Wed, Jun 19, 2024 at 3:40 PM Alan Bowen  > <mailto:bowenala...@gmail.com>> wrote:
> >
> > I have in the past relied on
> >  \setpenalties\brokenpenalties{1}{1}\
> > to set the penalty for a page break after a hyphen. But with the
> > latest LMTX, when I run the file, I get the error message
> > Error count has to be 1 for \brokenpenalties
> >
> > Any advice on how to fix the file would be most welcome.
> >
> > Alan
> >
> >
> > Probably only Hans (or Wolfgang) can give a complete answer here. But
> >
> > \startsetups [*default]
> >\directsetup{*reset}
> >\frozen\brokenpenalties 1 1\relax
> > \stopsetups
> >
> > works here.
> >
> > /Mikael
> currently \brokenpenalties only takes one setting
>
> \permanent\protected\def\setpenalties#1#2#3%
>{\ifdefined#1%
>   \frozen#1\ifx#1\brokenpenalties
> \plusone#3\relax
>   \else
> \numexpr#2+\plusone\relax\space\expandedrepeat\numexpr#2\relax
>   { #3}\zerocount\relax
>   \fi
> \fi}
>
> > PS
> >
> > An interesting new feature is the possibility to set penalties depending
> > on left and right page, by using options. For example
> >
> > \startsetups [*default]
> >\directsetup{*reset}
> >\frozen\clubpenalties   3 options 4 1500 3000 250 500 0 0 \relax
> > \stopsetups
> >
> > sets club club penalties 1500 for first line and 250 for second for
> > going from left page to right page (and then 0 for the rest) and 3000
> > for first line and 500 for second (and rest 0) for going from right page
> > to left page.
> >
> > I hope this helps a bit.
> >
> > ___
> > If your question is of interest to others as well, please add an entry to 
> > the Wiki!
> >
> > maillist : ntg-context@ntg.nl / 
> > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> > webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> > archive  : https://github.com/contextgarden/context
> > wiki : https://wiki.contextgarden.net
> > ___
>
> --
>
> -
>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 / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: upgrade problem, more info

2024-06-19 Thread Hans Hagen via ntg-context

On 6/20/2024 2:39 AM, jbf wrote:

I should give a little more info on the upgrade problem.

My system is Linux (Mint).

Context installed at /home/jbf/context/tex/texmf-linux-64/bin/context

Current version after upgrade : 2024.06.18 22:04

I tried reinstalling, but same result: error, no format found with name: 
cont-en, aborting


And the simpler fact is that everything worked as normal before I upgraded.

I tried deleting texmf-cache, running mtxrun -- generate and context 
--make but problem still persists.


Don't know if it is relevant but after running context --make I see an 
error line:


lua error   > lua error on line 18 in file typo-lin.mkxl:

But that would seem to be a different error to the 'no format found' 
error. Or is it?

That line loads typo-ling.lmt so does something go wrong there?

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] upgrade problem, more info

2024-06-19 Thread jbf

I should give a little more info on the upgrade problem.

My system is Linux (Mint).

Context installed at /home/jbf/context/tex/texmf-linux-64/bin/context

Current version after upgrade : 2024.06.18 22:04

I tried reinstalling, but same result: error, no format found with name: 
cont-en, aborting


And the simpler fact is that everything worked as normal before I upgraded.

I tried deleting texmf-cache, running mtxrun -- generate and context 
--make but problem still persists.


Don't know if it is relevant but after running context --make I see an 
error line:


lua error   > lua error on line 18 in file typo-lin.mkxl:

But that would seem to be a different error to the 'no format found' 
error. Or is it?


Julian

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] upgrade problem

2024-06-19 Thread jbf

I have just upgraded Context to the latest, but am getting the message:

mtx-context | warning: no format found, forcing remake (commandline 
driven)


and at the end,

mtx-context | error, no format found with name: cont-en, aborting

Is there something that did not work properly in the upgrade or have I 
possibly created the problem somehow?


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: (off-topic) hovering over links in Acrobat Reader

2024-06-19 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 19.06.2024 um 21:55:

Am 19.06.24 um 19:16 schrieb Pablo Rodriguez via ntg-context:

Would you be so kind to test the attached document (and the one you may
generate from the sample source) hovering over the link frames in
Acrobat (ideally DC updated to latest)?

At least, I would like to be sure what is going on here.

Hovering over links is basic precaution before clicking them.

To explain that to others, I’d rather know how Acrobat (Reader) behaves
in these cases.


Build 24.2.20857.0 on MacOS 10.15.7:
1: no hover
2: https://contextgarden.net
3: https://contextgarden.net


Trying to compile your code, I get:

"""
...
fonts   > otf loading > math data wiped from 'DejaVu Sans'

Fatal error: catcode push/pop mismatch. Fix this! (restore level: 0)

system  > don't use \end to finish a document
system  > invalid \starttext ... \stoptext structure
close source    > level 1, order 3, name './hover1.tex'
(\end occurred when \ifcase on line 6 was incomplete)
...
"""


This should be \protected\def

\protect\def\myhref#1#2%
  {...}

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: (off-topic) hovering over links in Acrobat Reader

2024-06-19 Thread Henning Hraban Ramm

Am 19.06.24 um 19:16 schrieb Pablo Rodriguez via ntg-context:

Would you be so kind to test the attached document (and the one you may
generate from the sample source) hovering over the link frames in
Acrobat (ideally DC updated to latest)?

At least, I would like to be sure what is going on here.

Hovering over links is basic precaution before clicking them.

To explain that to others, I’d rather know how Acrobat (Reader) behaves
in these cases.


Build 24.2.20857.0 on MacOS 10.15.7:
1: no hover
2: https://contextgarden.net
3: https://contextgarden.net


Trying to compile your code, I get:

"""
...
fonts   > otf loading > math data wiped from 'DejaVu Sans'

Fatal error: catcode push/pop mismatch. Fix this! (restore level: 0)

system  > don't use \end to finish a document
system  > invalid \starttext ... \stoptext structure
close source> level 1, order 3, name './hover1.tex'
(\end occurred when \ifcase on line 6 was incomplete)
...
"""

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Upgrading from 2021.03.05.20230120 -> 2023.05.05.20230730 breaks BibTeX footnotes

2024-06-19 Thread Kip Warner
On Wed, 2024-06-19 at 09:24 +0200, Hans Hagen wrote:
> so best update then ... a while ago we had some addition for
> references and that involved an extra argument someplace which is
> what you see ... seems to be solved in the meantime, if not i'll look
> at it
> 
> (i assume you use the installer)

I use the Debian packages that ship with Ubuntu Noble (24.04). I'm a
bit reluctant to install outside of the package manager's stewardship
of the FHS, but might have to.

-- 
Kip Warner
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] (off-topic) hovering over links in Acrobat Reader

2024-06-19 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following source:

\setupbodyfont[dejavu, sans, 24pt]
\setupinteraction[state=start, style=, color=,
contrastcolor=, display=new]
\enabledirectives[references.border=darkgreen]
\def\myurl#1%
  {{\tt\goto{\hyphenatedurl{#1}}[url(#1)]}}
\protect\def\myhref#1#2%
  {\goto{\hyphenatedurl{#1}}[url(#2)]}
\starttext
\startTEXpage[pagestate=start, offset=1em, align=center]
{\bfa Hovering Over Links}
\blank[1st]
\attachment[method=hidden, file={signed-a.pdf}]
\goto{An embedded PDF document}[signed-a::]
\blank[.5st]
\myurl{https://contextgarden.net}
\blank[.5st]
\myhref{A link to the Garden}{https://contextgarden.net}
\stopTEXpage
\stoptext

I also attach my output, since the first link is a link to an embedded
document and not the expected link to an external document (I modified
ConTeXt to get that kind of link).

The issue I’m experiencing with Acrobat Reader DC on Windows
(automatically updated to latest version) is that when hovering over
links, I get different results.

The three links are (in order from top to bottom):

1. A link to the embedded document.
2. An external link with its address as text.
3. Another external link without its address as text.

Some days (as today [sorry, I don’t have access to Windows now]),
hovering over the three links displayed the word "link" (even with
Acrobat set to Spanish).

Other days, hovering over the first link displays nothing and hovering
over the two other links show their actual destination address.

This behavior seems so random to me that I‘m not sure I’m not missing
anything.

Would you be so kind to test the attached document (and the one you may
generate from the sample source) hovering over the link frames in
Acrobat (ideally DC updated to latest)?

At least, I would like to be sure what is going on here.

Hovering over links is basic precaution before clicking them.

To explain that to others, I’d rather know how Acrobat (Reader) behaves
in these cases.

Sorry the off-topic issue and many thanks for your help in advance,

Pablo


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \brokenpenalties query

2024-06-19 Thread Hans Hagen via ntg-context

On 6/19/2024 4:06 PM, Mikael Sundqvist wrote:

Hi,

On Wed, Jun 19, 2024 at 3:40 PM Alan Bowen <mailto:bowenala...@gmail.com>> wrote:


I have in the past relied on
     \setpenalties\brokenpenalties{1}{1}\
to set the penalty for a page break after a hyphen. But with the
latest LMTX, when I run the file, I get the error message
Error   count has to be 1 for \brokenpenalties

Any advice on how to fix the file would be most welcome.

Alan


Probably only Hans (or Wolfgang) can give a complete answer here. But

\startsetups [*default]
   \directsetup{*reset}
   \frozen\brokenpenalties 1 1\relax
\stopsetups

works here.

/Mikael

currently \brokenpenalties only takes one setting

\permanent\protected\def\setpenalties#1#2#3%
  {\ifdefined#1%
 \frozen#1\ifx#1\brokenpenalties
   \plusone#3\relax
 \else
   \numexpr#2+\plusone\relax\space\expandedrepeat\numexpr#2\relax
 { #3}\zerocount\relax
 \fi
   \fi}


PS

An interesting new feature is the possibility to set penalties depending 
on left and right page, by using options. For example


\startsetups [*default]
   \directsetup{*reset}
   \frozen\clubpenalties   3 options 4 1500 3000 250 500 0 0 \relax
\stopsetups

sets club club penalties 1500 for first line and 250 for second for 
going from left page to right page (and then 0 for the rest) and 3000 
for first line and 500 for second (and rest 0) for going from right page 
to left page.


I hope this helps a bit.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


--

-
  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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \brokenpenalties query

2024-06-19 Thread Mikael Sundqvist
Hi,

On Wed, Jun 19, 2024 at 3:40 PM Alan Bowen  wrote:

> I have in the past relied on
> \setpenalties\brokenpenalties{1}{1}\
> to set the penalty for a page break after a hyphen. But with the latest
> LMTX, when I run the file, I get the error message
> Errorcount has to be 1 for \brokenpenalties
> Any advice on how to fix the file would be most welcome.
>
> Alan
>

Probably only Hans (or Wolfgang) can give a complete answer here. But

\startsetups [*default]
  \directsetup{*reset}
  \frozen\brokenpenalties 1 1\relax
\stopsetups

works here.

/Mikael

PS

An interesting new feature is the possibility to set penalties depending on
left and right page, by using options. For example

\startsetups [*default]
  \directsetup{*reset}
  \frozen\clubpenalties   3 options 4 1500 3000 250 500 0 0 \relax
\stopsetups

sets club club penalties 1500 for first line and 250 for second for going
from left page to right page (and then 0 for the rest) and 3000 for first
line and 500 for second (and rest 0) for going from right page to left page.

I hope this helps a bit.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: context / auctex problem?

2024-06-19 Thread Jim
Hi Jürgen (and other auctex users)...

On Tue, Jun 18, 2024 at 11:23 (+0200), Jürgen Hanneder via ntg-context wrote:


> 1. This sounded like a good solution:

> Despite the contextgarden wiki page, which says:

>>  ;; AUCTeX defaults to mkii; change to iv for iv and lmtx
>>  (ConTeXt-Mark-version "IV")

> this seemed like a good idea,

I think the contextgarden wiki page is very out of date on that point.  I
was using auctex 13.x.y and updated to 14.0.4 a while back, and never had
to customize (or otherwise set) any variables to use the executable
"context", as opposed to the (I assume) Mk II "texexec".

>> (custom-set-variables
>>    '(ConTeXt-Mark-version "lmtx")
>>    '(ConTeXt-engine "lmtx"))

> but on my system the error just changes:

> Running `ConTeXt Full' on `context-test' with ``texexec  --engine=lmtx
> --nonstop context-test.tex''
> /usr/bin/texexec: Zeile 2: mtxrun: Kommando nicht gefunden.

> auctex apparently stops using the command "context" directly, but via texexec.

Not on my system.  Are you by any chance running an "ancient" version of
auctex?


> 2.

>> Apparently, your Emacs doesn’t use the same PATH as your terminal.
>> The error message is from /bin/sh, I guess you usually run bash, zsh or
>> the like, and that gets its PATH from .bashrc or something like that.
>> Check how Emacs calls that script, and if you can define a PATH.

> I tried the method from https://www.emacswiki.org/emacs/ExecPath
> and set explicitly a path as

> (setq exec-path (append exec-path '("-Path as in Bashrc-")))

> Does not work.

I've been using emacs for over thirty years, and have managed to never need
to explicitly setq exec-path.  How are you starting emacs?  If you start it
from a terminal session, it should inherit the PATH from your shell, which
presumably has the directory where your context executable is found.

If you are starting emacs by clicking on some window manager (or desktop
environment) button / icon / widget / ...  (or 'accelerator key') then
evidently your window manager doesn't have the same PATH as your shell.
Without knowing what window manager / desktop environment you use, and how
you are starting emacs, I can't suggest a specific solution.

In my opinion, the Right Thing to do is to ensure your window manager is
started with the correct PATH.  But depending on your system that could be
easy or tricky.

More pragmatically, if you created a .desktop file to run emacs, and have a
line in that file like
Exec=emacs
you might replace it with
Exec=env PATH= emacs
where  is what you have when you
echo $PATH
from a terminal session.

> 3.
>> And the information in AucTeX on how to change that is frankly deficient.

> Exactly. It is a little absurd that it should be so difficult to tell auctex
> anything.

I recently filed an auctex bug report and one of the auctex developers
updated the context.el file (to be put in the next release).  I was told
that none of the auctex developers use ConTeXt (imagine!!) and that they
were happy to have some reports from ConTeXt users.  But before you
consider contacting them, I strongly advise you to upgrade to the newest
auctex release.


>> To the point that I, who
>> am an Emacs user for almost everything, when I write in ConTeXt I prefer
>> to use Vim.

"The horror, the horror."
- Marlon Brando


On Tue, Jun 18, 2024 at 16:12 (+0200), Jürgen Hanneder via ntg-context wrote:



> Here just an inelegant half-solution:

> I added the whole program path to the 'TeX-command-list and it works, but
> this is hardly satisfying.
> At least it suggests that nothing else is wrong except that emacs 29.3 and
> auctex 14.0.5 together decide
> not to find a path, which is in .bashrc and works fine when called from a
> shell (not from eshell though).

Again, I suspect your window manager is not started with the complete PATH
that you have set up in your shell init file(s).

If you wish to dig into this further, I'd be happy to try to help you with
it.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Transparency in external PDFs does not work

2024-06-19 Thread Hans Hagen

On 6/18/2024 9:54 AM, Gerion Entrup wrote:

Am Montag, 17. Juni 2024, 23:50:16 MESZ schrieb Hans Hagen:

On 6/17/2024 5:07 PM, Gerion Entrup wrote:

Hi,

I'm using LaTeX-Beamer and TikZ for figure typesetting.
If you use that kind of simple graphics, you can avoid this transparency 
hacking by using metafun:


\setupbodyfont[dejavu]

\starttext

\startuseMPgraphic{test}
pickup pencircle scaled 2mm ;
draw fullcircle scaled 3cm withcolor darkred  withstacking 1 ;
draw fullcircle scaled 2cm withcolor darkblue withstacking 2 ;
draw textext("one")   withcolor darkgreen withstacking 11 ;
draw textext("two")   withcolor darkgreen withstacking 12 ;
draw textext("three") withcolor darkgreen withstacking 13 ;
\stopuseMPgraphic

\startTEXpage[offset=.25ts]
\useMPgraphic{test}{stacking={1,11}}
\stopTEXpage

\startTEXpage[offset=.25ts]
\useMPgraphic{test}{stacking={2,12}}
\stopTEXpage

\startTEXpage[offset=.25ts]
\useMPgraphic{test}{stacking={1,2,13}}
\stopTEXpage

\stoptext

It's an already old feature but probably not that well known. If needed 
I can make something similar at the tex end.


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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Upgrading from 2021.03.05.20230120 -> 2023.05.05.20230730 breaks BibTeX footnotes

2024-06-19 Thread Hans Hagen

On 6/19/2024 3:28 AM, Kip Warner wrote:


But on my machine which has ConTeXt 2023.05.05, I see the following:


so best update then ... a while ago we had some addition for references 
and that involved an extra argument someplace which is what you see ... 
seems to be solved in the meantime, if not i'll look at it


(i assume you use the installer)

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Upgrading from 2021.03.05.20230120 -> 2023.05.05.20230730 breaks BibTeX footnotes

2024-06-18 Thread Kip Warner
On Tue, 2024-06-18 at 18:48 +0200, Hans Hagen wrote:
> then use \alwayscite

Hey Hans. I note that command is not documented (yet) so thank you for
providing that. That works in getting the reference typeset without
having to list all of them.

That at least gets the reference to typeset, but back to the original
issue, it still doesn't typeset correctly. I've managed to come up with
a minimal that displays the garbled reference:

   \startbuffer[testdata]
   @Book{cicero-tuscu2011,
   author = {Cicéron, Marcus Tullius},
   editor = {Fohlen, G.},
   publisher  = {Les Belles Lettres},
   title  = {Tusculanes},
   year   = {2011},
   address= {Paris},
   edition= {7e tirage},
   isbn   = {9782251010830},
   series = {œuvres philosophiques},
   volume = {1},
   ppn_gvk= {1823774121},
   translator = {Jules Humbert},
   }
   \stopbuffer
   
   % Setup bibliography...
   
   % Select References.bib and name it the main database...
   \usebtxdataset[main][testdata.buffer]
   
   % Citation style...
   \usebtxdefinitions[apa]
   
   % Use our main dataset for citations...
   \setupbtx[dataset=main]
   
   \definebtxrendering[main][apa][dataset=main]
   
   \setupbtxrendering[main][
   pagestate=start,
   continue=yes,
   numbering=yes]
   
   % Macro to put the citations as footnotes...
   \unexpanded\def\footnotecite{\dodoubleempty\domycite}
   \def\domycite[#1][#2]%
   {\ifsecondargument
   \footnote{\alwayscite[alternative=entry,#1][main::#2]}%
   \else
   \footnote{\alwayscite[alternative=entry][main::#1]}%
   \fi}
   
   \starttext
   Some footnote.\footnotecite[cicero-tuscu2011]
   \stoptext

If I use ConTeXt via https://context-on-web.eu/, which appears to be 
ConTeXt ver: 2022.12.22 22:17 LMTX fmt: 2022.12.23, it works fine and I
see the following in the footnote, as expected:

   1 Cicéron, M. T. (2011). Tusculanes (G. Fohlen, Ed.) (J. Humbert,
   Trans.). (Vol. 1, 7e tirage ed.). Paris: Les Belles Lettres.

But on my machine which has ConTeXt 2023.05.05, I see the following:

   1 internal()Cicéron, M. T. (2011). Tusculanes (G. Fohlen, Ed.) (J.
   Humbert, Trans.). (Vol. 1, 7e tirage ed.). Paris: Les Belles Lettres.
   isbn∶9782251010830

-- 
Kip Warner
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Upgrading from 2021.03.05.20230120 -> 2023.05.05.20230730 breaks BibTeX footnotes

2024-06-18 Thread Hans Hagen

On 6/18/2024 6:38 PM, Kip Warner wrote:

On Tue, 2024-06-18 at 18:16 +0200, Hans Hagen wrote:

you need to place a list in order to get some ref


Is there no way to use references without having to list the entire
bibliography?

then use \alwayscite


% hidden : mark for list, don't show in text
% list   : mark for list, show in text only when in list
% text   : not to list, show in text
% always : mark for list, show in text


-
  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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: digital signing in ConTeXt

2024-06-18 Thread Hans Hagen via ntg-context

On 6/18/2024 6:26 PM, Pablo Rodriguez via ntg-context wrote:

On 6/18/24 10:27, Hans Hagen via ntg-context wrote:

On 6/18/2024 8:44 AM, Pablo Rodriguez via ntg-context wrote:

[...]
Generating certificates with OpenSSL is basically free.


you cannot use a 'web certificate'


Self-signed certificates may be used to stamp PDF documents to set both
signing time and to detect modifications after signing.

In fact, I’m planning to digitally stamp documents at work to ensure
they aren’t modified after submission (by people or by any automated
program).


well, if you can figure it out ... i'll can only spend time on it in a 
real project (it's notp that interesting as hobby)



I think this may be avoided by adding a timestamp token (as unsigned
attribute) in the PKCS#7 (as mentioned in the PDF spec).


dunno, can test it


https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#nameddest=G11.2054251
refers to https://www.rfc-editor.org/rfc/pdfrfc/rfc3161.txt.pdf#page=20.

Not sure how to get that with OpenSSL (never tried). But I may ask how
to get that at their GitHub repository.


ok


Acrobat may be wrong in not detecting the signature (I’m investigating it).


i think it only looks for 'official' ones


I have created self-signed certificates with Acrobat Reader and signed
PDF documents with both ones (cert and Acrobat) and Acrobat displayed
these signatures.


ok


I have used the provided certificate to sign with pdfsig and Acrobat
displayed the signature.

I think Acrobat may be misbehaving here (requiring some optional content
as mandatory).


dunno, if you can create examples i suppose we can reverse engineer them 
because the standard is fuzzy



I’m afraid that the patch is needed since /ByteRange excludes a blank
space before the value of /Contents that is in the temporary file (tmpfile).


i need to test more


Perfectly fine for me. Of course, it should be tested more.


The blank space (marked above with the underscore) is included in the
hashed file (tmpfile), but it is not included in the /ByteRange.

This is the reason why we can only have digest mismatch.


yes but that what i noticed when testing: mupdf, qpdf, acrobat, etc ..
trial and error is not to add that one


Sorry, but I have to be missing your point completely.

/ByteRange considers this part of the document to be written as:

<< /ByteRange [ … 006421 010520 000384 ] /Contents<3…

But document is written, hashed and signed:

<< /ByteRange [ … 006421 010520 000384 ] /Contents <3…

Of course, the value of the contents hasn’t been hashed, but the blank
space between /Contents and is value has been hashed.


i know but when i tested with q and m that spaces was kind of fuzzy so i 
stuck with what seemed to work



As far as I know, this has to be a reason for digest mismatch (or a huge
hash collision).


could be (depends on checker) but it we change that we also need to 
change the verfy offset (so two patches)



As far as I can remember, this is mandatory for PDF-2.0 (and highly
recommended for previous versions [although not required]).


not sure what you mean, 2.0 demanding signing?


Not at all. Sorry for my poor wording. From the PDF-1.7 spec itself
(https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#search=ByteRange):

   This range should be the entire file, including the signature
   dictionary but excluding the signature value itself (the Contents
   entry). Other ranges may be used but since they do not check for all
   changes to the document, their use is not recommended. When a byte
   range digest is present, all values in the signature dictionary shall
   be direct objects.

Signatures in PDF-2.0 loose their possibility of other ranges than the
entire file. Their use is simply not allowed.


so more limited then to basically two ranges


Sorry for insisting, but please don’t require plaintext password in the
command line (again, OpenSSL prompts for it).

not if we use the library


Weird, on both Linux64 and Win64, the openssl runner requires the
openssl binary to be installed.


i meant the --library option


Many thanks for your help,

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: digital signing in ConTeXt

2024-06-18 Thread Pablo Rodriguez via ntg-context
On 6/18/24 10:27, Hans Hagen via ntg-context wrote:
> On 6/18/2024 8:44 AM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> Generating certificates with OpenSSL is basically free.
>
> you cannot use a 'web certificate'

Self-signed certificates may be used to stamp PDF documents to set both
signing time and to detect modifications after signing.

In fact, I’m planning to digitally stamp documents at work to ensure
they aren’t modified after submission (by people or by any automated
program).

>> I think this may be avoided by adding a timestamp token (as unsigned
>> attribute) in the PKCS#7 (as mentioned in the PDF spec).
>
> dunno, can test it

https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#nameddest=G11.2054251
refers to https://www.rfc-editor.org/rfc/pdfrfc/rfc3161.txt.pdf#page=20.

Not sure how to get that with OpenSSL (never tried). But I may ask how
to get that at their GitHub repository.

>> Acrobat may be wrong in not detecting the signature (I’m investigating it).
>
> i think it only looks for 'official' ones

I have created self-signed certificates with Acrobat Reader and signed
PDF documents with both ones (cert and Acrobat) and Acrobat displayed
these signatures.

I have used the provided certificate to sign with pdfsig and Acrobat
displayed the signature.

I think Acrobat may be misbehaving here (requiring some optional content
as mandatory).

>> I’m afraid that the patch is needed since /ByteRange excludes a blank
>> space before the value of /Contents that is in the temporary file (tmpfile).
>
> i need to test more

Perfectly fine for me. Of course, it should be tested more.

>> The blank space (marked above with the underscore) is included in the
>> hashed file (tmpfile), but it is not included in the /ByteRange.
>>
>> This is the reason why we can only have digest mismatch.
>
> yes but that what i noticed when testing: mupdf, qpdf, acrobat, etc ..
> trial and error is not to add that one

Sorry, but I have to be missing your point completely.

/ByteRange considers this part of the document to be written as:

<< /ByteRange [ … 006421 010520 000384 ] /Contents<3…

But document is written, hashed and signed:

<< /ByteRange [ … 006421 010520 000384 ] /Contents <3…

Of course, the value of the contents hasn’t been hashed, but the blank
space between /Contents and is value has been hashed.

As far as I know, this has to be a reason for digest mismatch (or a huge
hash collision).

>> As far as I can remember, this is mandatory for PDF-2.0 (and highly
>> recommended for previous versions [although not required]).
>
> not sure what you mean, 2.0 demanding signing?

Not at all. Sorry for my poor wording. From the PDF-1.7 spec itself
(https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#search=ByteRange):

  This range should be the entire file, including the signature
  dictionary but excluding the signature value itself (the Contents
  entry). Other ranges may be used but since they do not check for all
  changes to the document, their use is not recommended. When a byte
  range digest is present, all values in the signature dictionary shall
  be direct objects.

Signatures in PDF-2.0 loose their possibility of other ranges than the
entire file. Their use is simply not allowed.

>> Sorry for insisting, but please don’t require plaintext password in the
>> command line (again, OpenSSL prompts for it).
> not if we use the library

Weird, on both Linux64 and Win64, the openssl runner requires the
openssl binary to be installed.

Many thanks for your help,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: extensibles not rendered

2024-06-18 Thread Martin C. Moncrieffe
Thanks Mikael….I’m glad to know that it wasn’t a problem with my installation.

Best.

__martin

> On 18 Jun 2024, at 12:49, Mikael Sundqvist  wrote:
> 
> Martin: We did not add the "wipeweirdones" to the cambria tweak file
> yet. It should be there, but even then, one sees this, so some more
> work is needed to get it also to work for Cambria. I will discuss it
> with Hans.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: context / auctex problem? half-solved

2024-06-18 Thread Jürgen Hanneder via ntg-context



Here just an inelegant half-solution:

I added the whole program path to the 'TeX-command-list and it works,  
but this is hardly satisfying.
At least it suggests that nothing else is wrong except that emacs 29.3  
and auctex 14.0.5 together decide
not to find a path, which is in .bashrc and works fine when called  
from a shell (not from eshell though).


Thanks again for the tips,
Jürgen



- Nachricht von Lizardo Reyna via ntg-context   
-

 Datum: Tue, 18 Jun 2024 00:34:32 -0500
   Von: Lizardo Reyna via ntg-context 
Antwort an: mailing list for ConTeXt users 
   Betreff: [NTG-context] context / auctex problem?
An: ntg-context@ntg.nl
Cc: Lizardo Reyna 



Hi,

You can update the command for ConTeXt as follows:

Graphically:

M-x customize-variable *↵*

TeX-command-list *↵*

find the appropriate section for ConTeXt commands and change it with  
(e.g.) "context --purgeall %t" (see attached image).


Apply and save.

-

Using the init.el you can also create your own commands:


(custom-set-variables
   '(ConTeXt-Mark-version "lmtx")
   '(ConTeXt-engine "lmtx"))


(eval-after-load "context"
  '(setq TeX-command-list
    (append
  '(
    ("context"
"context --purgeall %t"
  TeX-run-command t :help "Run context (lmtx)")
    ("luametatex"
"context --purgeall %t"
  TeX-run-command t :help "Run context (lmtx)")
  ) TeX-command-list
    )
  )
  )

I hope this helps.


Lizardo R.



- Ende der Nachricht von Lizardo Reyna via ntg-context  
 -




---

Prof. Dr. Juergen Hanneder
Philipps-Universitaet Marburg
FG Indologie u. Tibetologie
Deutschhausstr.12
35032 Marburg
Germany
Tel. 0049-6421-28-24930
hanne...@staff.uni-marburg.de

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: extensibles not rendered

2024-06-18 Thread Mikael Sundqvist
Hi,

Thanks!

Jacob: Hans is aware. It is a bit weird, since it works differently
depending on the viewer...

Martin: We did not add the "wipeweirdones" to the cambria tweak file
yet. It should be there, but even then, one sees this, so some more
work is needed to get it also to work for Cambria. I will discuss it
with Hans.

/Mikael

On Tue, Jun 18, 2024 at 1:25 PM Martin C. Moncrieffe  wrote:
>
>
> Using the latest release (ConTeXt  ver: 2024.06.16 18:22 LMTX  fmt: 
> 2024.6.17, the following renders correctly with  pagella but not cambria.
>
>
> \setupbodyfont[cambria, 12pt]
>
> \starttext
>
> \startformula
> s\of(1) = s\of (\set{0}) = \set{0} \cup \set{\set{0}}
> \stopformula
>
> \stoptext
>
>
> __martin
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: expanded doif's

2024-06-18 Thread Hans van der Meer via ntg-context
Finally found the culprit. Macro call to restart reporting errors in the 
printed output residing at the wrong point in the code.
Again thanks for pointing out where it was not.

yours sincerely
dr. Hans van der Meer



> On 17 Jun 2024, at 16:52, Wolfgang Schuster 
>  wrote:
> 
> Hans van der Meer schrieb am 17.06.2024 um 09:01:
>> I want to show an errormessage when the macro is undefined. It requires 
>> expansion of \xmlatt{#1}{name}.
>> \ifdefined\xmlatt{#1}{name} didn't worked nor \expandafter\ifdefined
>> I thought of the expanding \doif's.
>> See the attached output of this xmlsetup attached.
>> \startxmlsetups hvdm:system:macrocall
>> %
>> \doifelsedefined{\xmlatt{#1}{name}}
>> {
>> %
>> %macro without argument
>> %
>> \ifxmlattempty{#1}{arg}
>> \begincsname\xmlatt{#1}{name}\endcsname
>> %
>> %macro with argument
>> %
>> \else
>> \begincsname\xmlatt{#1}{name}\endcsname{\xmlatt{#1}{arg}}
>> \fi
>> }
>> {
>> \ERROR{macro \xmlatt{#1}{name} is not defined}
>> }
>> \stopxmlsetups
> 
> I have no idea what's wrong in your code without a proper minimal example. As 
> the example below shows you can use \doifelsedefined in combination with 
> \xmlatt.
> 
> \startbuffer[ifdefined]
> 
>  
>  
> 
> \stopbuffer
> 
> \startxmlsetups xml:document
>  \xmlflush{#1}
> \stopxmlsetups
> 
> \startxmlsetups xml:macro
> 
>  \doifelsedefined{\xmlatt{#1}{name}}
>{\texdefinition{\xmlatt{#1}{name}}{\xmlatt{#1}{arg}}}
>{{\tttf macro \tex{\xmlatt{#1}{name}} not defined}}
> 
> % \ifcsname\xmlatt{#1}{name}\endcsname
> %   \lastnamedcs{\xmlatt{#1}{arg}}
> % \else
> %   %
> % \fi
> 
> \stopxmlsetups
> 
> \startxmlsetups xml:hvdm
> \xmlsetsetup{\xmldocument}{document|macro}{xml:*}
> \stopxmlsetups
> 
> \xmlregistersetup{xml:hvdm}
> 
> \starttext
> \xmlprocessbuffer{hvdm}{ifdefined}{}
> \stoptext
> 
> Wolfgang
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: digital signing in ConTeXt

2024-06-18 Thread Hans Hagen via ntg-context

On 6/18/2024 8:44 AM, Pablo Rodriguez via ntg-context wrote:

On 6/18/24 00:52, Hans Hagen via ntg-context wrote:

On 6/17/2024 7:51 PM, Pablo Rodriguez via ntg-context wrote:

[...]>> 2. I cannot get any signature display in Acrobat. Does any PDF viewer (I
have tested this with pdfsig from poppler and MuPDF-GL) display the
digital signature at all?

this whole digitial signing is a bit of a scam imo ...


Digital signing may be a marketing gig also, but we may only consider
the pure feature as such.

I mean, I’m not interested here in the legally binding value of certain
digital certificates,  but just in having digital signatures right.


- one has to buy a specific kind of certificate


Generating certificates with OpenSSL is basically free.


you cannot use a 'web certificate'


- often one is supposed to use some token

- when the root cert expires one has to resign


I think this may be avoided by adding a timestamp token (as unsigned
attribute) in the PKCS#7 (as mentioned in the PDF spec).


dunno, can test it


- reader has root certs built in and checking is supposed to be online

- it doesn't come cheap and supporting / testing is not something one

can expect for free (so i can't really test it)

... so just some business model and not really something one can do out
of the box


This is all related to certificate (legal) validity. This is out of the
scope.


whatever ...


... apart from ...

- just sign with some certificate and don't expect viewers to do something


Acrobat may be wrong in not detecting the signature (I’m investigating it).


i think it only looks for 'official' onex


concerning the suggested patches: this <whatever> boundary is a
bit fuzzy and i found that different viewers / checkers expect either or
not +/- 1 but i didn't check recently if things have improved


There are two different issues here: digest mismatch and total document
signing.

I’m afraid that the patch is needed since /ByteRange excludes a blank
space before the value of /Contents that is in the temporary file (tmpfile).


i need to test more


I mean, here are the contens of the temporary file from the sample
(tweaked to fit a single line]):

<< /ByteRange [ … 006421 010520 000384 ] /Contents  /

Byte 6421 is the s (before the underscore):

<< /ByteRange [ … 006421 010520 000384 ] /Contents_ /

The blank space (marked above with the underscore) is included in the
hashed file (tmpfile), but it is not included in the /ByteRange.

This is the reason why we can only have digest mismatch.


yes but that what i noticed when testing: mupdf, qpdf, acrobat, etc .. 
trial and error is not to add that one



As for total document signing, it is better only to exclude from
/ByteRange the value for /Contents (from < to >).

As far as I can remember, this is mandatory for PDF-2.0 (and highly
recommended for previous versions [although not required]).


not sure what you mean, 2.0 demanding signing?


if we know the specs and  have way to test ... no big deal to fix a few
offsets


I’m happy to contribute as far as I can.

Sorry for insisting, but please don’t require plaintext password in the
command line (again, OpenSSL prompts for it).

not if we use the library

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: digital signing in ConTeXt

2024-06-17 Thread Pablo Rodriguez via ntg-context
On 6/18/24 00:52, Hans Hagen via ntg-context wrote:
> On 6/17/2024 7:51 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]>> 2. I cannot get any signature display in Acrobat. Does any PDF 
>> viewer (I
>> have tested this with pdfsig from poppler and MuPDF-GL) display the
>> digital signature at all?
> this whole digitial signing is a bit of a scam imo ...

Digital signing may be a marketing gig also, but we may only consider
the pure feature as such.

I mean, I’m not interested here in the legally binding value of certain
digital certificates,  but just in having digital signatures right.

> - one has to buy a specific kind of certificate

Generating certificates with OpenSSL is basically free.

> - often one is supposed to use some token
>
> - when the root cert expires one has to resign

I think this may be avoided by adding a timestamp token (as unsigned
attribute) in the PKCS#7 (as mentioned in the PDF spec).

> - reader has root certs built in and checking is supposed to be online
> > - it doesn't come cheap and supporting / testing is not something one
> can expect for free (so i can't really test it)
>
> ... so just some business model and not really something one can do out
> of the box

This is all related to certificate (legal) validity. This is out of the
scope.

> ... apart from ...
>
> - just sign with some certificate and don't expect viewers to do something

Acrobat may be wrong in not detecting the signature (I’m investigating it).

> concerning the suggested patches: this <whatever> boundary is a
> bit fuzzy and i found that different viewers / checkers expect either or
> not +/- 1 but i didn't check recently if things have improved

There are two different issues here: digest mismatch and total document
signing.

I’m afraid that the patch is needed since /ByteRange excludes a blank
space before the value of /Contents that is in the temporary file (tmpfile).

I mean, here are the contens of the temporary file from the sample
(tweaked to fit a single line]):

<< /ByteRange [ … 006421 010520 000384 ] /Contents  /

Byte 6421 is the s (before the underscore):

<< /ByteRange [ … 006421 010520 000384 ] /Contents_ /

The blank space (marked above with the underscore) is included in the
hashed file (tmpfile), but it is not included in the /ByteRange.

This is the reason why we can only have digest mismatch.

As for total document signing, it is better only to exclude from
/ByteRange the value for /Contents (from < to >).

As far as I can remember, this is mandatory for PDF-2.0 (and highly
recommended for previous versions [although not required]).

> if we know the specs and  have way to test ... no big deal to fix a few
> offsets

I’m happy to contribute as far as I can.

Sorry for insisting, but please don’t require plaintext password in the
command line (again, OpenSSL prompts for it).

Many thanks for your help,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Upgrading from 2021.03.05.20230120 -> 2023.05.05.20230730 breaks BibTeX footnotes

2024-06-17 Thread Kip Warner
On Tue, 2024-06-18 at 00:54 +0200, Hans Hagen wrote:
> complete example needed
> 
> - tex file
> - bib file

Hello Hans,

While trying to prepare a minimal for you I noticed that now all of my
footnotes disappear. Here is a minimal using the buffer method so there
is only one file:

   \startbuffer[testdata]
   @Book{cicero-tuscu2011,
author = {Cicéron, Marcus Tullius},
editor = {Fohlen, G.},
publisher  = {Les Belles Lettres},
title  = {Tusculanes},
year   = {2011},
address= {Paris},
edition= {7e tirage},
isbn   = {9782251010830},
series = {œuvres philosophiques},
volume = {1},
ppn_gvk= {1823774121},
translator = {Jules Humbert},
   }
   \stopbuffer
   
   % Setup bibliography...
   
   % Select References.bib and name it the main database...
   \usebtxdataset[main][testdata.buffer]
   
   % Citation style...
   \usebtxdefinitions[apa]
   
   % Use our main dataset for citations...
   \setupbtx[dataset=main]
   
   \definebtxrendering[main][apa][dataset=main]
   
   \setupbtxrendering[main][
   pagestate=start,
   continue=yes,
   numbering=yes]
   
   % Macro to put the citations as footnotes...
   \unexpanded\def\footnotecite{\dodoubleempty\domycite}
   \def\domycite[#1][#2]%
   {\ifsecondargument
   \footnote{\cite[alternative=entry,#1][main::#2]}%
   \else
   \footnote{\cite[alternative=entry][main::#1]}%
   \fi}
   
   \starttext
   Some footnote here.\footnotecite[cicero-tuscu2011]
   \stoptext

-- 
Kip Warner
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: digital signing in ConTeXt

2024-06-17 Thread Hans Hagen via ntg-context

On 6/17/2024 7:51 PM, Pablo Rodriguez via ntg-context wrote:

Dear list,

the latest version of LMTX can digitally sign PDF documents. It requires
OpenSSL installed (since it does the crypto part).

I have two issues that I would like to be tested by others.

A sample certificate may be found at
https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/message/ECSXLVMT3TMQBIHA2UZJPWJN7OVV5334/attachment/2/mycert.pfx
(I sent it myself).

Here is a sample document (actually provided by Hans):

   \setupinteraction[state=start]
   \definefield[signature][signed]
   \defineoverlay[signature][my signature]
   \starttext
 \startTEXpage[offset=1ts,frame=on,framecolor=darkblue]
   sign: \inframed[background=signature,framecolor=darkred]
   {\fieldbody[signature][width=3cm,option=hidden]}
 \stopTEXpage
   \stoptext

After compiling the sample, you need to run:

mtxrun --script pdf --sign --certificate=c.pfx --password=ABCabc doc.pdf


i use a pem


Password will be prompted again ("ABCabc"), since it is an encrypted
certificate (also for the public part).

Could anyone confirm the following issues?

1. The signature I get is wrong, unless I apply this patch
(https://mailman.ntg.nl/archives/list/dev-cont...@ntg.nl/message/T3OCKVZWTUTIXCSOKIFRVJ4X76MROZHE/attachment/3/byterange.diff
[sent by myself to the devel list]).

2. I cannot get any signature display in Acrobat. Does any PDF viewer (I
have tested this with pdfsig from poppler and MuPDF-GL) display the
digital signature at all?

this whole digitial signing is a bit of a scam imo ...

- one has to buy a specific kind of certificate
- often one is supposed to use some token
- when the root cert expires one has to resign
- reader has root certs built in and checking is supposed to be online
- it doesn't come cheap and supporting / testing is not something one 
can expect for free (so i can't really test it)


... so just some business model and not really something one can do out 
of the box


... apart from ...

- just sign with some certificate and don't expect viewers to do something
- offer a service to upload the document for checking when a user is in 
doubt
- that can be done without root cert and basically works as long as the 
service works


concerning the suggested patches: this <whatever> boundary is a 
bit fuzzy and i found that different viewers / checkers expect either or 
not +/- 1 but i didn't check recently if things have improved


if we know the specs and  have way to test ... no big deal to fix a few 
offsets


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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: line numbering respecting original lines

2024-06-17 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 17.06.2024 um 19:30:

Am 17.06.24 um 19:07 schrieb Wolfgang Schuster:

Henning Hraban Ramm schrieb am 17.06.2024 um 18:46:

Am 17.06.24 um 18:16 schrieb Wolfgang Schuster:

Henning Hraban Ramm schrieb am 17.06.2024 um 14:03:
When discussing verses or other texts that have distinct line 
breaking, I need line numbering to adhere to that, even if some 
lines are too long and need breaking. Is that possible?


In my example below the 3rd line is too long and gets line numbers 
3 and 4.


Same problem with source code examples, i.e. \starttyping with 
numbering.
I thought numbering=file (or \setuplinenumbering[method=file]) 
would address that, but apparently not.



\start \setupparagraphnumbering[state=start]
\startlines
...
\stoplines
\stop


Thank you – that works for the minimal example, but the options for 
paragraph numbering are very limited, I can’t even use my own command.

And I can’t combine it with \starttyping.


\def\CodeNumber#1{\hfill\tt\bfx\color[orange]{#1}}

% ok
\setuplinenumbering[
   command=\CodeNumber,
   width=3em,]

% invalid
\setupparagraphnumbering[
   command=\CodeNumber,
   width=3em,]


You can use the style and color keys

   \setupparagraphnumbering[state=start,style=\tt\bfx,color=orange]


but the location of the number in the left margin is fixed.


Yes, I’m just documenting line and paragraph numbering, and I wonder 
why the latter is so limited – is it just too old to use the usual 
parameters, or is it so much more complicated internally?


Maybe Hans (or somebody) needed this for a single document and the 
current version was enough at the time.


Wolfgang

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: digital signing in ConTeXt

2024-06-17 Thread Henning Hraban Ramm

Am 17.06.24 um 19:51 schrieb Pablo Rodriguez via ntg-context:

Dear list,

the latest version of LMTX can digitally sign PDF documents. It requires
OpenSSL installed (since it does the crypto part).

Could anyone confirm the following issues?

1. The signature I get is wrong, unless I apply this patch
(https://mailman.ntg.nl/archives/list/dev-cont...@ntg.nl/message/T3OCKVZWTUTIXCSOKIFRVJ4X76MROZHE/attachment/3/byterange.diff
[sent by myself to the devel list]).


Can confirm.

Before patching, I checked with …
– Acrobat Reader: doesn’t recognize a signature
– Foxit Reader: "a signature is invalid"


2. I cannot get any signature display in Acrobat. Does any PDF viewer (I
have tested this with pdfsig from poppler and MuPDF-GL) display the
digital signature at all?


After patching, I checked with …
– Acrobat Reader: doesn’t recognize a signature
– Foxit Reader: "there’s something wrong with a signature" (i.e. 
different message)

– Apple Preview: doesn’t handle signatures at all
– PDF Studio Pro 2023: shows signature, "don’t know if valid, issuer 
unknown" etc.

– Master PDF Editor: can edit form fields, but doesn’t handle signatures
– Skim: doesn’t handle signatures

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: context / auctex problem?

2024-06-17 Thread Joaquín Ataz López
Thank you very much for sharing the configuration needed to compile with 
ConTeXt from Emacs. The standard AucTeX configuration does not allow to 
compile with the latest version of LMTX. And the information in AucTeX 
on how to change that is frankly deficient. To the point that I, who am 
an Emacs user for almost everything, when I write in ConTeXt I prefer to 
use Vim.


Maybe on the Wiki, someone who knows how to configure AucTeX to work 
with ConTeX, could share the information. And I also think it would be a 
good idea to include there the definition and key bindings that Seyal 
Zavira has shared.


El 17/6/24 a las 19:41, seyal zavira escribió:


In Emacs, I prefer use pure ConTeXt.
I have attached my Emacs init file. This setup is so satisfying.
You can compile your documents with just C-c c and view them with C-c v.
Also, you don't need to close the PDF after every compile (Evince will 
restart the contents after compilation).

In GNOME, you can simply switch between windows using Alt+Tab.
I hope this is helpful!

On Mon, Jun 17, 2024 at 1:36 PM Henning Hraban Ramm  
wrote:


Am 17.06.24 um 14:15 schrieb Jürgen Hanneder via ntg-context:
>
> Apologies for this question, which is probably an auctex
problem. I have
> a new install of everything
> (LinuX, emacs, texlive) and the latest (?) context (ConTeXt ver:
> 2024.05.27 18:16 LMTX)

Latest ist today’s, but that’s not the problem.

> installed in
> a separate directory.
>
> Running context from the commandline works fine, so I guess I
did not
> misspell the path,
> but when running "Context All" from emacs, the error is:
>
> -
> Running `ConTeXt' on `context-test' with ``context --once 
--nonstop
> context-test.tex''
> /bin/sh: Zeile 1: context: Kommando nicht gefunden.
>
> TeX Output exited abnormally with code 127 at Mon Jun 17 14:03:03
> --

Apparently, your Emacs doesn’t use the same PATH as your terminal.

The error message is from /bin/sh, I guess you usually run bash,
zsh or
the like, and that gets its PATH from .bashrc or something like that.

Check how Emacs calls that script, and if you can define a PATH.

Hraban

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

maillist : ntg-context@ntg.nl /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl

<https://urldefense.com/v3/__https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl__;!!D9dNQwwGXtA!VVy65bsBpjvgVTeW-XGw9skW3lEpoklqvIqB6SqX0RxZU_EnR0CGPTBCTO4AavTMjxoXr7RqaLIywNcD$>
webpage  : https://www.pragma-ade.nl

<https://urldefense.com/v3/__https://www.pragma-ade.nl__;!!D9dNQwwGXtA!VVy65bsBpjvgVTeW-XGw9skW3lEpoklqvIqB6SqX0RxZU_EnR0CGPTBCTO4AavTMjxoXr7RqaIICi8OX$>
/ https://context.aanhet.net

<https://urldefense.com/v3/__https://context.aanhet.net__;!!D9dNQwwGXtA!VVy65bsBpjvgVTeW-XGw9skW3lEpoklqvIqB6SqX0RxZU_EnR0CGPTBCTO4AavTMjxoXr7RqaD7Vsslq$>
(mirror)
archive  : https://github.com/contextgarden/context

<https://urldefense.com/v3/__https://github.com/contextgarden/context__;!!D9dNQwwGXtA!VVy65bsBpjvgVTeW-XGw9skW3lEpoklqvIqB6SqX0RxZU_EnR0CGPTBCTO4AavTMjxoXr7RqaBElf__0$>
wiki     : https://wiki.contextgarden.net

<https://urldefense.com/v3/__https://wiki.contextgarden.net__;!!D9dNQwwGXtA!VVy65bsBpjvgVTeW-XGw9skW3lEpoklqvIqB6SqX0RxZU_EnR0CGPTBCTO4AavTMjxoXr7RqaD0w4BJv$>

___


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

maillist :ntg-context@ntg.nl  /https://urldefense.com/v3/__https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl__;!!D9dNQwwGXtA!VVy65bsBpjvgVTeW-XGw9skW3lEpoklqvIqB6SqX0RxZU_EnR0CGPTBCTO4AavTMjxoXr7RqaLIywNcD$  
webpage  :https://urldefense.com/v3/__https://www.pragma-ade.nl__;!!D9dNQwwGXtA!VVy65bsBpjvgVTeW-XGw9skW3lEpoklqvIqB6SqX0RxZU_EnR0CGPTBCTO4AavTMjxoXr7RqaIICi8OX$   /https://urldefense.com/v3/__https://context.aanhet.net__;!!D9dNQwwGXtA!VVy65bsBpjvgVTeW-XGw9skW3lEpoklqvIqB6SqX0RxZU_EnR0CGPTBCTO4AavTMjxoXr7RqaD7Vsslq$   (mirror)
archive  :https://urldefense.com/v3/__https://github.com/contextgarden/context__;!!D9dNQwwGXtA!VVy65bsBpjvgVTeW-XGw9skW3lEpoklqvIqB6SqX0RxZU_EnR0CGPTBCTO4AavTMjxoXr7RqaBElf__0$  
wiki :https://urldefense.com/v3/__https://wiki.contextgarden.net__;!!D9dNQwwGXtA!VVy65bsBpjvgVTeW-XGw9skW3lEpoklqvIqB6SqX0RxZU_EnR0CGPTBCTO4AavTMjxoXr7RqaD0w4BJv$  
___


--
Joaquín Ataz López
Departamento de Derecho civil
Universidad de Mur

[NTG-context] digital signing in ConTeXt

2024-06-17 Thread Pablo Rodriguez via ntg-context
Dear list,

the latest version of LMTX can digitally sign PDF documents. It requires
OpenSSL installed (since it does the crypto part).

I have two issues that I would like to be tested by others.

A sample certificate may be found at
https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/message/ECSXLVMT3TMQBIHA2UZJPWJN7OVV5334/attachment/2/mycert.pfx
(I sent it myself).

Here is a sample document (actually provided by Hans):

  \setupinteraction[state=start]
  \definefield[signature][signed]
  \defineoverlay[signature][my signature]
  \starttext
\startTEXpage[offset=1ts,frame=on,framecolor=darkblue]
  sign: \inframed[background=signature,framecolor=darkred]
  {\fieldbody[signature][width=3cm,option=hidden]}
\stopTEXpage
  \stoptext

After compiling the sample, you need to run:

mtxrun --script pdf --sign --certificate=c.pfx --password=ABCabc doc.pdf

Password will be prompted again ("ABCabc"), since it is an encrypted
certificate (also for the public part).

Could anyone confirm the following issues?

1. The signature I get is wrong, unless I apply this patch
(https://mailman.ntg.nl/archives/list/dev-cont...@ntg.nl/message/T3OCKVZWTUTIXCSOKIFRVJ4X76MROZHE/attachment/3/byterange.diff
[sent by myself to the devel list]).

2. I cannot get any signature display in Acrobat. Does any PDF viewer (I
have tested this with pdfsig from poppler and MuPDF-GL) display the
digital signature at all?

Many thanks for your help,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: context / auctex problem?

2024-06-17 Thread seyal zavira
In Emacs, I prefer use pure ConTeXt.
I have attached my Emacs init file. This setup is so satisfying.
You can compile your documents with just C-c c and view them with C-c v.
Also, you don't need to close the PDF after every compile (Evince will
restart the contents after compilation).
In GNOME, you can simply switch between windows using Alt+Tab.
I hope this is helpful!

On Mon, Jun 17, 2024 at 1:36 PM Henning Hraban Ramm  wrote:

> Am 17.06.24 um 14:15 schrieb Jürgen Hanneder via ntg-context:
> >
> > Apologies for this question, which is probably an auctex problem. I have
> > a new install of everything
> > (LinuX, emacs, texlive) and the latest (?) context (ConTeXt ver:
> > 2024.05.27 18:16 LMTX)
>
> Latest ist today’s, but that’s not the problem.
>
> > installed in
> > a separate directory.
> >
> > Running context from the commandline works fine, so I guess I did not
> > misspell the path,
> > but when running "Context All" from emacs, the error is:
> >
> > -
> > Running `ConTeXt' on `context-test' with ``context --once  --nonstop
> > context-test.tex''
> > /bin/sh: Zeile 1: context: Kommando nicht gefunden.
> >
> > TeX Output exited abnormally with code 127 at Mon Jun 17 14:03:03
> > --
>
> Apparently, your Emacs doesn’t use the same PATH as your terminal.
>
> The error message is from /bin/sh, I guess you usually run bash, zsh or
> the like, and that gets its PATH from .bashrc or something like that.
>
> Check how Emacs calls that script, and if you can define a PATH.
>
> Hraban
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>


.emacs
Description: Binary data
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: context / auctex problem?

2024-06-17 Thread Henning Hraban Ramm

Am 17.06.24 um 14:15 schrieb Jürgen Hanneder via ntg-context:


Apologies for this question, which is probably an auctex problem. I have 
a new install of everything
(LinuX, emacs, texlive) and the latest (?) context (ConTeXt ver: 
2024.05.27 18:16 LMTX) 


Latest ist today’s, but that’s not the problem.


installed in
a separate directory.

Running context from the commandline works fine, so I guess I did not 
misspell the path,

but when running "Context All" from emacs, the error is:

-
Running `ConTeXt' on `context-test' with ``context --once  --nonstop 
context-test.tex''

/bin/sh: Zeile 1: context: Kommando nicht gefunden.

TeX Output exited abnormally with code 127 at Mon Jun 17 14:03:03
--


Apparently, your Emacs doesn’t use the same PATH as your terminal.

The error message is from /bin/sh, I guess you usually run bash, zsh or 
the like, and that gets its PATH from .bashrc or something like that.


Check how Emacs calls that script, and if you can define a PATH.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] context / auctex problem?

2024-06-17 Thread Jürgen Hanneder via ntg-context


Apologies for this question, which is probably an auctex problem. I  
have a new install of everything
(LinuX, emacs, texlive) and the latest (?) context (ConTeXt ver:  
2024.05.27 18:16 LMTX) installed in

a separate directory.

Running context from the commandline works fine, so I guess I did not  
misspell the path,

but when running "Context All" from emacs, the error is:

-
Running `ConTeXt' on `context-test' with ``context --once  --nonstop  
context-test.tex''

/bin/sh: Zeile 1: context: Kommando nicht gefunden.

TeX Output exited abnormally with code 127 at Mon Jun 17 14:03:03
--

I don't think the .emacs is at fault, it worked before the reinstall  
and contains, for instance:


   (setq-default TeX-master t)
   (setq TeX-parse-self t)
   (setq TeX-auto-save t)
 (setq ConTeXt-Mark-version "IV")



Any ideas welcome,
Jürgen





---

Prof. Dr. Juergen Hanneder
Philipps-Universitaet Marburg
FG Indologie u. Tibetologie
Deutschhausstr.12
35032 Marburg
Germany
Tel. 0049-6421-28-24930
hanne...@staff.uni-marburg.de

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: contextwiki what is going on?

2024-06-17 Thread Bruce Horrocks
The setting is controlled via Safari -> Preferences -> Websites -> Downloads

I'm not aware of any way to inadvertantly reset or change the setting for a 
site.


> On 16 Jun 2024, at 21:17, Hans van der Meer via ntg-context 
>  wrote:
> 
> Mysterious: loading once explicitely of the full URL 
> https://wiki.contextgarden.net/Main_Page remedied the bookmark. One of the 
> riddles of computing, I fear.
> 
> yours sincerely
> dr. Hans van der Meer
> 
> 
> 
>> On 16 Jun 2024, at 22:00, Hans van der Meer via ntg-context 
>>  wrote:
>> 
>> Today I find on my Mac the following alert when browsing 
>> wiki.contextgarden.net
>> 
>> Do you want to allow downloads on “wiki.contextgarden.net”?
>> 
>> instead of the home page.
>> 
>> Since I changed nothing in my system, no preferences changes, no system 
>> update, no security settings, this behaviour deviates from the previously 
>> prompt loading of the home page.
>> 
>> What is happening? Is the site hacked? Or was there a change on the server?
>> I do not want to allow downloads just to lookup something in the garden.
>> 
>> yours sincerely
>> dr. Hans van der Meer


—
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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Wiki's broken

2024-06-17 Thread Taco Hoekwater



> On 14 Jun 2024, at 23:43, Taco Hoekwater  wrote:
> 
> After the weekend, I will see whether we can somehow enlarge the server (more 
> memory/more cpu). For now, you will occasionally get this message, sorry. I 
> blame the USA elections with their associated rise of online town criers 
> flooding the email service that is on the same machine.

Update: the server load dropped quite dramatically after disabling a few 
crawling bots, in particular the badly-behaved ClaudeBot. The wiki and mailing 
lists are performing much better now. Jay!

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: contextwiki what is going on?

2024-06-16 Thread Hans van der Meer via ntg-context
Mysterious: loading once explicitely of the full URL 
https://wiki.contextgarden.net/Main_Page remedied the bookmark. One of the 
riddles of computing, I fear.

yours sincerely
dr. Hans van der Meer



> On 16 Jun 2024, at 22:00, Hans van der Meer via ntg-context 
>  wrote:
> 
> Today I find on my Mac the following alert when browsing 
> wiki.contextgarden.net <http://wiki.contextgarden.net/>
> 
>   Do you want to allow downloads on “wiki.contextgarden.net”?
> 
> instead of the home page.
> 
> Since I changed nothing in my system, no preferences changes, no system 
> update, no security settings, this behaviour deviates from the previously 
> prompt loading of the home page.
> 
> What is happening? Is the site hacked? Or was there a change on the server?
> I do not want to allow downloads just to lookup something in the garden.
> 
> yours sincerely
> dr. Hans van der Meer
> 
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Math manual

2024-06-16 Thread Wolfgang Schuster

skyhorse--- via ntg-context schrieb am 16.06.2024 um 18:59:

Mikael Sundqvist  wrote:

./tex/texmf-context/doc/context/documents/general/manuals/mathincontext-screen.pdf
./tex/texmf-context/doc/context/documents/general/manuals/mathincontext-paper.pdf



Sorry about my locational ignorance, but where can I view this document?

I only have  - math-mkiv.pdf
 - math-tweaks.pdf
 in my dir:
/opt/context-lmtx/tex/texmf-context/doc/context/documents/general/manuals


Can you please provide me with the URL to the directory?


You need at least version 2024.06.14 to get the manuals, if they are 
missing on your system the installed context version is tool old.


Another way to get the manuals is from the Pragma website:

- https://www.pragma-ade.com/general/manuals/mathincontext-paper.pdf
- https://www.pragma-ade.com/general/manuals/mathincontext-screen.pdf

Wolfgang

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Math manual

2024-06-16 Thread Jethro Djan
Hi,

On Sun, 16 Jun 2024 at 5:13 PM, skyhorse--- via ntg-context <
ntg-context@ntg.nl> wrote:

>
> Mikael Sundqvist  wrote:
> >
> >
> ./tex/texmf-context/doc/context/documents/general/manuals/mathincontext-screen.pdf
> >
> ./tex/texmf-context/doc/context/documents/general/manuals/mathincontext-paper.pdf
> >
>

> Sorry about my locational ignorance, but where can I view this document?
>

I think if you update to the latest using
sh install.sh
once you are in your ConTeXt directory, you should find it there where
Mikael says it is.

Jethro

>
> I only have  - math-mkiv.pdf
>  - math-tweaks.pdf
> in my dir:
> /opt/context-lmtx/tex/texmf-context/doc/context/documents/general/manuals
>
>
> Can you please provide me with the URL to the directory?
>
> Thank you
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Faulty PDF output files after updating to version 2024.06.14

2024-06-16 Thread Ralph

Hi,


while trying out the new version of ConTeXt LMTX (2024.06.14 09:18) I 
encountered some problems related to the PDF output files.


First, I tried to print a single page of the excellent new math manual 
(many thanks to everyone involved in creating it, it’s great for 
beginners like me and surely for experienced users too), but I noticed 
that all of the extensibles in the formulas (like the bar in \frac, 
\sqrt, long integral signs, and probably more) have disappeared. 
Everything else was printed correctly.


After investigating, I found out that Okular on Linux converts the PDF 
file to PostScript before printing (at least on my system), and I was 
able to replicate this behavior by converting it manually to PostScript 
with Poppler (pdftops in.pdf out.ps) or Ghostscript (pdf2ps in.pdf out.ps).


Printing from Firefox was not affected for me as it did not convert to 
PostScript.


I was unable to reproduce this with my own documents (created with 
ConTeXt LMTX 2024.05.31 18:50), so I decided to try this with the new 
version. And with it, that was indeed reproducible.


To ensure that this is the PDF’s fault, I decided to try this on Windows 
with Adobe Acrobat Reader on a different Computer with another fresh 
installation of ConTeXt. But it wasn’t any better:


Adobe Acrobat Reader displayed two different error messages when trying 
to scroll through or zoom in on the math manual:
1. “An error exists on this page. Acrobat may not display the page 
correctly. Please contact the person who created the PDF document to 
correct the problem.”

2. “There was an error processing a page. A number is out of range.”
Sometimes the first one is shown, sometimes the second one.

Additionally, some parts of the manual were blank (they were displayed 
correctly in Okular, Firefox, and many more viewers), I suspect those 
who contain extensibles in formulas. Following example leads to the same 
behaviour:


\setuppapersize[S33]    % Just to make page smaller
\setupbodyfont[modern, 11pt]
\starttext
Hello.
\startformula
\frac{a^2 + b^2}{1} = c^2
\stopformula
\page
Hello.
\startformula
a^2 + b^2 = c^2
\stopformula
\stoptext

The first page is empty in Acrobat Reader, whereas it’s displayed 
correctly in all other PDF viewers I tried. But again, when converting 
to PostScript, the fraction bar vanishes. The second page is fine.


I attached the faulty example.pdf file and some screenshots of it opened 
in different PDF viewers, and of the math manual. The screenshot of the 
math manual opened in Acrobat Reader shows that the second half of the 
page is completely gone. example_pdftops-ps2pdf.pdf is example.pdf 
converted to PostScript with Poppler and then converted to PDF again 
with Ghostscript (attaching the PostScript file isn’t possible because 
of file size). Opened in Okular or other Poppler based viewers you’ll 
see a dot instead of the fraction bar (which gets infinitely smaller 
while zooming-in), and openend in Firefox, MuPDF or Acrobat Reader 
you’ll see a cut off bar.


One last thing, for some reason “\italiansqrt” on page 52 of the math 
manual is converted perfectly fine to PostScript (at least it looks right).


Please let me know if you would like me to provide more information.


Best,
Ralph


example.pdf
Description: Adobe PDF document


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Pocket Diary Photo Calendar: how to specify on which day the week begins?

2024-06-16 Thread Bruce Horrocks


> On 15 Jun 2024, at 22:20, Michael Guravage  wrote:
> 
> Bruce,
> 
> Yes, I remember encountering this problem. The two files you need are: 
> sun-MP.tex and moons-MP.tex. I don't recall where I found them so I've 
> attached them below. Drop them into their respective pocketdiary directories 
> Solar and Moonphase and run mtxrun --generate. 
> 
> Your suggestion of the Day key was the first thing I tried myself. 
> Unfortunately, it has no effect.
> 
> Thanks for thinking along.

The month table layout is hard-coded in line 515 of file t-pocketdiary.lua

The code that decides in which cell to put the '1' of the first day is 
calculated elsewhere and not passed as a parameter.

That rules out a simple fix - you'd need to add a "weekstart" or similar 
parameter and track/act on it in various parts of the code.

—
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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Math manual

2024-06-16 Thread Hans Hagen

On 6/16/2024 12:39 PM, Fabrice Couvreur wrote:

Hi,
Thank you for this document which will help many people, including me. 
Quick question : this document seems to have been written in the Pagella 
font : is this correct ? Why this choice : Personal ? The most complete 
and nice font ?

Indeed.

Cambria is the reference of course but Pagella is free and we like it. 
We could have gone Lucida but it's not free either (but rather cheap and 
we fixed some in the process). Euler is also nice. We also had Bonum for 
a while (a bit bolder). Of course most fonts share alphabets. The Xits 
font is quite complete but kind of standard boring. We definitely will 
never for a can-of-worms sans for a document like this.


That said: all fonts needed tweaks, some more than others, because there 
is the inconsistent curious mix of font parameters, traditional and 
opentype properties etc to deal with, much of which we published about 
in e.g. TB in the process (as well as in documents in the 
distribuition). There ars also math companion fonts in the distribition 
that fix consistency issues in fonts (we consider most to be frozen).


Concerning complete: many unicode math characters are dubious and we 
wonder what they're used for, if at all while some other handy math 
symbols are missing.


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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Math manual

2024-06-16 Thread Fabrice Couvreur
Hi,
Thank you for this document which will help many people, including me.
Quick question : this document seems to have been written in the Pagella
font : is this correct ? Why this choice : Personal ? The most complete and
nice font ?
Fabrice

Le sam. 15 juin 2024 à 17:50, Jeong Dal via ntg-context 
a écrit :

> Dear Hans and Mikael,
>
> I appreciate for all the efforts to make a nicer math output and for the
> math manual.
> I hope that a few problems in math are gone away in this new version.
>
> The math writing in ConTeXt was getting better and better to this point.
> I’ll learn many things from this manual.
>
> Thanks again and have a nice weekend.
>
> Best regards,
>
> Dalyoung
>
>
>
> 2024. 6. 15. 오전 6:22, Otared Kavian  작성:
>
> Hi Hans and Mikael,
>
> I just could update to the latest ConTeXt (after afew hassles with xattr
> on MacOS…), and went straight to find mathincontext-screen.pdf.
> Thank you so much for this superbe manual! It is really wonderful in all
> aspects!
>
> As Aditya says, there is no excuse for mathematicians not to use ConTeXt
> (apart the usual laziness in many of my colleagues…).
>
> Best regards: Otared
>
> On 14 Jun 2024, at 09:46, Mikael Sundqvist  wrote:
>
> Hi!
>
> Hans just uploaded a new version. I am not writing about the news in
> that version (although there are some fun things!), but rather to
> announce that the math manual is finally included.
>
> We have been working on and off since 2021 on math and therefore also
> on this document, and we finally believe that both math and the
> document are now in a state that should be sufficiently useful and not
> too confusing. You can find a screen and a paper version:
>
>
> ./tex/texmf-context/doc/context/documents/general/manuals/mathincontext-screen.pdf
>
> ./tex/texmf-context/doc/context/documents/general/manuals/mathincontext-paper.pdf
>
> The versions are generated from the same tex files, so the content
> (except for some chapter pages only available in the screen version)
> should be the same.
>
> We hope that this will be useful for all of you who use math in your
> documents. If you have any questions, find any errors, or miss
> something, please let us know. We consider the document not to be
> finished, so there will be updates. Also, we will also at some point
> include the tex files, but that will have to wait a bit.
>
> /Hans and Mikael
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
>
> Otared Kavian
> e-mail: ota...@gmail.com 
> Phone: +33 6 88 26 70 95
>
>
>
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: x mark symbol and general symbol guide

2024-06-15 Thread Gerion Entrup
Am Samstag, 15. Juni 2024, 12:19:37 MESZ schrieb Hans Hagen:
> On 6/15/2024 11:02 AM, Gerion Entrup wrote:
> > Am Freitag, 13. Oktober 2023, 14:33:24 MESZ schrieb Gerion Entrup:
> >> Hi,
> >>
> >> I recently tried to typeset a table with checkmarks and x marks.
> >> \checkmark exists but is there a predefined x mark symbol (\xmark does
> >> not work)?
> >>
> >> In general: For LaTeX there exists the very helpful comprehensive LaTeX 
> >> symbol list [1].
> >> Is there a similar documentation for ConTeXt somewhere?
> >>
> >> Best,
> >> Gerion
> >>
> >> [1] https://www.ctan.org/pkg/comprehensive
> >>
> > 
> > Just as an info. I'm using Noto symbols now:
> > ```
> > \definefont[symbolFont][name:notosanssymbols2regular*default at 11pt]
> > \define{\yes}{{\symbolFont\utfchar{0x1f5f8}}}
> > \define{\no}{{\symbolFont\utfchar{0x1f5f4}}}
> > 
> > \starttext
> > \yes and \no.
> > \stoptext
> fwiw: 1F5F8 looks pretty bad (in otf) (i checked as i though it was a 
> bug in lmtx)

Hmm, you are right, like a little frayed. 02713 and 02714 are similar.
I guess, this should look like they were drawn with a brush.

Gerion



signature.asc
Description: This is a digitally signed message part.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Pocket Diary Photo Calendar: how to specify on which day the week begins?

2024-06-15 Thread Michael Guravage
Bruce,

Yes, I remember encountering this problem. The two files you need are:
sun-MP.tex and moons-MP.tex. I don't recall where I found them so I've
attached them below. Drop them into their respective pocketdiary
directories Solar and Moonphase and run mtxrun --generate.

Your suggestion of the Day key was the first thing I tried myself.
Unfortunately, it has no effect.

Thanks for thinking along.

With kind regards,

Michael



On Sat, Jun 15, 2024 at 10:51 PM Bruce Horrocks  wrote:

>
>
> > On 15 Jun 2024, at 17:55, Michael Guravage <
> gurav...@literatesolutions.com> wrote:
> >
> > Hi,
> >
> > I am trying to use the Pocket Diary module to create a photo calendar as
> described in the Calendar Examples. The examples work fine. By default
> weeks begin on Monday. Does anyone know how to specify that weeks begin on
> Sunday? I have searched through all the setvariable assignments, but
> nothing seems applicable.
> >
> > I have attached an example file so you needn't retrieve all the
> examples. Any help would be appreciated.
>
> Your example didn't work for me - I didn't have PocketDiary installed and
> then after installing it I got an error about Moons.tex. Life's too short
> to faff trying to fix it so this suggestion is untested.
>
> The variables setting allows a Day= value so try experimenting with
>
> \setvariables
>   [PocketDiary]
>   [Year=2025,
>Day=7]
>
> as the default value is 1 which I assume is Monday.
>
> —
> 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 /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
% Metafun
% filename: moons.tex
% Boede 2021

% \setupbodyfont[plex,ss,14pt]

\defineMPinstance
	[Moon]
	[metafun]
  []
	
\startMPinclusions[]{Moon}
	numeric w,h;
	path p[];
	pair ip[];
	
	w = OverlayWidth;
	h = OverlayHeight;
	
	p[1] := fullcircle scaled h;
	p[2] := p[1] shifted (0.2 w,0);
	
	ip[1] := p[1] intersectionpoint p[2];
	ip[2] := reverse p[1] intersectionpoint p[2];

	p[3] := p[1] cutbefore ip[1] cutafter ip[2];	
	p[4] := p[2] cutbefore ip[1] cutafter ip[2];
	
  drawoptions (withpen pencircle scaled 2pt);
	
\stopMPinclusions

\startuniqueMPgraphic{Moon::Waning_moon}
  draw  p[3] ;
	draw  p[4] ;
\stopuniqueMPgraphic

\startuniqueMPgraphic{Moon::Growing_moon}
  draw  p[3] ;
	draw  p[4] ;
	currentpicture := (currentpicture reflectedabout (ip[1],ip[2]));
\stopuniqueMPgraphic

\startuniqueMPgraphic{Moon::Fullmoon}
	draw p[1];
\stopuniqueMPgraphic

\startuniqueMPgraphic{Moon::Newmoon}
	fill p[1] withcolor 0.625 white;
	draw p[1];
\stopuniqueMPgraphic


\defineoverlay[waningmoon][\useMPgraphic{Moon::Waning_moon}]
\defineoverlay[growingmoon][\useMPgraphic{Moon::Growing_moon}]
\defineoverlay[newmoon][\useMPgraphic{Moon::Newmoon}]
\defineoverlay[fullmoon][\useMPgraphic{Moon::Fullmoon}]

\defineframed
	[Moon]
	[height=\bodyfontsize,
	 width=\bodyfontsize,
 	 frame=off]


% \starttext
% Results with \type{framed}
%
% \blank
%
%  Heute ist abnehmender Mond	{\Moon[background=waningmoon]{\strut}}
%
%  Heute ist Vollmond \Moon[background=fullmoon]{}
%
%  Heute haben wir Neumond \Moon[background=newmoon]{}
%
%  Und heute haben wir zunehmenden Mond \Moon[background=growingmoon]{}
%
% \stoptext% Metafun
% filename: moons.tex
% Boede 2021

% \setupbodyfont[plex,ss,14pt]

\defineMPinstance
	[Sun]
	[metafun]
  []
	
\startMPinclusions[]{Sun}
	numeric w,h;
	path p[];
	pair ip[];
	
	w = OverlayWidth;
	h = OverlayHeight;
	
	p[1]  := fullcircle scaled h;
	p[100] := tcircle scaled 0.5h; %h
	p[2] := tcircle scaled 0.6h;  %1.2h;
	p[3] := tcircle scaled 0.75h; %1.6h;
	p[4] := tcircle scaled h; %2h;
	p[5] := (0,0)--point 1 of p[4] ;
	p[6] := p[5] cutbefore point .3 of p[5];
	p[7] := p[6] rotatedaround (center p[1],18);
	 
  ip[1] :=  p[2] intersectionpoint p[7];
  ip[2] :=  p[3] intersectionpoint p[7];
	
  p[10] := ip[1]--ip[2];

	ip[3] :=  ip[1];
	ip[4] :=  point 1 of p[7];

	p[11] := ip[3]--ip[4];
	
  drawoptions (withpen pencircle scaled 0.25pt withcolor red);
	
\stopMPinclusions

\startreusableMPgraphic{Sun::Sunrise}
  drawoptions (withpen pencircle scaled 0.25pt withcolor red);
  draw p[100];
	for i = 36 step 36 until 154  :
	  draw p[10] rotatedaround (center p[1],i-18);
	endfor;
	for i = 18 step 36 until 180  :
	  draw p[11] rotatedaround (center p[1],i-18);
 endfor;
 drawarrow ((0,0)--(0,h)) shifted (0,-0.05h);
\stopreusableMPgraphic

[NTG-context] Re: Pocket Diary Photo Calendar: how to specify on which day the week begins?

2024-06-15 Thread Bruce Horrocks


> On 15 Jun 2024, at 17:55, Michael Guravage  
> wrote:
> 
> Hi,
> 
> I am trying to use the Pocket Diary module to create a photo calendar as 
> described in the Calendar Examples. The examples work fine. By default weeks 
> begin on Monday. Does anyone know how to specify that weeks begin on Sunday? 
> I have searched through all the setvariable assignments, but nothing seems 
> applicable. 
> 
> I have attached an example file so you needn't retrieve all the examples. Any 
> help would be appreciated.

Your example didn't work for me - I didn't have PocketDiary installed and then 
after installing it I got an error about Moons.tex. Life's too short to faff 
trying to fix it so this suggestion is untested.

The variables setting allows a Day= value so try experimenting with

\setvariables
  [PocketDiary]
  [Year=2025,
   Day=7]

as the default value is 1 which I assume is Monday.

—
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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Math manual

2024-06-15 Thread Jeong Dal via ntg-context
Dear Hans and Mikael,

I appreciate for all the efforts to make a nicer math output and for the math 
manual.
I hope that a few problems in math are gone away in this new version.

The math writing in ConTeXt was getting better and better to this point.
I’ll learn many things from this manual.

Thanks again and have a nice weekend.

Best regards,

Dalyoung



> 2024. 6. 15. 오전 6:22, Otared Kavian  작성:
> 
> Hi Hans and Mikael,
> 
> I just could update to the latest ConTeXt (after afew hassles with xattr on 
> MacOS…), and went straight to find mathincontext-screen.pdf.
> Thank you so much for this superbe manual! It is really wonderful in all 
> aspects!
> 
> As Aditya says, there is no excuse for mathematicians not to use ConTeXt 
> (apart the usual laziness in many of my colleagues…).
> 
> Best regards: Otared
> 
>> On 14 Jun 2024, at 09:46, Mikael Sundqvist > <mailto:mic...@gmail.com>> wrote:
>> 
>> Hi!
>> 
>> Hans just uploaded a new version. I am not writing about the news in
>> that version (although there are some fun things!), but rather to
>> announce that the math manual is finally included.
>> 
>> We have been working on and off since 2021 on math and therefore also
>> on this document, and we finally believe that both math and the
>> document are now in a state that should be sufficiently useful and not
>> too confusing. You can find a screen and a paper version:
>> 
>> ./tex/texmf-context/doc/context/documents/general/manuals/mathincontext-screen.pdf
>> ./tex/texmf-context/doc/context/documents/general/manuals/mathincontext-paper.pdf
>> 
>> The versions are generated from the same tex files, so the content
>> (except for some chapter pages only available in the screen version)
>> should be the same.
>> 
>> We hope that this will be useful for all of you who use math in your
>> documents. If you have any questions, find any errors, or miss
>> something, please let us know. We consider the document not to be
>> finished, so there will be updates. Also, we will also at some point
>> include the tex files, but that will have to wait a bit.
>> 
>> /Hans and Mikael
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
>> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl 
>> <https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl>
>> webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> / 
>> https://context.aanhet.net <https://context.aanhet.net/> (mirror)
>> archive  : https://github.com/contextgarden/context 
>> <https://github.com/contextgarden/context>
>> wiki : https://wiki.contextgarden.net <https://wiki.contextgarden.net/>
>> ___
> 
> Otared Kavian
> e-mail: ota...@gmail.com <mailto:ota...@gmail.com>
> Phone: +33 6 88 26 70 95
> 
> 
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Math manual

2024-06-15 Thread Jethro Djan
Hi Hans and Mikael,

The manual is great. Solves most of my challenges. Very handy as I am also
writing a math thesis in it. Off topic but does anyone have a source for a
RECENT math presentation they wrote using ConTeXt they can share?  Would be
very helpful.

Thanks for your hard work.

Jethro

On Fri, 14 Jun 2024 at 9:23 PM, Otared Kavian  wrote:

> Hi Hans and Mikael,
>
> I just could update to the latest ConTeXt (after afew hassles with xattr
> on MacOS…), and went straight to find mathincontext-screen.pdf.
> Thank you so much for this superbe manual! It is really wonderful in all
> aspects!
>
> As Aditya says, there is no excuse for mathematicians not to use ConTeXt
> (apart the usual laziness in many of my colleagues…).
>
> Best regards: Otared
>
>
> On 14 Jun 2024, at 09:46, Mikael Sundqvist  wrote:
>
> Hi!
>
> Hans just uploaded a new version. I am not writing about the news in
> that version (although there are some fun things!), but rather to
> announce that the math manual is finally included.
>
> We have been working on and off since 2021 on math and therefore also
> on this document, and we finally believe that both math and the
> document are now in a state that should be sufficiently useful and not
> too confusing. You can find a screen and a paper version:
>
>
> ./tex/texmf-context/doc/context/documents/general/manuals/mathincontext-screen.pdf
>
> ./tex/texmf-context/doc/context/documents/general/manuals/mathincontext-paper.pdf
>
> The versions are generated from the same tex files, so the content
> (except for some chapter pages only available in the screen version)
> should be the same.
>
> We hope that this will be useful for all of you who use math in your
> documents. If you have any questions, find any errors, or miss
> something, please let us know. We consider the document not to be
> finished, so there will be updates. Also, we will also at some point
> include the tex files, but that will have to wait a bit.
>
> /Hans and Mikael
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
>
> Otared Kavian
> e-mail: ota...@gmail.com 
> Phone: +33 6 88 26 70 95
>
>
>
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: x mark symbol and general symbol guide

2024-06-15 Thread Hans Hagen

On 6/15/2024 11:02 AM, Gerion Entrup wrote:

Am Freitag, 13. Oktober 2023, 14:33:24 MESZ schrieb Gerion Entrup:

Hi,

I recently tried to typeset a table with checkmarks and x marks.
\checkmark exists but is there a predefined x mark symbol (\xmark does
not work)?

In general: For LaTeX there exists the very helpful comprehensive LaTeX symbol 
list [1].
Is there a similar documentation for ConTeXt somewhere?

Best,
Gerion

[1] https://www.ctan.org/pkg/comprehensive



Just as an info. I'm using Noto symbols now:
```
\definefont[symbolFont][name:notosanssymbols2regular*default at 11pt]
\define{\yes}{{\symbolFont\utfchar{0x1f5f8}}}
\define{\no}{{\symbolFont\utfchar{0x1f5f4}}}

\starttext
\yes and \no.
\stoptext
fwiw: 1F5F8 looks pretty bad (in otf) (i checked as i though it was a 
bug in lmtx)


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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: How to improve appearance of bars in frac, sqrt, etc. on screens?

2024-06-15 Thread Hans Hagen via ntg-context

On 6/15/2024 10:59 AM, ralph.2...@email-postfach.info wrote:

Hi,

thank you all for your replies so far. I guess I’ll have to live with that for 
now (of course this isn’t really a problem, but a bit unpleasant to look at 
when you’re used to the straight lines in LaTeX). Just wanted to add that I can 
see this artifacts quite clearly on a 13 inch 1080p screen in the PDF viewer 
(depends on zoom level, on some zoom levels I see nothing) and not only when 
enlarging a screenshot. After all, it’s visible in my attached screenshots even 
if displayed in their original resolution. (Naming of my screenshots wasn’t 
very clear, zoomed.png is zoomed-in in the pdf viewer, not a zoomed-in 
screenshot.)
The "left radical + rule" isn't perfect either, because it depends on 
overlap. Depending on the font you can see issues at the connection 
(actually these might be obscured by aliasing at low res). You can try 
that outside lmtx with different fonts.


Also, because rules are often rendered differently from glyphs (and 
rules can use either a line or rectangle fill) it's always been an issue 
(which is also why engines have some heuristics for choosing one or the 
other method).


And, as mentioned, vertical extenders also use the same etechnology as 
we now use for radicals, it's just that there was never a concept like 
that in engines for radicals. Arrows sit in the same category and also 
use the same glyphs so there one can observe the same. Actually, even in 
traditional tex arrows are made from minusus and an arrowhead 
overlapping piecewise.


Maybe viewers will catch up.

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: x mark symbol and general symbol guide

2024-06-15 Thread Gerion Entrup
Am Freitag, 13. Oktober 2023, 14:33:24 MESZ schrieb Gerion Entrup:
> Hi,
> 
> I recently tried to typeset a table with checkmarks and x marks.
> \checkmark exists but is there a predefined x mark symbol (\xmark does
> not work)?
> 
> In general: For LaTeX there exists the very helpful comprehensive LaTeX 
> symbol list [1].
> Is there a similar documentation for ConTeXt somewhere?
> 
> Best,
> Gerion
> 
> [1] https://www.ctan.org/pkg/comprehensive
> 

Just as an info. I'm using Noto symbols now:
```
\definefont[symbolFont][name:notosanssymbols2regular*default at 11pt]
\define{\yes}{{\symbolFont\utfchar{0x1f5f8}}}
\define{\no}{{\symbolFont\utfchar{0x1f5f4}}}

\starttext
\yes and \no.
\stoptext
```


signature.asc
Description: This is a digitally signed message part.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: How to improve appearance of bars in frac, sqrt, etc. on screens?

2024-06-15 Thread ralph . 2718
Hi,

thank you all for your replies so far. I guess I’ll have to live with that for 
now (of course this isn’t really a problem, but a bit unpleasant to look at 
when you’re used to the straight lines in LaTeX). Just wanted to add that I can 
see this artifacts quite clearly on a 13 inch 1080p screen in the PDF viewer 
(depends on zoom level, on some zoom levels I see nothing) and not only when 
enlarging a screenshot. After all, it’s visible in my attached screenshots even 
if displayed in their original resolution. (Naming of my screenshots wasn’t 
very clear, zoomed.png is zoomed-in in the pdf viewer, not a zoomed-in 
screenshot.)

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Wiki's broken

2024-06-14 Thread Taco Hoekwater
Hi,

> On 14 Jun 2024, at 20:03, Andres Conrado Montoya  
> wrote:
> 
> Visiting the Wiki currently renders this error when you try to search 
> anything: 
> 
> Internal error

I did this, and on purpose. It also shows ’Sorry, the server is too busy right 
now’ along the top of the page. 

This is a quick hack I did that prevents the wiki from destroying the whole 
machine when it gets too busy. If it is very busy already, asking the wiki for 
search results tends to escalate the problem quickly into the machine dropping 
services left and right.

After the weekend, I will see whether we can somehow enlarge the server (more 
memory/more cpu). For now, you will occasionally get this message, sorry. I 
blame the USA elections with their associated rise of online town criers 
flooding the email service that is on the same machine.

Somewhat sorry,

Taco
(server maintenance)

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


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Math manual

2024-06-14 Thread Otared Kavian
Hi Hans and Mikael,

I just could update to the latest ConTeXt (after afew hassles with xattr on 
MacOS…), and went straight to find mathincontext-screen.pdf.
Thank you so much for this superbe manual! It is really wonderful in all 
aspects!

As Aditya says, there is no excuse for mathematicians not to use ConTeXt (apart 
the usual laziness in many of my colleagues…).

Best regards: Otared

> On 14 Jun 2024, at 09:46, Mikael Sundqvist  wrote:
> 
> Hi!
> 
> Hans just uploaded a new version. I am not writing about the news in
> that version (although there are some fun things!), but rather to
> announce that the math manual is finally included.
> 
> We have been working on and off since 2021 on math and therefore also
> on this document, and we finally believe that both math and the
> document are now in a state that should be sufficiently useful and not
> too confusing. You can find a screen and a paper version:
> 
> ./tex/texmf-context/doc/context/documents/general/manuals/mathincontext-screen.pdf
> ./tex/texmf-context/doc/context/documents/general/manuals/mathincontext-paper.pdf
> 
> The versions are generated from the same tex files, so the content
> (except for some chapter pages only available in the screen version)
> should be the same.
> 
> We hope that this will be useful for all of you who use math in your
> documents. If you have any questions, find any errors, or miss
> something, please let us know. We consider the document not to be
> finished, so there will be updates. Also, we will also at some point
> include the tex files, but that will have to wait a bit.
> 
> /Hans and Mikael
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___

Otared Kavian
e-mail: ota...@gmail.com
Phone: +33 6 88 26 70 95




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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Wiki's broken

2024-06-14 Thread Andres Conrado Montoya
Visiting the Wiki currently renders this error when you try to search
anything:

Internal error

[59a41338e5823259c54868ec]
/index.php?search=setuplist&title=Special%3ASearch&go=Go Error from line
121 of /var/www/
contextgarden.net/wiki/htdocs/extensions/ConTeXtXML/includes/ConTeXtXMLContent.php:
Class "MediaWiki\Extension\ConTeXtXML\ParserOutput" not found

Backtrace:

#0 /var/www/
contextgarden.net/wiki/htdocs/extensions/ConTeXtXML/includes/ConTeXtXMLContent.php(649):
MediaWiki\Extension\ConTeXtXML\ConTeXtXMLContent->getWikitextEquivalent()
#1 /var/www/
contextgarden.net/wiki/htdocs/includes/search/RevisionSearchResultTrait.php(93):
MediaWiki\Extension\ConTeXtXML\ConTeXtXMLContent->getTextForSearchIndex()
#2 /var/www/
contextgarden.net/wiki/htdocs/includes/search/SqlSearchResult.php(52):
RevisionSearchResult->initText()
#3 /var/www/
contextgarden.net/wiki/htdocs/includes/widget/search/FullSearchResultWidget.php(65):
SqlSearchResult->getTextSnippet()
#4 /var/www/
contextgarden.net/wiki/htdocs/includes/widget/search/BasicSearchResultSetWidget.php(122):
MediaWiki\Widget\Search\FullSearchResultWidget->render()
#5 /var/www/
contextgarden.net/wiki/htdocs/includes/widget/search/BasicSearchResultSetWidget.php(62):
MediaWiki\Widget\Search\BasicSearchResultSetWidget->renderResultSet()
#6 /var/www/
contextgarden.net/wiki/htdocs/includes/specials/SpecialSearch.php(462):
MediaWiki\Widget\Search\BasicSearchResultSetWidget->render()
#7 /var/www/
contextgarden.net/wiki/htdocs/includes/specials/SpecialSearch.php(179):
SpecialSearch->showResults()
#8 /var/www/
contextgarden.net/wiki/htdocs/includes/specialpage/SpecialPage.php(575):
SpecialSearch->execute()
#9 /var/www/
contextgarden.net/wiki/htdocs/includes/specialpage/SpecialPageFactory.php(611):
SpecialPage->run()
#10 /var/www/contextgarden.net/wiki/htdocs/includes/MediaWiki.php(296):
MediaWiki\Special\SpecialPageFactory->executePath()
#11 /var/www/contextgarden.net/wiki/htdocs/includes/MediaWiki.php(900):
MediaWiki->performRequest()
#12 /var/www/contextgarden.net/wiki/htdocs/includes/MediaWiki.php(527):
MediaWiki->main()
#13 /var/www/contextgarden.net/wiki/htdocs/index.php(44): MediaWiki->run()
#14 {main}

-- 
Andrés Conrado Montoya
Andi Kú
andresconr...@gmail.com
http://sesentaycuatro.com
http://messier87.com
http://chiquitico.org

Los fines no justifican los medios, porque la medida verdadera de nuestro
carácter está dada por los medios que estamos dispuestos a utilizar, no por
los fines que proclamamos.


“You develop an instant global consciousness, a people orientation, an
intense dissatisfaction with the state of the world, and a compulsion to do
something about it. From out there on the moon, international politics look
so petty. You want to grab a politician by the scruff of the neck and drag
him a quarter of a million miles out and say, ‘Look at that, you son of a
bitch.’” — Apollo 14 astronaut Edgar Mitchell
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: How to improve appearance of bars in frac, sqrt, etc. on screens?

2024-06-14 Thread Taco Hoekwater


> On 14 Jun 2024, at 11:44, Hans Hagen via ntg-context  
> wrote:
> 
> On 6/14/2024 9:35 AM, Henning Hraban Ramm wrote:
>> Am 13.06.24 um 23:13 schrieb Hans Hagen via ntg-context:
>>> On 6/13/2024 10:04 PM, Otared Kavian wrote:
>>>> Hi Ralph,
>>>> 
>>>> I don’t see any pixels in the PDF file when I typeset your code snipet (on 
>>>> MacOS 11.7.10). Here is what I get.
>>> No problems on windows on chrome-os either. Mikael S and I checked it on 
>>> his linux box and one can indeed see anti aliasing when taking a screen 
>>> dump (depends on resolution).
>>> 
>>> So it's a linux rendering issue when taking dumps.
>> Not only. It also happens with all(?) PDF viewers on MacOS – at least 10.14 
>> and 10.15, can anyone confirm with current versions?

Artifacts like mentioned were visible in Preview on my Mac (14.5) as well.

The PDF view in chrome on this Mac shows a slightly different artifact effect, 
see image below.

Neither bothers me, though. 

Best wishes,
Taco



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


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Math manual

2024-06-14 Thread Alex
Excellent! Thanks for the great effort.

BR,

Alex
Le 14 juin 2024 à 12:04 +0200, Mikael Sundqvist , a écrit :
> Hi!
>
> Hans just uploaded a new version. I am not writing about the news in
> that version (although there are some fun things!), but rather to
> announce that the math manual is finally included.
>
> We have been working on and off since 2021 on math and therefore also
> on this document, and we finally believe that both math and the
> document are now in a state that should be sufficiently useful and not
> too confusing. You can find a screen and a paper version:
>
> ./tex/texmf-context/doc/context/documents/general/manuals/mathincontext-screen.pdf
> ./tex/texmf-context/doc/context/documents/general/manuals/mathincontext-paper.pdf
>
> The versions are generated from the same tex files, so the content
> (except for some chapter pages only available in the screen version)
> should be the same.
>
> We hope that this will be useful for all of you who use math in your
> documents. If you have any questions, find any errors, or miss
> something, please let us know. We consider the document not to be
> finished, so there will be updates. Also, we will also at some point
> include the tex files, but that will have to wait a bit.
>
> /Hans and Mikael
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: How to improve appearance of bars in frac, sqrt, etc. on screens?

2024-06-14 Thread Hans Hagen via ntg-context

On 6/14/2024 9:35 AM, Henning Hraban Ramm wrote:

Am 13.06.24 um 23:13 schrieb Hans Hagen via ntg-context:

On 6/13/2024 10:04 PM, Otared Kavian wrote:

Hi Ralph,

I don’t see any pixels in the PDF file when I typeset your code 
snipet (on MacOS 11.7.10). Here is what I get.
No problems on windows on chrome-os either. Mikael S and I checked it 
on his linux box and one can indeed see anti aliasing when taking a 
screen dump (depends on resolution).


So it's a linux rendering issue when taking dumps. 


Not only. It also happens with all(?) PDF viewers on MacOS – at least 
10.14 and 10.15, can anyone confirm with current versions?


So it’s dependend on the screen rendering, anti aliasing settings (that 
you usually can’t influence).


hm, so i have to stick to windows for viewing (and an ancient hardware 
laptop in order to avoid copilot and recall) but i'll check ubuntu anyway


It doesn’t affect printing – or does it for anyone? I can imagine 
printing from Firefox, i.e. pdf.js, is affected, since it prints only in 
screen resolution.
it's not related to math then, as there are also ligatures built this 
way, although often they often are less sensitive to thsi due to 
generous overlaps (unless they use a sequence of connecting strokes in 
the same direction)


also keep in mind that looking at a blown up character is not that 
realistic (for instance a traditional bitmap font might look great at 
600 or 1200 dpi at intended size so zooming in showing raggedness is not 
the normal way to see it)


btw, if one wants to observe inaccuracy, just zoom in in graphics made 
by drawing programs (even of famous companies)


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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Math manual

2024-06-14 Thread Mikael Sundqvist
Hi!

Hans just uploaded a new version. I am not writing about the news in
that version (although there are some fun things!), but rather to
announce that the math manual is finally included.

We have been working on and off since 2021 on math and therefore also
on this document, and we finally believe that both math and the
document are now in a state that should be sufficiently useful and not
too confusing. You can find a screen and a paper version:

./tex/texmf-context/doc/context/documents/general/manuals/mathincontext-screen.pdf
./tex/texmf-context/doc/context/documents/general/manuals/mathincontext-paper.pdf

The versions are generated from the same tex files, so the content
(except for some chapter pages only available in the screen version)
should be the same.

We hope that this will be useful for all of you who use math in your
documents. If you have any questions, find any errors, or miss
something, please let us know. We consider the document not to be
finished, so there will be updates. Also, we will also at some point
include the tex files, but that will have to wait a bit.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: How to improve appearance of bars in frac, sqrt, etc. on screens?

2024-06-14 Thread Henning Hraban Ramm

Am 13.06.24 um 23:13 schrieb Hans Hagen via ntg-context:

On 6/13/2024 10:04 PM, Otared Kavian wrote:

Hi Ralph,

I don’t see any pixels in the PDF file when I typeset your code snipet 
(on MacOS 11.7.10). Here is what I get.
No problems on windows on chrome-os either. Mikael S and I checked it on 
his linux box and one can indeed see anti aliasing when taking a screen 
dump (depends on resolution).


So it's a linux rendering issue when taking dumps. 


Not only. It also happens with all(?) PDF viewers on MacOS – at least 
10.14 and 10.15, can anyone confirm with current versions?


So it’s dependend on the screen rendering, anti aliasing settings (that 
you usually can’t influence).


It doesn’t affect printing – or does it for anyone? I can imagine 
printing from Firefox, i.e. pdf.js, is affected, since it prints only in 
screen resolution.


Hraban

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: How to improve appearance of bars in frac, sqrt, etc. on screens?

2024-06-13 Thread Bruce Horrocks


> On 13 Jun 2024, at 21:04, Otared Kavian  wrote:
> 
> Hi Ralph,
> 
> I don’t see any pixels in the PDF file when I typeset your code snipet (on 
> MacOS 11.7.10). Here is what I get.
> 
> Best regards: Otared
> 
> 

I see it on both - the original and Otared's.

Otared: If open yours (on MacOS 14.5) by double-clicking the image in the email 
and clicking zoom+ twice then the 'wobble' in the line is visible if you 
squint. 

Bound to be monitor and resolution dependent as well though - not sure how to 
provide settings that would be repeatable by others. Just go up and down zoom 
sizes looking carefully.

—
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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: How to improve appearance of bars in frac, sqrt, etc. on screens?

2024-06-13 Thread Otared Kavian
Hi Ralph,I don’t see any pixels in the PDF file when I typeset your code snipet (on MacOS 11.7.10). Here is what I get.Best regards: Otared

fraction-bar-pixels.pdf
Description: Adobe PDF document
On 13 Jun 2024, at 13:10, Ralph <ralph.2...@email-postfach.info> wrote:

  


  
  Hello,


I’m relatively new to ConTeXt (version 2024.05.31, LMTX,
standalone) and really enjoy learning it so far, but I have one
little problem with the appearance of horizontal bars in math
mode.

It seems the way ConTeXt displayed horizontal extensible bars in
math mode some time ago (as used in \frac, \sqrt, \overbar, ...)
was similar to the way LaTeX (PDFLaTeX and LuaLaTeX) and Plain
TeX handled this, but it has changed since then. Instead of one
bar there are now multiple characters attached to each other.

This makes it look more consistent with the font, but
unfortunately it doesn’t display well in any PDF viewer I’ve
tried (on Linux, so I’ve not tried Adobe Acrobat Reader). The
bars look dotted, I guess it’s due to anti-aliasing (the dots
disappear when anti-aliasing is disabled, but then of course
everything looks pixelated). Two screenshots are attached
(different zoom levels in PDF viewer) so that you know what I’m
talking about.

Source:
\setuppapersize[S3]
\starttext
\startformula \sqrt{a^2 + b^2} = \frac{1000 \cdot c}{1000}
\stopformula
\stoptext

Is there a way to switch to the old bars for documents viewed
mainly on screens, or is there any other way to improve their
appearance? I couldn’t find any documentation on this, so I
would be very thankful if somebody here could help out.


Best,
Ralph

  

___If your question is of interest to others as well, please add an entry to the Wiki!maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nlwebpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)archive  : https://github.com/contextgarden/contextwiki : https://wiki.contextgarden.net___
Otared Kaviane-mail: ota...@gmail.comPhone: +33 6 88 26 70 95

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Prefix the text in an enumeration.

2024-06-13 Thread Wolfgang Schuster

Gerion Entrup schrieb am 13.06.2024 um 13:41:

Hi,

is there a way to automatically prefix the text body in an enumeration?

Consider this example:
```
\defineenumeration[question][
alternative=top,
text=Question,
title=yes,
titleleft=,
titleright=,
right={:},
headstyle=bold,
]

\starttext

Some text:

\startquestion[title={How long does a loop last?}]
\bold{Answer:} For a while.
\stopquestion

\stoptext
```

I'd like to have the `\bold{Answer:}` automatically. So for example something 
like this:
```
\defineenumeration[question][
alternative=top,
text=Question,
title=yes,
titleleft=,
titleright=,
right={:},
headstyle=bold,
prefix={\bold{Answer:}},
]

\starttext

Some text:

\startquestion[title={How long does a loop last?}]
For a while.
\stopquestion

\stoptext
```

I tried to misuse `inbetween` for that but `alternative=top` seems to make a 
(not modifiable space) between the heading and the text body.


Use the \setupparagraphintro command to set the text which should appear 
at the start of the question.


 begin example
\startsetups[question:intro]
  \setupparagraphintro[first][\bold{Answer:} ]
  \blank
\stopsetups

\defineenumeration[question][
alternative=top,
text=Question,
title=yes,
titleleft=,
titleright=,
right={:},
headstyle=bold,
  inbetween=\setup{question:intro},
]

\starttext

Some text:

\startquestion[title={How long does a loop last?}]
For a while.
\stopquestion

\stoptext
 end example

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: comment on the wiki

2024-06-12 Thread Pablo Rodriguez via ntg-context
On 6/13/24 04:17, Max Chernoff wrote:
> Hi Pablo (and others),
>
> On Wed, 2024-06-12 at 18:42 +0200, Pablo Rodriguez wrote:
>> Is there any way in which regular wiki contributions may help in
>> removing the accounts or at least all the pages generated with these
>> accounts?
>
> I also don't have deletion privileges, but I went through the recent
> pages and deleted the spammy content.

After sending my message, I saw that the Gardener group seems to have
permissions to delete pages (not sure about user pages).

I wonder whether this may constitute a formal request (for me and Max
[always when he agrees]) to be considered as candidates for Gardeners.

I know that this is not a privilege, but I would like to be able to
remove spam from the wiki.

Many thanks for your help,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: comment on the wiki

2024-06-12 Thread Max Chernoff
Hi Pablo (and others),

On Wed, 2024-06-12 at 18:42 +0200, Pablo Rodriguez wrote:
> Is there any way in which regular wiki contributions may help in
> removing the accounts or at least all the pages generated with these
> accounts?

I also don't have deletion privileges, but I went through the recent
pages and deleted the spammy content. These edits should all show up in
"Recent Changes", so _hopefully_ this makes it easier for the Wiki
admins to delete. (If removing the spam makes it harder for the admins
to delete it, please let me know and I won't do it again).

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] comment on the wiki

2024-06-12 Thread Pablo Rodriguez via ntg-context
Dear wiki maintainers (Taco at others),

I have found in the user creation log:

05:40, 7 June 2024 User account FelicaEnyeart34 was created
22:59, 26 May 2024 User account NonaAlber414387 was created
04:33, 26 May 2024 User account Tony83264596 was created
15:17, 24 May 2024 User account WallyGarth was created

I‘m afraid these four users may be only spamming accounts.

I don’t know whether it is worth discussing this issue, but I have two
questions:

Is there any way in which regular wiki contributions may help in
removing the accounts or at least all the pages generated with these
accounts?

Is there any way to fix the display of user contributions (such as mine,
https://wiki.contextgarden.net/Special:Contributions/Ousia)?

I have just discovered that the problem is to search for contributions
in all namespaces (set by default), which triggers the error message:

  Namespaces with negative values are not supported.

If main namespace is selected, everything works fine.

I wonder whether it would be possible to set the main namespace as
default to search for user contributions.

Many thanks for your help,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: regular online meet-up

2024-06-12 Thread Henning Hraban Ramm

Reminder: tonight!

Am 09.06.24 um 17:25 schrieb Henning Hraban Ramm:

I nearly forgot:

You’re invited to our regular online meet-up, this upcoming
Wednesday, June 12th, 19:00 CEST (UTC+2)

at https://lecture.senfcall.de/hen-rbr-rku-oke
(same, but shorter: https://u.mtxrun.eu/ctxmtg)

ConTeXt users of all levels are welcome!

Do you have a subject that you’d like to talk about?

Looking forward to seeing you,
Hraban


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Cite-proc Lua - Following up

2024-06-12 Thread Max Chernoff
Hi,

On Tue, 2024-06-11 at 11:38 +, hdanielhix...@gmail.com wrote:
> There is a LaTeX package called citation-style-language, backed by
> some software called citeproc-lua. The github page for the software is
> here: https://github.com/zepinglee/citeproc-lua

> I'm just wondering if there is more news about its potential
> integration with Context.

A *very* quick and hacky implementation. First, clone the repository
plus all its submodules, then apply two small patches for Lua 5.5
compatibility:

diff --git a/citeproc/citeproc-latex-core.lua 
b/citeproc/citeproc-latex-core.lua
index 3057c5d..95c917a 100644
--- a/citeproc/citeproc-latex-core.lua
+++ b/citeproc/citeproc-latex-core.lua
@@ -260,6 +260,7 @@ end
 local function parse_latex_seq(s)
   local t = {}
   for item in string.gmatch(s, "(%b{})") do
+local item = item
 item = string.sub(item, 2, -2)
 table.insert(t, item)
   end

diff --git a/luaxml-mod-xml.lua b/luaxml-mod-xml.lua
index d40b761..bf09830 100644
--- a/luaxml-mod-xml.lua
+++ b/luaxml-mod-xml.lua
@@ -524,6 +524,7 @@ local function getAttributes(k,v)
   level = level or 0
   local spaces = string.rep(' ', level*2)
   for k,v in pairs(tb) do
+local k = k
 if type(v) ~= "table" then
   local ct = k
   if type(k)=="number" then

Then, install all the files somewhere where ConTeXt can find them. The
following layout seems to work:

$ tree -a $TEXMFHOME
/home/max/Projects/citeproc-lua/texmf/
├── scripts
│   ├── citation-style-language -> ../../citeproc/
│   └── lua-uca -> ../../submodules/lua-uca/src/lua-uca/
└── tex
├── generic
│   └── unicode-data -> ../../../submodules/unicode-data/
├── latex
│   └── citation-style-language -> ../../../latex/
└── luatex
├── lua-uni-algos -> ../../../submodules/lua-uni-algos/
└── luaxml -> ../../../submodules/luaxml/

12 directories, 0 files

Finally, make a new file somewhere in the "examples/" folder with the
following contents:

\startluacode
package.loaded.unicode = { utf8 = string }
package.loaded.lualibs = {}
kpse.find_file = function(name)
local path = resolvers.findfile(name)
if path == "" then
path = nil
end
return path
end

local saved_require = require
function require(name)
return saved_require(name:gsub("^[^%.]+%.", ""))
end

require("util-jsn")

local output = require("citeproc-output")
local ConTeXtWriter = output.LatexWriter

ConTeXtWriter.markups = {
["bibstart"] = [[\startitemize]],
["bibend"] = [[\stopitemize]],
["@font-style/normal"] = [[\normal{%s}]],
["@font-style/italic"] = [[\italic{%s}]],
["@font-style/oblique"] = [[\slanted{%s}]],
["@font-variant/normal"] = "[[\normal{%s}]]",
["@font-variant/small-caps"] = [[{\sc %s}]],
["@font-weight/normal"] = "[[\normal{%s}]]",
["@font-weight/bold"] = [[\bold{%s}]],
["@font-weight/light"] = "[[\normal{%s}]]",
["@text-decoration/none"] = false,
["@text-decoration/underline"] = [[\underline{%s}]],
["@vertical-align/sup"] = [[\high{%s}]],
["@vertical-align/sub"] = [[\low{%s}]],
["@vertical-align/baseline"] = false,
["@cite/entry"] = false,
["@bibliography/entry"] = [[\item %s]] .. "\n"
}

function ConTeXtWriter:write_escaped(str, context)
return string.formatters["%!tex!"](str)
end

function ConTeXtWriter:write_link(inline, context)
if inline.href == inline.value then
-- URL
return string.format([[\hyphenatedurl{%s}]], inline.value)
elseif context.engine.opt.wrap_url_and_doi then
return string.format([=[\goto{\hyphenatedurl{%s}}[url(%s)]]=], 
inline.href, self:write_escaped(inline.value, context))
else
return self:write_escaped(inline.value, context)
end
end

local engine
interfaces.implement {
name = "cslinit",
public = true,
arguments = "2 strings",
actions = function(style_name, bib_file)
local citeproc = require("citeproc")
local latex_core = require("citepr

[NTG-context] Re: dimen 100.0pt not 100.0pt?

2024-06-10 Thread Hans Hagen via ntg-context

On 6/10/2024 3:46 PM, Hans van der Meer via ntg-context wrote:
The I do not understand. I am testing if a dimension set can be checked 
against the expected value.
It looks like 100.0pt is not really 100.0pt. Why? And how can I do this 
test properly with true as result?


\scratchdimen=100pt\relax
\iftok{\the\scratchdimen}{100.0pt}true\else false\fi
Screenshot 2024-06-10 at 15.37.32.png

printing \the\scratchdimen results in 100.0pt

while \meaning\scratchdimen results in: constant dimension 100.0pt


It has to do with catcodes (of p and t) so you need this:

\iftok{\the\scratchdimen}{\detokenize{100.0pt}}true\else false\fi

But ... you should do it the way Wolfgang pointer out

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: dimen 100.0pt not 100.0pt?

2024-06-10 Thread Wolfgang Schuster

Hans van der Meer via ntg-context schrieb am 10.06.2024 um 15:46:
The I do not understand. I am testing if a dimension set can be checked 
against the expected value.
It looks like 100.0pt is not really 100.0pt. Why? And how can I do this 
test properly with true as result?


\scratchdimen=100pt\relax
\iftok{\the\scratchdimen}{100.0pt}true\else false\fi
Screenshot 2024-06-10 at 15.37.32.png

printing \the\scratchdimen results in 100.0pt

while \meaning\scratchdimen results in: constant dimension 100.0pt


\starttext

\scratchdimen=100.0pt

\ifdim\scratchdimen=100.0pt
  True
\else
  False
\fi

\stoptext

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Scale content to height of the font, measure font height

2024-06-10 Thread seyal zavira
Also you can use this:

assuming that you have a fixed size figure such as a pdf page:

\definesymbol[Bsymbol][{\scale[width=1.6ex]{\externalfigure[myfile.pdf][page=1]}}]
\define\mysym{\kern 0.2em \symbol[Bsymbol] \kern 0.3em}

\starttext
this is a sample\mysym text.
\tfa{this is a sample\mysym text.}
\stoptext

On Mon, Jun 10, 2024 at 7:18 AM Gerion Entrup 
wrote:

> Hi,
>
> I'd like to scale something (actually a symbol drawn in TikZ) to the exact
> high of the char 'M'. I found the scale environment for it but struggle to
> measure the correct font height. I found the
> "definemeasure/measure/measured"
> commands but they define a dimension and are not for doing measurements on
> rendered text. Is there a simple way to get the height a char as a
> dimension?
>
> MWE:
> ```
> \starttext
> % Is it possible to replace 1cm with a common expression?
> This is the letter M. \scale[height=1cm]{a} should have the exact same
> size as
> M.
>
> This should also be true {\tfc with a bigger M. \scale[height=1cm]{a}}.
> \stoptext
> ```
>
> Best
> Gerion
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: get measures as dimension in Lua

2024-06-10 Thread Hans Hagen via ntg-context

On 6/10/2024 7:08 AM, Max Chernoff wrote:

Hi Hraban,

On Sun, 2024-06-09 at 22:12 +0200, Henning Hraban Ramm wrote:

when I define a measure on the TeX side, I used to get at the value in
Lua with tex.getdim, like:

\definemeasure[Bleed][3mm]

tex.getdimen("Bleed")

But now I get "incorrect dimen name".
I need it as a dimension, since I do calculations with other dimensions
like "topspace".

How should I do this correctly?


There doesn't appear to be any official interfaces to get the value of a
measure from Lua, but the following should work okay:

 \definemeasure[mymeasure][10pt]

 \newdimen\mydimen \mydimen=10pt

 \definemeasure[measureexpr][1in + 27.73pt]

 \startluacode
 -- Returns the unexpanded value of some variable in a namespace.
 local function get_variable(namespace, variable)
 -- -- Doesn't work since "measure" is defined as a "system 
namespace".
 -- namespace = interfaces.getnamespace(namespace)
 namespace = tokens.getters.macro("??" .. namespace)
 return tokens.getters.macro(namespace .. variable)
 end

 -- Gets the value of a measure and converts it to an integer in sp 
units.
 local function get_measure(name)
 return tex.sp(get_variable("measure", name))
 end

 -- Gets the \dimexpr-evaluated value of a measure, in sp units.
 local function get_measure_expr(name)
 local namespace = tokens.getters.macro("??measure")
 -- Undocumented, but seems to work as expected.
 return tex.getdimensionvalue(namespace .. name)
 end

 -- Print the values of the lengths.
 print(("="):rep(80))
 print("mymeasure:"  , get_measure("mymeasure")   )
 print("mydimen:", tex.dimen["mydimen"]   )
 print("measureexpr:", get_measure_expr("measureexpr"))
 print(("="):rep(80))
 \stopluacode

 \startTEXpage
 \measure{mymeasure}
 \the\mydimen
 \measure{measureexpr}
 \stopTEXpage

Thanks,
-- Max


Indeed we can have:

local namespace = tokens.getters.macro("??measure")

function tex.getmeasure(name,asdimen)
local value = tex.getdimensionvalue(namespace..name)
if asdimen then
return value .. "sp"
else
return value
end

and when you want to avoid the namespace you can do:

function tex.getmeasure(name,asdimen)
local value = 
token.getexpansion("\\tointeger\\measured{"..name.."}")

if asdimen then
return value .. "sp"
else
return tonumber(value)
end
end

which is some 4 times slower. It'sindeed not documented (although there 
are some examples in accessors-001.tex) but it's in one of my todo's 
because I can use it in some places (there ar emopre such todo's) after 
which it will be discussed in one of the lowlelvel manuals


i'll add tex.getmeasure to the core (but a bit different)

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: get measures as dimension in Lua

2024-06-09 Thread Max Chernoff
Hi Hraban,

On Sun, 2024-06-09 at 22:12 +0200, Henning Hraban Ramm wrote:
> when I define a measure on the TeX side, I used to get at the value in
> Lua with tex.getdim, like:
>
> \definemeasure[Bleed][3mm]
>
> tex.getdimen("Bleed")
>
> But now I get "incorrect dimen name".
> I need it as a dimension, since I do calculations with other dimensions
> like "topspace".
>
> How should I do this correctly?

There doesn't appear to be any official interfaces to get the value of a
measure from Lua, but the following should work okay:

\definemeasure[mymeasure][10pt]

\newdimen\mydimen \mydimen=10pt

\definemeasure[measureexpr][1in + 27.73pt]

\startluacode
-- Returns the unexpanded value of some variable in a namespace.
local function get_variable(namespace, variable)
-- -- Doesn't work since "measure" is defined as a "system 
namespace".
-- namespace = interfaces.getnamespace(namespace)
namespace = tokens.getters.macro("??" .. namespace)
return tokens.getters.macro(namespace .. variable)
end

-- Gets the value of a measure and converts it to an integer in sp 
units.
local function get_measure(name)
return tex.sp(get_variable("measure", name))
end

-- Gets the \dimexpr-evaluated value of a measure, in sp units.
local function get_measure_expr(name)
local namespace = tokens.getters.macro("??measure")
-- Undocumented, but seems to work as expected.
return tex.getdimensionvalue(namespace .. name)
end

-- Print the values of the lengths.
print(("="):rep(80))
print("mymeasure:"  , get_measure("mymeasure")   )
print("mydimen:", tex.dimen["mydimen"]   )
print("measureexpr:", get_measure_expr("measureexpr"))
print(("="):rep(80))
\stopluacode

\startTEXpage
\measure{mymeasure}
\the\mydimen
\measure{measureexpr}
\stopTEXpage

Thanks,
-- Max

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] get measures as dimension in Lua

2024-06-09 Thread Henning Hraban Ramm

Hi,
when I define a measure on the TeX side, I used to get at the value in 
Lua with tex.getdim, like:


\definemeasure[Bleed][3mm]

tex.getdimen("Bleed")

But now I get "incorrect dimen name".
I need it as a dimension, since I do calculations with other dimensions 
like "topspace".


How should I do this correctly?

(I just assume this used to work – the code is old any maybe stuck in an 
intermediate state where I switched from \newdim to \definemeasure…)


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] regular online meet-up

2024-06-09 Thread Henning Hraban Ramm

I nearly forgot:

You’re invited to our regular online meet-up, this upcoming
Wednesday, June 12th, 19:00 CEST (UTC+2)

at https://lecture.senfcall.de/hen-rbr-rku-oke
(same, but shorter: https://u.mtxrun.eu/ctxmtg)

ConTeXt users of all levels are welcome!

Do you have a subject that you’d like to talk about?

Looking forward to seeing you,
Hraban


(Same blurb as always:)

[Howto]
* No special software installation required; most modern browsers should 
work (WebRTC required).

* Open the URL above, accept the privacy statement,
* enter your name,
* click "join" (or "start" if you’re the first),
* click "with microphone", allow your browser to access it, check the audio.
* Your microphone is muted if you join. Activate microphone and/or 
camera with the buttons at the bottom.

* Minimize the default presentation with the "screen" button, bottom right.

* If you’d like to share your screen or upload a file, you can make 
yourself the presenter: Click on your user name, change the setting, 
then you’ll see the "screen sharing" button beside the camera button; 
also there’s now "manage presentations" behind the "plus" button.
Beware there is only one presenter at a time, so don’t kill someone 
else’s presentation.


[Technical hints]
* Sound is usually better if you use a headset (less noise for everyone).
* Connection problems are mostly due to low bandwidth or high latency on 
your side, e.g. with mobile connections.

* Sometimes leaving and re-entering helps.
* If audio/video doesn’t work for you, you can still use the text chat.
* Screen sharing needs a lot of bandwidth.
* BigBlueButton documentation applies: 
https://bigbluebutton.org/teachers/tutorials/


[Netiquette]
* Please use a name that we recognize from here. Some feel uncomfortable 
with anonymous lurkers.

* Mute your microphone while you’re not talking.
* It’s nice to show your face at least when you join.
* If there are connection problems, stop camera sharing.
* The room is set to “everyone’s a moderator“, I trust you...
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Bibliography: separating different kinds of literature OR Sectioning bibliography by type

2024-06-09 Thread Ben Moon via ntg-context
Dear Alan,
Thank you very much for your reply. Unfortunately, I don’t get this working. 
Also, I don’t find the documentation for flushbtxrendering.
Here’s a minimal working example I’m trying:

\startbtxrenderingdefinitions[mybib]

\definebtx
  [mybib]
  [default=default,
   specification=mybib]

\definebtxrendering
  [mybib]
  [specification=mybib,
   numbering=yes]

\stopbtxrenderingdefinitions

\startsetups btx:mybib:list:link
   \btxdoifelse {title} {\btxflush{title}:\space} {No Title}
   \btxdoifelse {url}  {\btxflush{url};\space} {}
   \btxdoifelse {date}  {abgerufen \btxflush{date}.} {}
  \removeunwantedspaces
\stopsetups

\startsetups btx:mybib:list:imagelink
   \btxdoifelse {url}  {\btxflush{url};\space} {}
   \btxdoifelse {date}  {abgerufen \btxflush{date}.} {}
  \removeunwantedspaces
\stopsetups


\startbuffer[maindata]
@link{herbariumathome,
title={Herbarium At Home: A Beginner's Guide},
url={https://youtu.be/2kEbCaTe8XM},
date={04.04.2024}},

@imagelink{zooniverse_logo,
url={https://www.sciencelearn.org.nz/images/3873-zooniverse-logo},
date={04.06.2024}}
\stopbuffer
% enable tracing
\enabletrackers[publications, publications.crossref, publications.details, 
publications.cite, publications.strings]

\definebtxdataset[main]
\usebtxdataset[main][maindata.buffer]
%\definebtxdataset[bilder]
%\usebtxdataset[bilder][imagedata.buffer]
\usebtxdefinitions[mybib, aps] % aps for stuff which isn’t a link or image
\setupbtx[dataset=main]
\definebtxrendering[bibrendering][mybib, aps][dataset=main]

\starttext
\cite[herbariumathome]
\cite[zooniverse_logo]

\section{Quellen: Bilder}
%\placelistofpublications[bibrendering]
\flushbtxrendering [bibrendering]
[method=dataset,
 sorttype=index,
 filter=match(category:imagelink)]

\section{Quellen: Webseiten}
\flushbtxrendering [bibrendering]
[method=dataset,
 sorttype=index,
 filter=match(category:link)]
\stoptext

I would very much appreciate more ideas.

Thank you very much and kind regards

Ben

> On 9 Jun 2024, at 14:37, Alan Braslau via ntg-context  
> wrote:
> 
> Try something like:
> 
>  \flushbtxrendering [bibrendering]
>   [method=dataset,
>sorttype=index,
>filter=match(category:article)]
> 
> I have used the filtering mechanism to select fields, such as 
> filter=match(year:2023).
> 
> Alan
> 
> 
> 
> 
> On Tue, 4 Jun 2024 15:20:14 +0200
> Ben Moon via ntg-context  wrote:
> 
>> Hey there,
>> I would like to place a list of bibliography according to types
>> (article, book, in proceedings) in my document. Similar like here:
>> https://tex.stackexchange.com/questions/112874/sectioning-bibliography-by-type-with-multiple-types-per-section
>> Sectioning bibliography by type (with multiple types per section)
>> tex.stackexchange.com
>> 
>> and here:
>> https://www.mail-archive.com/ntg-context@ntg.nl/msg77056.html
>> The example provided by Hans doesn’t seem to properly work any more,
>> and I cannot make the suggestion work of using two different datasets
>> work as suggested in the same thread. So this is where I’m stuck:
>> 
>> \definebtxdataset[main]
>> \usebtxdataset[main][maindata.buffer]
>> \definebtxdataset[images]
>> \usebtxdataset[images][imagedata.buffer]
>> \usebtxdefinitions[mycustom, aps]
>> \setupbtx[dataset=main]
>> \definebtxrendering[bibrendering][mycustom, aps][dataset=main]
>> \definebtxrendering[bibimgrendering][mycustom, aps][dataset=images]
>> 
>> \placelistofpublications[bibrendering]
>> \placelistofpublications[bibimgrendering]
>> 
>> It would be much appreciated if someone could provide a working
>> example?
>> 
>> Thank you very much
>> 
>> Ben
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Scale notation base on current font

2024-06-08 Thread Wolfgang Schuster

seyal zavira schrieb am 08.06.2024 um 17:09:

Thanks

sorry for incomplete example
the code below shows the problem better:
\setupinteraction[state=start]
\definenote[Mynote][location=text,before={},]
\setupnote[Mynote]
     [location=left,
      textcommand={\tfa \raise 0.2ex\hbox},
     ]

\definefont[highfont][name:ibmplexsansbold*default at 10pt]
\definehighlight[newhigh][color=darkblue,style=highfont]

\starttext
\input{knuth} \Mynote{refrence}

\startitemize
\item \newhigh{\input{knuth}\Mynote{refrenceTwo}}
\stopitemize

\placenotes[Mynote]
\stoptext

as you can see the note number has same style all over the document.
but i want it to have style base on current font
and if the font changes, the style should change, while maintaining the 
ratio of sizes(i.e., at the half of current font).

i attached the resulted pdf


1. You can use the \offset command to raise the footnote number.

2. Disable the value of the textstyle to ensure you get current style 
for the footnote number.


 begin example
\define[1]\MyNoteTextcommand
  {\offset[y=-0.2ex]{#1}}

\definenote
  [Mynote]

\setupnote
  [Mynote]
  [location=text,
   textstyle=,
   textcommand=\MyNoteTextcommand]

\starttext

\input{knuth}\Mynote{First note.}

\startstyle[style=\ss]
\input{knuth}\Mynote{Second note.}
\stopstyle

\startstyle[style=\tt\bf]
\input{knuth}\Mynote{Third note.}
\stopstyle

\placenotes[Mynote]

\stoptext
 end example

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Scale notation base on current font

2024-06-08 Thread seyal zavira
Thanks

sorry for incomplete example
the code below shows the problem better:
\setupinteraction[state=start]
\definenote[Mynote][location=text,before={},]
\setupnote[Mynote]
[location=left,
 textcommand={\tfa \raise 0.2ex\hbox},
]

\definefont[highfont][name:ibmplexsansbold*default at 10pt]
\definehighlight[newhigh][color=darkblue,style=highfont]

\starttext
\input{knuth} \Mynote{refrence}

\startitemize
\item \newhigh{\input{knuth}\Mynote{refrenceTwo}}
\stopitemize

\placenotes[Mynote]
\stoptext

as you can see the note number has same style all over the document.
but i want it to have style base on current font
and if the font changes, the style should change, while maintaining the
ratio of sizes(i.e., at the half of current font).
i attached the resulted pdf

On Sat, Jun 8, 2024 at 10:04 AM vm via ntg-context 
wrote:

>
>
> On 08/06/2024 13:16, seyal.zav...@gmail.com wrote:
> > \definenote[Mynote][location=text,before={},]
> > \setupnote[Mynote]
> >  [location=left,
> >   textcommand= \scale [height=0.7ex] \raise 0.2ex\hbox,
> >  ]
> > \starttext
> > hello \Mynote{refrence}
> > \placenotes[Mynote]
> > \stoptext
>
>
> add {} this works:
>
> \setupnote[Mnote]
> [location=left,
> textcommand={\scale[height=0.7ex] \raise 0.2ex\hbox},
> ]
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: ConTeXt source from XML

2024-06-07 Thread Henning Hraban Ramm

Am 07.06.24 um 21:41 schrieb Pablo Rodriguez via ntg-context:

It is part of our task (the one reserved to final users) to compose a
proper introduction on how to typeset XML sources with ConTeXt.


Have a look at the XMl related articles in 
https://articles.contextgarden.net/journal/2019.html


Thomas’ “Presentations in XML” is a good introduction IMO.
Taco’s articles are more specialized but give further insights.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: ConTeXt source from XML

2024-06-07 Thread Pablo Rodriguez via ntg-context
On 6/6/24 22:53, Christoph Edenhauser wrote:
>> [...]
>> XPath seems to have as it primary purpose to address the nodes of XML trees.
>> [...]
>> If you don’t want this to happen, you have to encode them in the TEI XML
>> sources.
>
> In my case, the connection to the original source will be lost.  While
> we will still try to backport corrections, the connection will be lost
> at the very moment when we will annotate the source text.

Dear Christoph,

well, in your case, your source will be a new one, the annotated one.

> At the moment I'm leaning strongly towards TEI, also because I could try
> to remove the annotations via XSLT once the work is complete, diff the
> result with the original source and improve it). And besides,
> XML+ConTeXt looks quite elegant from the distance of my ignorance.

If you are familiar with XSLT (and XPath), you will have no problem
typesetting XML sources with ConTeXt.

> (Although reading xml-mkiv.pdf creates a pleasant frictional heat in my
> cerebral convolutions, but leaves at least as many knots in them as XML
> data have nodes).

Well, xml-mkiv.pdf isn’t exactly a piece of cake. It isn’t an
introduction and it has to be written that way.

After trying to read it for the n-th time and having learnt only very
little from it (exclusively my fault), I think it assumes a good XPath
background.

Again, xml-mkiv.pdf is documenting the way of handling XML in ConTeXt
and it has to be written that way.

It is part of our task (the one reserved to final users) to compose a
proper introduction on how to typeset XML sources with ConTeXt.

Borrowing the title from other work, “XML in Proper ConTeXt” (actually
taken from https://www.berenddeboer.net/tex/LaTeX2ConTeXt.pdf).

All I can say is that I have read xml-mkiv.pdf and I know I will learn
way more from this document than the huge amount of things I have
already discovered reading it.

>> [...]
>> Having the text properly formatted and printed on paper helps a lot to
>> spot errors.
>
> Same here: It's the paper!
> (I for myself prefer for the first proof reading a page lots of white
> space, in monospaced font like Courier, while my proofreader wants to
> see the font that will be used in the end.)

Sorry for insisting. If the text is not fully formated, it is very easy
to overlook formatting errors with commands (or simple errors with
commands directly).

The most basic sample may read (wrong spacing after command):

  \starttext
\ConTeXt is awesome!
  \stoptext

This is one in a bunch of errors that may be unnoticed.

Just in case it might help,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] ConTeXt source from XML

2024-06-06 Thread Christoph Edenhauser

Dear Pablo,


Dear Christoph,

just in case it might help to your meditation.

First of all, lpaths are XPath implemented with Lua in ConTeXt.

XPath seems to have as it primary purpose to address the nodes of XML trees.

About your sources, the real issue here is to define whether you want
TEI or TeX to be the format containing them.

I mean, if you add explaining footnotes to your TeX file(s), XML won’t
be source anymore.

If you don’t want this to happen, you have to encode them in the TEI XML
sources.


In my case, the connection to the original source will be lost. While we 
will still try to backport corrections, the connection will be lost at 
the very moment when we will annotate the source text.
From this point of view, an independent source is created here anyway, 
so I have the freedom to choose between TEI or TeX.
At the moment I'm leaning strongly towards TEI, also because I could try 
to remove the annotations via XSLT once the work is complete, diff the 
result with the original source and improve it). And besides, 
XML+ConTeXt looks quite elegant from the distance of my ignorance. 
(Although reading xml-mkiv.pdf creates a pleasant frictional heat in my 
cerebral convolutions, but leaves at least as many knots in them as XML 
data have nodes).



One last suggestion about proofreading. This is something I learnt from
personal experience.

The first reading is much better to catch errors in the text than the
subsequent ones.

Having the text properly formatted and printed on paper helps a lot to
spot errors.


Same here: It's the paper!
(I for myself prefer for the first proof reading a page lots of white 
space, in monospaced font like Courier, while my proofreader wants to 
see the font that will be used in the end.)


Thank you very much for your suggestions,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: ConTeXt source from XML

2024-06-06 Thread Hans Hagen via ntg-context

On 6/6/2024 5:33 PM, Pablo Rodriguez via ntg-context wrote:

On 6/5/24 20:23, Christoph Edenhauser wrote:

Dear Pablo,

Thank you very much for your very clear, detailed and elaborate
explanations.  - Over the next few days I will meditate on the ConTeXt
way to handle XML and on my workflow and take a look at lpath (never
heard of it). And somehow I have the impression that the next few days
will last a few weeks.


Dear Christoph,

just in case it might help to your meditation.

First of all, lpaths are XPath implemented with Lua in ConTeXt.

XPath seems to have as it primary purpose to address the nodes of XML trees.

About your sources, the real issue here is to define whether you want
TEI or TeX to be the format containing them.

I mean, if you add explaining footnotes to your TeX file(s), XML won’t
be source anymore.

If you don’t want this to happen, you have to encode them in the TEI XML
sources.

One last suggestion about proofreading. This is something I learnt from
personal experience.

The first reading is much better to catch errors in the text than the
subsequent ones.

Having the text properly formatted and printed on paper helps a lot to
spot errors.

Reading source code is cheaper (no doubt), but the results will be
poorer too.

Just in case it might help,
fwiw, context supports 'synctex' to xml files / nodes so that might help 
a bit


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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: ConTeXt source from XML

2024-06-06 Thread Pablo Rodriguez via ntg-context
On 6/5/24 20:23, Christoph Edenhauser wrote:
> Dear Pablo,
>
> Thank you very much for your very clear, detailed and elaborate
> explanations.  - Over the next few days I will meditate on the ConTeXt
> way to handle XML and on my workflow and take a look at lpath (never
> heard of it). And somehow I have the impression that the next few days
> will last a few weeks.

Dear Christoph,

just in case it might help to your meditation.

First of all, lpaths are XPath implemented with Lua in ConTeXt.

XPath seems to have as it primary purpose to address the nodes of XML trees.

About your sources, the real issue here is to define whether you want
TEI or TeX to be the format containing them.

I mean, if you add explaining footnotes to your TeX file(s), XML won’t
be source anymore.

If you don’t want this to happen, you have to encode them in the TEI XML
sources.

One last suggestion about proofreading. This is something I learnt from
personal experience.

The first reading is much better to catch errors in the text than the
subsequent ones.

Having the text properly formatted and printed on paper helps a lot to
spot errors.

Reading source code is cheaper (no doubt), but the results will be
poorer too.

Just in case it might help,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \item would fit, but was pushed to next page. Work-around or fix?

2024-06-06 Thread Jim
On Thu, Jun  6, 2024 at 11:04 (+0200), Aditya Mahajan wrote:

> On Wed, 5 Jun 2024, Jim wrote:

>> Hi,

>> I had the following structure which ended up at the bottom of a page:


> This is perhaps not related to what you asked but ...

>> \noindent
>> {\bf Blah blah blah }
>> \startitemize[intro,nowhite]

> Starting a paragraph with a group {...} can lead to unexpected outcome. It is 
> better to use \bold{...} here, or \dontleavehmode {\bf ... }. 

Aditya,

thanks for the information.  So far (in my ConTeXt journey) I haven't seen
anything with doing that, but I appreciate the advice.

I don't understand the full Zen of \dontleavehmode (in my poor
understanding I think it should be called \ensurehmode or something like
that), but given that I explicitly used \noindent, is that not an analogous
thing?

Thanks.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Kerning in Noto Serif

2024-06-06 Thread Lutz Haseloff
Thanks Hraban,

my Noto Serif (just downloaded) is 2.013

--script font shows kern too:
kern cyrl dflt
   dflt dflt
   grek dflt
   latn dflt

Greetings Lutz

Am 6. Juni 2024 11:12:18 MESZ schrieb Henning Hraban Ramm :
>Am 06.06.24 um 09:41 schrieb Lutz Haseloff:
>> Hi all,
>> I can't get Kerning working with Noto Serif.
>> My minimal file is:
>> 
>> \definefontfeature[oldstylenumber][onum=yes]
>> \definefont[testnoto][file:NotoSerif-Regular*default at 12pt]
>> \starttext
>> Line 1: {VAVAVAVAVAVA 12345}\par
>> Line 2: {\setff{oldstylenumber}VAVAVAVAVAVA 12345}\par
>> Line 3: {\addff{oldstylenumber}VAVAVAVAVAVA 12345}\par
>> \testnoto
>> Line 4: {VAVAVAVAVAVA 12345}\par
>> Line 5: {\setff{oldstylenumber}VAVAVAVAVAVA 12345}\par
>> Line 6: {\addff{oldstylenumber}VAVAVAVAVAVA 12345}\par
>> \stoptext
>> 
>> Line 4 and 6 should be significantly shorter too.
>> I tried the variable and the static versions.
>> In fontforge I can see a kerning of -80 between A and V.
>> My context is the newest lmtx.
>
>For me, it looks good with ConTeXt v2024.05.31 and Noto Serif v.1.03
>
>Just to check the font (yes, it has kerning):
>
>$ mtxrun --script font --list --pattern=notoserifregular --info
>mtx-fonts   |
>mtx-fonts   | mapping   : notoserifregular
>mtx-fonts   | fontname  : notoserif
>mtx-fonts   | fullname  : notoserif
>mtx-fonts   | filename  : NotoSerif-Regular.ttf
>mtx-fonts   | family: notoserif
>mtx-fonts   | weight: normal
>mtx-fonts   | style : normal
>mtx-fonts   | width : normal
>mtx-fonts   | variant   : normal
>mtx-fonts   |
>mtx-fonts   | gpos features:
>mtx-fonts   |
>mtx-fonts   |   feature  script   languages
>mtx-fonts   |
>mtx-fonts   |   kern cyrl dflt
>mtx-fonts   |grek dflt
>mtx-fonts   |latn dflt
>mtx-fonts   |   mark cyrl dflt
>mtx-fonts   |grek dflt
>mtx-fonts   |latn dflt
>mtx-fonts   |   mkmk cyrl dflt
>mtx-fonts   |grek dflt
>mtx-fonts   |latn dflt
>mtx-fonts   |
>mtx-fonts   | gsub features:
>mtx-fonts   |
>mtx-fonts   |   feature  script   languages
>mtx-fonts   |
>mtx-fonts   |   ccmp cyrl dflt
>mtx-fonts   |grek dflt
>mtx-fonts   |latn dflt
>
>Hraban
>
>___
>If your question is of interest to others as well, please add an entry to the 
>Wiki!
>
>maillist : ntg-context@ntg.nl / 
>https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
>webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
>archive  : https://github.com/contextgarden/context
>wiki : https://wiki.contextgarden.net
>___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Kerning in Noto Serif

2024-06-06 Thread Henning Hraban Ramm

Am 06.06.24 um 09:41 schrieb Lutz Haseloff:

Hi all,
I can't get Kerning working with Noto Serif.
My minimal file is:

\definefontfeature[oldstylenumber][onum=yes]
\definefont[testnoto][file:NotoSerif-Regular*default at 12pt]
\starttext
Line 1: {VAVAVAVAVAVA 12345}\par
Line 2: {\setff{oldstylenumber}VAVAVAVAVAVA 12345}\par
Line 3: {\addff{oldstylenumber}VAVAVAVAVAVA 12345}\par
\testnoto
Line 4: {VAVAVAVAVAVA 12345}\par
Line 5: {\setff{oldstylenumber}VAVAVAVAVAVA 12345}\par
Line 6: {\addff{oldstylenumber}VAVAVAVAVAVA 12345}\par
\stoptext

Line 4 and 6 should be significantly shorter too.
I tried the variable and the static versions.
In fontforge I can see a kerning of -80 between A and V.
My context is the newest lmtx.


For me, it looks good with ConTeXt v2024.05.31 and Noto Serif v.1.03

Just to check the font (yes, it has kerning):

$ mtxrun --script font --list --pattern=notoserifregular --info
mtx-fonts   |
mtx-fonts   | mapping   : notoserifregular
mtx-fonts   | fontname  : notoserif
mtx-fonts   | fullname  : notoserif
mtx-fonts   | filename  : NotoSerif-Regular.ttf
mtx-fonts   | family: notoserif
mtx-fonts   | weight: normal
mtx-fonts   | style : normal
mtx-fonts   | width : normal
mtx-fonts   | variant   : normal
mtx-fonts   |
mtx-fonts   | gpos features:
mtx-fonts   |
mtx-fonts   |   feature  script   languages
mtx-fonts   |
mtx-fonts   |   kern cyrl dflt
mtx-fonts   |grek dflt
mtx-fonts   |latn dflt
mtx-fonts   |   mark cyrl dflt
mtx-fonts   |grek dflt
mtx-fonts   |latn dflt
mtx-fonts   |   mkmk cyrl dflt
mtx-fonts   |grek dflt
mtx-fonts   |latn dflt
mtx-fonts   |
mtx-fonts   | gsub features:
mtx-fonts   |
mtx-fonts   |   feature  script   languages
mtx-fonts   |
mtx-fonts   |   ccmp cyrl dflt
mtx-fonts   |grek dflt
mtx-fonts   |latn dflt

Hraban

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \item would fit, but was pushed to next page. Work-around or fix?

2024-06-06 Thread Aditya Mahajan
On Wed, 5 Jun 2024, Jim wrote:

> Hi,
> 
> I had the following structure which ended up at the bottom of a page:
> 

This is perhaps not related to what you asked but ...

> \noindent
> {\bf Blah blah blah }
> \startitemize[intro,nowhite]

Starting a paragraph with a group {...} can lead to unexpected outcome. It is 
better to use \bold{...} here, or \dontleavehmode {\bf ... }. 

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Kerning in Noto Serif

2024-06-06 Thread Lutz Haseloff
Hi all,
I can't get Kerning working with Noto Serif.
My minimal file is:

\definefontfeature[oldstylenumber][onum=yes]
\definefont[testnoto][file:NotoSerif-Regular*default at 12pt]
\starttext
Line 1: {VAVAVAVAVAVA 12345}\par
Line 2: {\setff{oldstylenumber}VAVAVAVAVAVA 12345}\par
Line 3: {\addff{oldstylenumber}VAVAVAVAVAVA 12345}\par
\testnoto
Line 4: {VAVAVAVAVAVA 12345}\par
Line 5: {\setff{oldstylenumber}VAVAVAVAVAVA 12345}\par
Line 6: {\addff{oldstylenumber}VAVAVAVAVAVA 12345}\par
\stoptext

Line 4 and 6 should be significantly shorter too.
I tried the variable and the static versions.
In fontforge I can see a kerning of -80 between A and V.
My context is the newest lmtx.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: ConTeXt source from XML

2024-06-05 Thread Christoph Edenhauser

Dear Pablo,

Thank you very much for your very clear, detailed and elaborate 
explanations.  - Over the next few days I will meditate on the ConTeXt 
way to handle XML and on my workflow and take a look at lpath (never 
heard of it). And somehow I have the impression that the next few days 
will last a few weeks.


Best regards, Christoph


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \item would fit, but was pushed to next page. Work-around or fix?

2024-06-05 Thread Jim
On Wed, Jun  5, 2024 at 18:04 (+0200), Henning Hraban Ramm wrote:

> Am 05.06.24 um 17:33 schrieb Jim:
>> Hi,

>> I had the following structure which ended up at the bottom of a page:
> …
>> Q1: Is there a Right Way to force ConTeXt to put an \item on the current 
>> page?

>> Q2: If not, does anyone wish to suggest some way to trick ConTeXt here, or
>> to do an end-run around its calculations?

>> Note: to solve this problem the use of brute force has been authorized.

> Did you try \adaptlayout?
> https://wiki.contextgarden.net/Command/adaptlayout

> It might also help to put the itemize in a box (but that might end up on the
> next page).

Hi Hraban,

That works perfectly.  I didn't know about that command before, and my
google searches to find something like that didn't turn anything up.
Undoubtedly I used the wrong search terms.

I tried putting the \placefigure and the itemize in a box, thinking that if
all else failed I could put a negative \vskip at the bottom to make the box
shorter.  However, when I tried putting all that in a \vbox I got some
error messages which were not immediately illuminating (to me).

Thanks for the pointer.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \item would fit, but was pushed to next page. Work-around or fix?

2024-06-05 Thread Henning Hraban Ramm

Am 05.06.24 um 17:33 schrieb Jim:

Hi,

I had the following structure which ended up at the bottom of a page:

…

Q1: Is there a Right Way to force ConTeXt to put an \item on the current page?

Q2: If not, does anyone wish to suggest some way to trick ConTeXt here, or
 to do an end-run around its calculations?

Note: to solve this problem the use of brute force has been authorized.


Did you try \adaptlayout?
https://wiki.contextgarden.net/Command/adaptlayout

It might also help to put the itemize in a box (but that might end up on 
the next page).


Hraban

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] \item would fit, but was pushed to next page. Work-around or fix?

2024-06-05 Thread Jim
Hi,

I had the following structure which ended up at the bottom of a page:

---

\setupcaptions[number=no]
\placefigure[right]
{blah blah blah}
{%
\vskip -15pt
\externalfigure[DSC_2782][width=0.32\textwidth]
}
\noindent
{\bf Blah blah blah }
\startitemize[intro,nowhite]
\item blah blah blah blah blah blah!  blah blah blah blah, blah
  blah blah blah blah blah blah blah blah blah.
\item blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
  blah.
\item blah blah blah blah blah blah blah blah blah blah
  blah blah blah blah blah.
\item blah blah blah blah blah blah blah blah blah blah blah blah blah
  blah blah blah blah blah blah blah blah.
\item blah blah blah blah blah blah blah blah blah blah blah blah blah
  blah blah blah blah blah blah blah blah blah blah blah blah
  blah.
\item blah blah blah blah blah blah blah blah blah blah blah blah
  blah blah blah blah blah blah blah blah blah
  blah blah blah blah blah.
\stopitemize



There was, in fact, room to put the last \item on the page (and even a bit
more), but ConTeXt insisted on moving the last \item to the next page.  I
assume that its calculations were a bit conservative for whatever reason,
but I really wanted the last item to be on the same page as its friends.

I tried some "tricks" that would have worked for me in plain TeX, but
ConTeXt was having none of that.

Q1: Is there a Right Way to force ConTeXt to put an \item on the current page?

Q2: If not, does anyone wish to suggest some way to trick ConTeXt here, or
to do an end-run around its calculations?

Note: to solve this problem the use of brute force has been authorized.

Thanks.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: ConTeXt source from XML

2024-06-05 Thread Pablo Rodriguez via ntg-context
On 6/5/24 12:00, Christoph Edenhauser wrote:
> [...]
> I realise that it is somehow difficult for me to describe what I would
> like to achieve, perhaps what I have in mind is not even possible.

Hi Christoph,

as far as I know (and as Hraban has already mentioned), this is not
possible.

Either XSLT or pandoc would be a way to do that.

That being said, I would avoid conversion (a second source) in all cases.

I use ConTeXt to typeset XML sources typing Markdown sources.

pandoc generates XML and then ConTeXt typesets these XML sources.

> My Question is, is it possible to generate a second context file2.tex
> with the help of this first xml-mapping file1.tex, where all the
> xml-nodes from the xml file are mapped to contex commands which then
> looks something like this:

I‘m afraid this is not possible (it works in a different way)

> I would then like to edit the Text in such a more "TeXish" result 
> manually, e.g. insert small spaces as in ‘St.\,Martin’, explain unknown
> words in \footnote{comment}, etc.

Different spaces are Unicode characters. As entities, &nnbsp; or  
(narrow no-breaking space and thin space, respectively).

> I know you could or even should do the text corrections in the xml file,
> but XML would overwhelm my proofreader. (He has learnt to leave LaTeX
> code untouched, that should then work with ConTeXt code as well). So for
> me, the main reason for having a TeX-ish file2.tex is, that the Text
> could be corrected directly from the proofreader in this file2.tex file,
> but won't do that in the xml file.

I don’t mean the proofreader personally, but TeX code may not be
inherenlty more readable that XML code.

Compile the following:

  \starttext
  \startXML
  
  St.&nnbsp;Martin
  A comprehensive treatise
  The medieval part of the church
  \stopXML

  \startTEX
  \starttext
  \startchapter[title=St.\, Martin] \stopchapter
  \startsection[title=The medieval part of the church]\stopsection
  \stoptext
  \stopTEX
  \stoptext

I think that a text editor with reasonable highlighting for XML is key
to your issue.

I mean, XML sources tend to be highlighted leaving pure text as
uncolored and unformatted (no bold or italics).

In that case, I think the text to be proofread may be recognized as not
having any format at all (besides not enclosed inside "<" and ">").

> And now a second approach to my question:
> Are all these \startxmlsetups like '\startxmlsetup xml:chapter'
> internally mapped to standard context commands like \startchapter
> ... \stopchapter before they are converted to pdf?

No, these are formatting commands after the mapping.

In short, there are three steps involved in XML typesetting.

First, you select which elements you would like to select from the XML
source in an XML setup (with a mapping to your configuration commands).

Second, you register this XML setup.

Third, your configure the selected elements with ConTeXt commands.

Here is a sample (using a buffer instead of an external file):

  \startbuffer[demo]
  
 line 1
 line 2
 line 3
  
  \stopbuffer

  \starttext

  \startxmlsetups abc:def
\xmlsetsetup{#1}{foo|bar}{xyz:*}
  \stopxmlsetups

  \xmlregistersetup{abc:def}

  \startxmlsetups xyz:foo
\xmlflush{#1}
  \stopxmlsetups

  \startxmlsetups xyz:bar
\startparagraph
  \xmlflush{#1}
\stopparagraph
  \stopxmlsetups

  \xmlprocessbuffer{main}{demo}{}

  \stoptext

First of all, XML has no hardcoded names for any element (from a certain
point of view, XML are only rules on how to use the "<>" tags).

This is why,  and  are perfectly valid element names (although
they have no meaning for people).

Second, the mapping may use any name for destination setups.

\xmlsetsetup does the mappings, the second group of parentheses contains
the lpath (an Lua version of XPath [how XML is selected]) and the third
group of parentheses is setups.

The command \xmlsetsetup{#1}{foo|bar}{xyz:*} above is bound to existing
elements (or paths) in the XML source, but both "xyz:foo" and "xzy:bar"
may read as the user wants.

Third, after that you need specify the setup for each mapping (or it
won’t appear in your final document).

The setup is what you defined as the second part of the mapping, may it
be "xml:title" or "xyz:bar".

Nothing here is hardcoded. XML is not HTML (elements with meaning).

In order to deal with XML, ConTeXt has to provide the tools to select
elements (and more complex constructs) and map them to configurable setups.

How both tools (construct selection and setup configurations) may be
deployed, this is up to each individual.

Hardcoding this would be a real problem in the short run.

> If this is the case, can this intermediate context representation be
> exported, and how would this be done?

Nice try, but I’m afraid this is not how it works.

I h

[NTG-context] Re: https://wiki.contextgarden.net/Command/blank

2024-06-04 Thread Jim
On Tue, Jun  4, 2024 at 21:50 (+0200), Wolfgang Schuster wrote:

> Jim schrieb am 04.06.2024 um 21:29:
>> On Tue, Jun  4, 2024 at 20:31 (+0200), Taco Hoekwater wrote:

>>>> On 4 Jun 2024, at 20:16, Wolfgang Schuster 
>>>>  wrote:

>>>> Jim schrieb am 04.06.2024 um 19:48:

>>>> > I did not realize the wiki software did that.  On reflection I suppose 
>>>> > that
>>>> > is useful in many (most?) cases.  But I'd argue that it is not always a 
>>>> > good
>>>> > thing, such as in this case.  (If nothing else, it might mislead a n00b
>>>> > into thinking that you should get output for text preceding \starttext.)

>>> Here is the documentation for the  tag extension:

>>> https://wiki.contextgarden.net/Help:Context

>> Hi Taco,

>> thanks very much for the link.  But, ummm, what it says there seems to
>> contradict what Wolfgang told me in the other response to my message.

>> [[ I see Wolfgang edited the \blank wiki page to move the text in question
>> to after \starttext, but I'm sure if you don't believe what I say in the
>> next paragraph, you can grab the previous version. ]]

>> Specifically, the example in the (previous) \blank wiki page does, indeed,
>> have a \starttext and \stoptext.  So, according to the page you mention
>> above, another \starttext and \stoptext should *not* be added.  And yet the
>> (previous) \blank page example does print the text (as well as the bullets)
>> before the \starttext.  Is there a discrepancy between what
>> .../Help:Context says and what actually happens?

> When you take a look at the settings which are applied here you can see
> \setupbodyfont[8pt] which is the reason why the text appears, compare

>  begin example
> Before \tex{starttext}

> \starttext
> After \tex{starttext}.
> \stoptext
>  end example

> with

>  begin example
> \setupbodyfont[12pt]

> Before \tex{starttext}

> \starttext
> After \tex{starttext}.
> \stoptext
>  end example

> The second example loads a font before the text appear in the document which
> is the reason why you can see it.

Thanks Wolfgang,

all is now becoming clear.  :-)

Jim

P.S. Well, "all" about this, I still have lots of questions about other things.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Number in a circle

2024-06-04 Thread Bruce Horrocks


> On 4 Jun 2024, at 19:00, Kip Warner  wrote:
> 
> On Tue, 2024-06-04 at 18:19 +0100, Bruce Horrocks wrote:
>> 1) I installed Ubuntu 14.04 It comes with context pre-installed but
>> it's broken.
> 
> Hey Bruce. Just an FYI, but Trusty Tahr (14.04) is over a decade old.

Typo - 24.04 (phew!)

—
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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: https://wiki.contextgarden.net/Command/blank

2024-06-04 Thread Wolfgang Schuster

Jim schrieb am 04.06.2024 um 21:29:

On Tue, Jun  4, 2024 at 20:31 (+0200), Taco Hoekwater wrote:


On 4 Jun 2024, at 20:16, Wolfgang Schuster  
wrote:



Jim schrieb am 04.06.2024 um 19:48:



I did not realize the wiki software did that.  On reflection I suppose that
is useful in many (most?) cases.  But I'd argue that it is not always a good
thing, such as in this case.  (If nothing else, it might mislead a n00b
into thinking that you should get output for text preceding \starttext.)



Here is the documentation for the  tag extension:



https://wiki.contextgarden.net/Help:Context


Hi Taco,

thanks very much for the link.  But, ummm, what it says there seems to
contradict what Wolfgang told me in the other response to my message.

[[ I see Wolfgang edited the \blank wiki page to move the text in question
to after \starttext, but I'm sure if you don't believe what I say in the
next paragraph, you can grab the previous version. ]]

Specifically, the example in the (previous) \blank wiki page does, indeed,
have a \starttext and \stoptext.  So, according to the page you mention
above, another \starttext and \stoptext should *not* be added.  And yet the
(previous) \blank page example does print the text (as well as the bullets)
before the \starttext.  Is there a discrepancy between what
.../Help:Context says and what actually happens?


When you take a look at the settings which are applied here you can see 
\setupbodyfont[8pt] which is the reason why the text appears, compare


 begin example
Before \tex{starttext}

\starttext
After \tex{starttext}.
\stoptext
 end example

with

 begin example
\setupbodyfont[12pt]

Before \tex{starttext}

\starttext
After \tex{starttext}.
\stoptext
 end example

The second example loads a font before the text appear in the document 
which is the reason why you can see it.


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: https://wiki.contextgarden.net/Command/blank

2024-06-04 Thread Jim
On Tue, Jun  4, 2024 at 20:31 (+0200), Taco Hoekwater wrote:

>> On 4 Jun 2024, at 20:16, Wolfgang Schuster 
>>  wrote:

>> Jim schrieb am 04.06.2024 um 19:48:

>>> I did not realize the wiki software did that.  On reflection I suppose that
>>> is useful in many (most?) cases.  But I'd argue that it is not always a good
>>> thing, such as in this case.  (If nothing else, it might mislead a n00b
>>> into thinking that you should get output for text preceding \starttext.)

> Here is the documentation for the  tag extension:

> https://wiki.contextgarden.net/Help:Context

Hi Taco,

thanks very much for the link.  But, ummm, what it says there seems to
contradict what Wolfgang told me in the other response to my message.

[[ I see Wolfgang edited the \blank wiki page to move the text in question
   to after \starttext, but I'm sure if you don't believe what I say in the
   next paragraph, you can grab the previous version. ]]

Specifically, the example in the (previous) \blank wiki page does, indeed,
have a \starttext and \stoptext.  So, according to the page you mention
above, another \starttext and \stoptext should *not* be added.  And yet the
(previous) \blank page example does print the text (as well as the bullets)
before the \starttext.  Is there a discrepancy between what
.../Help:Context says and what actually happens?

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: https://wiki.contextgarden.net/Command/blank

2024-06-04 Thread Jim
On Tue, Jun  4, 2024 at 20:14 (+0200), Wolfgang Schuster wrote:

> Jim schrieb am 04.06.2024 um 19:48:

>> I did not realize the wiki software did that.  On reflection I suppose that
>> is useful in many (most?) cases.  But I'd argue that it is not always a good
>> thing, such as in this case.  (If nothing else, it might mislead a n00b
>> into thinking that you should get output for text preceding \starttext.)

> The reason why you get no text isn't that you wrote it before \starttext but
> that no font was loaded yet. By default ConTeXt postpones the loading of the
> default fonts until \starttext because when you use a different font on your
> document this is normally before \starttext and with the postponing there is
> no need to load a unused font.

> At the point where you load a font with \setupbodyfont text even if it
> appears before \starttext is shown as expected but this isn't recommended.

>> If you (or some other knowledgeable person reading this) don't (doesn't)
>> mind another question,...
>> Is the bullet symbol not from some font?  If so, why is that font loaded in
>> time to see the bullet?

> When no font has been loaded yet with \setupbodyfont ConTeXt prints text
> which is put in a \hbox in a monospaced font as shown in the example below.

>  begin example
> This is before \tex{starttext}.

> \hbox{This is also before \tex{starttext}}

> \starttext
> This is after \tex{starttext}.
> \stoptext
>  end example

Thanks again.  Without looking at the code, I (boldly) conclude that the
bullet is in an \hbox.

While I'm curious about why text in an \hbox is printed, I'm thinking that
I may not have need to know.  ;-)

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: https://wiki.contextgarden.net/Command/blank

2024-06-04 Thread Taco Hoekwater


> On 4 Jun 2024, at 20:16, Wolfgang Schuster 
>  wrote:
> 
> Jim schrieb am 04.06.2024 um 19:48:
> 
>> I did not realize the wiki software did that.  On reflection I suppose that
>> is useful in many (most?) cases.  But I'd argue that it is not always a good
>> thing, such as in this case.  (If nothing else, it might mislead a n00b
>> into thinking that you should get output for text preceding \starttext.)

Here is the documentation for the  tag extension:

https://wiki.contextgarden.net/Help:Context

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: https://wiki.contextgarden.net/Command/blank

2024-06-04 Thread Wolfgang Schuster

Jim schrieb am 04.06.2024 um 19:48:


I did not realize the wiki software did that.  On reflection I suppose that
is useful in many (most?) cases.  But I'd argue that it is not always a good
thing, such as in this case.  (If nothing else, it might mislead a n00b
into thinking that you should get output for text preceding \starttext.)


The reason why you get no text isn't that you wrote it before \starttext 
but that no font was loaded yet. By default ConTeXt postpones the 
loading of the default fonts until \starttext because when you use a 
different font on your document this is normally before \starttext and 
with the postponing there is no need to load a unused font.


At the point where you load a font with \setupbodyfont text even if it 
appears before \starttext is shown as expected but this isn't recommended.



If you (or some other knowledgeable person reading this) don't (doesn't)
mind another question,...
Is the bullet symbol not from some font?  If so, why is that font loaded in
time to see the bullet?


When no font has been loaded yet with \setupbodyfont ConTeXt prints text 
which is put in a \hbox in a monospaced font as shown in the example below.


 begin example
This is before \tex{starttext}.

\hbox{This is also before \tex{starttext}}

\starttext
This is after \tex{starttext}.
\stoptext
 end example

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Number in a circle

2024-06-04 Thread Kip Warner
On Tue, 2024-06-04 at 18:19 +0100, Bruce Horrocks wrote:
> 1) I installed Ubuntu 14.04 It comes with context pre-installed but
> it's broken.

Hey Bruce. Just an FYI, but Trusty Tahr (14.04) is over a decade old.

-- 
Kip Warner
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


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