* Centering a figure vertically on a page
@ 2012-07-03 11:21 Marcin Borkowski
2012-07-03 11:30 ` Wolfgang Schuster
0 siblings, 1 reply; 11+ messages in thread
From: Marcin Borkowski @ 2012-07-03 11:21 UTC (permalink / raw)
To: ConTeXt mailing list
Hello,
the subject line basically covers my problem: I have a large (tikz)
figure, and I want to have it by itself on a page, centered both
horizontally and vertically. How can I achieve this? I already know
that \setuppagenumber[state=stop] is a good idea, and \midaligned{...}
gives me horizontal centering; what about vertical? The problem is
that the figure is larger than the text area (and this doesn't bother
me, it's a game board and it may extend almost to the paper border),
so \vfill doesn't work (and \vss doesn't, either).
TIA
--
Marcin Borkowski
http://mbork.pl
___________________________________________________________________________________
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] 11+ messages in thread
* Re: Centering a figure vertically on a page
2012-07-03 11:21 Centering a figure vertically on a page Marcin Borkowski
@ 2012-07-03 11:30 ` Wolfgang Schuster
2012-07-03 12:18 ` Marcin Borkowski
2012-07-03 13:10 ` Alan BRASLAU
0 siblings, 2 replies; 11+ messages in thread
From: Wolfgang Schuster @ 2012-07-03 11:30 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 03.07.2012 um 13:21 schrieb Marcin Borkowski:
> Hello,
>
> the subject line basically covers my problem: I have a large (tikz)
> figure, and I want to have it by itself on a page, centered both
> horizontally and vertically. How can I achieve this? I already know
> that \setuppagenumber[state=stop] is a good idea, and \midaligned{...}
> gives me horizontal centering; what about vertical? The problem is
> that the figure is larger than the text area (and this doesn't bother
> me, it's a game board and it may extend almost to the paper border),
> so \vfill doesn't work (and \vss doesn't, either).
\starttext
%\noheaderandfooterlines
\centerbox{\externalfigure[cow]}
\stoptext
Wolfgang
___________________________________________________________________________________
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] 11+ messages in thread
* Re: Centering a figure vertically on a page
2012-07-03 11:30 ` Wolfgang Schuster
@ 2012-07-03 12:18 ` Marcin Borkowski
2012-07-03 13:10 ` Alan BRASLAU
1 sibling, 0 replies; 11+ messages in thread
From: Marcin Borkowski @ 2012-07-03 12:18 UTC (permalink / raw)
To: ntg-context
Dnia 2012-07-03, o godz. 13:30:22
Wolfgang Schuster <schuster.wolfgang@gmail.com> napisał(a):
>
> Am 03.07.2012 um 13:21 schrieb Marcin Borkowski:
>
> > Hello,
> >
> > the subject line basically covers my problem: I have a large (tikz)
> > figure, and I want to have it by itself on a page, centered both
> > horizontally and vertically. How can I achieve this? I already
> > know that \setuppagenumber[state=stop] is a good idea, and
> > \midaligned{...} gives me horizontal centering; what about
> > vertical? The problem is that the figure is larger than the text
> > area (and this doesn't bother me, it's a game board and it may
> > extend almost to the paper border), so \vfill doesn't work (and
> > \vss doesn't, either).
>
> \starttext
> %\noheaderandfooterlines
> \centerbox{\externalfigure[cow]}
> \stoptext
>
> Wolfgang
Thanks a lot, it works!
--
Marcin Borkowski
http://mbork.pl
___________________________________________________________________________________
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] 11+ messages in thread
* Re: Centering a figure vertically on a page
2012-07-03 11:30 ` Wolfgang Schuster
2012-07-03 12:18 ` Marcin Borkowski
@ 2012-07-03 13:10 ` Alan BRASLAU
2012-07-03 13:48 ` Hans Hagen
1 sibling, 1 reply; 11+ messages in thread
From: Alan BRASLAU @ 2012-07-03 13:10 UTC (permalink / raw)
To: schuster.wolfgang; +Cc: mailing list for ConTeXt users
On Tue, 3 Jul 2012 13:30:22 +0200
Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:
> \centerbox{\externalfigure[cow]}
Wow! \centerbox{}
Alan
___________________________________________________________________________________
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] 11+ messages in thread
* Re: Centering a figure vertically on a page
2012-07-03 13:10 ` Alan BRASLAU
@ 2012-07-03 13:48 ` Hans Hagen
2012-07-03 15:27 ` Alan BRASLAU
0 siblings, 1 reply; 11+ messages in thread
From: Hans Hagen @ 2012-07-03 13:48 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 3-7-2012 15:10, Alan BRASLAU wrote:
> On Tue, 3 Jul 2012 13:30:22 +0200
> Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:
>
>> \centerbox{\externalfigure[cow]}
>
> Wow! \centerbox{}
It's a rather (old) low level boxing macro ...
\start
\showboxes
\centerbox width 10cm height 3cm {Alan is surprised}
\stop
.. simulating the regular tex syntax for box dimensions
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 11+ messages in thread
* Re: Centering a figure vertically on a page
2012-07-03 13:48 ` Hans Hagen
@ 2012-07-03 15:27 ` Alan BRASLAU
2012-07-03 15:54 ` Aditya Mahajan
2012-07-03 16:04 ` luigi scarso
0 siblings, 2 replies; 11+ messages in thread
From: Alan BRASLAU @ 2012-07-03 15:27 UTC (permalink / raw)
To: Hans Hagen; +Cc: mailing list for ConTeXt users
On Tue, 3 Jul 2012 15:48:43 +0200
Hans Hagen <pragma@wxs.nl> wrote:
> It's a rather (old) low level boxing macro ...
>
> \start
> \showboxes
> \centerbox width 10cm height 3cm {Alan is surprised}
> \stop
My TeX culture remains, alas, always limited (even if I have the
TeXbook on my office bookshelf, indeed \centerbox does not appear in
plain TeX). Nothing in the ConTeXt manual, either. Of course, a
leisurely browsing of the source code would reveal many such treasures!
On the garden:
Context 2005.05.25
...
\centerbox now accepts \par in it;s argument
...
Alan
___________________________________________________________________________________
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] 11+ messages in thread
* Re: Centering a figure vertically on a page
2012-07-03 15:27 ` Alan BRASLAU
@ 2012-07-03 15:54 ` Aditya Mahajan
2012-07-03 16:04 ` luigi scarso
1 sibling, 0 replies; 11+ messages in thread
From: Aditya Mahajan @ 2012-07-03 15:54 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Tue, 3 Jul 2012, Alan BRASLAU wrote:
> plain TeX). Nothing in the ConTeXt manual, either. Of course, a
> leisurely browsing of the source code would reveal many such treasures!
supp-box.mkiv is a good place to start a leisurely browsing of the source
code. It contains many useful box manipuation macros.
Aditya
___________________________________________________________________________________
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] 11+ messages in thread
* Re: Centering a figure vertically on a page
2012-07-03 15:27 ` Alan BRASLAU
2012-07-03 15:54 ` Aditya Mahajan
@ 2012-07-03 16:04 ` luigi scarso
2012-07-03 16:08 ` Wolfgang Schuster
1 sibling, 1 reply; 11+ messages in thread
From: luigi scarso @ 2012-07-03 16:04 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 992 bytes --]
On Tue, Jul 3, 2012 at 5:27 PM, Alan BRASLAU <alan.braslau@cea.fr> wrote:
> On Tue, 3 Jul 2012 15:48:43 +0200
> Hans Hagen <pragma@wxs.nl> wrote:
>
>> It's a rather (old) low level boxing macro ...
>>
>> \start
>> \showboxes
>> \centerbox width 10cm height 3cm {Alan is surprised}
>> \stop
>
> My TeX culture remains, alas, always limited (even if I have the
> TeXbook on my office bookshelf, indeed \centerbox does not appear in
> plain TeX). Nothing in the ConTeXt manual, either. Of course, a
> leisurely browsing of the source code would reveal many such treasures!
There is also \vcenter
\starttext
xxxxxxxxxxg\ruledvbox{\hsize=5cm\vcenter to 3cm{Alan is
surprised}}gxxxxxxxxx \type{\vcenter}\par
xxxxxxxxxxg\ruledvbox{\centerbox width5cm height3cm{Alan is
surprised}}gxxxxxxxxx \type{\centerbox}\par
xxxxxxxxxxg\ruledvbox{\vcenter{\centerbox width5cm height3cm{Alan is
surprised}}}gxxxxxxxxx\type{\centerbox+\vcenter}\par
\stoptext
(\vcenter is a TeX primitive)
--
luigi
[-- Attachment #1.2: Type: text/html, Size: 1329 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] 11+ messages in thread
* Re: Centering a figure vertically on a page
2012-07-03 16:04 ` luigi scarso
@ 2012-07-03 16:08 ` Wolfgang Schuster
2012-07-03 16:19 ` luigi scarso
0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2012-07-03 16:08 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1207 bytes --]
Am 03.07.2012 um 18:04 schrieb luigi scarso:
>
>
> On Tue, Jul 3, 2012 at 5:27 PM, Alan BRASLAU <alan.braslau@cea.fr> wrote:
> > On Tue, 3 Jul 2012 15:48:43 +0200
> > Hans Hagen <pragma@wxs.nl> wrote:
> >
> >> It's a rather (old) low level boxing macro ...
> >>
> >> \start
> >> \showboxes
> >> \centerbox width 10cm height 3cm {Alan is surprised}
> >> \stop
> >
> > My TeX culture remains, alas, always limited (even if I have the
> > TeXbook on my office bookshelf, indeed \centerbox does not appear in
> > plain TeX). Nothing in the ConTeXt manual, either. Of course, a
> > leisurely browsing of the source code would reveal many such treasures!
> There is also \vcenter
>
> \starttext
> xxxxxxxxxxg\ruledvbox{\hsize=5cm\vcenter to 3cm{Alan is surprised}}gxxxxxxxxx \type{\vcenter}\par
> xxxxxxxxxxg\ruledvbox{\centerbox width5cm height3cm{Alan is surprised}}gxxxxxxxxx \type{\centerbox}\par
> xxxxxxxxxxg\ruledvbox{\vcenter{\centerbox width5cm height3cm{Alan is surprised}}}gxxxxxxxxx\type{\centerbox+\vcenter}\par
> \stoptext
>
> (\vcenter is a TeX primitive)
ConTeXt redefines \vcenter because the primitive can only be used in math mode.
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 1709 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] 11+ messages in thread
* Re: Centering a figure vertically on a page
2012-07-03 16:08 ` Wolfgang Schuster
@ 2012-07-03 16:19 ` luigi scarso
2012-07-03 16:27 ` Wolfgang Schuster
0 siblings, 1 reply; 11+ messages in thread
From: luigi scarso @ 2012-07-03 16:19 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1389 bytes --]
On Tue, Jul 3, 2012 at 6:08 PM, Wolfgang Schuster <
schuster.wolfgang@gmail.com> wrote:
>
> Am 03.07.2012 um 18:04 schrieb luigi scarso:
>
>
>
> On Tue, Jul 3, 2012 at 5:27 PM, Alan BRASLAU <alan.braslau@cea.fr> wrote:
> > On Tue, 3 Jul 2012 15:48:43 +0200
> > Hans Hagen <pragma@wxs.nl> wrote:
> >
> >> It's a rather (old) low level boxing macro ...
> >>
> >> \start
> >> \showboxes
> >> \centerbox width 10cm height 3cm {Alan is surprised}
> >> \stop
> >
> > My TeX culture remains, alas, always limited (even if I have the
> > TeXbook on my office bookshelf, indeed \centerbox does not appear in
> > plain TeX). Nothing in the ConTeXt manual, either. Of course, a
> > leisurely browsing of the source code would reveal many such treasures!
> There is also \vcenter
>
> \starttext
> xxxxxxxxxxg\ruledvbox{\hsize=5cm\vcenter to 3cm{Alan is
> surprised}}gxxxxxxxxx \type{\vcenter}\par
> xxxxxxxxxxg\ruledvbox{\centerbox width5cm height3cm{Alan is
> surprised}}gxxxxxxxxx \type{\centerbox}\par
> xxxxxxxxxxg\ruledvbox{\vcenter{\centerbox width5cm height3cm{Alan is
> surprised}}}gxxxxxxxxx\type{\centerbox+\vcenter}\par
> \stoptext
>
> (\vcenter is a TeX primitive)
>
>
> ConTeXt redefines \vcenter because the primitive can only be used in math
> mode.
>
yes I know ... and original TeX primitive is still available as
\normalvcenter
(kind of easter egg for Alan..)
--
luigi
[-- Attachment #1.2: Type: text/html, Size: 2116 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] 11+ messages in thread
end of thread, other threads:[~2012-07-03 16:27 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-03 11:21 Centering a figure vertically on a page Marcin Borkowski
2012-07-03 11:30 ` Wolfgang Schuster
2012-07-03 12:18 ` Marcin Borkowski
2012-07-03 13:10 ` Alan BRASLAU
2012-07-03 13:48 ` Hans Hagen
2012-07-03 15:27 ` Alan BRASLAU
2012-07-03 15:54 ` Aditya Mahajan
2012-07-03 16:04 ` luigi scarso
2012-07-03 16:08 ` Wolfgang Schuster
2012-07-03 16:19 ` luigi scarso
2012-07-03 16:27 ` Wolfgang Schuster
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).