ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: List of Formulas
Date: Wed, 10 May 2006 09:28:38 +0200	[thread overview]
Message-ID: <44619626.8080801@wxs.nl> (raw)
In-Reply-To: <ops9a1f8jd9niby6@localhost>

nico wrote:
> On Tue, 09 May 2006 23:38:47 +0200, Hans Hagen <pragma@wxs.nl> wrote:
>
>   
>> nico wrote:
>>     
>>> Hello,
>>>
>>> Is it possible to display a list of the numbered formulas (done with
>>> \placeformula)? I tried \placelist[formula] without success.
>>>
>>>       
>> you want to see the formulas too?
>>     
>
> Well, no, i just wanted a list, like a list of tables, figures, or  
> enumerations, with the pages where they appear. But ok, since it is not  
> available by default, i can put each formula in a specific Equation  
> enumeration an then do a \placelist[enumeration:Equation].
>   
well, it takes only a few lines to have lists of formulas; you can then typeset the lists the way you want 


\unprotect

\def\dododoformulanumber#1#2#3#4% 
   \ifconditional\handleformulanumber
     \ifconditional\incrementformulanumber
       \incrementnumber[\v!formula]%
     \fi
     \makesectionnumber[\v!formula]%
     \setbox0\hbox{\ignorespaces#2\unskip}%
     \ifdim\wd0>\zeropoint
       \edef\hetsubnummer{#2}%
     \else
       \let\hetsubnummer\empty
     \fi
     \doifsomething{#1}
{\rawreference{\s!for}{#1}{\composedsectionnumber\hetsubnummer}}%
     \setbox0\hbox{\ignorespaces#4\unskip}%
     \ifdim\wd0>\zeropoint
       \edef\hetsubnummer{#4}%
     \fi
     \doifsomething{#3}
{\rawreference\s!for{#3}{\composedsectionnumber\hetsubnummer}}%
     \rm % nodig ?
     \doif{\formulaparameter\c!location}
\v!right{\hskip\formuladistance}%
     \@@fmnumbercommand
       {\dostartattributes\??fm\c!numberstyle\c!numbercolor
        \strut
        \@@fmleft
        \preparethenumber\??fm\composedsectionnumber\preparednumber
\doflushformulalistentry{\composedsectionnumber\hetsubnummer}%
        \labeltexts\v!formula
          {\ignorespaces\preparednumber
\ignorespaces\hetsubnummer\unskip}%
        \@@fmright
        \dostopattributes}%
      \doif{\formulaparameter\c!location}
\v!left{\hskip\formuladistance}%
   \fi
   \egroup}

% new: 

\definelist[\v!formula]

\global\let\doflushformulalistentry\gobbleoneargument

\def\placenamedformula[#1]#2%
  {\gdef\doflushformulalistentry##1%
     {\expanded{\writetolist[\v!formula]{##1}}{#2}%
      \global\let\doflushformulalistentry\gobbleoneargument}%
   \placeformula[#1]}


\starttext

\placelist[formula][criterium=text]

\placenamedformula[x]{oeps}
\startformula
a = 1
\stopformula

\placeformula
\startformula
a = 2
\stopformula

\placenamedformula[y]{more oeps}
\startformula
a = 3
\stopformula

\stoptext


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

      parent reply	other threads:[~2006-05-10  7:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-09 18:59 nico
2006-05-09 21:38 ` Hans Hagen
2006-05-09 22:15   ` nico
2006-05-10  7:08     ` Hans Hagen
2006-05-10  7:28     ` Hans Hagen [this message]

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=44619626.8080801@wxs.nl \
    --to=pragma@wxs.nl \
    --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).