[NTG-context] Re: (again) wrong destination types?
> On 3 Dec 2023, at 15:26, Pablo Rodriguez via ntg-context > wrote: > > On 11/22/23 00:06, Bruce Horrocks wrote: >> [...] >> I changed your example to the following: >> \setupinteraction[state=start, page=name, focus=standard] >> \starttext >> \input knuth \par >> a\footnote{b} \par >> \dorecurse{7}{\input knuth \par} >> \stoptext > > Many thanks for your fast reply, Bruce. > > I wanted to reply much sooner, but it was really impossible for me. > >> From your explanation, the first link (body to footnote, your point b) > has destination to fit the whole page inside the viewer. > > The second link (footnote to body, your point c) has the destination to > reach a position inside the page (where the destination lies). This is > what "focus=standard" should achieve. > > In PDF terms (simplified), fit to page destinations are /Fit > destinations and placed destinations are /XYZ destinations. > > This sample shows what might be the root issue here: > > \setupinteraction[state=start, page=name, focus=standard] > \starttext > \completecontent > \chapter{Chapter} > a\footnote{b} > \stoptext > > ConTeXt handles internally links in categories. For some reason unknown > to me, "page=name" triggers that special operation links contain /Fit > instead /XYZ destinations. > > This is similar to the wrong link destinations (fit instead of standard) > from TOC (but not in footnotes [which are right]) when compiled with MkIV: > > \setupinteraction[state=start, focus=standard] > \starttext > \completecontent > \chapter{Chapter} > a\footnote{b} > \stoptext > > I hope it is clearer now. Let me know if it is not. > > My issue is that I cannot avoid having "page=name" for links to external > documents, but this breaks footnotes and other special operation links. What are you using for links to external documents? If just a single command such as \goto then you might be able to get away with defining a wrapper (e.g. \myGoto) that does \setupinteraction[state=start,page=name,focus=standard] then the \goto command then \setupinteraction[state=start,page=fit,focus=standard] afterwards. (Assuming calling \setupinteraction that many times does not cause problems in itself.) — 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: Inline math spacing
On 12/4/2023 2:42 PM, Alexandre Christe wrote: Hi Hans, Thanks for your answer. It helps a lot. Would there be a way to only add space when inline math is not followed by punctuation, i.e., when inline math is followed by a space? A. Christe Le 4 déc. 2023 à 14:08 +0100, Hans Hagen , a écrit : \setupmathematics[textdistance=.25em plus .1em minus .1em] Hm, I can make it optional (engine feature then) but will discuss it with Mikael first. 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: externalfigure crashed
On 12/4/2023 5:38 PM, Pablo Rodriguez via ntg-context wrote: On 11/24/23 18:16, Hans Hagen via ntg-context wrote: […] will do for now ... i can't upload a new installer .. pending the built; the advantage is that i can do some experiments that would otherwise break the current version (making compact font mode very close to normal, pdf signing […] Sorry, Hans, if I am missing the point. Does the above mean that ConTeXt will be able to sign PDF documents with digital certificates? Well, that's what singing is, right? The problem is actually less in the signing than in the certificates themselves. Basically one can sign (with some certificate) and then validate. % sign-001.tex \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 neing processed: mtxrun --script pdf --sign --certificate=sign-001.pem --password=test sign-001 (--library) and: mtxrun --script pdf --validate --certificate=sign-001.pem --password=test sign-001 (--library) etc. works here. 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: externalfigure crashed
On 11/24/23 18:16, Hans Hagen via ntg-context wrote: > […] > will do for now ... i can't upload a new installer .. pending the built; > the advantage is that i can do some experiments that would otherwise > break the current version (making compact font mode very close to > normal, pdf signing […] Sorry, Hans, if I am missing the point. Does the above mean that ConTeXt will be able to sign PDF documents with digital certificates? 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: multipage metapost output from ConTeXt
Dear Emanuel, > Le 2 déc. 2023 à 12:08, Emanuel Han via ntg-context a > écrit : > > Hi Mikael, > > here's a very simple mwe for the label(textext()) issue. On page 1, the text > "Word 1" should be drawn in position z1. On page 2, the same text in the same > position should be visible, and the text "Mot 2" in position p2 should be > added. And so on. > > \startMPinclusions > > picture p[]; > path TheFrame ; > TheFrame := fullsquare scaled 5in ; > > z1 = (60,40); > z2 = (40,90); > z3 = (10,70); > > p1:=image( > label(textext("Word 1"), z1); > ); > > p2:=image( > label(textext("Mot 2"), z2); > ); > > p3:=image( > label(textext("Parola 3"), z3); > ); > > \stopMPinclusions > > \starttext > > \dorecurse{3}{ % Frame > \startMPpage[pagestate=start] > currentime := #1 ; > % Just for learning : > draw TheFrame withpen pencircle scaled .1in withcolor magenta ; > draw textext("T="(currentime)) scaled 2 shifted(0,2in) withcolor > magenta ; > for k=1 upto currentime: draw p[k]; endfor > setbounds currentpicture to TheFrame ; > > desiredformat := 1080;% In pixels (will be converted by default at 72dpi) > currentpicture := currentpicture xysized (desiredformat ,desiredformat ); > > \stopMPpage > } > > \stoptext > > On Dez. 2 2023, at 5:22 pm, Mikael Sundqvist wrote: > Hi Emanuel, > > I am not sure I understand your question, and since you use fonts that > i do not have, I cannot test your example as is. But, maybe, if you > want to redraw a picture, you can do > > addto currentpicture also p1; > > where you want it. > > /Mikael > > PS For the text thing, I did not get it. Could one have a _very > simple_ example showing only that problem and no other problem? > > On Sat, Dec 2, 2023 at 12:58 PM fv leung wrote: > > > > You didn't specify the color of path A in p2 and p4. So it's drawn in black. > > The other issue, I can't help. > > > > Emanuel Han via ntg-context 於 2023年12月2日 週六 下午7:23寫道: > >> > >> So is there a way to circumvent these issues? Or an explanation for this > >> behavior, so that I can try to find a solution by myself? > >> > >> Thanks > >> Emanuel > >> > >> On Nov. 29 2023, at 12:25 pm, Emanuel Han via ntg-context > >> wrote: > >> > >> Dear Aditya and Fabrice, > >> thanks for your responses. > >> > >> I included some of Fabrice's code into mine for testing purpose, and > >> indeed the multipage works now. > >> What is bizarre is that issues appear now that didn't appear before: > >> > >> Path A is drawn with color red on page 1, and in color black on all > >> following pages, while it should stay red. > >> textext(, ) is overwriting with > >> "T="(currentime) which has been used previously in textext() > >> before the for k=1 endfor loop. This overwriting happens only for the > >> first textext() which occurs inside the for k=1 endfor loop. All other > >> textext() inside the for k=1 endfor loop are not drawn at all. If the line > >> « draw textext("T="(currentime)) scaled 2 shifted(0,2in) withcolor > >> magenta ; » is commented out, the first textext() inside the for k=1 > >> endfor loop is not drawn neither. It must be an issue with textext(), > >> because when I replace textext() by lmt_outline[], the text is drawn. > >> > >> Adjusted mwe: > >> > >> \enableregime[utf] % enable unicoded input > >> > >> \definefontfamily [RomanFont] [rm] [calluna] > >> > >> \definefontfamily [KoreanFont] [rm] [applemyungjo] > >> > >> \definefontfamily [JapaneseFont] [rm] [hannotatesc] > >> > >> \definefontfeature > >> [fea] > >> [mode=node,language=dflt,script=arab, > >> init=yes, > >> medi=yes, > >> fina=yes, > >> isol=yes, > >> calt=yes, > >> rlig=yes, > >> tlig=yes, > >> trep=yes, > >> curs=yes, > >> kern=yes, > >> mark=yes > >> ] > >> > >> \starttypescript [serif] [notonaskharabic] > >> \definefontsynonym [notonaskharabic-Light] [name:notonaskharabic] > >> [features=fea] > >> \definefontsynonym [notonaskharabic-Bold] [name:notonaskharabic] > >> [features=fea] > >> \definefontsynonym [notonaskharabic-Italic] [name:notonaskharabic] > >> [features=fea] > >> \definefontsynonym [notonaskharabic-Bold-Italic] [name:notonaskharabic] > >> [features=fea] > >> \stoptypescript > >> > >> \starttypescript [serif] [notonaskharabic] > >> \usetypescript[serif][fallback] > >> \definefontsynonym [Serif] [notonaskharabic-Light] [features=fea] > >> \definefontsynonym [SerifItalic] [notonaskharabic-Italic] [features=fea] > >> \definefontsynonym [SerifBold] [notonaskharabic-Bold] [features=fea] > >> \definefontsynonym [SerifBoldItalic] [notonaskharabic-Bold-Italic] > >> [features=fea] > >> \stoptypescript > >> > >> \starttypescript [notonaskharabic] > >> \definetypeface [notonaskharabic] [rm] [serif] [notonaskharabic] [default] > >> \stoptypescript > >> > >> \usetypescript[notonaskharabic] > >> > >> \setupbodyfont [RomanFont] > >> > >> \usecolors[crayola] > >> > >> \startMPinclusions > >> > >> picture p[]; > >> path TheFrame ; > >> TheFrame := fullsquare scaled
[NTG-context] Re: Inline math spacing
Hi Hans, Thanks for your answer. It helps a lot. Would there be a way to only add space when inline math is not followed by punctuation, i.e., when inline math is followed by a space? A. Christe Le 4 déc. 2023 à 14:08 +0100, Hans Hagen , a écrit : > > \setupmathematics[textdistance=.25em plus .1em minus .1em] ___ 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: Inline math spacing
On 12/4/2023 6:43 AM, Alexandre Christe wrote: Hi, Here’s a MWE: \setupinterlinespace[line=3ex] \definefontfeature[default][default][lnum=yes,tnum=yes] \usetypescriptfile[alegreya_libertinus] \setupbodyfont[alegreya-light,ss,10pt] \setupmathematics[autopunctuation={all}] % math definitions \enablemathautospacing % more global % \enablemathautofencing % more global \enablemathautonumbers % more global % \autofences % more local \usemodule[ipsum] \starttext \ipsum \stoptext And I attach the two files to setup the font. no math ... anyway \showglyphs \dorecurse{100}{test \im{\frac{#1}{3}} test } \setupmathematics[textdistance=.25em plus .1em minus .1em] \dorecurse{100}{test \im{\frac{#1}{3}} test } will give more space but it's mostly optical that the math related spacing looks doferent from regular spaces. - 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 ___