Re: [NTG-context] End Notes and Minimals

2008-11-27 Thread Bart C. Wise
On Thursday 27 November 2008 14:00, Wolfgang Schuster wrote:
> Am 27.11.2008 um 21:43 schrieb Bart C. Wise:
> > Thanks Wolfgang.
> >
> > I looked at Taco's diff file and changed the routines in syst-lua.lua.
> > However, I followed you're lead and changed core-job.lua and it
> > works!  Yes
> > the footnotes come out.
> >
> > New problem (also happens on MkII), if there are a lot of end notes,
> > instead
> > of going to the next page after the first page is filled, they go to
> > the
> > bottom of the first page and dissappear off the bottom.  The page
> > count
> > appears to be correct, but the notes are the second page.
>
> Do you know if this is font dependent, I had a similiar problem with
> footnotes
> and Garamond not so long ago (also MkII and MkIV).
>
> > How to I get the footnotes (end notes) to appear on more than one
> > page.  I'm
> > using footnote/placefootnotes combination to product the end notes.
> >
> > Help!
>
> Example!!!
>

Yes, I should have given an example.  I tried a test program and it worked 
just fine.  So I'll take my current project and attempt to reduce it down to 
something simple.  It's probably something I'm doing wrong.  I'll start a new 
thread if I can't figure it out.

Thanks to Hans, Taco and Wolfgang for helping with the issue.

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


Re: [NTG-context] End Notes and Minimals

2008-11-27 Thread Wolfgang Schuster

Am 27.11.2008 um 21:43 schrieb Bart C. Wise:

> Thanks Wolfgang.
>
> I looked at Taco's diff file and changed the routines in syst-lua.lua.
> However, I followed you're lead and changed core-job.lua and it  
> works!  Yes
> the footnotes come out.
>
> New problem (also happens on MkII), if there are a lot of end notes,  
> instead
> of going to the next page after the first page is filled, they go to  
> the
> bottom of the first page and dissappear off the bottom.  The page  
> count
> appears to be correct, but the notes are the second page.

Do you know if this is font dependent, I had a similiar problem with  
footnotes
and Garamond not so long ago (also MkII and MkIV).

> How to I get the footnotes (end notes) to appear on more than one  
> page.  I'm
> using footnote/placefootnotes combination to product the end notes.
>
> Help!

Example!!!

Wolfgang

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


Re: [NTG-context] End Notes and Minimals

2008-11-27 Thread Bart C. Wise
Thanks Wolfgang.

I looked at Taco's diff file and changed the routines in syst-lua.lua.  
However, I followed you're lead and changed core-job.lua and it works!  Yes 
the footnotes come out.

New problem (also happens on MkII), if there are a lot of end notes, instead 
of going to the next page after the first page is filled, they go to the 
bottom of the first page and dissappear off the bottom.  The page count 
appears to be correct, but the notes are the second page.

How to I get the footnotes (end notes) to appear on more than one page.  I'm 
using footnote/placefootnotes combination to product the end notes.

Help!

Bart

On Thursday 27 November 2008 13:04, Wolfgang Schuster wrote:
> Am 27.11.2008 um 20:44 schrieb Bart C. Wise:
> > Hans,
> >
> > I tried the changes, but now footnotes do not appear at all!
> >
> > Here's a copy of the code that I used (combining both Hans' and
> > Taco's changes
> > -- although I tried several variants).
> >
> > local s = lpeg.Ct(lpeg.splitat(","))
> > local h = { }
> >
> > function commands.doifcommonelse(a,b)
> >local ha = h[a]
> >local hb = h[b]
> >if not ha then ha = {s:match(a)} h[a] = ha end
> >if not hb then hb = {s:match(b)} h[b] = hb end
> >for i=1,#ha do
> >for j=1,#hb do
> >if ha[i] == hb[j] then
> >return cs.testcase(true)
> >end
> >end
> >end
> >return cs.testcase(false)
> > end
> >
> > function commands.doifinsetelse(a,b)
> >local hb = h[b]
> >if not hb then hb = {s:match(b)} h[b] = hb end
> >for i=1,#hb do
> >if a == hb[i] then
> >return cs.testcase(true)
> >end
> >end
> >return cs.testcase(false)
> > end
> >
> > Ideas?
>
> You should tell us what you have done, I replaced the old function
> in core-job.lua with the new from Hans and I get endnotes with your
> test file.
>
> Wolfgang
>
> ___
> 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
> ___
>
___
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
___


