Re: [NTG-context] {{ double braces }}

2008-02-13 Thread Taco Hoekwater
Aditya Mahajan wrote: I have been looking at different ways to parse TeX syntax since I occassionally do ConTeXt - LaTeX conversion. Things like gema and regexs are ok for small things: e.g., convert ConTeXt section commands to LaTeX section commnads, convert figures, etc. Gema is better

Re: [NTG-context] {{ double braces }}

2008-02-13 Thread luigi scarso
I would not do it like that again, these days I would use lpeg, but it was not nearly as complicated to do it in tex macros as I had anticipated. A bit off-topic: suppose that I , while I'm making format , I need to trace macro definitions (\edef,\xdef,\def,\let and eventually alias like

Re: [NTG-context] {{ double braces }}

2008-02-13 Thread Taco Hoekwater
luigi scarso wrote: I would not do it like that again, these days I would use lpeg, but it was not nearly as complicated to do it in tex macros as I had anticipated. A bit off-topic: suppose that I , while I'm making format , I need to trace macro definitions (\edef,\xdef,\def,\let and

Re: [NTG-context] {{ double braces }}

2008-02-13 Thread luigi scarso
A bit off-topic: suppose that I , while I'm making format , I need to trace macro definitions (\edef,\xdef,\def,\let and eventually alias like \let\define\def, so also \define too,...) This can be do only hacking web source , or not ? If you set \tracingassigns=1

Re: [NTG-context] {{ double braces }}

