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] bug in mkii xetex: mp figure is not in the right position

2008-11-27 Thread Aditya Mahajan
On Wed, 26 Nov 2008, [EMAIL PROTECTED] wrote:

>
> I am on the wrong list because I just said ``LaTeX rocks''?

There was a smiley at the end of that comment!

> I would like to apologise you and anyone else from the bottom of my heart if 
> I have offended you and others, but honestly I did not mean it.

Relax. There is no need to apologize. I am sure that no one was
offended, but they do not share your view.

> I am just on this list because I want to study ConText (its TeX programming) 
> more deeply.

Aditya
___
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] bug in mkii xetex: mp figure is not in the right position

2008-11-27 Thread luigi scarso
On Thu, Nov 27, 2008 at 5:17 PM, Aditya Mahajan <[EMAIL PROTECTED]> wrote:

> Not in a mood to be involved in a latex-context flame today, but emacs-vim
> flame is another story :-)
>
> On Wed, 26 Nov 2008, Marcin Borkowski wrote:
> >>> Marcin Borkowski (http://mbork.pl)
> >>>
> >>> Emacs: Escape-Meta-Alt-Control-Shift.
> >>>
> >> true . ** entirely true **.
> >
> > Glad you like it.  (Personally, I use both emacs and vim.  Really.)
> >
> > BTW: do you know what "vim" means?  It is an old African word meaning
> > "how do you quit this f#g s##t?"
>
> Maybe, that is why vim's "splash screen" gives information on how to quit
> it.
>
emacs will save the world, with a little help from his friend vim



-- 
luigi
___
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] Apa-fr

2008-11-27 Thread Jean Magnan de Bornier
Le 27 novembre à 15:45:13 Taco Hoekwater <[EMAIL PROTECTED]> écrit notamment:

| Jean Magnan de Bornier wrote:
| > Le 27 novembre à 13:34:11 Taco Hoekwater <[EMAIL PROTECTED]> écrit 
notamment:
| > 
| > | Jean Magnan de Bornier wrote:
| > | > Hi all (mostly Taco),
| > | > 
| > | > Using bibl-apa-fr.tex for bibliography, I encountered a "chapter" on 
line 111
| > | > which should (I think) be changed to "Chapitre" (I did that on a file at
| > | > home and it works well); my context is TL2008 so if the file has been 
modified
| > | > since september I have not seen that yet.
| > | Chapitre with capital?
| > 
| > No, it is after a comma (sorry I was confused this morning)
>
| I uploaded a new version to modules.contextgarden.net, thanks
| for the report.
Thanks,
-- 
Jean
___
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] bug in mkii xetex: mp figure is not in the right position

2008-11-27 Thread Aditya Mahajan
Not in a mood to be involved in a latex-context flame today, but emacs-vim 
flame is another story :-)

On Wed, 26 Nov 2008, Marcin Borkowski wrote:
>>> Marcin Borkowski (http://mbork.pl)
>>>
>>> Emacs: Escape-Meta-Alt-Control-Shift.
>>>
>> true . ** entirely true **.
>
> Glad you like it.  (Personally, I use both emacs and vim.  Really.)
>
> BTW: do you know what "vim" means?  It is an old African word meaning
> "how do you quit this f#g s##t?"

Maybe, that is why vim's "splash screen" gives information on how to quit 
it.

Aditya
___
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] can not include movie

2008-11-27 Thread Michail Vidiassov
Dear All,

ConTeXt user manual says movies are just like figures,
but when I process

\starttext
\placefigure[here]{none}{\externalfigure[demo.mov][width=0.7\textwidth, 
height=.7\textwidth, label=demo, preview=yes]}
\stoptext

with

context filename.tex

using the latest minimals without any custom settings
I do not get movie included.

What can be wrong?
I am a ConTeXt newbie and fail to see any possible place for errors in the 
above test case.

Sincerely, Michail
___
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] Apa-fr

2008-11-27 Thread Taco Hoekwater


