Re: Branches feature addition

2007-11-10 Thread Abdelrazak Younes
Andre Poenitz wrote: On Sat, Nov 10, 2007 at 03:18:06PM +0200, Martin Vermeer wrote: How hard would that be to fix? Very hard. That's why we don't have real text-in-math since 1.3 when it became possible in theory. It will be easier when we have a structured file format (i.e. XML), but somehow

Re: Branches feature addition

2007-11-10 Thread Andre Poenitz
On Sat, Nov 10, 2007 at 03:18:06PM +0200, Martin Vermeer wrote: > > > How hard would that be to fix? > > > > Very hard. That's why we don't have real text-in-math since 1.3 when it > > became possible in theory. It will be easier when we have a structured > > file format (i.e. XML), but somehow X

Re: Branches feature addition

2007-11-10 Thread Jean-Marc Lasgouttes
Martin Vermeer <[EMAIL PROTECTED]> writes: > It _appears_ doable, even in the PC way where LyX, not > LaTeX, handles the conditional outputting: one can, in math, > have a LaTeX output differing from the LyX serialization > ("write") routine -- e.g., have an arg enclosed in [] instead > of the s

Re: Branches feature addition

2007-11-10 Thread Martin Vermeer
On Sat, Nov 10, 2007 at 01:11:34PM +0100, Andre Poenitz wrote: > On Fri, Nov 09, 2007 at 07:20:11AM +0200, Martin Vermeer wrote: > > On Thu, Nov 08, 2007 at 09:11:26PM +0100, Andre Poenitz wrote: > > > On Thu, Nov 08, 2007 at 08:47:29PM +0200, Martin Vermeer wrote: > > > > On Thu, Nov 08, 2007 at 0

Re: Branches feature addition

