Re: Math macros ---- Woooooo!

2004-04-13 Thread Dekel Tsur
On Tue, Apr 13, 2004 at 11:06:28AM +0100, Angus Leeming wrote:
> Andre, thank you, thank you, thank you!
> 
> However, the new scheme appears to produce an extra, unnecessary set
> of red braces. Try the attached, 13x file with lyx 13x and with
> current cvs.
> 
> The good news is that the latex exported by both versions is
> identical:
> 
> \newcommand{\Vector}[1]{\boldsymbol{#1}}
> 
> $\Vector{V}_{0}=V_{x0}\Vector{i}$

A more serious problem with the screen display is if the \Vector macro is
changed to

\newcommand{\Vector}[1]{[#1]}


Re: mathed color inset

2003-10-28 Thread Dekel Tsur
On Tue, Oct 28, 2003 at 09:32:04AM +0100, Andre Poenitz wrote:
> 
> But that would mean another level of $...$ to go back to math mode,
> doesn't it?
> 
> Is there a \mathcolor{blue}{...}?

\textcolor does not exit from math mode.


Re: mathed color inset

2003-10-28 Thread Dekel Tsur
> 
> This is 'old style' font switching ( i.e. {\it ...} vs  \textit{...} )..
> 
> Not nice.
> 
> Should we stick to \color or is there anything else that could be used?


\textcolor{blue}{...}


Re: [PATCH] Inverse search update.

2003-10-16 Thread Dekel Tsur
On Thu, Oct 16, 2003 at 07:11:34PM +0200, Alfredo Braunstein wrote:
> 
> it? Can it collide with other packages etc? (maybe a checkbox to supress it
> after all?). 

It can potentially screw up the spacing, but I don't know if this is indeed
a problem.


Re: Qt 3.2.2

2003-10-16 Thread Dekel Tsur
On Thu, Oct 16, 2003 at 04:22:07PM +0100, John Levon wrote:
> 
> Here's the full top ten (that I just made up).
> 
> 1. Character styles
> 2. Unicode support
> 3. Outliner
> 4. Document .layout wizard
> 5. Decent support for including code (including GUI labels + xrefs etc.)
> 6. Context menus and drag and drop support
> 7. Seamless LaTeX import
> 8. Full toolbar support for switching styles, math/table stuff etc.
> 9. Spelling improvements (per doc word list, as-you-type checking, word count)
> 10. Decent table support

How about multiple windows/views ?


Re: Qt 3.2.2

2003-10-16 Thread Dekel Tsur
On Thu, Oct 16, 2003 at 04:04:43PM +0200, Lars Gullik Bj?nnes wrote:
> | Any documents in a different encoding won't be in ASCII though :)
> 
> | But Jos?© said it was easy to handle, so...
> 
> Hmm... but he has to read most of the lyx file header to find out what
> language is it written in and whet encoding that might be.

Not only the header: the language (and hence the encoding) can change
in the middle of the document.
But it shouldn't be hard to handle this too.



Re: Do you have compile problems?

2003-09-29 Thread Dekel Tsur
On Mon, Sep 29, 2003 at 10:45:29AM +0200, Lars Gullik Bj?nnes wrote:
> 
> If you have compile problems you must pipe up, so that I can attempt
> to fix them.

I get the following error:
(using gcc 3.3.2 20030908 (Debian prerelease), QT 3.2.1)

g++ -DHAVE_CONFIG_H -I. -I. -I../../../src -I../../../src/ -I../../../src/frontends/ 
-I../../../images -I/usr/include/qt3 -I../../../boost 
-I../../../src/frontends/controllers -I/usr/X11R6/include -DQT_CLEAN_NAMESPACE 
-DQT_GENUINE_STR -DQT_NO_TRANSLATION -O -fno-exceptions -W -Wall -MT QDialogView.lo 
-MD -MP -MF .deps/QDialogView.Tpo -c QDialogView.C
In file included from ../../../src/debug.h:18,
 from ../../../src/frontends/controllers/BCView.tmpl:20,
 from ../../../src/frontends/controllers/BCView.h:139,
 from Qt2BC.h:18,
 from QDialogView.C:17:
../../../src/support/debugstream.h:28: error: syntax error before `=' token
../../../src/support/debugstream.h:30: error: missing ';' before right brace
../../../src/support/debugstream.h:32: error: `type' was not declared in this 
   scope
../../../src/support/debugstream.h:32: error: syntax error before `,' token
../../../src/support/debugstream.h: In function `bool match(...)':
../../../src/support/debugstream.h:33: error: `b' undeclared (first use this 
   function)
../../../src/support/debugstream.h:33: error: (Each undeclared identifier is 
   reported only once for each function it appears in.)
../../../src/support/debugstream.h:33: error: `a' undeclared (first use this 
   function)
../../../src/support/debugstream.h:33: error: `ANY' undeclared (first use this 
   function)
../../../src/support/debugstream.h:33: error: `NONE' undeclared (first use this 
   function)
../../../src/support/debugstream.h: At global scope:
../../../src/support/debugstream.h:35: error: syntax error before `}' token
../../../src/support/debugstream.h:32: warning: `bool match(...)' defined but 
   not used


frenchb

2003-09-11 Thread Dekel Tsur
Why do we have frenchb in lib/languages ?
The Babel documentation says that it is obsolete.


qfont_loader.C in lyx 1.3.x

2003-09-08 Thread Dekel Tsur
As I written on lyx-users, the 1.3.x code in qfont_loader.C
does not work with QT3.2.
I've ported the 1.4.0cvs code to 1.3.x. Can I apply it ?
I also suggest releasing 1.3.3 soon, as this problem is annoying.


patch.gz
Description: application/gzip


Re: paragraph question

2003-08-14 Thread Dekel Tsur
On Tue, Aug 05, 2003 at 05:40:02PM +0200, Jean-Marc Lasgouttes wrote:
> 
> If this is really the intent, I think that we should have a real
> notion of paragraph language, like for example: if one selects a
> paragraph in whole and sets its language, then it is the paragraph
> language which changes. If only part of a paragraph is selected, then
> only the local font changes.

If we decide storing "paragraph language", we should add the option to
change it in the paragraph dialog. 

Also,  we need to keep a sensible behavior:
When the user creates a new paragraph, its language
should be set to the language of previous language.
However, if the user changed the language before inserting new characters to
the paragraph, then the paragraph language should be switched to the new
language.


Re: Question on lyx2lyx

2003-08-01 Thread Dekel Tsur
On Fri, Aug 01, 2003 at 04:00:29PM +0100, Jose' Matos wrote:
> On Friday 01 August 2003 15:17, Dekel Tsur wrote:
> > Jose, why does lyxconvert_216.py changes the language of the document to
> > 'english' ?
> > I agree that if the language was 'default' (IIRC, LyX used to have this
> > option) then the language should be changed, but this is incorrect in all
> > other cases.
> 
>   That should be changed to english only if it is default, else it is a bug.

Fixed. Should I commit it to the 1.3.x branch ?


lyxpreview2bitmap.sh

2003-08-01 Thread Dekel Tsur
Is there any objection to change the line
   LATEX=latex
in lyxpreview2bitmap.sh to 
   LATEX=elatex
?

I want this change as latex with Hebrew requires using elatex.
As far as I know, there are no side effects when elatex is used.


Question on lyx2lyx

2003-08-01 Thread Dekel Tsur
Jose, why does lyxconvert_216.py changes the language of the document to
'english' ?
I agree that if the language was 'default' (IIRC, LyX used to have this
option) then the language should be changed, but this is incorrect in all
other cases.


Re: bidi stuff (Dekel ?)

2003-07-30 Thread Dekel Tsur
On Wed, Jul 30, 2003 at 07:47:58PM +0100, John Levon wrote:
> 
> I see. Basically I'm wondering if we can remove code that we have to
> maintain in favour of code that the fribidi people have to maintain.

It is rather short, and with external libraries you might have API changes..

> 
> > Yes, some parts of encodings.C can be done using some external library.
> 
> OK, thanks. What parts cannot ?

Don't know


Re: bidi stuff (Dekel ?)

2003-07-30 Thread Dekel Tsur
On Sat, Jul 19, 2003 at 06:02:27PM +0100, John Levon wrote:
> 
> I'm a bit confused why we seem to have our own (incomplete) support for
> bidi stuff. Is there a good reason we're not using fribidi or equivalent ?
> 
> In particular we seem to have fairly hackish support via things like
> auto_number instead of properly implementing the unicode bidi algorithm
> and supporting the implicit LTR/RTL markers.

1) If we want to use the Unicode bidi algorithm then we should first use
UCS32 for the text.

2) The Unicode bidi algorithm uses implicit ordering: the language of the
text is inferred from the Unicode code of the chars.
In LyX, we already mark the language of the text, so it does not make much
sense to use that algorithm.

> Finally, seeing as you're likely to have a pretty good grasp of the
> needed unicode work, can you give your thoughts on where we should go
> from here ? encodings.C *seems* to be an incomplete encoding conversion
> thing for the specific arabic etc. charsets. Why aren't we using
> libiconv ?

Yes, some parts of encodings.C can be done using some external library.


Re: Running LyX remotely: font questions

2003-07-16 Thread Dekel Tsur
On Wed, Jul 16, 2003 at 02:54:04PM +0100, Angus Leeming wrote:
> 
> I have installed the free replacement for the Bakoma fonts on the 
> machine running LyX and on the remote RH8 box. I have the non-free 
> originals on the Tru64 box. If I run LyX locally on the Tru64 machine 
> then all is Ok. If I log into the remote machine from this Tru64 box 
> and run the remote LyX I get red text.
> 
> So it appears that the two sets of fonts are incompatible?

It depends whether LyX uses xft (only the QT frontend uses xft, assuming that 
you have an XFT enables version of QT).

Xft:
- Works only with the ttf fonts
- Font should be installed on the remove machine
- Works only if the local X server supports the RENDER extension
(check with 'xdpyinfo|grep -i render'), although I think that with future
versions of xft, this restriction will be removed.

non Xft:
- Works with the pfb fonts from latex (should also work with the ttf fonts)
- Fonts should be installed on the local machine, and the X server should
support Postscript fonts.




Re: why cut->paste text from other documents = blue underlined?

2003-07-15 Thread Dekel Tsur
On Tue, Jul 15, 2003 at 12:39:48AM +0100, John Levon wrote:
> 
> >, it is desired that LyX should automatically change the language of
> > the copied text to American, and then the user should fix the spelling.
> 
> And what if it's *not* intended to be a single-language document ? You
> just broke my document ...
> 
> I do not see a way we can change language behind the user's back in a
> reliable manner, and I don't think we should.