Jean Magnan de Bornier wrote:
> Le 27 novembre à 13:34:11 Taco Hoekwater <[EMAIL PROTECTED]> écrit notamment:
> 
> | Jean Magnan de Bornier wrote:
> | > Hi all (mostly Taco),
> | > 
> | > Using bibl-apa-fr.tex for bibliography, I encountered a "chapter" on line 
> 111
> | > which should (I think) be changed to "Chapitre" (I did that on a file at
> | > home and it works well); my context is TL2008 so if the file has been 
> modified
> | > since september I have not seen that yet.
> | Chapitre with capital?
> 
> No, it is after a comma (sorry I was confused this morning)

I uploaded a new version to modules.contextgarden.net, thanks
for the report.

Best wishes,
Taco
___
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] printing tab in lua: print('a\tb') fails

2008-11-27 Thread luigi scarso
On Thu, Nov 27, 2008 at 1:03 PM, Hans Hagen <[EMAIL PROTECTED]> wrote:

> luigi scarso wrote:
> >
> > Correction:
> >
> > -- works as comments in luacode
> > % is used to format strings
> >
> >
> >
> > It's a bit different: code below is ok, and TeX comment is seen "before"
> > lua comment .
> > Only Hello! is print on pdf
> >
> > %%
> >  \def\Foo{%
> > \startluacode
> > -- this is a lua comment
> > %%  this is a TeX comment
> > \stopluacode
> > }
>
> sure, since you use a \def which then stores catcodes as they are in tex
> mode
>
> \startluacode
>function document.luigishouldknowbetter(whatever)
>for i=1,100 do
>print(whatever) -- this is a lua comment
>end
>end
> \stopluacode
>
> \def\Foo
>   {\ctxlua{document.luigishouldknowbetter("Hello world!")}}
>
>
Exactly.
In my opinion, this is better than my example, because I don't like to mix
things  (and also for namespace document).


-- 
luigi
___
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] Centering the page

2008-11-27 Thread Wolfgang Schuster
On Thu, Nov 27, 2008 at 1:46 PM, Mohamed Bana
<[EMAIL PROTECTED]> wrote:
> Thanks, but that's not what I had in mind.  Look at the right edge of
> the pdf (http://filebin.ca/rzjruz/test.pdf or http://filebin.ca/rzjruz)
> there's a gap - about 1/2 a centimetres - which isn't on the left side.
>  It doesn't look uniform.

The left and right margina re different but they have nothing to do
with the distance of the text block from the left and right margin
of the paper.

\setuplayout
  [width=middle,
   leftmargin=2cm,
   rightmargin=2cm]

\showframe

\starttext
Hello world!
\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] Centering the page

2008-11-27 Thread Mohamed Bana
Thanks, but that's not what I had in mind.  Look at the right edge of 
the pdf (http://filebin.ca/rzjruz/test.pdf or http://filebin.ca/rzjruz) 
there's a gap - about 1/2 a centimetres - which isn't on the left side. 
  It doesn't look uniform.

Wolfgang Schuster wrote:
> On Thu, Nov 27, 2008 at 1:17 PM, Mohamed Bana
> <[EMAIL PROTECTED]> wrote:
>> anyone?
> 
> \setuplayout
>   [backspace=8cm,
>width=middle]
> 
> Wolfgang
> 
>> Mohamed Bana wrote:
>>> %%% Document %%%
>>>
>>> % engine=luatex
>>> \enableregime [utf-8]
>>> \mainlanguage[uk]
>>> \language[uk]
>>> \setuppapersize [A4]
>>>  [A4]
>>> \showframe
>>> %\showlayout
>>>
>>> %\setuplayout[width=middle]
>>>
>>> \setupwhitespace  [medium]
>>>
>>> \starttext
>>> \input knuth
>>>
>>> \input zapf
>>>
>>> \input tufte
>>> \stoptext
>>>
>>>
>>> Look at http://filebin.ca/rzjruz/test.pdf or http://filebin.ca/rzjruz,
>>> you'll notice a reasonably sized gap on the right hand side, how do I
>>> get rid of it?
>>>
>>> The work around seems to be
>>>
>>> \setuplayout[width=middle]
>>>
>>> But this isn't want I want as the width of the text betters slightly
>>> bigger, see; http://filebin.ca/ttufjc/test.pdf or http://filebin.ca/ttufjc .
>>>
>>>
>>> Thanks
>>>
>>> ___
>>> 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
>> ___
>>
> ___
> 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] Centering the page

