Hello, I'm going to bring the discussion back to a sore point that really needs to be cleared. When dealing with displayed material (equations, itemizations, quotations etc) the following four cases are (or rather should be) different: ============================== Case 1: some text before \startdisplay displayed material \stopdisplay some text after ============================== Case 2: some text before \startdisplay displayed material \stopdisplay some text after ============================== Case 3: some text before \startdisplay displayed material \stopdisplay some text after ============================== Case 4: some text before \startdisplay displayed material \stopdisplay some text after ============================== The reason why they should be different is that (1) in case 1 the display is part of the paragraph which includes both the text before, the displayed material, and the text after (2) in case 2 the display is part of a the paragraph which begins with the displayed material and includes the text after, but not the text before (3) in case 3 the display is part of a the paragraph which begins with the displayed material and includes the text before, but not the text after (4) in case 4 the display forms a paragraph on its own Why is this important? Assume for example that the paragraphs are set to have an indent (\setupindenting[medium], for example) and that the indentnext option is set to true. In this case "some text after" would only be indented in cases (3) and (4), but not in cases (1) and (2), since in cases (3) and (4) it starts a new paragraph while in cases (1) and (2) it is part of the previous paragraph. Is it just an impression of mine, or is it true that this is not the case in ConTeXt? The behaviour in all three cases seems to be the same ... -- Giuseppe "Oblomov" Bilotta
At 10:06 AM 12/1/2002 +0100, you wrote:
Hello,
I'm going to bring the discussion back to a sore point that really
hm, didn't know you were such a sore guy; don't get too depressed what you want is kind of tricky in the sense that i hate macros that have to adapt themselves to such fuzzy situations (actuall yit's one of the reasons why so many tex docs (books, manuals, whatever) around have lousy vertical spacing; anyhow, because i can't stand you crying: \def\displaybreak {\ifhmode \removeunwantedspaces \ifcase\raggedstatus\hfill\fi \strut\penalty-9999 % \break fails on case (3) \fi} \def\startdisplay{\displaybreak\ignorespaces\startopelkaar} \def\stopdisplay {\stopopelkaar\displaybreak\ignorespaces} %\setupwhitespace[big] %%%%%% the tricky part \setuplayout[topspace=1cm] \setuplayout[middle] \showstruts \starttext \startbuffer (1) some text before \startdisplay displayed material \stopdisplay some text after (2) some text before \startdisplay displayed material \stopdisplay some text after (3) some text before \startdisplay displayed material \stopdisplay some text after (4) some text before \startdisplay displayed material \stopdisplay some text after \stopbuffer \typebuffer \getbuffer \page \startbuffer (1) some text before \startdisplay \blanko displayed material \blanko\stopdisplay some text after (2) some text before \startdisplay \blanko displayed material \blanko\stopdisplay some text after (3) some text before \startdisplay \blanko displayed material \blanko\stopdisplay some text after (4) some text before \startdisplay \blanko displayed material \blanko \stopdisplay some text after \stopbuffer \typebuffer \getbuffer \page \stoptext The best solution of course is to define the proper instances of enviroments (math already has 'm) Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Monday, December 2, 2002 Hans Hagen wrote: HH> At 10:06 AM 12/1/2002 +0100, you wrote:
Hello,
I'm going to bring the discussion back to a sore point that really
HH> hm, didn't know you were such a sore guy; don't get too depressed LOL. I'm not depressed :) HH> what you want is kind of tricky in the sense that i hate macros that have HH> to adapt themselves to such fuzzy situations (actuall yit's one of the HH> reasons why so many tex docs (books, manuals, whatever) around have lousy HH> vertical spacing; Uhm. I can't think of any example like that, really. The point is that in ConTeXt as it is now a display (formula, itemization, quotation, etc) is always forces a paragraph before and after, which is not consistent with what the writer might want; think for example of something like: -------------- An introduction to the following: * itemization * one more item and a conclusion, all in the same paragraph -------------- versus -------------- An introduction to the following: * itemization * one more item Let's now talk about something else -------------- HH> anyhow, because i can't stand you crying:
\def\displaybreak {\ifhmode \removeunwantedspaces \ifcase\raggedstatus\hfill\fi \strut\penalty-9999 % \break fails on case (3) \fi}
\def\startdisplay{\displaybreak\ignorespaces\startopelkaar} \def\stopdisplay {\stopopelkaar\displaybreak\ignorespaces}
Doesn't work. Try setting \setupindenting[medium] in your example; you'll notice that each line starts a new paragraph, and this is not what is wanted. (1) the display should end the previous paragraph if and only if \start... is preceded by an empty line (2) the material following the \stop... should start a new paragraph if and only if there is an empty line between the \stop and the material HH> The best solution of course is to define the proper instances of HH> enviroments (math already has 'm) All (displayed) blocks should have this feature. If you don't want to break backwards compatibility, you could setup a couple of options for \startstop pairs. As I proposed in another mail, it should be tunable at a global level and on a per-\startstop level: I propose a global switch like \setupstartstops[break=always] % current ConTeXt behaviour \setupstartstops[break=par] % only start new paragraphs % when there are empty lines and local switches like: \setupquotations[newpar=always] % current behaviour where newpar can be always, (current behaviour, regardless of global setting), default (follow general \startstop behaviour set up by \setupstartstops) or par (start according to empty lines regardless of global setting). Does it sound sensible? -- Giuseppe "Oblomov" Bilotta
At 06:03 PM 12/2/2002 +0100, you wrote:
Uhm. I can't think of any example like that, really. The point is that in ConTeXt as it is now a display (formula, itemization, quotation, etc) is always forces a paragraph before and after, which is not consistent with what the writer might want; think for example of something like:
hm, but it's not the writer who's in charge here, but the designer; so, in terms of intentional coding, one should code in such a way that whatever strange thing happens along the road (accidental empty line or not) the output is consistent. So, an in-par something should be coded as such so that the environment can handle it, as good as possible.
-------------- An introduction to the following: * itemization * one more item and a conclusion, all in the same paragraph
there are options for that -)
Doesn't work. Try setting \setupindenting[medium] in your example; you'll notice that each line starts a new paragraph, and this is not what is wanted.
ah, so we should look ahead, doable but never 100% robust; with regards to looking back, definitely less robust
(1) the display should end the previous paragraph if and only if \start... is preceded by an empty line
(2) the material following the \stop... should start a new paragraph if and only if there is an empty line between the \stop and the material
or a text\par text, or text\whow[expanding into \par]text
HH> The best solution of course is to define the proper instances of HH> enviroments (math already has 'm)
All (displayed) blocks should have this feature. If you don't want to break backwards compatibility, you could setup a couple of
you can bet on that
options for \startstop pairs. As I proposed in another mail, it should be tunable at a global level and on a per-\startstop level:
such a feature should be tested for *each* environment with all kind of combinations, since spacing can really become nasty
I propose a global switch like
\setupstartstops[break=always] % current ConTeXt behaviour \setupstartstops[break=par] % only start new paragraphs % when there are empty lines
hm, not sure it it hooks/should hook into start/stop
and local switches like:
\setupquotations[newpar=always] % current behaviour
where newpar can be always, (current behaviour, regardless of global setting), default (follow general \startstop behaviour set up by \setupstartstops) or par (start according to empty lines regardless of global setting). Does it sound sensible?
depends, this is not something that will be there in-a-minute, and i definitely don't want to break compatibility for a convenience over coding feature -) The first thing is a proper \start/stopdisplay pair, so let's start with that; one can then hook that into start/stop an dlater we can see if some kind of auto-display is possible [display=none|before|after|both] or so Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Monday, December 2, 2002 Hans Hagen wrote: HH> At 06:03 PM 12/2/2002 +0100, you wrote:
Uhm. I can't think of any example like that, really. The point is that in ConTeXt as it is now a display (formula, itemization, quotation, etc) is always forces a paragraph before and after, which is not consistent with what the writer might want; think for example of something like:
HH> hm, but it's not the writer who's in charge here, but the designer; so, in HH> terms of intentional coding, one should code in such a way that whatever HH> strange thing happens along the road (accidental empty line or not) the HH> output is consistent. So, an in-par something should be coded as such so HH> that the environment can handle it, as good as possible. This is where we differ. After all, the empty line is the *standard* TeX (and ConTeXt) way to denote new paragraph. While should it be different for displayed items? It's inconsistent.
-------------- An introduction to the following: * itemization * one more item and a conclusion, all in the same paragraph
HH> there are options for that -) But I have to specify it manually. If I later decide to rewrite the stuff so that it's really in separate paragraphs I have to change the displayed environment, while what should suffice is letting ConTeXt understand that a new paragraph is started --the *standard* way (empty line).
Doesn't work. Try setting \setupindenting[medium] in your example; you'll notice that each line starts a new paragraph, and this is not what is wanted.
HH> ah, so we should look ahead, doable but never 100% robust; with regards to HH> looking back, definitely less robust I don't think there should be any need to look back or ahead. Just don't force a new paragraph before and after each displayed item. Let the user choose, the standard way(s).
I propose a global switch like
\setupstartstops[break=always] % current ConTeXt behaviour \setupstartstops[break=par] % only start new paragraphs % when there are empty lines
HH> hm, not sure it it hooks/should hook into start/stop Where should it hook? All displayed items are start/stop pairs. If you want to overrule this for a specific start/stop pair, you can always to it with the local switch:
and local switches like:
\setupquotations[newpar=always] % current behaviour
where newpar can be always, (current behaviour, regardless of global setting), default (follow general \startstop behaviour set up by \setupstartstops) or par (start according to empty lines regardless of global setting). Does it sound sensible?
HH> depends, this is not something that will be there in-a-minute, and i HH> definitely don't want to break compatibility for a convenience over coding HH> feature -) HH> The first thing is a proper \start/stopdisplay pair, so let's start with HH> that; one can then hook that into start/stop an dlater we can see if some HH> kind of auto-display is possible [display=none|before|after|both] or so "Display" is just a generic term I'm using for all the stuff which is part of a paragraph but gets "highlited" by typesetting it in a different format, sort of like a subparagraph. This category includes itemizations (all itemgroups, actually), formulas (not inline, of course), quotations, etc. -- Giuseppe "Oblomov" Bilotta
On Monday, December 2, 2002, at 07:37 PM, Giuseppe Bilotta wrote:
HH> hm, but it's not the writer who's in charge here, but the designer; so, in HH> terms of intentional coding, one should code in such a way that whatever HH> strange thing happens along the road (accidental empty line or not) the HH> output is consistent. So, an in-par something should be coded as such so HH> that the environment can handle it, as good as possible.
This is where we differ. After all, the empty line is the *standard* TeX (and ConTeXt) way to denote new paragraph. While should it be different for displayed items? It's inconsistent.
For what it's worth, I agree with Giuseppe here. It's the same issue I had with block quotes: that even if there's no blank line, ConTeXt assumes new paragraph. -- Dr. Bruce D'Arcus Miami University Geography Department 216 Shideler Hall Oxford, OH 45056
Tuesday, December 3, 2002 Bruce D'Arcus wrote:
This is where we differ. After all, the empty line is the *standard* TeX (and ConTeXt) way to denote new paragraph. While should it be different for displayed items? It's inconsistent.
BDA> For what it's worth, I agree with Giuseppe here. It's the same issue BDA> I had with block quotes: that even if there's no blank line, ConTeXt BDA> assumes new paragraph. The blockquote example is a very good example, IMO: an "indipendent" (new paragraphed) block quote/quotation/whatever is not "conceptually" different from a "displayed" (that doesn't start a new paragraph) block quote/quotation/whatever. So there should be no need to mark it up differently (as is required by the ConTeXt assumption on paragrah breaking). -- Giuseppe "Oblomov" Bilotta
At 10:25 AM 12/3/2002 +0100, you wrote:
Tuesday, December 3, 2002 Bruce D'Arcus wrote:
This is where we differ. After all, the empty line is the *standard* TeX (and ConTeXt) way to denote new paragraph. While should it be different for displayed items? It's inconsistent.
BDA> For what it's worth, I agree with Giuseppe here. It's the same issue BDA> I had with block quotes: that even if there's no blank line, ConTeXt BDA> assumes new paragraph.
The blockquote example is a very good example, IMO: an "indipendent" (new paragraphed) block quote/quotation/whatever is not "conceptually" different from a "displayed" (that doesn't start a new paragraph) block quote/quotation/whatever. So there should be no need to mark it up differently (as is required by the ConTeXt assumption on paragrah breaking).
wait till you enter the area of typesetting a bit more complex docs (in terms of typo); then you really want to be able to make the difference; in that case, the way an author want it typeset is not the same as the designers view; it's not a far way from letting the author determine if something should be bold/slanted/whatever instead of coding in terms of emphasized/important/interesting, or, what we occasionally see, bolder and bigger subsubsection heads than sectionheads -) now, say that there will be: (1) quotation (2) blockquotation with (1) forcing a new par (2) behaving the way you want and both can be set up as usual to act differently, that would solve the problem, wouldn't it, since you could either setup up quotation differently or use blockquotation. (i'm not going to change the quotation defaults, simply because it would break compatibility) Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Tuesday, December 3, 2002 Hans Hagen wrote: HH> now, say that there will be: HH> (1) quotation HH> (2) blockquotation HH> with HH> (1) forcing a new par HH> (2) behaving the way you want HH> and both can be set up as usual to act differently, that would solve the HH> problem, wouldn't it, since you could either setup up quotation differently HH> or use blockquotation. (i'm not going to change the quotation defaults, HH> simply because it would break compatibility) That's fine for me. But wow would this differ from having the possibility to set quotation (and other displayed environments) to not force new paragraphs? After all, a blockquotation can easily be tuned to force new paragraphs (just but before=\par and after=\par), but the converse is not true. -- Giuseppe "Oblomov" Bilotta
At 12:12 PM 12/3/2002 +0100, you wrote:
Tuesday, December 3, 2002 Hans Hagen wrote:
HH> now, say that there will be:
HH> (1) quotation HH> (2) blockquotation
HH> with
HH> (1) forcing a new par HH> (2) behaving the way you want
HH> and both can be set up as usual to act differently, that would solve the HH> problem, wouldn't it, since you could either setup up quotation differently HH> or use blockquotation. (i'm not going to change the quotation defaults, HH> simply because it would break compatibility)
That's fine for me. But wow would this differ from having the possibility to set quotation (and other displayed environments) to not force new paragraphs? After all, a blockquotation can easily be tuned to force new paragraphs (just but before=\par and after=\par), but the converse is not true.
well, if before=\blank, that will not change; actually, quotations are hooked into narrower, which start/ends new pars; a more generic switch can be built in, but takes time, so in due time you can have that switch (with of course the danger that nothing generates a par anymore, or worse, that anybody disagrees with any defaults), but not in a quick and dirty hack; i will first make a proper startdisplay/stopdisplay, and after that it may go in some env's Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Tuesday, December 3, 2002 Hans Hagen wrote: HH> well, if before=\blank, that will not change; of course HH> actually, quotations are hooked into narrower, which HH> start/ends new pars; Narrower, too, shouldn't start new pars IMO. It counts as displayed material. HH> a more generic switch can be built in, but takes time, so in HH> due time you can have that switch (with of course the danger HH> that nothing generates a par anymore, or worse, that anybody HH> disagrees with any defaults), but not in a quick and dirty HH> hack; i will first make a proper startdisplay/stopdisplay, and HH> after that it may go in some env's That's more than fine for me! :) -- Giuseppe "Oblomov" Bilotta
On Mon, Dec 02, 2002 at 08:18:06PM -0500, Bruce D'Arcus wrote:
On Monday, December 2, 2002, at 07:37 PM, Giuseppe Bilotta wrote:
For what it's worth, I agree with Giuseppe here. It's the same issue I had with block quotes: that even if there's no blank line, ConTeXt assumes new paragraph.
I agree with Giuseppe and Bruce as well. A paragraph with a displayed item in the middle, looks different to the typesetter than to the reader: For the typesetter it consists of three "display areas". For the reader it consists of a single paragraph with a part standing out by its layout. The author registers his intention to consider this as a single paragraph by not issuing \par commands, not explicitly and no blank lines around the displayed item. AFAIK, in HTML such a paragraph is forbidden; a "block item" cannot contain other "block items". In LaTeX this situation is handled by the everypar mechanism. The end of the display environment inserts into everypar a "once only" noindent command. If the author issues a \par command after the displayed item, explicitly or by a blank line, the noindent is consumed by this empty paragraph. The following text will see the normal everypar, with a normal parindent. It is a fragile mechanism, and for a class author it is always a problem to get this right. (It also bluntly resets everypar, thus disabling any other usage of it.) I am not sure how a \par command before the displayed item is treated. In context \setupdescriptions has a 'indentnext=no' option. In DocbookInContext I have tried to use it, in variablelist and glosslist. I did not see a result. Regards, Simon -- Simon Pepping email: spepping@scaprea.hobby.nl
At 01:37 AM 12/3/2002 +0100, you wrote:
This is where we differ. After all, the empty line is the *standard* TeX (and ConTeXt) way to denote new paragraph. While should it be different for displayed items? It's inconsistent.
it's because in my limited perception display stuff is not part if the par -)
But I have to specify it manually. If I later decide to rewrite the stuff so that it's really in separate paragraphs I have to change the displayed environment, while what should suffice is letting ConTeXt understand that a new paragraph is started --the *standard* way (empty line).
eh .. not sure if i understand this; some global switch would do most of the trick i assume
Doesn't work. Try setting \setupindenting[medium] in your example; you'll notice that each line starts a new paragraph, and this is not what is wanted.
HH> ah, so we should look ahead, doable but never 100% robust; with regards to HH> looking back, definitely less robust
I don't think there should be any need to look back or ahead. Just don't force a new paragraph before and after each displayed item. Let the user choose, the standard way(s).
well, since i want to be able to control consistency, i do need to look back; say that the design says: no empty lines (parskips) before something, then i need to configure that particular display instance to ignore the (possiibly already applied) parskip; keep in mind that it's not always the author who decides that somethign should start like a new paragraph; so, even if i provide you thsi display feature, i need it to be configurable in many ways for my own needs -) would not hurt you anyway
I propose a global switch like
\setupstartstops[break=always] % current ConTeXt behaviour \setupstartstops[break=par] % only start new paragraphs % when there are empty lines
HH> hm, not sure it it hooks/should hook into start/stop
Where should it hook? All displayed items are start/stop pairs. If you want to overrule this for a specific start/stop pair, you can always to it with the local switch:
i cannot simply before=\startdisplay things because it would break compatibility, so it would mean that each environment would get a display=... switch with some global default, in addition to start/stop
is part of a paragraph but gets "highlited" by typesetting it in a different format, sort of like a subparagraph. This category includes itemizations (all itemgroups, actually), formulas (not inline, of course), quotations, etc.
hm, i like a more general view on 'display': anything that stands out in the text stream, being par or not, this is why it should be configurable (even tex is a bit fuzzy about it, since display math is used for both in-par or between par math) Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Tuesday, December 3, 2002 Hans Hagen wrote: HH> At 01:37 AM 12/3/2002 +0100, you wrote:
This is where we differ. After all, the empty line is the *standard* TeX (and ConTeXt) way to denote new paragraph. While should it be different for displayed items? It's inconsistent.
HH> it's because in my limited perception display stuff is not part if the par -) Even assuming the displayed part might not be "part" of the par, the following text would (or rather could) still be part of the same par as the previous text. But then again, displayed material *is* part of the par --it's a displayed part of it, something put in evidence, but still part of it. [You could convince yourself by thinking for example of displayed math $$...$$ in (plain) TeX: it is considered part of the paragraph (and "forced" to three lines, IIRC)]
But I have to specify it manually. If I later decide to rewrite the stuff so that it's really in separate paragraphs I have to change the displayed environment, while what should suffice is letting ConTeXt understand that a new paragraph is started --the *standard* way (empty line).
HH> eh .. not sure if i understand this; some global switch would do most of HH> the trick i assume Nope. As an example, assume the displayed material in question is a quotation: changing a global switch will make all/none of the quotations be "distinct paragraph". This is not good, because wether or not the quotation is a part of the paragraph or not depends from the quotation and its context, so the user should be able to decide when new pars are started and when not, for each single quotation. And since the standard way to get new pars in TeX is by putting empty lines, why should it be different for displayed material?
I don't think there should be any need to look back or ahead. Just don't force a new paragraph before and after each displayed item. Let the user choose, the standard way(s).
HH> well, since i want to be able to control consistency, i do need to look HH> back; say that the design says: no empty lines (parskips) before something, HH> then i need to configure that particular display instance to ignore the HH> (possiibly already applied) parskip; keep in mind that it's not always the HH> author who decides that somethign should start like a new paragraph; I'm not sure I understand this.
HH> hm, not sure it it hooks/should hook into start/stop
Where should it hook? All displayed items are start/stop pairs. If you want to overrule this for a specific start/stop pair, you can always to it with the local switch:
HH> i cannot simply before=\startdisplay things because it would break HH> compatibility, so it would mean that each environment would get a HH> display=... switch with some global default, in addition to start/stop Oh, that's fine for me.
is part of a paragraph but gets "highlited" by typesetting it in a different format, sort of like a subparagraph. This category includes itemizations (all itemgroups, actually), formulas (not inline, of course), quotations, etc.
HH> hm, i like a more general view on 'display': anything that stands out in HH> the text stream, being par or not, this is why it should be configurable HH> (even tex is a bit fuzzy about it, since display math is used for both HH> in-par or between par math) That's precisely my point. Contrary to TeX, ConTeXt always forces new paragraphs for displayed material: each displayed material is always considered a distinct paragraph, and thus always terminates the previous paragraph and begins a new one after its end. Of course "between par" displays (i.e. displays surrounded by empty lines) should be distinct pars, but this should not be enforced on all displays (as it it by ConTeXt, currently). -- Giuseppe "Oblomov" Bilotta
participants (4)
-
Bruce D'Arcus
-
Giuseppe Bilotta
-
Hans Hagen
-
Simon Pepping