2007-11-10 Thread Andre Poenitz
On Fri, Nov 09, 2007 at 07:20:11AM +0200, Martin Vermeer wrote: > On Thu, Nov 08, 2007 at 09:11:26PM +0100, Andre Poenitz wrote: > > On Thu, Nov 08, 2007 at 08:47:29PM +0200, Martin Vermeer wrote: > > > On Thu, Nov 08, 2007 at 06:02:02PM +0100, Jean-Marc Lasgouttes wrote: > > > > Martin Vermeer <[E

Re: Branches feature addition

2007-11-09 Thread Martin Vermeer
On Fri, Nov 09, 2007 at 01:58:01PM +0100, Helge Hafting wrote: > Martin Vermeer wrote: > > On Thu, 08 Nov 2007 10:38:44 +0100 > > Helge Hafting <[EMAIL PROTECTED]> wrote: > > > >> As for branches in math - the wishlist item would be > >> proper support (i.e. insert->branch working inside math t

Re: Branches feature addition

2007-11-09 Thread Helge Hafting
Martin Vermeer wrote: On Thu, 08 Nov 2007 10:38:44 +0100 Helge Hafting <[EMAIL PROTECTED]> wrote: As for branches in math - the wishlist item would be proper support (i.e. insert->branch working inside math too.) Helge Hafting That would require a complete rewrite of text-in-math. It

Re: Branches feature addition

2007-11-09 Thread Martin Vermeer
On Fri, 09 Nov 2007 11:59:28 +0100 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> wrote: > Martin Vermeer <[EMAIL PROTECTED]> writes: > > > Not really... if we do it in such a way that the macros themselves are > > always output both to .lyx and to .tex. Activating / deactivating > > branches only affe

Re: Branches feature addition

2007-11-09 Thread Jean-Marc Lasgouttes
Martin Vermeer <[EMAIL PROTECTED]> writes: > Not really... if we do it in such a way that the macros themselves are > always output both to .lyx and to .tex. Activating / deactivating > branches only affects what these macros _do_ when latexing: outputting > their argument, or outputting nothing.

Re: Branches feature addition

2007-11-09 Thread Jürgen Spitzmüller
Martin Vermeer wrote: > Jürgen, do you want this in branch? Risk free and useful (The attached > is for branch.) Fine with me (if you correct the typo ["On" -> "One"] at the beginning). Jürgen

Re: Branches feature addition

2007-11-09 Thread Martin Vermeer
On Fri, 09 Nov 2007 11:44:24 +0100 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> wrote: > Martin Vermeer <[EMAIL PROTECTED]> writes: > > >> I math, it should be a MathBranch inset. > > > > Hmmm, that's an interesting idea. How would that work in practice? > > Just a simple thing based on InsetMathNes

Re: Branches feature addition

2007-11-09 Thread Jean-Marc Lasgouttes
Martin Vermeer <[EMAIL PROTECTED]> writes: >> I math, it should be a MathBranch inset. > > Hmmm, that's an interesting idea. How would that work in practice? Just a simple thing based on InsetMathNest that is inserted by the normal Insert>Branch mechanism when in maths. The math parser would have

Re: Branches feature addition

2007-11-08 Thread Abdelrazak Younes
Martin Vermeer wrote: On Thu, Nov 08, 2007 at 09:11:26PM +0100, Andre Poenitz wrote: On Thu, Nov 08, 2007 at 08:47:29PM +0200, Martin Vermeer wrote: On Thu, Nov 08, 2007 at 06:02:02PM +0100, Jean-Marc Lasgouttes wrote: Martin Vermeer <[EMAIL PROTECTED]> writes: n times for every string you w

Re: Branches feature addition

2007-11-08 Thread Martin Vermeer
On Thu, Nov 08, 2007 at 09:11:26PM +0100, Andre Poenitz wrote: > On Thu, Nov 08, 2007 at 08:47:29PM +0200, Martin Vermeer wrote: > > On Thu, Nov 08, 2007 at 06:02:02PM +0100, Jean-Marc Lasgouttes wrote: > > > Martin Vermeer <[EMAIL PROTECTED]> writes: > > > > > > > n times for every string you wan

Re: Branches feature addition

2007-11-08 Thread Andre Poenitz
On Thu, Nov 08, 2007 at 08:47:29PM +0200, Martin Vermeer wrote: > On Thu, Nov 08, 2007 at 06:02:02PM +0100, Jean-Marc Lasgouttes wrote: > > Martin Vermeer <[EMAIL PROTECTED]> writes: > > > > > n times for every string you want to 'branchify', i.e., n times for every > > > case in a 'cases' stateme

Re: Branches feature addition

2007-11-08 Thread Martin Vermeer
On Thu, Nov 08, 2007 at 07:49:36AM +0200, Martin Vermeer wrote: ... > BTW I just realized that the same method can already be applied > manually, without modifying LyX. Just include the above command > definitions inside ERT inside branch insets at the start of the > document, activating/deactiv

Re: Branches feature addition

2007-11-08 Thread Martin Vermeer
On Thu, Nov 08, 2007 at 06:02:02PM +0100, Jean-Marc Lasgouttes wrote: > Martin Vermeer <[EMAIL PROTECTED]> writes: > > > n times for every string you want to 'branchify', i.e., n times for every > > case in a 'cases' statement, n times the number of branchifyable strings > > in an XFig graphic, et

Re: Branches feature addition

2007-11-08 Thread Jean-Marc Lasgouttes
Martin Vermeer <[EMAIL PROTECTED]> writes: > BTW I just realized that the same method can already be applied > manually, without modifying LyX. Just include the above command > definitions inside ERT inside branch insets at the start of the > document, activating/deactivating as appropriate. Yes.

Re: Branches feature addition

2007-11-08 Thread Jean-Marc Lasgouttes
Martin Vermeer <[EMAIL PROTECTED]> writes: > n times for every string you want to 'branchify', i.e., n times for every > case in a 'cases' statement, n times the number of branchifyable strings > in an XFig graphic, etc., where n is the number of branches. Remember > this is ERT-like. It's not LyX

Re: Branches feature addition

2007-11-08 Thread Andre Poenitz
On Thu, Nov 08, 2007 at 07:45:40AM +0200, Martin Vermeer wrote: > On Wed, Nov 07, 2007 at 10:27:07PM +0100, Andre Poenitz wrote: > > On Wed, Nov 07, 2007 at 10:27:21PM +0200, Martin Vermeer wrote: > > > > > @@ -269,6 +272,12 @@ > > > > > > > > > > void InsetBranch::validate(LaTeXFeatures & featu

Re: Branches feature addition

2007-11-08 Thread Martin Vermeer
On Thu, 08 Nov 2007 10:38:44 +0100 Helge Hafting <[EMAIL PROTECTED]> wrote: > Martin Vermeer wrote: ... > >>> void InsetBranch::validate(LaTeXFeatures & features) const > >>> { > >>> + string const name = to_utf8(params_.branch); > >>> + features.require(name); > >>> + if (selected_) > >>> +

Re: Branches feature addition

2007-11-08 Thread Helge Hafting
Martin Vermeer wrote: On Wed, Nov 07, 2007 at 09:06:52PM +0100, Andre Poenitz wrote: On Wed, Nov 07, 2007 at 09:29:38PM +0200, Martin Vermeer wrote: Has anybody else noticed that the branches feature doesn't work inside math and inside graphics? Not me ;-) It would be esp

Re: Branches feature addition

2007-11-07 Thread Martin Vermeer
On Wed, Nov 07, 2007 at 10:27:07PM +0100, Andre Poenitz wrote: > On Wed, Nov 07, 2007 at 10:27:21PM +0200, Martin Vermeer wrote: > > > > @@ -269,6 +272,12 @@ > > > > > > > > void InsetBranch::validate(LaTeXFeatures & features) const > > > > { > > > > + string const name = to_utf8(params_.

Re: Branches feature addition

2007-11-07 Thread Martin Vermeer
On Wed, Nov 07, 2007 at 10:27:07PM +0100, Andre Poenitz wrote: > On Wed, Nov 07, 2007 at 10:27:21PM +0200, Martin Vermeer wrote: > > > > @@ -269,6 +272,12 @@ > > > > > > > > void InsetBranch::validate(LaTeXFeatures & features) const > > > > { > > > > + string const name = to_utf8(params_.

Re: Branches feature addition

2007-11-07 Thread Andre Poenitz
On Wed, Nov 07, 2007 at 10:27:21PM +0200, Martin Vermeer wrote: > > > @@ -269,6 +272,12 @@ > > > > > > void InsetBranch::validate(LaTeXFeatures & features) const > > > { > > > + string const name = to_utf8(params_.branch); > > > + features.require(name); > > > + if (selected_) > > > + f

Re: Branches feature addition

2007-11-07 Thread Martin Vermeer
On Wed, Nov 07, 2007 at 09:06:52PM +0100, Andre Poenitz wrote: > On Wed, Nov 07, 2007 at 09:29:38PM +0200, Martin Vermeer wrote: > > > > Has anybody else noticed that the branches feature doesn't work inside > > math and inside graphics? > > Not me ;-) > > > It would be especially nice to have i

Re: Branches feature addition

2007-11-07 Thread Andre Poenitz
On Wed, Nov 07, 2007 at 09:29:38PM +0200, Martin Vermeer wrote: > > Has anybody else noticed that the branches feature doesn't work inside > math and inside graphics? Not me ;-) > It would be especially nice to have it in the > "special" LaTeX strings inside XFig graphics. An in text phrases ins