2008-11-27 Thread Wolfgang Schuster
On Thu, Nov 27, 2008 at 1:17 PM, Mohamed Bana
<[EMAIL PROTECTED]> wrote:
> anyone?

\setuplayout
  [backspace=8cm,
   width=middle]

Wolfgang

> Mohamed Bana wrote:
>> %%% Document %%%
>>
>> % engine=luatex
>> \enableregime [utf-8]
>> \mainlanguage[uk]
>> \language[uk]
>> \setuppapersize [A4]
>>  [A4]
>> \showframe
>> %\showlayout
>>
>> %\setuplayout[width=middle]
>>
>> \setupwhitespace  [medium]
>>
>> \starttext
>> \input knuth
>>
>> \input zapf
>>
>> \input tufte
>> \stoptext
>>
>>
>> Look at http://filebin.ca/rzjruz/test.pdf or http://filebin.ca/rzjruz,
>> you'll notice a reasonably sized gap on the right hand side, how do I
>> get rid of it?
>>
>> The work around seems to be
>>
>> \setuplayout[width=middle]
>>
>> But this isn't want I want as the width of the text betters slightly
>> bigger, see; http://filebin.ca/ttufjc/test.pdf or http://filebin.ca/ttufjc .
>>
>>
>> Thanks
>>
>> ___
>> 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
> ___
>
___
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] Centering the page

2008-11-27 Thread Mohamed Bana
anyone?

Mohamed Bana wrote:
> %%% Document %%%
> 
> % engine=luatex
> \enableregime [utf-8]
> \mainlanguage[uk]
> \language[uk]
> \setuppapersize [A4]
>  [A4]
> \showframe
> %\showlayout
> 
> %\setuplayout[width=middle]
> 
> \setupwhitespace  [medium]
> 
> \starttext
> \input knuth
> 
> \input zapf
> 
> \input tufte
> \stoptext
> 
> 
> Look at http://filebin.ca/rzjruz/test.pdf or http://filebin.ca/rzjruz, 
> you'll notice a reasonably sized gap on the right hand side, how do I 
> get rid of it?
> 
> The work around seems to be
> 
> \setuplayout[width=middle]
> 
> But this isn't want I want as the width of the text betters slightly 
> bigger, see; http://filebin.ca/ttufjc/test.pdf or http://filebin.ca/ttufjc .
> 
> 
> Thanks
> 
> ___
> 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] printing tab in lua: print('a\tb') fails

2008-11-27 Thread Hans Hagen
luigi scarso wrote:
> 
> Correction:
> 
> -- works as comments in luacode
> % is used to format strings
> 
> 
> 
> It's a bit different: code below is ok, and TeX comment is seen "before" 
> lua comment .
> Only Hello! is print on pdf
> 
> %%
>  \def\Foo{%
> \startluacode
> -- this is a lua comment
> %%  this is a TeX comment
> \stopluacode
> }

sure, since you use a \def which then stores catcodes as they are in tex 
mode

\startluacode
function document.luigishouldknowbetter(whatever)
for i=1,100 do
print(whatever) -- this is a lua comment
end
end
\stopluacode

\def\Foo
   {\ctxlua{document.luigishouldknowbetter("Hello world!")}}


-
   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] printing tab in lua: print('a\tb') fails

2008-11-27 Thread luigi scarso
>
>
> Correction:
>
> -- works as comments in luacode
> % is used to format strings
>


It's a bit different: code below is ok, and TeX comment is seen "before" lua
comment .
Only Hello! is print on pdf

%%
 \def\Foo{%
\startluacode
-- this is a lua comment
%%  this is a TeX comment
\stopluacode
}

\starttext
Hello !
\Foo
\stoptext
%%%




This is wrong

%%
\starttext
Hello !
\startluacode
-- this is a lua comment
%%  this is a TeX comment
\stopluacode
\stoptext
%%%



! LuaTeX error :3: unexpected symbol near '%'.
\@@expanded ... comment
%% this is a TeX comment
}

l.6 \stopluacode

?




-- 
luigi
___
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] Apa-fr

2008-11-27 Thread Jean Magnan de Bornier
Hi all (mostly Taco),

