ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* List of Formulas
@ 2006-05-09 18:59 nico
  2006-05-09 21:38 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: nico @ 2006-05-09 18:59 UTC (permalink / raw)


Hello,

Is it possible to display a list of the numbered formulas (done with  
\placeformula)? I tried \placelist[formula] without success.

Regards,
BG

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: List of Formulas
  2006-05-09 18:59 List of Formulas nico
@ 2006-05-09 21:38 ` Hans Hagen
  2006-05-09 22:15   ` nico
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2006-05-09 21:38 UTC (permalink / raw)


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? 

\defineblock[formula]

\starttext

\beginformula
\placeformula
\startformula
a = 1
\stopformula
\endformula

\startformula
a = 2
\stopformula

\beginformula
\placeformula
\startformula
a = 3
\stopformula
\endformula

\page

\resetnumber[formula]

\useblocks[formula]

\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
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: List of Formulas
  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
  0 siblings, 2 replies; 5+ messages in thread
From: nico @ 2006-05-09 22:15 UTC (permalink / raw)


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].

Regards,
BG

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: List of Formulas
  2006-05-09 22:15   ` nico
@ 2006-05-10  7:08     ` Hans Hagen
  2006-05-10  7:28     ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2006-05-10  7:08 UTC (permalink / raw)


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].
>   
but formulas don't have 'names' so what does such al list look like? 

it should not be too hard to add a feature of named formulas combined with a regular list

Hans 


-----------------------------------------------------------------
                                          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
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: List of Formulas
  2006-05-09 22:15   ` nico
  2006-05-10  7:08     ` Hans Hagen
@ 2006-05-10  7:28     ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2006-05-10  7:28 UTC (permalink / raw)


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
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-05-10  7:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-09 18:59 List of Formulas 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 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).