Re: [NTG-context] Math align not working

2020-12-31 Thread Aditya Mahajan
On Wed, 30 Dec 2020, Johann Birnick wrote:

> Okay, but I think it's a bug, because as you see in the linked pdf it worked 
> the
> simple way some years ago...

Yes, something has changed internally. Earlier, if you used:

\startalign[align={right,left}, n=4]
 ...
\stopalign

then the alignment was right left right left, i.e., the alignment cycled. Now, 
the alignment is right left left left, i.e., unspecified alignments default to 
left. So, in your example, each column in the second "block" is left aligned. 
To change that, you can use:

\starttext 

\startformula \startalign[m=2,distance=8em,n=5,
align={right,middle,middle,middle,left, right,middle,middle,middle,left}]
\NC 0 \NC < \NC 2x + 5y \NC < \NC 10
\NC 4 \NC < \NC 3x + y \NC < \NC 9 \NR
\NC 3 \NC < \NC 2y + 3z \NC < \NC 15
\NC 10\NC < \NC 8y + 5z \NC < \NC 20 \NR
\stopalign \stopformula

\stoptext

But this is ugly. 

I haven't looked at the math alignment code in a while, but I'll check with 
Hans if the old behavior can be reintroduced. 

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

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


Re: [NTG-context] drop shadows with metapost/ metafun

2020-12-31 Thread Aditya Mahajan
On Fri, 1 Jan 2021, Aditya Mahajan wrote:

> On Tue, 29 Dec 2020, Garulfo wrote:
> 
> > Which process would you advice to add « drop shadows » to any kind of 
> > metafun / metapost figures like:
>
> > Actually, all this seems long and tedious, and contrasts with the already 
> > existing links between MetaPost / MetaFun and cairo + libpng.
> 
> There was a drops module by Peter Rolf, which provides exactly these features:
> 
> https://mailman.ntg.nl/pipermail/ntg-context/2016/084242.html
> 
> It is not part of modules.contextgarden.net and the url in the previous post 
> is no longer valid. 
> 
> I am CC:ing Peter and perhaps he can point to the updated location for the 
> module. 

Also, if you don't want the shadows to be too nice, you can also translate the 
fake shadows used by tikz to metapost:

https://adityam.github.io/context-blog/post/drop-shadow-with-lifted-corners/

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

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


Re: [NTG-context] drop shadows with metapost/ metafun

2020-12-31 Thread Aditya Mahajan
On Tue, 29 Dec 2020, Garulfo wrote:

