From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/97181 Path: news.gmane.org!.POSTED!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Re: Title without the parentheses Date: Tue, 31 Jan 2017 15:53:41 +0100 Message-ID: References: <3C30066D-183B-4F0D-9008-50D95845B57D@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5847290574304791935==" X-Trace: blaine.gmane.org 1485874469 4225 195.159.176.226 (31 Jan 2017 14:54:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2017 14:54:29 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 31 15:54:24 2017 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYZp8-0000sN-Pm for gctc-ntg-context-518@m.gmane.org; Tue, 31 Jan 2017 15:54:22 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 785B11B757; Tue, 31 Jan 2017 15:53:57 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 27_m37NMsky3; Tue, 31 Jan 2017 15:53:56 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 8F9E61B723; Tue, 31 Jan 2017 15:53:56 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id F11F5F5E2 for ; Tue, 31 Jan 2017 15:53:55 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6_KI0ECyXGCm for ; Tue, 31 Jan 2017 15:53:54 +0100 (CET) Original-Received: from mail-io0-f177.google.com (mail-io0-f177.google.com [209.85.223.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 8EF13DD33 for ; Tue, 31 Jan 2017 15:53:44 +0100 (CET) Original-Received: by mail-io0-f177.google.com with SMTP id v96so36807626ioi.0 for ; Tue, 31 Jan 2017 06:53:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=RbTqgTELMMhjR3vRJuORd4FyjMBSmVU4OsdGYxnqgOM=; b=m048aOsRG6qDB/bEVdqzzqxlrUuXSNKhzWW+EoKAoVPR1zXuobfl4awcUtYORxFlQ3 quhojWgQViLbjnk76/3+C0gpQZ5t/mk3dGv84bsBhJMdmTHj9Hj8NlR7OmdGsGsJZPWp x0ieeLOS9zazYOZeuL3LHcpo75nwLk81eJoooPCvIxPTwNWIvk1yC6lmjnyodIefPPew KQ5tz8WnXBUPIJH7HRlvv/SZ1LVygwI3UTO/eKqCdVAmR3Chr3pQ0iXtC6UXtDKzSG66 7TF9HJn6XOwu1wqjcIz6NB+vzvSqh+pC+4OaiMbx1qKo9+LcQyUn0xDHm/rDzqQEmbIu WQ/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=RbTqgTELMMhjR3vRJuORd4FyjMBSmVU4OsdGYxnqgOM=; b=p9Sx2Lic90F/+ESpkXcpFEk/Wuf78/4VqxDgpvFybKSEy0xNriA4jsDzuI1KCpbQPN fKxBQCst06pOGsSPO4z0FXfPs7iLvNMmKe9AoRmG4MdNRs3wcJyu/7RzZvfQ5IgTDlHa lksU2FtxybuGr9/aIowpiITcCC6NIDbKjuOgoyPe9XVjHcsA3vXOT6FPKkQOAbhjcEtG asDjr0GAw95FfCp1Yx5lhweZKZ/TNI1nAwZHq0Z7YzeAzp3/7h98Ux483CEZFAwgDCDa Kd9e4XRYEDdB6Q/dvF+epYGOz1bKHty7N1KIPuwPSzUq7/7PcLcbltzgqukgVS8oPSjE RHJw== X-Gm-Message-State: AIkVDXIOQ6fQql1C+uOYRueq0ypaxBUv4s2O1vye1AiGcdKwYMc89O/J+1txyfhf9vM3ZRWmX7JhSDbIGJpMtg== X-Received: by 10.107.18.201 with SMTP id 70mr26746978ios.33.1485874422268; Tue, 31 Jan 2017 06:53:42 -0800 (PST) Original-Received: by 10.64.24.73 with HTTP; Tue, 31 Jan 2017 06:53:41 -0800 (PST) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:97181 Archived-At: --===============5847290574304791935== Content-Type: multipart/alternative; boundary=001a113f72821efd8c05476519d1 --001a113f72821efd8c05476519d1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 : > 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 :=3D unitsquare xscaled \overlaywidth yscaled \overlayheight ; > pickup pencircle scaled \overlaylinewidth ; > fill p withcolor \MPcolor{\overlaycolor} ; > draw p withcolor \MPcolor{\overlaylinecolor} ; > \stopuniqueMPgraphic > \setuplayout[grid=3Dyes] > \defineoverlay[MyBackgroundLayer][\uniqueMPgraphic{MyShape}] > > \define[1]\MyExoCommand{% > \lower\strutdepth\hbox{\startframed > [background=3DMyBackgroundLayer, > frame=3Doff, > % width=3D3cm, > align=3Dflushleft, > backgroundcolor=3Ddarkred] > {\white Exercice #1} > \stopframed} > } > \defineenumeration[ex] > [text=3D, > title=3Dyes, > titleleft=3D, > titleright=3D, > width=3Dfit, > alternative=3Dtop, > number=3Dyes, > numbercommand=3D\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 > 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 d= o. > Fabrice > > \defineenumeration > [ex] > [text=3D{Exercice}, > headcommand=3D\EXFRAME, > titleleft=3D, > titleright=3D, > title=3Dyes, > width=3Dfit, > numberconversionset=3DACCONVERSION, > alternative=3Dtop, > number=3Dyes] > > 2017-01-29 12:02 GMT+01:00 Otared Kavian : > >> Hi Fabrice, >> >> To suppress the parentheses in the title, you can use the keys titleleft >> and titleright as in the following: >> >> \defineenumeration >> [ex] >> [text=3DExercice, >> title=3Dyes, >> titleleft=3D, >> titleright=3D, >> width=3Dfit, >> numberconversionset=3DACCONVERSION, >> alternative=3Dtop, >> number=3Dyes] >> >> In order to put the word =C2=AB Exercice =C2=BB in the frame you should = define a >> special command, for instance \MyTextCommand and the say text =3D >> \MyTextCommand >> >> Best regrads: OK >> >> On 29 Jan 2017, at 09:07, Fabrice Couvreur >> 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=3Doff, >> offset=3D0pt, >> location=3Dlow, >> width=3D\struttotal, >> background=3Dcolor, >> backgroundcolor=3Ddarkred, >> foregroundcolor=3Dwhite, >> forgroundstyle=3Dbold] >> >> \defineprocessor[ACPROCESSOR][command=3D\EXFRAME] >> \defineconversionset[ACCONVERSION][][ACPROCESSOR->n] >> >> \defineenumeration >> [ex] >> [text=3DExercice, >> title=3Dyes, >> width=3Dfit, >> numberconversionset=3DACCONVERSION, >> alternative=3Dtop, >> number=3Dyes] >> >> \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 t= o >> 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 > ____________________________________________________________ > _______________________ > --001a113f72821efd8c05476519d1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Kavian,
Thank you ve= ry 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 eno= ugh to use the =C2=A0\lower command as in the exmaple below.
Best regards: Otared K.