How about allowing the user to choose in the preferences dialog whether the
language should be changed on paste (but only between dialects of the same
language) ?
Or perhaps asking the user using a yes/no dialog after a text is pasted ?


Re: why cut->paste text from other documents = blue underlined?

2003-07-14 Thread Dekel Tsur
On Mon, Jul 14, 2003 at 12:11:49AM +0100, John Levon wrote:
> On Sun, Jul 13, 2003 at 07:57:43AM -0700, [EMAIL PROTECTED] wrote:
> 
> > By the way, if you would consider the carrying over of a language specification
> > in a cut/paste operation to be in any manner a bug, let me know and I'll file a
> > report.
> 
> It's fully intentional exactly to help avoid color vs. colour problems

Actually, single-language documents are more common than multiple-language
documents.
Thus, when someone copy text from, e.g., British document to an American
document, it is desired that LyX should automatically change the language of
the copied text to American, and then the user should fix the spelling.


Re: why cut->paste text from other documents = blue underlined?

2003-07-14 Thread Dekel Tsur
On Sun, Jul 13, 2003 at 11:34:21PM -0700, [EMAIL PROTECTED] wrote:
> On Sun, Jul 13, 2003 at 03:15:26PM -0300, Garst R. Reese wrote:
> > ...Preferences->Lang Opts>Language>Mark foreign <>
> 
> Thanks.  Couldn't find that one.  With this available, the function
> certainly makes sense.

This will just hide the "problem".
It is better to leave this button enabled, and use the character dialog to
reset the language after pasting from another document.


Re: debian woody/cvs compile problem (fwd)

2003-07-09 Thread Dekel Tsur
On Wed, Jul 09, 2003 at 03:20:58PM +0800, Rod Pinna wrote:
> 
> Yup, I have version 2.57 installed. I've previously done an apt-get
> dselect-upgrade, so (hopefully) have updated everything.

You need to remove the autoconf2.13 package (otherwise autoconf 2.13 will be
used and not 2.57).



Re: hi! all! Anyone has interest in gtk frontend of gtk?

2003-06-26 Thread Dekel Tsur
On Thu, Jun 26, 2003 at 09:54:40PM +0800, Huang Ying wrote:
> > I am not sure how to accomodate you needs (html only), but I think we
> > can work something out so that we can get you snapshots from HEAD cvs.
> Oh! It's so misfortune. But no matter, I think I can recreate it faster
> than the first time. 
> The problem is that I can not access the cvs head. I can access the ftp
> site of lyx, eg. ftp://ftp.lyx.org, so is it possible that I get the cvs
> head from that?

ftp://ftp.sylvan.com/pub/lyx/devel


Re: New Qt math fonts - Linux xft testers required

2003-06-19 Thread Dekel Tsur
On Thu, Jun 19, 2003 at 04:46:46PM +0100, John Levon wrote:
> 
> If you needed latex-ttf-fonts, then uninstall it, and install
> 
> http://movementarian.org/latex-xft-fonts-0.1.tar.gz
> 
> Place the tarball in $HOME/.fonts/ dir, do :
> 
> tar zxvf latex-xft-fonts-0.1.tar.gz
> fc-cache -fv
> 
> And try out lyx. Please report back (if you have problems, give version
> information for qt, X, Xft, lyx, etc.)

Works for me


Re: Hebrew in Ruurd Reitsma's Lyx port

2003-06-14 Thread Dekel Tsur
On Sat, Jun 14, 2003 at 12:50:48AM +0300, [EMAIL PROTECTED] wrote:
> Hello and thanks for answering,
> 
> It would of course be nice if you made a patch, but BEFORE you do this I'll 
> check if the port can be compiled on QT3. since I'm not the one who installed 
> the port, I'm not sure, but I didn't know that the installation included 
> compiling something.

QT3 is commercial so you cannot compile LyX with it yourself.


Re: lyx-devel src/frontends/qt2/ui/: PreambleModuleBase.ui

2003-06-14 Thread Dekel Tsur
On Sat, Jun 14, 2003 at 05:16:09PM +0100, John Levon wrote:
> On Sat, Jun 14, 2003 at 07:10:54PM +0300, Dekel Tsur wrote:
> 
> > On my system, the courier font is called "Courier 10 Pitch" and not
> > adobe-courier. As a result, the font in the preamble dialog is substituted
> > by some unreadable font.
> 
> What "unreadable font" ?
I think it uses "Eufm10".

> It should at least fall back to the default.
It is a QT bug.

> 
> > I guess that we should either use the fixed font defined in ~/.lyx/preferences
> 
> Feel free to do this.

I'm unable to build LyX. I get the following errors:
frontends/qt2/.libs/libqt2.a(Dialogs.o)(.text+0x991): In function
Dialogs::build(std::basic_string,
std::allocator > const&)':
: undefined reference to ControlMath2::ControlMath2[in-charge](Dialog&)'
frontends/qt2/.libs/libqt2.a(QMathDialog.o)(.text+0x178f): In function
QMathDialog::symbol_clicked(std::basic_string,
std::allocator > const&)':
: undefined reference to
ControlMath2::dispatchInsert(std::basic_string,
std::allocator > const&) const'
frontends/qt2/.libs/libqt2.a(QMathDialog.o)(.text+0x17c7): In function
QMathDialog::fracClicked()':
...

gcc 3.2.3
qt 3.1.1


Re: lyx-devel src/frontends/qt2/ui/: PreambleModuleBase.ui

2003-06-14 Thread Dekel Tsur
On Fri, Jun 06, 2003 at 04:27:08PM +, [EMAIL PROTECTED] wrote:
> CVSROOT:  /usr/local/lyx/cvsroot
> Module name:  lyx-devel
> Repository:   lyx-devel/src/frontends/qt2/ui/
> Changes by:   [EMAIL PROTECTED]   03/06/06 16:27:08
> 
> Modified files:
>   lyx-devel/src/frontends/qt2/ui/: PreambleModuleBase.ui 
> 
> Log message:
>   try to get a courier font for the preamble

On my system, the courier font is called "Courier 10 Pitch" and not
adobe-courier. As a result, the font in the preamble dialog is substituted
by some unreadable font.
I guess that we should either use the fixed font defined in ~/.lyx/preferences
or to revert the patch.


Re: Hebrew in Ruurd Reitsma's Lyx port

2003-06-13 Thread Dekel Tsur
On Sun, Jun 08, 2003 at 01:05:14AM +0300, Amir Seginer wrote:
> Hello,
> 
> A friend of mine has installed Ruurd Reitsma's Lyx port on Windows-XP. 
> All seems to work except for one problem. When typing hebrew, the 
> letters  appear in reverse order, i.e. when you type ABC (actually aleph 
> bet gimel) it shows on the screen CBA (gimel bet aleph).

I believe that the problem is that this port uses QT2 and not QT3.
Is there a change of having the port compiled with QT3, or should I make a
patch to workaround this problem ? 


Re: Python help needed ;-)

2003-06-04 Thread Dekel Tsur
On Wed, Jun 04, 2003 at 11:18:09AM +0100, Jose' Matos wrote:
> 
>   I point the answer, use split.
> 
> > Could someone write the 5 lines of code? Plase?
> 
> def convert_external(lines):
> i = 0
> while 1:
> i = find_token(lines, "\\begin_inset External", i)
> if i == -1:
> break
> top = "\\begin_inset External"
> args = string.split(lines[i][len(top)+1:],',')
> template = "\ttemplate " + args[0]
> filename = "\tfilename " + args[1]
> lines[i:i+1] = [top, template, filename]
> i = i + 1

This will fail if the filename contains ','.
It is probably better to use regular expressions (see my other mail).


Re: Python help needed ;-)

2003-06-04 Thread Dekel Tsur
On Wed, Jun 04, 2003 at 10:33:02AM +, Angus Leeming wrote:
> I want to add a module to lyxconvert_221.py to change this:
> 
> \begin_inset External RasterImage,"taulogo.png",""
> 
> \end_inset 
> 
> to this
> 
> \begin_inset External
> template RasterImage
> filename taulogo.png
> 
> \end_inset 
> 
> throwing away the final arg (here "", more generally "") that holds 
> the parameters variable. I guess that we could retain the filename within 
> quotes as LyXLeX will handle that.
> 
> Trouble is, I don't know how to split the line into its constituent parts.

import re
mo = re.search(r'\\begin_inset External (.*),"(.*)",', a)
if mo:
   print "template", mo.group(1)
   print "filename", mo.group(2)

This code will fail if the filename contains the char '"' (how does the lyx
file look in that case ? )


Re: "Float Settings" dialog. comments and a bug

2003-04-03 Thread Dekel Tsur
On Thu, Apr 03, 2003 at 05:45:38PM +0100, John Levon wrote:
> > 
> > 3. Now repopen the "Float settings" and note that the "Bottom of page" 
> >settings is not selected anymore!
> 
> Some latex guy tell me what should be happening here ? I assume 'b' is
> ok for a wide float ?

In standard latex, it is forbidden. There are packages that allow it.


Re: cm fonts status - SOLVED

