Re: [NTG-context] Background with rounded corners (Metafun)
Hi Pablo, I speak of the text in the frame as in the image https://mail.google.com/mail/u/0/?ui=2&ik=d5d294e54c&view=att&th=15e0c2d8c5b8cf7c&attid=0.1&disp=safe&realattid=f_j6o6zsx20&zw Fabrice 2017-08-30 22:45 GMT+02:00 Pablo Rodriguez : > On 08/30/2017 06:07 PM, Fabrice Couvreur wrote: > > Hi Aditya, > > I tried : > > [...] > > to have my text wrapped around the ornament as in the figure but it > > does not work. > > Hi Fabrice, > > sorry if I’m missing something, but I wonder whether the next sample is > what you intend. > > \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784] > \definecolor[MyColorB][c=0.00,m=0.27,y=1.00,k=0.00] > > \defineornament > [FrameTitle] > [preset=lefttop] > [ > frame=off, > foregroundstyle=\bfx, > foregroundcolor=white, > background=color, > backgroundcolor=MyColorB, > ] > > > \defineframedtext > [FramedText] > [ > offset=0.6em, > toffset=\lineheight, > background=color, > backgroundcolor=MyColorA, > foregroundstyle={\switchtobodyfont[10pt]}, > align=verytolerant, > alternative=serried, % text wrapped > frame=off, > corner=round, > ] > > \definefloat > [recipe] > [figure] > > \setupfloat > [recipe] > [default={right,none}] > > \showframe > > \starttext > \placerecipe{} >{\FrameTitle{Info}{\startFramedText[width=10cm] > L'équivalent vingt pieds (EVP) est une unité de mesure de > conteneurs (de longueur courante 20 pieds, soit environ > \unit{6,1 meter}). > > 1 EVP représente environ \unit{38,5 cubic meter}. > \stopFramedText}} > > \input zapf > > \stoptext > > Just in case it helps, > > 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 > > ___ > ___ 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] Background with rounded corners (Metafun)
On 08/30/2017 06:07 PM, Fabrice Couvreur wrote: > Hi Aditya, > I tried : > [...] > to have my text wrapped around the ornament as in the figure but it > does not work. Hi Fabrice, sorry if I’m missing something, but I wonder whether the next sample is what you intend. \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784] \definecolor[MyColorB][c=0.00,m=0.27,y=1.00,k=0.00] \defineornament [FrameTitle] [preset=lefttop] [ frame=off, foregroundstyle=\bfx, foregroundcolor=white, background=color, backgroundcolor=MyColorB, ] \defineframedtext [FramedText] [ offset=0.6em, toffset=\lineheight, background=color, backgroundcolor=MyColorA, foregroundstyle={\switchtobodyfont[10pt]}, align=verytolerant, alternative=serried, % text wrapped frame=off, corner=round, ] \definefloat [recipe] [figure] \setupfloat [recipe] [default={right,none}] \showframe \starttext \placerecipe{} {\FrameTitle{Info}{\startFramedText[width=10cm] L'équivalent vingt pieds (EVP) est une unité de mesure de conteneurs (de longueur courante 20 pieds, soit environ \unit{6,1 meter}). 1 EVP représente environ \unit{38,5 cubic meter}. \stopFramedText}} \input zapf \stoptext Just in case it helps, 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] Empty page to suppress header (background) frame
On 08/30/2017 05:19 PM, Procházka Lukáš Ing. wrote: > [...] > How to: > > - define header to be framed normally and > - to be "frame-free" when \page[empty] (and/or maybe \page[blank]) is called? Hi Lukáš, from your sample, I wonder whether you need a complete frame or only a rule in the header. If you only need a rule, this is the way to go: \setuplayout[header=5mm,headerdistance=5mm,] %~ \setupheader[text][after=\vskip 4pt\hrule] \setupheader[text][after={\blackrule[ width=\textwidth, height=1em]}] \setupheadertexts[left][right] \starttext Page 1 \page[empty,blank] Page 2 \stoptext I hope it helps, 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] Formulas and pagebreaks
On 8/30/2017 12:44 PM, Henri Menke wrote: Dear list, Motivated by this question on TeX.SX (https://tex.stackexchange.com/questions/388963) I found that formulas do not honour the samepage option in spacebefore. I could track the issue down to the \strc_math_obey_depth macro where a vertical kern is inserted which apparently introduces a good breakpoint. MWE is below, the line is marked with an ASCII arrow. Please fix. Cheers, Henri --- \setupformulas[spacebefore={big,samepage},spaceafter=big] \unprotect \def\strc_math_obey_depth {\ifvmode\ifdim\prevdepth<\zeropoint\else\ifdim\prevdepth<\strutdp % maybe add a tracing option here \ifgridsnapping \directvspacing\v!depth \else \kern\dimexpr\strutdp-\prevdepth\relax % <--- \prevdepth\strutdp \fi \fi\fi\fi} \protect \starttext \dorecurse{4}{\input knuth\par} \startformula \exp(x)=\sum_{k=0}^{+\infty}\frac{x^k}{k!}. \stopformula \stoptext please test extensively with: \setvalue{\??mathdisplayspacemodel\v!before:3}% {\let\m_spacebefore\empty \ifvmode \ifdim\lastskip>\zeropoint\else \ifdim\prevdepth<\zeropoint\else \ifdim\prevdepth<\strutdp % maybe add a tracing option here \ifgridsnapping \let\m_spacebefore\v!depth \else \edef\m_spacebefore{\the\dimexpr\strutdp-\prevdepth\relax}% \fi \fi \fi \fi \nointerlineskip \fi \ifx\m_spacebefore\empty \ifx\p_spacebefore\v!none % nothing \else\ifx\p_spacebefore\empty \directvspacing\currentvspacing \else \directvspacing{\p_spacebefore,\the\scratchdimen}% \fi\fi \else \ifx\p_spacebefore\v!none \directvspacing{\m_spacebefore}% \else\ifx\p_spacebefore\empty \directvspacing{\m_spacebefore,\currentvspacing}% \else \directvspacing{\m_spacebefore,\p_spacebefore}% \fi\fi \fi} - 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] Background with rounded corners (Metafun)
Hi Aditya, I tried : \defineframedtext [FramedText] [ offset=0.6em, toffset=\lineheight, background=color, backgroundcolor=MyColorA, foregroundstyle={\switchtobodyfont[10pt]}, align=verytolerant, alternative=serried, % text wrapped frame=off, corner=00, ] to have my text wrapped around the ornament as in the figure but it does not work. Thanks Fabrice 2017-08-23 1:20 GMT+02:00 Fabrice Couvreur : > Sorry 'corner=00' ! > > 2017-08-23 1:01 GMT+02:00 Fabrice Couvreur : > >> Hi Aditya, >> Sorry I forgot to attach the image of what I want to do. I know corner=number >> parameter of framed and framed text but I wanted to do it with Metafun. >> Thank you >> Fabrice >> >> 2017-08-23 0:50 GMT+02:00 Aditya Mahajan : >> >>> On Wed, 23 Aug 2017, Fabrice Couvreur wrote: >>> >>> Hello, I would like to have three corners rounded as in the figure. >>> >>> Not sure if you had simplified your example or not. But if all you want >>> is a rounded corner, you can consider using corner=number parameter of >>> framed and framed text: >>> >>> http://wiki.contextgarden.net/Framed#Rounded_Corners >>> >>> Here is an example (that does not use metapost). >>> >>> \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784] >>> \definecolor[MyColorB][c=0.00,m=0.27,y=1.00,k=0.00] >>> >>> \defineornament >>> [FrameTitle] >>> [preset=lefttop] >>> [ >>> frame=off, >>> foregroundstyle=\bfx, >>> foregroundcolor=white, >>> background=color, >>> backgroundcolor=MyColorB, >>> ] >>> >>> \defineframedtext >>> [FramedText] >>> [ >>> offset=0.6em, >>> toffset=\lineheight, >>> background=color, >>> backgroundcolor=MyColorA, >>> foregroundstyle={\switchtobodyfont[10pt]}, >>> align=verytolerant, >>> frame=off, >>> corner=01, >>> ] >>> >>> >>> \showframe >>> \starttext >>> >>> \FrameTitle{Info}{\startFramedText[width=10cm] >>> L'équivalent vingt pieds (EVP) est une unité de mesure de >>> conteneurs >>> (de longueur courante 20 pieds, soit environ \unit{6,1 meter}). >>> >>> 1 EVP représente environ \unit{38,5 cubic meter}. >>> \stopFramedText} >>> >>> \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/list >>> info/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 ___
[NTG-context] Empty page to suppress header (background) frame
Hello, suppose the following code: \setuplayout[header=5mm,headerdistance=5mm,] \setupbackgrounds[header][text][bottomframe=on] \setupheadertexts[left][right] \starttext Page 1 \page[empty,blank] Page 2 \stoptext Page 2 in this sample is empty - no text and no header/footer - but it KEEPS FRAME around HEADER. How to: - define header to be framed normally and - to be "frame-free" when \page[empty] (and/or maybe \page[blank]) is called? Best regards, Lukas -- Ing. Lukáš Procházka | mailto:l...@pontex.cz Pontex s. r. o. | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn Bezová 1658 147 14 Praha 4 Mob.: +420 702 033 396 NoHdrUln~.mkiv Description: Binary data NoHdrUln~.pdf Description: Adobe PDF document ___ 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] How to put a circle on top of a character
Hi Hans, Regarding what you have added on line 1327 of math-stc.mkvi, that line should be \definemathover[\v!symbol][interiorset]["2218] (instead of "2217). I added also a wiki page for mathstackers: http://wiki.contextgarden.net/mathstackers Best regards: OK > On 29 Aug 2017, at 23:28, Hans Hagen wrote: > > On 8/29/2017 9:56 PM, Otared Kavian wrote: >> Hi Hans, >> That’s wonderful! Indeed this is very handy and I’ll add it to the wiki. >> However, before doing so, I would like to ask how is it possible to get the >> command act entirely in math mode, that is respecting the distances and the >> math fonts. Please see the attached output. >> %%% begin interior-of-a-set.tex >> \definemathstackers[symbol][voffset=-.30\mathexheight,hoffset=\zeropoint] >> \definemathover[symbol][interiorset]["2218] >> \starttext >> Here is the new command \type{\interiorset{K}}: $\mathring{K} \neq >> \interiorset{K}$ >> \stoptext >> %%% end interior-of-a-set.tex > > I'll add an offset > > \definemathstackers > [\v!symbol] > [\c!voffset=-.3\mathexheight, > \c!hoffset=\zeropoint, > \c!mathclass=ord, > \c!topoffset=.4\mathemwidth, % poor man's italic correction > \c!middlecommand=\mathematics] > > but keep in mind, this is not really meant for accented math, more for > special cases > > 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 > ___ ___ 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] Error with tagging and lohi alignment in table
On Wed, 30 Aug 2017 10:35:56 +0200 Hans Hagen wrote: > On 8/30/2017 9:22 AM, Christoph Reller wrote: > > The following MWE now yields an error: > > > > \setuptagging[state=start] > > \starttext > > \bTABLE > > \setupTABLE[c][1][align=lohi] > >\bTR \bTD test \eTD \eTR > > \eTABLE > > \stoptext > > > > I'm afraid but this may be a bug. Many thanks in advance for all your > > effort. > fixed in next beta ... but move your \setupTABLE ine line up > Thank you, Hans, for the fix and for the hint! ___ 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] How to put a circle on top of a character
Hi Hans, Thanks for your attention. Indeed I understand that the stackers structures are for putting things such as a circle or a star on top of another character or constructs. In fact, in terms of readability, the result of your new command \interiorset{K} is better than that of \mathring{K}, but the « K » coming out with \interiorset is set in Roman, while it should be math italic (or whatever font is used in math mode). Also the white space around it is not yet correct. I’ll test what you will have added in the next beta and then put an entry on the wiki about mathstackers. Thanks again: OK > On 29 Aug 2017, at 23:28, Hans Hagen wrote: > > On 8/29/2017 9:56 PM, Otared Kavian wrote: >> Hi Hans, >> That’s wonderful! Indeed this is very handy and I’ll add it to the wiki. >> However, before doing so, I would like to ask how is it possible to get the >> command act entirely in math mode, that is respecting the distances and the >> math fonts. Please see the attached output. >> %%% begin interior-of-a-set.tex >> \definemathstackers[symbol][voffset=-.30\mathexheight,hoffset=\zeropoint] >> \definemathover[symbol][interiorset]["2218] >> \starttext >> Here is the new command \type{\interiorset{K}}: $\mathring{K} \neq >> \interiorset{K}$ >> \stoptext >> %%% end interior-of-a-set.tex > > I'll add an offset > > \definemathstackers > [\v!symbol] > [\c!voffset=-.3\mathexheight, > \c!hoffset=\zeropoint, > \c!mathclass=ord, > \c!topoffset=.4\mathemwidth, % poor man's italic correction > \c!middlecommand=\mathematics] > > but keep in mind, this is not really meant for accented math, more for > special cases > > 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 > ___ ___ 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] Formulas and pagebreaks
Dear list, Motivated by this question on TeX.SX (https://tex.stackexchange.com/questions/388963) I found that formulas do not honour the samepage option in spacebefore. I could track the issue down to the \strc_math_obey_depth macro where a vertical kern is inserted which apparently introduces a good breakpoint. MWE is below, the line is marked with an ASCII arrow. Please fix. Cheers, Henri --- \setupformulas[spacebefore={big,samepage},spaceafter=big] \unprotect \def\strc_math_obey_depth {\ifvmode\ifdim\prevdepth<\zeropoint\else\ifdim\prevdepth<\strutdp % maybe add a tracing option here \ifgridsnapping \directvspacing\v!depth \else \kern\dimexpr\strutdp-\prevdepth\relax % <--- \prevdepth\strutdp \fi \fi\fi\fi} \protect \starttext \dorecurse{4}{\input knuth\par} \startformula \exp(x)=\sum_{k=0}^{+\infty}\frac{x^k}{k!}. \stopformula \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] Error with tagging and lohi alignment in table
On 8/30/2017 9:22 AM, Christoph Reller wrote: Hi, The following MWE now yields an error: \setuptagging[state=start] \starttext \bTABLE \setupTABLE[c][1][align=lohi] \bTR \bTD test \eTD \eTR \eTABLE \stoptext I'm afraid but this may be a bug. Many thanks in advance for all your effort. fixed in next beta ... but move your \setupTABLE ine line up - 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] Tagging and Math Matrix
On Mon, Dec 28, 2015 at 3:45 PM Christoph Rellerwrote: > There seems to be a problem with the structure information added when using > \startmatrix: > > \setuptagging[state=start] > \starttext > \math{ > \startmatrix > \NC A \NR > \NC B \NR > \stopmatrix} > \stoptext > > The log reports an open chain: document>1 => mtr>1 => mtd>1 => mtr>2 => > mtd>2 => mtr>3 > This may be a bug. > This is clearly a bug. The resulting structure tree of the above MWE is as follows (sorry for the ASCII art): '- '- |- | '- | |- | | '- | | |- | | | '- | | | '- | | | '- | | | |- | | | '- | | '- | | '- | | '- | | |- | | '- | '- | '- | '- | '-"B" '- '- '- '-"A" A fix would be very much appreciated. Thanks in advance, Christoph ___ 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] Error with tagging and lohi alignment in table
Hi, The following MWE now yields an error: \setuptagging[state=start] \starttext \bTABLE \setupTABLE[c][1][align=lohi] \bTR \bTD test \eTD \eTR \eTABLE \stoptext I'm afraid but this may be a bug. Many thanks in advance for all your effort. Cheers, Christoph ___ 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] Scite module and escape does not work anymore
On Tue, 29 Aug 2017 13:29:59 +0200 Hans Hagenwrote: > On 8/29/2017 9:31 AM, Christoph Reller wrote: > > Hi, > > > > I noticed that the scite module (m-scite.mkiv) has undergone some > > changes recently. When using this module to highlight source code, then > > the escape mechanism does not seem to work anymore. > > > > Can this be fixed? Thank you in advance for your effort. > i'll intercept it (there are no escapes in scite mode) > Oh, I see. Thank you, Hans. Christoph ___ 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 ___