From: Andreas Schneider <aksdb@gmx.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Vertically centered text in each page
Date: Wed, 02 Mar 2016 10:04:35 +0100 [thread overview]
Message-ID: <ee01ab7aacb903509020bede18c9262a@chemnitz.dyndns.aksdb.de> (raw)
In-Reply-To: <20160219122318.1b76d7b7@homerow>
[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]
Am 2016-02-19 12:23, schrieb Marco Patzer:
> On Fri, 19 Feb 2016 11:54:12 +0100
> Nicola <nvitacolonna@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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: chapterlayer.tex --]
[-- Type: text/x-tex; name=chapterlayer.tex, Size: 1066 bytes --]
\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
[-- Attachment #3: 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
___________________________________________________________________________________
prev parent reply other threads:[~2016-03-02 9:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-19 10:54 Nicola
2016-02-19 11:23 ` Marco Patzer
2016-02-19 11:51 ` Nicola
2016-02-19 12:36 ` Marco Patzer
2016-02-19 14:17 ` Hans Hagen
2016-02-19 17:55 ` Nicola
2016-03-02 9:04 ` Andreas Schneider [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ee01ab7aacb903509020bede18c9262a@chemnitz.dyndns.aksdb.de \
--to=aksdb@gmx.de \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).