Re: [NTG-context] Aligning subsection head with following paragraph in tagged pdf output

2017-04-02 Thread Todd DeVries
Thank you for this information.

Wolfgang Schuster  writes:
> The inline heading in your example doesn’t work because \startparagraph
> forces the end of a paragraph for the preceding text.
>
> As you want only tags for the content of your paragraph you can enclose
> your text in \bpar … \epar instead of \startparagraph … \stopparagraph.

That seems to work.  I don't have the ability to directly examine the
pdf's tags table, but the document appears to read
correctly. Sections/subsections/paragraphs are identified. The subsection
is inline with the following paragraph.  I'm not sure what are the
differences between \bpar and \startparagraph, so have used the later
construction for the second paragraph in the subsection.

\setuppapersize[letter]
\setuptagging[state=start]
\setuphead[chapter][style=\bf, number=no, align=middle]
\setuphead[section][style=\bf, number=no]
\setuphead[subsection][style=\bf, number=no, commandafter={.~},
  textdistance=0cm, alternative=text]
\starttext
\startchapter[title=Chapter I]
  \startsection[title=Introduction]
\startparagraph
  Beginning with the passage of section 504 of the Rehabilitation
  Act of 1974, students with disabilities are participating in
  higher education in increasing numbers (Madaus, 2011). Students
  with psychiatric, learning, and cognitive impairment who once
  considered college out of reach are taking the plunge. …
\stopparagraph
\startsubsection[title=Demo Subsection]
  \bpar Numbers for all students moving from high school through a
  bachelors degree in Idaho are worse than in most of the
  nation. Go-on Idaho (2014), an organization dedicated to
  furthering our state's educational outcomes , relates …\epar
  \startparagraph
The U. S. Bureau of Labor Statistics (2016) report that a
person's level of education are linked to increased income
and levels of unemployment. The more education a person has,
the higher is the average wage and the lower the level of
unemployment. Educational attainment matters. …
  \stopparagraph
\stopsubsection
  \stopsection
  \stopchapter
\stoptext
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Aligning subsection head with following paragraph in tagged pdf output

2017-04-02 Thread Wolfgang Schuster



Todd DeVries 
2. April 2017 um 01:47via Postbox 


Hello everyone,

Thanks to all who helped me better understand the issues surrounding my
question. The document style I am following requires that the
first three headings are included in the table of contents. Headings
one and two are easy, as they stand on lines by themself. Heading three
must be aligned with the left margin in bold and followed by a period.
The rest of the paragraph or paragraphs folllow.

This style makes sense visually, bold text at the margin represents a
change in topic. less so when reading or editing with audio output (My
computer does not have a monitor attached.) Using good sectioning
allows one to fold the document for navigation and organization.
Consider how Org-mode in Emacs works as an analogue. I started thinking
that life would be easier if heading level 3 sections could be both
structural, for navigation, and visual, inline with their first
paragraph.

