From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/86592 Path: news.gmane.org!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Problem with an environment Date: Thu, 6 Mar 2014 23:42:31 +0100 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1259323050==" X-Trace: ger.gmane.org 1394145758 14359 80.91.229.3 (6 Mar 2014 22:42:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Mar 2014 22:42:38 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Mar 06 23:42:49 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WLh03-0000WV-Vv for gctc-ntg-context-518@m.gmane.org; Thu, 06 Mar 2014 23:42:48 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 25EC1101F5; Thu, 6 Mar 2014 23:42:47 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id TXdpx-++XkQd; Thu, 6 Mar 2014 23:42:45 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 6B8F5101EF; Thu, 6 Mar 2014 23:42:45 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1A7F3101EF for ; Thu, 6 Mar 2014 23:42:44 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OoCwsn3kb4e2 for ; Thu, 6 Mar 2014 23:42:42 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 4F09C101E1 for ; Thu, 6 Mar 2014 23:42:32 +0100 (CET) Original-Received: from mail-we0-x22a.google.com (mail-we0-x22a.google.com [IPv6:2a00:1450:400c:c03::22a]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s26MgVeK017400 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 6 Mar 2014 23:42:31 +0100 Original-Received: by mail-we0-f170.google.com with SMTP id w61so4019212wes.15 for ; Thu, 06 Mar 2014 14:42:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=9Nzpu1JIiQp8hXSS3eGwgOuiAV35ZrhKKItR3Ox66Qs=; b=fiKkoMa/dRkb0bKC1DNhd/BSgRFpPYQOExZ1taRayI+kxDPKFRzFQ5+jlOrcRSr19Z G2L1IZ7b8uGZNwr04I80fQH21IBZAxwRUWD5/ZIb4e7kgvpxmDG/7iX8JsKA3o7M7POz 0Kc74uk7HB9c+eax1B1xh5krU4wTU3Jrx7jhWB7KwrB5SUuv6dMGrA0MzMKYPLpB83ZT 1RVTB8Monf2FPcpBo2/x/LB9/DbPE6o0JsuldYmNPC6Yn4OGydebkeJCvIuREvjzXZD/ eHdkfB9kjFj908rtDFd+r8i/MNArwcYMaFHWD/a65GCacEVmM3Sqtm12RJsO5vIKhvmU suaA== X-Received: by 10.194.185.148 with SMTP id fc20mr13892726wjc.27.1394145751081; Thu, 06 Mar 2014 14:42:31 -0800 (PST) Original-Received: by 10.227.20.136 with HTTP; Thu, 6 Mar 2014 14:42:31 -0800 (PST) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c03::22a; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03LymGvIF - 8bf14b3ae658 - 20140306 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 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-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:86592 Archived-At: --===============1259323050== Content-Type: multipart/alternative; boundary=047d7bdcab7c4229be04f3f7da5a --047d7bdcab7c4229be04f3f7da5a Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I'm trying to built a template for evaluations of my students. I have a problem with the head environment that does not take into account the selected font and size. Regards, Fabrice \environment environ-2 \environment environ-3 \environment header \starttext \MyOtherHeader{Seconde GTA}{20}{3}{2014}{{\ss \tfd \bf Correction du devoir maison de Math=E9matiques} }{{\ss \bf \tfd 9}} \startex \input knuth \stopex \stoptext ############################################################## \startenvironment environ-2 \loadtypescriptfile[mathdesign] \definetypeface [mainface] [rm] [serif] [palatino] [default] \definetypeface [mainface] [tt] [mono] [modern] [default] [rscale=3D0.9] \definetypeface [mainface] [mm] [math] [xits] [default] \setupbodyfont[mainface,11pt] \setuppagenumbering[location=3D] \setupexternalfigures[location=3D{local,global,default}] \setupexternalfigures[directory=3D/home/fab/Seconde/2013_2014/Figures/] \mainlanguage[fr] \stopenvironment Thanks Hans for this header ############################################################ % macros=3Dmkvi \startenvironment header \environment environ-2 \starttexdefinition MyOtherHeader #where #day #month #year #title #number \defineoverlay[whatever][\useMPgraphic{whatever}] \startuseMPgraphic{whatever} path p; p:=3Dfullsquare xyscaled (\overlaywidth,\overlayheight) squeezed 1pt; fill p withcolor white ; draw p withpen pencircle scaled 2pt withcolor 0.625white ; picture d ; d :=3D textext("\quad#where\space\endash\space\date[d=3D#day,m=3D#month,y=3D#year]= \quad") shifted .5[ulcorner p,urcorner p]; fill boundingbox d withcolor white ; draw d ; setbounds currentpicture to p ; \stopuseMPgraphic \framed [ width=3D\hsize, height=3D5em, foregroundstyle=3D\itxx, background=3Dwhatever, frame=3Doff, ] {#title \space {\ss\tfc\bf n \high{\tfa \bf o}} \space #number } \stoptexdefinition \stopenvironment Thanks Wolfgang for this environment ############################################################# \startenvironment environ-3 \defineenumeration [ex] [text=3D{Exercice}, headstyle=3D{\bf\feature[+][f:smallcaps]}, inbetween=3D{\blank[small]}, stopper=3D{.}] \stopenvironment ############################################################# --047d7bdcab7c4229be04f3f7da5a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I'm trying to= built a template for evaluations of my students.=
I have a problem with the
head enviro= nment that does not take into account the selected font and size.
Regards,
Fabrice


