On Sat, 05 Aug 2017 14:08:28 -0600, Idris Samawi Hamid ادريس سماوي حامد <idris.ha...@colostate.edu> wrote:

[Sent this a couple of days ago, maybe will get some takers this time -)]

Dear syndicate,

Not sure if there is a canonical way to do numbered paragraphs. In the
following, I use subsections to mimic numbered paragraphs:

=======section-intext.tex=======
\setuphead[section][style=\bfa,after={\blank[big]},before={\blank[big,medium]},color=walayahblue]
\setuphead[subsection][style=\bf,after={\blank[big]},before={\blank[big,medium]},color=walayahgreen,alternative=text,distance=0.28em]
\setuphead[subsubsection][style=\tf,after={\blank[big]},before={\blank[big,medium]},color=walayahred,alternative=text,distance=0.28em]

\starttext
\startsection[title=Section 1]
\startsubsection
\input ward
\stopsubsection

\startsubsection[title=Paragraph 2]
\input ward
\stopsubsection

\startsubsection
\startparagraph
\input ward
\stopparagraph
\stopsubsection
\stopsection
\stoptext
==============

See attached output.

In paragraphs 1 and 2, there is too much distance between the subsection
number (subsection number + title in paragraph 2) and between the text.
The distance parameter is not appropriate here, it is the distance *after*
the section head that needs adjustment (even if the text portion of the
head (i.e., the section title) is empty).

Question 1: How do we fix the post-head distance?

The parameter insidesection= helps:

============================
\setupwhitespace[big]

\def\SPACE#1{#1\hskip2em\hbox{}}
\setuphead[section]
   [style=\bf,
    after={\blank[big]},
    before={\blank[big,medium]},
    color=walayahgreen,
    alternative=text,
    insidesection=\hskip-1.2em]
    % textcommand=\SPACE]
\setuphead[subsection]
   [style=\bf,
    after={\blank[big]},
    before={\blank[big,medium]},
    color=walayahgreen,
    alternative=text,
    insidesection=\hskip-1.2em]
\setuphead[subsubsection]
   [style=\bf,
    after={\blank[big]},
    before={\blank[big,medium]},
    color=walayahgreen,
    alternative=text,
    insidesection=\hskip-1.2em]

\define[1]\PARHEAD {{\bf{#1}}}

\starttext
\starttitle[title=Section 1]
\startsection[title=Paragraph 1]
\input ward
\stopsection

\startsection
\PARHEAD{Paragraph 2.} \input ward

\startparagraph
\input ward
\stopparagraph

\startsubsection
\input ward
\startsubsubsection
\input ward
\stopsubsubsection
\stopsubsection
\stopsection

\startsection
\input ward
\startsubsubsection
\input ward
\stopsubsubsection
\stopsection
\stoptitle
\stoptext
============================

Paragraph 1 shows that we cannot use the normal title= mechanism and maintain consistent spacing.

Paragraph 2 does not use the \start|stopparagraph mechanism, but the succeeding non-numbered paragraph does.

CHALLENGES:

1. See the following:

https://www.dropbox.com/s/wckt0zm0zfpx721/numbered-paragraphs-indent.pdf?dl=0

The first numbered paragraph is not indented, but the second onward is. How can we automate this?

2. See attached. Consider the following snippet:

\startsection
\input ward
\startsubsubsection
\input ward
\stopsubsubsection
\stopsection

The paragraph number comes out as 3, but the subsubparagraph as 1. What we want is

3 <par>
3.01 <par>

The '0' indicates that there is no subsection. Here is an example:

https://www.dropbox.com/s/gy3e93x7jqt6ivx/numbered-paragraphs-indent-01.pdf?dl=0

How can we automate this?

Thanks in advance for any guidance and pointers.

Best wishes
Idris

Paragraph three shows that one apparently cannot mix this sectioning
approach with the \start-stopparagraph mechanism.

Question 2: Is there a way to mix \start-stopparagraph with the above
subsection approach to par numbering?

I suppose that as long as I maintain exactly one paragraph per subsection,
then structured output  (xml etc.) should look ok.

Question 3: Is there a wiser way to handle this kind of par numbering in
mkiv?

Thanks in advance!

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

Attachment: section-intext.pdf
Description: Adobe PDF document

___________________________________________________________________________________
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] methods fo... Idris Samawi Hamid ادريس سماوي حامد
    • Re: [NTG-context] m... Idris Samawi Hamid ادريس سماوي حامد
      • Re: [NTG-contex... Idris Samawi Hamid ادريس سماوي حامد
        • Re: [NTG-co... Pablo Rodriguez
          • Re: [NT... Idris Samawi Hamid ادريس سماوي حامد
            • Re... Pablo Rodriguez
              • ... Hans Hagen
                • ... Pablo Rodriguez
                • ... Idris Samawi Hamid ادريس سماوي حامد
                • ... Hans Hagen
                • ... Idris Samawi Hamid ادريس سماوي حامد
                • ... Pablo Rodriguez

Reply via email to