This idea holds true both in source text and in the pdf output.
Properly tagged pdf documents allow one to jump by structural elements
(heading to heading, paragraph to paragraph. In a perfect world one
could have it both ways: a structural element like a section, but placed
inline as though it were just another layout token. The audio using
tagged structure indicates a topic change, while those using their eyes
just see the bold text.

Hopefully this short explanation adequately describes my reason for
addressing the list.


The inline heading in your example doesn’t work because \startparagraph
forces the end of a paragraph for the preceding text.

As you want only tags for the content of your paragraph you can enclose
your text in \bpar … \epar instead of \startparagraph … \stopparagraph.

Wolfgang
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Aligning subsection head with following paragraph in tagged pdf output

2017-04-01 Thread Todd DeVries
Hello everyone,

Thanks to all who helped me better understand the issues surrounding my
question.  The document style I am following requires that the
first three headings are included in the table of contents.  Headings
one and two are easy, as they stand on lines by themself.  Heading three
must be aligned with the left margin in bold and followed by a period.
The rest of the paragraph or paragraphs folllow.

This style makes sense visually, bold text at the margin represents a
 change in topic. less so when reading or editing with audio output (My
 computer does not have a monitor attached.)  Using good sectioning
 allows one to fold the document for navigation and organization.
 Consider how Org-mode in Emacs works as an analogue. I started thinking
 that life would be easier if heading level 3 sections could be both
 structural, for navigation, and visual, inline with their first
 paragraph.

This idea holds true both in source text and in the pdf output.
Properly tagged pdf documents allow one to jump by structural elements
(heading to heading, paragraph to paragraph.  In a perfect world one
could have it both ways: a structural element like a section, but placed
inline as though it were just another layout token. The audio using
tagged structure indicates a topic change, while those using their eyes
just see the bold text.

Hopefully this short explanation adequately describes my reason for
addressing the list.

Thank you,

Todd
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Aligning subsection head with following paragraph in tagged pdf output

2017-04-01 Thread Alan Braslau
Have you tried:

On Sat, 1 Apr 2017 20:20:02 +0200
Pablo Rodriguez  wrote:

> Tagging PDFs the way you seem to be trying might be impossible. Here
> is my sample:
> 
> \setuppapersize[letter]
> \setuptagging[state=start]
> \starttext
> \startsubsection[title=First Subsection]
  \startparagraph[before=] a\stopparagraph
> \startparagraph b\stopparagraph
> \startparagraph c\stopparagraph
> \stopsubsection
> \stoptext

(untested)

Alan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Aligning subsection head with following paragraph in tagged pdf output

2017-04-01 Thread Pablo Rodriguez
On 04/01/2017 05:32 PM, Rik Kabel wrote:
> On 2017-04-01 00:10, Todd DeVries wrote:
>> Thanks for your assistance.  Was unaware of using the setupheads
>> command incorrectly.  Good information to have.  I am still not
>> able to produce an automatic period (.) at the end of the section
>> title using the after keyword.  is this correct?
> 
> Seems to be. While before= is honored, after= is not. This looks like an 
> inconsistency that can be addressed.

Hi Todd,

this will give the output you like:

\setuppapersize[letter]
\setuptagging[state=start]
\setuphead[subsection][style=\bf, number=no, commandafter={.~},
 textdistance=0cm, alternative=text]
\starttext
\startsubsection[title=First Subsection]
\input knuth
\stopsubsection
\stoptext

>>> alternative=text is working, but \startparagraph is starting a
>>> new paragraph after the heading.  \start\stopparagraph is not
>>> happy with the text alternative.
>> I am wondering if this is just not going to work with the tagging
>> subsystem.  The subsection aligns if I remove the start/stop
>> paragraph following the heading.  But if I add a second paragraph
>> in that subsection it breaks again.
> 
> Example, please. I have no problem adding a start/stopparagraph after 
> your knuth. (Note that the knuth has to be terminated in a \par or a 
> blank line. That is because of the construction of that input file.)

Add a sample, otherwise we might speculate about what you’re aiming at.

Tagging PDFs the way you seem to be trying might be impossible. Here is
my sample:

\setuppapersize[letter]
\setuptagging[state=start]
\starttext
\startsubsection[title=First Subsection]
\startparagraph a\stopparagraph
\startparagraph b\stopparagraph
\startparagraph c\stopparagraph
\stopsubsection
\stoptext

Both paragraphs and headings are block elements (I have just checked it
at
https://wwwimages2.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf#page=585).
Block elements cannot contain other block elements inside.

Displaying block elements as inline elements, if not contradictory,
might be misleading, at least.

>> I use tagged pdfs for output
>> because they are more accessible with my screen reader.  Without
>> tagging, all one gets is long blocks of undifferentiated text.
>> With the correct tags, paragraphs, headings, lists, and tables
>> get created that make more sense with auditory output.  To my
>> knowledge, ConTeXt is the only alternative for producing
>> accessible pdfs beyond working with Acrobat pro or MS.  Word.
>> After writing a 70-page academic project in Word, I'm seeking
>> alternatives!

This is an issue about text structure. We speak of block elements
because they have vertical space between them (even if set to none).

>> Perhaps one can just use in-paragraph bolding and mark that text
>> for the table of contents as an alternative.  This is required
>> for heading level 3 content in APA style.
> 
> For now that might be best as long as you do not need to reference them 
> in a table of contents (not required by APA, as I read the standard, 
> although perhaps an added requirement from your publisher).

It seems that H3 should be a block element, not an inline element inside
P (according to most XML implementations, I’d say).

Why do you need in-line titles?

But I may be missing something, correct me if I’m wrong.

Sorry for the bad news,

Pablo
-- 
http://www.ousia.tk
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Aligning subsection head with following paragraph in tagged pdf output

2017-04-01 Thread Rik Kabel

On 2017-04-01 00:10, Todd DeVries wrote:

Thanks for your assistance.  Was unaware of using the setupheads
command incorrectly.  Good information to have.  I am still not
able to produce an automatic period (.) at the end of the section
title using the after keyword.  is this correct?


Seems to be. While before= is honored, after= is not. This looks like an 
inconsistency that can be addressed.




On Friday, March 31, 2017, 7:01:28 PM, Rik writes:


alternative=text is working, but \startparagraph is starting a
new paragraph after the heading.  \start\stopparagraph is not
happy with the text alternative.

I am wondering if this is just not going to work with the tagging
subsystem.  The subsection aligns if I remove the start/stop
paragraph following the heading.  But if I add a second paragraph
in that subsection it breaks again.


Example, please. I have no problem adding a start/stopparagraph after 
your knuth. (Note that the knuth has to be terminated in a \par or a 
blank line. That is because of the construction of that input file.)



I use tagged pdfs for output
because they are more accessible with my screen reader.  Without
tagging, all one gets is long blocks of undifferentiated text.
With the correct tags, paragraphs, headings, lists, and tables
get created that make more sense with auditory output.  To my
knowledge, ConTeXt is the only alternative for producing
accessible pdfs beyond working with Acrobat pro or MS.  Word.
After writing a 70-page academic project in Word, I'm seeking
alternatives!

Perhaps one can just use in-paragraph bolding and mark that text
for the table of contents as an alternative.  This is required
for heading level 3 content in APA style.


For now that might be best as long as you do not need to reference them 
in a table of contents (not required by APA, as I read the standard, 
although perhaps an added requirement from your publisher).



Thanks for your assistance.  I'm a newbie and appreciate the
help.

Todd


--
Rik
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Aligning subsection head with following paragraph in tagged pdf output

2017-03-31 Thread Todd DeVries
Thanks for your assistance.  Was unaware of using the setupheads
command incorrectly.  Good information to have.  I am still not
able to produce an automatic period (.) at the end of the section
title using the after keyword.  is this correct?

On Friday, March 31, 2017, 7:01:28 PM, Rik writes:

> alternative=text is working, but \startparagraph is starting a
> new paragraph after the heading.  \start\stopparagraph is not
> happy with the text alternative.

I am wondering if this is just not going to work with the tagging
subsystem.  The subsection aligns if I remove the start/stop
paragraph following the heading.  But if I add a second paragraph
in that subsection it breaks again.  I use tagged pdfs for output
because they are more accessible with my screen reader.  Without
tagging, all one gets is long blocks of undifferentiated text.
With the correct tags, paragraphs, headings, lists, and tables
get created that make more sense with auditory output.  To my
knowledge, ConTeXt is the only alternative for producing
accessible pdfs beyond working with Acrobat pro or MS.  Word.
After writing a 70-page academic project in Word, I'm seeking
alternatives!

Perhaps one can just use in-paragraph bolding and mark that text
for the table of contents as an alternative.  This is required
for heading level 3 content in APA style.

Thanks for your assistance.  I'm a newbie and appreciate the
help.

Todd

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Aligning subsection head with following paragraph in tagged pdf output

2017-03-31 Thread Rik Kabel

On 2017-03-31 19:05, Todd DeVries wrote:

Hello,

I would like to align a subsection heading with the following
paragraph. For example:

Subsectiontext. The data presented in this section will ...

What I get is:

Subsection Text

The data presented in this section will ...

What recipe should be used with the \setupheads command to produce this
output?  I've tried several variations including the snippit below.

\setuppapersize[letter][letter]
\setuptagging[state=start]
\setupheads[subsection][style=\bf, number=no, after={. }, alternative=text]
\starttext
\startsection[reference=sec:deep, title=Deep Thoughts
\startparagraph
Oh Hum, its too windy to play out side, so perhaps I'll write a while...
\startsubsection[reference=first, title=First Subsection]
   \startparagraph
 \input knuth
   \stopparagraph
\stopsubsection
\stopsection
\stoptext

First, add a closing ] to \startsubsection...

Then remove the \startparagraph following it, and the \stopparagraph 
after knuth. alternative=text is working, but \startparagraph is 
starting a new paragraph after the heading. \start\stopparagraph is not 
happy with the text alternative.


You should also add a \stopparagraph after the Oh Hum line.

 Then change \setupheads to \setuphead. \setupheads should have only 
one []. That [] contains key/value option pairs that apply to all 
heading levels. \setuphead[sectionlevel][] is used to provide key/value 
option pairs for sectionlevel headings (and for lower-level heads for 
inherited options).


--
Rik
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Aligning subsection head with following paragraph in tagged pdf output

2017-03-31 Thread Todd DeVries
Hello,

I would like to align a subsection heading with the following
paragraph. For example:

Subsectiontext. The data presented in this section will ...

What I get is:

Subsection Text

The data presented in this section will ...

What recipe should be used with the \setupheads command to produce this
output?  I've tried several variations including the snippit below.

\setuppapersize[letter][letter]
\setuptagging[state=start]
\setupheads[subsection][style=\bf, number=no, after={. }, alternative=text]
\starttext
\startsection[reference=sec:deep, title=Deep Thoughts
\startparagraph
Oh Hum, its too windy to play out side, so perhaps I'll write a while...
\startsubsection[reference=first, title=First Subsection]
  \startparagraph
\input knuth
  \stopparagraph
\stopsubsection
\stopsection
\stoptext
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___