\environment environ-2

\environment environ-3

\environment he= ader
=A0
\starttext

\MyOtherHeader{Seconde GTA}{20}{3}{2014}{{= \ss \tfd \bf Correction du devoir maison de Math=E9matiques} }{{\ss \bf \tf= d 9}}

\st= artex
=A0\input knuth
=A0\sto= pex
= \stoptext

##############################################################

\= startenvironment environ-2

\loadtypescriptfile[mathdesign]
=A0\definetypeface [mainface] [rm] [serif] [palatino] [default]

\defin= etypeface [mainface] [tt] [mono]=A0 [modern] [default] [rscale=3D0.9]

\definetypeface [mainface] [mm] [math]=A0 [xits] [default]

\setu= pbodyfont[mainface,11pt]

\setuppagenumbering[location=3D]

\se= tupexternalfigures[location=3D{local,global,default}]

\setupexternal= figures[directory=3D/home/fab/Seconde/2013_2014/Figures/]

\mainlanguage[fr]

\stopenvironment


Thanks Hans for th= is header

##########################################################= ##
% macros=3Dmkvi

\startenvironment header

\environment e= nviron-2

\starttexdefinition MyOtherHeader #where #day #month #year #title #numb= er

\defineoverlay[whatever][\useMPgraphic{whatever}]

\startus= eMPgraphic{whatever}
=A0path p;
=A0p:=3Dfullsquare xyscaled (\overlay= width,\overlayheight) squeezed 1pt;
=A0fill p withcolor white ;
=A0draw p withpen pencircle scaled 2pt withc= olor 0.625white ;
=A0picture d ;
=A0d :=3D textext("\quad#where\= space\endash\space\date[d=3D#day,m=3D#month,y=3D#year]\quad")
=A0sh= ifted .5[ulcorner p,urcorner p];
=A0fill boundingbox d withcolor white ; draw d ;
setbounds currentpictur= e to p ;
\stopuseMPgraphic

\framed [
=A0=A0=A0=A0=A0=A0=A0 wid= th=3D\hsize,
=A0=A0=A0=A0=A0=A0=A0 height=3D5em,
=A0=A0=A0=A0=A0=A0= =A0 foregroundstyle=3D\itxx,
=A0=A0=A0=A0=A0=A0=A0 background=3Dwhatever= ,
=A0=A0=A0=A0=A0=A0=A0 frame=3Doff,
=A0=A0=A0=A0=A0=A0=A0 ]
=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 {#title
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 \space=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 {\ss\tfc\bf n \high{\tfa \bf o}}
=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 \space
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = #number
=A0=A0=A0=A0=A0=A0=A0 }

\stoptexdefinition

\stope= nvironment


Thanks Wolfgang for this environment

##################################################= ###########
\startenvironment environ-3

\defineenumeration
=A0= [ex]
=A0 [text=3D{Exercice},
=A0=A0 headstyle=3D{\bf\feature[+][f:sm= allcaps]},
=A0=A0 inbetween=3D{\blank[small]},
=A0=A0 stopper=3D{.}]


\stopenvironment

##################################################= ###########
--047d7bdcab7c4229be04f3f7da5a-- --===============1259323050== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1259323050==--