[NTG-context] Re: How can I use a variable for a MetaPost coordinate ?

2023-10-05 Thread peter.hopcroft--- via ntg-context
Yes, indeed. The metafun manual also explains things about overlays and layers 
I hadn't known. I'd previously ignored that manual.

Thank you,
Peter

> On 5/10/2023, at 7:05 PM, Thomas A. Schmitz  
> wrote:
> 
> Have a look at chapter 6.4 of the metafun manual. You need StartPage ... 
> StopPage in your MPcode, then you can knock yourself out by using variables 
> such as PaperHeight or TextHeight and do all sorts of calculations.
> 
> All best
> 
> Thomas
> 
> On 10/5/23 05:54, peter.hopcroft--- via ntg-context wrote:
>> Hello list, I want to draw lines on a page. I want to pass my line 
>> coordinates as a percent of \width or \textheight, rather than as 
>> millimetres. So that if I change the page size I don't need to change the 
>> coordinates. The MWE below compiles but the pdf does not have any lines 
>> drawn on it. Is there a way of doing calculations on the coordinates for the 
>> draw using ConTexT variables like \textheight? Thank you, Peter Hopcroft
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : {listname} / https://mailman.ntg.nl/mailman3/lists/{list_id}
> 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 : {listname} / https://mailman.ntg.nl/mailman3/lists/{list_id}
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: Gray gradient with Metapost

2023-10-05 Thread Henning Hraban Ramm

Am 05.10.23 um 21:50 schrieb Fabrice Couvreur:

Hi,
I would like to obtain, if possible, a gray gradient like in the image. 
My code uses Metapost but maybe this is possible with Metafun.


Have a look into the Metafun manual, chapter 8.1 “shading”.

Hraban

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

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

___


[NTG-context] Gray gradient with Metapost

2023-10-05 Thread Fabrice Couvreur
Hi,
I would like to obtain, if possible, a gray gradient like in the image. My
code uses Metapost but maybe this is possible with Metafun.
Thanks.
Fabrice

 \starttext
  \startMPcode
u=1.2cm;
interim ahangle := 30;

z0=(0,0);
z1=(3u,0);
z2=(3u,4u);
z3=(0,4u);
z4=(0.8u,4u);
z5=(2.2u,4u);

path rectangle;
rectangle=z0--z1--z2--z3--cycle;

picture X;
X = image(
drawoptions(withpen pencircle scaled 1.25 withcolor
\MPcolor{orange});
draw (left--right) scaled 2;
draw (down--up) scaled 2;
drawoptions();
);

fill z0--z4--z3--cycle withcolor .5[red,green];
fill z1--z5--z2--cycle withcolor .5[red,green];
fill z0--z4--z5--z1--cycle withcolor 0.625white;
draw z0--z4--z3--cycle;
draw z1--z5--z2--cycle;
draw rectangle;

path a[];
a1 = subpath (0, 1) of rectangle shifted 10 down;
a2 = subpath (3, 4) of rectangle shifted 10 left;
a3 = subpath (2.26, 2.76) of rectangle shifted 13 up;

drawdblarrow a1; label.bot("$30$", point 1/2 of a1);
drawdblarrow a2; label.lft("$x+20$", point 1/2 of a2);
drawdblarrow a3; label.top("$x$", point 1/2 of a3);

draw X shifted z0;
draw X shifted z1;
draw X shifted z2;
draw X shifted z3;
draw X shifted z4;
draw X shifted z5;

label.ulft("B",z3);
label.urt("C",z2);
label.lrt("D",z1);
label.llft("A",z0);
label.top("E",z4);
label.top("F",z5);
  \stopMPcode

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

maillist : {listname} / https://mailman.ntg.nl/mailman3/lists/{list_id}
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: Attempting to Generate PDF/A in LMTX

2023-10-05 Thread Henning Hraban Ramm

Am 05.10.23 um 02:00 schrieb jinho.k...@gmail.com:

Thank you for your response. I did not rename any profiles; I simply followed 
the instructions on https://wiki.contextgarden.net/PDF/A

Would you be able to share a MWE that correctly generates a PDF/A without 
errors?