Using bibl-apa-fr.tex for bibliography, I encountered a "chapter" on line 111
which should (I think) be changed to "Chapitre" (I did that on a file at
home and it works well); my context is TL2008 so if the file has been modified
since september I have not seen that yet.

cheers,
-- 
Jean
___
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] printing tab in lua: print('a\tb') fails

2008-11-27 Thread Wolfgang Schuster
On Thu, Nov 27, 2008 at 10:02 AM, Wolfgang Schuster
<[EMAIL PROTECTED]> wrote:
> On Thu, Nov 27, 2008 at 9:42 AM, luigi scarso <[EMAIL PROTECTED]> wrote:
>>
>>
>>>
>>> OK, I will use external files next time. In this quick-and-dirty
>>> approach I just added string.format since it was easier than
>>> restructuring everything.
>>>
>>> I thought that \startluacode should be behaving the same way as
>>> verbatim environments where commands inside verbatim have no
>>> influence, but apparently I was wrong.
>>
>> I also think so.
>> Can be strange, but inside a \startluacode\stopluacode I have no problems to
>> think at -- as comment
>> while I have problems to think to % as comment
>>
>> And put lua code in a separate  file not always  is a good solution
>
> This would be really great, \start/stoplua with % for comments like \ctxlua
> and \start/stopluacode with -- as comment, the first is used for longer 
> settings
> in macros and the second for inline functions.
>
> @Luigi: You could try to parse the luacode content with Lpeg and with
> the result back to \directlua.

Correction:

-- works as comments in luacode
% is used to format strings

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 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] printing tab in lua: print('a\tb') fails

2008-11-27 Thread Hans Hagen
Mojca Miklavec wrote:

> I thought that \startluacode should be behaving the same way as
> verbatim environments where commands inside verbatim have no
> influence, but apparently I was wrong.

no, more like MPcode where one can mix things

if the luacode would not expand macros, then we'd need rather tricky 
code when we'd like to have tex put stuff in there


\startluacode
 print('a\string\tb')
\stopluacode

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
-
___
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] difference between TeX behavior and ConTeXt

2008-11-27 Thread Taco Hoekwater


Lars Huttar wrote:
> 
> something like this:
> 
>   switch to a serif style
> 
> (if that's what \rm means in ConTeXt -- I still don't know for sure).

\rm in ConTeXT means: switch to the internal style group named "rm"
(and likewise for \ss -> "ss" etc.)

Whether "rm" points to a group of fonts that actually have serifs
attached to the glyph shapes depends totally on the specific typescript
that is being used in the document (usually they will, and I think all
the predefined typescripts are set up that way, but that is not a
requirement at all).

The basic idea is that the style "rm" switches to the font set used
for the main portion of the text. "ss" is the style for supporting
texts, like section heads and headers/footers. "tt" is useful for
fixed-width text, (this gets it own special group because it is very
often needed in manuals). "hw", and "cg" are variations for different
forms of supporting texts, these are rarely used.

Does it make more sense now?

Best wishes,
Taco


___
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] printing tab in lua: print('a\tb') fails

2008-11-27 Thread luigi scarso
On Thu, Nov 27, 2008 at 10:02 AM, Wolfgang Schuster <
[EMAIL PROTECTED]> wrote:

> On Thu, Nov 27, 2008 at 9:42 AM, luigi scarso <[EMAIL PROTECTED]>
> wrote:
> >
> >
> >>
> >> OK, I will use external files next time. In this quick-and-dirty
> >> approach I just added string.format since it was easier than
> >> restructuring everything.
> >>
> >> I thought that \startluacode should be behaving the same way as
> >> verbatim environments where commands inside verbatim have no
> >> influence, but apparently I was wrong.
> >
> > I also think so.
> > Can be strange, but inside a \startluacode\stopluacode I have no problems
> to
> > think at -- as comment
> > while I have problems to think to % as comment
> >
> > And put lua code in a separate  file not always  is a good solution
>
> This would be really great, \start/stoplua with % for comments like \ctxlua
> and \start/stopluacode with -- as comment, the first is used for longer
> settings
> in macros and the second for inline functions.
>
> @Luigi: You could try to parse the luacode content with Lpeg and with
> the result back to \directlua.
>

