Am 2016-02-19 12:23, schrieb Marco Patzer:
On Fri, 19 Feb 2016 11:54:12 +0100
Nicola <nvitacolo...@gmail.com> wrote:
How do I setup the slide command to do that by default? I have tried
putting {before,after,beforesection,aftersection}=\vfill in various
combinations in \setuphead, but I cannot obtain the desired effect.
\setuphead[slide][
style=\ssb,
command=\MySlide,
color=white,
insidesection=\vfill,
aftersection=\vfill,
page=yes]
I'm in a similar situation currently, but can't quite get it to work
with the mentioned solution.
The attached example shows several problems.
Test 1 and Test 3 show, that the \vfill at the beginning apparently adds
a forced space (which is worse in Test 3 than in Test 1).
Another problem is, that when the page needs to break (which is fine),
the last page will not be centered. This is a logic consequence of the
\vfill being after the section.
Is there any other mechanism to center text on _all_ pages, no matter
how often the sections or paragraphs need to get broken?
Best regards
Andreas
\setuppapersize[S8]
\setupbodyfont[24pt]
\setupinterlinespace[height=0.8]
\setuppagenumbering[location=]
\definelayer
[header]
[width=\paperwidth, height=\paperheight]
\define[2]\setheader{%
\resetlayer[header]%
\setlayer[header]%
[preset=lefttop, x=10mm, y=5mm, width=15cm, heigth=40pt]%
{#2}%
}
\define[2]\setsubtitle{%
\setlayer[header]%
[preset=lefttop, x=10mm, y=\dimexpr(5mm+40pt), width=15cm, heigth=22pt]%
{#2}%
}
\setuphead[chapter][command=\setheader, page=yes, before={\setupbackgrounds[page][background={header}, state=repeat]}, after={\strut\blank[-2*line,samepage,disable]}, insidesection=\vfill, aftersection=\vfill]
\setuphead[section][command=\setsubtitle, after={\strut\blank[-2*line,samepage,disable]}, before=]
%\showboxes
\showframe
\starttext
\startchapter[title={Test 1}]
\input knuth
\input knuth
\stopchapter
\startchapter[title={Test 2}]
No page-breaks here.
\stopchapter
\startchapter[title={Test 3}]
\startsection[title={Subtitle}]
\input knuth
\input knuth
\stopsection
\stopchapter
\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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________