* \crlf breaks alignment inheritance
@ 2011-05-26 8:53 Marco Pessotto
2011-05-26 11:35 ` Wolfgang Schuster
0 siblings, 1 reply; 9+ messages in thread
From: Marco Pessotto @ 2011-05-26 8:53 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 633 bytes --]
Hello there!
I've found a problem with the latest ConTeXt, but I guess it's been
present for a while.
See the following example:
%%%% cut here %%%%
\starttext
\startalignment[middle,nothyphenated,nothanging,stretch]
centered
\startalignment[hyphenated]
this is centered.
No problem
\stopalignment
\startalignment[hyphenated]
Why this is not centered?\crlf Becaouse of the \textbackslash crlf
\stopalignment
\startalignment[hyphenated, middle]
this is centered. \crlf
No problem
\stopalignment
centered
\stopalignment
regular
\stoptext
%%%% cut here %%%%
Best wishes
--
Marco
[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 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] 9+ messages in thread
* Re: \crlf breaks alignment inheritance
2011-05-26 8:53 \crlf breaks alignment inheritance Marco Pessotto
@ 2011-05-26 11:35 ` Wolfgang Schuster
2011-05-26 13:25 ` Marco Pessotto
0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2011-05-26 11:35 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 26.05.2011 um 10:53 schrieb Marco Pessotto:
>
> Hello there!
>
> I've found a problem with the latest ConTeXt, but I guess it's been
> present for a while.
Use \par or an empty line.
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] 9+ messages in thread
* Re: \crlf breaks alignment inheritance
2011-05-26 11:35 ` Wolfgang Schuster
@ 2011-05-26 13:25 ` Marco Pessotto
2011-05-26 13:53 ` Wolfgang Schuster
0 siblings, 1 reply; 9+ messages in thread
From: Marco Pessotto @ 2011-05-26 13:25 UTC (permalink / raw)
To: ntg-context
Wolfgang Schuster <schuster.wolfgang@googlemail.com> writes:
> Am 26.05.2011 um 10:53 schrieb Marco Pessotto:
>
>>
>> Hello there!
>>
>> I've found a problem with the latest ConTeXt, but I guess it's been
>> present for a while.
>
> Use \par or an empty line.
>
> Wolfgang
The workaround was already present in the minimal example (setting again
the middle alignment). I was just reporting a problem.
Cheers
<#secure method=pgpmime mode=sign>
--
Marco
___________________________________________________________________________________
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] 9+ messages in thread
* Re: \crlf breaks alignment inheritance
2011-05-26 13:25 ` Marco Pessotto
@ 2011-05-26 13:53 ` Wolfgang Schuster
2011-05-26 14:02 ` Marco Pessotto
0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2011-05-26 13:53 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 26.05.2011 um 15:25 schrieb Marco Pessotto:
> Wolfgang Schuster <schuster.wolfgang@googlemail.com> writes:
>
>> Am 26.05.2011 um 10:53 schrieb Marco Pessotto:
>>
>>>
>>> Hello there!
>>>
>>> I've found a problem with the latest ConTeXt, but I guess it's been
>>> present for a while.
>>
>> Use \par or an empty line.
>>
>> Wolfgang
>
> The workaround was already present in the minimal example (setting again
> the middle alignment). I was just reporting a problem.
\par (or a empty line) isn’t a workaround, it’s the correct way to end
a paragraph and \crlf is the workaround which doesn’t work in all cases.
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] 9+ messages in thread
* Re: \crlf breaks alignment inheritance
2011-05-26 13:53 ` Wolfgang Schuster
@ 2011-05-26 14:02 ` Marco Pessotto
2011-05-26 14:11 ` Wolfgang Schuster
2011-05-26 14:49 ` Wolfgang Schuster
0 siblings, 2 replies; 9+ messages in thread
From: Marco Pessotto @ 2011-05-26 14:02 UTC (permalink / raw)
To: ntg-context
Wolfgang Schuster <schuster.wolfgang@googlemail.com> writes:
> Am 26.05.2011 um 15:25 schrieb Marco Pessotto:
>
>> Wolfgang Schuster <schuster.wolfgang@googlemail.com> writes:
>>
>>> Am 26.05.2011 um 10:53 schrieb Marco Pessotto:
>>>
>>>>
>>>> Hello there!
>>>>
>>>> I've found a problem with the latest ConTeXt, but I guess it's been
>>>> present for a while.
>>>
>>> Use \par or an empty line.
>>>
>>> Wolfgang
>>
>> The workaround was already present in the minimal example (setting again
>> the middle alignment). I was just reporting a problem.
>
> \par (or a empty line) isn’t a workaround, it’s the correct way to end
> a paragraph and \crlf is the workaround which doesn’t work in all cases.
So what's the correct way to force a line break without starting a new
paragraph, like \\ in LaTeX? Maybe the paragraph is marked also by more
spacing, and that particular linebreak is not meant to be a paragraph
ending. Like, e.g., for poems. And I believed the \crlf was the correct
way to do it. Please correct me if I'm wrong.
In the example I provided, I can't break the line without starting a new
paragraph and without messing it, unless I reset the "middle" in the nested
alignment. So I believe there's something in the inheritance that breaks.
Bests
--
Marco
___________________________________________________________________________________
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] 9+ messages in thread
* Re: \crlf breaks alignment inheritance
2011-05-26 14:02 ` Marco Pessotto
@ 2011-05-26 14:11 ` Wolfgang Schuster
2011-05-26 14:31 ` Marco Pessotto
2011-05-26 14:49 ` Wolfgang Schuster
1 sibling, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2011-05-26 14:11 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 26.05.2011 um 16:02 schrieb Marco Pessotto:
> So what's the correct way to force a line break without starting a new
> paragraph, like \\ in LaTeX? Maybe the paragraph is marked also by more
> spacing, and that particular linebreak is not meant to be a paragraph
> ending. Like, e.g., for poems. And I believed the \crlf was the correct
> way to do it. Please correct me if I'm wrong.
To suppress whitespace between paragraph you can use the packed environment.
For poems i suggest to use the lines environment where the end of each line
is also the end of a paragraph, you can also change the alignment of
the content with the align key of the environment, e.g.
\startlines[align=middle]
…
\stoplines
or change the settings global (i.e. \setuplines[align=middle]).
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] 9+ messages in thread
* Re: \crlf breaks alignment inheritance
2011-05-26 14:11 ` Wolfgang Schuster
@ 2011-05-26 14:31 ` Marco Pessotto
0 siblings, 0 replies; 9+ messages in thread
From: Marco Pessotto @ 2011-05-26 14:31 UTC (permalink / raw)
To: ntg-context
Wolfgang Schuster <schuster.wolfgang@googlemail.com> writes:
> Am 26.05.2011 um 16:02 schrieb Marco Pessotto:
>
>> So what's the correct way to force a line break without starting a new
>> paragraph, like \\ in LaTeX? Maybe the paragraph is marked also by more
>> spacing, and that particular linebreak is not meant to be a paragraph
>> ending. Like, e.g., for poems. And I believed the \crlf was the correct
>> way to do it. Please correct me if I'm wrong.
>
> To suppress whitespace between paragraph you can use the packed environment.
>
> For poems i suggest to use the lines environment where the end of each line
> is also the end of a paragraph, you can also change the alignment of
> the content with the align key of the environment, e.g.
>
> \startlines[align=middle]
> …
> \stoplines
>
> or change the settings global (i.e. \setuplines[align=middle]).
>
> Wolfgang
Ok, thanks for your answers.
--
Marco
___________________________________________________________________________________
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] 9+ messages in thread
* Re: \crlf breaks alignment inheritance
2011-05-26 14:02 ` Marco Pessotto
2011-05-26 14:11 ` Wolfgang Schuster
@ 2011-05-26 14:49 ` Wolfgang Schuster
2011-05-26 15:38 ` Marco Pessotto
1 sibling, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2011-05-26 14:49 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 26.05.2011 um 16:02 schrieb Marco Pessotto:
> In the example I provided, I can't break the line without starting a new
> paragraph and without messing it, unless I reset the "middle" in the nested
> alignment. So I believe there's something in the inheritance that breaks.
The “middle” is necessary because \crlf use a flag insert \hfill at
the end of the line where it was put when you have left aligned text.
This flag is reset with \setupalign and also \startalignment and
the command thinks you have left aligned text unless you add the “middle”
keyword and \crlf does now know that it shouldn’t insert \hfill.
With a new paragraph this doesn’t happen and you get always the correct output.
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] 9+ messages in thread
* Re: \crlf breaks alignment inheritance
2011-05-26 14:49 ` Wolfgang Schuster
@ 2011-05-26 15:38 ` Marco Pessotto
0 siblings, 0 replies; 9+ messages in thread
From: Marco Pessotto @ 2011-05-26 15:38 UTC (permalink / raw)
To: ntg-context
Wolfgang Schuster <schuster.wolfgang@googlemail.com> writes:
> Am 26.05.2011 um 16:02 schrieb Marco Pessotto:
>
>> In the example I provided, I can't break the line without starting a new
>> paragraph and without messing it, unless I reset the "middle" in the nested
>> alignment. So I believe there's something in the inheritance that breaks.
>
> The “middle” is necessary because \crlf use a flag insert \hfill at
> the end of the line where it was put when you have left aligned text.
>
> This flag is reset with \setupalign and also \startalignment and
> the command thinks you have left aligned text unless you add the “middle”
> keyword and \crlf does now know that it shouldn’t insert \hfill.
>
> With a new paragraph this doesn’t happen and you get always the correct output.
>
> Wolfgang
Thanks again :-)
--
Marco
___________________________________________________________________________________
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] 9+ messages in thread
end of thread, other threads:[~2011-05-26 15:38 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-26 8:53 \crlf breaks alignment inheritance Marco Pessotto
2011-05-26 11:35 ` Wolfgang Schuster
2011-05-26 13:25 ` Marco Pessotto
2011-05-26 13:53 ` Wolfgang Schuster
2011-05-26 14:02 ` Marco Pessotto
2011-05-26 14:11 ` Wolfgang Schuster
2011-05-26 14:31 ` Marco Pessotto
2011-05-26 14:49 ` Wolfgang Schuster
2011-05-26 15:38 ` Marco Pessotto
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).