ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* tagging heads and empty output
@ 2015-03-28 13:34 Idris Samawi Hamid ادريس سماوي حامد
  2015-03-28 21:12 ` Idris Samawi Hamid ادريس سماوي حامد
  0 siblings, 1 reply; 6+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2015-03-28 13:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1118 bytes --]

Dear gang,
Two issues:

1. What is the proper way to tag heads in itemize? I do

==========
\startitemize[n]
\starthead {Head 1}

Test 1
\stophead
\starthead {Head 2}

Test 2
\stophead
\stopitemize
==========

but {Head 1} and {Head 2} are not tagged in the output *div.html. Is there  
a special tagging command for the heads?

2. In a browser, everything within a <div class="itemgroup itemize level-1  
symbol-n"> etc is ignored (tried different browers); nothing shows up at  
all, so nothing to tweak in css.

==============
  <div class="itemgroup itemize level-1 symbol-n">
   <div class="item">
    <div class="itemtag">1.</div>
    <div class="itemcontent">Head 1     <div  
class="break"><!--empty--></div>
Test 1</div>
   </div>
   <div class="item">
    <div class="itemtag">2.</div>
    <div class="itemcontent">Head 2     <div  
class="break"><!--empty--></div>
Test 2</div>
   </div>
  </div>
==============

Is there something wrong with context's xhtml output? test files attached  
and

Best wishes
Idris
-- 
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523

[-- Attachment #2: test-itemize-export-div.xhtml --]
[-- Type: application/xhtml+xml, Size: 1263 bytes --]

[-- Attachment #3: test-itemize-export.tex --]
[-- Type: application/x-tex, Size: 226 bytes --]

[-- Attachment #4: itemize.css --]
[-- Type: text/css, Size: 266 bytes --]

/*

	author    : Idris Samawi Hamid (derived from Hans Hagen's example-export.css)
	copyright : 
	license   : 
	comment   : 

*/

/* ignore  : mixed   */
/* metadata: display */



body {
	font-family: "TeXGyreSchola", "DejaVu Serif", "Lucida Bright", serif ;
}



 

[-- Attachment #5: 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] 6+ messages in thread

* Re: tagging heads and empty output
  2015-03-28 13:34 tagging heads and empty output Idris Samawi Hamid ادريس سماوي حامد
@ 2015-03-28 21:12 ` Idris Samawi Hamid ادريس سماوي حامد
  2015-03-28 22:17   ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2015-03-28 21:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 3112 bytes --]

On Sat, 28 Mar 2015 07:34:32 -0600, Idris Samawi Hamid ادريس سماوي حامد  
<ishamid@colostate.edu> wrote:

> Dear gang,
> Two issues:
>
> 1. What is the proper way to tag heads in itemize? I do
>
> ==========
> \startitemize[n]
> \starthead {Head 1}
>
> Test 1
> \stophead
> \starthead {Head 2}
>
> Test 2
> \stophead
> \stopitemize
> ==========
>
> but {Head 1} and {Head 2} are not tagged in the output *div.html. Is  
> there
> a special tagging command for the heads?
>
> 2. In a browser, everything within a <div class="itemgroup itemize  
> level-1
> symbol-n"> etc is ignored (tried different browers); nothing shows up at
> all, so nothing to tweak in css.
>
> ==============
>   <div class="itemgroup itemize level-1 symbol-n">
>    <div class="item">
>     <div class="itemtag">1.</div>
>     <div class="itemcontent">Head 1     <div
> class="break"><!--empty--></div>
> Test 1</div>
>    </div>
>    <div class="item">
>     <div class="itemtag">2.</div>
>     <div class="itemcontent">Head 2     <div
> class="break"><!--empty--></div>
> Test 2</div>
>    </div>
>   </div>
> ==============
>
> Is there something wrong with context's xhtml output? test files attached

Ok, I figured it out. Attached are working files for the record, as well  
as sources below.

Also, it seems there is no tagging for the first argument to  
\start-stophead. A simple

\definestartstop[heading][style=]

does the trick, and may be worth adding to the distribution.

Best wishes
Idris

=========
\setupexport[cssfile=itemize.css]
\setupbackend[export=yes]

\setupitemize[each][headstyle=bold]
\definestartstop[heading][style=]

\starttext
Text

\startitemize[n]
\starthead {\startheading Head 1 \stopheading}

Test 1
\stophead
\starthead {\startheading Head 2 \stopheading}

