* Problem with an environment
@ 2014-03-06 22:42 Fabrice Couvreur
2014-03-11 22:13 ` Fabrice
0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Couvreur @ 2014-03-06 22:42 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2453 bytes --]
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ématiques} }{{\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=0.9]
\definetypeface [mainface] [mm] [math] [xits] [default]
\setupbodyfont[mainface,11pt]
\setuppagenumbering[location=]
\setupexternalfigures[location={local,global,default}]
\setupexternalfigures[directory=/home/fab/Seconde/2013_2014/Figures/]
\mainlanguage[fr]
\stopenvironment
Thanks Hans for this header
############################################################
% macros=mkvi
\startenvironment header
\environment environ-2
\starttexdefinition MyOtherHeader #where #day #month #year #title #number
\defineoverlay[whatever][\useMPgraphic{whatever}]
\startuseMPgraphic{whatever}
path p;
p:=fullsquare xyscaled (\overlaywidth,\overlayheight) squeezed 1pt;
fill p withcolor white ;
draw p withpen pencircle scaled 2pt withcolor 0.625white ;
picture d ;
d :=
textext("\quad#where\space\endash\space\date[d=#day,m=#month,y=#year]\quad")
shifted .5[ulcorner p,urcorner p];
fill boundingbox d withcolor white ; draw d ;
setbounds currentpicture to p ;
\stopuseMPgraphic
\framed [
width=\hsize,
height=5em,
foregroundstyle=\itxx,
background=whatever,
frame=off,
]
{#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={Exercice},
headstyle={\bf\feature[+][f:smallcaps]},
inbetween={\blank[small]},
stopper={.}]
\stopenvironment
#############################################################
[-- Attachment #1.2: Type: text/html, Size: 4342 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problem with an environment
2014-03-06 22:42 Problem with an environment Fabrice Couvreur
@ 2014-03-11 22:13 ` Fabrice
2014-03-11 22:32 ` Wolfgang Schuster
0 siblings, 1 reply; 4+ messages in thread
From: Fabrice @ 2014-03-11 22:13 UTC (permalink / raw)
To: ntg-context
Hi,
I'll try to rephrase my question. In fact, the title is not in bold and
the size of the font is not taken into account.
Regards,
Fabrice
https://drive.google.com/file/d/0B-mkD83s36jbS05RalpqRHhzc2s/edit?usp=sharing
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problem with an environment
2014-03-11 22:13 ` Fabrice
@ 2014-03-11 22:32 ` Wolfgang Schuster
2014-03-12 18:40 ` Fabrice
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2014-03-11 22:32 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 581 bytes --]
Am 11.03.2014 um 23:13 schrieb Fabrice <couvreur.fabrice@wanadoo.fr>:
> Hi,
> I'll try to rephrase my question. In fact, the title is not in bold and the size of the font is not taken into account.
When you want to use a sans serif font you should also set one which isn’t the case in your setup.
\loadtypescriptfile[mathdesign]
\definetypeface [mainface] [rm] [serif] [palatino] [default]
\definetypeface [mainface] [tt] [mono] [modern] [default] [rscale=0.9]
\definetypeface [mainface] [mm] [math] [xits] [default]
\setupbodyfont[mainface,11pt]
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 1510 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problem with an environment
2014-03-11 22:32 ` Wolfgang Schuster
@ 2014-03-12 18:40 ` Fabrice
0 siblings, 0 replies; 4+ messages in thread
From: Fabrice @ 2014-03-12 18:40 UTC (permalink / raw)
To: ntg-context
Hi Wolfgang,
Thank you for your help. I actually forgot this :
\ definetypeface [mainface] [ss] [sans] [dejavu] [default] [rscale = auto].
The problem is that I'm still new with ConTeXt, but I think I can say
that I grew to people like you.
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-12 18:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-06 22:42 Problem with an environment Fabrice Couvreur
2014-03-11 22:13 ` Fabrice
2014-03-11 22:32 ` Wolfgang Schuster
2014-03-12 18:40 ` Fabrice
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).