%5 and 1 comment. Then 6 more and 2 comment.


enter image description here

enter image description here

enter image description here

Basically, \xbegin makes (to my eyes) the code for theorem starts more readable by giving the keys as optional arguments, without the name=, label= or continues= part. \xend should suppress the indent of the first line after the theorem. We notice the following:

  1. After the first Definizione, we have that indent;
  2. Curiously, if I use the normal \begin, I get no indent;
  3. After the second Definizione, we get a partial indent, i.e. and indent by something between zero and the normal indent; it may seem like there is extra vertical space too, but it is just split pictures;
  4. After the third Definizione, we get no indent.

So my questions are two:

  1. Why does the indent appear with \xbegin, as noted in points 1-2?
  2. Why does the \noindent in \xend only partially suppress the indentation?
  • 1
    \noindent\ignorespaces However, I can't see how a series of optional arguments can be better than a key-value interface. If you want to have #4 only, you have to add two optional arguments and then test for their emptyness.
    – egreg
    Commented Mar 3, 2015 at 10:50
  • 1
    you are missing % from almost every line of your definition, but I would agree with egreg having two adjacent optional arguments is bad enough, I'd never do more than that. Commented Mar 3, 2015 at 11:02
  • OK, that removes the partial indent, which is in fact a space coming from the line end, which, after a \noindent, is turned into a space (right?). But why does the full indent appear with \let\xend\end?
    – MickG
    Commented Mar 4, 2015 at 20:50

1 Answer 1


The "partial indent" is not indentation it is just adjacent spaces coming from your source file, you need % at the ends of lines if you use white space to lay out your source that you do not want to appear in the output.

In comment you ask why you get full indent with \let\xend\end that is the normal behaviour for the start of a paragraph, which is the case after a theorem environment. Your \xindent suppresses the indentation but at the price of starting a new paragraph implicitly, which makes the markup very fragile, any space characters after the end of theorem environment will appear as space in the output, and a blank line or a display environment such as a list after the theorem environment would end the empty paragraph started by \noindent causing a spurious blank line,

  • That gives a reason to the cases when I had the extra vertical space (mostly when starting a thm right after another one), which I solved by using plain \end in those cases.
    – MickG
    Commented Jan 18, 2016 at 21:50
  • @MickG never use \noindent in a macro:-) Commented Jan 18, 2016 at 21:51
  • Huh-huh, but typing it every time...
    – MickG
    Commented Jan 18, 2016 at 21:52
  • @MickG no if you use \noindent in the document then something is definitely wrong, it should be a document level style decision where paragraph indentation is needed. Commented Jan 18, 2016 at 21:53
  • @MickG look at latex sections and list items, they suppress indentation but never using \noindent Commented Jan 18, 2016 at 21:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .