ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* centering a makeup
@ 2014-09-14 15:38 Pablo Rodriguez
  2014-09-14 16:16 ` Aditya Mahajan
  2014-09-14 17:57 ` Wolfgang Schuster
  0 siblings, 2 replies; 6+ messages in thread
From: Pablo Rodriguez @ 2014-09-14 15:38 UTC (permalink / raw)
  To: ntg >> mailing list for ConTeXt users

Dear list,

I have the following sample:

\definemakeup
  [custom]
  [location=middle, width=.5\textwidth]

\starttext

  \startmakeup [custom]
    \input ward
  \stopmakeup

\stoptext

How can I center the makeup in the page?

\definemakeup[custom][align=middle] centers the lines, but this is
something different.

It is not a question of paragraph orientation. It is rather a question
of placing the makeup in the middle of the page (also horizontally)

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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] 6+ messages in thread

* Re: centering a makeup
  2014-09-14 15:38 centering a makeup Pablo Rodriguez
@ 2014-09-14 16:16 ` Aditya Mahajan
  2014-09-14 17:57 ` Wolfgang Schuster
  1 sibling, 0 replies; 6+ messages in thread
From: Aditya Mahajan @ 2014-09-14 16:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, 14 Sep 2014, Pablo Rodriguez wrote:

> Dear list,
>
> I have the following sample:
>
> \definemakeup
>  [custom]
>  [location=middle, width=.5\textwidth]
>
> \starttext
>
>  \startmakeup [custom]
>    \input ward
>  \stopmakeup
>
> \stoptext
>
> How can I center the makeup in the page?
>
> \definemakeup[custom][align=middle] centers the lines, but this is
> something different.
>
> It is not a question of paragraph orientation. It is rather a question
> of placing the makeup in the middle of the page (also horizontally)

(Untested):

\definemakeup[...][top=\vss, bottom=\vss]

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] 6+ messages in thread

* Re: centering a makeup
  2014-09-14 15:38 centering a makeup Pablo Rodriguez
  2014-09-14 16:16 ` Aditya Mahajan
@ 2014-09-14 17:57 ` Wolfgang Schuster
  2014-09-14 19:34   ` Pablo Rodriguez
  1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2014-09-14 17:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 14.09.2014 um 17:38 schrieb Pablo Rodriguez <oinos@gmx.es>:

> Dear list,
> 
> I have the following sample:
> 
> \definemakeup
>  [custom]
>  [location=middle, width=.5\textwidth]
> 
> \starttext
> 
>  \startmakeup [custom]
>    \input ward
>  \stopmakeup
> 
> \stoptext
> 
> How can I center the makeup in the page?
> 
> \definemakeup[custom][align=middle] centers the lines, but this is
> something different.
> 
> It is not a question of paragraph orientation. It is rather a question
> of placing the makeup in the middle of the page (also horizontally)

You have to change the layout for the page with your makeup environments
and set both margins to the same value. Changing the layout for a makeup
environment is very easy because when you create a new environment
with \definemakup context creates also a new page layout with the same
name which can be changed with the \setuplayout command.

\definemakeup
 [custom]
 [width=.5\textwidth]

\setuplayout
  [custom]
  [width=middle]

\showframe

\starttext

\startmakeup [custom]
\input ward
\stopmakeup

\input ward

\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] 6+ messages in thread

* Re: centering a makeup
  2014-09-14 17:57 ` Wolfgang Schuster
