From: "Idris Samawi Hamid ادريس سماوي حامد" <Idris.Hamid@colostate.edu>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: methods for numbered paragraphs (ii)
Date: Sun, 06 Aug 2017 15:08:31 -0600 [thread overview]
Message-ID: <op.y4kichviejo439@desktop-mt1m160> (raw)
In-Reply-To: <b942db12-55b2-9556-e6d6-92b6c5adf376@gmx.es>
[-- Attachment #1: Type: text/plain, Size: 3928 bytes --]
On Sun, 06 Aug 2017 13:39:50 -0600, Pablo Rodriguez <oinos@gmx.es> wrote:
> On 08/06/2017 03:54 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
>> [...]
>> Something along the lines of the following would be a sufficient (and
>> easier) first step for the current project, although we may want to
>> revisit the above for the future:
>>
>> 3 <par> % section
>> 3.0.1 <par> % subsubsection
>>
>> 4 <par> % section
>> 4.1 <par> % subsection
>> 4.1.1 <par> % subsubsection
>>
>> How can we automate this?
>
> Hi Idris,
>
> if you only need a printed version, I think the following approach might
> help:
>
> \setupwhitespace[big]
>
> \setuphead[section]
> [alternative=margintext,
> color=white,
> style=\tfxx,
> before=,
> after=,
> commandafter={\setupparagraphintro[first]
> [{{\bf \getmarking[sectionnumber][current]
> \hspace[big]}}]}]
>
> \setuphead[subsection]
> [commandafter={\setupparagraphintro[first]
> [{{\bf \getmarking[subsectionnumber][current]
> \hspace[big]}}]}]
>
> \setuphead[subsubsection]
> [commandafter={\setupparagraphintro[first]
> [{{\bf \getmarking[subsubsectionnumber][current]
> \hspace[big]}}]}]
>
> \starttext
>
> \dorecurse{3}{\section{}
> \startpar\input ward\stoppar
> \startpar\input ward\stoppar
> \dorecurse{3}{\subsection{}
> \startpar\input ward\stoppar
> \startpar\input ward\stoppar
> \dorecurse{3}{\subsubsection{}
> \startpar\input ward\stoppar
> \startpar\input ward\stoppar
> \startpar\input ward\stoppar}
> \startpar\input ward\stoppar}
> \startpar\input ward\stoppar}
>
> \stoptext
Thank you very much, Pablo. Here is a modified version:
\setupwhitespace[big]
\setuphead[section]
[alternative=margintext,
color=white,
style=\tfxx,
before=,
after=,
commandafter={\setupparagraphintro[first]
[{{\bf \getmarking[sectionnumber][current]
\hspace[big]}}]}]
\setuphead[subsection]
[commandafter={\setupparagraphintro[first]
[{{\bf \getmarking[subsectionnumber][current]
\hspace[big]}}]}]
\setuphead[subsubsection]
[commandafter={\setupparagraphintro[first]
[{{\bf \getmarking[subsubsectionnumber][current]
\hspace[big]}}]}]
\starttext
\starttitle[title=Paper]
\dorecurse{2}{%
\startsection
\startpar\input ward\stoppar
\startparagraph\input ward\stopparagraph
\startsubsubsection{}
\startpar\input ward\stoppar
\stopsubsubsection
\dorecurse{2}{%
\startsubsection
\startpar\input ward\stoppar
\startparagraph\input ward\stopparagraph
\dorecurse{2}{%
\startsubsubsection{}
\startpar\input ward\stoppar
\startparagraph\input ward\stopparagraph
\stopsubsubsection
}
\startparagraph{\bf level 2} \input ward\stopparagraph
\stopsubsection
}
\startparagraph{\bf level 1} \input ward\stopparagraph
\stopsection
}
\stoptitle
\stoptext
Challenges:
1. How can we get automatic indentation for all heads *except* the first
one that occurs after the \starttitle?
2. Look at the output of the adjusted version above - attached. Note that
a subsubsection after a section gives
1.1
2.1
which are the same as those given by a subsection after a section. How can
we get a subsubsection after a section to produce the following?
1.0.1
2.0.1
etc.
Thanks again, Pablo!
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
[-- Attachment #2: numbered-paragraphs-pablo.pdf --]
[-- Type: application/pdf, Size: 21007 bytes --]
[-- Attachment #3: Type: text/plain, Size: 492 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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2017-08-06 21:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-05 20:08 Idris Samawi Hamid ادريس سماوي حامد
2017-08-06 3:28 ` Idris Samawi Hamid ادريس سماوي حامد
2017-08-06 13:54 ` Idris Samawi Hamid ادريس سماوي حامد
2017-08-06 19:39 ` Pablo Rodriguez
2017-08-06 21:08 ` Idris Samawi Hamid ادريس سماوي حامد [this message]
2017-08-07 15:08 ` Pablo Rodriguez
2017-08-07 18:57 ` Hans Hagen
2017-08-07 21:03 ` Pablo Rodriguez
2017-08-07 22:37 ` Idris Samawi Hamid ادريس سماوي حامد
2017-08-08 7:36 ` Hans Hagen
2017-08-08 12:42 ` Idris Samawi Hamid ادريس سماوي حامد
2017-08-08 16:00 ` Pablo Rodriguez
2017-08-08 20:43 ` Pablo Rodriguez
2017-08-09 7:58 ` Hans Hagen
2017-08-06 19:49 ` Pablo Rodriguez
2017-08-06 21:14 ` Idris Samawi Hamid ادريس سماوي حامد
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=op.y4kichviejo439@desktop-mt1m160 \
--to=idris.hamid@colostate.edu \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).