2

Can some kind soul show me how to specify the amount of horizontal space between list symbols (bullets, numbers, etc.) and item text in ConTeXt?

Specifically, I'm trying to create a bulleted list in ConTeXt with the bullets in the margins, which I've done, as reproduced in the example below. But I'd like to change the horizontal space between the bullets and the item text (specifically, I'd like to make it smaller). I've pored over the setupitemgroup documentation page, and have tried setting margin, leftmargin, distance, and textdistance, but none of these seem to do what I'm looking for. I'd be grateful for any help you can provide.

\defineitemgroup[MyItems]
\setupitemgroup[MyItems][each][packed,inmargin][before={\bgroup},after={\egroup}]

\setupindenting[no]

\starttext

\|← left margin

\startMyItems
\item I like how my bullet is in the margin
\item but I wish it were just a little closer
\stopMyItems

\stoptext

output of example code

  • \labelsep is the length used. Note, the bullet will move to the right unless you also change \itemindent (default = 0pt, and is reset each itemize). – John Kormylo Nov 14 '15 at 22:27
  • @John, correct me if I'm wrong, but I don't think \labelsep exists in ConTeXt. – lefthander Nov 14 '15 at 22:57
  • Beats the heck out of me. I have no idea what ConTeXt is. – John Kormylo Nov 14 '15 at 23:11
  • 1
    ConTeXt is a document processing system built on top of Donald Knuth's TeX. en.wikipedia.org/wiki/ConTeXt; wiki.contextgarden.net/Main_Page. – lefthander Nov 14 '15 at 23:38
  • 2
    To have the text of your itemgroup aligned with the border of the textblock you can set a negative value for the margin key, which has to be the same value as width because it is used for the indentation. The distance between the bullet and the text can be controlled with the distance key. The complete setup for this is \setupitemgroup[MyItems][each][packed][width=5mm,margin=-5mm,distance=3mm,itemalign=flushright]. – Wolfgang Schuster Nov 15 '15 at 15:22
2

To see that is happening, add \showframed before \starttext, which shows:

enter image description here

So, the distance is equal to the distance between the left margin and text box, which is controlled by leftmargindistance key to \setuplayout. So, if you add:

\setuplayout[leftmargindistance=0.25ex]

you get

enter image description here

Edit Up on replying to a comment by Manuel, if occurred to me that perhaps you just want bullets that protrude to the left and are not necessarily in the margin. In that case, you can use:

\setupitemgroup[MyItems][each][packed][margin=-1em, width=1em]

Note that in this case, the bullet is not placed in the margin.

enter image description here

  • 2
    But it seems rather bad to customize the layout to change that rather than an itemgroup parameter. – Manuel Nov 15 '15 at 8:18
  • @Manuel is it because \setuplayout affects the effects of the whole document? I would have just \advance\leftskip \item by a value, and then lean over and kern it back. – doed Nov 15 '15 at 14:21
  • 1
    @Manuel: The idea is that inmargin places the bullet in the ... well ... the margin. If you just want a negative left kern, you can use \startitemize[margin=-2em, width=2em], etc. See my updated answer – Aditya Nov 19 '15 at 5:12
  • @Aditya Wonderful explanation. – Manuel Nov 19 '15 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.