ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* buffer error
@ 2007-02-16 15:32 Idris Samawi Hamid
  2007-02-16 15:57 ` Aditya Mahajan
  2007-02-16 16:19 ` Hans Hagen
  0 siblings, 2 replies; 6+ messages in thread
From: Idris Samawi Hamid @ 2007-02-16 15:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi gang,

Here is something strange:

========================================
\definenote[metanote][conversion=set 2]

\startbuffer[footnote]

test test test test test test test test
     \footnote{This is a basic footnote.
         \metanote{This is a footnote to a footnote.}}
test test test test test test test test
     \footnote{This is another basic footnote.
         \metanote{This is another footnote to a footnote.}}
test test test test test test test test test test test test test.
\stoplinenumbering%
\stopbuffer

{\typebuffer[footnote] \getbuffer[footnote]} \page
========================================

works, but

========================================
\startbuffer[footnote]

\definenote[metanote][conversion=set 2]

test test test test test test test test
     \footnote{This is a basic footnote.
         \metanote{This is a footnote to a footnote.}}
test test test test test test test test
     \footnote{This is another basic footnote.
         \metanote{This is another footnote to a footnote.}}
test test test test test test test test test test test test test.
\stoplinenumbering%
\stopbuffer

{\typebuffer[footnote] \getbuffer[footnote]} \page
========================================

will not compile:

==================
! Missing number, treated as zero.
<to be read again>
                    \@@vnmetanoten
\dochecknote ...\relax \ifnum \noteparameter \c!n
                                                   =\zerocount  
\settextnotes ...

\dodoflushnotes ...zeropoint \bgroup \dochecknote
                                                   \ifendnotes \else  
\scratch...

\next1 #1,->\doprocessnotes {\dodoflushnotes }{#1}
                                                   \doprocesscommaitem
\doprocesscommalist ...item \gobbleoneargument #1,
                                                   ]\relax \global \advance  
\...

\doflushnotes ...rt \processnotes \dodoflushnotes
                                                   \global \setfalse  
\postpon...
...
l.56

?
==================

workaround

============================================
\definenote[metanote][conversion=set 2]

\startbuffer[footnote]

\definenote[metanote][conversion=set 2]

test test test test test test test test
     \footnote{This is a basic footnote.
         \metanote{This is a footnote to a footnote.}}
test test test test test test test test
     \footnote{This is another basic footnote.
         \metanote{This is another footnote to a footnote.}}
test test test test test test test test test test test test test.
\stoplinenumbering%
\stopbuffer

{\typebuffer[footnote] \getbuffer[footnote]} \page
============================================

Best
Idris

-- 
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

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

* Re: buffer error
  2007-02-16 15:32 buffer error Idris Samawi Hamid
@ 2007-02-16 15:57 ` Aditya Mahajan
  2007-02-16 16:34   ` Hans Hagen
  2007-02-16 16:41   ` Idris Samawi Hamid
  2007-02-16 16:19 ` Hans Hagen
  1 sibling, 2 replies; 6+ messages in thread
From: Aditya Mahajan @ 2007-02-16 15:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, 16 Feb 2007, Idris Samawi Hamid wrote:

> Hi gang,
>
> Here is something strange:
>
> [snip]
>
> will not compile:
>
> ==================
> ! Missing number, treated as zero.
> <to be read again>
>                    \@@vnmetanoten
> \dochecknote ...\relax \ifnum \noteparameter \c!n
>                                                   =\zerocount
> \settextnotes ...
>
> \dodoflushnotes ...zeropoint \bgroup \dochecknote
>                                                   \ifendnotes \else
> \scratch...
>
> \next1 #1,->\doprocessnotes {\dodoflushnotes }{#1}
>                                                   \doprocesscommaitem
> \doprocesscommalist ...item \gobbleoneargument #1,
>                                                   ]\relax \global \advance
> \...
>
> \doflushnotes ...rt \processnotes \dodoflushnotes
>                                                   \global \setfalse
> \postpon...
> ...
> l.56

Well, a simple minimal example

\starttext

{ \definenote[metanote][conversion=set 2]
   Test\metanote{test}
}

\stoptext

Since the note is defined in a group, its meaning is lost when you go 
out of the group. But the note in actually inserted at the end of the 
current-page, by which time, tex has no idea of counter of the note, 
hence the error.

I am not sure if this is the "correct" behaviour or should definenote 
should change to make sure that something like this works. I tend to 
think that this is the correct behaviour. Do you really need to define 
the note inside a group?

