ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Idris Samawi Hamid ادريس سماوي حامد" <ishamid@colostate.edu>
To: "Hans Hagen" <pragma@wxs.nl>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: grouped sections and footnotes
Date: Sat, 16 Aug 2008 16:34:12 -0600	[thread overview]
Message-ID: <op.ufz3nblyfkrasx@your-b27fb1c401> (raw)

Hi Hans,

I am using a module -- non-distributed as far as I know -- created by  
Wolfgang. It provides grouped sectioning and footnotes:

====startstop-t.tex======
\unprotect

\def\????se{@@@@se}

\def\definegroupedsection[#1]%
   {\setvalue{\e!start#1}[##1]%
      {\getparameters[\????se#1][\c!ref=,\c!title=,##1]%
    \getvalue{#1}[\getvalue{\????se#1\c!ref}]{\getvalue{\????se#1\c!title}}}
    \setvalue{\e!stop#1}{\relax}}

\def\definegroupednote[#1]%
   {\edef\currentnote{#1}%
    \def\dostartcurrentnote[##1][##2]{\setnote[##1][##2]\bgroup\ignorespaces}%
    \setvalue{\e!start\currentnote}{\dodoubleempty\dostartcurrentnote[#1]}%
    \setvalue{\e!stop\currentnote}{\removeunwantedspaces\egroup\noteparameter\c!next}}

\definegroupedsection[title]
\definegroupedsection[chapter]
\definegroupedsection[section]
\definegroupedsection[subsection]
\definegroupedsection[subsubsection]
\definegroupednote   [footnote]

\setupfootnotes[next=\autoinsertnextspace]

\protect

\starttext
\starttitle[title=Title]
\stoptitle
\startchapter[title=Chapter]
\startsection[title=Section]
\input knuth
Text
\startfootnote[nabiyy]
A footnote
\stopfootnote
text
\startsubsection[title=Subsection]
Text
\startfootnote
A footnote. See \in{footnote}[nabiyy]
\stopfootnote
text
\startsubsubsection[title=Subsubsection]
Text
\startfootnote
A footnote
\stopfootnote
text
\stopsubsubsection
\stopsubsection
\stopsection
\stopchapter
\stoptext
=========================

Question:

a) Have you added support for grouped sectioning and footnotes in mkiv yet?
b) Does the above code seem safe for mkiv?
c) (For Wolfgang:) Has the above code been updated or extended etc. yet?

For long documents this kind of grouping has become indispensable (easy  
code-folding etc.)

Best wishes
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


             reply	other threads:[~2008-08-16 22:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-16 22:34 Idris Samawi Hamid ادريس سماوي حامد [this message]
2008-08-17 13:22 ` Hans Hagen
2008-08-18 12:31   ` Wolfgang Schuster
2008-08-18 14:01     ` Hans Hagen

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.ufz3nblyfkrasx@your-b27fb1c401 \
    --to=ishamid@colostate.edu \
    --cc=ntg-context@ntg.nl \
    --cc=pragma@wxs.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).