2008-02-12 Thread Aditya Mahajan
On Tue, 12 Feb 2008, Hans Hagen wrote: Thomas A. Schmitz wrote: Hi Aditya, now I need to apologize for being so slow to reply: thanks a lot, this looks really fascinating! I don't know how many things I've read on the web to understand if regexps can handle nested delimiters or not (I

Re: [NTG-context] {{ double braces }}

2008-02-12 Thread Thomas A. Schmitz
Hi Aditya, now I need to apologize for being so slow to reply: thanks a lot, this looks really fascinating! I don't know how many things I've read on the web to understand if regexps can handle nested delimiters or not (I think the long and short of it was that on some mathematical

Re: [NTG-context] {{ double braces }}

2008-02-12 Thread Hans Hagen
Thomas A. Schmitz wrote: Hi Aditya, now I need to apologize for being so slow to reply: thanks a lot, this looks really fascinating! I don't know how many things I've read on the web to understand if regexps can handle nested delimiters or not (I think the long and short of it was

Re: [NTG-context] {{ double braces }}

2008-02-06 Thread Aditya Mahajan
On Wed, 6 Feb 2008, Steffen Wolfrum wrote: Actually I use this to highlight footnotes in my texteditor: colorize entire footnotes for for easier reading. I am quite happy to have (on MacOSX) a text-editor that gives such syntax coloring flexibility: it is Satoshi Matsumoto's Jedit X. And

Re: [NTG-context] {{ double braces }}

2008-02-06 Thread Steffen Wolfrum
Am 06.02.2008 um 20:20 schrieb Hans van der Meer: On Wed, 6 Feb 2008, Steffen Wolfrum wrote: Actually I use this to highlight footnotes in my texteditor: colorize entire footnotes for for easier reading. I am quite happy to have (on MacOSX) a text-editor that gives such syntax coloring

Re: [NTG-context] {{ double braces }}

2008-02-06 Thread Hans van der Meer
On 6 feb 2008, at 21:01, Steffen Wolfrum wrote: Am 06.02.2008 um 20:20 schrieb Hans van der Meer: On Wed, 6 Feb 2008, Steffen Wolfrum wrote: Actually I use this to highlight footnotes in my texteditor: colorize entire footnotes for for easier reading. I am quite happy to have (on

Re: [NTG-context] {{ double braces }}

2008-02-06 Thread Otared Kavian
On 6 févr. 08, at 10:11, Steffen Wolfrum wrote: […] If someone knows an editor that does syntax coloring with lua or gema, I'd be very interested! Hi Steffen, Smultron does this on MacOS X: http://smultron.sourceforge.net/ In fact one can define easily a set of syntax colouring for almost

Re: [NTG-context] {{ double braces }}

2008-02-05 Thread Aditya Mahajan
Hi Thomas, Sorry for the delay in the reply, I was travelling last week. On Sat, 26 Jan 2008, Thomas A. Schmitz wrote: On Jan 24, 2008, at 12:19 AM, Aditya Mahajan wrote: Another option is Gema http://gema.sourceforge.net/new/index.shtml (also has a lua library

Re: [NTG-context] {{ double braces }}

2008-01-26 Thread Thomas A. Schmitz
On Jan 24, 2008, at 12:19 AM, Aditya Mahajan wrote: Another option is Gema http://gema.sourceforge.net/new/index.shtml (also has a lua library gelhttp://gema.sourceforge.net/new/ gel.shtml). You can define regions and matching nested braces quite easily. Aditya Hi Aditya, I remember

Re: [NTG-context] {{ double braces }}

2008-01-26 Thread Taco Hoekwater
Thomas A. Schmitz wrote: You could also use a nice scripting language like ... lua!! lua has support for balanced strings, so no nesting trickery is needed, see http://www.lua.org/pil/20.2.html (scroll to the bottom of the page). Or you could try and nag Hans into giving a nice

Re: [NTG-context] {{ double braces }}

2008-01-26 Thread Taco Hoekwater
Taco Hoekwater wrote: with lpeg, the code looks a bit harder, but is still short and relatively shortforward: Here is a smarter lpeg that takes care of embedded \{ as well: local P, S, V = lpeg.P, lpeg.S, lpeg.V local matchtable = { TEXT, TEXT = (V(FOOTNOTE) + 1)^0 * -1,

Re: [NTG-context] {{ double braces }}

2008-01-23 Thread Peter Münster
On Mon, Jan 21 2008, Steffen Wolfrum wrote: I would like to use in my documents double braces for the footnote – for easily matching entire footnotes with RegEx (thus it can't confuse with the nested braces) ... text\footnote{{this is {\it one} tiny note\index{note}!}} ... and

Re: [NTG-context] {{ double braces }}

2008-01-23 Thread Peter Münster
On Wed, Jan 23 2008, Peter Münster wrote: On Mon, Jan 21 2008, Steffen Wolfrum wrote: I would like to use in my documents double braces for the footnote – for easily matching entire footnotes with RegEx (thus it can't confuse with the nested braces) ... text\footnote{{this is

Re: [NTG-context] {{ double braces }}

2008-01-23 Thread Thomas A. Schmitz
On Jan 23, 2008, at 10:50 PM, Peter Münster wrote: I've just seen, that it does not work for nested braces: \footnote{x{y}z}: ok \footnote{x{y{z}}}: not ok The next one (normal regexp, not extended) has support for up to one level of nesting:

Re: [NTG-context] {{ double braces }}

2008-01-23 Thread Aditya Mahajan
On Wed, 23 Jan 2008, Thomas A. Schmitz wrote: On Jan 23, 2008, at 10:50 PM, Peter Münster wrote: I've just seen, that it does not work for nested braces: \footnote{x{y}z}: ok \footnote{x{y{z}}}: not ok The next one (normal regexp, not extended) has support for up to one level of nesting:

[NTG-context] {{ double braces }}

2008-01-21 Thread Steffen Wolfrum
Hi, I would like to use in my documents double braces for the footnote – for easily matching entire footnotes with RegEx (thus it can't confuse with the nested braces) ... text\footnote{{this is {\it one} tiny note\index{note}!}} ... and match the entire footnote with search regex for

Re: [NTG-context] {{ double braces }}

2008-01-21 Thread Mikael Persson
Hi Steffen, I don't really know regex, but how does your double brace work with the following \footnote{{This $\frac{a}{b^{c+d}}$ is a strange footnote}} note the double }} in the math formula. /Micke P On Jan 21, 2008 3:45 PM, Steffen Wolfrum [EMAIL PROTECTED] wrote: Hi, I would like to

Re: [NTG-context] {{ double braces }}

2008-01-21 Thread Steffen Wolfrum
math formula is one of the few things I definitely don't have to take care for =o) up to now ... thanks for the tip! steffen Am 21.01.2008 um 16:02 schrieb Mikael Persson: Hi Steffen, I don't really know regex, but how does your double brace work with the following \footnote{{This