ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \startitem and \startparagraph
@ 2014-10-17  1:02 Rik Kabel
  2014-10-17  7:50 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Rik Kabel @ 2014-10-17  1:02 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1790 bytes --]

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

    \startitemize
       \item
           Item three paragraph one.

           Item three paragraph two.

           Item three paragraph three.
       \item
           Item four paragraph one.

           Item four paragraph two.

           Item four paragraph three.
    \stopitemize
    \stoptext

-- 
Rik Kabel

[-- Attachment #1.2: Type: text/html, Size: 3159 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: \startitem and \startparagraph
  2014-10-17  1:02 \startitem and \startparagraph Rik Kabel
@ 2014-10-17  7:50 ` Hans Hagen
  2014-10-17 15:11   ` Rik Kabel
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2014-10-17  7:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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


>     \startitemize
>        \item
>            Item three paragraph one.
>
>            Item three paragraph two.
>
>            Item three paragraph three.
>        \item
>            Item four paragraph one.
>
>            Item four paragraph two.
>
>            Item four paragraph three.
>     \stopitemize
>     \stoptext
>
> --
> Rik Kabel
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
>


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: \startitem and \startparagraph
  2014-10-17  7:50 ` Hans Hagen
@ 2014-10-17 15:11   ` Rik Kabel
  2014-10-17 18:22     ` Hans Hagen
  2014-10-18 11:13     ` Wolfgang Schuster
  0 siblings, 2 replies; 5+ messages in thread
From: Rik Kabel @ 2014-10-17 15:11 UTC (permalink / raw)
  To: ntg-context

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.

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

-- 
Rik Kabel
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: \startitem and \startparagraph
  2014-10-17 15:11   ` Rik Kabel
@ 2014-10-17 18:22     ` Hans Hagen
  2014-10-18 11:13     ` Wolfgang Schuster
  1 sibling, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2014-10-17 18:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 10/17/2014 5:11 PM, Rik Kabel wrote:

> 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.
>
> Is there any setup associated with \bpar..\epar as there is
> \defineparagraph for \startparagraph..\stopparagraph?

no time now ... just grep the source ... they are just simple hooks and 
the short bpar one doesn't issue a \par ... not that much special ... 
the long ones are real elements and can also have additional attributes

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: \startitem and \startparagraph
  2014-10-17 15:11   ` Rik Kabel
  2014-10-17 18:22     ` Hans Hagen
@ 2014-10-18 11:13     ` Wolfgang Schuster
  1 sibling, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2014-10-18 11:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3252 bytes --]


> Am 17.10.2014 um 17:11 schrieb Rik Kabel <context@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

[-- Attachment #1.2: Type: text/html, Size: 9682 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-10-18 11:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-17  1:02 \startitem and \startparagraph Rik Kabel
2014-10-17  7:50 ` Hans Hagen
2014-10-17 15:11   ` Rik Kabel
2014-10-17 18:22     ` Hans Hagen
2014-10-18 11:13     ` Wolfgang Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).