Re: [NTG-context] Malfunctioning of syllabic partitioning of words in Spanish
I am writing a document in Spanish and I notice that the syllable partitioning of words does not conform to the rules of the language. And so, for example, the word "limitarse" is partitioned as "lim-itarse" (the correct one is "li-mi-tar-se"), "colores" as "col-ores" (instead of "co-lo-res"), "abstenerse" as "absten-erse" (and it should be "abs-te-ner-se"), etc. Make sure that you set up the language correctly. Using this test file (on today's new upload): \language[es] % Needed for Spanish hyphenation \starttext \hsize=0pt % Hack to force hyphenation limitarse colores abstenerse \stoptext I get: li-mi-tar-se // co-lo-res // abs-te-ner-se I don't know any Spanish, but using your test words, I think that these are the expected results. Using the "pattern" script, I get slightly different results, but it still seems correct to me: $ mtxrun --script pattern --hyphenate --language=es limitarse [...] mtx-patterns| es 3 3 : limitarse : limi-tarse $ mtxrun --script pattern --hyphenate --language=es colores [...] mtx-patterns| es 3 3 : colores : colo-res $ mtxrun --script pattern --hyphenate --language=es abstenerse [...] mtx-patterns| es 3 3 : abstenerse : abs-te-nerse If adding "\language[es]" to your document doesn't help, I believe that there are a few Spanish speakers on the list who will know much more than I do about setting up the hyphenation. -- Max ___ 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] Malfunctioning of syllabic partitioning of words in Spanish
I am writing a document in Spanish and I notice that the syllable partitioning of words does not conform to the rules of the language. And so, for example, the word "limitarse" is partitioned as "lim-itarse" (the correct one is "li-mi-tar-se"), "colores" as "col-ores" (instead of "co-lo-res"), "abstenerse" as "absten-erse" (and it should be "abs-te-ner-se"), etc. These are too many errors; moreover, given that the syllabic partitioning rules in Spanish are relatively simple. Is it possible that something has been changed in the Spanish language module? I do not know Lua and therefore I am not in a position to correct the corresponding module on my own, but I could synthesize the syllable partitioning rules for those who can, if they do not speak Spanish and need help in that field. -- Joaquín Ataz López Universidad de Murcia | j...@um.es ___ 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] upload
Hi, With the latest upload, "tex.linebreak" doesn't return an "info" table. When running this code: \startluacode function test(head) local new_head, info = tex.linebreak(node.copylist(head)) print(head, type(head), info, type(info)) if info == nil then print "!!! info is nil !!!" end return head end nodes.tasks.appendaction("processors", "after", "test") \stopluacode \starttext Hello! \stoptext with the latest upload I get (also note the small typo in "rigthfill"): luatex warning > linebreak: no [ leftinit | rightinit | leftfill | rigthfill] expected 2353 : par vmodepar> userdatanil nil !!! info is nil !!! 2299 : glue userskip> userdatanil nil !!! info is nil !!! but with live.contextgarden.net I get: luatex warning > tex: left parfill skip is gone Underfull \hbox (badness 1) in paragraph at lines 20--1 929 : par vmode_par> userdata table: 0x39a050f7000table 1561 : glue userskip> userdatanil nil !!! info is nil !!! Thanks, -- Max ___ 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] MetaPost cutdraw
Hi, On Wed, Jul 6, 2022 at 11:29 AM Henning Hraban Ramm via ntg-context wrote: > > Am 06.07.22 um 09:15 schrieb Hans Hagen via ntg-context: > > On 7/6/2022 7:10 AM, Aditya Mahajan via ntg-context wrote: > >> On Wed, 6 Jul 2022, Henning Hraban Ramm via ntg-context wrote: > >> > >>> Hi, I’m trying to understand MetaPost better. > >>> > >>> I’d like to draw a fat line that’s cut at its end points. > >> > >> You mean like linecap = butt? > > Yes, but that doesn’t behave differently. > > > > \startMPpage[offset=5mm] > > path p; > > > > p := origin -- (7cm,0); > > > > interim linecap := squared; > > > > draw p withpen ((pensquare) scaled 5mm) withcolor red ; > > draw envelope ((pensquare) scaled 5mm) of p withcolor > > green ; > > draw envelope ((pensquare rotated eps) scaled 5mm) of p withcolor > > blue ; > > \stopMPpage > > > > (there is an "ontarget" chapter about envelopes; mikael and i spent > > quite some time figuring out a few things but in the end conclused that > > mp des the right thing given the strategy it folows but it definitely > > has side effects) > > Thank you for the insight, but does that mean I can’t get my “butt > capped” lines and I must shorten the lines by half the pen size? > > 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 > ___ Hraban, with the new upload you can do \startMPpage[offset=1dk] pickup pencircle scaled 4 ; path p ; p := origin -- (20,0) ; draw p withcolor darkyellow ; draw p yshifted 5 withlinecap butt withcolor darkred ; draw p yshifted -5 withlinecap squared withcolor darkgreen ; for i within currentpicture : drawpoints pathpart i withpen pencircle scaled 1 ; endfor ; \stopMPpage That is, you can set linecap for each draw. I hope it helps. /Mikael ___ 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] Cron /var/www/aanhet.net/context/bin/cron/context-mirror
receiving incremental file list ./ ctan.lsr document-2.htm download-1.htm download-2.htm install.htm logo-ade.png logo-cts.png logo-pod.png rss.xml show-fil.pdf context/latest/ context/latest/cont-mpd.zip context/latest/cont-ppc.zip context/latest/cont-sci.zip context/latest/cont-tmf.zip context/latest/cont-tst.tar.xz general/manuals/ general/manuals/columnsets.pdf general/manuals/ontarget.pdf sent 107,820 bytes received 25,268,580 bytes 3,904,061.54 bytes/sec total size is 450,820,009 speedup is 17.77 Running archiver: New dir: /var/www/aanhet.net/context//htdocs/archives/context-2022-07-06.23 133208477 /var/www/aanhet.net/context//htdocs/archives/context-2022-07-06.23/latest 126745317 /var/www/aanhet.net/context//htdocs/archives/context-2022-07-06.23/current 18956262 /var/www/aanhet.net/context//htdocs/archives/context-2022-07-06.23/alpha 126707516 /var/www/aanhet.net/context//htdocs/archives/context-2022-07-06.23/beta 405621668 /var/www/aanhet.net/context//htdocs/archives/context-2022-07-06.23 405621668 total ___ 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] upload
On Wed, Jul 6, 2022 at 10:10 PM Hans Hagen via ntg-context wrote: > > Hi, > > We're pleased to announce the first official release of the new math > code. We're talking of: > > -- a reworked math engine (which happened stepwise so some already > trickled into previous uploads) > > -- settling on one model for display math but with alignment variants as > well as improving inline math (e.g. wrt linebreaks) > > -- redoing bit of the (sub) numbering > > -- improving the alignment features (the traditional one and the > text/page mode one) > > -- fixing the math font using all kind of tweaks in the goodie file > > -- providing means to annotate formulas > > -- we ditched support for \over simply because it is too fragile wrt > spacing (one can \usemodule[oldmath] to get it back > > -- we might move some more alien stuff to m-oldmath in due time > > We paid a lot of attention to details of positioning, sizing and spacing > of glyphs. We do have some documents in the making that describe this > (some are in the ontarget namespace) and the second half of this year we > use for writing a math manual (Mikael) and updating the luametatex > manual (Hans). For sure we will run into unforseen issues, come up with > additional things and try to please users who have demands. There are > 'hidden' features that will be revealed stepwise. > > An example of some usage will be posted next. > > The pragma-ade.com domain is still in transfer but the nl one should > work fine. There is now also a https://www.luametatex.org that might be > get some more than there is now (when i find it useful but best to have > the domain for the ctx group). > > Mikael & Hans > > (on behalf of the CMS) Hi, Attached is a file with some example formulas and comments that might be of help. /Mikael someformulas.tex 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 / 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] upload
Hi, We're pleased to announce the first official release of the new math code. We're talking of: -- a reworked math engine (which happened stepwise so some already trickled into previous uploads) -- settling on one model for display math but with alignment variants as well as improving inline math (e.g. wrt linebreaks) -- redoing bit of the (sub) numbering -- improving the alignment features (the traditional one and the text/page mode one) -- fixing the math font using all kind of tweaks in the goodie file -- providing means to annotate formulas -- we ditched support for \over simply because it is too fragile wrt spacing (one can \usemodule[oldmath] to get it back -- we might move some more alien stuff to m-oldmath in due time We paid a lot of attention to details of positioning, sizing and spacing of glyphs. We do have some documents in the making that describe this (some are in the ontarget namespace) and the second half of this year we use for writing a math manual (Mikael) and updating the luametatex manual (Hans). For sure we will run into unforseen issues, come up with additional things and try to please users who have demands. There are 'hidden' features that will be revealed stepwise. An example of some usage will be posted next. The pragma-ade.com domain is still in transfer but the nl one should work fine. There is now also a https://www.luametatex.org that might be get some more than there is now (when i find it useful but best to have the domain for the ctx group). Mikael & Hans (on behalf of the CMS) - 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 ___
[NTG-context] ConTeXt meeting: register now!
Hi everyone, the early bird period for meeting registration went by mostly unnoticed, and I simply forgot to remind everyone to register. So we’ll extend “early bird” to end of this week, i.e. 10th of July. https://meeting.contextgarden.net/2022/ If you tried to register while the form didn’t work (around 1st of June), please try again. Also, I need to finish the CG journal ASAP – please hand in your articles (of last year’s talks or anything new) now! Looking forward to meeting you in Dreifelden! 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] Using alegreya typescript
\usetypescriptfile[alegreya] \usebodyfont[alegreya-light] \usebodyfont[alegreya-medium] \setupbodyfont[alegreya] \setuplayout[tight] \starttext \switchtobodyfont[alegreya-light]\input tufte \par \switchtobodyfont[alegreya] \input tufte \par \switchtobodyfont[alegreya-medium] \input tufte \par \switchtobodyfont[alegreya-light,sans] \input tufte \par \switchtobodyfont[alegreya,sans] \input tufte \par \switchtobodyfont[alegreya-medium,sans] \input tufte \par \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 -%D \module %D [ file=type-imp-dejavu, %Dversion=2010.06.21, %D title=\CONTEXT\ Typescript Macros, %D subtitle=Alegreya fonts, %D author=Hans Hagen, %D date=\currentdate, %D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] %C %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. %D This is cleaned up ersion of thwe one on the wiki. The font can be fetched from: %D %D \type {https://www.huertatipografica.com/en/fonts/alegreya-ht-pro} % \usetypescriptfile[alegreya] % % \usebodyfont[alegreya-light] % \usebodyfont[alegreya-medium] % % \setupbodyfont[alegreya] % % \setuplayout[tight] % % \starttext % \switchtobodyfont[alegreya-light]\input tufte \par % \switchtobodyfont[alegreya] \input tufte \par % \switchtobodyfont[alegreya-medium] \input tufte \par % \switchtobodyfont[alegreya-light,sans] \input tufte \par % \switchtobodyfont[alegreya,sans] \input tufte \par % \switchtobodyfont[alegreya-medium,sans] \input tufte \par % \stoptext \starttypescriptcollection[alegreya] \usetypescriptfile [imp-gentium] \definefontfallback [alegreyagentium-fallback] [name:gentium] [greekandcoptic,greekextended] \starttypescript [serif] [alegreya-serif,alegreya-light-serif,alegreya-medium-serif] [name] \setups[font:fallback:serif] \definefontsynonym[Serif] [name:alegreyaregular] [features=default,fallbacks=alegreya-gentium-fallback] \definefontsynonym[SerifItalic] [name:alegreyaitalic] [features=default,fallbacks=alegreya-gentium-fallback] \definefontsynonym[SerifBold] [name:alegreyabold] [features=default,fallbacks=alegreya-gentium-fallback] \definefontsynonym[SerifBoldItalic] [name:alegreyabolditalic] [features=default,fallbacks=alegreya-gentium-fallback] \stoptypescript \starttypescript [sans] [alegreya-sans] [name] \setups[font:fallback:sans] \definefontsynonym [Sans] [name:alegreyasansregular] [features=default] \definefontsynonym [SansItalic] [name:alegreyasansitalic] [features=default] \definefontsynonym [SansBold] [name:alegreyasansbold] [features=default] \definefontsynonym [SansBoldItalic] [name:alegreyasansbolditalic] [features=default] \stoptypescript \starttypescript [sans] [alegreya-light-sans] [name] \setups[font:fallback:sans] \definefontsynonym [Sans] [name:alegreyasanslight] [features=default] \definefontsynonym [SansItalic] [name:alegreyasanslightitalic] [features=default] \definefontsynonym [SansBold] [name:alegreyasansmedium] [features=default] \definefontsynonym [SansBoldItalic] [name:alegreyasansmediumitalic] [features=default] \stoptypescript \starttypescript [sans] [alegreya-medium-sans] [name] \setups[font:fallback:sans] \definefontsynonym [Sans] [name:alegreyasansmedium] [features=default] \definefontsynonym [SansItalic] [name:alegreyasansmediumitalic] [features=default] \definefontsynonym [SansBold] [name:alegreyasansextrabold] [features=default] \definefontsynonym [SansBoldItalic] [name:alegreyasansextrabolditalic] [features=default] \stoptypescript \starttypescript [alegreya,alegreya-light,alegreya-medium] \definefallbackfamily[alegreya][serif][gentium][range={greekandcoptic,greekextended}] \definetypeface [\typescriptone] [rm] [serif] [\typescriptone-serif] [default] \definetypeface [\typescriptone] [ss] [sans] [\typescriptone-sans] [default] \definetypeface [\typescriptone] [tt] [mono] [modern] [default] \definetypeface [\typescriptone] [mm] [math] [default] [default] \stoptypescript \stoptypescriptcollection ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl /
Re: [NTG-context] MetaPost label font size
Am 06.07.22 um 15:24 schrieb Fabrice L: Here are slightly different syntax that could be useful perhaps ? In the second one, the scaled parameter can be replaced easily with a variable, so you can decide and change the size of the label during the course of a picture. Thank you (all), I resolved to using the usual \tfx or \definedfont. 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] MetaPost label font size
> Le 5 juill. 2022 à 19:00, Henning Hraban Ramm via ntg-context > a écrit : > > How can I change the font size of labels within one picture? > > Hraban > > \startMPpage > defaultfont := "\truefontname{Sans}"; > defaultfontsize := \the\bodyfontsize; > > label.top(defaultfontsize, (0,0)); > > defaultfontsize := 4bp; > > label.top(defaultfontsize, (50,0)); > % shows that the variable changed, > % but font size is the same > > \stopMPpage Here are slightly different syntax that could be useful perhaps ? In the second one, the scaled parameter can be replaced easily with a variable, so you can decide and change the size of the label during the course of a picture. \starttext \startMPpage defaultfont := "\truefontname{Sans}"; defaultfontsize := \the\bodyfontsize; defaultscale := 0.5; label.top("small label", (-10,0)); defaultscale := 1.0; label.top("normal label", (50,5)); label.top("another normal label", (50,-5)); defaultscale := 2.0; label.top("Huge label", (10,-25)); \stopMPpage \startMPpage draw textext.top("small label") scaled 0.5 shifted (-10,0) ; draw textext.top("normal label") scaled 1 shifted (50,5) ; draw textext.top("second normal label") scaled 1 shifted (50,-5) ; draw textext.top("Huge label") scaled 2 shifted (10,-25) ; \stopMPpage \stoptext Fabrice. ___ 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] MetaPost label font size
On 7/6/2022 1:36 PM, Henning Hraban Ramm via ntg-context wrote: Am 06.07.22 um 12:45 schrieb Hans Hagen via ntg-context: On 7/6/2022 12:19 PM, fv leung via ntg-context wrote: My stupid way to get labels of different sizes: \starttext \startMPcode label("normal label", (0, 0)); label("\setsmallbodyfont small label", (0, 18)); label("\setbigbodyfont big label", (0, -18)); \stopMPcode \stoptext nothing stupid about that ... it's how i would do it Okay. So there’s really no possibility to adapt whatever defines the label font size except defaultfontsize inbetween? Strange. My solution so far was to split the picture and re-combine it afterwards. well, if there would be another way you would find it strange there if that would interfere with whatever else goes into a label text because we support arbitrary tex ... no way to figure out what struts, line distances, spacing, either of not adapt to current situation, delayed vs immediate inclusion, etc ... you can't have both worlds if course you can make some macro (or define a highlight) and use that in the labels 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] MetaPost label font size
I've used something like the following before. \starttext \startMPcode label("normal label", (0, 0)); label("{\switchtobodyfont[3pt] tiny label}", (0, 18)); label("{\switchtobodyfont[72pt] giant label}", (0, -72)); \stopMPcode \stoptext Henning Hraban Ramm via ntg-context 於 2022年7月6日 週三 晚上7:36寫道: > Am 06.07.22 um 12:45 schrieb Hans Hagen via ntg-context: > > On 7/6/2022 12:19 PM, fv leung via ntg-context wrote: > >> My stupid way to get labels of different sizes: > >> > >> \starttext > >> > >> \startMPcode > >> > >>label("normal label", (0, 0)); > >> > >>label("\setsmallbodyfont small label", (0, 18)); > >> > >>label("\setbigbodyfont big label", (0, -18)); > >> > >> \stopMPcode > >> > >> \stoptext > > nothing stupid about that ... it's how i would do it > > Okay. So there’s really no possibility to adapt whatever defines the > label font size except defaultfontsize inbetween? Strange. > > My solution so far was to split the picture and re-combine it afterwards. > > 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 > > ___ > ___ 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] MetaPost label font size
Am 06.07.22 um 12:45 schrieb Hans Hagen via ntg-context: On 7/6/2022 12:19 PM, fv leung via ntg-context wrote: My stupid way to get labels of different sizes: \starttext \startMPcode label("normal label", (0, 0)); label("\setsmallbodyfont small label", (0, 18)); label("\setbigbodyfont big label", (0, -18)); \stopMPcode \stoptext nothing stupid about that ... it's how i would do it Okay. So there’s really no possibility to adapt whatever defines the label font size except defaultfontsize inbetween? Strange. My solution so far was to split the picture and re-combine it afterwards. 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] MetaPost label font size
On 7/6/2022 12:19 PM, fv leung via ntg-context wrote: My stupid way to get labels of different sizes: \starttext \startMPcode label("normal label", (0, 0)); label("\setsmallbodyfont small label", (0, 18)); label("\setbigbodyfont big label", (0, -18)); \stopMPcode \stoptext nothing stupid about that ... it's how i would do 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 ___
Re: [NTG-context] MetaPost label font size
My stupid way to get labels of different sizes: \starttext \startMPcode label("normal label", (0, 0)); label("\setsmallbodyfont small label", (0, 18)); label("\setbigbodyfont big label", (0, -18)); \stopMPcode \stoptext Henning Hraban Ramm via ntg-context 於 2022年7月6日 週三 下午5:23寫道: > Am 06.07.22 um 07:17 schrieb Aditya Mahajan via ntg-context: > > On Wed, 6 Jul 2022, Henning Hraban Ramm via ntg-context wrote: > > > >> How can I change the font size of labels within one picture? > > > > (Untested): See https://www.contextgarden.net/Command/setupMPinstance > > > > \setupMPinstance[metafun][textstyle=sans] > > > > Or define a new instance, which sets the textstyle to sans. > > Thank you for trying, but that doesn’t seem to have anything to do with > my question. > > I need a different font size for different labels within one picture. > > 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 > > ___ > ___ 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] MetaPost cutdraw
Am 06.07.22 um 09:15 schrieb Hans Hagen via ntg-context: On 7/6/2022 7:10 AM, Aditya Mahajan via ntg-context wrote: On Wed, 6 Jul 2022, Henning Hraban Ramm via ntg-context wrote: Hi, I’m trying to understand MetaPost better. I’d like to draw a fat line that’s cut at its end points. You mean like linecap = butt? Yes, but that doesn’t behave differently. \startMPpage[offset=5mm] path p; p := origin -- (7cm,0); interim linecap := squared; draw p withpen ((pensquare ) scaled 5mm) withcolor red ; draw envelope ((pensquare ) scaled 5mm) of p withcolor green ; draw envelope ((pensquare rotated eps) scaled 5mm) of p withcolor blue ; \stopMPpage (there is an "ontarget" chapter about envelopes; mikael and i spent quite some time figuring out a few things but in the end conclused that mp des the right thing given the strategy it folows but it definitely has side effects) Thank you for the insight, but does that mean I can’t get my “butt capped” lines and I must shorten the lines by half the pen size? 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] MetaPost label font size
Am 06.07.22 um 07:17 schrieb Aditya Mahajan via ntg-context: On Wed, 6 Jul 2022, Henning Hraban Ramm via ntg-context wrote: How can I change the font size of labels within one picture? (Untested): See https://www.contextgarden.net/Command/setupMPinstance \setupMPinstance[metafun][textstyle=sans] Or define a new instance, which sets the textstyle to sans. Thank you for trying, but that doesn’t seem to have anything to do with my question. I need a different font size for different labels within one picture. 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] MetaPost cutdraw
On 7/6/2022 7:10 AM, Aditya Mahajan via ntg-context wrote: On Wed, 6 Jul 2022, Henning Hraban Ramm via ntg-context wrote: Hi, I’m trying to understand MetaPost better. I’d like to draw a fat line that’s cut at its end points. You mean like linecap = butt? \startMPpage[offset=5mm] path p; p := origin -- (7cm,0); interim linecap := butt; draw p withpen pencircle scaled 5mm; p := p shifted (0,2cm); interim linecap := rounded; draw p withpen pencircle scaled 5mm; p := p shifted (0,2cm); interim linecap := squared; draw p withpen pencircle scaled 5mm; \stopMPpage I learned, “cutdraw” should do the trick, but I get a parallelogram instead of a rectangle. Seems to be something weird with pensquare: \startMPpage[offset=5mm] path p; p := origin -- (7cm,0); % interim linecap := butt; cutdraw p withpen pensquare scaled 5mm; p := p shifted (0,2cm); interim linecap := rounded; draw p withpen pensquare scaled 5mm; p := p shifted (0,2cm); interim linecap := squared; draw p withpen pensquare scaled 5mm; \stopMPpage \startMPpage[offset=5mm] path p; p := origin -- (7cm,0); interim linecap := squared; draw p withpen ((pensquare) scaled 5mm) withcolor red ; draw envelope ((pensquare) scaled 5mm) of p withcolor green ; draw envelope ((pensquare rotated eps) scaled 5mm) of p withcolor blue ; \stopMPpage (there is an "ontarget" chapter about envelopes; mikael and i spent quite some time figuring out a few things but in the end conclused that mp des the right thing given the strategy it folows but it definitely has side effects) 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 ___