* context() does not ignore space in empty line
@ 2021-04-19 7:22 Sylvain Hubert
2021-04-19 8:19 ` Hans Hagen
0 siblings, 1 reply; 2+ messages in thread
From: Sylvain Hubert @ 2021-04-19 7:22 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 687 bytes --]
Dear list,
does anyone have an idea why, in the example below, context() starts a new
paragraph at "\n\n" but not at "\n \n" with a space in between? Is there
any way to fix it?
\starttext
Without using context(), inside the next parentheses is a new line: (
) note that a space sits between the two line breaks.
\startluacode
context('Using context(), inside the next parentheses is also a new line:
(\n\n) because there is *no* space between the two line breaks.\n\n')
context('Using context(), inside the next parentheses is however *no* new
line: (\n \n) because of the space between the two line breaks.\n\n')
\stopluacode
\stoptext
Any help is appreciated.
Best,
Sylvain
[-- Attachment #1.2: Type: text/html, Size: 2500 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: context() does not ignore space in empty line
2021-04-19 7:22 context() does not ignore space in empty line Sylvain Hubert
@ 2021-04-19 8:19 ` Hans Hagen
0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2021-04-19 8:19 UTC (permalink / raw)
To: mailing list for ConTeXt users, Sylvain Hubert
On 4/19/2021 9:22 AM, Sylvain Hubert wrote:
> Dear list,
>
> does anyone have an idea why, in the example below, context() starts a
> new paragraph at "\n\n" but not at "\n \n" with a space in between? Is
> there any way to fix it?
>
> \starttext
> Without using context(), inside the next parentheses is a new line: (
> ) note that a space sits between the two line breaks.
>
> \startluacode
> context('Using context(), inside the next parentheses is also a new
> line: (\n\n) because there is *no* space between the two line breaks.\n\n')
> context('Using context(), inside the next parentheses is however *no*
> new line: (\n \n) because of the space between the two line breaks.\n\n')
> \stopluacode
> \stoptext
>
> Any help is appreciated.
kind of tricky and dangerous to chanmge after many years
in cldf-ini.lua, change line 579 into
local emptyline = space^0 * newline^2 + newline * space^1
and run context --make
then test
\starttext
\startbuffer
\startluacode
context('line 1.1 (\n) line 1.2\n\n') context.blank()
context('line 2.1 (\n ) line 2.2\n\n') context.blank()
context('line 3.1 ( \n) line 3.2\n\n') context.blank()
context('line 4.1 ( \n ) line 4.2\n\n') context.blank()
context('line 5.1 (\n\n) line 5.2\n\n') context.blank()
context('line 6.1 (\n\n ) line 6.2\n\n') context.blank()
context('line 7.1 ( \n\n) line 7.2\n\n') context.blank()
context('line 8.1 ( \n\n ) line 8.2\n\n') context.blank()
context('line 9.1 (\n \n) line 9.2\n\n') context.blank()
context('line 0.1 (\n \n \n) line 0.2\n\n') context.blank()
\stopluacode
\stopbuffer
\typebuffer
\getbuffer
\stoptext
now, the question is, does this cover all cases and is this what we
expect ...
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-19 8:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-19 7:22 context() does not ignore space in empty line Sylvain Hubert
2021-04-19 8:19 ` Hans Hagen
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).