No, sorry, never tried. I’m only concerned with PDF/X, and even that I 
just fix with Acrobat Pro.


Hraban

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

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

___


[NTG-context] workaround for wrapping SHA512

2023-10-05 Thread Pablo Rodriguez
Dear list,

I have just added another workaround to long hashes (such as SHA512).

It interleaves colons every two chars:
https://wiki.contextgarden.net/Wrapping#Another_workaround_interleaving_colons.

This makes a longer output, but it is more readable too.

Just in case it helps anyone (who previously discussed this in this
mailing list),

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

maillist : {listname} / https://mailman.ntg.nl/mailman3/lists/{list_id}
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: checkbox in fields show the word yes

2023-10-05 Thread juh via ntg-context
Hi,

three years later I would like to hint to this thread again and ask if
there is hope that checkboxes will work better in Acrobat any time soon. 

Am Fri, Dec 11, 2020 at 06:28:36PM +0100 schrieb Hans Hagen:
> On 12/11/2020 6:13 PM, Andres Conrado Montoya wrote:
> > Firefox doesn't show the "yes", nor Acrobat X, but SumatraPDF does. I
> > modified your definition as:
> > 
> > \definefield[test][check][cbox][][]
> > 
> > And now the "yes" doesn't appear. However, I don't know how this affects
> > the functionality of the form.
> these symbols (esp how deafults are handles) has alwaye been a bit of a mess
> in acrobat (read: different per version) and relates to appearance streams
> and such (when a form is made in acrobat these streams get added, it could
> even be some dingbat kicking in or being vectorized or ... seen all kind of
> variants) ... officially a rendering should listen to some keys that relate
> to it but this is not always the case
> 
> (part of the problem is, i think, that esp for check fields a bugs or
> behaviour  has become a feature which makes it kin dof inconsisten twith the
> rest of the widgets .. it's even worse when one uses parent / child across
> pages ... it hasn;t helped that hardly any viewer supported it which in turn
> means no feedback)
> 
> (in lmtx iu could probably generate appearance streams but i'll only do that
> when i have an application for these widgets so that i can test it)
> 
> Hans
> 
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

-- 
Autoren-Homepage: . http://literatur.hasecke.com
Satiren & Essays: . http://www.sudelbuch.de
Privater Blog:  http://www.hasecke.eu
Netzliteratur-Projekt:  http://www.generationenprojekt.de




signature.asc
Description: PGP signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : {listname} / https://mailman.ntg.nl/mailman3/lists/{list_id}
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 questions

2023-10-05 Thread Rik Kabel
Sorry, pandoc, not procmail.On Oct 5, 2023 09:05, Rik Kabel  wrote:On Oct 3, 2023 16:32, Henning Hraban Ramm  wrote:Am 03.10.23 um 02:02 schrieb Alan Braslau:

> On Mon, 2 Oct 2023 13:13:52 +0200

> Henning Hraban Ramm  wrote:

> 

>> Consider:

>> @Book {rattenhka,

>> author = "Bettina von Arnim and Gisela von Arnim",

>> title = "Das Leben der Hochgräfin Gritta von Rattenzuhausbeiuns",

>> …

>> }

>>

>> The authors are usually given as “Bettina and Gisela von Arnim”

>> (mother and daughter; similar “Jacob and Wilhelm Grimm” as brothers

>> or “Bettina and Achim von Arnim” as a couple) – is there a good

>> solution for related authors?

> 

> Multiple authors should be treated as multiple authors. That they are

> related is not and should not be a consideration in citing works. At

> least this is the practice that I know of for academic texts.

> 

> You can cheat and try to define one author with a combined first name,

> like

> author={Eames, Ray & Earl},

> but I don't know how that parses as I have never tried it; "and" is a

> reserved token used to define multiple authors. I wouldn't do it as I

> can think of many examples (Bjaer & Bjaer) where we give both credit,

> individually.



Thank you.



It seems like database solutions like BibTeX & Cie are generally not 

suitable for quoting books as they were published – and that’s important 

in the contexts of “my” authors (literary studies, history).



For my ConTeXt book, I thought it would make sense, and I would jump 

through some hoops just to use the system, but

– most sources that I want to list are never quoted (method=dataset)

