ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* question concerning \setupalign \setuptolerance
@ 2013-08-30 12:23 Christian Prim
  2013-08-30 13:49 ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Christian Prim @ 2013-08-30 12:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1036 bytes --]

Dear list

is there a way to \setupalign and \setuptolerance globaly?

In tabulate- or frameenvironement for example they are reseted.

MWE:
\definefontfeature[default][default][expansion=quality,protrusion=quality]
\usetypescript[palatino]
\setupbodyfont[palatino,11pt]
\setupbodyfontenvironment[default][em=italic]
\setupalign[hz,hanging]
\setuptolerance[horizontal,stretch]

\starttext
\subject{Normal Text}
align working, tolerance working.

\input knuth

\subject{Table}
Table resets align/tolerance:
\starttabulate
\NC aling/tolerance not working \NC \input knuth \NC\NR
\NC align/tolerance working \NC \setupalign[hz,hanging]
\setuptolerance[horizontal,stretch] \input knuth \NC\NR
\stoptabulate

\subject{Frame}
Framedtext resets align/tolerance:
\startframedtext[width=0.6\textwidth]
aling/tolerance not working

\input tufte
\stopframedtext

\startframedtext[width=0.6\textwidth]
\setupalign[hz,hanging]
\setuptolerance[horizontal,stretch]
aling/tolerance working

\input tufte
\stopframedtext

\stoptext


Thanks!

Christian

[-- Attachment #1.2: Type: text/html, Size: 1621 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] 6+ messages in thread

* Re: question concerning \setupalign \setuptolerance
  2013-08-30 12:23 question concerning \setupalign \setuptolerance Christian Prim
@ 2013-08-30 13:49 ` Wolfgang Schuster
  2013-08-30 15:55   ` Christian Prim
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2013-08-30 13:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 30.08.2013 um 14:23 schrieb Christian Prim <christian.prim@gmx.ch>:

> Dear list
> 
> is there a way to \setupalign and \setuptolerance globaly?
> 
> In tabulate- or frameenvironement for example they are reseted.

Environments which have a align key use the settings of the key and ignore
global values, to enable protrusion and font expansion for these environment
you have to change their align values.

\setupframedtext
  [align={normal,hanging,hz}]

\setuptabulate
  [align={normal,hanging,hz}]

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: question concerning \setupalign \setuptolerance
  2013-08-30 13:49 ` Wolfgang Schuster
@ 2013-08-30 15:55   ` Christian Prim
  2013-08-30 16:36     ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Christian Prim @ 2013-08-30 15:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2496 bytes --]

Thanks Wolfgang

I have tested it (on new beta) but the alignment is still wrong in the
tabulate-environment. It's correct in the framedtext-environment, but
tolerance is still missing, so that a line is still too long.

My new questions:
- What about tolerance? Where must I add the keys?
- What about tabulate-environment?

Thanks!
Christian

My new MWE is:

\definefontfeature[default][default][expansion=quality,protrusion=quality]
\usetypescript[palatino]
\setupbodyfont[palatino,11pt]
\setupbodyfontenvironment[default][em=italic]
\setupalign[hz,hanging]
\setuptolerance[horizontal,stretch]

\setupframedtext[align={normal,hanging,hz}] %NEW
\setuptabulate[align={normal,hanging,hz}] %NEW
\showframe %NEW, for better seeing

\starttext
\subject{Normal Text}
align working, tolerance working.

\input knuth

\subject{Table}
Table resets align/tolerance:
\starttabulate
\NC align/tolerance not working \NC \input knuth \NC\NR
\NC align/tolerance working \NC \setupalign[hz,hanging]
\setuptolerance[horizontal,stretch] \input knuth \NC\NR
\stoptabulate

\subject{Frame}
Framedtext resets align/tolerance:
\startframedtext[width=0.6\textwidth]
align working, tolerance not working

\input tufte
\stopframedtext

\startframedtext[width=0.6\textwidth]
\setupalign[hz,hanging]
\setuptolerance[horizontal,stretch]
align/tolerance working

\input tufte
\stopframedtext

\stoptext


2013/8/30 Wolfgang Schuster <schuster.wolfgang@gmail.com>

>
> Am 30.08.2013 um 14:23 schrieb Christian Prim <christian.prim@gmx.ch>:
>
> > Dear list
> >
> > is there a way to \setupalign and \setuptolerance globaly?
> >
> > In tabulate- or frameenvironement for example they are reseted.
>
> Environments which have a align key use the settings of the key and ignore
> global values, to enable protrusion and font expansion for these
> environment
> you have to change their align values.
>
> \setupframedtext
>   [align={normal,hanging,hz}]
>
> \setuptabulate
>   [align={normal,hanging,hz}]
>
> 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 3951 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] 6+ messages in thread

* Re: question concerning \setupalign \setuptolerance
  2013-08-30 15:55   ` Christian Prim
@ 2013-08-30 16:36     ` Wolfgang Schuster
  2013-08-30 17:00       ` Christian Prim
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2013-08-30 16:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 30.08.2013 um 17:55 schrieb Christian Prim <christian.prim@gmx.ch>:

> Thanks Wolfgang
> 
> I have tested it (on new beta) but the alignment is still wrong in the tabulate-environment. It's correct in the framedtext-environment, but tolerance is still missing, so that a line is still too long.
> 
> My new questions:
> - What about tolerance? Where must I add the keys?

The \setupalign command does also accepts “tolerant”, “verytolerant” and “stretch” as keyword which means you don’t need the \setuptolerance command. This is important because the value of the align key is passed to the \setupalign command.

> - What about tabulate-environment?

I’m sorry but I was wrong about the setting for the tabulate environment, the align value of \setuptabulate accepts only “left”, “middle”, “right” and “normal” as arguments. There is also no way to change the format of the default tabulation environment, only local changes are possible, e.g.

\starttabulate[|l|pA{normal,hanging,hz,stretch}|]
\NC align/tolerance not working \NC \input knuth \NC\NR
\NC align/tolerance working     \NC \input knuth \NC\NR
\stoptabulate

When you want a different default alignment you have to create your own tabulation environment with the \definetabulate command.

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: question concerning \setupalign \setuptolerance
  2013-08-30 16:36     ` Wolfgang Schuster
