Hi,
I used some code from the meta-fun manual to recreate a labelled frame around 
my sections. But the first framedtext protrudes a couple of mm into the margin. 
Only the first one in the page. I intentionaly added other sections and the 
frames aline to the margin ok.
I tried to put something before the first frame (noindentation, dontleavehmode) 
because I sometimes read it solves problems, but not the case here.
so Why is the first frame protruding and only the first?


\definepapersize[vertical][A4, portrait]
\definepapersize[horizontal][A4, landscape] 
\setuppapersize[vertical]


\setuplayout[location=middle,
             marking=off,
             topspace=1cm,
             topdistance=0cm,
             backspace=2.5cm,           
             height=fit,
             width=fit,
             rightedge=5mm,
             rightedgedistance=0cm,
             rightmargin=20mm,
             rightmargindistance=7mm,
             leftmargin=1.5cm,
             header=1cm,
             headerdistance=.5cm,
             bottomspace=.5cm,
             bottomdistance=0mm,
             footer=.8cm,
             footerdistance=.2cm,
             setup=strict,]



\startuseMPgraphic{FunnyFrame}
picture p ; numeric w, h, o ;
p := textext.rt(\MPstring{FunnyFrame}) ;
w := OverlayWidth ; h := OverlayHeight ; o := BodyFontSize ;
p := p shifted (2o,h-ypart center p) ; draw p ;
drawoptions (withpen pencircle scaled .25pt withcolor blue) ;
draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p,h) ;
%draw boundingbox p ; %%%quitamos el frame pequeño
setbounds currentpicture to unitsquare xyscaled(w,h) ;
\stopuseMPgraphic

\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[FunnyText][width=.85\textwidth, height=20mm, frame=off,  
background=FunnyFrame, align=flushright,location=right, 
after={\blank[2*big]}]%foregroundsytel amplía la palabra Apartado

\def\FrameTitle#1%
{\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut \color[blue]{\tfx Apartado 
#1}\hss}}}

\setMPtext{FunnyFrame}{} % initialize the text variable



\define[2]\firstHeadings{%
\dontleavehmode \switchtobodyfont[miCorm] 
\FrameTitle#1%

\dontleavehmode \startFunnyText  {\switchtobodyfont[miCorm,20.7pt] #2} 
\stopFunnyText
}

\setuphead [section] [color=blue, command=\firstHeadings, indentnext=no]


\starttext
\noindentation 
\dontleavehmode 

\startsection[title=Aspectos generales]


Esta guía contiene toda la documentación necesaria para administrar la prueba 
unificada de certificación que ha diseñado la comisión de alemán. Se ruega al 
profesorado\footnote{Todas las alusiones a la forma del masculino genérico que 
se recogen en este documento deberán entenderse referidas a la condición 
masculina o femenina de cada persona según corresponda.} que se familiarice con 
las secciones del documento a través del índice y acuda a ellas según vaya 
siendo necesario, de manera que se pueda administrar y corregir la prueba de la 
manera más satisfactoria posible.
\stopsection


\startsection[title=another section]
Las carpetas con las pruebas aparecen nombradas por idioma, nivel y set de 
pruebas, no apareciendo ninguna referencia a convocatorias anuales ni tampoco 
fechas. Sí aparece la referencia a la convocatoria en cada una de las guías de 
administración para los diferentes niveles.
 \stopsection
\startsection[title=another section]
La carpeta correspondiente a cada nivel contiene las distintas actividades de 
lengua, los audios para CTO y el audio/vídeo base para la mediación escrita. 
Además contiene esta guía con la información necesaria para tener una visión 
global de la prueba: los solucionarios, transcripciones, tablas de corrección, 
tablas de conversión y la rúbrica para la mediación escrita. Igualmente se 
incorporarán o enlazarán subcarpetas con los archivos necesarios para las 
pruebas orales: monólogos, diálogos y mediaciones orales.
 \stopsection

\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to