# Paragraph title in ConTeXt (similar to LaTeX \paragraph{})

I want to have inline paragraph titles in ConTeXt with a mark and spacing:

This is my paragraph @ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

The @ above should be a symbol (diamond or bullet) and I need 2em spacing before and after it. Paragraph title style should be smallcaps.

I was attempting to do it with \setuphead without success, as I can not disable the newline after the title. I also don't like inheriting subsubsubject. I would prefer to add it one level below subsubsubject despite I don't want paragraph titles in the TOC.

\definehead[bekezdes][subsubsubject]
style=\sc
]


The above code produces the following title:

I would very appreciate a solution. Thanks in advance!

• Add alternative=text to get rid of the newline after the section title. Regarding TOC, can you create a MWE to show how you are invoking the TOC. – Aditya Jun 20 '17 at 15:20

Simply set alternative=text to get the correct spacing. With altenative=text, before and after keys are ignored. Instead you can use commandafter to set the bullet after the section title. By default, ConTeXt inserts a skip of textdistance after the section head, so I set it to 0pt. Here is the complete example:

\definehead[paragraph][subsubsubsection]
[
number=no, % To imitate LaTeX
textdistance=0pt,
alternative=text,
style=sc,
]

\starttext
\startparagraph[title=Knuth quote]
\input knuth
\stopparagraph
\stoptext


which gives

• Note that there is more space after the bullet. Without a fix, Henri's answer does this better. I tried to adjust head and indentation settings to fix this without success yet. Still, I would happily accept this one as it is based on the headings which seems more transparent to me. Not that it only affects \startparagraph and not \paragraph{}. – SzieberthAdam Jun 28 '17 at 10:31
• @SzieberthAdam: There appears to be a regular space after the head title (and I couldn't figure out a way to signal that the space should not be inserted). You can get rid of that by using textdistance=-\currentspaceskip (I think, I did not measure the resulting output). – Aditya Jun 28 '17 at 13:30

As an alternative approach you could define an enumeration.

\defineenumeration
[paragraph]
[
text=,
number=no,
title=yes,
titlestyle=sc,
titledistance=0pt,
titleleft=,
distance=1em,
alternative=serried,
]

\starttext

\startparagraph{Knuth quote}
\input knuth
\stopparagraph

\stoptext


• For the sake of consistency, I prefer to use \startparagraoh[title=..] which also works with descriptions and enumerations... and why not use a description environment instead or enumeration? – Aditya Jun 22 '17 at 16:53