> Which process would you advice to add « drop shadows » to any kind of metafun 
> / metapost figures like:
> picture p;
> p := textext("MetaPost is fun!") shifted (10cm,10cm);
> 
> My current understanding of the required steps :
> 
> 
> 1- fill p with the shadow color
> 
> 2- write it to an external metapost file (with savebuffer ?) ready for png 
> export (outputformat := "png »;)
> 
> 3- with lua, os.execute, and imagemagick prepare the shadow
>   - extent the png file with a transparent background, to have room for 
> blurring 
>   - blur it
> 
> 4- import this png in context / Metapost (externalfigure), and center it with 
> p figure
> 
> 5- shift it according to the desired shadows distance and angle
> 
> 6- apply the initial bounding box of p to the shadow, draw the shadow, draw 
> the p picture 
> 
> 
> Actually, all this seems long and tedious, and contrasts with the already 
> existing links between MetaPost / MetaFun and cairo + libpng.

There was a drops module by Peter Rolf, which provides exactly these features:

https://mailman.ntg.nl/pipermail/ntg-context/2016/084242.html

It is not part of modules.contextgarden.net and the url in the previous post is 
no longer valid. 

I am CC:ing Peter and perhaps he can point to the updated location for the 
module. 

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

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


Re: [NTG-context] prevent error page

2020-12-31 Thread Aditya Mahajan
On Thu, 31 Dec 2020, Johann Birnick wrote:

> Hi there,
> 
> in my setup I constantly have a pdf viewer open showing the output of context.
> When I recompile the viewer updates.
> 
> Now if there is an error, the document fails to compile, of course. Previously
> the pdf file just remainded untouched, nice. But now with LMTX, the pdf will 
> be
> overwritten with a pdf just saying "error". This makes my pdf viewer crash!
> I can't work like this.
>
> So how to prevent this "error" page and just let context remain the pdf
> untouched if there is an error?

You can try:

context --nodummy filename

which will not generate the "error" pdf. However, if the error was such that 
context had to abort the run, then no valid PDF will be generated. You cannot 
have the previous PDF untouched because context starts overwriting the PDF 
while processing. 

Another option is to use

context --result=output.pdf filename

in which case context writes the result to output.pdf. If there is an error, 
then output.pdf is not overwritten. Depending on your pdf viewer, this might 
work better.

Aditya

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

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


Re: [NTG-context] xrightarrow specific size issue

2020-12-31 Thread Aditya Mahajan
On Thu, 31 Dec 2020, Johann Birnick wrote:

> Hi there,
> 
> \starttext
> $\xrightarrow[50pt]$
> \stoptext
> 
> doesn't work. But it should, right? In the manual
> 
> \starttext
> $\xrightarrow[50]$
> \stoptext
> 
> is shown, but that doesn't work either.

The syntax is:

\xrightarrow{top}

or 

\xrightarrow{top}{bottom}

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

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


Re: [NTG-context] underbrace spacing

2020-12-31 Thread Aditya Mahajan
On Thu, 31 Dec 2020, Johann Birnick wrote:

> Hi there,
> 
> if I do
> 
> \starttext
> $4 \underbrace{+ 3}_{\text{because of lorem} + 2}$
> \stoptext
> 
> then the spacing gets really big because of the long. How can I prevent this?
> 
> (in LaTeX one can use \mathcal or so and that works)

Do you mean \mathclap? If so, then in Context, \clap works correctly in both 
text and math mode. So, you can just use:

\starttext
$4 \underbrace{+ 3}_{\clap{\text{because of lorem} + 2}}$
\stoptext


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

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


[NTG-context] underbrace spacing

2020-12-31 Thread Johann Birnick
Hi there,

if I do

\starttext
$4 \underbrace{+ 3}_{\text{because of lorem} + 2}$
\stoptext

then the spacing gets really big because of the long. How can I prevent this?

(in LaTeX one can use \mathcal or so and that works)

Best regards,
Johann

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

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


[NTG-context] xrightarrow specific size issue

2020-12-31 Thread Johann Birnick
Hi there,

\starttext
$\xrightarrow[50pt]$
\stoptext

doesn't work. But it should, right? In the manual

\starttext
$\xrightarrow[50]$
\stoptext

is shown, but that doesn't work either.

Best regards,
Johann

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

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


[NTG-context] prevent error page

2020-12-31 Thread Johann Birnick
Hi there,

in my setup I constantly have a pdf viewer open showing the output of context.
When I recompile the viewer updates.

Now if there is an error, the document fails to compile, of course. Previously
the pdf file just remainded untouched, nice. But now with LMTX, the pdf will be
overwritten with a pdf just saying "error". This makes my pdf viewer crash!
I can't work like this.

So how to prevent this "error" page and just let context remain the pdf
untouched if there is an error?

Best regards,
Johann

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

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


Re: [NTG-context] Text editor support via Digestif

2020-12-31 Thread Jan U. Hasecke
Dear Augusto,



Am 31.12.20 um 10:25 schrieb Augusto Stoffel:
> Hi all,
> 
> I have worked a bit on ConTeXt support in the Digestif language server
> [1], and I think it's pretty usable by this point, so I would like to
> invite everyone to check it out. Feedback is welcome.

this looks great. Thanks a lot for this.

Unfortunately I get

Company mode enabled in current buffer
Yas minor mode enabled in current buffer
eglot--connect: Symbol’s function definition is void: project-root

when I activate eglot in emacs.

Using

(require 'company-lsp)
(add-to-list 'company-lsp-filter-candidates '(digestif . nil))

Using lsp-mode I get

progn: Symbol’s value as variable is void: company-lsp-filter-candidates

for

(add-to-list 'company-lsp-filter-candidates '(digestif . nil))

I have no experience with using either eglot or lsp-mode. So I am afraid
that I have to adjust something more than written on your Github page.

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

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


[NTG-context] \startblockquote…\stopblockquote issue

2020-12-31 Thread Alan Bowen
In the latest standalone ( ConTeXt  ver: 2020.12.30 16:45 LMTX  fmt:
2020.12.30),
\startblockquote and \stopblockquote do not work when I use the key,
method=font, or include \setupquotation[method=font].

MWE
%\setupquotation[method=font]
\setupdelimitedtext[blockquote][
% method=font,
  before={\blank[small,fixed]
  \setupnarrower[left=1.5pc,right=0pc]
  \startnarrower[left,right]
\noindentation\switchtobodyfont[9pt]},
  after={\par\stopnarrower
  \blank[small,fixed]
\noindentation},]
\starttext
\input ward
\startblockquote
\input ward
\stopblockquote
\stoptext

I am attempting to get protrusion of the left double quotation mark into
the left margin when possible at the start of a line and do not
understand why my block quotations are not appearing as expected.

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

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


[NTG-context] Font feature not applied in some cases

2020-12-31 Thread Joseph
I could reproduce this occasionally occuring unexpected output in following MWE.Seems linked to calt=yes feature being set and ordn=yes being set and letter ‘f’ (some other letters such as ‘b’ work fine). Thanks as always for help. \definefontfeature[noteref][mode=node, ordn=yes] \definefontfeature[default][default][calt=yes] % works if calt is not set\definefontfamily[mainfont][serif][EBGaramond]\setupbodyfont[mainfont, 9pt] \define[1]\Sup{{\feature[+][noteref]#1}} \starttext \dontleavehmode e \Sup{f}*word % f is not superscript if calt is set \dontleavehmode e \Sup{b}*word \stoptext  
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Ducks in ConTeXt

2020-12-31 Thread Wolfgang Schuster

Jairo A. del Rio schrieb am 24.12.2020 um 15:18:

Hi everyone!

I've recently ported TikZducks to ConTeXt and finally removed TIkZ 
along the way. So a new module was created. The module is called 
"metaducks" (lol) and it's essentially a \useMPgraphic{...} with a lot 
of options, most of them ported from TikZducks. For those not familiar 
with the package, it draws customized rubber ducks :) I want to 
include some more, so I'll gladly read any feedback, recommendations 
and suggestions. Eventually I want it to be a module on its own. The 
module is already in the ConTeXt Group:


https://modules.contextgarden.net/cgi-bin/module.cgi/action=details/id=105

in case anyone wants to give it a try. Here's a minimal example:

\usemodule[metaducks]
\starttext
\ducks[santa=true,mug=true]
\stoptext

I wish the best for you all. Happy holidays!


It's nice to see a new third party module for ConTeXt but you have to 
make a few changes.


1. You have to put the module and the documentation in the correct doc 
and tex folders.


2. You should give your manual a better name, e.g. metaducks-manual.tex

3. You can put your color definitions in the module, there is no need 
for a new color file, especially because most of the colors you use are 
already predefined.


Wolfgang

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

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


[NTG-context] Minor issue with font kern amount being doubled

2020-12-31 Thread Joseph
Dear list, Rare cases only but I thought it’d worth reporting this difference I could not understand.Could reproduce this problem with a simple MWE below. Kerning between ‘v’ and dot is doubled if \feature macro is used. Thanks \definefontfeature[xvicentury][mode=node]\definefontfeature[default][default][kern=yes]\definefontfamily[mainfont][serif][EBGaramond]\setupbodyfont[mainfont, 9pt]\showfontkerns \starttextChapitre {\feature[-][xvicentury]v}. % double kerning between v and . compared to below line. Chapitre v.\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Text editor support via Digestif

2020-12-31 Thread Augusto Stoffel

Hi all,

I have worked a bit on ConTeXt support in the Digestif language server
[1], and I think it's pretty usable by this point, so I would like to
invite everyone to check it out. Feedback is welcome.

Digestif plugs into any editor that support the Language Server
Protocol, and provides the usual IDE features: completion (of
commands, keyword arguments, references, citations), go to definition,
find references, document outline, etc. Among the fancier features is
fuzzy-matching, so you can, say, find a citation by typing parts of the
title or author names (and get away with using meaningless BibTeX
identifiers).

The newest (git) version reads the ConTeXt interface files at runtime,
so it should be pretty accurate, and also work with third-party
packages. It would be cool to also have some integrated
documentation, but it looks like ConTeXt (or TeX in general) doesn't
have anything of help in this direction currently, right?

Another nice thing is that Digestif is a Lua program, and can run on
the LuaTeX interpreter with no extra dependencies. On the other hand, I
didn't get the change to test it on Windows or editors other than
Emacs, although both things should work with minimal adjustments. Let
me know if you have any issues.

Best,

Augusto

[1]: https://github.com/astoff/digestif


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

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