%% begin
\startuniqueMPgraphic{MyShape}
path p ;=C2=A0
p :=3D unitsqua= re xscaled \overlaywidth yscaled \overlayheight ;
pickup pencircle scaled \overlaylinewidth ;
fi= ll p withcolor \MPcolor{\overlaycolor} ;
draw p = withcolor \MPcolor{\overlaylinecolor} ;
\stopuniqueMPgraphic
\setuplayout[grid=3Dyes]
\defineove= rlay[MyBackgroundLayer][\uniqueMPgraphic{MyShape}]

=
\define[1]\MyExoCommand{%
\low= er\strutdepth\hbox{\startframed
[backgroun= d=3DMyBackgroundLayer,
frame=3Doff,
%= width=3D3cm,
align=3Dflushlef= t,
backgroundcolor=3Ddarkred]<= /div>
{\white Exercice #1}
\stopframed}
}
\defineenumeration[ex]=
[text=3D,
title=3Dye= s,
titleleft=3D,
titl= eright=3D,
width=3Dfit,
alternative=3Dtop,
number=3Dyes,
numbercommand=3D\MyExoCommand]


=
\showgrid
\starttext

\startex{Pour tous les candidats \hfill 5 points}
=C2=A0 \input ward
\stopex

\stoptext
%% end

On 29 Jan 2017, at 23:04, Fabrice Couvreur <fabrice1.couvreur= @gmail.com> wrote:

Hello Kavi= an,
Thank you for your answer, it's good = for the parentheses. Fo= r the command, I found only this which does not exactly answer what I want = to do.
Fabrice


\defineenumeration
= =C2=A0 [ex]
=C2=A0 [text=3D{Exercice},
=C2=A0=C2=A0 headcommand=3D\EX= FRAME,
=C2=A0=C2=A0 titleleft=3D,
=C2=A0=C2=A0 titleright=3D,
=C2= =A0=C2=A0 title=3Dyes,
=C2=A0=C2=A0 width=3Dfit,
=C2=A0=C2=A0 numberc= onversionset=3DACCONVERSION,
=C2=A0=C2=A0 alternative=3Dtop,
=C2= =A0=C2=A0 number=3Dyes]

2017-01-29 12:02 GMT+01:00 Otared Kavian <otared@gmai= l.com>:
Hi Fabrice,

To suppress the parentheses= in the title, you can use the keys titleleft and titleright as in the foll= owing:

\defineenumeration
=C2=A0 [e= x]
=C2=A0 [text=3DExercice,
=C2=A0 =C2=A0title=3Dyes,
=C2=A0 =C2=A0titleleft=3D,
=C2=A0 =C2=A0titleright=3D,
=C2=A0 =C2=A0width=3Dfit,
=C2=A0 =C2=A0numberconversions= et=3DACCONVERSION,
=C2=A0 =C2=A0alternative=3Dtop,
=C2=A0 =C2=A0number=3Dyes]

In order to put = the word =C2=AB Exercice =C2=BB in the frame you should define a special co= mmand, for instance \MyTextCommand and the say text =3D \MyTextCommand

Best regrads: OK

On 29 Jan 2017, a= t 09:07, Fabrice Couvreur <fabrice1.couvreur@gmail.com> wrote:

Hello,
I would like a title withou= t the parentheses and the text "Exercice" in the frame with the n= umber.
Thank you.
Fabrice

\defineframed
=C2=A0 [EXFRAME]
=C2=A0 = [frame=3Doff,
=C2=A0=C2=A0 offset=3D0pt,
=C2=A0=C2=A0 location=3Dlow,=
=C2=A0=C2=A0 width=3D\struttotal,
=C2=A0=C2=A0 background=3Dcolor,=C2=A0=C2=A0 backgroundcolor=3Ddarkred,
=C2=A0=C2=A0 foregroundcolor= =3Dwhite,
=C2=A0=C2=A0 forgroundstyle=3Dbold]

\defineprocessor[AC= PROCESSOR][command=3D\EXFRAME]
\defineconversionset[ACCONVERSI= ON][][ACPROCESSOR->n]

\defineenumeration
=C2=A0 [ex]
=C2=A0= [text=3DExercice,
=C2=A0=C2=A0 title=3Dyes,
=C2=A0=C2=A0 width=3Dfit= ,
=C2=A0=C2=A0 numberconversionset=3DACCONVERSION,
=C2=A0=C2=A0 = alternative=3Dtop,
=C2=A0=C2=A0 number=3Dyes]

\starttext

\= startex{Pour tous les candidats \hfill 5 points}
=C2=A0 \input ward
\= stopex

\stoptext


_____________________________________________= ______________________________________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listin= fo/ntg-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net
archive=C2=A0 :
https://bitbucket.org/phg/cont= ext-mirror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
_________________________________________________________________= __________________

_________________________________________________________________= __________________
If your question is of interest to others as well, pl= ease add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/= mailman/listinfo/ntg-context
webpage =C2=A0: http://www.pragma-ade.nl / http://context.aanhet.net<= /a>
archive =C2=A0:
https://bitbucket.org/phg/context-mirror/c= ommits/
wiki =C2=A0=C2=A0=C2=A0=C2=A0: http://contextgarden.net
_________________= _________________________________________________________________= _


_________________= _________________________________________________________________= _
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" rel=3D"noreferrer= " target=3D"_blank">http://www.ntg.nl/mailman/listinfo/ntg-context=
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/cont= ext-mirror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
_________________________________________________________________= __________________

--001a113f72821efd8c05476519d1-- --===============5847290574304791935== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============5847290574304791935==--