Indenting (again!): a real problem in indentnext=yes
Hi, Sorry but I'm going to talk about indenting again. This time, it seems to me that there is really something wrong with the indentnext=yes option. Look at the following example, it speaks for itself (or at least I hope so). \setupindenting[yes,medium] \setupformulae[indentnext=yes] \starttext This is my first formula: \startformula x = 1, \stopformula and this line should not be indented because it's still in the same sentence. There is no line skip in the source file, and no new paragraph created. This is my second formula: \startformula x = 2. \stopformula This line has to be indented (and it is!), as this is truely a new paragraph. \stoptext The option indentnext=yes does not handle properly the first situation. What do you think? Thanks for your answers, and sorry to bother you again and again! Morgan
morgan.brassel@free.fr wrote:
The option indentnext=yes does not handle properly the first situation. What do you think?
That works for me as it should. My context: 2008.01.28, pdftex 1.40.5 What are your versions? Best wishes, Taco
Selon Taco Hoekwater
morgan.brassel@free.fr wrote:
The option indentnext=yes does not handle properly the first situation. What do you think?
That works for me as it should. My context: 2008.01.28, pdftex 1.40.5 What are your versions?
I'm using the context package in debian sid: * context: 2008.01.02 * pdftex: 1.40.3 But I also tried with ConTeXt live, and the result is the same... Notice that the line after the first formula should NOT be indented. How is it with your installation?
Best wishes, Taco
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
morgan.brassel@free.fr wrote:
Selon Taco Hoekwater
: morgan.brassel@free.fr wrote:
The option indentnext=yes does not handle properly the first situation. What do you think? That works for me as it should. My context: 2008.01.28, pdftex 1.40.5 What are your versions?
I'm using the context package in debian sid: * context: 2008.01.02 * pdftex: 1.40.3
But I also tried with ConTeXt live, and the result is the same... Notice that the line after the first formula should NOT be indented. How is it with your installation?
Ah, misunderstood. You want \setupformulae[indentnext=auto] Best wishes, Taco
Selon Taco Hoekwater
Selon Taco Hoekwater
: morgan.brassel@free.fr wrote:
The option indentnext=yes does not handle properly the first situation. What do you think? That works for me as it should. My context: 2008.01.28, pdftex 1.40.5 What are your versions?
I'm using the context package in debian sid: * context: 2008.01.02 * pdftex: 1.40.3
But I also tried with ConTeXt live, and the result is the same... Notice
morgan.brassel@free.fr wrote: that
the line after the first formula should NOT be indented. How is it with your installation?
Ah, misunderstood. You want
\setupformulae[indentnext=auto]
Thank you, Taco! And may I ask the difference with the 'yes' option? Is it documented somewhere? I'm having a real hard time understanding all the mechanisms of indenting in ConTeXt...
Best wishes, Taco
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
morgan.brassel@free.fr wrote:
Ah, misunderstood. You want
\setupformulae[indentnext=auto]
Thank you, Taco! And may I ask the difference with the 'yes' option? Is it documented somewhere? I'm having a real hard time understanding all the mechanisms of indenting in ConTeXt...
The 'auto' indents the next paragraph, but only if it is a separate paragraph (empty line or \par command following the \stop.. command) Indenting is not much more complex than this: there is \indenting with its (pretty long) list of arguments, and then there are the indentnext=[yes|no|auto] option available after various block-creation commands. The indentnext key is relatively new, and is added for requests similar to yours, but at a smaller scale. Some layouts ask for indentation after itemizations but not after floats, sometimes there is a need for 'auto' for formulae but often you really want 'no', some styles indent after block quotations, others dont, etc. etc. Best wishes, Taco
Selon Taco Hoekwater
morgan.brassel@free.fr wrote:
Ah, misunderstood. You want
\setupformulae[indentnext=auto]
Thank you, Taco! And may I ask the difference with the 'yes' option? Is it documented somewhere? I'm having a real hard time understanding all the mechanisms of indenting in ConTeXt...
The 'auto' indents the next paragraph, but only if it is a separate paragraph (empty line or \par command following the \stop.. command)
Thank you, that's precisely what I needed.
Indenting is not much more complex than this: there is \indenting with its (pretty long) list of arguments, and then there are the indentnext=[yes|no|auto] option available after various block-creation commands.
The indentnext key is relatively new, and is added for requests similar to yours, but at a smaller scale. Some layouts ask for indentation after itemizations but not after floats, sometimes there is a need for 'auto' for formulae but often you really want 'no', some styles indent after block quotations, others dont, etc. etc.
Ok, it's clearer to me now. Then I've got one last question on the subject: I didn't manage to have paragraph indented inside an 'enumeration' block, is there an option to do that? Thank you for your patience! I still think that it would be great to have one option to indent absolutely all paragraphs... Best regards, Morgan
Best wishes, Taco
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
morgan.brassel@free.fr wrote:
Ok, it's clearer to me now. Then I've got one last question on the subject: I didn't manage to have paragraph indented inside an 'enumeration' block, is there an option to do that? Thank you for your patience!
It is indeed possible, but the how is not very intuitive: \startitemize[command=\indent] % or \setupitemize[each][command...] \item .... \stopitemize the output looks dreadful to my eyes, and I really doubt this will ever become more easily supported.
I still think that it would be great to have one option to indent absolutely all paragraphs...
Is 'absolutely all' including the one above? What about float captions? And multi-line entries in tables? Or table of contents items? Or synonym entries? Footnotes? Best wishes, Taco
Selon Taco Hoekwater
morgan.brassel@free.fr wrote:
Ok, it's clearer to me now. Then I've got one last question on the subject:
didn't manage to have paragraph indented inside an 'enumeration' block, is
I there
an option to do that? Thank you for your patience!
It is indeed possible, but the how is not very intuitive:
\startitemize[command=\indent] % or \setupitemize[each][command...] \item .... \stopitemize
the output looks dreadful to my eyes, and I really doubt this will ever become more easily supported.
Sorry, I wasn't precise enough: I would like to indent paragraphs inside a block created with \defineenumeration (like theorems...), not inside an itemize block. The output in this latter case is indeed quite awful.
I still think that it would be great to have one option to indent absolutely all paragraphs...
Is 'absolutely all' including the one above? What about float captions? And multi-line entries in tables? Or table of contents items? Or synonym entries? Footnotes?
By 'absolutely all', I mean just like when you use \setlength{\parindent}{1em} in LaTeX (plus eventually the indentfirst package for indenting after heads). Every paragraph (preceded by an empty line or \par) in the "text flow" will get indented, independently of: * what is above (formula, float, etc) * what environment it belongs to (quote, theorem, abstract, etc.), as long as this environment doesn't need alignment (like itemize, tabular, etc.) Of course, "particular" objects like captions, tables, footnotes, won't be concerned by indenting. I hope my explanations were clear enough... If needed, I can write a small LaTeX example and send it to the list. Best regards, Morgan
morgan.brassel@free.fr wrote:
Sorry, I wasn't precise enough: I would like to indent paragraphs inside a block created with \defineenumeration (like theorems...), not inside an itemize block. The output in this latter case is indeed quite awful.
\defineenumeration[theorem][indenting=always] This is actually easier to find, because it actually is documented in texshow: http://texshow.contextgarden.net/
Every paragraph (preceded by an empty line or \par) in the "text flow" will get indented, independently of: * what is above (formula, float, etc) * what environment it belongs to (quote, theorem, abstract, etc.), as long as this environment doesn't need alignment (like itemize, tabular, etc.)
Of course, "particular" objects like captions, tables, footnotes, won't be concerned by indenting.
I hope my explanations were clear enough... If needed, I can write a small LaTeX example and send it to the list.
The thing is that the formal specification is not clearly defined, not even if you mention all cases. _You_ may not want indented footnotes, but _I_ have typeset a book that did. And consider this: Text text text text \startquotation Quoted text quoted text \stopquotation Text text text text is the next "Text" indented, yes or no? Whether this is a 'display' or a standalone paragraph is very much up to the document designer. In english mathematical texts, Theorems and such are often seen as a kind of run-in header, so that "Theorem 1. Text text text" is not indented, but that usually does not apply to "Proof. Text text text" and "Remark 1. Text text text": those usually _are_ indented. I am being hesitant about a 'global switch' because I fear that any automated solution only takes care of one particular set of settings, and so does will really help that much and will become a documentation nightmare. Imagine: The command \indentallparagraphs will make sure that every paragraph in the document will get indented, regardless of its surroundings, with the following exceptions: * the bodies of the predefined floating objects figures, tables, intermezzos, graphics. * the bodies of the predefined footnotes & endnotes, and floating marginals * the contents of float captions * the paragraph following a \stopformula, if that formula is not preceded by \placeformula, and there is not empty line inbetween. * any itemgroups, enumerations, descriptions, floats etc. that were not predefined in the context core. * ... I hope you see the problem with that. Even a simple command like \setupindentnext[yes] does not work out-of-the-box, because you actually wanted \setupformulae[indentnext=auto] % not yes As I said before, it may be much easier to put all this in a module (by you, or someone else, but I guess you now have the list of desired commands pretty much at hand?). Then you can say \usemodule[indentall] and the context core would not have to think about all these border cases. Best wishes, Taco
Selon Taco Hoekwater
\defineenumeration[theorem][indenting=always]
This is actually easier to find, because it actually is documented in texshow: http://texshow.contextgarden.net/
You're right. I found it there just after I sent the mail... Thank you, and sorry I didn't look at it first.
The thing is that the formal specification is not clearly defined, not even if you mention all cases. _You_ may not want indented footnotes, but _I_ have typeset a book that did.
It's not exactly about what _I_ want: my only wish was to recover the LaTeX specification. And actually, I don't know if it is clearly defined or not. Maybe I'm too used to LaTeX choices.
And consider this:
Text text text text \startquotation Quoted text quoted text \stopquotation Text text text text
is the next "Text" indented, yes or no? Whether this is a 'display' or a standalone paragraph is very much up to the document designer.
Without an empty line over it, it "should not" be indented. It's the rule in LaTeX, and it seems quite natural (to me). If you want it indented, you have to start a new paragraph, with an empty line or \par. All this because quotation can be part of a paragraph. Formulae, itemize, can also be part of a paragraph, that's why the rule should be the same for them. Floats, footnotes, etc. "can't" be part of a paragraph, that's why the rule is different for them.
In english mathematical texts, Theorems and such are often seen as a kind of run-in header, so that "Theorem 1. Text text text" is not indented, but that usually does not apply to "Proof. Text text text" and "Remark 1. Text text text": those usually _are_ indented.
For theorem like environments, I'd follow the choices of the AMS. The text inside theorems should follow the same rule as the main text outside. The "head" of theorems never get indented (by default).
I am being hesitant about a 'global switch' because I fear that any automated solution only takes care of one particular set of settings, and so does will really help that much and will become a documentation nightmare. Imagine:
The command \indentallparagraphs will make sure that every paragraph in the document will get indented, regardless of its surroundings, with the following exceptions:
* the bodies of the predefined floating objects figures, tables, intermezzos, graphics. * the bodies of the predefined footnotes & endnotes, and floating marginals * the contents of float captions * the paragraph following a \stopformula, if that formula is not preceded by \placeformula, and there is not empty line inbetween.
\placeformula shouldn't modify anything there...
* any itemgroups, enumerations, descriptions, floats etc. that were not predefined in the context core. * ...
I hope you see the problem with that. Even a simple command like
\setupindentnext[yes]
does not work out-of-the-box, because you actually wanted
\setupformulae[indentnext=auto] % not yes
auto seems indeed to be the default in LaTeX.
As I said before, it may be much easier to put all this in a module (by you, or someone else, but I guess you now have the list of desired commands pretty much at hand?). Then you can say
\usemodule[indentall]
and the context core would not have to think about all these border cases.
I understand that it's delicate to modify the core for such questions. My point is that I always found indenting "clear" or "coherent" in LaTeX: you want an indented line, then leave an empty line before. In ConTeXt, I had to fight a bit to recover this "simple" rule. But as I said, maybe I'm too used to LaTeX choices... As you suggest, I will put every command I used in a separate file, and try to produce a module out of it. I'm not sure I have sufficient knowledge for this yet, but I'll try. Last of all, I want to thank you for all your answers, and apologize for my poor english: I might seem a bit "rude", but this is clearly not my wish. Best regards, Morgan
participants (2)
-
morgan.brassel@free.fr
-
Taco Hoekwater