* \noindentation not working
@ 2020-11-20 16:41 Pablo Rodriguez
2020-11-20 16:47 ` Otared Kavian
2020-11-20 17:27 ` Wolfgang Schuster
0 siblings, 2 replies; 7+ messages in thread
From: Pablo Rodriguez @ 2020-11-20 16:41 UTC (permalink / raw)
To: mailing list for ConTeXt users
Dear list,
I have the following MWE:
\showframe\showgrid
\setupindenting[yes, always, big]
\starttext
\noindentation
a
a
\stoptext
Using LMTX (2020.11.19 11:28), I get indentation with \noindentation.
Could anyone confirm this?
Many thanks for your help,
Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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] 7+ messages in thread
* Re: \noindentation not working
2020-11-20 16:41 \noindentation not working Pablo Rodriguez
@ 2020-11-20 16:47 ` Otared Kavian
2020-11-20 17:27 ` Wolfgang Schuster
1 sibling, 0 replies; 7+ messages in thread
From: Otared Kavian @ 2020-11-20 16:47 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi Pablo,
I can confirm that with LMTX version 2020.11.19 11:28, the behaviour is as the one you report (the behaviour is correct with mkiv version 2020.06.25 10:55).
Best regards: Otared
> On 20 Nov 2020, at 17:41, Pablo Rodriguez <oinos@gmx.es> wrote:
>
> Dear list,
>
> I have the following MWE:
>
> \showframe\showgrid
> \setupindenting[yes, always, big]
> \starttext
> \noindentation
> a
>
> a
> \stoptext
>
> Using LMTX (2020.11.19 11:28), I get indentation with \noindentation.
>
> Could anyone confirm this?
>
> Many thanks for your help,
>
> Pablo
> --
> http://www.ousia.tk
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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] 7+ messages in thread
* Re: \noindentation not working
2020-11-20 16:41 \noindentation not working Pablo Rodriguez
2020-11-20 16:47 ` Otared Kavian
@ 2020-11-20 17:27 ` Wolfgang Schuster
2020-11-20 19:07 ` Hans Hagen
1 sibling, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2020-11-20 17:27 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Pablo Rodriguez
Pablo Rodriguez schrieb am 20.11.2020 um 17:41:
> Dear list,
>
> I have the following MWE:
>
> \showframe\showgrid
> \setupindenting[yes, always, big]
> \starttext
> \noindentation
> a
>
> a
> \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
\everypar{\setbox\scratchbox\lastbox}
a
\stoptext
%%%% end example
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \noindentation not working
2020-11-20 17:27 ` Wolfgang Schuster
@ 2020-11-20 19:07 ` Hans Hagen
2020-11-20 19:49 ` Pablo Rodriguez
2020-11-20 20:07 ` RE : " Joseph
0 siblings, 2 replies; 7+ messages in thread
From: Hans Hagen @ 2020-11-20 19:07 UTC (permalink / raw)
To: mailing list for ConTeXt users, Wolfgang Schuster
On 11/20/2020 6:27 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 20.11.2020 um 17:41:
>> Dear list,
>>
>> I have the following MWE:
>>
>> \showframe\showgrid
>> \setupindenting[yes, always, big]
>> \starttext
>> \noindentation
>> a
>>
>> a
>> \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
>
> \everypar{\setbox\scratchbox\lastbox}
> a
>
> \stoptext
> %%%% end example
Ah, okay. We have normalization enabled now. That means two things:
- instead if a hbox being used for indentation (with >= 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 breaking a paragraph into lines the result is normalized, that
is: we have left/right hang, left/right skip. left/right parfilskip
instead of a mix of either or not present left/right skip, and shifted
boxes in case of some hang features (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 start
some more drastic upgrading ... keep in mind that quite some code is
from more than a decase ago, evolved a bit but seldom changed conceptually).
Here's a fix:
\unprotect
\def\spac_indentation_remove
{\ifzeropt\parindent \else
\begingroup
\unskip % we also need to check for the subtype
\setbox\scratchbox\lastbox % we also need to check for the
\endgroup
\fi}
\protect
(we might need adapt some more code); actually more correct would be:
\def\spac_indentation_remove
{\ifzeropt\parindent \else
\begingroup
\ifnum\lastnodetype=\gluenodecode
\unskip % we also need to check for the subtype
\orelse\ifnum\lastnodetype=\hlistnodecode
\setbox\scratchbox\lastbox % we also need to check for the subtype
\else
% forget about it
\fi
\endgroup
\fi}
(it actually makes sense to have a native \unindent primitive but we can
simulate that in lua)
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] 7+ messages in thread
* Re: \noindentation not working
2020-11-20 19:07 ` Hans Hagen
@ 2020-11-20 19:49 ` Pablo Rodriguez
2020-11-20 20:07 ` RE : " Joseph
1 sibling, 0 replies; 7+ messages in thread
From: Pablo Rodriguez @ 2020-11-20 19:49 UTC (permalink / raw)
To: ntg-context
On 11/20/20 8:07 PM, Hans Hagen wrote:
> [...]
> Here's a fix:
> [...]
> (we might need adapt some more code); actually more correct would be:
>
> \def\spac_indentation_remove
> {\ifzeropt\parindent \else
> \begingroup
> \ifnum\lastnodetype=\gluenodecode
> \unskip % we also need to check for the subtype
> \orelse\ifnum\lastnodetype=\hlistnodecode
> \setbox\scratchbox\lastbox % we also need to check for the subtype
> \else
> % forget about it
> \fi
> \endgroup
> \fi}
Many thanks for the fix, Hans.
I placed it in cont-new.mkiv (I thought there was a cont-new.mkxl, but I
couldn’t find it.
Many thanks for your help,
Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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] 7+ messages in thread
* RE : \noindentation not working
2020-11-20 19:07 ` Hans Hagen
2020-11-20 19:49 ` Pablo Rodriguez
@ 2020-11-20 20:07 ` Joseph
2020-11-20 21:05 ` Pablo Rodriguez
1 sibling, 1 reply; 7+ messages in thread
From: Joseph @ 2020-11-20 20:07 UTC (permalink / raw)
To: mailing list for ConTeXt users, Wolfgang Schuster
[-- Attachment #1: Type: text/html, Size: 8396 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] 7+ messages in thread
* Re: RE : \noindentation not working
2020-11-20 20:07 ` RE : " Joseph
@ 2020-11-20 21:05 ` Pablo Rodriguez
0 siblings, 0 replies; 7+ messages in thread
From: Pablo Rodriguez @ 2020-11-20 21:05 UTC (permalink / raw)
To: ntg-context
On 11/20/20 9:07 PM, Joseph wrote:
> Thanks. Does the fix apply for similar issue I raised with below where
> all paragraphs are indented (expected is that first par is not indented) ?
>
> \setupindenting[yes, next, 1em]
> \starttext
> \input knuth
> \stoptext
Yes, the fix solves your issue.
Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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] 7+ messages in thread
end of thread, other threads:[~2020-11-20 21:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-20 16:41 \noindentation not working Pablo Rodriguez
2020-11-20 16:47 ` Otared Kavian
2020-11-20 17:27 ` Wolfgang Schuster
2020-11-20 19:07 ` Hans Hagen
2020-11-20 19:49 ` Pablo Rodriguez
2020-11-20 20:07 ` RE : " Joseph
2020-11-20 21:05 ` Pablo Rodriguez
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).