[NTG-context] xmlfiles and url address

2012-01-05 Thread Martin Fechner
Hi all, I wish you happy new year and start with an xml-question: Is it possible to process files from an URL address? It should be something like: \starttext ... \xmlprocessfile{main}{http://example.com/document1.xml}{} \xmlprocessfile{main}{http://example.com/document2.xml}{} ...

Re: [NTG-context] xmlfiles and url address

2012-01-05 Thread Hans Hagen
On 5-1-2012 09:19, Martin Fechner wrote: Hi all, I wish you happy new year and start with an xml-question: Is it possible to process files from an URL address? It should be something like: \starttext \xmlprocessfile{main}{http://example.com/document1.xml}{}

Re: [NTG-context] Italicized text trailing space too small

2012-01-05 Thread Andreas Harder
On 05.01.2011, at 06:32, Aditya Mahajan wrote: On Wed, 4 Jan 2012, Kip Warner wrote: Text that I {\it have italicized} trails too tight with the first non-italicized word that is typeset next. I'm sure there is some ConTeXt command that adjusts this that I am unfamiliar with.

[NTG-context] howto get good references in mkiv?

2012-01-05 Thread Rene van Hassel
Hello Members, some piece of code, with the problems. I hope somebody can use it to improve ConTeXt, Compilation with texexec is no problem, Kind Regards, Rene' % Begin code: \setupcolors[state=start] \setupinteraction[state=start,color=orange] \setupreferencing[state=start]

[NTG-context] CLD: context.getvariable as Lua variable

2012-01-05 Thread Wagner Macedo
Hello, I'm relatively quite new to TeX world. This is my first message to list. I hope you understand me, English isn't my mother language. I'm trying to use a variable set by \setvariable in Lua. I tried some combinations, based on manual but I couldn't succeed. The code below exemplifies what

Re: [NTG-context] CLD: context.getvariable as Lua variable

2012-01-05 Thread Wolfgang Schuster
Am 05.01.2012 um 15:49 schrieb Wagner Macedo: Hello, I'm relatively quite new to TeX world. This is my first message to list. I hope you understand me, English isn't my mother language. I'm trying to use a variable set by \setvariable in Lua. I tried some combinations, based on manual

Re: [NTG-context] Italicized text trailing space too small

2012-01-05 Thread Chris Lott
On Tue, Jan 4, 2011 at 8:32 PM, Aditya Mahajan adit...@umich.edu wrote: On Wed, 4 Jan 2012, Kip Warner wrote: Text that I {\it have italicized} trails too tight with the first non-italicized word that is typeset next. I'm sure there is some ConTeXt command that adjusts this that I am

Re: [NTG-context] CLD: context.getvariable as Lua variable

2012-01-05 Thread Wagner Macedo
Firstly, thanks by answer. The second way is nice, but could be generic (e.g. save any variable in a namespace)? -- Wagner Macedo On 5 January 2012 13:04, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 05.01.2012 um 15:49 schrieb Wagner Macedo: Hello, I'm relatively quite

[NTG-context] TeX inside XML

2012-01-05 Thread Hans van der Meer
I need to do some ConTeXt work inside an XML-proces. In principle this works for most TeX-code through an appropriate xmlsetup that calls \xmlcontext. However some code has problems, and it will be no surprise that it concerns table suff. The error is: Misplaced \omit ... \@tbxmultispans

Re: [NTG-context] CLD: context.getvariable as Lua variable

2012-01-05 Thread Wolfgang Schuster
Am 05.01.2012 um 18:22 schrieb Wagner Macedo: Firstly, thanks by answer. The second way is nice, but could be generic (e.g. save any variable in a namespace)? It would require a different method because \setvariables doesn’t provide information about the values which are set. Can you

Re: [NTG-context] CLD: context.getvariable as Lua variable

2012-01-05 Thread Wagner Macedo
Don't worry. It's not needed. I just wanted to avoid mix Lua and TeX codes. I will survive using: local s = \getvariable{namespace}{var} Thank you by attention. -- Wagner Macedo On 5 January 2012 14:39, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 05.01.2012 um 18:22

[NTG-context] \rotate broken

2012-01-05 Thread Vianney le Clément
Hi, The latest beta seems to have broken the \rotate command. \starttext \rotate{Test} \stoptext gives the following error ! Missing { inserted. system tex error on line 2 in file test.tex: Missing { inserted ... 1 \starttext 2 \rotate{Test} 3 \stoptext 4 to be read

Re: [NTG-context] \rotate broken

2012-01-05 Thread Hans Hagen
On 5-1-2012 19:05, Vianney le Clément wrote: Hi, The latest beta seems to have broken the \rotate command. \starttext \rotate{Test} \stoptext gives the following error indeed, i already fixed it yesterday but didn't upload yet Hans

[NTG-context] missing macro

2012-01-05 Thread Meer, H. van der
The macro \expandoneargafter seems to have been disappeared. Is that true? I need it for repairing an appearent failure in the \Word macro to capitalize the first letter in some case. Hans van der Meer ___ If your

Re: [NTG-context] \rotate broken

2012-01-05 Thread Vianney le Clément
2012/1/5 Hans Hagen pra...@wxs.nl: indeed, i already fixed it yesterday but didn't upload yet Hans Always nice to hear. I'll patiently wait for the Wise Men then :o). Thanks, Vianney ___ If your question is of

Re: [NTG-context] missing macro

2012-01-05 Thread Wolfgang Schuster
Am 05.01.2012 um 19:51 schrieb Meer, H. van der: The macro \expandoneargafter seems to have been disappeared. Is that true? I need it for repairing an appearent failure in the \Word macro to capitalize the first letter in some case. Do you have a example where \Word fails in MkIV. The macro

[NTG-context] Inline itemize

2012-01-05 Thread Vianney le Clément
Hello, If I type Blabla. \startitemize[a,text] \item one \item two \stopitemize Blabla. I get a linebreak before and after the itemize. Is this the intended behaviour? How can I get a fully inline enumeration? Thanks, Vianney

Re: [NTG-context] missing macro

2012-01-05 Thread Meer, H. van der
In the meantime I have looked further into the problem. Although in the past redefinition of \Word was the only way to repair, this time there was a destructive interference with \startframedtext. It turned out that \startframedtext[align=middle, etc.] played havic with the following input, to

[NTG-context] How to define a command...

2012-01-05 Thread Otared Kavian
Hi all, I need to define numerical coefficients (essentially at random) and then use them with commands, say like \CoeffAlpha, \CoeffBeta, and so on. More precisely, how can I define the command \RandomCoeff, so that \RandomCoeff{Beta}{1}{10} yields a command named \CoeffBeta, which is a random

Re: [NTG-context] How to define a command...

2012-01-05 Thread Meer, H. van der
Reccently I did something random in ctxlua. I post it in the hope it will be useful. Hans van der Meer \startluacode -- Define our namespace as hvdm hvdm = hvdm or {} -- Return random series of numbers 1..n depending on the number of arguments function

Re: [NTG-context] How to define a command...

2012-01-05 Thread Peter Münster
On Thu, Jan 05 2012, Otared Kavian wrote: \define[3]\RandomCoeff{% \ctxlua{a = math.random(#2,#3)} % \csname{Coeff#1}\endcsname{\ctxlua{tex.print(a)}} %% this line does not work as expected... \setuprandomize[2012] \define[3]\RandomCoeff{% \expandafter\def\csname

Re: [NTG-context] How to define a command...

2012-01-05 Thread Wolfgang Schuster
Am 05.01.2012 um 21:17 schrieb Peter Münster: On Thu, Jan 05 2012, Otared Kavian wrote: \define[3]\RandomCoeff{% \ctxlua{a = math.random(#2,#3)} %\csname{Coeff#1}\endcsname{\ctxlua{tex.print(a)}} %% this line does not work as expected... \setuprandomize[2012]

Re: [NTG-context] How to define a command...

2012-01-05 Thread Wolfgang Schuster
Am 05.01.2012 um 21:11 schrieb Meer, H. van der: Reccently I did something random in ctxlua. I post it in the hope it will be useful. Hans van der Meer \startluacode -- Define our namespace as hvdm hvdm = hvdm or {} Don’t use a global namespace, you can use “userdata”.

Re: [NTG-context] How to define a command...

2012-01-05 Thread Otared Kavian
Thanks Hans, in another problem I was looking for commands such as \RandomRange, \RandomSeries: I am going to use your ideas! It is incredible that on this list one gets solutions even for problems one didn't dare to ask :-) Best regards: OK On 5 janv. 2012, at 21:11, Meer, H. van der wrote:

Re: [NTG-context] How to define a command...

2012-01-05 Thread Otared Kavian
Thanks Peter, I had tried \expandafter\xdef, \edef, \gdef, but not \expandafter\def… Thanks for your quick answer: that's exactly what I was looking for. Best regards: OK On 5 janv. 2012, at 21:17, Peter Münster wrote: On Thu, Jan 05 2012, Otared Kavian wrote: \define[3]\RandomCoeff{%

Re: [NTG-context] How to define a command...

2012-01-05 Thread Otared Kavian
Thanks for Wolfgang: your solution, that is \setuprandomize[2012] \define[3]\RandomCoeff{% \setvalue{Coeff#1}{\ctxlua{tex.print(math.random(#2,#3))}}} works indeed and it is somehow simpler than using \expandafter\csname, and as a matter of fact, after reading your message I searched in

Re: [NTG-context] How to define a command...

2012-01-05 Thread Otared Kavian
Hi again Wolfgang and Peter, The solution you provided to my problem is great but has a small issue… Considering the definition \define[3]\RandomCoeff{% \setvalue{Coeff#1}{\ctxlua{tex.print(math.random(#2,#3))}} } after saying \RandomCoeff{Alpha}{1}{10} one gets

Re: [NTG-context] How to define a command...

2012-01-05 Thread Otared Kavian
Sorry for the noise… I found the answer to my last question in module-01.pdf, pages 92 and 93: the right definition is \define[3]\RandomCoeff{% \setevalue{Coeff#1}{\ctxlua{tex.print(math.random(#2,#3))}} } that is one has to use \setevalue instead of \setvalue (that is

Re: [NTG-context] Inline itemize

2012-01-05 Thread Wagner Macedo
As I know, yes, this is the intended behavior. You should be thinking in a WYSIWYG way, but TeX, as most languages (except Python, that I know) works apart you write every code in one line or write pretty indented. I hope you understood. -- Wagner Macedo 2012/1/5 Vianney le Clément

Re: [NTG-context] Inline itemize

2012-01-05 Thread Wolfgang Schuster
Am 06.01.2012 um 00:06 schrieb Wagner Macedo: As I know, yes, this is the intended behavior. You should be thinking in a WYSIWYG way, but TeX, as most languages (except Python, that I know) works apart you write every code in one line or write pretty indented. No, this is a bug because

Re: [NTG-context] Inline itemize

2012-01-05 Thread Wagner Macedo
Ah... sorry. I read the manual but I didn't remember this feature. -- Wagner Macedo On 5 January 2012 20:25, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: No, this is a bug because with the “text” keyword you can create a inline item which doesn’t start a new paragraph.

Re: [NTG-context] Italicized text trailing space too small

2012-01-05 Thread Kip Warner
On Wed, 2011-01-05 at 00:32 -0500, Aditya Mahajan wrote: On Wed, 4 Jan 2012, Kip Warner wrote: Text that I {\it have italicized} trails too tight with the first non-italicized word that is typeset next. I'm sure there is some ConTeXt command that adjusts this that I am unfamiliar with.

Re: [NTG-context] redefining paragraph breaks

2012-01-05 Thread Michael Talbot-Wilson
On Tue, 3 Jan 2012, Chris Lott wrote: I know I could do it manually, but that makes the source ugly, so is there a way to redefine paragraph breaks so that instead of actual breaks in the output they are kept as running text separate by a paragraph symbol, e.g.: This is paragraph 1. This is