– I would need to define my own rendering, e.g. don’t like the handling 

of names

– I need additional fields (custom rendering again)

– if I refer to sources, I want a URL or file path in a footnote (custom 

cite wrapper macro)

This all works fine without the btx subsysten (I just need to find 

solutions for some edge cases, or avoid them), so I probably had wrong 

ideas about bibliographies (at least in TeX).



OTOH, for my novel I can use the bib database approach for an extended 

person register; the required rendering is much less involved.



Hraban

___I got around this issue by generating ConTeXt source with procmail, my bib file, and a slightly customized CSL file. This gives me a bibliography that I modify with a Vim script to handle special cases as you describe, all controlled by a makefile. I insert the result into my document instead of using placebiographyI can provide more details if there is interest once I return home from travels.-- Rik___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : {listname} / https://mailman.ntg.nl/mailman3/lists/{list_id}
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 questions

2023-10-05 Thread Rik Kabel
On Oct 3, 2023 16:32, Henning Hraban Ramm  wrote:Am 03.10.23 um 02:02 schrieb Alan Braslau:

> On Mon, 2 Oct 2023 13:13:52 +0200

> Henning Hraban Ramm  wrote:

> 

>> Consider:

>> @Book {rattenhka,

>> author = "Bettina von Arnim and Gisela von Arnim",

>> title = "Das Leben der Hochgräfin Gritta von Rattenzuhausbeiuns",

>> …

>> }

>>

>> The authors are usually given as “Bettina and Gisela von Arnim”

>> (mother and daughter; similar “Jacob and Wilhelm Grimm” as brothers

>> or “Bettina and Achim von Arnim” as a couple) – is there a good

>> solution for related authors?

> 

> Multiple authors should be treated as multiple authors. That they are

> related is not and should not be a consideration in citing works. At

> least this is the practice that I know of for academic texts.

> 

> You can cheat and try to define one author with a combined first name,

> like

> author={Eames, Ray & Earl},

> but I don't know how that parses as I have never tried it; "and" is a

> reserved token used to define multiple authors. I wouldn't do it as I

> can think of many examples (Bjaer & Bjaer) where we give both credit,

> individually.



Thank you.



It seems like database solutions like BibTeX & Cie are generally not 

suitable for quoting books as they were published – and that’s important 

in the contexts of “my” authors (literary studies, history).



For my ConTeXt book, I thought it would make sense, and I would jump 

through some hoops just to use the system, but

– most sources that I want to list are never quoted (method=dataset)

– I would need to define my own rendering, e.g. don’t like the handling 

of names

– I need additional fields (custom rendering again)

– if I refer to sources, I want a URL or file path in a footnote (custom 

cite wrapper macro)

This all works fine without the btx subsysten (I just need to find 

solutions for some edge cases, or avoid them), so I probably had wrong 

ideas about bibliographies (at least in TeX).



OTOH, for my novel I can use the bib database approach for an extended 

person register; the required rendering is much less involved.



Hraban

___I got around this issue by generating ConTeXt source with procmail, my bib file, and a slightly customized CSL file. This gives me a bibliography that I modify with a Vim script to handle special cases as you describe, all controlled by a makefile. I insert the result into my document instead of using placebiographyI can provide more details if there is interest once I return home from travels.-- Rik___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : {listname} / https://mailman.ntg.nl/mailman3/lists/{list_id}
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 can I use a variable for a MetaPost coordinate ?

2023-10-05 Thread Thomas A. Schmitz
Have a look at chapter 6.4 of the metafun manual. You need StartPage ... 
StopPage in your MPcode, then you can knock yourself out by using 
variables such as PaperHeight or TextHeight and do all sorts of 
calculations.


All best

Thomas

On 10/5/23 05:54, peter.hopcroft--- via ntg-context wrote:
Hello list, I want to draw lines on a page. I want to pass my line 
coordinates as a percent of \width or \textheight, rather than as 
millimetres. So that if I change the page size I don't need to change 
the coordinates. The MWE below compiles but the pdf does not have any 
lines drawn on it. Is there a way of doing calculations on the 
coordinates for the draw using ConTexT variables like \textheight? Thank 
you, Peter Hopcroft



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

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

___