0

enter image description hereI defined a general environment using setupenumerations. Then I defined an example and proof environments that inherited from it. The proof isn't supposed to be a numbered and setting number=no in the options brings an awkward space after the heading like this:

\setupenumerations[
  before={\blank[medium]},
  after={\blank[medium]},
  alternative=serried,
  right=.,
  distance=0.5em,
  width=fit,
  headstyle=bold,
  titlestyle=bold,
]

\defineenumeration[example][ text=Example, ]

\defineenumeration[proof][ text=Proof, number=no, right=., distance=1em, headstyle=italic, title=no, closesymbol={\mathematics{\square}}, style=normal, ]

\starttext

\startexample Something here... \stopexample

\startproof For the first property, we know that at the very least $\emptyset$ and $R$ itself are subsets of $R$ and so it is satisfied. Since $R$ is a ring, $rs \in R$ for $r,s \in R$. Consequently, there exists $S \subseteq R$ which contains $rs$. We know that $\langle R,+\rangle$ is an abelian group and so $s + r \in R$. Also, $s - r = s + (-r)$ where $-r\in R$ is the unique inverse of $r$ under the binary operation $+$. Again, there exists $S \subseteq R$ such that $s-r \in S$. \stopproof \stoptext

How do I get rid of the extra space marked in the proof environment so it becomes more like that of the Example i.e the space between proof and For the first... space?

  • Can you add picture to show what you mean, when I run your example I don't see anything unusual. – Wolfgang Schuster Jun 01 '21 at 22:04
  • @WolfgangSchuster thank you for your comment. Please take another look. – Spirit_bird Jun 01 '21 at 22:27
  • The example environment uses alternative=serried but the proof env does not. Add alternative=serried in the proof env to get a similar output. – Aditya Jun 02 '21 at 02:55
  • 1
    @Spirit_bird The space after the title in the proof environment is larger because you have distance=1em in the definition of the environment. – Wolfgang Schuster Jun 02 '21 at 07:55
  • @Aditya thanks for the comment. I thought It would inherit it from the setupenumerations? – Spirit_bird Jun 02 '21 at 15:35
  • @WolfgangSchuster thanks it has worked. Also why is the dot in example ie right=., not showing in the proof environment head name even though I explicity added it? – Spirit_bird Jun 02 '21 at 15:40
  • @Spirit_bird The right is ignored because you're using a unnumbered title but you can set symbols before and after the title with headcommand=\groupedcommand{<before>}{<after>}. – Wolfgang Schuster Jun 02 '21 at 17:34
  • @WolfgangSchuster it worked. Thanks. Very difficult onboarding experience for me with ConTeXt. I have read most of the manuals but I don't know where to get a specific thing when I need it. Plus they seem to cover only basic functionality. For example, I have conTeXt commands book but some of the commands are not self explanatory. Any idea a better way to go about learning ConTeXt? I feel embarassed asking such simple questions. – Spirit_bird Jun 02 '21 at 19:10
  • 1
    Not sure if this helps: https://tex.stackexchange.com/questions/448812/the-definitive-guide-to-context-mkiv-documentation – Luis Turcio Jun 02 '21 at 21:46

0 Answers0