[NTG-context] framed: rounded corner oddity
Hi, in my ConTeXt book, some examples for \framed with rounded corners look odd, as if the MetaPost calculation of rounded corners fails. I can’t find a minimal example that shows the problem, and I can’t imagine which of the settings in my extensive environment would cause it. Find below the code that works on its own, but causes the results as shown in the attachments within my book. There’s nowhere a \setupframed, and nothing that should influence MetaPost. Do you have any clue for what I should look? Hraban \starttext \framed[ rulethickness=1pt, offset=0.5em, background=color, backgroundcolor=yellow, framecorner=13, backgroundcorner=07, backgroundoffset=0.5em, ]{Das Runde muss ins Eckige} \blank \framed[ frame=on, corner=round, frameoffset=0.5em, framecolor=black, background=color, backgroundcolor=darkgreen, backgroundoffset=1em, foregroundcolor=white, foregroundstyle={\ss\bf}, ]{Komm ins Grüne!} \stoptext___ 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: \unit{mercury} renders as m (meter) and \unit{millimetermercury} doesn't work as expected
On Tue, 5 Dec 2023 20:06:46 +0100 Wolfgang Schuster wrote: > > That doesn't make sense, inch and mm are different units. I'd rather > > add: > > > >\registerunit > > [inHg=inchmercury] > > > >\setupunittext > > [en] > > [inchmercury=inHg] > > It's just a stupid example to show how to set the label value. Ok, got it. Thanks for your quick help, as usual! Marco ___ 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: \unit{mercury} renders as m (meter) and \unit{millimetermercury} doesn't work as expected
Marco Patzer schrieb am 05.12.2023 um 19:58: \setupunittext[en][millimetermercury=inHg] That doesn't make sense, inch and mm are different units. I'd rather add: \registerunit [inHg=inchmercury] \setupunittext [en] [inchmercury=inHg] It's just a stupid example to show how to set the label value. Wolfgang ___ 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: \unit{mercury} renders as m (meter) and \unit{millimetermercury} doesn't work as expected
On Tue, 5 Dec 2023 17:27:59 +0100 Wolfgang Schuster wrote: > None of your examples work because millimetermercury and mercury are > the names for the labels > and the units are accessed with hg and mmhg. Ok, that makes sense. And it works, thanks for the explanation and the quick reply. > \setupunittext[en][millimetermercury=inHg] That doesn't make sense, inch and mm are different units. I'd rather add: \registerunit [inHg=inchmercury] \setupunittext [en] [inchmercury=inHg] Marco ___ 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: \unit{mercury} renders as m (meter) and \unit{millimetermercury} doesn't work as expected
Marco Patzer schrieb am 05.12.2023 um 15:19: Hi! I'm struggling with the rendering of a particular liquid metal: %% renders as m (meter), not as Hg \unit{mercury} %% renders as mm·m, not as mmHg \unit{millimetermercury} This is strange, since both “mercury” and “millimetermercury” are defined in phys-dim.lua. To get mercury recognised as a unit this can be used: \registerunitshortcut [mercury=mercury] Now \unit{mercury} renders correctly as Hg. Why is that \registerunitshortcut necessary? Is it even correct to use it like this? However, even then millimetermercury doesn't render correctly: %% renders as mm·Hg, not as mmHg \unit{millimetermercury} How to get millimetermercury render as mmHg? And “inch mercury” render as inHg? I can't find “inchmercury” in phys-dim.lua, only “millimetermercury”, should it be added? Example: %% \enabletrackers [physics.units] %% inch should render as “in” %% \setupunittext [inch=in] \starttext \unit{mercury}\crlf %% renders: mm · m \unit{12 millimetermercury}\crlf %% renders: mm · m \unit{12 inchmercury}\crlf%% renders: in · m %% why is this necessary to get mercury rendered as Hg? \registerunitshortcut [mercury=mercury] \unit{12 millimetermercury}\crlf %% renders: mm · Hg \unit{12 inch mercury}\crlf %% renders: in · Hg \stoptext Questions: 1) Why is \unit{mercury} not working, although it's listed in phys-dim.lua? 2) Is the call \registerunitshortcut [mercury=mercury] necessary/correct? 3) How to make \unit{millimetermercury} render as mmHg and \unit{inch mercury} render as inHg? None of your examples work because millimetermercury and mercury are the names for the labels and the units are accessed with hg and mmhg. \setupunittext[en][millimetermercury=inHg] \starttext \unit{mmhg} \stoptext Wolfgang ___ 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: Colored Paragraph
Dear Hraban, It was \startnarrower \stopnarrower, I put it out, now it is perfekt. I also send the pdf. Many thanks. Uschi -Ursprüngliche Nachricht- Von: Henning Hraban Ramm Gesendet: Dienstag, 05. Dezember 2023 15:47 An: ntg-context@ntg.nl Betreff: [NTG-context] Re: Colored Paragraph Hi Uschi, unfortunately you also forgot the source code. I’m not sure if the examples in the wiki are good – the combination with \startnarrower might be a problem. Maybe setting the width helps (e.g. to \makeupwidth). Hraban Am 05.12.23 um 15:29 schrieb Ursula Hermann: > Dear Hraban, > Sorry, forgot my name > Uschi > > -Ursprüngliche Nachricht- > Von: Ursula Hermann > Gesendet: Dienstag, 05. Dezember 2023 15:27 > An: 'mailing list for ConTeXt users' > Betreff: AW: [NTG-context] Re: Colored Paragraph > > Dear Hraban, > > I have tried it now, I have sent you the pdf. This works. But the paragraph > should fill the whole blackrule. > > -Ursprüngliche Nachricht- > Von: Henning Hraban Ramm > Gesendet: Dienstag, 05. Dezember 2023 14:58 > An: mailing list for ConTeXt users > Betreff: [NTG-context] Re: Colored Paragraph > > Am 05.12.23 um 14:16 schrieb Ursula Hermann: >> The paragraph should have a color in the background. How can I get an >> colored paragraph? > > Did you try \definetextbackground? > > https://wiki.contextgarden.net/TextBackground > https://wiki.contextgarden.net/Command/definetextbackground > > Hraban > __ > _ 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 > __ > _ > __ > _ 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 > __ > _ ___ 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 ___ u.pdf Description: u.pdf ___ 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: Colored Paragraph
Hi Uschi, unfortunately you also forgot the source code. I’m not sure if the examples in the wiki are good – the combination with \startnarrower might be a problem. Maybe setting the width helps (e.g. to \makeupwidth). Hraban Am 05.12.23 um 15:29 schrieb Ursula Hermann: Dear Hraban, Sorry, forgot my name Uschi -Ursprüngliche Nachricht- Von: Ursula Hermann Gesendet: Dienstag, 05. Dezember 2023 15:27 An: 'mailing list for ConTeXt users' Betreff: AW: [NTG-context] Re: Colored Paragraph Dear Hraban, I have tried it now, I have sent you the pdf. This works. But the paragraph should fill the whole blackrule. -Ursprüngliche Nachricht- Von: Henning Hraban Ramm Gesendet: Dienstag, 05. Dezember 2023 14:58 An: mailing list for ConTeXt users Betreff: [NTG-context] Re: Colored Paragraph Am 05.12.23 um 14:16 schrieb Ursula Hermann: The paragraph should have a color in the background. How can I get an colored paragraph? Did you try \definetextbackground? https://wiki.contextgarden.net/TextBackground https://wiki.contextgarden.net/Command/definetextbackground Hraban ___ 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 ___ ___ 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 ___ ___ 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: Colored Paragraph
Dear Hraban, Sorry, forgot my name Uschi -Ursprüngliche Nachricht- Von: Ursula Hermann Gesendet: Dienstag, 05. Dezember 2023 15:27 An: 'mailing list for ConTeXt users' Betreff: AW: [NTG-context] Re: Colored Paragraph Dear Hraban, I have tried it now, I have sent you the pdf. This works. But the paragraph should fill the whole blackrule. -Ursprüngliche Nachricht- Von: Henning Hraban Ramm Gesendet: Dienstag, 05. Dezember 2023 14:58 An: mailing list for ConTeXt users Betreff: [NTG-context] Re: Colored Paragraph Am 05.12.23 um 14:16 schrieb Ursula Hermann: > The paragraph should have a color in the background. How can I get an > colored paragraph? Did you try \definetextbackground? https://wiki.contextgarden.net/TextBackground https://wiki.contextgarden.net/Command/definetextbackground Hraban ___ 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 ___ ___ 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: Colored Paragraph
Dear Hraban, I have tried it now, I have sent you the pdf. This works. But the paragraph should fill the whole blackrule. -Ursprüngliche Nachricht- Von: Henning Hraban Ramm Gesendet: Dienstag, 05. Dezember 2023 14:58 An: mailing list for ConTeXt users Betreff: [NTG-context] Re: Colored Paragraph Am 05.12.23 um 14:16 schrieb Ursula Hermann: > The paragraph should have a color in the background. How can I get an > colored paragraph? Did you try \definetextbackground? https://wiki.contextgarden.net/TextBackground https://wiki.contextgarden.net/Command/definetextbackground Hraban ___ 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 ___ u.pdf Description: u.pdf ___ 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] \unit{mercury} renders as m (meter) and \unit{millimetermercury} doesn't work as expected
Hi! I'm struggling with the rendering of a particular liquid metal: %% renders as m (meter), not as Hg \unit{mercury} %% renders as mm·m, not as mmHg \unit{millimetermercury} This is strange, since both “mercury” and “millimetermercury” are defined in phys-dim.lua. To get mercury recognised as a unit this can be used: \registerunitshortcut [mercury=mercury] Now \unit{mercury} renders correctly as Hg. Why is that \registerunitshortcut necessary? Is it even correct to use it like this? However, even then millimetermercury doesn't render correctly: %% renders as mm·Hg, not as mmHg \unit{millimetermercury} How to get millimetermercury render as mmHg? And “inch mercury” render as inHg? I can't find “inchmercury” in phys-dim.lua, only “millimetermercury”, should it be added? Example: %% \enabletrackers [physics.units] %% inch should render as “in” %% \setupunittext [inch=in] \starttext \unit{mercury}\crlf %% renders: mm · m \unit{12 millimetermercury}\crlf %% renders: mm · m \unit{12 inchmercury}\crlf%% renders: in · m %% why is this necessary to get mercury rendered as Hg? \registerunitshortcut [mercury=mercury] \unit{12 millimetermercury}\crlf %% renders: mm · Hg \unit{12 inch mercury}\crlf %% renders: in · Hg \stoptext Questions: 1) Why is \unit{mercury} not working, although it's listed in phys-dim.lua? 2) Is the call \registerunitshortcut [mercury=mercury] necessary/correct? 3) How to make \unit{millimetermercury} render as mmHg and \unit{inch mercury} render as inHg? Marco ___ 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: Colored Paragraph
Am 05.12.23 um 14:16 schrieb Ursula Hermann: The paragraph should have a color in the background. How can I get an colored paragraph? Did you try \definetextbackground? https://wiki.contextgarden.net/TextBackground https://wiki.contextgarden.net/Command/definetextbackground Hraban ___ 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] Colored Paragraph
Dear List, i have this example: \setupbodyfont[modern,10pt] \definemargindata [MyInMargin][inright] \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1cm] \defineenumeration [theorem] [ text=Theorem, title=yes, width=fit, distance=0.5em, alternative=serried, ] \margintext{\blackrule[color=black, height=0.25ex, width=1cm]\\}\blackrule[color=black, height=0.25ex, width=15cm] \starttext \margintext {1.1.1} \startparagraph It was essential for Hasselt to have a bridge across the Zwarte Water river. The bishop of Utrecht gave Hasselt his consent in 1486. \blank Other cities in the neighbourhood of Hasselt were afraid of the toll money to be paid when crossing this bridge so they prevented the construction for many years. \stopparagraph \stoptext The paragraph should have a color in the background. How can I get an colored paragraph? Many thanks Uschi ___ 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 ___