* Title without the parentheses @ 2017-01-29 8:07 Fabrice Couvreur 2017-01-29 11:02 ` Otared Kavian 0 siblings, 1 reply; 6+ messages in thread From: Fabrice Couvreur @ 2017-01-29 8:07 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 662 bytes --] Hello, I would like a title without the parentheses and the text "Exercice" in the frame with the number. Thank you. Fabrice \defineframed [EXFRAME] [frame=off, offset=0pt, location=low, width=\struttotal, background=color, backgroundcolor=darkred, foregroundcolor=white, forgroundstyle=bold] \defineprocessor[ACPROCESSOR][command=\EXFRAME] \defineconversionset[ACCONVERSION][][ACPROCESSOR->n] \defineenumeration [ex] [text=Exercice, title=yes, width=fit, numberconversionset=ACCONVERSION, alternative=top, number=yes] \starttext \startex{Pour tous les candidats \hfill 5 points} \input ward \stopex \stoptext [-- Attachment #1.2: Type: text/html, Size: 1163 bytes --] [-- Attachment #2: Type: text/plain, Size: 492 bytes --] ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Title without the parentheses 2017-01-29 8:07 Title without the parentheses Fabrice Couvreur @ 2017-01-29 11:02 ` Otared Kavian 2017-01-29 22:04 ` Fabrice Couvreur 0 siblings, 1 reply; 6+ messages in thread From: Otared Kavian @ 2017-01-29 11:02 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 1345 bytes --] Hi Fabrice, To suppress the parentheses in the title, you can use the keys titleleft and titleright as in the following: \defineenumeration [ex] [text=Exercice, title=yes, titleleft=, titleright=, width=fit, numberconversionset=ACCONVERSION, alternative=top, number=yes] In order to put the word « Exercice » in the frame you should define a special command, for instance \MyTextCommand and the say text = \MyTextCommand Best regrads: OK > On 29 Jan 2017, at 09:07, Fabrice Couvreur <fabrice1.couvreur@gmail.com> wrote: > > Hello, > I would like a title without the parentheses and the text "Exercice" in the frame with the number. > Thank you. > Fabrice > > \defineframed > [EXFRAME] > [frame=off, > offset=0pt, > location=low, > width=\struttotal, > background=color, > backgroundcolor=darkred, > foregroundcolor=white, > forgroundstyle=bold] > > \defineprocessor[ACPROCESSOR][command=\EXFRAME] > \defineconversionset[ACCONVERSION][][ACPROCESSOR->n] > > \defineenumeration > [ex] > [text=Exercice, > title=yes, > width=fit, > numberconversionset=ACCONVERSION, > alternative=top, > number=yes] > > \starttext > > \startex{Pour tous les candidats \hfill 5 points} > \input ward > \stopex > > \stoptext [-- Attachment #1.2: Type: text/html, Size: 3596 bytes --] [-- Attachment #2: Type: text/plain, Size: 492 bytes --] ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Title without the parentheses 2017-01-29 11:02 ` Otared Kavian @ 2017-01-29 22:04 ` Fabrice Couvreur 2017-01-30 11:09 ` Otared Kavian 2017-01-30 13:54 ` Otared Kavian 0 siblings, 2 replies; 6+ messages in thread From: Fabrice Couvreur @ 2017-01-29 22:04 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 2376 bytes --] Hello Kavian, Thank you for your answer, it's good for the parentheses. For the command, I found only this which does not exactly answer what I want to do. Fabrice \defineenumeration [ex] [text={Exercice}, headcommand=\EXFRAME, titleleft=, titleright=, title=yes, width=fit, numberconversionset=ACCONVERSION, alternative=top, number=yes] 2017-01-29 12:02 GMT+01:00 Otared Kavian <otared@gmail.com>: > Hi Fabrice, > > To suppress the parentheses in the title, you can use the keys titleleft > and titleright as in the following: > > \defineenumeration > [ex] > [text=Exercice, > title=yes, > titleleft=, > titleright=, > width=fit, > numberconversionset=ACCONVERSION, > alternative=top, > number=yes] > > In order to put the word « Exercice » in the frame you should define a > special command, for instance \MyTextCommand and the say text = > \MyTextCommand > > Best regrads: OK > > On 29 Jan 2017, at 09:07, Fabrice Couvreur <fabrice1.couvreur@gmail.com> > wrote: > > Hello, > I would like a title without the parentheses and the text "Exercice" in > the frame with the number. > Thank you. > Fabrice > > \defineframed > [EXFRAME] > [frame=off, > offset=0pt, > location=low, > width=\struttotal, > background=color, > backgroundcolor=darkred, > foregroundcolor=white, > forgroundstyle=bold] > > \defineprocessor[ACPROCESSOR][command=\EXFRAME] > \defineconversionset[ACCONVERSION][][ACPROCESSOR->n] > > \defineenumeration > [ex] > [text=Exercice, > title=yes, > width=fit, > numberconversionset=ACCONVERSION, > alternative=top, > number=yes] > > \starttext > > \startex{Pour tous les candidats \hfill 5 points} > \input ward > \stopex > > \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 > ____________________________________________________________ > _______________________ > [-- Attachment #1.2: Type: text/html, Size: 4803 bytes --] [-- Attachment #2: Type: text/plain, Size: 492 bytes --] ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Title without the parentheses 2017-01-29 22:04 ` Fabrice Couvreur @ 2017-01-30 11:09 ` Otared Kavian 2017-01-30 13:54 ` Otared Kavian 1 sibling, 0 replies; 6+ messages in thread From: Otared Kavian @ 2017-01-30 11:09 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 4399 bytes --] Hi Fabrice, Below you have an example which may help you to achieve what you want, but in the example I am sending there is an issue with the alignment of the title. I could not solve the issue, sorry… Best regards: Otared K. %% begin example boxed-title.tex \startuniqueMPgraphic{MyShape} path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ; pickup pencircle scaled \overlaylinewidth ; fill p withcolor \MPcolor{\overlaycolor} ; draw p withcolor \MPcolor{\overlaylinecolor} ; \stopuniqueMPgraphic \defineoverlay[MyBackgroundLayer][\uniqueMPgraphic{MyShape}] \define[1]\MyExoCommand{% \startframed [background=MyBackgroundLayer, frame=off, width=3cm, backgroundcolor=darkred] {\white Exercice #1} \stopframed } \defineenumeration[ex] [text=, title=yes, titleleft=, titleright=, width=fit, alternative=top, number=yes, numbercommand=\MyExoCommand] \showgrid \starttext \startex{Pour tous les candidats \hfill 5 points} \input ward \stopex \stoptext %% end example boxed-title.tex > On 29 Jan 2017, at 23:04, Fabrice Couvreur <fabrice1.couvreur@gmail.com> wrote: > > Hello Kavian, > Thank you for your answer, it's good for the parentheses. For the command, I found only this which does not exactly answer what I want to do. > Fabrice > > \defineenumeration > [ex] > [text={Exercice}, > headcommand=\EXFRAME, > titleleft=, > titleright=, > title=yes, > width=fit, > numberconversionset=ACCONVERSION, > alternative=top, > number=yes] > > 2017-01-29 12:02 GMT+01:00 Otared Kavian <otared@gmail.com <mailto:otared@gmail.com>>: > Hi Fabrice, > > To suppress the parentheses in the title, you can use the keys titleleft and titleright as in the following: > > \defineenumeration > [ex] > [text=Exercice, > title=yes, > titleleft=, > titleright=, > width=fit, > numberconversionset=ACCONVERSION, > alternative=top, > number=yes] > > In order to put the word « Exercice » in the frame you should define a special command, for instance \MyTextCommand and the say text = \MyTextCommand > > Best regrads: OK > >> On 29 Jan 2017, at 09:07, Fabrice Couvreur <fabrice1.couvreur@gmail.com <mailto:fabrice1.couvreur@gmail.com>> wrote: >> >> Hello, >> I would like a title without the parentheses and the text "Exercice" in the frame with the number. >> Thank you. >> Fabrice >> >> \defineframed >> [EXFRAME] >> [frame=off, >> offset=0pt, >> location=low, >> width=\struttotal, >> background=color, >> backgroundcolor=darkred, >> foregroundcolor=white, >> forgroundstyle=bold] >> >> \defineprocessor[ACPROCESSOR][command=\EXFRAME] >> \defineconversionset[ACCONVERSION][][ACPROCESSOR->n] >> >> \defineenumeration >> [ex] >> [text=Exercice, >> title=yes, >> width=fit, >> numberconversionset=ACCONVERSION, >> alternative=top, >> number=yes] >> >> \starttext >> >> \startex{Pour tous les candidats \hfill 5 points} >> \input ward >> \stopex >> >> \stoptext > > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the Wiki! > > maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context <http://www.ntg.nl/mailman/listinfo/ntg-context> > webpage : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / http://context.aanhet.net <http://context.aanhet.net/> > archive : https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/> > wiki : http://contextgarden.net <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 > ___________________________________________________________________________________ [-- Attachment #1.2: Type: text/html, Size: 10974 bytes --] [-- Attachment #2: Type: text/plain, Size: 492 bytes --] ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Title without the parentheses 2017-01-29 22:04 ` Fabrice Couvreur 2017-01-30 11:09 ` Otared Kavian @ 2017-01-30 13:54 ` Otared Kavian 2017-01-31 14:53 ` Fabrice Couvreur 1 sibling, 1 reply; 6+ messages in thread From: Otared Kavian @ 2017-01-30 13:54 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 4334 bytes --] Hi Fabrice, In order to have the box aligned with the text, it is enough to use the \lower command as in the exmaple below. Best regards: Otared K. %% begin \startuniqueMPgraphic{MyShape} path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ; pickup pencircle scaled \overlaylinewidth ; fill p withcolor \MPcolor{\overlaycolor} ; draw p withcolor \MPcolor{\overlaylinecolor} ; \stopuniqueMPgraphic \setuplayout[grid=yes] \defineoverlay[MyBackgroundLayer][\uniqueMPgraphic{MyShape}] \define[1]\MyExoCommand{% \lower\strutdepth\hbox{\startframed [background=MyBackgroundLayer, frame=off, % width=3cm, align=flushleft, backgroundcolor=darkred] {\white Exercice #1} \stopframed} } \defineenumeration[ex] [text=, title=yes, titleleft=, titleright=, width=fit, alternative=top, number=yes, numbercommand=\MyExoCommand] \showgrid \starttext \startex{Pour tous les candidats \hfill 5 points} \input ward \stopex \stoptext %% end > On 29 Jan 2017, at 23:04, Fabrice Couvreur <fabrice1.couvreur@gmail.com> wrote: > > Hello Kavian, > Thank you for your answer, it's good for the parentheses. For the command, I found only this which does not exactly answer what I want to do. > Fabrice > > \defineenumeration > [ex] > [text={Exercice}, > headcommand=\EXFRAME, > titleleft=, > titleright=, > title=yes, > width=fit, > numberconversionset=ACCONVERSION, > alternative=top, > number=yes] > > 2017-01-29 12:02 GMT+01:00 Otared Kavian <otared@gmail.com <mailto:otared@gmail.com>>: > Hi Fabrice, > > To suppress the parentheses in the title, you can use the keys titleleft and titleright as in the following: > > \defineenumeration > [ex] > [text=Exercice, > title=yes, > titleleft=, > titleright=, > width=fit, > numberconversionset=ACCONVERSION, > alternative=top, > number=yes] > > In order to put the word « Exercice » in the frame you should define a special command, for instance \MyTextCommand and the say text = \MyTextCommand > > Best regrads: OK > >> On 29 Jan 2017, at 09:07, Fabrice Couvreur <fabrice1.couvreur@gmail.com <mailto:fabrice1.couvreur@gmail.com>> wrote: >> >> Hello, >> I would like a title without the parentheses and the text "Exercice" in the frame with the number. >> Thank you. >> Fabrice >> >> \defineframed >> [EXFRAME] >> [frame=off, >> offset=0pt, >> location=low, >> width=\struttotal, >> background=color, >> backgroundcolor=darkred, >> foregroundcolor=white, >> forgroundstyle=bold] >> >> \defineprocessor[ACPROCESSOR][command=\EXFRAME] >> \defineconversionset[ACCONVERSION][][ACPROCESSOR->n] >> >> \defineenumeration >> [ex] >> [text=Exercice, >> title=yes, >> width=fit, >> numberconversionset=ACCONVERSION, >> alternative=top, >> number=yes] >> >> \starttext >> >> \startex{Pour tous les candidats \hfill 5 points} >> \input ward >> \stopex >> >> \stoptext > > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the Wiki! > > maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context <http://www.ntg.nl/mailman/listinfo/ntg-context> > webpage : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / http://context.aanhet.net <http://context.aanhet.net/> > archive : https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/> > wiki : http://contextgarden.net <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 > ___________________________________________________________________________________ [-- Attachment #1.2: Type: text/html, Size: 10879 bytes --] [-- Attachment #2: Type: text/plain, Size: 492 bytes --] ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Title without the parentheses 2017-01-30 13:54 ` Otared Kavian @ 2017-01-31 14:53 ` Fabrice Couvreur 0 siblings, 0 replies; 6+ messages in thread From: Fabrice Couvreur @ 2017-01-31 14:53 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 4950 bytes --] Hi Kavian, Thank you very much for your help, your solution corresponds to what I was trying to do even if it uses another approach. Fabrice 2017-01-30 14:54 GMT+01:00 Otared Kavian <otared@gmail.com>: > Hi Fabrice, > > In order to have the box aligned with the text, it is enough to use the > \lower command as in the exmaple below. > Best regards: Otared K. > > %% begin > \startuniqueMPgraphic{MyShape} > path p ; > p := unitsquare xscaled \overlaywidth yscaled \overlayheight ; > pickup pencircle scaled \overlaylinewidth ; > fill p withcolor \MPcolor{\overlaycolor} ; > draw p withcolor \MPcolor{\overlaylinecolor} ; > \stopuniqueMPgraphic > \setuplayout[grid=yes] > \defineoverlay[MyBackgroundLayer][\uniqueMPgraphic{MyShape}] > > \define[1]\MyExoCommand{% > \lower\strutdepth\hbox{\startframed > [background=MyBackgroundLayer, > frame=off, > % width=3cm, > align=flushleft, > backgroundcolor=darkred] > {\white Exercice #1} > \stopframed} > } > \defineenumeration[ex] > [text=, > title=yes, > titleleft=, > titleright=, > width=fit, > alternative=top, > number=yes, > numbercommand=\MyExoCommand] > > > \showgrid > \starttext > > \startex{Pour tous les candidats \hfill 5 points} > \input ward > \stopex > > \stoptext > %% end > > On 29 Jan 2017, at 23:04, Fabrice Couvreur <fabrice1.couvreur@gmail.com> > wrote: > > Hello Kavian, > Thank you for your answer, it's good for the parentheses. For the > command, I found only this which does not exactly answer what I want to do. > Fabrice > > \defineenumeration > [ex] > [text={Exercice}, > headcommand=\EXFRAME, > titleleft=, > titleright=, > title=yes, > width=fit, > numberconversionset=ACCONVERSION, > alternative=top, > number=yes] > > 2017-01-29 12:02 GMT+01:00 Otared Kavian <otared@gmail.com>: > >> Hi Fabrice, >> >> To suppress the parentheses in the title, you can use the keys titleleft >> and titleright as in the following: >> >> \defineenumeration >> [ex] >> [text=Exercice, >> title=yes, >> titleleft=, >> titleright=, >> width=fit, >> numberconversionset=ACCONVERSION, >> alternative=top, >> number=yes] >> >> In order to put the word « Exercice » in the frame you should define a >> special command, for instance \MyTextCommand and the say text = >> \MyTextCommand >> >> Best regrads: OK >> >> On 29 Jan 2017, at 09:07, Fabrice Couvreur <fabrice1.couvreur@gmail.com> >> wrote: >> >> Hello, >> I would like a title without the parentheses and the text "Exercice" in >> the frame with the number. >> Thank you. >> Fabrice >> >> \defineframed >> [EXFRAME] >> [frame=off, >> offset=0pt, >> location=low, >> width=\struttotal, >> background=color, >> backgroundcolor=darkred, >> foregroundcolor=white, >> forgroundstyle=bold] >> >> \defineprocessor[ACPROCESSOR][command=\EXFRAME] >> \defineconversionset[ACCONVERSION][][ACPROCESSOR->n] >> >> \defineenumeration >> [ex] >> [text=Exercice, >> title=yes, >> width=fit, >> numberconversionset=ACCONVERSION, >> alternative=top, >> number=yes] >> >> \starttext >> >> \startex{Pour tous les candidats \hfill 5 points} >> \input ward >> \stopex >> >> \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 > ____________________________________________________________ > _______________________ > > > > ____________________________________________________________ > _______________________ > 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 > ____________________________________________________________ > _______________________ > [-- Attachment #1.2: Type: text/html, Size: 11678 bytes --] [-- Attachment #2: Type: text/plain, Size: 492 bytes --] ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-01-31 14:53 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-01-29 8:07 Title without the parentheses Fabrice Couvreur 2017-01-29 11:02 ` Otared Kavian 2017-01-29 22:04 ` Fabrice Couvreur 2017-01-30 11:09 ` Otared Kavian 2017-01-30 13:54 ` Otared Kavian 2017-01-31 14:53 ` Fabrice Couvreur
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).