Re: [NTG-context] End Notes and Minimals

2008-11-27 Thread Wolfgang Schuster

Am 27.11.2008 um 20:44 schrieb Bart C. Wise:

> Hans,
>
> I tried the changes, but now footnotes do not appear at all!
>
> Here's a copy of the code that I used (combining both Hans' and  
> Taco's changes
> -- although I tried several variants).
>
> local s = lpeg.Ct(lpeg.splitat(","))
> local h = { }
>
> function commands.doifcommonelse(a,b)
>local ha = h[a]
>local hb = h[b]
>if not ha then ha = {s:match(a)} h[a] = ha end
>if not hb then hb = {s:match(b)} h[b] = hb end
>for i=1,#ha do
>for j=1,#hb do
>if ha[i] == hb[j] then
>return cs.testcase(true)
>end
>end
>end
>return cs.testcase(false)
> end
>
> function commands.doifinsetelse(a,b)
>local hb = h[b]
>if not hb then hb = {s:match(b)} h[b] = hb end
>for i=1,#hb do
>if a == hb[i] then
>return cs.testcase(true)
>end
>end
>return cs.testcase(false)
> end
>
> Ideas?

You should tell us what you have done, I replaced the old function
in core-job.lua with the new from Hans and I get endnotes with your
test file.

Wolfgang

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


Re: [NTG-context] End Notes and Minimals

2008-11-27 Thread Bart C. Wise
Hans,

I tried the changes, but now footnotes do not appear at all!

Here's a copy of the code that I used (combining both Hans' and Taco's changes 
-- although I tried several variants).

local s = lpeg.Ct(lpeg.splitat(","))
local h = { }

function commands.doifcommonelse(a,b)
local ha = h[a]
local hb = h[b]
if not ha then ha = {s:match(a)} h[a] = ha end
if not hb then hb = {s:match(b)} h[b] = hb end
for i=1,#ha do
for j=1,#hb do
if ha[i] == hb[j] then
return cs.testcase(true)
end
end
end
return cs.testcase(false)
end

function commands.doifinsetelse(a,b)
local hb = h[b]
if not hb then hb = {s:match(b)} h[b] = hb end
for i=1,#hb do
if a == hb[i] then
return cs.testcase(true)
end
end
return cs.testcase(false)
end

Ideas?

Thanks,
Bart
On Thursday 27 November 2008 03:17, Hans Hagen wrote:
> local s = lpeg.Ct(lpeg.splitat(","))
> local h = { }
>
> function commands.doifcommonelse(a,b)
>      local ha = h[a]
>      local hb = h[b]
>      if not ha then ha = s:match(a) h[a] = ha end
>      if not hb then hb = s:match(b) h[b] = hb end
>      for i=1,#ha do
>          for j=1,#hb do
>              if ha[i] == hb[j] then
>                  return cs.testcase(true)
>              end
>          end
>      end
>      return cs.testcase(false)
> end
>
> function commands.doifinsetelse(a,b)
>      local hb = h[b]
>      if not hb then hb = s:match(b) h[b] = hb end
>      for i=1,#hb do
>          if a == hb[i] then
>              return cs.testcase(true)
>          end
>      end
>      return cs.testcase(false)
> end
___
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
___


Re: [NTG-context] End Notes and Minimals

