[NTG-context] Multi-page frame.
Hello! How can I have a framed text that can cross page boundaries? Cheers, André Caldas. ___ 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 ___
Re: [NTG-context] Multi-page frame.
···date: 2012-12-22, Saturday···from: Andre Caldas··· Hello! How can I have a framed text that can cross page boundaries? With text backgrounds [0]. Example: \definetextbackground [multipageframe] [ location=paragraph, frame=on, rulethickness=2pt, framecolor=green, ] \starttext \startmultipageframe \dorecurse{42}{\input tufte\par} \stopmultipageframe \stoptext Regards Philipp [0] http://wiki.contextgarden.net/TextBackground pgpvZWiAZzRaL.pgp Description: PGP signature ___ 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 ___
[NTG-context] to pass an argument in a macro
Bonjour, I am new in ConTeXt. I love its features. I need some (or a lot of) help. I tried to get a macro which compute some values for a math function. With help from the wiki ConTeXt Garden and some time I could do that - write my function userdata.f - write another function to put the values in a table : userdata.tabf - put both of them in a file /Users/rolandt/context/mesfonctionsluatex.lua - In a file.tex, I use that macro : \def\tabf#1#2% {\startluacode dofile(/Users/rolandt/context/mesfonctionsluatex.lua) userdata.tabf(#1,#2) \stopluacode} Here are the functions: -- fonction cube -- on utilise l'espace de nom userdata userdata=userdata or {} function userdata.f(x) context(x*x*x) end -- fonction tabf -- which makes a table , compute 6 values, b=first x, c = step userdata=userdata or {} function userdata.tabf(b,c) context.starttable{*{7}{|l}|} local b=b local c=c context(\\HL) context(\\VL x ) for i=1,6 do context(\\NC .. b+(i-1)*c) end context(\\VL..\\AR) context(\\HL) context(\\VL f(x) ) for i=1,6 do context(\\NC) context(userdata.f(b+(i-1)*c)) end context(\\VL..\\LR) context(\\HL) context.stoptable() end I am sure it could be much better but it works ! Evidently I need a third argument to be able to choose how many values compute. I failed completely (I don't understand how arguments are passed). I tried things like : context.starttable{*{%s}{|l}|,a} but ... fatal error :) I would appreciate some help or what to read to improve understanding that kind of things. Best regards, Roland ___ 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 ___
[NTG-context] XeTeX, ConTeXt and font/filename quote char
Hi all, Some people have been complaining that it is not possible to use XeTeX with filenames containing parenthesis because XeTeX treats it as filename quote char and this it gets stripped. Anyway, after some searching it turned out this was added in 2004 for ConTeXt to workaround some MetaPost quotation issue[1]. Now I'm not sure if this is still needed/used by ConTeXt and was wondering if it can be dropped now? Regards, Khaled [1] http://tug.org/pipermail/xetex/2004-October/001215.html ___ 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 ___
Re: [NTG-context] to pass an argument in a macro
Am 23.12.2012 um 02:58 schrieb Roland Thiers roland.thi...@gmail.com: Bonjour, I am new in ConTeXt. I love its features. I need some (or a lot of) help. I tried to get a macro which compute some values for a math function. With help from the wiki ConTeXt Garden and some time I could do that - write my function userdata.f - write another function to put the values in a table : userdata.tabf - put both of them in a file /Users/rolandt/context/mesfonctionsluatex.lua - In a file.tex, I use that macro : \def\tabf#1#2% {\startluacode dofile(/Users/rolandt/context/mesfonctionsluatex.lua) userdata.tabf(#1,#2) \stopluacode} When you Lua code is in the same folder as the TeX file you can use \ctxloadluafile{myfile} to load the Lua file. Here are the functions: -- fonction cube -- on utilise l'espace de nom userdata userdata=userdata or {} function userdata.f(x) context(x*x*x) end -- fonction tabf -- which makes a table , compute 6 values, b=first x, c = step userdata=userdata or {} function userdata.tabf(b,c) context.starttable{*{7}{|l}|} local b=b local c=c context(\\HL) context(\\VL x ) for i=1,6 do context(\\NC .. b+(i-1)*c) end context(\\VL..\\AR) context(\\HL) context(\\VL f(x) ) for i=1,6 do context(\\NC) context(userdata.f(b+(i-1)*c)) end context(\\VL..\\LR) context(\\HL) context.stoptable() end \startluacode userdata = userdata or {} userdata.roland = userdata.roland or {} local roland = userdata.roland function roland.f(x) context(x*x*x) end function roland.table(min,max,step) local min = tonumber(min) local max = tonumber(max) local step = tonumber(step) context.starttable({string.format(|*{%d}{l|},max-min+2)}) context.HL() context.VL() context(x) for i=min,max do context.NC() context(min+(i-1)*step) end context.VL() context.FR() context.HL() context.VL() context(f(x)) for i=min,max do context.NC() roland.f(min+(i-1)*step) end context.VL() context.AR() context.HL() context.stoptable() end \stopluacode \define[3]\TableFuntion {\ctxlua{userdata.roland.table(#1,#2,#3)}} \starttext \TableFuntion{1}{6}{1} \TableFuntion{2}{7}{1} \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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___