Better to study
luat-ini.tex
first

-- 
luigi
___
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] printing tab in lua: print('a\tb') fails

2008-11-27 Thread Wolfgang Schuster
On Thu, Nov 27, 2008 at 9:42 AM, luigi scarso <[EMAIL PROTECTED]> wrote:
>
>
>>
>> OK, I will use external files next time. In this quick-and-dirty
>> approach I just added string.format since it was easier than
>> restructuring everything.
>>
>> I thought that \startluacode should be behaving the same way as
>> verbatim environments where commands inside verbatim have no
>> influence, but apparently I was wrong.
>
> I also think so.
> Can be strange, but inside a \startluacode\stopluacode I have no problems to
> think at -- as comment
> while I have problems to think to % as comment
>
> And put lua code in a separate  file not always  is a good solution

This would be really great, \start/stoplua with % for comments like \ctxlua
and \start/stopluacode with -- as comment, the first is used for longer settings
in macros and the second for inline functions.

@Luigi: You could try to parse the luacode content with Lpeg and with
the result back to \directlua.

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] printing tab in lua: print('a\tb') fails

2008-11-27 Thread Wolfgang Schuster
On Thu, Nov 27, 2008 at 9:29 AM, Mojca Miklavec
<[EMAIL PROTECTED]> wrote:
> On Wed, Nov 26, 2008 at 8:28 PM, Wolfgang Schuster wrote:
>>
>> Am 26.11.2008 um 20:07 schrieb Mojca Miklavec:
>>
>>> Hello,
>>>
>>> Here's a tiny question. The following command complains about
>>> undefined control sequence.
>>>
>>> \starttext
>>> \startluacode
>>> print('a\tb')
>>
>> print('a\t b')
>
> But then I get some unwanted space.

print('a\string\tb')

>>> \stopluacode
>>> hello
>>> \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] printing tab in lua: print('a\tb') fails

2008-11-27 Thread luigi scarso
> OK, I will use external files next time. In this quick-and-dirty
> approach I just added string.format since it was easier than
> restructuring everything.
>
> I thought that \startluacode should be behaving the same way as
> verbatim environments where commands inside verbatim have no
> influence, but apparently I was wrong.
>
I also think so.
Can be strange, but inside a \startluacode\stopluacode I have no problems to
think at -- as comment
while I have problems to think to % as comment

And put lua code in a separate  file not always  is a good solution


-- 
luigi
___
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] printing tab in lua: print('a\tb') fails

2008-11-27 Thread Mojca Miklavec
On Wed, Nov 26, 2008 at 8:28 PM, Wolfgang Schuster wrote:
>
> Am 26.11.2008 um 20:07 schrieb Mojca Miklavec:
>
>> Hello,
>>
>> Here's a tiny question. The following command complains about
>> undefined control sequence.
>>
>> \starttext
>> \startluacode
>> print('a\tb')
>
> print('a\t b')

But then I get some unwanted space.

>> \stopluacode
>> hello
>> \stoptext
>>
>> There is a workaround:
>>print(string.format('a\t%s', 'b'))
>> but I find it weird. Even if the line above gets commented out with
>> two dashes it still complains.
>>
>> I understand approximately why this happens, but is that intended?
>> Should I be using something else than \startluacode in the plethora of
>> different lua triggering commands?
>
> \start/stopluacode is defined as \startluacode#1\stopluacode
> (simplified) and you should take care of TeXs parsing rules.
>
> If you want Lua comments and format command (\n, \t ...) use
> a external file for your Lua code.

OK, I will use external files next time. In this quick-and-dirty
approach I just added string.format since it was easier than
restructuring everything.

I thought that \startluacode should be behaving the same way as
verbatim environments where commands inside verbatim have no
influence, but apparently I was wrong.

Thanks,
  Mojca
___
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] printing tab in lua: print('a\tb') fails

2008-11-27 Thread Hans Hagen
Mojca Miklavec wrote:
> Hello,
> 
> Here's a tiny question. The following command complains about
> undefined control sequence.
> 
> \starttext
> \startluacode
> print('a\tb')

print('a\\tb')

> \stopluacode
> hello
> \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
-
___
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
___