On Jan 3, 2011, at 3:11 PM, Daniel Schopper wrote:

> Dear list,
> this seems a really basic question (and probably not even strictly 
> ConTeXt-focused) - so please accept my apologies…
> 
> I'm trying to construct a macro which first creates two labels in the text 
> (\start/stopline and \pagereference) with the value of a counter as the label 
> name and then a footnote which prints the page and line numbers of those two. 
> Supposedly because of my limited understanding of TeX's expansion mechanism I 
> haven't been able to get things working with this code:
> 
> \setuplinenumbering[%
>       location=inner,
>       step=5,
>        method=page,
>        style=\tfxx,
>        align=left,
>        distance=1.5cm,
>        width=0.3cm]
> \setupfootnotes[
>       location=text,
>       numberconversion=empty,
>       paragraph=yes,
>       ]
> \definenumber[entrycounter]
> \setnumber[entrycounter]{0}
> \def\appentry#1#2{%
>       \startline[line:\getnumber[entrycounter]]%
>       \pagereference[page:\getnumber[entrycounter]]%
>       #1%
>       \stopline[line:\getnumber[entrycounter]]%
>       \footnote{{\bf \at[page:\getnumber[entrycounter]]}%
>       \inline[line:\getnumber[entrycounter]] #1] #2}%
>       \incrementnumber[entrycounter]%
> }
> 
> By now I tried to adapt a LaTeX-only-solution which Uwe Lueck suggested on 
> the texhax-mailinglist some years ago (cf. 
> http://tug.org/pipermail/texhax/2006-July/006599.html) but failed quite 
> miserably.
> I also tried the same with plain TeX registers (\newcount\entrycounter 
> \entrycounter=0 etc.) instead of ConTeXt counters.
> Could it be easier to stuff the \pagereference and \startline-commands into 
> before= and after= of setupfootnotes?
> Could anyone please give me a hint on this?
> 
The most important hint: please build test files that will compile. Take out 
anything which isn't relevant to your problem. Knowledgeable people on this 
list are quite unlikely to wade through code snippets. This page 
http://www.minimalbeispiel.de/mini-en.html is somewhat biased towards LaTeX, 
but you should get the drift.

> The purpose of this: I'm trying to use mkIV's page and linenumbering 
> facilities for a critical apparatus (in this case endnotes with page and line 
> references). As I didn't succeed with Hans Hagen's recent suggestion (cf. 
> http://www.mail-archive.com/ntg-context@ntg.nl/msg49695.html)

Again, please provide relevant information. "Didn't work" is not enough 
information - maybe the color of your mousepad isn't quite right, maybe you 
forgot a closing brace, who knows? 

Finally: is the format of your apparatus (endnotes) a requirement? You can try 
and search the mail archive for "linenotes" and have a look at strc-lnt.mkiv. 
This will build one (or more) apparatus at the bottom of the page; I'm not sure 
if those can be selected in endnotes.

Thomas

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to