ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: centering a makeup
Date: Sun, 14 Sep 2014 22:10:42 +0200	[thread overview]
Message-ID: <8D6C5150-6B42-4002-9F77-F3527AFEA744@gmail.com> (raw)
In-Reply-To: <5415EDD4.6000208@gmx.es>


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
___________________________________________________________________________________


  reply	other threads:[~2014-09-14 20:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-14 15:38 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 [this message]
2014-09-15  5:20       ` Pablo Rodriguez

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=8D6C5150-6B42-4002-9F77-F3527AFEA744@gmail.com \
    --to=schuster.wolfgang@gmail.com \
    --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).