Re: [NTG-context] Text around a figure
Hi Otared and Wolfgang, It's great, the following code does the job! Thank you so much. Fabrice \useMPlibrary[dum] \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] \setupfloats[freeregion=no] \definetextbackground[fondpaille] [background=color, backgroundcolor=fondpaille, frame=off, location=always, ] \showframe \starttext \starttextbackground[fondpaille] \startplacefigure[number=no,location=right] \externalfigure[dummy] \stopplacefigure \startitemize[n] \dorecurse{3}{\startitem \input ward \stopitem} \stopitemize \stoptextbackground \stoptext Le jeu. 16 juil. 2020 à 14:59, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> a écrit : > Otared Kavian schrieb am 16.07.2020 um 11:58: > > Hi Fabrice, > > > > Maybe you can play with different settings of your textbackground, as in > > > > \definetextbackground[fondpaille] > > [background=color, > > backgroundcolor=fondpaille, > > frame=off, > > location=paragraph, % or: text, always, paragraph > > backgroundoffset=4pt] % change the value here > > It's a float feature which can be disabled. > > \setupfloats[freeregion=no] > > Wolfgang > > ___ > 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] Text around a figure
Otared Kavian schrieb am 16.07.2020 um 11:58: Hi Fabrice, Maybe you can play with different settings of your textbackground, as in \definetextbackground[fondpaille] [background=color, backgroundcolor=fondpaille, frame=off, location=paragraph, % or: text, always, paragraph backgroundoffset=4pt] % change the value here It's a float feature which can be disabled. \setupfloats[freeregion=no] Wolfgang ___ 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] Text around a figure
Hi Fabrice, Maybe you can play with different settings of your textbackground, as in \definetextbackground[fondpaille] [background=color, backgroundcolor=fondpaille, frame=off, location=paragraph, % or: text, always, paragraph backgroundoffset=4pt] % change the value here Best regards: Otared > On 16 Jul 2020, at 11:10, Fabrice Couvreur > wrote: > > Hi Otared and Wolfgang, > Thanks for your help ; the result is almost what I want (the space between > the text and the figure is not colored) but it is likely that we could not do > better. > Fabrice > > Le mer. 15 juil. 2020 à 22:25, Otared Kavian a écrit : > Hi Fabrice, > > I think what Wolfgang suggests is something like the following: > > \useMPlibrary[dum] > \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] > \definetextbackground[fondpaille] > [background=color, > backgroundcolor=fondpaille, > frame=off, > location=always] > > \starttext > > \starttextbackground[fondpaille] > \startplacefigure[number=no,location=right] > \externalfigure[dummy] > \stopplacefigure > \startitemize[n] > \dorecurse{3}{\startitem \input ward \stopitem} > \stopitemize > \stoptextbackground > > \stoptext > > Best regards: Otared K. > > > On 15 Jul 2020, at 22:13, Wolfgang Schuster > > wrote: > > > > Fabrice Couvreur schrieb am 15.07.2020 um 19:54: > >> Hello, > >> I always encounter difficulties with the placement of figures in such a > >> way that the text envelops the figure. > >> Thank you. > >> Fabrice > >> \useMPlibrary[dum] > >> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] > >> \starttext > >> \startframedtext[width=max,background=color,backgroundcolor=fondpaille] > >> \placefloat[][right,none]{} > >>{\externalfigure[dummy]} > >> \startitemize[n] > >>\dorecurse{3}{\startitem \input ward \stopitem} > >> \stopitemize > >>\stopframedtext > >>\stoptext > > > > > > Side floats don't work in frames, use the textbackground environment to add > > a colored box behind the text. > > > > Wolfgang > > ___ > > 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 > ___ > ___ > 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] Text around a figure
Hi Otared and Wolfgang, Thanks for your help ; the result is almost what I want (the space between the text and the figure is not colored) but it is likely that we could not do better. Fabrice Le mer. 15 juil. 2020 à 22:25, Otared Kavian a écrit : > Hi Fabrice, > > I think what Wolfgang suggests is something like the following: > > \useMPlibrary[dum] > \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] > \definetextbackground[fondpaille] > [background=color, > backgroundcolor=fondpaille, > frame=off, > location=always] > > \starttext > > \starttextbackground[fondpaille] > \startplacefigure[number=no,location=right] > \externalfigure[dummy] > \stopplacefigure > \startitemize[n] > \dorecurse{3}{\startitem \input ward \stopitem} > \stopitemize > \stoptextbackground > > \stoptext > > Best regards: Otared K. > > > On 15 Jul 2020, at 22:13, Wolfgang Schuster < > wolfgang.schuster.li...@gmail.com> wrote: > > > > Fabrice Couvreur schrieb am 15.07.2020 um 19:54: > >> Hello, > >> I always encounter difficulties with the placement of figures in such a > way that the text envelops the figure. > >> Thank you. > >> Fabrice > >> \useMPlibrary[dum] > >> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] > >> \starttext > >> \startframedtext[width=max,background=color,backgroundcolor=fondpaille] > >> \placefloat[][right,none]{} > >>{\externalfigure[dummy]} > >> \startitemize[n] > >>\dorecurse{3}{\startitem \input ward \stopitem} > >> \stopitemize > >>\stopframedtext > >>\stoptext > > > > > > Side floats don't work in frames, use the textbackground environment to > add a colored box behind the text. > > > > Wolfgang > > > ___ > > 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 > > ___ > ___ 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] Text around a figure
Hi Fabrice, I think what Wolfgang suggests is something like the following: \useMPlibrary[dum] \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] \definetextbackground[fondpaille] [background=color, backgroundcolor=fondpaille, frame=off, location=always] \starttext \starttextbackground[fondpaille] \startplacefigure[number=no,location=right] \externalfigure[dummy] \stopplacefigure \startitemize[n] \dorecurse{3}{\startitem \input ward \stopitem} \stopitemize \stoptextbackground \stoptext Best regards: Otared K. > On 15 Jul 2020, at 22:13, Wolfgang Schuster > wrote: > > Fabrice Couvreur schrieb am 15.07.2020 um 19:54: >> Hello, >> I always encounter difficulties with the placement of figures in such a way >> that the text envelops the figure. >> Thank you. >> Fabrice >> \useMPlibrary[dum] >> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] >> \starttext >> \startframedtext[width=max,background=color,backgroundcolor=fondpaille] >> \placefloat[][right,none]{} >>{\externalfigure[dummy]} >> \startitemize[n] >>\dorecurse{3}{\startitem \input ward \stopitem} >> \stopitemize >>\stopframedtext >>\stoptext > > > Side floats don't work in frames, use the textbackground environment to add a > colored box behind the text. > > Wolfgang > ___ > 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] Text around a figure
Fabrice Couvreur schrieb am 15.07.2020 um 19:54: Hello, I always encounter difficulties with the placement of figures in such a way that the text envelops the figure. Thank you. Fabrice \useMPlibrary[dum] \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] \starttext \startframedtext[width=max,background=color,backgroundcolor=fondpaille] \placefloat[][right,none]{} {\externalfigure[dummy]} \startitemize[n] \dorecurse{3}{\startitem \input ward \stopitem} \stopitemize \stopframedtext \stoptext Side floats don't work in frames, use the textbackground environment to add a colored box behind the text. Wolfgang ___ 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] Text around a figure
Hello, I always encounter difficulties with the placement of figures in such a way that the text envelops the figure. Thank you. Fabrice \useMPlibrary[dum] \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] \starttext \startframedtext[width=max,background=color,backgroundcolor=fondpaille] \placefloat[][right,none]{} {\externalfigure[dummy]} \startitemize[n] \dorecurse{3}{\startitem \input ward \stopitem} \stopitemize \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/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] Text around a figure
Fabrice Couvreur schrieb am 24.04.2019 um 19:51: Hi Wolfgang, Thank you t works but why should you add this command ? ConTeXt has to update the number of remaining lines for side floats at the begin each each paragraph but when you start a paragraph in a group, e.g. {\bf ...} to information is lost after the closing brace. When you add now \dontleavehmode before the group starts you flushed to information because the paragraph already started. Wolfgang ___ 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] Text around a figure
Fabrice Couvreur schrieb am 24.04.2019 um 19:44: Hi, Why does bold text touch the figure ? Thank you. Fabrice \definefloat [recipe] [figure] \setupfloat [recipe] [default={right,none}] \starttext \placerecipe{}{ \setupbodyfont[8pt,pagella] \startMPcode path p, q ; p:= unitsquare xyscaled (1.5cm,1.5cm) ; q:= unitsquare xyscaled (2.5cm,2.5cm) shifted (1.5cm,0); draw p withpen pencircle scaled 1pt ; draw q withpen pencircle scaled 1pt ; label.llft("$A$", p) ; label.lrt("$M$", p) ; label.ulft("$P$", p) ; label.urt("$N$", p) ; label.lrt("$B$", q) ; label.urt("$Q$", q) ; label.ulft("$R$", q) ; \stopMPcode } Sur la figure ci-contre, \m{[AB]} est un segment de longueur 4. \m{M} est un point mobile sur le segment \m{[AB]} . \m{AMNP} et \m{MBQR} sont deux carrés. On note \m{x} la distance \m{AM}. \blank {\bf On cherche les positions de \m{M} telles que la surface constituée par les deux carrés soit supérieure à 10.} I guess this should work (untested). \dontleavehmode{\bf ...} Wolfgang ___ 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] Text around a figure
Hi, Why does bold text touch the figure ? Thank you. Fabrice \definefloat [recipe] [figure] \setupfloat [recipe] [default={right,none}] \starttext \placerecipe{}{ \setupbodyfont[8pt,pagella] \startMPcode path p, q ; p:= unitsquare xyscaled (1.5cm,1.5cm) ; q:= unitsquare xyscaled (2.5cm,2.5cm) shifted (1.5cm,0); draw p withpen pencircle scaled 1pt ; draw q withpen pencircle scaled 1pt ; label.llft("$A$", p) ; label.lrt("$M$", p) ; label.ulft("$P$", p) ; label.urt("$N$", p) ; label.lrt("$B$", q) ; label.urt("$Q$", q) ; label.ulft("$R$", q) ; \stopMPcode } Sur la figure ci-contre, \m{[AB]} est un segment de longueur 4. \m{M} est un point mobile sur le segment \m{[AB]} . \m{AMNP} et \m{MBQR} sont deux carrés. On note \m{x} la distance \m{AM}. \blank {\bf On cherche les positions de \m{M} telles que la surface constituée par les deux carrés soit supérieure à 10.} \blank \startitemize[n] \item À quel intervalle appartient \m{x} ? \item Montrer que le problème revient à résoudre l'inéquation : \startformula 2x²-8x+6\geqslant 0. \stopformula \item Développer le produit \m{(2x-6)(x-1)}. \item En déduire les solutions de l'inéquation \m{2x²-8x+6\geqslant 0} et conclure concernant le problème. \stopitemize \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] Text around a figure
Hi Rik, Thank you, I did not follow the forum this week, I should have seen it. Fabrice 2017-04-14 18:44 GMT+02:00 Rik Kabel: > On 2017-04-14 10:36, Fabrice Couvreur wrote: > > Is it possible that the first line of text starts at the top of the figure? > > Blablablablablablablablablablablabla > ## blablablablablablablabla >Fig blablablablablablablabla > ## blablablablablablablabla > > > \starttext > > \placefigure [left,none] {} {\externalfigure[rafting.jpg][width=4cm]} > \input knuth > > > > \stoptext > > > This came up about a week ago. See https://www.mail-archive.com/ > ntg-context@ntg.nl/msg84828.html (and the follow-up for your answer). > > -- > Rik > > > ___ > 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] Text around a figure
On 2017-04-14 10:36, Fabrice Couvreur wrote: Is it possible that the first line of text starts at the top of the figure? Blablablablablablablablablablablabla ## blablablablablablablabla Fig blablablablablablablabla ## blablablablablablablabla \starttext \placefigure [left,none] {} {\externalfigure[rafting.jpg][width=4cm]} \input knuth \stoptext This came up about a week ago. See https://www.mail-archive.com/ntg-context@ntg.nl/msg84828.html (and the follow-up for your answer). -- Rik ___ 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] Text around a figure
Is it possible that the first line of text starts at the top of the figure? Blablablablablablablablablablablabla ## blablablablablablablabla Fig blablablablablablablabla ## blablablablablablablabla \starttext \placefigure [left,none] {} {\externalfigure[rafting.jpg][width=4cm]} \input knuth \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] Text around a figure in a framedtext
Hi Rik, I actually read that Wolfgang had written, but there is some confusion for me. Indeed, my environment uses a frame and Wolfgang said to be used \ starthanging ... \stophanging rather than \placefigure. But my text contains a blank line which is to create a new paragraph and so I should use \ placefigure !!! 2015-08-14 3:38 GMT+02:00 Rik Kabel cont...@rik.users.panix.com: On 2015-08-13 11:19, Fabrice Couvreur wrote: Hi, Sorry to revive this discussion (which I initiated), but the text in the following code does not wrapped around the figure. Why ? Fabrice \setupcolors [state=start] \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00] \definecolor[MyColorA][.75(MyColorB,white)] \defineframedtext [MyText] [frame=off, background=MyFrame, width=\textwidth, height=fit, location=left, style=italic] \defineoverlay [MyFrame] [\useMPgraphic{MyFrame}] \definelabel [Définition] [headstyle=\bf\smallcaps] \startuseMPgraphic{MyFrame} path b ; picture p ; p := textext.rt(\white\Définition) ; p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight) ; b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ; fill OverlayBox withcolor \MPcolor{MyColorA} ; fill b withcolor \MPcolor{MyColorB} ; draw p ; \stopuseMPgraphic \starttext \startMyText \starthanging[location=right] {\startMPcode path p ; p := fullcircle xscaled 4cm yscaled 2cm ; fill p withcolor cmyk(0,0.62,1,0) ; path q ; q := fullcircle scaled 1cm shifted (1cm, ypart center p) ; fill q withcolor blue ; picture r ; r := textext(\white E)shifted (-0.75cm,ypart center p) ; picture s ; s := textext(\white A)shifted (1cm, ypart center p) ; draw r ; draw s ; draw p ; draw q ; \stopMPcode} Soit A une partie d'un ensemble E. Si $n_E$ et $n_A$ sont respectivement les nombres d'éléments de E et de A, la {\bi proportion} des éléments de A dans E est le quotient $p=\frac{n_A}{n_E}$. \stophanging \stopMyText Wolfgang wrote on the list a few days ago ( http://www.mail-archive.com/ntg-context%40ntg.nl/msg79347.html http://www.mail-archive.com/ntg-context%40ntg.nl/msg79347.html): The \starthangaround environment reserves space for the image etc. only for the first paragraph while \placefigure includes more paragraphs if necessary. -- Rik ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Text around a figure in a framedtext
Hi, Sorry to revive this discussion (which I initiated), but the text in the following code does not wrapped around the figure. Why ? Fabrice \setupcolors [state=start] \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00] \definecolor[MyColorA][.75(MyColorB,white)] \defineframedtext [MyText] [frame=off, background=MyFrame, width=\textwidth, height=fit, location=left, style=italic] \defineoverlay [MyFrame] [\useMPgraphic{MyFrame}] \definelabel [Définition] [headstyle=\bf\smallcaps] \startuseMPgraphic{MyFrame} path b ; picture p ; p := textext.rt(\white\Définition) ; p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight) ; b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ; fill OverlayBox withcolor \MPcolor{MyColorA} ; fill b withcolor \MPcolor{MyColorB} ; draw p ; \stopuseMPgraphic \starttext \startMyText \starthanging[location=right] {\startMPcode path p ; p := fullcircle xscaled 4cm yscaled 2cm ; fill p withcolor cmyk(0,0.62,1,0) ; path q ; q := fullcircle scaled 1cm shifted (1cm, ypart center p) ; fill q withcolor blue ; picture r ; r := textext(\white E)shifted (-0.75cm,ypart center p) ; picture s ; s := textext(\white A)shifted (1cm, ypart center p) ; draw r ; draw s ; draw p ; draw q ; \stopMPcode} Soit A une partie d'un ensemble E. Si $n_E$ et $n_A$ sont respectivement les nombres d'éléments de E et de A, la {\bi proportion} des éléments de A dans E est le quotient $p=\frac{n_A}{n_E}$. \stophanging \stopMyText 2015-08-10 1:11 GMT+02:00 Jeong Dal hak...@me.com: Dear Otared and Wolfgang, It works fine after replacing the text itself. Thank you for the info. Best regards, Dalyoung ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Text around a figure in a framedtext
Hi, Well, I think I have solved the problem : it is because of the blank line. Why ? Fabrice 2015-08-13 17:19 GMT+02:00 Fabrice Couvreur fabrice1.couvr...@gmail.com: Hi, Sorry to revive this discussion (which I initiated), but the text in the following code does not wrapped around the figure. Why ? Fabrice \setupcolors [state=start] \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00] \definecolor[MyColorA][.75(MyColorB,white)] \defineframedtext [MyText] [frame=off, background=MyFrame, width=\textwidth, height=fit, location=left, style=italic] \defineoverlay [MyFrame] [\useMPgraphic{MyFrame}] \definelabel [Définition] [headstyle=\bf\smallcaps] \startuseMPgraphic{MyFrame} path b ; picture p ; p := textext.rt(\white\Définition) ; p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight) ; b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ; fill OverlayBox withcolor \MPcolor{MyColorA} ; fill b withcolor \MPcolor{MyColorB} ; draw p ; \stopuseMPgraphic \starttext \startMyText \starthanging[location=right] {\startMPcode path p ; p := fullcircle xscaled 4cm yscaled 2cm ; fill p withcolor cmyk(0,0.62,1,0) ; path q ; q := fullcircle scaled 1cm shifted (1cm, ypart center p) ; fill q withcolor blue ; picture r ; r := textext(\white E)shifted (-0.75cm,ypart center p) ; picture s ; s := textext(\white A)shifted (1cm, ypart center p) ; draw r ; draw s ; draw p ; draw q ; \stopMPcode} Soit A une partie d'un ensemble E. Si $n_E$ et $n_A$ sont respectivement les nombres d'éléments de E et de A, la {\bi proportion} des éléments de A dans E est le quotient $p=\frac{n_A}{n_E}$. \stophanging \stopMyText 2015-08-10 1:11 GMT+02:00 Jeong Dal hak...@me.com: Dear Otared and Wolfgang, It works fine after replacing the text itself. Thank you for the info. Best regards, Dalyoung ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Text around a figure in a framedtext
On 2015-08-13 11:19, Fabrice Couvreur wrote: Hi, Sorry to revive this discussion (which I initiated), but the text in the following code does not wrapped around the figure. Why ? Fabrice \setupcolors [state=start] \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00] \definecolor[MyColorA][.75(MyColorB,white)] \defineframedtext [MyText] [frame=off, background=MyFrame, width=\textwidth, height=fit, location=left, style=italic] \defineoverlay [MyFrame] [\useMPgraphic{MyFrame}] \definelabel [Définition] [headstyle=\bf\smallcaps] \startuseMPgraphic{MyFrame} path b ; picture p ; p := textext.rt(\white\Définition) ; p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight) ; b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ; fill OverlayBox withcolor \MPcolor{MyColorA} ; fill b withcolor \MPcolor{MyColorB} ; draw p ; \stopuseMPgraphic \starttext \startMyText \starthanging[location=right] {\startMPcode path p ; p := fullcircle xscaled 4cm yscaled 2cm ; fill p withcolor cmyk(0,0.62,1,0) ; path q ; q := fullcircle scaled 1cm shifted (1cm, ypart center p) ; fill q withcolor blue ; picture r ; r := textext(\white E)shifted (-0.75cm,ypart center p) ; picture s ; s := textext(\white A)shifted (1cm, ypart center p) ; draw r ; draw s ; draw p ; draw q ; \stopMPcode} Soit A une partie d'un ensemble E. Si $n_E$ et $n_A$ sont respectivement les nombres d'éléments de E et de A, la {\bi proportion} des éléments de A dans E est le quotient $p=\frac{n_A}{n_E}$. \stophanging \stopMyText Wolfgang wrote on the list a few days ago (http://www.mail-archive.com/ntg-context%40ntg.nl/msg79347.html): The \starthangaround environment reserves space for the image etc. onlyfor the first paragraph while \placefigure includes more paragraphs if necessary. -- Rik ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Text around a figure in a framedtext
Hi Wolfgang, Thank you for all these explanations that make me progress in the use of Context. Fabrice 2015-08-08 10:40 GMT+02:00 Wolfgang Schuster schuster.wolfg...@gmail.com: Fabrice Couvreur fabrice1.couvr...@gmail.com 8. August 2015 00:49 Hi, Why the text does not move in the first framedtext like the second framedtext ? You have to use \starthanging instead of \placefgure when you’re in a frame. \starttext \startframedtext[width=max] \starthanging[location=right] {\startMPcode draw unitsquare scaled 2cm ; \stopMPcode} \input tufte \stophanging \stopframedtext \stoptext Wolfgang ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Text around a figure in a framedtext
Dear Otared and Wolfgang, It works fine after replacing the text itself. Thank you for the info. Best regards, Dalyoung ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Text around a figure in a framedtext
Hi Otared, A small mistake on your part : do not write \input knuth.tex but \input knuth. Then I want the text in the first framedtext wrapped around the figure as in the second. Fabrice 2015-08-08 6:18 GMT+02:00 Otared Kavian ota...@gmail.com: Hi, You should use the same width if you want to obtain the same result (by the way, you have to say also \stopframedtext in your source file): \startframedtext[width=\textwidth]{ \placefigure[right,none]{}{% \startMPcode draw unitsquare scaled 2cm ; \stopMPcode} \input knuth.tex } \stopframedtext Best regards: OK On 08 Aug 2015, at 00:49, Fabrice Couvreur fabrice1.couvr...@gmail.com wrote: Hi, Why the text does not move in the first framedtext like the second framedtext ? Thank you. Fabrice \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00] \definecolor[MyColorA][.75(MyColorB,white)] \defineframedtext [MyText] [frame=off, background=MyFrame, width=\textwidth, location=right] \defineoverlay [MyFrame] [\useMPgraphic{MyFrame}] \definelabel [Définition] [headstyle=\bf\smallcaps] \startuseMPgraphic{MyFrame} path b ; picture p ; p := textext.rt(\white\Définition) ; p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight) ; b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ; fill OverlayBox withcolor \MPcolor{MyColorA} ; fill b withcolor \MPcolor{MyColorB} ; draw p ; \stopuseMPgraphic \starttext \startMyText \placefigure[right,none]{}{% \startMPcode draw unitsquare scaled 2cm ; \stopMPcode} \input knuth \stopMyText \startframedtext{ \placefigure[right,none]{}{% \startMPcode draw unitsquare scaled 2cm ; \stopMPcode} \input knuth} \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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Text around a figure in a framedtext
Fabrice Couvreur mailto:fabrice1.couvr...@gmail.com 8. August 2015 00:49 Hi, Why the text does not move in the first framedtext like the second framedtext? You have to use \starthanging instead of \placefgure when you’re in a frame. \starttext \startframedtext[width=max] \starthanging[location=right] {\startMPcode draw unitsquare scaled 2cm ; \stopMPcode} \input tufte \stophanging \stopframedtext \stoptext Wolfgang ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Text around a figure in a framedtext (Wolfgang Schuster)
Dear Wolfgang, You have to use \starthanging instead of \placefgure when you’re in a frame. \starttext \startframedtext[width=max] \starthanging[location=right] {\startMPcode draw unitsquare scaled 2cm ; \stopMPcode} \input tufte \stophanging \stopframedtext \stoptext Wolfgang Thank you for letting me know the command “starthanging”. I tried the command “\startfiguretext … \stopfiguretext”, and found that there is no text below the square. \startframedtext[width=\textwidth]{ \startfiguretext[right,none]{}{% \startMPcode draw unitsquare scaled 2cm ; \stopMPcode} \input knuth \stopfiguretext} \stopframedtext Your example worked fine, but if we replace tufte by knuth, then text is written over the square while the tufte’s text was witten surround the square. Is it expected result? Thank you again. Best regards, Dalyoung ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Text around a figure in a framedtext (Wolfgang Schuster)
Hi Jeong, You are right, but probably this is due to the way the source file knuth.tex is encoded: if you replace \input knuth by the text itself, that is by the following Thus, I came to the conclusion that the designer of a new system must not only be the implementer and first large--scale user; the designer should also write the first user manual. The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improve- ments would never have been made, because I would never have thought of them or perceived why they were important. But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design is complete and fairly robust, the real test begins as people with many different viewpoints undertake their own experiments. then the text is wrapped around the figure when using \starthanging. Best regards: OK On 08 Aug 2015, at 15:49, Jeong Dal hak...@me.com wrote: Dear Wolfgang, You have to use \starthanging instead of \placefgure when you’re in a frame. \starttext \startframedtext[width=max] \starthanging[location=right] {\startMPcode draw unitsquare scaled 2cm ; \stopMPcode} \input tufte \stophanging \stopframedtext \stoptext Wolfgang Thank you for letting me know the command “starthanging”. I tried the command “\startfiguretext … \stopfiguretext”, and found that there is no text below the square. \startframedtext[width=\textwidth]{ \startfiguretext[right,none]{}{% \startMPcode draw unitsquare scaled 2cm ; \stopMPcode} \input knuth \stopfiguretext} \stopframedtext Your example worked fine, but if we replace tufte by knuth, then text is written over the square while the tufte’s text was witten surround the square. Is it expected result? Thank you again. Best regards, Dalyoung ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Text around a figure in a framedtext (Wolfgang Schuster)
Jeong Dal mailto:hak...@me.com 8. August 2015 15:49 Dear Wolfgang, Thank you for letting me know the command “starthanging”. I tried the command “\startfiguretext … \stopfiguretext”, and found that there is no text below the square. \startframedtext[width=\textwidth]{ \startfiguretext[right,none]{}{% \startMPcode draw unitsquare scaled 2cm ; \stopMPcode} \input knuth \stopfiguretext} \stopframedtext Your example worked fine, but if we replace tufte by knuth, then text is written over the square while the tufte’s text was witten surround the square. Is it expected result? The \starthangaround environment reserves space for the image etc. only for the first paragraph while \placefigure includes more paragraphs if necessary. Wolfgang ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Text around a figure in a framedtext
Hi, Why the text does not move in the first framedtext like the second framedtext ? Thank you. Fabrice \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00] \definecolor[MyColorA][.75(MyColorB,white)] \defineframedtext [MyText] [frame=off, background=MyFrame, width=\textwidth, location=right] \defineoverlay [MyFrame] [\useMPgraphic{MyFrame}] \definelabel [Définition] [headstyle=\bf\smallcaps] \startuseMPgraphic{MyFrame} path b ; picture p ; p := textext.rt(\white\Définition) ; p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight) ; b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ; fill OverlayBox withcolor \MPcolor{MyColorA} ; fill b withcolor \MPcolor{MyColorB} ; draw p ; \stopuseMPgraphic \starttext \startMyText \placefigure[right,none]{}{% \startMPcode draw unitsquare scaled 2cm ; \stopMPcode} \input knuth \stopMyText \startframedtext{ \placefigure[right,none]{}{% \startMPcode draw unitsquare scaled 2cm ; \stopMPcode} \input knuth} \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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Text around a figure in a framedtext
Hi, You should use the same width if you want to obtain the same result (by the way, you have to say also \stopframedtext in your source file): \startframedtext[width=\textwidth]{ \placefigure[right,none]{}{% \startMPcode draw unitsquare scaled 2cm ; \stopMPcode} \input knuth.tex } \stopframedtext Best regards: OK On 08 Aug 2015, at 00:49, Fabrice Couvreur fabrice1.couvr...@gmail.com wrote: Hi, Why the text does not move in the first framedtext like the second framedtext ? Thank you. Fabrice \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00] \definecolor[MyColorA][.75(MyColorB,white)] \defineframedtext [MyText] [frame=off, background=MyFrame, width=\textwidth, location=right] \defineoverlay [MyFrame] [\useMPgraphic{MyFrame}] \definelabel [Définition] [headstyle=\bf\smallcaps] \startuseMPgraphic{MyFrame} path b ; picture p ; p := textext.rt(\white\Définition) ; p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight) ; b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ; fill OverlayBox withcolor \MPcolor{MyColorA} ; fill b withcolor \MPcolor{MyColorB} ; draw p ; \stopuseMPgraphic \starttext \startMyText \placefigure[right,none]{}{% \startMPcode draw unitsquare scaled 2cm ; \stopMPcode} \input knuth \stopMyText \startframedtext{ \placefigure[right,none]{}{% \startMPcode draw unitsquare scaled 2cm ; \stopMPcode} \input knuth} \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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___