From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/109544 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joseph Newsgroups: gmane.comp.tex.context Subject: =?utf-8?q?RE=C2=A0=3A__=5Cnoindentation_not_workin?= =?utf-8?q?g?= Date: Fri, 20 Nov 2020 21:07:55 +0100 Message-ID: <442487D4-BFAB-4329-9E1D-3884E8A2120D@hxcore.ol> References: <41e0efaf-c6c5-4ef2-2e96-cbf54f60c9bc@gmail.com>, <9e04fa3a-93af-c39a-ba57-ae9570c77bae@xs4all.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4711297160993474245==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33913"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users , Wolfgang Schuster Original-X-From: ntg-context-bounces@ntg.nl Fri Nov 20 21:08:25 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kgChk-0008jN-UL for gctc-ntg-context-518@m.gmane-mx.org; Fri, 20 Nov 2020 21:08:24 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id D0EAC1A9C8A; Fri, 20 Nov 2020 21:07:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q5MNeioMSDBs; Fri, 20 Nov 2020 21:07:58 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4A2021AA42B; Fri, 20 Nov 2020 21:07:58 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3238A1A9FAE for ; Fri, 20 Nov 2020 21:07:57 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4lBbOrVf6gas for ; Fri, 20 Nov 2020 21:07:56 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.42; helo=mail-wr1-f42.google.com; envelope-from=josephcanedo@gmail.com; receiver= Original-Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 6498E1A9C8A for ; Fri, 20 Nov 2020 21:07:56 +0100 (CET) Original-Received: by mail-wr1-f42.google.com with SMTP id b6so11337269wrt.4 for ; Fri, 20 Nov 2020 12:07:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:date:from:subject:thread-topic:in-reply-to:message-id :references:to:content-transfer-encoding; bh=pjR6j1lJb1r1nMUAjubNilnVGm3R4p1jGxdwfBfPzGU=; b=qMgaCRzH2empn5GssscCUdv9yvV8wbIOs+VCXk/F7BXr7BZD7JUR027xXPMP0EUnZJ hIgNSzcr3iftawXndbslmBZTbg2A+dDljU2IrFYfpsl0XrUFe+8mZrg8+PXkWf7QJTmz CzSMfsovjKnstyvKrVqLzmWZv3VijYC20AoYXZJwMUrcMMR6BoXpyQtsBPY/0OjPQhYu An09vBilvQL/Tn2Joj0ipM6weXJ7f7xuok97kZLkb5hkAAxON0GA5m2Tg+mKEF1aYN0B oqSJENf4R6KkVNF4wy5frIe3Dt8w+C5M1pHgthZCxVVKDaFquaZ5nPta8L6Tc93j3eC3 gfBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:from:subject:thread-topic :in-reply-to:message-id:references:to:content-transfer-encoding; bh=pjR6j1lJb1r1nMUAjubNilnVGm3R4p1jGxdwfBfPzGU=; b=ar6du9BK6WPx0D+f86wJDlPmnp/u8KgGGaRF4x8eovjZtoxA99h3SawEVcqg4fZ1uB hwqS923gaMnLD7kmIrC2iMcSr+XeVW/OspkyVItaLD7OxBkTLH6KBOUm+D1YLK0vqn27 0m2YBzw2wk0aqMyOvUFC9Ct4HPVOc01sUOm+8fleVAYzHzhjHRCHchiz7UEedCXLmKyi 6+n1GLq9QukkfdiU/sTi2wjuT8AiGSQtowLtw+hb72End+oN2+gJLx4XUtyvkuKgUWuR Fz1oh4H13lp17ELkqUdYXvDjXlpWtApb9AExHqbML0LGrsMj9C2ot28ov/pS9a04OXIx /Ugw== X-Gm-Message-State: AOAM530uk2kw7sijRL4yRdxD3lpnP24Qiw1HW3FkR7jcHIz4t4/PH5mY upGqSh1KRPpLH1uLNP/KKrlJrSVsmG0= X-Google-Smtp-Source: ABdhPJwcj6HYDVTHjCynHdnDw1S7b9wACtwStULZXHVesdHKLDFpb7r2uouqZ3O9JZSxrHgaObjcNg== X-Received: by 2002:a5d:4f12:: with SMTP id c18mr17839172wru.304.1605902875652; Fri, 20 Nov 2020 12:07:55 -0800 (PST) Original-Received: from smtp.gmail.com (2a01cb00068e03002c3fdf3b59d69ed7.ipv6.abo.wanadoo.fr. [2a01:cb00:68e:300:2c3f:df3b:59d6:9ed7]) by smtp.gmail.com with ESMTPSA id v6sm6538822wrb.53.2020.11.20.12.07.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Nov 2020 12:07:54 -0800 (PST) Thread-Topic: =?utf-8?Q?RE=C2=A0:_[NTG-context]_\noindentation_not_working?= In-Reply-To: <9e04fa3a-93af-c39a-ba57-ae9570c77bae@xs4all.nl> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:109544 Archived-At: --===============4711297160993474245== Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8"