2003-03-31 Thread Dekel Tsur
On Mon, Mar 31, 2003 at 06:57:41PM +0300, Dan Armak wrote:
> 
> Sorry for shouting SOLVED like that, but I've been working on this for the 
> last three days, and solved the problem through sheer stubbornness, because I 
> started out with zero knowledge... So now I'm really happy :-)
> 
> Someone please fetch and test http://cvs.gentoo.org/~danarmak/fonts.tar.bz2 . 
> These are modified bluesky fonts. Use as a replacement to the bakoma ones (no 
> change needed to lyx code).
> Just put the fonts somewhere under /usr/share/fonts, run fc-cache as root and 
> as user, run lyx with a qt3.1 interface (that uses fontconfig+xft2) and see 
> if the matheditor's formulas show the right characters.
> 
> Someone please confirm that it works (and I wonder about the xforms frontend, 
> since it doesn't use fontconfig afaik...), and if it does work, I'll provide 
> details about it if anyone wants them. If it doesn't... 

I had a problem with the following symbols: \kappa, \upuparrows, 
\backepsilon, \nleqq, \backepsilon and \circleddash.
They appear as a square (the latter two also appear as squares when using
the bakoma fonts, so it is possible that the problem is in lib/symbols).
I'll investigate later.
Also, eufm10.ttf is missing


Re: [PATCH] lyx2lyx: subcaption in LyX file format 2.15

2003-03-31 Thread Dekel Tsur
On Mon, Mar 31, 2003 at 03:36:01PM +0200, Jean-Marc Lasgouttes wrote:
> > "Jos?" == Jos? Matos <[EMAIL PROTECTED]> writes:
> 
> Jos?> On Friday 28 March 2003 17:54, John Levon wrote:
> >> > What is the status of that? Is it supposed to be safe now?
> >> 
> >> Jose said "it was probably OK" or something. It works for me ...
> >> but I don't know python
> 
> Jos?>   The original code is from Dekel, John's fix looks reasonable
> Jos?> to me and I would need to see different cases to fully assert
> Jos?> the validity of the patch.
> 
> Jos?>   That said I think that Jonh code is correct, is deals with one
> Jos?> missing case that is not dealt now, so it should go.
> 
> Unfortunately this is false :( See the message I forwarded a minute
> ago.

This is easy to fix. Attached is an updated patch
? x.lyx
Index: lyxconvert_218.py
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/lyxconvert_218.py,v
retrieving revision 1.33
diff -u -p -r1.33 lyxconvert_218.py
--- lyxconvert_218.py   14 Mar 2003 15:00:02 -  1.33
+++ lyxconvert_218.py   31 Mar 2003 15:53:53 -
@@ -403,9 +403,13 @@ def remove_figinset(lines):
else:
display = "color"
 
-   subcaptionText = get_value(lines, "subcaption", i+1, j)
-   if subcaptionText != "":
-   subcaptionText = '"'+subcaptionText+'"'
+   subcaptionText = ""
+   subcaptionLine = find_token(lines, "subcaption", i+1, j)
+   if subcaptionLine != -1:
+subcaptionText = lines[subcaptionLine][11:]
+   if subcaptionText != "":
+   subcaptionText = '"'+subcaptionText+'"'
+
k = find_token(lines, "subfigure", i+1,j)
if k == -1:
subcaption = 0


Re: bidi methods in LyXText

2003-03-21 Thread Dekel Tsur
On Tue, Mar 18, 2003 at 11:58:08PM +0100, Alfredo Braunstein wrote:
> Alfredo Braunstein wrote:
> 
> > Is there any good reason why all those bidi/rtl methods are inlined in
> 
> Here is a patch.

It seems OK.


Bug: placement of error insets

2003-03-19 Thread Dekel Tsur
Error insets are placed inside words. See attached file.
#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 223
\textclass article
\begin_preamble
\usepackage{cite}
\allowdisplaybreaks[1]
\end_preamble
\language american
\inputencoding default
\fontscheme default
\graphics default
\paperfontsize default
\spacing single 
\papersize Default
\paperpackage a4
\use_geometry 0
\use_amsmath 1
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes 0
\end_header

\layout Proof

Therefore, each equivalence class of the adjacency relation corresponds
 to an interval in 
\begin_inset Formula $\{1,\ldots,k\}$
\end_inset 

.
 More precisely, let 
\begin_inset Formula $1=\bindex{1}<\bindex{2}<\cdots<\bindex{x}<\bindex{x+1}=k+1$
\end_inset 

 be indices 
\the_end


Re: CVS current hang

2003-03-16 Thread Dekel Tsur
On Fri, Mar 14, 2003 at 03:22:00PM -0400, Garst R. Reese wrote:
> I could read this file yesterday.
> Today it hangs until I kill lyx, then it gives the traceback.
> ps shows that python is  running. It looks like the coversion script is
> looping.
>
> bash$ lyx
> lyx2lyx: A development version file.
> lyx2lyx: A development version file.
> Traceback (most recent call last):
>   File "/usr/local/share/lyx/lyx2lyx/lyx2lyx", line 190, in ?
> main(sys.argv)
>   File "/usr/local/share/lyx/lyx2lyx/lyx2lyx", line 187, in main
> write_file(opt.output, header, body)
>   File "/usr/local/share/lyx/lyx2lyx/lyx2lyx", line 164, in write_file
> file.write(line+"\n")
> IOError: [Errno 32] Broken pipe
> Killed

>From the backtrace it doesn't look like lyx2lyx is inside infinite loop.
Do you still have this problem ?


Re: Comment + insetnote

2003-03-15 Thread Dekel Tsur
On Fri, Mar 14, 2003 at 02:55:25AM +, John Levon wrote:
> 
> why do we have both again ?

Currently insetnote is not versatile enough:

- The text does not appear in the .tex file, so if you give someone the .tex
file, he doesn't see the notes.
- You cannot redefine it, so the text will appear in the output.


Re: Tables inside minipage, error in convertion.

2003-03-14 Thread Dekel Tsur
On Thu, Mar 13, 2003 at 07:05:21PM +, Jos?  Matos wrote:
>   after compiling 1.1.6fix4 I was able to make a simple example where we fail.
> 
>   In table-in-minipage.lyx we get two minipages with 2*2 tables inside.
>   table-in-minipage-3.lyx is the same file but made with lyx-1.3.0

I've fixed the bug.
Jose, if you have testcase files, please check that my fix doesn't break
something else.



Re: Problem reading a file

2003-03-14 Thread Dekel Tsur
On Thu, Mar 13, 2003 at 06:36:05PM +, Jos?  Matos wrote:
> On Thursday 13 March 2003 13:17, Yann COLLETTE wrote:
> > Hello,
> >
> > I've got a huge file composed with lyx-1.1.6fix4 I can't export under
> > postscript with lyx-1.2* and lyx-1.3 (I can export it with lyx-1.1.6fix4).
> > When I open the file with lyx-1.3.0, I've got the following error messages.
> 
>   Ok, I found the problem, but not yet the solution.
>   We have problems converting tables inside minipages.
> 
>   Dekel do you have any clue about this?

Can you send a minimal example ?


Re: File loading error.

2003-03-13 Thread Dekel Tsur
On Thu, Mar 13, 2003 at 01:18:36PM +0200, Dekel Tsur wrote:
> On Thu, Mar 13, 2003 at 10:43:34AM +, John Levon wrote:
> > 
> > Hmm OK, so lyx2lyx copes with versions its never asked to output in.
> > 
> > So, feel free to bump the number add an empty file, only to remove it
> > later, despite the fact everyone's fixed all their documents in the time
> > we've been having this silly argument.
> 
> We can use the suggestion I gave in a previous mail (always run lyx2lyx in
> the development LyX), or use the following patch which doesn't require
> new files for lyx2lyx.

Should I apply this patch ?
The other method has the advantage of having consecutive file version
numbers between stable releases, but it requires disabling a block of code
before a release.
Is it important to have consecutive versions ?


Re: Another lyx2lyx problem

2003-03-13 Thread Dekel Tsur
On Thu, Mar 13, 2003 at 12:38:48PM +0100, Jean-Marc Lasgouttes wrote:
> 
> The is still a problem though:
> 
> -\begin_inset Info You don't have to write \maketitle.. LyX does this by itself.
> +\begin_inset Note
> +collapsed true
> +
> +\layout Standard
> +
> +You don't have to write \maketitle.. LyX does this by itself.
>  \end_inset 
> 
> \maketitle should be changed to \backslash maketitle, or something
> like that. It seems that you have added code to do that, but does it
> really work?

It works, but I forgot to do that for the first line. Fixed.


Re: File loading error.

2003-03-13 Thread Dekel Tsur
On Thu, Mar 13, 2003 at 12:39:34PM +0100, Lars Gullik Bj?nnes wrote:
> Dekel Tsur <[EMAIL PROTECTED]> writes:
> 
> | +if x < int(lst_ft[-1]) and x > int(lst_ft[-2]):
> | +sys.stderr.write("lyx2lyx: A development version file.\n")
> | +return lst_ft[-2]
> 
> Okay... what does this indexing mean?
> 
> indexes must be >= 0... are the converted to int? unsinged int?

A negative index -i in python means the i-th element from the end.
So if the file version is in the interval (previous stable #, current dev #)
we consider this file to be a development file, and decrease its version
number to 'previous stable #'.


Re: File loading error.

2003-03-13 Thread Dekel Tsur
On Thu, Mar 13, 2003 at 10:43:34AM +, John Levon wrote:
> 
> Hmm OK, so lyx2lyx copes with versions its never asked to output in.
> 
> So, feel free to bump the number add an empty file, only to remove it
> later, despite the fact everyone's fixed all their documents in the time
> we've been having this silly argument.

We can use the suggestion I gave in a previous mail (always run lyx2lyx in
the development LyX), or use the following patch which doesn't require
new files for lyx2lyx.
Index: src/buffer.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/buffer.C,v
retrieving revision 1.431
diff -u -p -r1.431 buffer.C
--- src/buffer.C12 Mar 2003 11:52:22 -  1.431
+++ src/buffer.C13 Mar 2003 11:15:51 -
@@ -115,7 +115,7 @@ extern BufferList bufferlist;
 
 namespace {
 
-const int LYX_FORMAT = 222;
+const int LYX_FORMAT = 223;
 
 } // namespace anon
 
Index: lib/lyx2lyx/lyx2lyx
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/lyx2lyx,v
retrieving revision 1.7
diff -u -p -r1.7 lyx2lyx
--- lib/lyx2lyx/lyx2lyx 10 Feb 2003 10:27:46 -  1.7
+++ lib/lyx2lyx/lyx2lyx 13 Mar 2003 11:15:52 -
@@ -37,7 +37,7 @@ opt.quiet = 0
 
 format = re.compile(r"(\d)[\.,]?(\d\d)")
 fileformat = re.compile(r"\\lyxformat\s*(\S*)")
-lst_ft = ["210", "215", "216", "217", "218", "220", "221", "222"]
+lst_ft = ["210", "215", "216", "217", "218", "220", "221", "223"]
 
 def usage():
 print """Usage: lyx2lyx [options] file1
@@ -105,10 +105,17 @@ def lyxformat(fmt):
 else:
 sys.stderr.write(fmt + ": " + error.invalid_format)
 sys.exit(2)
-if fmt not in lst_ft:
-sys.stderr.write(fmt + ": " + error.format_not_supported)
-sys.exit(1)
-return fmt
+
+if fmt in lst_ft:
+return fmt
+
+x = int(fmt)
+if x < int(lst_ft[-1]) and x > int(lst_ft[-2]):
+sys.stderr.write("lyx2lyx: A development version file.\n")
+return lst_ft[-2]
+
+sys.stderr.write(fmt + ": " + error.format_not_supported)
+sys.exit(1)
 
 def read_file(file, header, body):
 """Reads a file into the header and body parts"""


Re: Aegis (was: Re: [PATCH] use ParagraphList iterator for reading the doc)

2003-03-13 Thread Dekel Tsur
On Wed, Mar 12, 2003 at 10:50:48PM +0100, Lars Gullik Bj?nnes wrote:
> | 
> | Another alternative is Subversion.
> 
> I would at least wait for version 1.0.

Yes, but if you feel that Subversion will become the CVS replacement, then
we should wait until it is finished, and not move to Aegis.


Re: File loading error.

2003-03-12 Thread Dekel Tsur
On Wed, Mar 12, 2003 at 09:41:00PM +0100, Lars Gullik Bj?nnes wrote:
> | > The why is my Userguide loading?
> | > (older format I guess)
> | 
> | Yes, lyx2lyx will be ok ...
> | 
> | > And at least temporary you need to handle this with some backwards
> | > compability stuff.
> | 
> | Hmm OK.
> | 
> | I don't know how though, how do we detect the end of the header ?
> Easier solution is perhaps to up the format.

This means that lyx2lyx will be broken into a lot of modules, and it might
make it harder to maintain.

A possible solution: change the code in readFile() to
run 'lyx2lyx -f (LYX_FORMAT-1) filename' on files for which 
file_format == LYX_FORMAT, and disable this code when you think all user
have updated their file (it is possible to keep it enabled and disable it
only before a new release).


Re: Aegis (was: Re: [PATCH] use ParagraphList iterator for reading the doc)

2003-03-12 Thread Dekel Tsur
On Wed, Mar 12, 2003 at 07:23:10PM +0100, Lars Gullik Bj?nnes wrote:
> Kuba Ober <[EMAIL PROTECTED]> writes:
> 
> I'll have a look at aegis.
> 
> At first glance it seems to be similar to BitKeeper? What are the
> differences? (And why doesn't Linus want to use aegis?)
> 
> I'll go through the documentation.

Another alternative is Subversion.


Re: Another lyx2lyx problem

2003-03-12 Thread Dekel Tsur
On Wed, Mar 12, 2003 at 03:33:04PM +0100, Jean-Marc Lasgouttes wrote:
> 
> Actually, the latest changes to lyx2lyx are not enough to be able to
> update revtex4.cls.
> 
> The attached diff shows 2 problems:
> 
> 1/ in the old Info inset, the beginning of the message is on the same
> line as \begin_inset. It is lost when using lyx2lyx

I fixed that, although files creates with LyX 1.1.6 do not contain text
in the '\begin_inset Info' line.

> 2/ there is an ERT inset in there, and it gets lost in the conversion
> (where I use -f 218). I understand that the file is not really 218 nor
> 221, but is this unavoidable?

I'm not going to fix that. 


Re: Another lyx2lyx problem

2003-03-12 Thread Dekel Tsur
On Wed, Mar 12, 2003 at 03:12:26PM +0100, Jean-Marc Lasgouttes wrote:
> 
> And I cannot make -o work (although the code for it seems resonable).

It works for me. Note that the -o should appear before the filename.


Re: Another lyx2lyx problem

2003-03-12 Thread Dekel Tsur
On Wed, Mar 12, 2003 at 03:07:59PM +0100, Jean-Marc Lasgouttes wrote:
> 
> If I try to convert revtex4.lyx with latest lyx2lyx to fix it using
>   lyx2lyx/lyx2lyx -f 218 templates/revtex4.lyx 
> I see the warning:
>   Proposed and input file formats do not match: 218 221
> 
> This is good, except that this warning is sent to stdout instead of
> stderr, so that if I redirect the output, it will go i nthe file
> itself.
> 
> I do not know whether there are other warnings/errors which suffer
> from this.

Fixed.


Re: Patch: inverse search.

2003-03-11 Thread Dekel Tsur
On Tue, Mar 11, 2003 at 06:11:15PM +0100, Lars Gullik Bj?nnes wrote:
> | How can I know where are lyxpipes?
> 
> We should remove the config options of being able to set the pipe
> names. Then the pipes can always be found in the same spot.
> 
> Would also reduce config gui clutter a bit.

Isn't the option to select the pipe location needed for people whose home
directories is mounted on NFS ?


Re: lyx2lyx bug? [was: Revtex4 template: was OK, but is now broken !?!]

2003-03-11 Thread Dekel Tsur
On Tue, Mar 11, 2003 at 03:36:20PM +0100, Jean-Marc Lasgouttes wrote:
> The revtex4 template contains snippets like:
> 
> \begin_inset Info Use Thanks layout instead of inserting footnotes.
> Footnotes in the title will do weird things in REVTeX 4!
> \end_inset 
> 
> Obviously lyx2lyx faild to convert these into proper note insets. Is
> there any code to do the conversion?

I've just fixed that (please update status.13x).


Re: lyx-devel src/: ChangeLog text.C

2003-03-10 Thread Dekel Tsur
On Mon, Mar 10, 2003 at 07:02:55PM +, John Levon wrote:
> On Mon, Mar 10, 2003 at 11:04:15AM +0100, Jean-Marc Lasgouttes wrote:
> 
> > Yes, I think this is the kind of bugs John was interested in fixing.
> 
> And indeed, that works fine now :)

But it is still broken in 1.3.1cvs.


Re: lyx-devel src/: ChangeLog text.C

2003-03-10 Thread Dekel Tsur
On Mon, Mar 10, 2003 at 02:46:41AM +, [EMAIL PROTECTED] wrote:
> Modified files:
>   lyx-devel/src/: ChangeLog text.C 
> 
> Log message:
>   fix the row breaking. Sorry all !
>   
>   Anyway, this *should* have one bug less, and be understandable.
>   
>   Guess if my opinion on the "cleverness" of inset-as-metachar has changed
>   (hint: I wasn't a fan)

BTW, row breaking in 1.3.x is broken: the row can be broken after protected
space.


Re: Prosper

2003-03-07 Thread Dekel Tsur
On Thu, Mar 06, 2003 at 07:25:34PM +, Jos?  Matos wrote:
> On Thursday 06 March 2003 14:59, Bas Spitters wrote:
> > Dear Dekel, dear developers,
> >
> > Here are my two-cents: I have made a small adaptation of Dekel Tsur's
> > layout-file for prosper, a LaTeX-package  for making PDF-presentation,
> > together with it small template file. It is useful for me. I hope it is
> > useful for others too.
> 
>   Given the amount of messages that are related with prosper support in LyX I 
> would expected it to be part of the suplied textclasses. Any objection Dekel?

No


Re: AMS patch

2003-03-07 Thread Dekel Tsur
On Thu, Mar 06, 2003 at 12:26:40PM +0100, Jean-Marc Lasgouttes wrote:
> Dekel> In my opinion, it is not a good idea: 1) It complicates the
> Dekel> code 2) It is a good idea to always add the amsmath package
> Dekel> when the user uses math, even when no amsmath macros are used:
> Dekel> For example, if you have a long numbered display formula, the
> Dekel> formula text is written over the number. Amsmath fixes this
> Dekel> bug.
> 
> But are we sure that everybody really use and like amsmath? I
> understand that math people may love it (I do not use it personnally,
> but for no particular reason), but what about physics or whatever? Do
> they have their own solutions? Do they conflict with amsmath?

In my opinion, AMS math should be considered a part of Latex.
We can try my suggestion (and put the validate code inside #ifdef's),
and see if we get complaints.


Re: lyx-devel src/: DepTable.C DepTable.h LaTeX.C ChangeLog

2003-03-07 Thread Dekel Tsur
On Fri, Mar 07, 2003 at 08:49:50PM +, Angus Leeming wrote:
> >> Modified files:
> >> lyx-devel/src/: DepTable.C DepTable.h LaTeX.C ChangeLog
> >> 
> >> Log message:
> >> Fix a bug where the DVI file was not updated due to an old format .dep
> >> file.
> > 
> > Note that the bug occurs when use_tempdir = false.
> 
> Could you post the patch since viewcvs isn't working at the moment?
> 
> > Now this bug is really CRITICAL.
> > The patch must be ported to 1.3.1cvs.

Here is the patch against 1.3.1cvs
Index: LaTeX.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LaTeX.C,v
retrieving revision 1.74
diff -u -p -r1.74 LaTeX.C
--- LaTeX.C 6 Jan 2003 14:02:20 -   1.74
+++ LaTeX.C 7 Mar 2003 21:08:08 -
@@ -169,7 +169,10 @@ int LaTeX::run(TeXErrors & terr, LyXFunc
if (had_depfile) {
lyxerr[Debug::DEPEND] << "Dependency file exists" << endl;
// Read the dep file:
-   head.read(depfile);
+   had_depfile = head.read(depfile);
+   }
+
+   if (had_depfile) {
// Update the checksums
head.update();
// Can't just check if anything has changed because it might have 
aborted
@@ -190,7 +193,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc
run_bibtex = true;
} else
lyxerr[Debug::DEPEND]
-   << "Dependency file does not exist" << endl;
+   << "Dependency file does not exist, or has wrong format" << 
endl;
 
/// We scan the aux file even when had_depfile = false,
/// because we can run pdflatex on the file after running latex on it,
Index: DepTable.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/DepTable.C,v
retrieving revision 1.31
diff -u -p -r1.31 DepTable.C
--- DepTable.C  8 Jan 2003 09:54:18 -   1.31
+++ DepTable.C  7 Mar 2003 21:08:08 -
@@ -237,7 +237,7 @@ void DepTable::write(string const & f) c
 }
 
 
-void DepTable::read(string const & f)
+bool DepTable::read(string const & f)
 {
ifstream ifs(f.c_str());
string nome;
@@ -255,4 +255,5 @@ void DepTable::read(string const & f)
}
deplist[nome] = di;
}
+   return deplist.size();
 }
Index: DepTable.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/DepTable.h,v
retrieving revision 1.14
diff -u -p -r1.14 DepTable.h
--- DepTable.h  21 Mar 2002 17:25:07 -  1.14
+++ DepTable.h  7 Mar 2003 21:08:08 -
@@ -36,8 +36,8 @@ public:
 
///
void write(string const & f) const;
-   ///
-   void read(string const & f);
+   /// returns true if dep file was read successfully
+   bool read(string const & f);
/// returns true if any of the files has changed
bool sumchange() const;
/// return true if fil has changed.


Re: lyx-devel src/: DepTable.C DepTable.h LaTeX.C ChangeLog

2003-03-07 Thread Dekel Tsur
On Fri, Mar 07, 2003 at 09:17:40PM +, [EMAIL PROTECTED] wrote:
> Modified files:
>   lyx-devel/src/: DepTable.C DepTable.h LaTeX.C ChangeLog 
> 
> Log message:
>   Fix a bug where the DVI file was not updated due to an old format .dep file.

Note that the bug occurs when use_tempdir = false.

> 
> Patches:
>  lyx-devel/src/
>  http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/DepTable.C?r1=1.33&r2=1.34
>  http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/DepTable.h?r1=1.15&r2=1.16
>  http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/LaTeX.C?r1=1.77&r2=1.78
>  http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/ChangeLog?r1=1.1078&r2=1.1079

Now this bug is really CRITICAL.
The patch must be ported to 1.3.1cvs.


Re: Towards LyX 1.3.1 [status update #2]

2003-03-07 Thread Dekel Tsur
On Fri, Mar 07, 2003 at 06:33:08PM +0100, Jean-Marc Lasgouttes wrote:
> Dekel> I want to port the following patch to 1.3.1cvs (the patch is
> Dekel> against HEAD). It add 'hspell' option to the list of
> Dekel> spell-checkers (hspell is a spell-checker for Hebrew). Is it OK
> Dekel> ?
> 
> Well, I want to see the final patch first. Does xforms need a similar
> patch?

I've attached a patch against 1.3.1cvs
Xforms needs such a patch, but since the xforms spellcheking dialog cannot
show Hebrew properly, it doesn't make much sense to make such a patch.

> [Sorry for the nice paragraph rebreak]
> 
> Is it really necessary to use such a loop? Isn;t there some kind of
> setCurrentItem(QString)? 

There is, but only in QT3 (according to the docs).

> More generally, I am not a very big fan of last-minute fixes. This is
> not even in 1.4.0.cvs... Can this wait until 1.3.2? We have other
> patches in the queue already.

I guess it can wait, but the patch is quite small.
 
Index: ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ChangeLog,v
retrieving revision 1.389.2.13
diff -u -p -r1.389.2.13 ChangeLog
--- ChangeLog   6 Mar 2003 12:29:41 -   1.389.2.13
+++ ChangeLog   7 Mar 2003 18:10:36 -
@@ -1,3 +1,8 @@
+2003-03-07  Dekel Tsur  <[EMAIL PROTECTED]>
+
+   * QPrefs.C:
+   * QPrefSpellcheckerModule.ui: Add 'hspell' option.
+
 2003-03-06  Dekel Tsur  <[EMAIL PROTECTED]>
 
* qfont_loader.C (available): Rewrite as the old version did not
Index: QPrefs.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QPrefs.C,v
retrieving revision 1.21.2.1
diff -u -p -r1.21.2.1 QPrefs.C
--- QPrefs.C15 Feb 2003 21:46:21 -  1.21.2.1
+++ QPrefs.C7 Mar 2003 18:10:36 -
@@ -188,10 +188,7 @@ void QPrefs::apply()
 
QPrefSpellcheckerModule * spellmod(dialog_->spellcheckerModule);
 
-   if (spellmod->spellCommandCO->currentItem() == 0)
-   rc.isp_command = "ispell";
-   else
-   rc.isp_command = "aspell";
+   rc.isp_command = fromqstr(spellmod->spellCommandCO->currentText());
 
// FIXME: remove isp_use_alt_lang
rc.isp_alt_lang = fromqstr(spellmod->altLanguageED->text());
@@ -441,8 +438,13 @@ void QPrefs::update_contents()
 
QPrefSpellcheckerModule * spellmod(dialog_->spellcheckerModule);
 
-   item = (rc.isp_command == "ispell") ? 0 : 1;
-   spellmod->spellCommandCO->setCurrentItem(item);
+   QString const tmp = qt_(rc.isp_command);
+   for (int i = 0; i < spellmod->spellCommandCO->count(); ++i) {
+   if (spellmod->spellCommandCO->text(i) == tmp) {
+   spellmod->spellCommandCO->setCurrentItem(i);
+   break;
+   }
+   }
// FIXME: remove isp_use_alt_lang
spellmod->altLanguageED->setText(toqstr(rc.isp_alt_lang));
// FIXME: remove isp_use_esc_chars
Index: ui/QPrefSpellcheckerModule.ui
===
RCS file: 
/usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ui/QPrefSpellcheckerModule.ui,v
retrieving revision 1.4.2.1
diff -u -p -r1.4.2.1 QPrefSpellcheckerModule.ui
--- ui/QPrefSpellcheckerModule.ui   17 Feb 2003 00:40:29 -  1.4.2.1
+++ ui/QPrefSpellcheckerModule.ui   7 Mar 2003 18:10:36 -
@@ -193,6 +193,12 @@
 aspell
 
 
+
+
+text
+hspell
+
+
 
 name
 spellCommandCO


Re: Towards LyX 1.3.1 [status update #2]

2003-03-07 Thread Dekel Tsur
On Fri, Mar 07, 2003 at 04:52:09PM +0100, Jean-Marc Lasgouttes wrote:
> 
> I would like to release LyX 1.3.1 next monday. While all the available
> patches are not in yet, I think it is necessary to find a good stopping
> time (as we say in probability theory) and release what we have.

I want to port the following patch to 1.3.1cvs (the patch is against HEAD).
It add 'hspell' option to the list of spell-checkers (hspell is a
spell-checker for Hebrew).
Is it OK ?
Index: ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ChangeLog,v
retrieving revision 1.426
diff -u -p -r1.426 ChangeLog
--- ChangeLog   7 Mar 2003 14:08:08 -   1.426
+++ ChangeLog   7 Mar 2003 16:45:59 -
@@ -1,3 +1,8 @@
+2003-03-07  Dekel Tsur  <[EMAIL PROTECTED]>
+
+   * QPrefs.C:
+   QPrefSpellcheckerModule.ui: Add 'hspell' option.
+
 2003-03-07  Angus Leeming  <[EMAIL PROTECTED]>
 
* Dialogs.C:
@@ -83,6 +88,7 @@
 
* Dialogs3.C: add label dialog.
 
+>>>>>>> 1.426
 2003-03-03  Dekel Tsur  <[EMAIL PROTECTED]>
 
* qfont_loader.C (available): Rewrite as the old version did not
Index: QPrefs.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QPrefs.C,v
retrieving revision 1.25
diff -u -p -r1.25 QPrefs.C
--- QPrefs.C25 Feb 2003 13:35:26 -  1.25
+++ QPrefs.C7 Mar 2003 16:46:00 -
@@ -186,10 +186,7 @@ void QPrefs::apply()
 
QPrefSpellcheckerModule * spellmod(dialog_->spellcheckerModule);
 
-   if (spellmod->spellCommandCO->currentItem() == 0)
-   rc.isp_command = "ispell";
-   else
-   rc.isp_command = "aspell";
+   rc.isp_command = fromqstr(spellmod->spellCommandCO->currentText());
 
// FIXME: remove isp_use_alt_lang
rc.isp_alt_lang = fromqstr(spellmod->altLanguageED->text());
@@ -448,8 +445,13 @@ void QPrefs::update_contents()
 
QPrefSpellcheckerModule * spellmod(dialog_->spellcheckerModule);
 
-   item = (rc.isp_command == "ispell") ? 0 : 1;
-   spellmod->spellCommandCO->setCurrentItem(item);
+   QString const tmp = qt_(rc.isp_command);
+   for (int i = 0; i < spellmod->spellCommandCO->count(); ++i) {
+   if (spellmod->spellCommandCO->text(i) == tmp) {
+   spellmod->spellCommandCO->setCurrentItem(i);
+   break;
+   }
+   }
// FIXME: remove isp_use_alt_lang
spellmod->altLanguageED->setText(toqstr(rc.isp_alt_lang));
// FIXME: remove isp_use_esc_chars
Index: ui/QPrefSpellcheckerModule.ui
===
RCS file: 
/usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ui/QPrefSpellcheckerModule.ui,v
retrieving revision 1.5
diff -u -p -r1.5 QPrefSpellcheckerModule.ui
--- ui/QPrefSpellcheckerModule.ui   17 Feb 2003 00:38:40 -  1.5
+++ ui/QPrefSpellcheckerModule.ui   7 Mar 2003 16:46:00 -
@@ -193,6 +193,12 @@
 aspell
 
 
+
+
+text
+hspell
+
+
 
 name
 spellCommandCO


Re: AMS patch

2003-03-06 Thread Dekel Tsur
On Thu, Mar 06, 2003 at 12:50:12PM +0100, Andre Poenitz wrote:
> On Thu, Mar 06, 2003 at 11:43:45AM +, John Levon wrote:
> > Can you please describe for the idiot (me) what commonly deployed
> > classes, available in lyx, use stuff that clashes with AMS ? Anything
> > that requires ERT could easily still use the checkbox thing ...
> 
> \mho is e.g. a symbol both from wasy and from AMS.

Even if ams is loaded (automatically), you can load the wasysym package,
and it will override the definition of \mho.


Re: AMS patch

2003-03-06 Thread Dekel Tsur
On Thu, Mar 06, 2003 at 12:20:34PM +0100, Andre Poenitz wrote:
> > > Screaming NO. H***, what do you think I am talking about all the time?
> > > If the user does not want AMS, there would be no way to suppress this.
> > 
> > Go to Documents->Extra, deselect "Use AMS Math". I don't understand your
> > point.
> 
> Whenever there was any macro that happened to be the name of a symbol from
> msa or msb, the user got AMS, no matter whether he wanted it or not.
> 
> This is 232 forbidden names to be aware of when writing your preamble or
> when using "unsupported" packages. This happens e.g. for txfonts or wasysym.
> And the latter is even a package we officially claim to support!

This is no worse than the current situation, or the proposed 3-state button:
In the 3-state button suggestion, the default is to use validate, so if the
user defines a macro with a name the same as ams macro, he will get an error,
so he need to go the the document dialog and disable 'use amsmath'.
This is exactly what happens  with my suggestion.


Re: AMS patch

2003-03-06 Thread Dekel Tsur
On Thu, Mar 06, 2003 at 10:33:44AM +, John Levon wrote:
> 
> Heres the start of it, untested. Also needs tex2lyx fixup, and the
> FORMAT changes. Andre, it's in your hands now ;)

In my opinion, it is not a good idea:
1) It complicates the code
2) It is a good idea to always add the amsmath package when the user uses
math, even when no amsmath macros are used:
For example, if you have a long numbered display formula, the formula text
is written over the number. Amsmath fixes this bug.

So my suggestion:
- Enable the "use amsmath" button by default
- Remove the validate code that loads amsmath automatically
(but keep empty validate methods in mathed code, for future use).


Re: [Patch] cases environment requires amsmath

2003-03-06 Thread Dekel Tsur
On Thu, Mar 06, 2003 at 08:14:37AM +0100, Andre Poenitz wrote:
> On Wed, Mar 05, 2003 at 04:28:27PM -0800, Ling Li wrote:
> > The environment "cases" requires amsmath. Patch to math_casesinset.[Ch]
> > and ChangeLog attached. The patch is against 1.3.1cvs.
> 
> \cases is valid plain TeX and is used by some people as such.
> 
> validate() is intentionally almost non-functional for mathed as long as
> there is no possibility for the user to override 'false positives'

I thought we agreed we should enable "use amsmath" by default, and remove
the math validate code (almost) completely.


Re: lyx-devel src/frontends/qt2/: ChangeLog qfont_loader.C

2003-03-04 Thread Dekel Tsur
On Mon, Mar 03, 2003 at 10:31:38PM +, [EMAIL PROTECTED] wrote:
> CVSROOT:  /usr/local/lyx/cvsroot
> Module name:  lyx-devel
> Repository:   lyx-devel/src/frontends/qt2/
> Changes by:   [EMAIL PROTECTED]   03/03/03 22:31:38
> 
> Modified files:
>   lyx-devel/src/frontends/qt2/: ChangeLog qfont_loader.C 
> 
> Log message:
>   Fix math fonts problem

Can I port this to 1.3.1cvs ?
The 1.3 code is clearly broken.


Re: font changes

2003-03-04 Thread Dekel Tsur
On Tue, Mar 04, 2003 at 10:00:33AM +0100, Lars Gullik Bj?nnes wrote:
> 
> After the latest font changes (in mathed I think) I get a lot of these
> messages when loading the UserGuide:
> 
> Could not get font
> '-unknown-cmmi10-medium-r-normal--23-0-0-0-p-0-adobe-fontspecific'.
> I did not get these before, and I do belive that the fonts where found
> and worked.

You are using XForms, right ? (so it is not due to my change in qfont_loader).


Re: latex errors

2003-03-04 Thread Dekel Tsur
On Tue, Mar 04, 2003 at 01:51:55PM +0100, Jean-Marc Lasgouttes wrote:
> Christian> Is lyx supposed to automatically add this directory to
> Christian> latex's search path? That doesn't happen for me anyway...
> Christian> so I have to do: setenv TEXINPUTS
> Christian> ${TEXINPUTS}:/usr/local/share/lyx/tex// to use them. Is
> Christian> this documented, or should it be added to the FAQ?
> 
> Adding the path to TEXINPUTS automatically might not work always, and
> it will not work if one exports latex anyway. The rpms we distribute
> put the files at the right place, I think.

LyX should install these files into the TEXMF tree.
For most users, it is reasonable to install them in
   `kpsexpand '$TEXMFLOCAL'`/tex/latex/lyx/



Re: latex errors

2003-03-04 Thread Dekel Tsur
On Tue, Mar 04, 2003 at 08:01:28AM +, John Levon wrote:
> On Tue, Mar 04, 2003 at 08:44:02AM +0100, Lars Gullik Bj?nnes wrote:
> 
> > If all I get is latex errors when this package is not installed, then
> > something has to change:
> >  - refuse to build
> 
> Please tell me how to disable changelog stuff based on the latex config,
> and I'll make a patch to do this.

It is possible to do that using only latex code:

\IfFileExists{dvipost.sty}{\usepackage{dvipost}}
 {
 \newcommand{\changestart}{\special{color push Blue}}
 \newcommand{\changeend}{\special{color pop}}
 \newcommand{\overstrikeon}{\special{color push Red}}
 \newcommand{\overstrikeoff}{\special{color pop}}
 }


Re: [Patch] Fix for the QT frontend math font bugs

2003-03-03 Thread Dekel Tsur
On Sat, Mar 01, 2003 at 12:26:10AM +, John Levon wrote:
> 
> Looks good, but :
> 
> +   if (cache_set[family])
> +   return cache[family];
> 
> dont  you mean :
> 
>   if (cache_set[family])
>   return true

No. The original code is correct

> Also, are you sure that this QFont() == comparison is useful across Qt
> versions (namely: Qt 2, Qt 3 + fontconfig, Qt 3 + no fontconfig, Qt
> 3/Red Hat etc.)

It seems reasonable that QFont() == QFont(), and QFont != a font that
represent a symbol family.
It might be safer to change getSymbolFont to return a  pair,
where the 2nd return value is success flag (though it will make the code
a little bit uglier).


Re: Mathed is broken

2003-03-01 Thread Dekel Tsur
On Sat, Mar 01, 2003 at 11:42:31AM +0100, Lars Gullik Bj?nnes wrote:
> Andre Poenitz <[EMAIL PROTECTED]> writes:
> 
> | On Fri, Feb 14, 2003 at 05:45:24PM +0200, Dekel Tsur wrote:
> | > Commands like \ldots, \underbrace, \vec, \left( are not working at all:
> | > they draw junk on the screen.
> | 
> | I see it.
> | 
> | Looks like Lars broke math_support.C when he removed the pragmas.
> 
> Hmm... what did I do?

This problem has been fixed already.


[Patch] Fix for the QT frontend math font bugs

2003-02-28 Thread Dekel Tsur
The current code for qfont_loader::available does not work properly
(the problem is in QT: In some cases, the symbol fonts are listed in
QFontDatabase, but QT refuses to load them).
The attached patch should fix the issue we have. Please test.


patch.gz
Description: application/gzip


Re: Closing quote fubar ?

2003-02-25 Thread Dekel Tsur
On Sun, Feb 16, 2003 at 02:06:39PM +0100, Jean-Marc Lasgouttes wrote:
> John Levon a ?crit:
> >On Fri, Feb 14, 2003 at 03:58:52PM +0100, Jean-Marc Lasgouttes wrote:
> >
> >>Because it thinks you use latin1 whereas you really use latin9.
> >
> >
> >So how do we fix it ? I'm stuck. If this  char isn't even in latin9
> 
> We could test against the current language's encoding. I can do that if
> you want.

InsetLatexAccent::draw can set the language of the font to any language it
likes, so if it wants to draw an iso8859-2 char, it can change to an
appropriate language. This must require defining dummy languages in
languages.C.
So this is a mess. The solution: use unicode internally.


ControlDocument::apply

2003-02-25 Thread Dekel Tsur
I just fixed a bug ControlDocument::apply which was due to the fact that
setLanguage() was called before bp_ was updated, in the line 'view().apply()'.
classApply() is still called before this line. I guess that it is OK since
changing the class combox updates bp_ immidately in ::classChanged().
However, wouldn't it be better to move the call to classApply() ?


Re: [PATCH]: More qbibtex enhancements

2003-02-25 Thread Dekel Tsur
On Fri, Feb 14, 2003 at 06:19:43PM +0100, Juergen Spitzmueller wrote:
> > 1. There are several example .bib files (e.g. test.bib, xampl.bib)
> > that should not be listed in the combox.
> 
> Why not? Sometimes I use them for testing purposes (have a look at the new LGT 
> ;), and I think they are useful for newbies (checking out bibtex).

The system .bib files I have are:
test.bib
xampl.bib (if you need a testing bib file you can use test.bib)
amsxport-options.bib (some options for amsxport.bst, not very useful)
mrabbrev.sty
plbib.bib (completely useless test file)

While test.bib and mrabbrev.sty are useful, the other are not, and clutter
the combox. They also confuse newbies.

> > 2. You should add a button for updating the database of bib files.
> 
> Hmm, I just have dropped the update button for the bst list (which was not 
> implemented in qt anyway). Don't you think "reconfigure LyX" will do?

Perhaps its enough.

> > Perhaps the interface should be like the one in the citation dialog, namely
> > using two QListBoxes (although some people might complain that this won't
> > allow them to type the text directly).
>
> Exactly. Typing in text directly is important. It is the only possibility to 
> add a bibfile without path outside $BIBINPUTS (e.g. in the document 
> directory). Also I don't want to blow up the dialog too much (its size)

The current behavior is quite confusing, and I don't care much about the
dialog size.
If you want to keep the option to enter free text, you can add a button for
it (BTW, you cannot use a .bib file in the document dir by entering its name,
as LyX runs bibtex in the temp dir).








Re: PATCH: inverse search.

2003-02-24 Thread Dekel Tsur
On Mon, Feb 24, 2003 at 11:32:25AM -0300, Joao Luis Meloni Assirati wrote:
> 
> As I could see in tetex mail archives, support for src-specials was
> included and later removed due to bad interaction with some packages. I
> don't know if now it is re-introduced.
> 
> Is there someone with a recent tetex that can confirm if the option
> --src-specials to latex is enabled?

I have TeTex 2.0 (Debian unstable), and it supports source specials.


Re: Exporting environment variables.

2003-02-24 Thread Dekel Tsur
On Mon, Feb 24, 2003 at 10:59:33AM -0300, Joao Luis Meloni Assirati wrote:
> 
> I want lyx to export the environment variable XEDITOR to xdvi. Where is
> the best place to put this code?

You can also use 'xdvi -editor ...'.



Re: Elsart layout: How to squash citations [1,2,3,4] into [1-4] ?

2003-02-24 Thread Dekel Tsur
On Mon, Feb 24, 2003 at 01:12:32PM +, Angus Leeming wrote:
> Rob Lahaye wrote: 
> > I'm using the new Elsart layout, though I don't know if that matters.
> > I have trouble to squash multiple citations, e.g. I get [1,2,3,4,5,6]
> > instead of [1-6]. Any idea what I can do about that?
> 
> If you are using natbib, then you'll have to edit the generated LaTeX file 
> by hand:
> \usepackage[numbers,sort&compress]{natbib}

Easier solution: to add 'sort&compress' to the global document options
(in the document dialog).


Re: PATCH: inverse search.

2003-02-23 Thread Dekel Tsur
On Sat, Feb 22, 2003 at 10:47:44PM -0300, Joao Luis Meloni Assirati wrote:
> This is my preliminary patch for inverse (dvi) search in lyx. It relies on
> latex to insert 'source specials', so latex must support the option
> --src-specials. Also, xdvi must support 'source specials'. My versions
> are:

It doesn't compile:
g++ -DHAVE_CONFIG_H -I. -I. -I. -I../boost   -isystem /usr/X11R6/include  -O
-fno-exceptions -W -Wall -Winline -c -o bufferlist.o test -f bufferlist.C ||
echo './'bufferlist.C
bufferlist.C: In member function Buffer* 
   BufferList::getBufferFromTmppath(const std::string&)':
   bufferlist.C:424: no matching function for call to std::basic_string, std::allocator >::compare(std::string&, int, 
   size_t) const'

(and there is a similar problem in lyxfunc.C)

I suggest using prefixIs(), and changing BufferList::getBufferFromTmppath to:
   for (; it != end; ++it) {
   if (prefixIs(s, (*it)->tmppath))
  return *it;
   }
   return 0;

Also, try implementing forward search.


Re: Hints for newbie?

2003-02-21 Thread Dekel Tsur
On Thu, Feb 20, 2003 at 01:27:39PM -0800, James Frye wrote:
> 
> 1) Figure out how to add a font size specification to the
> preferences.xforms init file.  What it comes up with now is almost too
> small to see, especially in things like the Math Panel.

If you are referring to the font in the menus/dialogs, then you should
probably try using the QT frontend.
If you use the QT frontend, you can set the size of the font for menus/dialogs
in KDE control center (or in qtconfig).



More strange behavior

2003-02-19 Thread Dekel Tsur
Create a new document with two paragraphs, the first containing 'a' and the
second containing 'bc'.
1. Put the cursor after the 'a', press shift+right and then ctrl+x ->
nothing happens (in 1.3.1cvs, the two paragraphs are merged).

2. Put the cursor after the 'a', press shift+right _twice_ and then ctrl+x ->
the two paragraph are merged and the 'b' is deleted, but the cursor is moved
to the beginning of the paragraph (in 1.3.1cvs, the cursor stays after the
'a').



Re: Changing article to report/book, math+\text{} problem

2003-02-19 Thread Dekel Tsur
On Wed, Feb 19, 2003 at 10:45:24AM +0100, Karsten Heymann wrote:
> 2. (1.3.0:) when I type in the following in math mode:
>   \textH_xy
>   then xy is roman too although  should move out of the \text
>   inset. I  have to do

I can't see this.
\textH_xy works OK for me (with 1.3.1cvs).



Re: BUG: qdocument bullets

2003-02-18 Thread Dekel Tsur
On Tue, Feb 18, 2003 at 04:16:02PM +, John Levon wrote:
> On Tue, Feb 18, 2003 at 05:00:48PM +0100, Juergen Spitzmueller wrote:
> 
> > What do other qt users get? I'm beginning to suspect that this has something 
> 
> All is groovy for me, Qt 3.0.5, RH8.0. All is broken with 3.1.1

It works OK for me with 3.1.1.



Re: weird math bug related to doble superscripts

2003-02-17 Thread Dekel Tsur
On Mon, Feb 17, 2003 at 12:31:19PM +0100, Christian Ridderstr?m wrote:
> I beg to differ... it's a "dangerous bug". First of all, it doesn't 
> compile the dvi, and secondly, saving it produces a different output.
> This is what the difference looks like:
> 
> ludde:bugs>diff math1.lyx math1_saved.lyx 
> 55c55
> < {J^{l}}^{T}\]
> ---
> > J^{l}^{T}\]

BTW, do you really need {J^l}^T and not J^{l^T} or (J^l)^T ?



Re: Bug with Lyx 1.3 (maths)

2003-02-17 Thread Dekel Tsur
On Mon, Feb 17, 2003 at 10:27:08AM +0100, Andre Poenitz wrote:
> 
> > \newcommand{\eexp}[1]{{\rm e}^{#1}}
> 
> I would expect things like that are neater with math macros...

And furthermore, \rm is a Latex2.09 command. It should not be used with
latex2e.



Re: Bug: delete at the end of a paragraph

2003-02-15 Thread Dekel Tsur
On Sat, Feb 15, 2003 at 06:59:48PM +0200, Dekel Tsur wrote:
> Create a document with two paragraph, save it, quit LyX, and reopen the
> document. Now, go to the end of the 1st paragraph, and press delete:
> LyX doesn't merge the two paragraphs as it suppose to.

Another strange behavior which may be the result of the same bug:
Start a new document, type 'a' and then : The 'a' appears on the
screen, but the space doesn't.



Bug: delete at the end of a paragraph

2003-02-15 Thread Dekel Tsur
Create a document with two paragraph, save it, quit LyX, and reopen the
document. Now, go to the end of the 1st paragraph, and press delete:
LyX doesn't merge the two paragraphs as it suppose to.





Re: Option clash between postscript driver default and using graphicx

2003-02-14 Thread Dekel Tsur
On Fri, Feb 14, 2003 at 12:14:28AM +0100, Christian Ridderstr?m wrote:
> This problem was reported earlier and I've "confirmed" it.
> 
> I don't know if it's a lyx-bug or a latex-bug, here's the rundown:
> 
> This file works: http://www.md.kth.se/~chr/lyx/bugs/option-clash/works.lyx
> 
> This file fails: http://www.md.kth.se/~chr/lyx/bugs/option-clash/fails.lyx
> 
> With the error that the package graphicx has already been loaded with a 
> different option [], and is now being loaded with option [dvips].

Why do we need the Postscript driver anyway ?

1. Graphics check automatically for the correct driver.
2. Even if it weren't, this should be in the global preferences, and not
stored in the document.

I suggest removing it completely, and see if people complain.



Re: [PATCH]: More qbibtex enhancements

2003-02-14 Thread Dekel Tsur
Another comment:

Perhaps the interface should be like the one in the citation dialog, namely
using two QListBoxes (although some people might complain that this won't
allow them to type the text directly).



Re: [PATCH]: More qbibtex enhancements

2003-02-14 Thread Dekel Tsur
On Fri, Feb 14, 2003 at 12:33:44PM +0100, Juergen Spitzmueller wrote:
> Additionally to the unapplied changes here
> http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg52623.html
> I have replaced the LineEdit in QBibtex (to manually add a bib-file without 
> path) with a combobox, that has a list of all available bibtex databases 
> (found by kpsewhich), similar to the bst-combo.
> 
> The list is read in from a new bibFiles.lst file created by the TeXFiles.sh 
> script, where I have added a bib option and changed the version number to 
> v0.3
> 
> IMHO this is the best solution to the question on when using full paths. All 
> files in the combo are found by LaTeX and therefore need no path. All others 
> (inserted with the browser) get full path. The same policy applies now to the 
> style files.

Few comments:

1. There are several example .bib files (e.g. test.bib, xampl.bib)
that should not be listed in the combox.

2. You should add a button for updating the database of bib files.




Re: bad import from 1.1.6 to 1.3

2003-02-14 Thread Dekel Tsur
On Fri, Feb 14, 2003 at 04:47:27PM +0100, Andre Poenitz wrote:
> On Fri, Feb 14, 2003 at 05:43:24PM +0200, Dekel Tsur wrote:
> > > Where else does it lose the extra braces?
> > 
> > The braces are removed when LyX reads the {\displaystyle a} part.
> 
> So you think that hack can go?

Yes.



Mathed is broken

2003-02-14 Thread Dekel Tsur
Commands like \ldots, \underbrace, \vec, \left( are not working at all:
they draw junk on the screen.



Re: bad import from 1.1.6 to 1.3

2003-02-14 Thread Dekel Tsur
On Fri, Feb 14, 2003 at 04:18:29PM +0100, Andre Poenitz wrote:
> On Fri, Feb 14, 2003 at 05:04:13PM +0200, Dekel Tsur wrote:
> > On Fri, Feb 14, 2003 at 03:41:51PM +0100, Andre Poenitz wrote:
> > > 
> > > Now: If the 'nucleus' (i.e. the base part) has size 1  (i.e. is just a
> > > single other inset) _and_ this thing is a NestInset (i.e. something that
> > > contains other "cells" (blue boxes)) _and_ the has a suspicion, that it
> > > wrote unneeded braces by itself, replace the NestInset with the contents of
> > > its first cell.
> > > 
> > > "suspicious" are \displaystyle, ..., \rm, ..., and {}-Insets.
> > 
> > I still don't understand WHY this is needed.
> > After disabling that line, I can still read ${\displaystyle a}^b$
> > which displays without braces on the screen.
> 
> Where else does it lose the extra braces?

The braces are removed when LyX reads the {\displaystyle a} part.



Re: bad import from 1.1.6 to 1.3

2003-02-14 Thread Dekel Tsur
On Fri, Feb 14, 2003 at 03:41:51PM +0100, Andre Poenitz wrote:
> 
> Now: If the 'nucleus' (i.e. the base part) has size 1  (i.e. is just a
> single other inset) _and_ this thing is a NestInset (i.e. something that
> contains other "cells" (blue boxes)) _and_ the has a suspicion, that it
> wrote unneeded braces by itself, replace the NestInset with the contents of
> its first cell.
> 
> "suspicious" are \displaystyle, ..., \rm, ..., and {}-Insets.

I still don't understand WHY this is needed.
After disabling that line, I can still read ${\displaystyle a}^b$
which displays without braces on the screen.



Re: bad import from 1.1.6 to 1.3

2003-02-14 Thread Dekel Tsur
On Fri, Feb 14, 2003 at 02:50:22PM +0100, Andre Poenitz wrote:
> 
> It only happens if there is a macro taking arguments which is neither
> defined as LyX math macro nor otherwise known to mathed _and_ if that
> argument needs its braces. 
> 
> In any case: try fixing it. You will be surprised how "trivial" this is.

Can you explain line 749 in math_parser.C ?
 if (p->nuc().size() == 1 && p->nuc().back()->asNestInset() &&
 p->nuc().back()->extraBraces())
   p->nuc() = p->nuc().back()->asNestInset()->cell(0);

This line remove the brackets only in the case when you have
{...}_ or {...}^ (regardless of whether there are brackets after
the _ or ^ chars).
I can't see bad side effects when disabling this line
(and not the comment above this line...).



Re: bad import from 1.1.6 to 1.3

2003-02-14 Thread Dekel Tsur
On Fri, Feb 14, 2003 at 09:20:07AM +0100, Andre Poenitz wrote:
> On Fri, Feb 14, 2003 at 12:41:51AM +0100, Pedro Tejedor wrote:
> > if you use a math-macro in 1.1.6 it appears sometimes without its 
> > brackets in 1.3.0, which surprisingly works sometimes. I have isolated a 
> >  case where it doesn't work, with a calligraphic font. Attached is a 
> > minimum 1.1.6 file. It doesn't happen with lyx 1.2.3
> 
> The problem is that the math parser does not know that \bfmath takes an
> argument as it does not see the preamble (only math macros and what's in
> lib/symbols). So it sees "\bfmath" and assumes it is a macro without
> arguments, than sees the argument and drops the "superfluous" braces.
> 
> This is obviously a bug, but one that probably can't be fixed without
> breaking other thing. If the braces were left in we'd end up with a lot of
> really superflous braces in other places.

The problem does not occur when you use \bfmath{expr}.
There is only a problem when there is a subscript after the bfmath macro.
In fact, if you write {}_2, when reading the file, the brackets are
removed, which is wrong.
In which cases removing brackets is good (except of course when you remove 
the brackets from the argument(s) of a recognized command like \frac) ?
In my opinion, this is a critical bug, and should be fixes asap.



Re: mouse needed before keys in insert reference

2003-02-13 Thread Dekel Tsur
On Sat, Feb 08, 2003 at 01:14:49PM -0500, Dr. Richard E. Hawkins wrote:
> While it is possible to change the selection in insert-reference with
> the up/down keys, this cannot be done until the mouse is moved into the
> scroll-window (is that the right term?).  This is odd and frustrating.
> 
> If the keys are ususable, home/end and pageup/down should probably also
> work.

XForms sucks. Use the QT frontend.



Re: tex2lyx doesn't compile

2003-02-12 Thread Dekel Tsur
On Wed, Feb 12, 2003 at 07:17:53PM +0100, Andre Poenitz wrote:
> On Wed, Feb 12, 2003 at 07:48:27PM +0200, Dekel Tsur wrote:
> > I get the following error messages (with gcc 3.2.2):
> > 
> > g++ -DHAVE_CONFIG_H -I. -I. -I../../src -I./../ -I../../boost -isystem 
>/usr/X11R6/include -O -fno-exceptions -W -Wall -Winline -c texparser.C -MT 
>texparser.lo -MD -MP -MF .deps/texparser.TPlo
> > In file included from texparser.C:2:
> > texparser.h:87: syntax error before `&' token
> 
> Fixed.

Still doesn't work:

g++ -DHAVE_CONFIG_H -I. -I. -I../../src -I./../ -I../../boost -isystem 
/usr/X11R6/include -O -fno-exceptions -W -Wall -Winline -c texparser.C -MT 
texparser.lo -MD -MP -MF .deps/texparser.TPlo
In file included from texparser.C:2:
texparser.h:140: 'vector' is used as a type, but is not defined as a type.
In file included from /usr/include/c++/3.2/backward/streambuf.h:31,
 from ../../src/support/sstream.h:40,
 from ../../src/Lsstream.h:22,
 from texparser.C:3:
/usr/include/c++/3.2/backward/backward_warning.h:32:2: warning: #warning This file 
includes at least one deprecated or antiquated header. Please consider using one of 
the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include 
substituting the  header for the  header for C++ includes, or  
instead of the deprecated header . To disable this warning use 
-Wno-deprecated.
In file included from ../../src/Lsstream.h:22,
 from texparser.C:3:
../../src/support/sstream.h:44: conflicting types for `struct std::stringbuf'
/usr/include/c++/3.2/iosfwd:110: previous declaration as `typedef struct 
   std::basic_stringbuf, std::allocator > 
   std::stringbuf'
../../src/support/sstream.h:98: syntax error before `;' token
../../src/support/sstream.h:45: destructor `stringbuf' must match class name `
   basic_ios'
../../src/support/sstream.h:45: `virtual std::basic_ios >::~basic_ios()' and `void std::basic_ios<_CharT, 
   _Traits>::basic_ios() [with _CharT = char, _Traits = std::char_traits]
   ' cannot be overloaded
../../src/support/sstream.h:45: `virtual std::basic_ios >::~basic_ios()' and `void std::basic_ios<_CharT, 
   _Traits>::basic_ios() [with _CharT = char, _Traits = std::char_traits]
   ' cannot be overloaded
../../src/support/sstream.h:45: `std::basic_ios 
   >::~basic_ios()' and `void std::basic_ios<_CharT, _Traits>::basic_ios() 
   [with _CharT = char, _Traits = std::char_traits]' cannot be overloaded
../../src/support/sstream.h: In constructor `std::stringbuf::stringbuf(int)':
../../src/support/sstream.h:53: parse error before `;' token
../../src/support/sstream.h:54: class `std::stringbuf' does not have any field 
   named `rpos'
../../src/support/sstream.h:54: class `std::stringbuf' does not have any field 
   named `bufsize'
../../src/support/sstream.h:55: no matching function for call to `
   std::basic_streambuf >::basic_streambuf(int&)'
/usr/include/c++/3.2/streambuf:479: candidates are: 
   std::basic_streambuf<_CharT, _Traits>::basic_streambuf(const 
   std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char, _Traits = 
   std::char_traits]



tex2lyx doesn't compile

2003-02-12 Thread Dekel Tsur
I get the following error messages (with gcc 3.2.2):

g++ -DHAVE_CONFIG_H -I. -I. -I../../src -I./../ -I../../boost -isystem 
/usr/X11R6/include -O -fno-exceptions -W -Wall -Winline -c texparser.C -MT 
texparser.lo -MD -MP -MF .deps/texparser.TPlo
In file included from texparser.C:2:
texparser.h:87: syntax error before `&' token
texparser.h:98: parse error before `&' token
texparser.h:114: `istream' was not declared in this scope
texparser.h:114: `is' was not declared in this scope
texparser.h:114: invalid data member initialization
texparser.h:114: (use `=' to initialize static data members)
texparser.h:114: variable or field `tokenize' declared void
texparser.h:140: 'vector' is used as a type, but is not defined as a type.
In file included from /usr/include/c++/3.2/backward/streambuf.h:31,
 from ../../src/support/sstream.h:40,
 from ../../src/Lsstream.h:22,
 from texparser.C:3:
/usr/include/c++/3.2/backward/backward_warning.h:32:2: warning: #warning This file 
includes at least one deprecated or antiquated header. Please consider using one of 
the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include 
substituting the  header for the  header for C++ includes, or  
instead of the deprecated header . To disable this warning use 
-Wno-deprecated.
In file included from ../../src/Lsstream.h:22,
 from texparser.C:3:
../../src/support/sstream.h:44: conflicting types for `struct std::stringbuf'
/usr/include/c++/3.2/iosfwd:110: previous declaration as `typedef struct 
   std::basic_stringbuf, std::allocator > 
   std::stringbuf'
../../src/support/sstream.h:98: syntax error before `;' token
../../src/support/sstream.h:45: destructor `stringbuf' must match class name `
   basic_ios'



Re: prosper2 documentclass with Lyx 1.3.0

2003-02-11 Thread Dekel Tsur
On Tue, Feb 11, 2003 at 03:37:22PM -0500, Aleksandar Donev wrote:
> I just installed Lyx 1.3.0 (love the Qt GUI!), and am having problems 
> with a Prosper slide presentation with prosper.layout by Dekel Tsur, 
> which worked with earlier versions of LyX. The problem is with figure 
> floats. I now get only one option on the menu for figure floats (package 
> figureflt), and they do not work (there is no figure). Opening older 
> presentations, which use regular figure floats, produces Tex files with 
> the following problematic macro definitions which do not compile:
> 
> %% LyX specific LaTeX commands.
> %% Bold symbol macro for standard LaTeX users
> \newcommand{\boldsymbol}[1]{\mbox{\boldmath $#1$}}
> 
> \floatstyle{}
> \newfloat{}{}{}
> \floatname{}{}
> 
> I am not sure where the problem is and would appreciate any clues.

You need to add

  Input stdfloats.inc
  Input stdcounters.inc

to prosper.layout



Re: reLyX support for \i, \j, \l, \L, \ss

2003-02-10 Thread Dekel Tsur
On Mon, Feb 10, 2003 at 04:43:08PM +, Angus Leeming wrote:
> > I think \ss{} should be stored as a single char without any accent
> > inset or other wrapper.
> 
> So, you are proposing a LyX file format who's contents depend on the 
> locale in which it is read. Doesn't sound too clever to me. What if I 
> wanted to read your document with a locale set to non-latin1?

I thought that we want to move to unicode.
When we do that, we can store accents by a single char, and insetaccents can
be removed.



Re: importing latex

2003-02-07 Thread Dekel Tsur
On Fri, Feb 07, 2003 at 01:21:01PM +0100, Juergen Spitzmueller wrote:
> > > On a related note: would it be possible that lyx2lyx recognizes ERT
> > > natbib commands in older documents and converts it to real citation
> > > insets? I have still some of them from the pre natbib-support era in my
> > > thesis.

> something like this (ERT inset):
> 
>   \begin_inset ERT
>   status Open
> 
>   \layout Standard
> 
>   \backslash 
>   citet[33]{Abraham88}
>   \end_inset 
> 
> should be converted to this (cite inset):
> 
>   \begin_inset LatexCommand \citet[33]{Abraham88}
> 
>   \end_inset 

If we want to support this, we should do it in the 218->220 conversion stage,
so 
   \latex latex
   
   \backslash
   citet[33]{Abraham88}
   \latex default
should be converted to a cite inset.
This can be done in remove_oldert()



Re: bibtex and lyx 1.2.1

2003-02-07 Thread Dekel Tsur
>From lyx-users:
On Thu, Feb 06, 2003 at 11:10:12PM +, Angus Leeming wrote:
> [EMAIL PROTECTED] wrote:
> > 
> > I've recently upgraded from lyx 1.1.6 to 1.2.1 and have run into some
> > problems with bibtex. My old lyx files still compile perfectly with all
> > references in order, however when I have to enter a new citation, the
> > citation popup in lyx only displays the first reference in my Bibtex file.
> > The only way I can enter new references is to write in latex \cite{key}.
> > This works fine but I'm keen to get it working in lyx also. The following
> > is how my Bibtex file blah.bib looks:
> 
> Our BibTeX parser isn't very robust. All will be fine if you move the key 
> onto the same line as the @article etc.

Can we find a more robust parser in bibliography management programs
(e.g. gbib) ? 



Re: \eqref support

2003-02-05 Thread Dekel Tsur
On Mon, Feb 03, 2003 at 10:56:13AM +0100, Andre Poenitz wrote:
> On Sat, Feb 01, 2003 at 05:20:16PM +0200, Dekel Tsur wrote:
> > LyX supports \prettyref which is more general than \eqref.
> > In my opinion, there is no need for \eqref support.
> 
> But is does no harm and people obviously use \eqref or we would
> not get a patch.

Trying to implement every possible latex command from all packages, will
make LyX unusable.
Suppose, for example, that a user wants to insert a reference, and 
LyX offers a choice of 147 types of reference.

As I've written before, \prettyref can be used instead of \eqref.



  1   2   3   4   5   6   7   8   9   10   >