[NTG-context] \startitem and \startparagraph

Wolfgang Schuster schuster.wolfgang at gmail.com
Sat Oct 18 13:13:48 CEST 2014


> Am 17.10.2014 um 17:11 schrieb Rik Kabel <context at rik.users.panix.com>:
> 
> On 2014-10-17 03:50, Hans Hagen wrote:
>> On 10/17/2014 3:02 AM, Rik Kabel wrote:
>>> What is the proper way to delimit paragraphs within an itemized list
>>> using \start..\stop tagging (as for epub and such)? When I wrap
>>> paragraphs with \startparagraph..\stopparagraph within the
>>> \startitem..\stopitem, there is an unwanted newline inserted between the
>>> bullet and the item text.
>>> 
>>> Or, is it not recommend to wrap paragraphs that are in enumerations?
>>> 
>>> I ask because http://wiki.contextgarden.net/Epub_Sample suggests “Make
>>> sure to tag all your structural elements with \start...-\stop..., e.g.
>>> \startchapter, but even \startparagraph!” I also note the appearance of
>>> \startcontent..\stopcontent and \stopcaption..\startcaption and such,
>>> suggesting to me that semantic tagging may be a useful thing to add to
>>> new documents in order to support new output formats.
>>> 
>>>    \starttext
>>>    \startitemize
>>>       \startitem
>>>         \startparagraph
>>>           Item one paragraph one.
>>>         \stopparagraph
>>>         \startparagraph
>>>           Item one paragraph two.
>>>         \stopparagraph
>>>         \startparagraph
>>>           Item one paragraph three.
>>>         \stopparagraph
>>>       \stopitem
>>>       \startitem
>>>         \startparagraph
>>>           Item two paragraph one.
>>>         \stopparagraph
>>>         \startparagraph
>>>           Item two paragraph two.
>>>         \stopparagraph
>>>         \startparagraph
>>>           Item two paragraph three.
>>>         \stopparagraph
>>>       \stopitem
>>>    \stopitemize
>> 
>> \starttext
>> \startitemize
>>  \startitem
>>    \bpar
>>      Item one paragraph one.
>>    \epar % \stopparagraph
>>    \bpar
>>      Item one paragraph two.
>>    \epar
>>    \bpar
>>      Item one paragraph three.
>>    \epar
>>  \stopitem
>>  \startitem
>>    \bpar
>>      Item two paragraph one.
>>    \epar
>>    \bpar
>>      Item two paragraph two.
>>    \epar
>>    \bpar
>>      Item two paragraph three.
>>    \epar
>>  \stopitem
>> \stopitemize
>> \stoptext
>> 
> Thank you, Hans, for that.
> 
> Can you explain when \startparagraph..\stopparagraph should be preferred for tagging, and when \bpar..\epar? There is clearly a difference between them.

\starttext

The \tex{bpar} and \tex{epar} commands only add tags for the begin and end
of the paragraph in the exported content:

\startitemize
  \startitem
    \input ward
  \stopitem
  \startitem
    \bpar \input ward \epar
  \stopitem
\stopitemize

When you use the \tex{startparagraph} and \tex{stopparagraph} commands \CONTEXT\
forces the end of the previous paragraph before it add the tags for the export:

\startitemize
  \startitem
    \par \input ward \par
  \stopitem
  \startitem
    \startparagraph \input ward \stopparagraph
  \stopitem
\stopitemize

\stoptext

> Is there any setup associated with \bpar..\epar as there is \defineparagraph for \startparagraph..\stopparagraph?

No, the commands add only the tags when you use the export function.

Wolfgang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20141018/1a02c06a/attachment.html>


More information about the ntg-context mailing list