ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to make startalignment middle not change the linewidth
@ 2006-08-15 23:36 Aditya Mahajan
  2006-08-16  1:00 ` Aditya Mahajan
  0 siblings, 1 reply; 4+ messages in thread
From: Aditya Mahajan @ 2006-08-15 23:36 UTC (permalink / raw)


Hi,
  It seems that startalignment[middle] does not like long lines. 
Consider the following example (not strictly minimal, but I can not 
get such a marginal case with default setup).

\setuppapersize[letter][letter]

\setuplayout[
                  width=middle,
                 height=middle,
               location=middle,
               topspace=.75in,
            bottomspace=0.75in,
              backspace=0.75in,
               cutspace=0.75in,
             leftmargin=0in,
            rightmargin=0in,
     leftmargindistance=0in,
    rightmargindistance=0in,
                 header=0in,
                 footer=0in,
          headerdistace=0in,
         footerdistance=0in,
       ]

\definetypeface[ieee] [rm]  [serif] [times]     [texansi]
\definetypeface[ieee] [mm]  [maths] [modern]    [texansi]

\setupbodyfont[ieee,10pt]

\definefont[TitleFont]   [Regular at 24pt]

\setvariables[paper]
   [ title={Optimal Performance of Feedback Control Systems with
            Limited Communication over Noisy Channels}]

\starttext
{\TitleFont\setupinterlinespace
\getvariable{paper}{title}
\blank[1.0em]\endgraf}

\startalignment[middle]
     {\TitleFont\setupinterlinespace
     \getvariable{paper}{title}
     \blank[1.0em]\endgraf}
\stopalignment
\stoptext

How can I get the same linebreaking as the first case, but with each 
line middle aligned?

Aditya

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to make startalignment middle not change the linewidth
  2006-08-15 23:36 How to make startalignment middle not change the linewidth Aditya Mahajan
@ 2006-08-16  1:00 ` Aditya Mahajan
  2006-08-16  7:23   ` Taco Hoekwater
  0 siblings, 1 reply; 4+ messages in thread
From: Aditya Mahajan @ 2006-08-16  1:00 UTC (permalink / raw)


On Tue, 15 Aug 2006, Aditya Mahajan wrote:

> Hi,
>  It seems that startalignment[middle] does not like long lines.
> Consider the following example (not strictly minimal, but I can not
> get such a marginal case with default setup).
>
> \setuppapersize[letter][letter]
>
> \setuplayout[
>                  width=middle,
>                 height=middle,
>               location=middle,
>               topspace=.75in,
>            bottomspace=0.75in,
>              backspace=0.75in,
>               cutspace=0.75in,
>             leftmargin=0in,
>            rightmargin=0in,
>     leftmargindistance=0in,
>    rightmargindistance=0in,
>                 header=0in,
>                 footer=0in,
>          headerdistace=0in,
>         footerdistance=0in,
>       ]
>
> \definetypeface[ieee] [rm]  [serif] [times]     [texansi]
> \definetypeface[ieee] [mm]  [maths] [modern]    [texansi]

Duh, I need to learn how to do font setup correctly and without typos. 
Even with the correction,

\definetypeface[ieee] [rm]  [serif] [times]     [default] [texnansi]
\definetypeface[ieee] [mm]  [maths] [modern]    [default] [texnansi]

the linebreaking is the same as before.

> \setupbodyfont[ieee,10pt]
>
> \definefont[TitleFont]   [Regular at 24pt]
>
> \setvariables[paper]
>   [ title={Optimal Performance of Feedback Control Systems with
>            Limited Communication over Noisy Channels}]
>
> \starttext
> {\TitleFont\setupinterlinespace
> \getvariable{paper}{title}
> \blank[1.0em]\endgraf}
>
> \startalignment[middle]
>     {\TitleFont\setupinterlinespace
>     \getvariable{paper}{title}
>     \blank[1.0em]\endgraf}
> \stopalignment
> \stoptext
>
> How can I get the same linebreaking as the first case, but with each
> line middle aligned?
>
> Aditya
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>
>
>

-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to make startalignment middle not change the linewidth
  2006-08-16  1:00 ` Aditya Mahajan
@ 2006-08-16  7:23   ` Taco Hoekwater
  2006-08-16 17:44     ` Aditya Mahajan
  0 siblings, 1 reply; 4+ messages in thread
From: Taco Hoekwater @ 2006-08-16  7:23 UTC (permalink / raw)


Aditya Mahajan wrote:
> On Tue, 15 Aug 2006, Aditya Mahajan wrote:
> 
> 
>>Hi,
>> It seems that startalignment[middle] does not like long lines.
>>Consider the following example (not strictly minimal, but I can not
>>get such a marginal case with default setup).


I get the same actual line breaks in both cases, but I wager the
problem is that the 'normal space width' is not equal to the
\spaceskip value that is used inside the alignment.

This in turn is caused by the 'natural' space of the times font
is 1/4 of an em, not 1/3. Try adding

   \def\raggedspaceamount{0.25em}

to your setup and see if that is more to your liking.

Cheers, taco

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to make startalignment middle not change the linewidth
  2006-08-16  7:23   ` Taco Hoekwater
@ 2006-08-16 17:44     ` Aditya Mahajan
  0 siblings, 0 replies; 4+ messages in thread
From: Aditya Mahajan @ 2006-08-16 17:44 UTC (permalink / raw)


On Wed, 16 Aug 2006, Taco Hoekwater wrote:

> Aditya Mahajan wrote:
>> On Tue, 15 Aug 2006, Aditya Mahajan wrote:
>>
>>
>>> Hi,
>>> It seems that startalignment[middle] does not like long lines.
>>> Consider the following example (not strictly minimal, but I can not
>>> get such a marginal case with default setup).
>
>
> I get the same actual line breaks in both cases, but I wager the
> problem is that the 'normal space width' is not equal to the
> \spaceskip value that is used inside the alignment.
>
> This in turn is caused by the 'natural' space of the times font
> is 1/4 of an em, not 1/3. Try adding
>
>   \def\raggedspaceamount{0.25em}
>
> to your setup and see if that is more to your liking.

Thanks. With this definition, I get the same line breaks.

Aditya

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-08-16 17:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-15 23:36 How to make startalignment middle not change the linewidth Aditya Mahajan
2006-08-16  1:00 ` Aditya Mahajan
2006-08-16  7:23   ` Taco Hoekwater
2006-08-16 17:44     ` Aditya Mahajan

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