2008-11-27 Thread Hans Hagen
Taco Hoekwater wrote:
> 
> Bart C. Wise wrote:
>> Hans,
>>
>> What's the chances on getting this fixed?  
> 
> This is the bug:
> 
> --- syst-lua.lua.orig   2008-11-27 10:39:58.396303891 +0100
> +++ syst-lua.lua2008-11-27 10:40:02.063303374 +0100
> @@ -46,8 +46,8 @@
>  function commands.doifcommonelse(a,b)
>  local ha = h[a]
>  local hb = h[b]
> -if not ha then ha = s:match(a) h[a] = ha end
> -if not hb then hb = s:match(b) h[b] = hb end
> +if not ha then ha = {s:match(a)} h[a] = ha end
> +if not hb then hb = {s:match(b)} h[b] = hb end
>  for i=1,#ha do
>  for j=1,#hb do
>  if ha[i] == hb[i] then
   ^
 also wrong

sorry for not testing this better


local s = lpeg.Ct(lpeg.splitat(","))
local h = { }

function commands.doifcommonelse(a,b)
 local ha = h[a]
 local hb = h[b]
 if not ha then ha = s:match(a) h[a] = ha end
 if not hb then hb = s:match(b) h[b] = hb end
 for i=1,#ha do
 for j=1,#hb do
 if ha[i] == hb[j] then
 return cs.testcase(true)
 end
 end
 end
 return cs.testcase(false)
end

function commands.doifinsetelse(a,b)
 local hb = h[b]
 if not hb then hb = s:match(b) h[b] = hb end
 for i=1,#hb do
 if a == hb[i] then
 return cs.testcase(true)
 end
 end
 return cs.testcase(false)
end



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


Re: [NTG-context] End Notes and Minimals

2008-11-27 Thread Taco Hoekwater


Bart C. Wise wrote:
> Hans,
> 
> What's the chances on getting this fixed?  

This is the bug:

--- syst-lua.lua.orig   2008-11-27 10:39:58.396303891 +0100
+++ syst-lua.lua2008-11-27 10:40:02.063303374 +0100
@@ -46,8 +46,8 @@
 function commands.doifcommonelse(a,b)
 local ha = h[a]
 local hb = h[b]
-if not ha then ha = s:match(a) h[a] = ha end
-if not hb then hb = s:match(b) h[b] = hb end
+if not ha then ha = {s:match(a)} h[a] = ha end
+if not hb then hb = {s:match(b)} h[b] = hb end
 for i=1,#ha do
 for j=1,#hb do
 if ha[i] == hb[i] then

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


Re: [NTG-context] End Notes and Minimals

2008-11-26 Thread Bart C. Wise
Hans,

What's the chances on getting this fixed?  Or is there a stable branch 
somewhere that I can grab?

Thanks!
Bart

On Tuesday 25 November 2008 11:47:38 am Wolfgang Schuster wrote:
> Am 25.11.2008 um 19:39 schrieb Bart C. Wise:
> > Below are four different ways I've tried to get endnotes to work.
> > When I
> > compile with "texexec" it work fine --- I get endnotes.  However,
> > when I
> > compile with "texexec --lua" the footnotes are placed on the page
> > where they
> > are referenced.  I would prefer to have the footnote/placefootnotes
> > work so
> > that I can easily change the output.  Any ideas?
> >
> > *** #1
> > \setupfootnotes[location=none]
> > \starttext
> > \dorecurse{100}{test \footnote{eee}\endgraf}
> > \page
> > \placefootnotes[location=none]
> > \stoptext
> >
> > *** #2
> > \setupfootnotes[location=none]
> > \starttext
> > \dorecurse{100}{test \footnote{eee}\endgraf}
> > \page
> > \placefootnotes
> > \stoptext
> >
> > *** #3
> > \setupnote[endnote][location=none]
> > \starttext
> > \dorecurse{100}{test \endnote{eee}\endgraf}
> > \page
> > \placenotes[endnote]
> > \stoptext
> >
> > *** #4
> > \starttext
> > \dorecurse{6}{ \input tufte \endnote{\input knuth\relax} }
> > \page
> > \placenotes[endnote]
> > \stoptext
>
> It's a bug in the \expdoifcommonelse macro used in MkIV,
> it evaluates always the true value and you get footnotes.
>
> Here is a example for Hans:
>
> \starttext
>
> \doifcommonelse{text,page}{none}
>{true}
>{false}
>
> \expdoifcommonelse{text,page}{none}
>{true}
>{false}
>
> \stoptext
>
> Wolfgang
>
> ___
> 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
> ___
>

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


