Re: [NTG-context] insert natural table at the top left of some png
Thank you very much Hans ! One of my first thoughts today was using layers (did not think about it earlier, because I was too focused on plain TeX boxes), but I am quite new to this topic. Thanks to your code, I will have time to learn how to use them. Greetings, Damien Thiriet On Mon, Oct 15, 2018 at 11:15:00PM +0200, Hans Hagen wrote: > \definecolor[canaux][h=81b3e0] > > \startreusableMPgraphic{voies} > drawarrow > (0,0) -- (20,0) > withcolor black ; > \stopreusableMPgraphic > > \startreusableMPgraphic{canaux} > drawarrow > (0,0) -- (20,0) > withcolor \MPcolor{canaux} withpen pencircle scaled 2pt; > \stopreusableMPgraphic > > \startbuffer[legend] > \bTABLE[frame=off] > \bTR >\bTH 1) \eTH \bTH Le milieu \eTH \bTH 2) \eTH \bTH Les > activités \eTH > \eTR > \bTR > \bTD > \externalfigure[t:/sources/mill.png][height=12bp] > \eTD > \bTD > zones urbaines > \eTD > \eTR > \bTR > \bTD > \inframed[frame=off,offset=0pt]{\reuseMPgraphic{voies}} > \eTD > \bTD > infrastructures~: voies ferrées > \eTD > \eTR > \bTR >\bTD > \inframed[frame=off,offset=0pt]{\reuseMPgraphic{canaux}} > \eTD > \bTD > infrastructures~: canaux > \eTD > \eTR > \eTABLE > \stopbuffer > > \definelayer > [legend] > [width=\overlaywidth, >height=\overlayheight] > > \starttext > > % \setlayer > % [legend] > % {\getbuffer[legend]} > > \setlayerframed > [legend] > [background=color, >backgroundoffset=2pt, >backgroundcolor=red, >strut=no, >frame=off] > {\getbuffer[legend]} > > \externalfigure > [t:/sources/cow.pdf] > [background={foreground,legend}, >width=0.9\textwidth] > > \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] insert natural table at the top left of some png
On 10/15/2018 8:11 PM, Damien Thiriet wrote: Hello, I am still working on maps and facing some new issue. The program I used to design one map is not convenient for writing key to symbols, and what I have is a map.png file with big spare space on its upper left corner. So I have either to write on the png with ImageMagick or GIMP, or have a nicer output with ConTeXt. I wrote this legend file. \definecolor[canaux][h=81b3e0] \startreusableMPgraphic{voies} path p; p:= (0,0) -- (20,0) ; drawarrow p withcolor black ; \stopreusableMPgraphic \startreusableMPgraphic{canaux} path p; p:= (0,0) -- (20,0) ; drawarrow p withcolor \MPcolor{canaux} withpen pencircle scaled 2pt; \stopreusableMPgraphic \startbuffer \bTABLE[frame=off] \setupTABLE[column][1,3][align={middle,lohi}] \bTR \bTH 1) \eTH \bTH Le milieu \eTH \bTH 2) \eTH \bTH Les activités \eTH \eTR \bTR \bTD \externalfigure[illustrations/zone_urbaine][height=12bp] \eTD \bTD zones urbaines \eTD \eTR \bTR \bTD \leavevmode \reuseMPgraphic{voies} \eTD \bTD infrastructures~: voies ferrées \eTD \eTR \bTR \bTD \leavevmode \reuseMPgraphic{canaux} \eTD \bTD infrastructures~: canaux \eTD \eTR eTR \eTABLE \stopbuffer The idea was to make some \hbox{ \externalfigure[map][width=0.9 \textwidth] \vbox{\hfill -0.9 \textwidth \getbuffer } } to put the boxed legend at this upper left corner. Of course I couldn't succeed, since I do not understand so much boxes. ConTeXt complains with a missing number. How could I achieve such boxing ? \definecolor[canaux][h=81b3e0] \startreusableMPgraphic{voies} drawarrow (0,0) -- (20,0) withcolor black ; \stopreusableMPgraphic \startreusableMPgraphic{canaux} drawarrow (0,0) -- (20,0) withcolor \MPcolor{canaux} withpen pencircle scaled 2pt; \stopreusableMPgraphic \startbuffer[legend] \bTABLE[frame=off] \bTR \bTH 1) \eTH \bTH Le milieu \eTH \bTH 2) \eTH \bTH Les activités \eTH \eTR \bTR \bTD \externalfigure[t:/sources/mill.png][height=12bp] \eTD \bTD zones urbaines \eTD \eTR \bTR \bTD \inframed[frame=off,offset=0pt]{\reuseMPgraphic{voies}} \eTD \bTD infrastructures~: voies ferrées \eTD \eTR \bTR \bTD \inframed[frame=off,offset=0pt]{\reuseMPgraphic{canaux}} \eTD \bTD infrastructures~: canaux \eTD \eTR \eTABLE \stopbuffer \definelayer [legend] [width=\overlaywidth, height=\overlayheight] \starttext % \setlayer % [legend] % {\getbuffer[legend]} \setlayerframed [legend] [background=color, backgroundoffset=2pt, backgroundcolor=red, strut=no, frame=off] {\getbuffer[legend]} \externalfigure [t:/sources/cow.pdf] [background={foreground,legend}, width=0.9\textwidth] \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] what defines the font size?
On 10/15/2018 10:02 PM, Ulrike Fischer wrote: Am Mon, 15 Oct 2018 21:21:32 +0200 schrieb Pablo Rodriguez: Dear list, sorry for this basic question, but what defines the size in a font? I mean, we can take TeX Gyre Bonum and TeX Gyre Adventor at twelve points. x-height is different, M-width is slightly different. I thought it was the same A-height, but it isn’t. If two fonts have the same size, I think there may be a dimension which has the same length in both. Which one is this? None. The font decides about its size. actually, the designer ... anyway, one can compare 10pt dejavu with 10pt latin modern and 10pt lucida and you'll see that there is no real standard in size (and when one sees documents made by tex on the web it looks like not all users care about mixing funny sizes, but then, most webpages don't do it so they might consider it normal) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] what defines the font size?
Am Mon, 15 Oct 2018 21:21:32 +0200 schrieb Pablo Rodriguez: > Dear list, > > sorry for this basic question, but what defines the size in a font? > > I mean, we can take TeX Gyre Bonum and TeX Gyre Adventor at twelve > points. x-height is different, M-width is slightly different. > > I thought it was the same A-height, but it isn’t. > > If two fonts have the same size, I think there may be a dimension which > has the same length in both. Which one is this? None. The font decides about its size. -- Ulrike Fischer https://www.troubleshooting-tex.de/ ___ 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] what defines the font size?
Dear list, sorry for this basic question, but what defines the size in a font? I mean, we can take TeX Gyre Bonum and TeX Gyre Adventor at twelve points. x-height is different, M-width is slightly different. I thought it was the same A-height, but it isn’t. If two fonts have the same size, I think there may be a dimension which has the same length in both. Which one is this? Sorry for the basic question and many thanks for your help, Pablo -- http://www.ousia.tk ___ 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] insert natural table at the top left of some png
Hello, I am still working on maps and facing some new issue. The program I used to design one map is not convenient for writing key to symbols, and what I have is a map.png file with big spare space on its upper left corner. So I have either to write on the png with ImageMagick or GIMP, or have a nicer output with ConTeXt. I wrote this legend file. \definecolor[canaux][h=81b3e0] \startreusableMPgraphic{voies} path p; p:= (0,0) -- (20,0) ; drawarrow p withcolor black ; \stopreusableMPgraphic \startreusableMPgraphic{canaux} path p; p:= (0,0) -- (20,0) ; drawarrow p withcolor \MPcolor{canaux} withpen pencircle scaled 2pt; \stopreusableMPgraphic \startbuffer \bTABLE[frame=off] \setupTABLE[column][1,3][align={middle,lohi}] \bTR \bTH 1) \eTH \bTH Le milieu \eTH \bTH 2) \eTH \bTH Les activités \eTH \eTR \bTR \bTD \externalfigure[illustrations/zone_urbaine][height=12bp] \eTD \bTD zones urbaines \eTD \eTR \bTR \bTD \leavevmode \reuseMPgraphic{voies} \eTD \bTD infrastructures~: voies ferrées \eTD \eTR \bTR \bTD \leavevmode \reuseMPgraphic{canaux} \eTD \bTD infrastructures~: canaux \eTD \eTR eTR \eTABLE \stopbuffer The idea was to make some \hbox{ \externalfigure[map][width=0.9 \textwidth] \vbox{\hfill -0.9 \textwidth \getbuffer } } to put the boxed legend at this upper left corner. Of course I couldn't succeed, since I do not understand so much boxes. ConTeXt complains with a missing number. How could I achieve such boxing ? Thanks, Damien Thiriet ___ 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] wrong hyphenation in ancient Greek?
On 10/15/18 10:44 AM, Arthur Reutenauer wrote: > [...] > You can see that γμ is not there (nor, of course, γν, which was > expected). If it was, the pattern 2γ1μ would force the break πράγ-μα, > hence its absence leads me to believe that the breaks before γμ are > intentional. I suggest you contact Dimitrios Filippou, the main author > of the patterns, to ask if it was somehow an oversight or if he was > following a different rule (email address at the top of the file linked > to, in a slightly obfuscated form). Many thanks for your reply, Arthur. I’m going to contact Dimitrios to check what is going on here. Pablo -- http://www.ousia.tk ___ 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] wrong hyphenation in ancient Greek?
Am 2018-10-15 um 10:44 schrieb Arthur Reutenauer : > On Sat, Oct 13, 2018 at 11:05:01AM +0200, Thomas A. Schmitz wrote: >>failed. Arthur is the guru here, so maybe he has a suggestion? > > Ah, I was going for a title that inspired more awe, like “Emperor of > Hyphenation”, but guru will do for the time being :-) I thought you were the hat of hyphenation. Best, Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] wrong hyphenation in ancient Greek?
On Sat, Oct 13, 2018 at 11:49:31AM +0200, Pablo Rodriguez wrote: > I have just discovered that LuaLaTeX (from the TeX Live version that > comes with Fedora 32) does exactly the same with ancient Greek > (hyphenation is fine in modern polytonic Greek). All the TeX engines and formats use hyphenation pattern files that derive from a common repository that Mojca and I maintain (although I see that ConTeXt’s are slightly outdated), nothing strange here. Best, Arthur ___ 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] wrong hyphenation in ancient Greek?
On Sat, Oct 13, 2018 at 11:05:01AM +0200, Thomas A. Schmitz wrote: > You're right, this shouldn't happen. I tried in vain to find the culprit in > lang-agr.lua and to see more with > > \enabletrackers[hyphenator.visualize,hyphenator.steps,languages.patterns] > > failed. Arthur is the guru here, so maybe he has a suggestion? Ah, I was going for a title that inspired more awe, like “Emperor of Hyphenation”, but guru will do for the time being :-) The reason you can’t find any obvious culprit is because you need to look at the patterns that are missing: taking πράγματσς as an example, the matching patterns are .π4 ά1 α1 ο1 4ς. that allow a break after any vowel and prohibit breaks after the first letter and before the last letter in the word (which is relevant because \lefthyphenmin and \righthyphenmin are both set to 1). Since these are the only patterns that apply, the possible hyphenation points are thus πρά-γμα-τος Digging deeper in the pattern file, you’ll see that it takes quite many two-consonant clusters into account, starting at line 267 of the master file in the repository, with a comment “other divisable consonant combinations” (https://github.com/hyphenation/tex-hyphen/blob/82e5651/hyph-utf8/tex/generic/hyph-utf8/patterns/tex/hyph-grc.tex#L267): 2β1γ 2β1ζ 2β1θ 2β1κ ... 2γ1θ 2γ1κ 2γ1ξ 2γ1π ... You can see that γμ is not there (nor, of course, γν, which was expected). If it was, the pattern 2γ1μ would force the break πράγ-μα, hence its absence leads me to believe that the breaks before γμ are intentional. I suggest you contact Dimitrios Filippou, the main author of the patterns, to ask if it was somehow an oversight or if he was following a different rule (email address at the top of the file linked to, in a slightly obfuscated form). Best, Arthur ___ 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 ___