(In your example the group is being created by the braces in 
{\typebuffer \getbuffer})


Aditya

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

* Re: buffer error
  2007-02-16 15:32 buffer error Idris Samawi Hamid
  2007-02-16 15:57 ` Aditya Mahajan
@ 2007-02-16 16:19 ` Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2007-02-16 16:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Idris Samawi Hamid wrote:
> Hi gang,
>
> Here is something strange:
>
> ========================================
> \definenote[metanote][conversion=set 2]
>
> \startbuffer[footnote]
>
> test test test test test test test test
>      \footnote{This is a basic footnote.
>          \metanote{This is a footnote to a footnote.}}
> test test test test test test test test
>      \footnote{This is another basic footnote.
>          \metanote{This is another footnote to a footnote.}}
> test test test test test test test test test test test test test.
> \stoplinenumbering%
> \stopbuffer
>
> {\typebuffer[footnote] \getbuffer[footnote]} \page
> ========================================
>
> works, but
>
> ========================================
> \startbuffer[footnote]
>
> \definenote[metanote][conversion=set 2]
>
> test test test test test test test test
>      \footnote{This is a basic footnote.
>          \metanote{This is a footnote to a footnote.}}
> test test test test test test test test
>      \footnote{This is another basic footnote.
>          \metanote{This is another footnote to a footnote.}}
> test test test test test test test test test test test test test.
> \stoplinenumbering%
> \stopbuffer
>
> {\typebuffer[footnote] \getbuffer[footnote]} \page
>   
you need to define the footnote at the outer level and not grouped otherwise it's invisible in the OTR 

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] 6+ messages in thread

* Re: buffer error
  2007-02-16 15:57 ` Aditya Mahajan
@ 2007-02-16 16:34   ` Hans Hagen
  2007-02-16 16:41   ` Idris Samawi Hamid
  1 sibling, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2007-02-16 16:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Aditya Mahajan wrote:
>
> I am not sure if this is the "correct" behaviour or should definenote 
> should change to make sure that something like this works. I tend to 
> think that this is the correct behaviour. Do you really need to define 
> the note inside a group?
>   
it's correct behaviour; document features (such as footnotes) should be 
defined in the preamble

it's kind of tricky to globalize it because it would mean that we have 
to make sure that all related things are global as well, which 
mayinterfere with local style adaptions etc

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] 6+ messages in thread

* Re: buffer error
  2007-02-16 15:57 ` Aditya Mahajan
  2007-02-16 16:34   ` Hans Hagen
@ 2007-02-16 16:41   ` Idris Samawi Hamid
  2007-02-16 16:45     ` Idris Samawi Hamid
  1 sibling, 1 reply; 6+ messages in thread
From: Idris Samawi Hamid @ 2007-02-16 16:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

On Fri, 16 Feb 2007 08:57:19 -0700, Aditya Mahajan <adityam@umich.edu>  
wrote:

> I tend to
> think that this is the correct behaviour. Do you really need to define
> the note inside a group?

Not really, I was just trying to avoid redundancy (putting the definition  
in the buffer is for pedagogical purposes only)

Thank you!

Idris

-- 
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

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

* Re: buffer error
  2007-02-16 16:41   ` Idris Samawi Hamid
@ 2007-02-16 16:45     ` Idris Samawi Hamid
  0 siblings, 0 replies; 6+ messages in thread
From: Idris Samawi Hamid @ 2007-02-16 16:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, 16 Feb 2007 09:41:13 -0700, Idris Samawi Hamid  
<ishamid@colostate.edu> wrote:

> Hi,
>
> On Fri, 16 Feb 2007 08:57:19 -0700, Aditya Mahajan <adityam@umich.edu>  
> wrote:
>
>> I tend to
>> think that this is the correct behaviour. Do you really need to define
>> the note inside a group?
>
> Not really, I was just trying to avoid redundancy (putting the  
> definition in the buffer is for pedagogical purposes only)

Sorry, I misunderstood; by 'group' you meant the type-get buffer group. I  
think that allows me to use the same buffer name for a series of examples  
(I ripped this method off of some examples from Hans).

Idris

-- 
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

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

end of thread, other threads:[~2007-02-16 16:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-16 15:32 buffer error Idris Samawi Hamid
2007-02-16 15:57 ` Aditya Mahajan
2007-02-16 16:34   ` Hans Hagen
2007-02-16 16:41   ` Idris Samawi Hamid
2007-02-16 16:45     ` Idris Samawi Hamid
2007-02-16 16:19 ` 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).