Test 2
\stophead
\stopitemize

\startitemize[n]
\startitem[] Text \stopitem
\startitem[] Text \stopitem
\stopitemize

\startitemize
\starthead {\startheading Head 1 \stopheading}

Test 3
\stophead
\starthead {\startheading Head 2 \stopheading}

Test 4
\stophead
\stopitemize
\stoptext
=========
.itemgroup.itemize.level-1.symbol-n {
	display       : block ;
	margin-bottom : 0.5em ;
	margin-top    : 0.5em ;
}

.itemgroup.itemize.level-1.symbol-n > .item{
	display       : block ;
}

.itemgroup.itemize.level-1.symbol-n > .item > .itemtag {
	display       : inline ;
	font-weight : normal ;
	margin-right    : 1em ;
}

.itemgroup.itemize.level-1.symbol-1 > .item{
	display       : block ;
}

.itemgroup.itemize.level-1.symbol-1 > .item > .itemtag {
	display       : inline ;
	font-weight : normal ;
	margin-right    : 1em ;
}

.itemgroup.itemize.level-1.symbol-1 > .item > .itemcontent {
	display       : inline ;
}

.construct.heading {
	display       : inline ;
	font-weight : bold ;
}

.itemgroup.itemize.level-1.symbol-n > .item > .itemcontent {
	display       : inline ;
}
=========

-- 
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523