@ 2014-09-14 19:34   ` Pablo Rodriguez
  2014-09-14 20:10     ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Pablo Rodriguez @ 2014-09-14 19:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 09/14/2014 07:57 PM, Wolfgang Schuster wrote:
> Am 14.09.2014 um 17:38 schrieb Pablo Rodriguez <oinos@gmx.es>:
>> [...]
>> How can I center the makeup in the page?
> 
> You have to change the layout for the page with your makeup environments
> and set both margins to the same value. Changing the layout for a makeup
> environment is very easy because when you create a new environment
> with \definemakup context creates also a new page layout with the same
> name which can be changed with the \setuplayout command.
> 
> \definemakeup
>  [custom]
>  [width=.5\textwidth]
> 
> \setuplayout
>   [custom]
>   [width=middle]
> 
> \showframe
> 
> \starttext
> 
> \startmakeup [custom]
> \input ward
> \stopmakeup
> 
> \input ward
> 
> \stoptext

Many thanks for your reply, Wolfgang.

I’m afraid that it doesn’t work using latest beta from 2014.09.06 20:59.

Is this a bug?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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] 6+ messages in thread

* Re: centering a makeup
  2014-09-14 19:34   ` Pablo Rodriguez
@ 2014-09-14 20:10     ` Wolfgang Schuster
  2014-09-15  5:20       ` Pablo Rodriguez
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2014-09-14 20:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 14.09.2014 um 21:34 schrieb Pablo Rodriguez <oinos@gmx.es>:

> On 09/14/2014 07:57 PM, Wolfgang Schuster wrote:
>> Am 14.09.2014 um 17:38 schrieb Pablo Rodriguez <oinos@gmx.es>:
>>> [...]
>>> How can I center the makeup in the page?
>> 
>> You have to change the layout for the page with your makeup environments
>> and set both margins to the same value. Changing the layout for a makeup
>> environment is very easy because when you create a new environment
>> with \definemakup context creates also a new page layout with the same
>> name which can be changed with the \setuplayout command.
>> 
>> \definemakeup
>> [custom]
>> [width=.5\textwidth]
>> 
>> \setuplayout
>>  [custom]
>>  [width=middle]
>> 
>> \showframe
>> 
>> \starttext
>> 
>> \startmakeup [custom]
>> \input ward
>> \stopmakeup
>> 
>> \input ward
>> 
>> \stoptext
> 
> Many thanks for your reply, Wolfgang.
> 
> I’m afraid that it doesn’t work using latest beta from 2014.09.06 20:59.
> 
> Is this a bug?

I didn’t notice your width setting for the makeup environment. What you try to achieve
doesn’t work this way, when you want a narrow and centered are for the text you have
to set wide margins in the layout, e.g.

\definemakeup[custom]

\setuplayout
  [custom]
  [backspace=6cm,
   width=middle]

\showframe

\starttext

\startmakeup [custom]
\input ward
\stopmakeup

\input ward

\stoptext

or you put the text in a centered framed text environment (your still need \setuplayout
to get equal margins for the page), e.g.

\definemakeup[custom]

\setuplayout
  [custom]
  [width=middle]

\showframe

\starttext

\startmakeup [custom]
\startframedtext[middle][frame=off,width=.5\textwidth]
\input ward
\stopframedtext
\stopmakeup

\input ward

\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] 6+ messages in thread

* Re: centering a makeup
  2014-09-14 20:10     ` Wolfgang Schuster
@ 2014-09-15  5:20       ` Pablo Rodriguez
  0 siblings, 0 replies; 6+ messages in thread
From: Pablo Rodriguez @ 2014-09-15  5:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 09/14/2014 10:10 PM, Wolfgang Schuster wrote:
> I didn’t notice your width setting for the makeup environment. What you try to achieve
> doesn’t work this way, when you want a narrow and centered are for the text you have
> to set wide margins in the layout, e.g.
> [...]
> or you put the text in a centered framed text environment (your still need \setuplayout
> to get equal margins for the page), e.g.
> [...]

Many thanks for your reply, Wolfgang.

Everything works fine now.

I prefer the pure layout option (without framed text). It is simpler.

Many thanks again for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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] 6+ messages in thread

end of thread, other threads:[~2014-09-15  5:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-14 15:38 centering a makeup Pablo Rodriguez
2014-09-14 16:16 ` Aditya Mahajan
2014-09-14 17:57 ` Wolfgang Schuster
2014-09-14 19:34   ` Pablo Rodriguez
2014-09-14 20:10     ` Wolfgang Schuster
2014-09-15  5:20       ` Pablo Rodriguez

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).