Thanks. Does the fix apply for similar= issue I raised with below where all paragraphs are indented (expected is t= hat first par is not indented) ?

 <= /o:p>

\setupindenting[yes, next, 1em]

 

\starttext

\input knuth

\stoptext

 

De : Hans Hagen
Envoy=C3=A9 le :vendredi 20 novembre 2020 20:07
=C3=80 : mailing list for ConTeXt users; Wolfgang Schuster
Objet :<= /b>Re: [NTG-context] \noindentation not working

 

On 11/20/2020 6:27 PM, Wolfgan= g Schuster wrote:

> Pablo Rodriguez schrieb am 2= 0.11.2020 um 17:41:

>> Dear list,

>> 

>> I h= ave the following MWE:

>> 

>>    \showframe\showgrid

>>    \setupindenting[yes, always, big]

>>    \starttext

= >>    \noindentation

>>  = ;  a

>> 

>>    a

>>  &nb= sp; \stoptext

>> 

>> Using LMTX (2020.11.19 11:28), I get indentation with= \noindentation.

>> 

>> Could anyone confirm this?

>

> Yes, something is wrong.

>

> %%%% begin example

> \showgrid

>

> \starttext

>

> \parindent\emwidth

>

> a

>

> \eve= rypar{\setbox\scratchbox\lastbox}

> a

>

> \stoptext

> %%%% end example

 

=

Ah, okay. We have normalization enabled now. That mean= s two things:

 

- instead if a hbox being used for indentation (with >=3D 0 width) = we now

have a skip (with no stretch but that might= become an option some day);

the tex engine uses a= hbox because it is easier on the par builder (less

checking, as glue, being a valid breakpoint, involves quite a bit)

 

- after breakin= g a paragraph into lines the result is normalized, that

is: we have left/right hang, left/right skip. left/right parfilskip <= /p>

instead of a mix of either or not present left/righ= t skip, and shifted

boxes in case of some hang fea= tures (again, the original approach is

easier for = the engine, but machines are fast enough and have plenty of

memory so we can stop worrying about it)

=  

The ideas is that this way we can= make some lua nodelist hackery more

elegant (but = I need to catch up with that: most tex files are now split

in mkiv and lmtx and next comes the lua files after which we can s= tart

some more drastic upgrading ... keep in mind = that quite some code is

from more than a decase ag= o, evolved a bit but seldom changed conceptually).

=  

Here's a fix:

 

\unprotect

 

\def\spac_indentation_remo= ve

=C2=A0=C2=A0 {\ifzeropt\parindent \else

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \begingroup

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \unskip % we also need to check for = the subtype

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \setbox\= scratchbox\lastbox % we also need to check for the

= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \endgroup

=C2=A0=C2= =A0=C2=A0 \fi}

 

\protect

 

(we might need adapt some more code); actually more correct would be:=

 

\def\spa= c_indentation_remove

=C2=A0=C2=A0 {\ifzeropt\parind= ent \else

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \begingrou= p

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \ifnum\lastnodetyp= e=3D\gluenodecode

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 \unskip % we also need to check for the subtype

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \orelse\ifnum\lastnodetype=3D\hlistno= decode

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \= setbox\scratchbox\lastbox % we also need to check for the subtype

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \else

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 % forget about it

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \fi

=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 \endgroup

=C2=A0=C2=A0= =C2=A0 \fi}

 

(it actually makes sense to have a native \unindent primitive but we can=

simulate that in lua)

 

Hans

&n= bsp;

----------------------------------------= -------------------------

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 Hans Hagen | PRAGMA ADE

=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Ridderstraa= t 27 | 8061 GH Hasselt | The Netherlands

=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 tel: 038 477 53 69 | www.pragma-ade.nl | = www.pragma-pod.nl

---------------------------------= --------------------------------

__________________= _________________________________________________________________

If your question is of interest to others as well, please ad= d an entry to the Wiki!

 

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/li= stinfo/ntg-context

webpage=C2=A0 : http://www.pragm= a-ade.nl / http://context.aanhet.net

archive=C2=A0 = : https://bitbucket.org/phg/context-mirror/commits/

wiki=C2=A0=C2=A0=C2=A0=C2=A0 : http://contextgarden.net

_____________________________________________________________________= ______________

 

= --===============4711297160993474245== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============4711297160993474245==--