[-- Attachment #2: test-itemize-export.tex --]
[-- Type: application/x-tex, Size: 607 bytes --]

[-- Attachment #3: test-itemize-export.pdf --]
[-- Type: application/pdf, Size: 10364 bytes --]

[-- Attachment #4: test-itemize-export-div.xhtml --]
[-- Type: application/xhtml+xml, Size: 2215 bytes --]

[-- Attachment #5: itemize.css --]
[-- Type: text/css, Size: 1110 bytes --]

/*

	author    : Idris Samawi Hamid (derived from Hans Hagen's example-export.css)
	copyright : 
	license   : 
	comment   : 

*/

/* ignore  : mixed   */
/* metadata: display */



body {
	font-family: "TeXGyreSchola", "DejaVu Serif", "Lucida Bright", serif ;
}


.itemgroup.itemize.level-1.symbol-n {
	display       : block ;
	margin-bottom : 0.5em ;
	margin-top    : 0.5em ;
}

.itemgroup.itemize.level-1.symbol-n > .item{
	display       : block ;
}

.itemgroup.itemize.level-1.symbol-n > .item > .itemtag {
	display       : inline ;
	font-weight : normal ;
	margin-right    : 1em ;
}

.itemgroup.itemize.level-1.symbol-1 > .item{
	display       : block ;
}

.itemgroup.itemize.level-1.symbol-1 > .item > .itemtag {
	display       : inline ;
	font-weight : normal ;
	margin-right    : 1em ;
}

.itemgroup.itemize.level-1.symbol-1 > .item > .itemcontent {
	display       : inline ;
}

.construct.heading {
	display       : inline ;
	font-weight : bold ;
}

.itemgroup.itemize.level-1.symbol-n > .item > .itemcontent {
	display       : inline ;
}

.m:math {
	display: inline ;
}

.m:mo {
	display: inline ;
}
 

[-- Attachment #6: 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] 6+ messages in thread

* Re: tagging heads and empty output
  2015-03-28 21:12 ` Idris Samawi Hamid ادريس سماوي حامد
@ 2015-03-28 22:17   ` Hans Hagen
  2015-04-03 18:59     ` Idris Samawi Hamid ادريس سماوي حامد
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2015-03-28 22:17 UTC (permalink / raw)
  To: ntg-context

On 3/28/2015 10:12 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
> On Sat, 28 Mar 2015 07:34:32 -0600, Idris Samawi Hamid ادريس سماوي حامد
> <ishamid@colostate.edu> wrote:
>
>> Dear gang,
>> Two issues:
>>
>> 1. What is the proper way to tag heads in itemize? I do

the next beta will provide

<item head="yes">


-----------------------------------------------------------------
                                           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] 6+ messages in thread

* Re: tagging heads and empty output
  2015-03-28 22:17   ` Hans Hagen
@ 2015-04-03 18:59     ` Idris Samawi Hamid ادريس سماوي حامد
  2015-04-08 16:18       ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2015-04-03 18:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Hans,

On Sat, 28 Mar 2015 16:17:33 -0600, Hans Hagen <pragma@wxs.nl> wrote:

> On 3/28/2015 10:12 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
>> On Sat, 28 Mar 2015 07:34:32 -0600, Idris Samawi Hamid ادريس سماوي حامد
>> <ishamid@colostate.edu> wrote:
>>
>>> Dear gang,
>>> Two issues:
>>>
>>> 1. What is the proper way to tag heads in itemize? I do
>
> the next beta will provide
>
> <item head="yes">

===============
  <div class="itemgroup itemize symbol-n level-1">
   <div class="item head-yes">
    <div class="itemtag">1.</div>
    <div class="itemcontent">Head 1     <div  
class="break"><!--empty--></div>
Test 3</div>
   </div>
   <div class="item head-yes">
    <div class="itemtag">2.</div>
    <div class="itemcontent">Head 2     <div  
class="break"><!--empty--></div>
Test 4</div>
   </div>
  </div>
===============

Ok, but 'Head 1' and 'Head 2' are still not tagged, so we can't translate  
the actual head, e.g.,

\setupitemize[each][headstyle=bold]

into css, while leaving the paragraph after the break unaffected.

Current workaround:

==================
\definestartstop[heading][style=]

\startitemize[n]
\starthead {\startheading Head 1 \stopheading}

Test 1
\stophead
\starthead {\startheading Head 2 \stopheading}

Test 2
\stophead
\stopitemize
=================
  <div class="itemgroup itemize symbol-n level-1">
   <div class="item head-yes">
    <div class="itemtag">1.</div>
    <div class="itemcontent"><div class="construct heading">Head 1</div>     
<div class="break"><!--empty--></div>
Test 1</div>
   </div>
   <div class="item head-yes">
    <div class="itemtag">2.</div>
    <div class="itemcontent"><div class="construct heading">Head 2</div>     
<div class="break"><!--empty--></div>
Test 2</div>
   </div>
  </div>
===============

Best wishes
Idris
-- 
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___________________________________________________________________________________
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] 6+ messages in thread

* Re: tagging heads and empty output
  2015-04-03 18:59     ` Idris Samawi Hamid ادريس سماوي حامد
@ 2015-04-08 16:18       ` Hans Hagen
  2015-04-10 23:17         ` Idris Samawi Hamid ادريس سماوي حامد
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2015-04-08 16:18 UTC (permalink / raw)
  To: ntg-context

On 4/3/2015 8:59 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
> Hi Hans,
>
> On Sat, 28 Mar 2015 16:17:33 -0600, Hans Hagen <pragma@wxs.nl> wrote:
>
>> On 3/28/2015 10:12 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
>>> On Sat, 28 Mar 2015 07:34:32 -0600, Idris Samawi Hamid ادريس سماوي حامد
>>> <ishamid@colostate.edu> wrote:
>>>
>>>> Dear gang,
>>>> Two issues:
>>>>
>>>> 1. What is the proper way to tag heads in itemize? I do
>>
>> the next beta will provide
>>
>> <item head="yes">
>
> ===============
>   <div class="itemgroup itemize symbol-n level-1">
>    <div class="item head-yes">
>     <div class="itemtag">1.</div>
>     <div class="itemcontent">Head 1     <div
> class="break"><!--empty--></div>
> Test 3</div>
>    </div>
>    <div class="item head-yes">
>     <div class="itemtag">2.</div>
>     <div class="itemcontent">Head 2     <div
> class="break"><!--empty--></div>
> Test 4</div>
>    </div>
>   </div>
> ===============
>
> Ok, but 'Head 1' and 'Head 2' are still not tagged, so we can't
> translate the actual head, e.g.,
>
> \setupitemize[each][headstyle=bold]
>
> into css, while leaving the paragraph after the break unaffected.
>
> Current workaround:
>
> ==================
> \definestartstop[heading][style=]
>
> \startitemize[n]
> \starthead {\startheading Head 1 \stopheading}
>
> Test 1
> \stophead
> \starthead {\startheading Head 2 \stopheading}
>
> Test 2
> \stophead
> \stopitemize
> =================
>   <div class="itemgroup itemize symbol-n level-1">
>    <div class="item head-yes">
>     <div class="itemtag">1.</div>
>     <div class="itemcontent"><div class="construct heading">Head
> 1</div>    <div class="break"><!--empty--></div>
> Test 1</div>
>    </div>
>    <div class="item head-yes">
>     <div class="itemtag">2.</div>
>     <div class="itemcontent"><div class="construct heading">Head
> 2</div>    <div class="break"><!--empty--></div>
> Test 2</div>
>    </div>
>   </div>
> ===============

ok, you now get (next beta) ... that's all you get (too much mess otherwise)

   <item kind="head">
    <itemtag>2.</itemtag>
    <itemcontent><itemhead>Head 2</itemhead> <itembody>Test 
2</itembody></itemcontent>
   </item>


-----------------------------------------------------------------
                                           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] 6+ messages in thread

* Re: tagging heads and empty output
  2015-04-08 16:18       ` Hans Hagen
@ 2015-04-10 23:17         ` Idris Samawi Hamid ادريس سماوي حامد
  0 siblings, 0 replies; 6+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2015-04-10 23:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 08 Apr 2015 10:18:53 -0600, Hans Hagen <pragma@wxs.nl> wrote:

> On 4/3/2015 8:59 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
>> Hi Hans,
>>
>> On Sat, 28 Mar 2015 16:17:33 -0600, Hans Hagen <pragma@wxs.nl> wrote:
>>
>>> On 3/28/2015 10:12 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
>>>> On Sat, 28 Mar 2015 07:34:32 -0600, Idris Samawi Hamid ادريس سماوي  
>>>> حامد
>>>> <ishamid@colostate.edu> wrote:
>>>>
>>>>> Dear gang,
>>>>> Two issues:
>>>>>
>>>>> 1. What is the proper way to tag heads in itemize? I do
>>>
>>> the next beta will provide
>>>
>>> <item head="yes">
>>
>> ===============
>>   <div class="itemgroup itemize symbol-n level-1">
>>    <div class="item head-yes">
>>     <div class="itemtag">1.</div>
>>     <div class="itemcontent">Head 1     <div
>> class="break"><!--empty--></div>
>> Test 3</div>
>>    </div>
>>    <div class="item head-yes">
>>     <div class="itemtag">2.</div>
>>     <div class="itemcontent">Head 2     <div
>> class="break"><!--empty--></div>
>> Test 4</div>
>>    </div>
>>   </div>
>> ===============
>>
>> Ok, but 'Head 1' and 'Head 2' are still not tagged, so we can't
>> translate the actual head, e.g.,
>>
>> \setupitemize[each][headstyle=bold]
>>
>> into css, while leaving the paragraph after the break unaffected.
>>
>> Current workaround:
>>
>> ==================
>> \definestartstop[heading][style=]
>>
>> \startitemize[n]
>> \starthead {\startheading Head 1 \stopheading}
>>
>> Test 1
>> \stophead
>> \starthead {\startheading Head 2 \stopheading}
>>
>> Test 2
>> \stophead
>> \stopitemize
>> =================
>>   <div class="itemgroup itemize symbol-n level-1">
>>    <div class="item head-yes">
>>     <div class="itemtag">1.</div>
>>     <div class="itemcontent"><div class="construct heading">Head
>> 1</div>    <div class="break"><!--empty--></div>
>> Test 1</div>
>>    </div>
>>    <div class="item head-yes">
>>     <div class="itemtag">2.</div>
>>     <div class="itemcontent"><div class="construct heading">Head
>> 2</div>    <div class="break"><!--empty--></div>
>> Test 2</div>
>>    </div>
>>   </div>
>> ===============
>
> ok, you now get (next beta) ... that's all you get (too much mess  
> otherwise)
>
>    <item kind="head">
>     <itemtag>2.</itemtag>
>     <itemcontent><itemhead>Head 2</itemhead> <itembody>Test  
> 2</itembody></itemcontent>
>    </item>

Just tested, works nicely... Thank you Hans!

Best wishes
Idris
-- 
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___________________________________________________________________________________
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] 6+ messages in thread

end of thread, other threads:[~2015-04-10 23:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-28 13:34 tagging heads and empty output Idris Samawi Hamid ادريس سماوي حامد
2015-03-28 21:12 ` Idris Samawi Hamid ادريس سماوي حامد
2015-03-28 22:17   ` Hans Hagen
2015-04-03 18:59     ` Idris Samawi Hamid ادريس سماوي حامد
2015-04-08 16:18       ` Hans Hagen
2015-04-10 23:17         ` Idris Samawi Hamid ادريس سماوي حامد

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).