From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/97173 Path: news.gmane.org!.POSTED!not-for-mail From: Otared Kavian Newsgroups: gmane.comp.tex.context Subject: Re: Title without the parentheses Date: Mon, 30 Jan 2017 14:54:37 +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 (Mac OS X Mail 10.3 \(3263\)) Content-Type: multipart/mixed; boundary="===============6167896258534315473==" X-Trace: blaine.gmane.org 1485784512 8295 195.159.176.226 (30 Jan 2017 13:55:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 30 Jan 2017 13:55:12 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 30 14:55:08 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 1cYCQF-0001zq-Ox for gctc-ntg-context-518@m.gmane.org; Mon, 30 Jan 2017 14:55:07 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 74C63126059E; Mon, 30 Jan 2017 14:54:53 +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 x_vOegFiu3Ka; Mon, 30 Jan 2017 14:54:52 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 9E0FD126058D; Mon, 30 Jan 2017 14:54:52 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 6340B126057E for ; Mon, 30 Jan 2017 14:54:51 +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 vqD1_-SWkgj2 for ; Mon, 30 Jan 2017 14:54:50 +0100 (CET) Original-Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) (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 53B2F126057C for ; Mon, 30 Jan 2017 14:54:40 +0100 (CET) Original-Received: by mail-wm0-f41.google.com with SMTP id v77so48516401wmv.0 for ; Mon, 30 Jan 2017 05:54:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=k2Ixa5zSemborxzBPZM8ypHdTPHmIuwBnzjXNL96DWc=; b=EVKSHmMi4hWa43xEP5p/UN9/R8+AYbDpX+dxS1sfdFPdX/AFEPyWFcAcngZFVjQeqP /5wi9uV3YXn81ZombrDZJTvStLD0iSSrSmNHDWG2uYV6RB8j2xYFAMi/5akChFMqVb/Z xNvKJNbxd2JKTSa5S/AMiukE0dsMiU1JT2wgbg5GY7ih6qdsJ0c94cU50hP6yKBlCkwJ CjmO88YuhA1/Wufn/LYa7fa//yT+USHtKX3HfONzcxmEZetTFiuNDxArR54h6PDuhC8W X43Ky9dRzsKr8817PZ6wPr4av3fiPVX3xNQVgFLfljfQFEDJo5c8yo7pZxE18nEmM+60 rO5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=k2Ixa5zSemborxzBPZM8ypHdTPHmIuwBnzjXNL96DWc=; b=nD4KOWfYeGt4QYuxVn7qix9HRpEkCwZ9D9gkdTwcnBxBKqsaqGA+LAdCLhkrsRaJrf qqRQ5ER4dNU7QfQWGyXDXYrF4dZHpaCAJFwtdJz2zwqs9T5YjNIe8FB2AwT4j/RZHdu5 vro0s6/0HxnhA1fr6d/sOhFLSl3qcRee28teucIWrl4uUnBeZ81+XBv4FEB4EoAGZrDR GnKcZ0iuKW0GlPVCvtlyZdWsP+j2pawhDcNlJwGjME1KEpyux4YvzD791hUWIsEgRnXq +229GxRvgsJKPlm0G9DiecxGd5db2TxCLNKgte5rp3upCuH0KbgLZh0yep/e8vgfhzLK 6LHQ== X-Gm-Message-State: AIkVDXJngK/JnqdZIj8XdXcFzfU7uQ+3auA32t5TCfelVstX3wtk6+omE5I3WL41GBd9TA== X-Received: by 10.223.175.36 with SMTP id z33mr18393019wrc.25.1485784479402; Mon, 30 Jan 2017 05:54:39 -0800 (PST) Original-Received: from ?IPv6:2a01:e34:ec02:4760:9dd6:d13d:c71:a325? ([2a01:e34:ec02:4760:9dd6:d13d:c71:a325]) by smtp.gmail.com with ESMTPSA id r6sm18900713wmd.4.2017.01.30.05.54.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Jan 2017 05:54:38 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3263) 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:97173 Archived-At: --===============6167896258534315473== Content-Type: multipart/alternative; boundary="Apple-Mail=_4B498988-FBBE-4848-BB2A-26049DD5E645" --Apple-Mail=_4B498988-FBBE-4848-BB2A-26049DD5E645 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 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 ;=20 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: >=20 > 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 >=20 > \defineenumeration > [ex] > [text=3D{Exercice}, > headcommand=3D\EXFRAME, > titleleft=3D, > titleright=3D, > title=3Dyes, > width=3Dfit, > numberconversionset=3DACCONVERSION, > alternative=3Dtop, > number=3Dyes] >=20 > 2017-01-29 12:02 GMT+01:00 Otared Kavian >: > Hi Fabrice, >=20 > To suppress the parentheses in the title, you can use the keys = titleleft and titleright as in the following: >=20 > \defineenumeration > [ex] > [text=3DExercice, > title=3Dyes, > titleleft=3D, > titleright=3D, > width=3Dfit, > numberconversionset=3DACCONVERSION, > alternative=3Dtop, > number=3Dyes] >=20 > 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 >=20 > Best regrads: OK >=20 >> On 29 Jan 2017, at 09:07, Fabrice Couvreur = > = wrote: >>=20 >> Hello, >> I would like a title without the parentheses and the text "Exercice" = in the frame with the number. >> Thank you. >> Fabrice >>=20 >> \defineframed >> [EXFRAME] >> [frame=3Doff, >> offset=3D0pt, >> location=3Dlow, >> width=3D\struttotal, >> background=3Dcolor, >> backgroundcolor=3Ddarkred, >> foregroundcolor=3Dwhite, >> forgroundstyle=3Dbold] >>=20 >> \defineprocessor[ACPROCESSOR][command=3D\EXFRAME] >> \defineconversionset[ACCONVERSION][][ACPROCESSOR->n] >>=20 >> \defineenumeration >> [ex] >> [text=3DExercice, >> title=3Dyes, >> width=3Dfit, >> numberconversionset=3DACCONVERSION, >> alternative=3Dtop, >> number=3Dyes] >>=20 >> \starttext >>=20 >> \startex{Pour tous les candidats \hfill 5 points} >> \input ward >> \stopex >>=20 >> \stoptext >=20 >=20 > = __________________________________________________________________________= _________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > 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 > = __________________________________________________________________________= _________ >=20 > = __________________________________________________________________________= _________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > 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 > = __________________________________________________________________________= _________ --Apple-Mail=_4B498988-FBBE-4848-BB2A-26049DD5E645 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 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 <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=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 <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=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 = <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=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 = 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
_______________________________________________________________= ____________________

= --Apple-Mail=_4B498988-FBBE-4848-BB2A-26049DD5E645-- --===============6167896258534315473== 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 --===============6167896258534315473==--