Re: [NTG-context] End Notes and Minimals

2008-11-25 Thread Wolfgang Schuster

Am 25.11.2008 um 19:39 schrieb Bart C. Wise:

> Below are four different ways I've tried to get endnotes to work.   
> When I
> compile with "texexec" it work fine --- I get endnotes.  However,  
> when I
> compile with "texexec --lua" the footnotes are placed on the page  
> where they
> are referenced.  I would prefer to have the footnote/placefootnotes  
> work so
> that I can easily change the output.  Any ideas?
>
> *** #1
> \setupfootnotes[location=none]
> \starttext
> \dorecurse{100}{test \footnote{eee}\endgraf}
> \page
> \placefootnotes[location=none]
> \stoptext
>
> *** #2
> \setupfootnotes[location=none]
> \starttext
> \dorecurse{100}{test \footnote{eee}\endgraf}
> \page
> \placefootnotes
> \stoptext
>
> *** #3
> \setupnote[endnote][location=none]
> \starttext
> \dorecurse{100}{test \endnote{eee}\endgraf}
> \page
> \placenotes[endnote]
> \stoptext
>
> *** #4
> \starttext
> \dorecurse{6}{ \input tufte \endnote{\input knuth\relax} }
> \page
> \placenotes[endnote]
> \stoptext

It's a bug in the \expdoifcommonelse macro used in MkIV,
it evaluates always the true value and you get footnotes.

Here is a example for Hans:

\starttext

\doifcommonelse{text,page}{none}
   {true}
   {false}

\expdoifcommonelse{text,page}{none}
   {true}
   {false}

\stoptext

Wolfgang

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


Re: [NTG-context] End Notes and Minimals

2008-11-25 Thread Bart C. Wise
Below are four different ways I've tried to get endnotes to work.  When I 
compile with "texexec" it work fine --- I get endnotes.  However, when I 
compile with "texexec --lua" the footnotes are placed on the page where they 
are referenced.  I would prefer to have the footnote/placefootnotes work so 
that I can easily change the output.  Any ideas?

*** #1
\setupfootnotes[location=none]
\starttext
\dorecurse{100}{test \footnote{eee}\endgraf}
\page   
\placefootnotes[location=none]  
\stoptext

*** #2
\setupfootnotes[location=none]
\starttext
\dorecurse{100}{test \footnote{eee}\endgraf}
\page
\placefootnotes
\stoptext

*** #3
\setupnote[endnote][location=none]   
\starttext   
\dorecurse{100}{test \endnote{eee}\endgraf}  
\page
\placenotes[endnote] 
\stoptext

*** #4
\starttext
\dorecurse{6}{ \input tufte \endnote{\input knuth\relax} }
\page
\placenotes[endnote]
\stoptext


Help!!
Bart

On Tuesday 25 November 2008 06:57:58 am Bart C. Wise wrote:
> I've tried several things to get end notes working with the Minimals
> distribution (MkIV).  However, nothing seems to work and what worked for
> MkII does not work now.  Is there a new method for getting end notes in
> MkIV?
>
> Thank,
> Bart
> ___
> 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
> ___
>

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


[NTG-context] End Notes and Minimals

2008-11-25 Thread Bart C. Wise
I've tried several things to get end notes working with the Minimals 
distribution (MkIV).  However, nothing seems to work and what worked for MkII 
does not work now.  Is there a new method for getting end notes in MkIV?

Thank,
Bart
___
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
___