@ 2013-08-30 17:00       ` Christian Prim
  2013-08-30 17:39         ` Christian Prim
  0 siblings, 1 reply; 6+ messages in thread
From: Christian Prim @ 2013-08-30 17:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2012 bytes --]

Thanks Wolfgang! Now everything is clear and fine.

Christian


2013/8/30 Wolfgang Schuster <schuster.wolfgang@gmail.com>

>
> Am 30.08.2013 um 17:55 schrieb Christian Prim <christian.prim@gmx.ch>:
>
> > Thanks Wolfgang
> >
> > I have tested it (on new beta) but the alignment is still wrong in the
> tabulate-environment. It's correct in the framedtext-environment, but
> tolerance is still missing, so that a line is still too long.
> >
> > My new questions:
> > - What about tolerance? Where must I add the keys?
>
> The \setupalign command does also accepts “tolerant”, “verytolerant” and
> “stretch” as keyword which means you don’t need the \setuptolerance
> command. This is important because the value of the align key is passed to
> the \setupalign command.
>
> > - What about tabulate-environment?
>
> I’m sorry but I was wrong about the setting for the tabulate environment,
> the align value of \setuptabulate accepts only “left”, “middle”, “right”
> and “normal” as arguments. There is also no way to change the format of the
> default tabulation environment, only local changes are possible, e.g.
>
> \starttabulate[|l|pA{normal,hanging,hz,stretch}|]
> \NC align/tolerance not working \NC \input knuth \NC\NR
> \NC align/tolerance working     \NC \input knuth \NC\NR
> \stoptabulate
>
> When you want a different default alignment you have to create your own
> tabulation environment with the \definetabulate command.
>
> 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 2896 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] 6+ messages in thread

* Re: question concerning \setupalign \setuptolerance
  2013-08-30 17:00       ` Christian Prim
@ 2013-08-30 17:39         ` Christian Prim
  0 siblings, 0 replies; 6+ messages in thread
From: Christian Prim @ 2013-08-30 17:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2854 bytes --]

Sorry

I still have a problem with \startfiguretext .... \stopfiguretext.

There ist no \setupfiguretext nor \setupfloattext to enter the align=....
keypairs. Where must I enter "align={normal,hanging,hz,stretch}" to make
the text around these figures aligned like the rest of the document?

Thanks
Christian

PS.: My minimal (not) working example:

\definefontfeature[default][default][expansion=quality,protrusion=quality]

%\setup?figure?text[align={normal,hanging,hz,stretch}]
\setupalign[hz,hanging,stretch]
\showframe

\starttext
Correct Text

\input knuth
\startfiguretext[right,none]{}{\externalfigure[cow][width=0.5\textwidth]}
Wrong alignment!

\input knuth
\stopfiguretext
\stoptext


2013/8/30 Christian Prim <christian.prim@gmx.ch>

> Thanks Wolfgang! Now everything is clear and fine.
>
> Christian
>
>
> 2013/8/30 Wolfgang Schuster <schuster.wolfgang@gmail.com>
>
>>
>> Am 30.08.2013 um 17:55 schrieb Christian Prim <christian.prim@gmx.ch>:
>>
>> > Thanks Wolfgang
>> >
>> > I have tested it (on new beta) but the alignment is still wrong in the
>> tabulate-environment. It's correct in the framedtext-environment, but
>> tolerance is still missing, so that a line is still too long.
>> >
>> > My new questions:
>> > - What about tolerance? Where must I add the keys?
>>
>> The \setupalign command does also accepts “tolerant”, “verytolerant” and
>> “stretch” as keyword which means you don’t need the \setuptolerance
>> command. This is important because the value of the align key is passed to
>> the \setupalign command.
>>
>> > - What about tabulate-environment?
>>
>> I’m sorry but I was wrong about the setting for the tabulate environment,
>> the align value of \setuptabulate accepts only “left”, “middle”, “right”
>> and “normal” as arguments. There is also no way to change the format of the
>> default tabulation environment, only local changes are possible, e.g.
>>
>> \starttabulate[|l|pA{normal,hanging,hz,stretch}|]
>> \NC align/tolerance not working \NC \input knuth \NC\NR
>> \NC align/tolerance working     \NC \input knuth \NC\NR
>> \stoptabulate
>>
>> When you want a different default alignment you have to create your own
>> tabulation environment with the \definetabulate command.
>>
>> 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
>>
>> ___________________________________________________________________________________
>>
>
>

[-- Attachment #1.2: Type: text/html, Size: 5499 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] 6+ messages in thread

end of thread, other threads:[~2013-08-30 17:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-30 12:23 question concerning \setupalign \setuptolerance Christian Prim
2013-08-30 13:49 ` Wolfgang Schuster
2013-08-30 15:55   ` Christian Prim
2013-08-30 16:36     ` Wolfgang Schuster
2013-08-30 17:00       ` Christian Prim
2013-08-30 17:39         ` Christian Prim

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