ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Patrick Gundlach <pg@levana.de>
Cc: Giuseppe Bilotta <bourbaki@bigfoot.com>
Subject: Re: midalignment
Date: 21 Jun 2002 23:39:40 +0200	[thread overview]
Message-ID: <87ofe4s44j.fsf@gundla.ch> (raw)
In-Reply-To: <200206152115.47518.ishamid@attbi.com>

Idris S Hamid <ishamid@attbi.com> writes:

> Dear folks,
> 
> In the following example, \midalign is not placing its argument in the center 
> of the line but rather offset to the right a bit.

this is because \midalign (and other alignment macros) do not look at
the \leftskip and the \rightskip the \startnarrow sets. If you run
(pdf)etex you can try this code before the \midalign:

\def\doalignline#1#2% \\ == newline 
  {\bgroup
   \def\\{\egroup\par\doalignline{#1}{#2}\bgroup}%
   \dowithnextbox
     {\noindent\hbox to \dimexpr(\hsize - \rightskip - \leftskip)
       {\strut#1\unhbox\nextbox#2}\egroup}
     \hbox}

Hans should fix this. Sorry I don't have the time to put this into
bugzilla.

This should also answer a question from Giuseppe B.:

==================================================
From: Giuseppe Bilotta <bourbaki@bigfoot.com>
Subject: Misalignment in narrower.
To: ntg-context@ntg.nl
Date: Mon, 15 Apr 2002 16:47:14 +0200
Reply-To: Giuseppe Bilotta <bourbaki@bigfoot.com>

Hello,

Please try the following:

\starttext

\input tufte

\startnarrower

\midaligned{some text which should be centered but is not}

\input tufte

\rightaligned{some text which should be right-aligned but is not}

\stopnarrower

\input tufte

\stoptext

Please note that the ...aligned text is shifted too much to the
right in both cases. Prefixing a \noindent is of no use.

==================================================

Patrick

-- 
I'll fade into the darkness


  reply	other threads:[~2002-06-21 21:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-16  3:15 midalignment Idris S Hamid
2002-06-21 21:39 ` Patrick Gundlach [this message]
2002-06-23 21:58   ` midalignment Hans Hagen
2002-06-24  8:14     ` midalignment Patrick Gundlach

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=87ofe4s44j.fsf@gundla.ch \
    --to=pg@levana.de \
    --cc=bourbaki@bigfoot.com \
    /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).