Re:

2005-02-02 Thread Asger Alstrup
Andre Poenitz wrote:
I the long run I think the coord cache should really be cache. It isn't
right now as we sometimes depend on certain values being present. 
I have added some logic so it is easier to detect such errors. I see that 
during update, we rely on some coordinates to be there, when the cursor is 
drawn. Other than that, it seems that the usage of coordCache is pretty 
good. (I did not try with the user guide, because noone sent me one in the 
latest format, and I'm too lazy to install Python.)

To find all these places and replace them by sensible code is no 1.4
business as far as I am concerned, so at the moment, DEPM probably has
to make sure that the cache is in no worse condition then before the
DEPM call.
OK, I propose to add an invalidate method to the cache, and use this to 
flag whether a refresh is needed. The DEPM will set this flag. When I find 
time, I'll implement such a fix, unless someone else beats me to it.

Regards,
Asger


Re:

2005-02-02 Thread Angus Leeming
Asger Alstrup wrote:
 I have added some logic so it is easier to detect such errors. I see that
 during update, we rely on some coordinates to be there, when the cursor
 is drawn. Other than that, it seems that the usage of coordCache is
 pretty good. (I did not try with the user guide, because noone sent me
 one in the latest format, and I'm too lazy to install Python.)

I've just sent it to your laerdal dot dk address.

-- 
Angus



Re: The latest patches break cygwin again

2005-02-02 Thread Angus Leeming
L #define BOOST_POSIX 1

 | Yes, this works.
 
 Ok.
 
 Then we have to decide on the best way to handle this.
 
 If we just make BOOST_POSIX be set for cygwin, then it works for you.
 But for the next guy using cygwin it will break.

No, I don't think so. All our file names currently go through
internal_path which sort-of-posixifies them. I've no idea why things
appear to be working on a true Windows platform, but I think you've just
been lucky.

Seems to me that this is an example of coding practice that we should try
and avaoid in future...

 So are there any kindo of configure tests we can use to discover the
 setting of win/posix kind of setup on cygwin?

Cygwin can understand both. Boost.Filesystem is poorly designed in this
regard. It's been noted before on the boost lists.

-- 
Angus



Re: The latest patches break cygwin again

2005-02-02 Thread Lars Gullik Bjønnes
Angus Leeming [EMAIL PROTECTED] writes:

| L #define BOOST_POSIX 1

 | Yes, this works.
 
 Ok.
 
 Then we have to decide on the best way to handle this.
 
 If we just make BOOST_POSIX be set for cygwin, then it works for you.
 But for the next guy using cygwin it will break.

| No, I don't think so. All our file names currently go through
| internal_path which sort-of-posixifies them. I've no idea why things
| appear to be working on a true Windows platform, but I think you've just
| been lucky.

Ok, then we are back to scratch.

What you are saying is that using filesystem calls from windows.h is
perfectly ok when writing appications for cygwin?

-- 
Lgb



Re: The latest patches break cygwin again

2005-02-02 Thread Angus Leeming
Lars Gullik Bjønnes wrote:
 | L #define BOOST_POSIX 1

 | Yes, this works.
 
 Ok.
 
 Then we have to decide on the best way to handle this.
 
 If we just make BOOST_POSIX be set for cygwin, then it works for you.
 But for the next guy using cygwin it will break.

 | No, I don't think so. All our file names currently go through
 | internal_path which sort-of-posixifies them. I've no idea why things
 | appear to be working on a true Windows platform, but I think you've
 | just been lucky.
 
 Ok, then we are back to scratch.
 
 What you are saying is that using filesystem calls from windows.h is
 perfectly ok when writing appications for cygwin?

I think that we two need to sit down with beers, because all this
long-distance typing just leads to mutual confusion. I'm not trying to
have a go. I'm just trying to help see through the mess.

At the moment, we have a bit of this and a bit of that. 

We have the old way, in which all file names are sort-of-posixified by
os::internal_path before the rest of LyX sees them. Similarly, we
sort-of-go-native when we pass these names through os::external_path on
the way back to the outside world.

We have the new, Boost.Filesystem way which handles all operations on
these file names. You've got lucky because you're effectively constructing
these fs::paths using generic Boost.Filesystem path syntax. Ie, you're
always passing sort-of-posixified file names to the fs::path
constructor, irrespective of the OS.

I guess that the problems are arising because of this half one way, half
the other. Unfortunately, we can't get rid of os::internal_path and use
the obvious and explicit
fs::path(name, fs::native);
to constuct these paths because, as we've just found out, Boost.Filesystem
expects a particular OS to use either Windows or Posix-style paths and
Cygwin can use BOTH. Boost.Filesystem cannot cope with that.

That's my yake on the situation. Does it make sense to you too?

-- 
Angus



Re: scripting support via lyxserver

2005-02-02 Thread Jean-Marc Lasgouttes
 G == G Milde [EMAIL PROTECTED] writes:

G Feature Request ===

G Could the lfun server-notify take an data argument, that is
G passed on to the lyxserver?

Sure. And what about getting rid of the key binding too? Is it really
useful to the client?

JMarc


Re: lyx-tex-lyx round trip problems

2005-02-02 Thread Jean-Marc Lasgouttes
 Georg == Georg Baum [EMAIL PROTECTED] writes:

Georg The attached patch fixes that. It assumes that font changes
Georg like

Georg \size small

Georg are local to a

Georg \begin_layout ... \end_layout

Georg block. Please tell if if assumption is wrong, otherwise thsi
Georg will go in tomorrow.

Well, the assumption is wrong in the sense that some prople like to
write

{\small first paragraph

second paragraph}

If you meant that your patch does not handle that, then indeed some
people will be bitten by that. But it may be that it is too
complicated to handle correctly.

JMarc


Re: Is this too cute?

2005-02-02 Thread Jean-Marc Lasgouttes
 Angus == Angus Leeming [EMAIL PROTECTED] writes:

Angus gv changed its command line options in version 3.6.1 so that it
Angus no longer recognizes `gv -swap`. Instead we need `gv --swap`.
Angus (An extra '-').

Do we really need this -swap option? What about telling people to set
this in their gv prefs instead of doing it for them?

I prefer removing code to adding it :)

JMarc



Re: Is this too cute?

2005-02-02 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:
 Angus gv changed its command line options in version 3.6.1 so that it
 Angus no longer recognizes `gv -swap`. Instead we need `gv --swap`.
 Angus (An extra '-').
 
 Do we really need this -swap option? What about telling people to set
 this in their gv prefs instead of doing it for them?
 
 I prefer removing code to adding it :)

Me too really. But Andreas' suggestion seems to be a reasonable compromise,
no?

-- 
Angus



Re: scripting support via lyxserver

2005-02-02 Thread G. Milde
On  2.02.05, Jean-Marc Lasgouttes wrote:
  G == G Milde [EMAIL PROTECTED] writes:
 
 G Feature Request ===
 
 G Could the lfun server-notify take an data argument, that is
 G passed on to the lyxserver?
 
 Sure. And what about getting rid of the key binding too? Is it really
 useful to the client?

The keybinding is not really needed. If the code becomes more clear and
concise by removing, please do so.

I thought to keep it for backwards compatibility (however, did actually
anyone use server-notify until now?)

Günter


-- 
G.Milde web.de


Re: Is this too cute?

2005-02-02 Thread Jean-Marc Lasgouttes
 Angus == Angus Leeming [EMAIL PROTECTED] writes:

Angus Me too really. But Andreas' suggestion seems to be a reasonable
Angus compromise, no?

Well, it is maybe a good occasion to get rid of this kind of old cruft
that has been here forever. Nobody remembers why it is here, but we do
whatever we can to keep it.

The fact that it requires an X server is enough to avoid running gv in
configure at all (well actually, we could launch an X server just for
the purpose of running the check, but something tells me it is a bad
idea :)

JMarc


Re: [rework docs] default figure placement inside float

2005-02-02 Thread G. Milde
On 28.01.05, G. Milde wrote:
 On 28.01.05, Jean-Marc Lasgouttes wrote:
  
  The contents of figure floats is nothing special, so it is left-right
  justified by default. Therefore, when including a graphics in there,
  it should be centered by hand.
  
  Maybe people would be less annoyed by this if we had a lfun to change
  paragraph alignment (with key bindings).
 
 This would be a nice thing indeed. A workaround for current LyX 1.3.x would
 be a Centred-Standard layout style
...

I did not consider the center-environment problem. Setting the 
alignment to center (in 1.3.4) puts a paragraph in a \begin{center}
\end{center} pair, thus introducing additional whitespace. This is why
Herberts Tips and Tricks recommend \centering.

The following line binds the ^-Shift-B key to insert a figure-float with
centred graphic-file.

\bind C-S-B command-sequence float-insert figure; break-paragraph; 
ert-insert; self-insert \centering ;inset-toggle;graphics-insert

Günter


-- 
G.Milde web.de


Re: scripting support via lyxserver

2005-02-02 Thread Jean-Marc Lasgouttes
 G == G Milde [EMAIL PROTECTED] writes:

G The keybinding is not really needed. If the code becomes more clear
G and concise by removing, please do so.

It does not really change the code. It is just a matter of design of
the lyxsever protocol.

G I thought to keep it for backwards compatibility (however, did
G actually anyone use server-notify until now?)

That's the interesting question, actually :)

JMarc


Re: scripting support via lyxserver

2005-02-02 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:

 G == G Milde [EMAIL PROTECTED] writes:

| G The keybinding is not really needed. If the code becomes more clear
| G and concise by removing, please do so.

| It does not really change the code. It is just a matter of design of
| the lyxsever protocol.

And that needs some love and care. (read: complete rewrite)

I have that on the agenda... but we must get this CVS thingie released
first.

-- 
Lgb



Re: Is this too cute?

2005-02-02 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:

 Angus == Angus Leeming [EMAIL PROTECTED]
 writes:
 
 Angus Me too really. But Andreas' suggestion seems to be a reasonable
 Angus compromise, no?
 
 Well, it is maybe a good occasion to get rid of this kind of old cruft
 that has been here forever. Nobody remembers why it is here, but we do
 whatever we can to keep it.
 
 The fact that it requires an X server is enough to avoid running gv in
 configure at all (well actually, we could launch an X server just for
 the purpose of running the check, but something tells me it is a bad
 idea :)

Ok, then I'll do as you suggest.

Currently, I'm trying to get LyX to run as
  /home/angus/Program\ Files/LyX/bin/lyx-1.3.6cvs

but it's hanging whilst running ../share/lyx/configure at
  checking LaTeX configuration... auto

If I subsequently kill lyx and restart it, then all is Ok. At that point,
my .lyx directory contains:

$ ls ~/.lyx-1.3.6cvs/
binddoc   images   reLyX  ui  xfonts
chklayouts.tex  examples  kbd  scriptswrap_chkconfig.log
clipart help  layouts  templates  wrap_chkconfig.ltx

Note, no lyxrc.defaults (because I killed LyX whilst reconfiguring?)

$ cat wrap_chkconfig.ltx
\newcommand\srcdir{/home/angus/Program Files/LyX/share/lyx-1.3.6cvs}
\def\haslinuxdoc{yes}
\def\hasdocbook{yes}
\input{/home/angus/Program Files/LyX/share/lyx-1.3.6cvs/chkconfig.ltx}

$ ls -l wrap_chkconfig.log
-rw-rw-r--  1 angus angus 0 Feb  2 11:25 wrap_chkconfig.log

Any ideas?

-- 
Angus



Re: Is this too cute?

2005-02-02 Thread Jean-Marc Lasgouttes
 Angus == Angus Leeming [EMAIL PROTECTED] writes:
Angus Currently, I'm trying to get LyX to run as /home/angus/Program\
Angus Files/LyX/bin/lyx-1.3.6cvs

Angus but it's hanging whilst running ../share/lyx/configure at
Angus checking LaTeX configuration... auto

Angus Any ideas?

Sure, it is not supposed to work :) I have to backport the changes
that I did for 1.4.0cvs to make it work in an environment with hostile
spaces... 

JMarc


Re: lyx-tex-lyx round trip problems

2005-02-02 Thread Georg Baum
Jean-Marc Lasgouttes wrote:

 Well, the assumption is wrong in the sense that some prople like to
 write
 
 {\small first paragraph
 
 second paragraph}
 
 If you meant that your patch does not handle that, then indeed some
 people will be bitten by that. But it may be that it is too
 complicated to handle correctly.


This is handled correctly. What I meant was wether par2 in the
following .lyx snippet is in tiny size or normal:

\begin_layout Standard
\size tiny
par1
\end_layout

\begin_layout Standard
par2
\end_layout


Anyway, I just tried, and par2 is in normal size, so I'll just commit the
patch. I should have tried yesterday instead of asking, but it has been a
long day...


Georg



Re: lyx-tex-lyx round trip problems

2005-02-02 Thread Jean-Marc Lasgouttes
 Georg == Georg Baum [EMAIL PROTECTED] writes:

Georg Anyway, I just tried, and par2 is in normal size, so I'll just
Georg commit the patch. I should have tried yesterday instead of
Georg asking, but it has been a long day...

Fine.

JMarc


Re: [rework docs] default figure placement inside float

2005-02-02 Thread Georg Baum
G. Milde wrote:

 I did not consider the center-environment problem. Setting the
 alignment to center (in 1.3.4) puts a paragraph in a \begin{center}
 \end{center} pair, thus introducing additional whitespace. This is why
 Herberts Tips and Tricks recommend \centering.

Again: This is fixed in 1.4. What is still missing is the lyx2lyx conversion
and an option for lyx2lyx to be strict (convert the old centering option to
ERT) or not (implicitly convert the old centering option to the new one)

 The following line binds the ^-Shift-B key to insert a figure-float with
 centred graphic-file.
 
 \bind C-S-B command-sequence float-insert figure; break-paragraph;
 ert-insert; self-insert \centering ;inset-toggle;graphics-insert

This looks useful for 1.3. Is it on the wiki?


Georg



[PATCHes 13x, 14x]

2005-02-02 Thread Angus Leeming
The 1.4.x patch enables us to successfully split up a string
into an argv array of words to pass to execvp.

The 1.3.x patch backports this patch, backports also the 1.4.x
code for LibScriptSearch and backports the 1.4.x code to interpret
the $$s placeholder.

Both patches will result in output like this when execvp is invoked:

command
python
/home/angus/Program Files/LyX/share/lyx-1.3.6cvs/scripts/lyxpreview2ppm.py
/tmp/lyx_tmpdir6936exmZuO/lyx_tmpbuf0/0lyxpreview.tex
129
ppm
/command

(So long as you get beyond the LyX hands when running configure problem.)

-- 
AngusIndex: src/support/forkedcall.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/forkedcall.C,v
retrieving revision 1.21
diff -u -p -r1.21 forkedcall.C
--- src/support/forkedcall.C	20 Jan 2005 15:38:14 -	1.21
+++ src/support/forkedcall.C	2 Feb 2005 12:32:23 -
@@ -257,47 +257,59 @@ int Forkedcall::generateChild()
 		return 1;
 
 	// Split the input command up into an array of words stored
-	// in a contiguous block of memory.
-	char const * const c_str = line.c_str();
+	// in a contiguous block of memory. The array contains pointers
+	// to each word.
 	// Don't forget the terminating `\0' character.
+	char const * const c_str = line.c_str();
 	vectorchar vec(c_str, c_str + line.size() + 1);
-	// Turn the string into an array of words, each terminated with '\0'.
-	std::replace(vec.begin(), vec.end(), ' ', '\0');
+
+	// Splitting the command up into an array of words means replacing
+	// the whitespace between words with '\0'. Life is complicated
+	// however, because words protected by quotes can contain whitespace.
+	//
+	// The strategy we adopt is:
+	// 1. If we're not inside quotes, then replace white space with '\0'.
+	// 2. If we are inside quotes, then don't replace the white space
+	//but do remove the quotes themselves. We do this naively by
+	//replacing the quote with '\0' which is fine if quotes
+	//delimit the entire word.
+	char inside_quote = 0;
+	vectorchar::iterator it = vec.begin();
+	vectorchar::iterator const end = vec.end();
+	for (; it != end; ++it) {
+		char const c = *it;
+		if (!inside_quote) {
+			if (c == ' ')
+*it = '\0';
+			else if (c == '\'' || c == '') {
+*it = '\0';
+inside_quote = c;
+			}
+		} else if (c == inside_quote) {
+			*it = '\0';
+			inside_quote = 0;
+		}
+	}
 
 	// Build an array of pointers to each word.
-	vectorchar::iterator vit = vec.begin();
-	vectorchar::iterator vend = vec.end();
+	it = vec.begin();
 	vectorchar * argv;
 	char prev = '\0';
-	for (; vit != vend; ++vit) {
-		if (*vit != '\0'  prev == '\0')
-			argv.push_back(*vit);
-		prev = *vit;
+	for (; it != end; ++it) {
+		if (*it != '\0'  prev == '\0')
+			argv.push_back(*it);
+		prev = *it;
 	}
-	// Strip quotes. Does so naively, assuming that the word begins
-	// and ends in quotes.
+	argv.push_back(0);
+
+	// Debug output.
 	vectorchar *::iterator ait = argv.begin();
 	vectorchar *::iterator const aend = argv.end();
-	for (; ait != aend; ++ait) {
-		char * word = *ait;
-		std::size_t const len = strlen(word);
-		if (len = 2) {
-			char  first = word[0];
-			char  last = word[len-1];
-
-			if (first == last 
-			(first == '\'' || first == '')) {
-first = '\0';
-last = '\0';
-*ait += 1;
-			}
-		}
-	}
-
-	ait = argv.begin();
+	lyxerr  command\n;
 	for (; ait != aend; ++ait)
-		std::cout  *ait  std::endl;
-	argv.push_back(0);
+		if (*ait)
+			lyxerr  '\t' *ait  '\n';
+	lyxerr  /command  std::endl;
 
 #ifndef __EMX__
 	pid_t const cpid = ::fork();
Index: lib/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ChangeLog,v
retrieving revision 1.363.2.92
diff -u -p -r1.363.2.92 ChangeLog
--- lib/ChangeLog	28 Jan 2005 15:12:52 -	1.363.2.92
+++ lib/ChangeLog	2 Feb 2005 12:25:02 -
@@ -1,3 +1,7 @@
+2005-01-20  Angus Leeming  [EMAIL PROTECTED]
+
+	* configure.m4: Invoke scripts as python $$s/scripts/foo.py, etc.
+
 2005-01-02  Kayvan A. Sylvan  [EMAIL PROTECTED]
 
 	* configure.m4: add \cygwin_path_fix_needed to lyrxc.defaults.
Index: lib/configure.m4
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/configure.m4,v
retrieving revision 1.60.2.13
diff -u -p -r1.60.2.13 configure.m4
--- lib/configure.m4	28 Jan 2005 15:12:53 -	1.60.2.13
+++ lib/configure.m4	2 Feb 2005 12:25:03 -
@@ -297,7 +297,7 @@ SEARCH_PROG([for a DVI to PDF converter]
 test $dvi_to_pdf_command = dvipdfm  dvi_to_pdf_command=dvipdfm \$\$i
 
 # We have a script to convert previewlyx to ppm
-lyxpreview_to_bitmap_command=lyxpreview2ppm.py
+lyxpreview_to_bitmap_command=python \$\$s/scripts/lyxpreview2ppm.py
 
 # Search a *roff program (used to translate tables in ASCII export)
 LYXRC_PROG([for a *roff formatter], \ascii_roff_command, dnl
Index: src/frontends/xforms/ChangeLog

Re: [PATCHes 13x, 14x]

2005-02-02 Thread Jean-Marc Lasgouttes
 Angus == Angus Leeming [EMAIL PROTECTED] writes:

Angus The 1.4.x patch enables us to successfully split up a string
Angus into an argv array of words to pass to execvp.

Angus The 1.3.x patch backports this patch, backports also the 1.4.x
Angus code for LibScriptSearch and backports the 1.4.x code to
Angus interpret the $$s placeholder.

This one is OK with me.

JMarc



Re: Is this too cute?

2005-02-02 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:
 Angus Currently, I'm trying to get LyX to run as /home/angus/Program\
 Angus Files/LyX/bin/lyx-1.3.6cvs
 
 Angus but it's hanging whilst running ../share/lyx/configure at
 Angus checking LaTeX configuration... auto
 
 Angus Any ideas?
 
 Sure, it is not supposed to work :) I have to backport the changes
 that I did for 1.4.0cvs to make it work in an environment with hostile
 spaces...

Yes, it is getting stuck in the call to LaTeX here:

  done | sed -e 's%^.*layouts/\(.*\)\.layout$%\\TestDocClass{\1}%'\
   chklayouts.tex
  eval ${LATEX} wrap_chkconfig.ltx 2/dev/null | grep '^\+'
  eval `cat chkconfig.vars | sed 's/-/_/g'`
fi

So, should we make it work? I guess that it will work already on Windows
for those who use MikTeX and they're the ones who will be running a LyX
installed as C:\Program Files\LyX\bin\lyx.exe

*sigh*. Sometimes this coding lark is a PITA. I only tried this out because
I wanted to test the code in forkedcall.C that breaks a string into an
array of words.

-- 
Angus



Re: Is this too cute?

2005-02-02 Thread Jean-Marc Lasgouttes
 Angus == Angus Leeming [EMAIL PROTECTED] writes:

Angus So, should we make it work? I guess that it will work already
Angus on Windows for those who use MikTeX and they're the ones who
Angus will be running a LyX installed as C:\Program
Angus Files\LyX\bin\lyx.exe

I'll send a tentative patch soon. 

JMarc



Re: Is this too cute?

2005-02-02 Thread Andreas Vox
Jean-Marc wrote:
The fact that it requires an X server is enough to avoid running gv in
configure at all (well actually, we could launch an X server just for
the purpose of running the check, but something tells me it is a bad
idea :)
Well, actually it would also work with (man gv | grep -e --swap),
then it would only require a correctly set MANPATH ;-)
/Andreas


Re: [PATCHes 13x, 14x]

2005-02-02 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:
 Angus The 1.4.x patch enables us to successfully split up a string
 Angus into an argv array of words to pass to execvp.
 
 Angus The 1.3.x patch backports this patch, backports also the 1.4.x
 Angus code for LibScriptSearch and backports the 1.4.x code to
 Angus interpret the $$s placeholder.
 
 This one is OK with me.

Ok. Committed.

I do believe that we're just about done. Here's the top of my immediate
to-do list that I posted to Asger this morning (he was trying to distract
me ;-))

1. Enable LyX 1.3.x to spawn child processes on Windows in a 
non-blocking way. Code should be minimally invasive. Ignore stream 
redirection.

2. Release LyX 1.3.6. LyX/Win will (for the first time) be a 
formally-supported platform. Indeed, it looks like it will be an 
almost-first-class-citizen. The only thing not working will be the 
lyxserver.

However, if we're going to stick our heads up above the parapet and 
say, Look! LyX works on Windows too!, then we'd better make sure it 
works well. So there's lots of testing and tweaking to go before (2) 
becomes a reality.

Many thanks for bearing with me with all this. It's been 7 weeks and 2 days
of hard work to get here ;-)

-- 
Angus



Re: Is this too cute?

2005-02-02 Thread Jean-Marc Lasgouttes
 Angus == Angus Leeming [EMAIL PROTECTED] writes:

Angus So, should we make it work? I guess that it will work already
Angus on Windows for those who use MikTeX and they're the ones who
Angus will be running a LyX installed as C:\Program
Angus Files\LyX\bin\lyx.exe

Could you try the following backport of the 1.4.x port? I did not have
the time to actually test it, all I can say is that it still seems to
work in the normal case.

JMarc

Index: lib/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ChangeLog,v
retrieving revision 1.363.2.94
diff -u -p -r1.363.2.94 ChangeLog
--- lib/ChangeLog	2 Feb 2005 13:12:21 -	1.363.2.94
+++ lib/ChangeLog	2 Feb 2005 13:20:49 -
@@ -1,3 +1,16 @@
+2005-02-02  Jean-Marc Lasgouttes  [EMAIL PROTECTED]
+
+	* configure.m4: instead of \input-ing the layout files directly in
+	latex, grep out the correct command from them; remove need for
+	\srcdir. This should fix the bug where latex configuration cannot
+	be done because LyX is installed in a directory which name
+	contains spaces.
+
+	* chkconfig.ltx: remove use of macro \srcdir
+	(\TestDocClass): change to take two arguments
+	(\DeclareLaTeXClass, \DeclareLinuxDocClass, \DeclareDocBookClass):
+	do not exit after execution
+
 2005-01-28  Jean-Marc Lasgouttes  [EMAIL PROTECTED]
 
 	* reLyX/acinclude.m4 (RELYX_ERROR, RELYX_USE_PACKAGING): new
Index: lib/chkconfig.ltx
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/chkconfig.ltx,v
retrieving revision 1.9.6.2
diff -u -p -r1.9.6.2 chkconfig.ltx
--- lib/chkconfig.ltx	13 Nov 2003 15:51:43 -	1.9.6.2
+++ lib/chkconfig.ltx	2 Feb 2005 13:20:49 -
@@ -35,24 +35,16 @@
 
 % we do not want to stop on errors
 \nonstopmode\makeatletter
-% Have we been called from the configure script?
[EMAIL PROTECTED]
- {\message{%
- WARNING: For proper results, you should not run this script directly.^^J%
- Please use the `configure' script.^^J}
-  \newcommand\srcdir{.}}
- [EMAIL PROTECTED]/}}}
 
 %%% Some useful macros.
 %   Several commands are defined to test for packages:
 %\AddLayout{layout} adds an entry for layout in textclass.lst
 %\AddVariable{name}{value} creates a new variable chk_name,
 %  and gives it the value value.
-%\TestDocClass[file]{name} tests whether name.cls (or file,
-%  if it is provided) exists and creates a new entry with
-%  \AddLayout if this is the case. Note that you will probably not
-%  need to use this directly, since the configure script generates
-%  the needed macro calls automatically.
+%\TestDocClass{name}{command} if layout name has not already
+%  been tested for, execute command. Note that you will
+%  probably not need to use this directly, since the configure
+%  script generates the needed macro calls automatically.
 %\TestPackage[file]{name} tests whether name.sty (or file,
 %  if it is provided) exists. 
 %   Both commands call \AddVariable to give value 'yes' or 'no' to
@@ -95,13 +87,10 @@
   \fi}
 \newcommand{\TestPackage}[2][\default]{
   \TestItem[#1]{#2}{package}{sty}{\AddPackage{#2}}{}}
-\newcommand{\TestDocClass}[1]{
+\newcommand{\TestDocClass}[2]{
\def\layoutname{#1}  % remember the name of the layout file
[EMAIL PROTECTED]@#1}
- {\bgroup
-\catcode`\#=9  % consider # as a space
-\input{layouts/#1.layout}  % read the layout file
-  \egroup
+ {#2  % execute the command
   [EMAIL PROTECTED]@#1}{}} 
  {} % we have already tried this one.
 }
@@ -109,7 +98,6 @@
   \TestItem[#1]{\layoutname}{document class}{cls}
{\AddLayout[\firstelement]{\layoutname}{#2}{true}}
{\AddLayout[\firstelement]{\layoutname}{#2}{false}}
-  \expandafter\endinput
 }
 \newcommand{\DeclareLinuxDocClass}[2][\default]{
   \message{^^J\prefix checking for linuxdoc class \layoutname... }
@@ -118,7 +106,6 @@
  \AddLayout[#1]{\layoutname}{#2}{false}}
 {\message{yes^^J}
  \AddLayout[#1]{\layoutname}{#2}{true}}
-  \expandafter\endinput
 }
 % Only for compatibility. Will be removed later.
 \let\DeclareSGMLClass=\DeclareDocBookClass
@@ -130,7 +117,6 @@
  \AddLayout[#1]{\layoutname}{#2}{false}}
 {\message{yes^^J}
  \AddLayout[#1]{\layoutname}{#2}{true}}
-  \expandafter\endinput
 }
 
 % Stolen from article.cls
Index: lib/configure.m4
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/configure.m4,v
retrieving revision 1.60.2.14
diff -u -p -r1.60.2.14 configure.m4
--- lib/configure.m4	2 Feb 2005 12:58:05 -	1.60.2.14
+++ lib/configure.m4	2 Feb 2005 13:20:49 -
@@ -165,8 +165,8 @@ ac_prog=[$]0
 changequote(,)dnl
 srcdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
 srcdir=`echo ${srcdir} | sed 's%\([^/]\)/*$%\1%'`
-test x$srcdir = x$ac_prog  srcdir=.
-if test ! -r ${srcdir}/chkconfig.ltx ; then
+test x${srcdir} = x$ac_prog  srcdir=.

Re: JMarc's configure changes

2005-02-02 Thread Jean-Marc Lasgouttes
 Angus == Angus Leeming [EMAIL PROTECTED] writes:

Angus Ok, I tried out the patch. In fact, it does not address the
Angus problem above.

Did you run autogen.sh? I am surprised that this problem is still
present (note the added RELYX_USE_PACKAGING).

Anyway, here is the same patch for 1.4.0cvs, which I intend to apply,
since I did apply the 1.3.x version.

JMarc

Index: ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v
retrieving revision 1.995
diff -u -p -r1.995 ChangeLog
--- ChangeLog	2 Feb 2005 13:15:54 -	1.995
+++ ChangeLog	2 Feb 2005 13:38:02 -
@@ -1,5 +1,8 @@
 2005-02-02  Jean-Marc Lasgouttes  [EMAIL PROTECTED]
 
+	* configure.ac: if the prefix contains space, replace it with
+	${builddir}/installprefix and issue a warning.
+
 	* configure.ac: when testing for AikSaurus, do not require libbz2.
 
 2005-01-27  Lars Gullik Bjonnes  [EMAIL PROTECTED]
Index: configure.ac
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v
retrieving revision 1.42
diff -u -p -r1.42 configure.ac
--- configure.ac	2 Feb 2005 13:17:23 -	1.42
+++ configure.ac	2 Feb 2005 13:38:02 -
@@ -229,6 +229,13 @@ LYX_USE_PACKAGING
 # fix the value of the prefixes.
 test x$prefix = xNONE  prefix=$default_prefix
 test x$exec_prefix = xNONE  exec_prefix='${prefix}'
+if echo $prefix |grep ' ' /dev/null 2/dev/null ; then
+  LYX_WARNING([The installation prefix \${prefix}\ contains a space, which
+   causes problems with the Makefiles. The installation will be done in 
+   directory \`pwd`/installprefix\ instead. Please move its contents to
+   the right place after installation.])
+  prefix=`pwd`/installprefix
+fi
 
 ### Setup GNU gettext
 dnl GNU gettext is written in C
Index: config/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/ChangeLog,v
retrieving revision 1.153
diff -u -p -r1.153 ChangeLog
--- config/ChangeLog	20 Jan 2005 14:44:19 -	1.153
+++ config/ChangeLog	2 Feb 2005 13:38:02 -
@@ -1,3 +1,8 @@
+2005-02-02  Jean-Marc Lasgouttes  [EMAIL PROTECTED]
+
+	* lyxinclude.m4 (LYX_USE_PACKAGING): remove single quotes around
+	prefix in the windows case.
+
 2005-01-20  Jean-Marc Lasgouttes  [EMAIL PROTECTED]
 
 	* common.am (pch-file): new target, used recursively by target
Index: config/lyxinclude.m4
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/lyxinclude.m4,v
retrieving revision 1.106
diff -u -p -r1.106 lyxinclude.m4
--- config/lyxinclude.m4	12 Jan 2005 17:01:35 -	1.106
+++ config/lyxinclude.m4	2 Feb 2005 13:38:02 -
@@ -571,7 +571,7 @@ case $lyx_use_packaging in 
 	   datadir='${prefix}/Contents/Resources'
 	   mandir='${prefix}/Contents/Resources/man' ;;
   windows) AC_DEFINE(USE_WINDOWS_PACKAGING, 1, [Define to 1 if LyX should use a Windows-style file layout]) 
-   default_prefix='C:/Program Files/LyX'
+   default_prefix=C:/Program Files/LyX
 	   bindir='${prefix}/bin'
 	   datadir='${prefix}/Resources'
 	   mandir='${prefix}/Resources/man' ;;
Index: lib/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ChangeLog,v
retrieving revision 1.668
diff -u -p -r1.668 ChangeLog
--- lib/ChangeLog	24 Jan 2005 17:12:15 -	1.668
+++ lib/ChangeLog	2 Feb 2005 13:38:04 -
@@ -1,3 +1,10 @@
+2005-02-02  Jean-Marc Lasgouttes  [EMAIL PROTECTED]
+
+	* reLyX/configure.ac: use RELYX_USE_PACKAGING as in main configure.
+
+	* reLyX/acinclude.m4 (RELYX_ERROR, RELYX_USE_PACKAGING): new
+	macros. 
+
 2005-01-15  Georg Baum  [EMAIL PROTECTED]
 
 	* ui/classic.ui, ui/stdmenus.ui: add output-changes.
Index: lib/reLyX/acinclude.m4
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/reLyX/acinclude.m4,v
retrieving revision 1.5
diff -u -p -r1.5 acinclude.m4
--- lib/reLyX/acinclude.m4	25 May 2004 14:42:10 -	1.5
+++ lib/reLyX/acinclude.m4	2 Feb 2005 13:38:04 -
@@ -7,6 +7,15 @@ relyx_warning_txt=$relyx_warning_txt
 relyx_warning=yes])
 
 
+dnl Usage: RELYX_ERROR(message)  Displays the error message and sets
+dnl the flag lyx_error to yes.
+AC_DEFUN([RELYX_ERROR],[
+relyx_error_txt=$relyx_error_txt
+== $1
+
+relyx_error=yes])
+
+
 dnl RELYX_SEARCH_PROG(VARIABLE-NAME,PROGRAMS-LIST,ACTION-IF-FOUND)
 dnl
 define([RELYX_SEARCH_PROG],[dnl
@@ -99,3 +108,32 @@ $relyx_warning_txt
 EOF
 fi
 fi])
+
+
+dnl Check what kind of packaging should be used at install time. 
+dnl The default is autodetected. 
+AC_DEFUN([RELYX_USE_PACKAGING],
+[AC_MSG_CHECKING([what packaging should be used])
+AC_ARG_WITH(packaging,
+  [  --with-packaging=THIS   Use THIS packaging for installation:
+			Possible values: posix, windows, macosx],
+  [lyx_use_packaging=$withval], [
+  case $host in
+

Re: Is this too cute?

2005-02-02 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:

 Angus So, should we make it work? I guess that it will work already
 Angus on Windows for those who use MikTeX and they're the ones who
 Angus will be running a LyX installed as C:\Program
 Angus Files\LyX\bin\lyx.exe
 
 Could you try the following backport of the 1.4.x port? I did not have
 the time to actually test it, all I can say is that it still seems to
 work in the normal case.

Yes, that works when LyX is installed as
/home/angus/Program\ Files/LyX/bin/lyx-1.3.6cvs

and invoked either with the full path to the binary or by putting this path
in the PATH environment variable and iinvoking it as lyx-1.3.6cvs.

-- 
Angus



Re: JMarc's configure changes

2005-02-02 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:

 Angus Ok, I tried out the patch. In fact, it does not address the
 Angus problem above.
 
 Did you run autogen.sh? I am surprised that this problem is still
 present (note the added RELYX_USE_PACKAGING).

I'd have thought so. I'll go and try again now.

-- 
Angus



Problem writing a converter

2005-02-02 Thread Bernard Hurley
Hi,

I have been trying to write a converter so that I can easily use lyx
with lilypond book. I have a simple shell script that I can use
successfully if I export the lyx file to latex. The problem with using
it as a converter is that the script needs to know the directory that
contains the original lyx file. How can this be achieved?

Bernard Hurley



Re: JMarc's configure changes

2005-02-02 Thread Angus Leeming
Angus Leeming wrote:
Jean-Marc Lasgouttes wrote:

Angus Ok, I tried out the patch. In fact, it does not address the
Angus problem above.
Did you run autogen.sh? I am surprised that this problem is still
present (note the added RELYX_USE_PACKAGING).

I'd have thought so. I'll go and try again now.
Yup. I've just updated so my local tree contains all of your just 
committed bits.

I have removed the autom4te.cache dirs from top src dir and from 
lib/reLyX. I also:

$ cd ~/lyx/13x/lib/reLyX
$ rm -f configure Makefile.in aclocal.m4 configure.ac
$ cd ~/lyx/13x
$ rm -f configure.ac
$ ./autogen.sh
$ cd lib/reLyX
$ ls -t | cat
configure
Makefile.in
aclocal.m4
configure.ac
acinclude.m4
...
Ie, the first four files have all been generated from your acinclude.m4 
et al.

$ cd ~/lyx/13x/build-qt
$ ../configure --prefix='J:/Programs/LyX' \
  --enable-maintainer-mode --with-included-gettext \
  --with-frontend=qt  --with-qt-dir=/home/angus/qt3
configure: configuring in lib/reLyX
configure: running /bin/sh '../../../lib/reLyX/configure' 
--prefix=J:/Programs/LyX  '--prefix=J:/Programs/LyX' 
'--enable-maintainer-mode' '--with-included-gettext' 
'--with-frontend=qt' '--with-qt-dir=/home/angus/qt3' 
--cache-file=/dev/null --srcdir=../../../lib/reLyX

  Packaging:  windows
LyX binary dir:   J:/Programs/LyX/bin
LyX files dir:J:/Programs/LyX/Resources/lyx
$ rm -rf J:/Programs
$ cd lib/reLyX
$ grep share Makefile
LYX_DIR = J:/Programs/LyX/share/lyx
datadir = ${prefix}/share
sharedstatedir = ${prefix}/com
Sure enough:
$ cd ~/lyx/13x/build-qt/lib
$ make install  lyx_13x_lib_make_install.log 21
Results in the directory heirarchy below.
Attached are lyx_13x_lib_make_install.log and reLyX/configure.
HTH,
Angus





configure.bz2
Description: Binary data


lyx_13x_lib_make_install.log.bz2
Description: Binary data


Re: JMarc's configure changes

2005-02-02 Thread Angus Leeming
Results in the directory heirarchy below.
Sorry. Forgot that bit.
Angus
/j/Programs/LyX/
Resources/
lyx/
bind/
clipart/
doc/
examples/
help/
images/
kbd/
layouts/
lyx2lyx/
scripts/
templates/
tex/
ui/
CREDITS
chkconfig.ltx
configure
encodings
external_templates
languages
lyxrc.defaults
lyxrc.example
packages.lst
symbols
textclass.lst
bin/
noweb2lyx
reLyX
man/
man1/
reLyX.1
share/
lyx/
reLyX/
Text/
BUGS
BasicLyX.pm
CHANGES
CleanTeX.pm
LastLyX.pm
MakePreamble.pm
README
ReadCommands.pm
RelyxFigure.pm
RelyxTable.pm
Verbatim.pm
reLyX.pod
reLyXmain.pl
syntax.default


Re: [rework docs] default figure placement inside float

2005-02-02 Thread G. Milde
On  2.02.05, Georg Baum wrote:
 
  The following line binds the ^-Shift-B key to insert a figure-float with
  centred graphic-file.
  
  \bind C-S-B command-sequence float-insert figure; break-paragraph;
  ert-insert; self-insert \centering ;inset-toggle;graphics-insert
 
 This looks useful for 1.3. Is it on the wiki?

Just added it under http://wiki.lyx.org/Tips/CommandSequences

GM

-- 
G.Milde web.de


Re: Is this too cute?

2005-02-02 Thread Jean-Marc Lasgouttes
 Angus == Angus Leeming [EMAIL PROTECTED] writes:

Angus Jean-Marc Lasgouttes wrote: So, should we make it work? I guess
Angus that it will work already on Windows for those who use MikTeX
Angus and they're the ones who will be running a LyX installed as
Angus C:\Program Files\LyX\bin\lyx.exe
  Could you try the following backport of the 1.4.x port? I did not
 have the time to actually test it, all I can say is that it still
 seems to work in the normal case.

Angus Yes, that works when LyX is installed as /home/angus/Program\
Angus Files/LyX/bin/lyx-1.3.6cvs

Angus and invoked either with the full path to the binary or by
Angus putting this path in the PATH environment variable and
Angus iinvoking it as lyx-1.3.6cvs.

Very good, I'll commit it.

JMarc


Re: Updated de.po for LyX 1.3.6cvs

2005-02-02 Thread Jean-Marc Lasgouttes
 Michael == Michael Schmitt [EMAIL PROTECTED] writes:

Michael Dear Jean-Marc, dear Angus, could you please commit my
Michael changes to de.po for LyX 1.3.6cvs? I send you the complete
Michael de.po (in bzip2 format) because it is only marginally larger
Michael than a patch would be.

Done.

Michael Before you commit, could you please save the new de.po in
Michael your local tree, run make de.pox, and compare de.po with
Michael de.pox? This is the first time that I have edited de.po on
Michael Windows and I want to make sure that de.po was updated
Michael correctly.

It was correct. I have remerged it.

Michael And then you should refresh all po files in the 1.3.6 branch,
Michael because a lot of messages have changed recently... (We should
Michael also inform the translators eventually)

I did so, and updated the french translation too.

JMarc


LyX export to latex broken

2005-02-02 Thread Angus Leeming
This smacks of Boost.Filesystem breakage.

qlyxcvs is a symbolic link pointing at ~/lyx/devel/build/src/lyx-qt

$ qlyxcvs -e latex UserGuide_13x.lyx
LyXTextClassList::Read: unable to find textclass file  `'. Exiting.

$ ~/lyx/devel/build/src/lyx-qt -e latex UserGuide_13x.lyx
creating local macro macro
creating local macro macrowarg

-- 
Angus



tex2lyx, lyx2lyx round trip is still broken (worse!)

2005-02-02 Thread Angus Leeming
Start from UserGuide.lyx, export to latex using LyX 1.3.x and then try the
tex2lyx, lyx2lyx round trip. Finally export the regenerated UserGuide to
latex again. 42 errors.

# Export the LyX User guide to LaTeX using LyX 1.3.x
# This creates a file UserGuide_13x.tex

  ~/lyx/13x/build-qt/src/lyx -e latex UserGuide_13x.lyx

# Convert this .tex file back to LyX using tex2lyx.
# This will generate a file UserGuide_14x.lyx
# in LyX 1.4.x format.

  ~/lyx/devel/build/src/tex2lyx/tex2lyx UserGuide_13x.tex  \
  UserGuide_14x.lyx

# Convert this LyX 1.4.x file to LyX 1.3.x format.
# This creates UserGuide_13x_2.lyx

  python ~/lyx/devel/lib/lyx2lyx/lyx2lyx --to 221 --output \
  UserGuide_13x_2.lyx UserGuide_14x.lyx

# Export this file to LaTeX once again using LyX 1.3.x.
# This creates UserGuide_13x_2.tex

  ~/lyx/13x/build-qt/src/lyx -e latex UserGuide_13x_2.lyx

--
Textclass Loading Error!
Encountered 42 unknown tokens
When reading /home/angus/tmp/UserGuide_13x_2.lyx
--
Document exported as LaTeX to file `~/tmp/UserGuide_13x_2.tex'

I suspect that this breakage is due to Boost.Filesystem problems. See my
LyX export to latex broken mail.

-- 
Angus



Re: Directions needed: Preview and Exportdata

2005-02-02 Thread Georg Baum
Am Dienstag, 1. Februar 2005 20:11 schrieb Andreas Vox:

 Exportdata: 
 
   Is it ok if I add another member snippets to this structure?

What would this member do (and of what type would it be)? The purpose of 
ExportData is to collect data (currently only files) from the insets that 
need some common treatment (currently invoking the mover and check for 
overwrite).

   How do I create external files in a new subdirectory?

You could create a

ExportData::addExternalDir(string const  format, string const  dir)

method and use that to record all desired subdirectories. Then you could 
simply call ExportData::addExternalFile() with the desired filename, 
including the subdirectory part. And of course you'll need something like

vectorstring ExportData:externalDirs(string const  format)

and use it, but you get the idea.

   Who is willing to commit the patch once it is ready? :-)

I'd do that immediately if we were not in bugfix-only mode, but since we 
are I am not the one to decide that. OTOH it would probably be ok with 
me, but I also really want to have a released 1.4.0 ASAP.


Georg



Re: Problem writing a converter

2005-02-02 Thread Georg Baum
Am Mittwoch, 2. Februar 2005 15:48 schrieb Bernard Hurley:
 Hi,
 
 I have been trying to write a converter so that I can easily use lyx
 with lilypond book. I have a simple shell script that I can use
 successfully if I export the lyx file to latex. The problem with using
 it as a converter is that the script needs to know the directory that
 contains the original lyx file. How can this be achieved?

There is a flag originaldir that you can use to tell LyX to run the 
converter in the original document directory. Does something like

\\converter latex xyz my_converter $$i $$o originaldir

in .lyx/preferences work?


Georg



Sun Studio...

2005-02-02 Thread John Levon

For fun, I thought I'd try to compile lyx 1.3.5 with the version of Sun
Studio we use internally. I almost immediately got:

/bin/bash ../../../../libtool --mode=compile CC -DHAVE_CONFIG_H -I. -I.
-I../../../../src -I../../../../boost-g -c -o cregex.lo `test -f
'cregex.cpp' || echo './'`cregex.cpp
CC -DHAVE_CONFIG_H -I. -I. -I../../../../src -I../../../../boost -g -c
cregex.cpp
../../../../boost/boost/regex/detail/regex_match.hpp, line 218: Error:
Could not find a match for std::distancestd::ForwardIterator,
std::Distance(const char*, const char*).
../../../../boost/boost/regex/detail/regex_match.hpp, line 243:
Where: While instantiating boost::re_detail::_priv_match_dataconst
char*, boost::detail::allocatorchar::estimate_max_state_count(const
char*, const char*, unsigned, std::random_access_iterator_tag*).
../../../../boost/boost/regex/detail/regex_match.hpp, line 243:
Where: Instantiated from non-template code.

But I'm too lazy to make head or tail of this. Lars?

I'm doing a make -k and will report any others I see.

regards,
john


Re: Sun Studio...

2005-02-02 Thread John Levon
On Wed, Feb 02, 2005 at 06:15:02PM +, John Levon wrote:

 I'm doing a make -k and will report any others I see.

BTW, we now require GNU Make. We should document this in INSTALL.

formulabase.h, line 146: Warning: InsetFormulaBase::display hides the virtual 
function Inset::display(bool).
../../boost/boost/detail/iterator.hpp, line 333: Warning (Anachronism): Type 
names qualified by template parameters require typename.
../../boost/boost/detail/iterator.hpp, line 362: Where: While 
specializing boost::detail::iterator_traitsboost::detail::Iterator.
../../boost/boost/detail/iterator.hpp, line 362: Where: Specialized in 
non-template code.
../../boost/boost/detail/iterator.hpp, line 333: Warning (Anachronism): Type 
names qualified by template parameters require typename.
../../boost/boost/detail/iterator.hpp, line 362: Where: While 
specializing boost::detail::iterator_traitsboost::detail::Iterator.
../../boost/boost/detail/iterator.hpp, line 362: Where: Specialized in 
non-template code.
math_nestinset.h, line 114: Warning: MathNestInset::metrics hides the virtual 
function MathInset::metrics(MathMetricsInfo) const.
math_charinset.h, line 49: Warning: MathCharInset::match hides the virtual 
function MathInset::match(const MathAtom) const.
ref_inset.h, line 51: Warning: RefInset::getType hides the virtual function 
MathInset::getType() const.

math_nestinset.h, line 114: Warning: MathNestInset::metrics hides the virtual 
function MathInset::metrics(MathMetricsInfo) const.
math_arrayinset.C, line 48: Error: Could not find a match for 
std::vectorstd::string::vector(std::istream_iteratorstd::string, char, 
std::char_traitschar, int, std::istream_iteratorstd::string, char, 
std::char_traitschar, int).
1 Error(s) and 1 Warning(s) detected.


../../src/support/lyxalgo.h, line 79: Error: iterator_traits is not a member 
of std.
../../src/support/lyxalgo.h, line 79: Error: A declaration does not specify a 
tag or an identifier.
../../src/support/lyxalgo.h, line 79: Error: Templates can only declare 
classes or functions.
../../src/support/lyxalgo.h, line 86: Error: A declaration was expected 
instead of while.
../../src/support/lyxalgo.h, line 86: Error: ) expected instead of !=.
../../src/support/lyxalgo.h, line 108: Error: A declaration was expected 
instead of }.
math_mathmlstream.C, line 80: Error: count is not a member of lyx.


insetbib.h, line 121: Warning: InsetBibtex::display hides the virtual 
function Inset::display(bool).

And more...

john


RE: Windows build problem

2005-02-02 Thread Rob Bearman
 Thank *you*.
 
 -- 
 Angus
 
 

I'll return the thanks again if someone can give me a pointer on how to
set up the LyX installation tree based on a vcproj build. The
win32\readme.txt file hints that this information was given previously
somewhere in the January list, but I can't find it beyond hints and
winks. How do I go about generating the configuration for a Windows
installation?

If this information is obvious to non-novices like me, it still might be
helpful to add it to the win32\readme.txt file.

By the way, the executable I've built launches under the Visual Studio
IDE debugger, so there's lots of promise there. I'm just not able to get
past the search for chkconfig.ltx file.

Thanks
Rob

P.S. I've tried installing Ruurd's configuration and replacing his
binaries with mine. This launches (at least under the debugger) and
staggers along, but a large crack developed in the ground outside my
window and demons spawned from hell are now pressing their noses against
my window, so I doubt that's a very safe thing to do.


Re: tex2lyx, lyx2lyx round trip is still broken (worse!)

2005-02-02 Thread Georg Baum
Try it again. Somehow an additional backslash slipped in so that a newline 
'\n' became '\\n'.


Georg



Re: LyX export to latex broken

2005-02-02 Thread Angus Leeming
Angus Leeming wrote:

 This smacks of Boost.Filesystem breakage.
 qlyxcvs is a symbolic link pointing at ~/lyx/devel/build/src/lyx-qt
 $ qlyxcvs -e latex UserGuide_13x.lyx
 LyXTextClassList::Read: unable to find textclass file  `'. Exiting.

This was my bad. I had a ~/lib/lyxrc.defaults file left around from my
testing of the packaging stuff. Messes up build_support...
 
package
binary_dir /home/angus/bin/
system_support /home/angus/lyx/devel/lib/
build_support /home/angus/lib/
user_support /home/angus/.lyx-1.4.0cvs/
locale_dir
document_dir /home/angus
temp_dir /tmp
home_dir /home/angus
/package

-- 
Angus



Re: Sun Studio...

2005-02-02 Thread Angus Leeming
John Levon wrote:
 On Wed, Feb 02, 2005 at 06:15:02PM +, John Levon wrote:
 I'm doing a make -k and will report any others I see.
 BTW, we now require GNU Make. We should document this in INSTALL.

If that is the case, then that has changed recently. I've been able to
build the XForms frontend quite happily with DEC make. The Qt frontend
requires the use of some gnu-isms though.

-- 
Angus



Re: tex2lyx, lyx2lyx round trip is still broken (worse!)

2005-02-02 Thread Angus Leeming
Georg Baum wrote:

 Try it again. Somehow an additional backslash slipped in so that a
 newline '\n' became '\\n'.

Better. Now it falls over when running latex.

$ ~/lyx/13x/build-qt/src/lyx -e latex UserGuide_13x.lyx
$ ~/lyx/13x/build-qt/src/lyx -e latex UserGuide_13x.lyx
$ ~/lyx/devel/build/src/tex2lyx/tex2lyx UserGuide_13x.tex  \
  UserGuide_14x.lyx
$ python ~/lyx/devel/lib/lyx2lyx/lyx2lyx --to 221 --output \
  UserGuide_13x_2.lyx UserGuide_14x.lyx
$ ~/lyx/13x/build-qt/src/lyx -e latex UserGuide_13x_2.lyx
$ ls -l UserGuide_13x.tex UserGuide_13x_2.tex
-rw-rw-r--  1 angus angus 229811 Feb  2 18:45 UserGuide_13x_2.tex
-rw-rw-r--  1 angus angus 228988 Feb  2 18:44 UserGuide_13x.tex
$ latex UserGuide_13x
$ latex UserGuide_13x_2

[18] [19]
! Extra }, or forgotten \endgroup.
[EMAIL PROTECTED]@tempboxa ...begingroup [EMAIL PROTECTED] }
  \def \width {\wd
[EMAIL PROTECTED]
l.1295 }
 Usually, starting a new paragraph resets both the paragraph
environ...


-- 
Angus



Re: Directions needed: Preview and Exportdata

2005-02-02 Thread Jose' Matos
On Tuesday 01 February 2005 19:11, Andreas Vox wrote:

 Finally:

   Who is willing to commit the patch once it is ready? :-)

  You (we) must first convince Lars about it now. :-)

  Probably a well laid out argument why this patch is important for docbook 
users. :-)

 Ciao
 /Andreas

-- 
José Abílio


RE: Windows build problem

2005-02-02 Thread Angus Leeming
Rob Bearman wrote:

 Thank *you*.
 
 --
 Angus
 
 
 
 I'll return the thanks again if someone can give me a pointer on how to
 set up the LyX installation tree based on a vcproj build. The
 win32\readme.txt file hints that this information was given previously
 somewhere in the January list, but I can't find it beyond hints and
 winks. How do I go about generating the configuration for a Windows
 installation?
 
 If this information is obvious to non-novices like me, it still might be
 helpful to add it to the win32\readme.txt file.
 
 By the way, the executable I've built launches under the Visual Studio
 IDE debugger, so there's lots of promise there. I'm just not able to get
 past the search for chkconfig.ltx file.

See Milestone 3 reached: LyX starts up from Asger on 23 Jan and ensuing
thread.

I see:

lyxrc.defaults.bz2
in http://article.gmane.org/gmane.editors.lyx.devel:40979
Shove it (uncompressed) in top_build_dir/lib/lyxrc.defaults

LaTeXConfig.lyx
packages.lst
textclass.lst
in http://article.gmane.org/gmane.editors.lyx.devel:40989
Shove 'em in the same place as lyxrc.defaults.

I don't see chkconfig.ltx, but that contains the results of a probe of your
LaTeX installation doesn't it? Anyway, shove the attached file in
top_src_dir/lib/chkconfig.ltx

 P.S. I've tried installing Ruurd's configuration and replacing his
 binaries with mine. This launches (at least under the debugger) and
 staggers along, but a large crack developed in the ground outside my
 window and demons spawned from hell are now pressing their noses against
 my window, so I doubt that's a very safe thing to do.

Might get a little warm with all those infernal flames.

-- 
Angus% This is chkconfig.ltx, a script which tries to autodetect and
%document your LaTeX configuration.
% Author: Jean-Marc Lasgouttes ([EMAIL PROTECTED])
% with minimal changes by Asger Alstrup ([EMAIL PROTECTED]).
%
% This script should only be run from the configure script to update
% the files textclass.lst and doc/LyXConfig.lyx
%
% This script is in fact a complete rewrite of the original chkconfig
% script. Expect bugs.

%%% If you want to add new packages/documentclasses to be recognized,
%%% read the explanation that follow and jump to the section 'Actual
%%% inspection code' below. You do not need to understand the ugly
%%% LaTeX code below to help improving chkconfig.ltx :-)
%%%
%%% If you want to add the new package name, all you need most of
%%% the times is a two-steps work:
%%% 1- Add the command \TestPackage{name}. The syntax is:
%%%\TestPackage[file]{name}, which  tests whether name.sty
%%%(or file, if this optional parameter is provided) exists.
%%% 2- Add a description for name in doc/LyXConfig.lyx.in,
%%%containing in particular a line like
%%% Found   @chk_name@
%%%This line will be replaced at configure time by the proper text.
%%%
%%% For document classes, things are even simpler, since you do not
%%% need to edit this file. Just put your layout file in some place
%%% where LyX can find it and add if you wish a description in
%%% LyXConfig.lyx.in, as described above.


%%% Initialization part (skip) %


% we do not want to stop on errors
\nonstopmode\makeatletter

%%% Some useful macros.
%   Several commands are defined to test for packages:
%\AddLayout{layout} adds an entry for layout in textclass.lst
%\AddVariable{name}{value} creates a new variable chk_name,
%  and gives it the value value.
%\TestDocClass{name}{command} if layout name has not already
%  been tested for, execute command. Note that you will
%  probably not need to use this directly, since the configure
%  script generates the needed macro calls automatically.
%\TestPackage[file]{name} tests whether name.sty (or file,
%  if it is provided) exists.
%   Both commands call \AddVariable to give value 'yes' or 'no' to
%   the variable chk_name.
%%%
\newcommand{\prefix}{+} % the character used by grep to filter 'good' output
\newcommand{\AddLayout}[4][\default]{
  \def\default{#2}
  \immediate\write\layouts{#2   #1   #3   #4}}
\newcommand{\AddVariable}[2]{
  [EMAIL PROTECTED]@!#2!g}
  \immediate\write\vars{chk_#1='#2'}}
\newcommand{\AddPackage}[1]{
  \immediate\write\packages{#1}}
% Tests whether an item is present
% Syntax: \TestItem{file}{name}{type}{ext}{iftrue}{iffalse}
\newif\ifexists
\newcommand{\TestItem}[6][\default]{
  \def\default{#2}
  \def\files{#1}
  \message{^^J\prefix checking for #3 #2 [#1]...}
  \let\firstelement\relax
  \existstrue
  [EMAIL PROTECTED]:=\files\do{
\ifx\firstelement\relax
   \edef\firstelement{\file}
\fi
\IfFileExists{\file}
  {}
  {\IfFileExists{\file.#4}{}{\existsfalse}}
  }
  \ifexists
\message{yes^^J}
\AddVariable{#2}{yes}
#5
  \else
\message{no^^J}

Re: Sun Studio...

2005-02-02 Thread John Levon
On Wed, Feb 02, 2005 at 06:34:25PM +, Angus Leeming wrote:

 If that is the case, then that has changed recently. I've been able to
 build the XForms frontend quite happily with DEC make.

$ /usr/ccs/bin/make
make: Fatal error in reader: Makefile, line 625: Badly formed macro assignment
$ lineof -c 1 625 Makefile

# Hack so that the targets that use tar will also work with automake 1.4
AMTAR ?= $(TAR)


Been there for more than 2 years.

 The Qt frontend requires the use of some gnu-isms though.

OK, then *that* needs docs :)

regards,
john


RE: Windows build problem

2005-02-02 Thread Angus Leeming
Angus Leeming wrote:
 Thank *you*.
 Angus

 I'll return the thanks again if someone can give me a pointer on how to
 set up the LyX installation tree based on a vcproj build.

How is your python? The files that Asger and you both needed are generated
by a shell script lib/configure which in turn is generated from
lib/configure.m4. Rewrite it in python and you'll be a much-thanked man.

-- 
Angus



Re: scripting support via lyxserver

2005-02-02 Thread Jose' Matos
On Tuesday 01 February 2005 15:10, G. Milde wrote:

 These are the first to spring into my mind. There are more to expect. But
 also, they (and the existing ones) must be documented in order to be
 usable.

 My goal is to get for lyx a broad base of user-provided extensions in the
 way we there is for emacs.

  A nice set of goals, if I may say so. :-)

 Sincerely


 Guenter

-- 
José Abílio


Re: Sun Studio...

2005-02-02 Thread Angus Leeming
John Levon wrote:
 The Qt frontend requires the use of some gnu-isms though.
 OK, then *that* needs docs :)

Or some input from the eejit wot wrote the gnuism on how to make his
constuct portable ? :)

 regards,
 john

-- 
Angus



Re: Sun Studio...

2005-02-02 Thread John Levon
On Wed, Feb 02, 2005 at 07:09:00PM +, Angus Leeming wrote:

 Or some input from the eejit wot wrote the gnuism on how to make his
 constuct portable ? :)

Ahem :)

john


Re: tex2lyx, lyx2lyx round trip is still broken (worse!)

2005-02-02 Thread Georg Baum
Am Mittwoch, 2. Februar 2005 19:50 schrieb Angus Leeming:
 Better. Now it falls over when running latex.

This is a lyx2lyx probelm. lyx2lyx tries to revert unsupported boxes (in 
this case parboxes) to ERT. This fails unfortunately if the boxes are in 
some nonstandard environment (e.g. a centered paragraph or in this case 
an itemize list).
I noticed that before and have a half implemented fix already, but this 
needs some further thoughts.
So no quick fix in this case :-(


Georg



Re:

2005-02-02 Thread Asger Alstrup
Andre Poenitz wrote:
I the long run I think the coord cache should really be cache. It isn't
right now as we sometimes depend on certain values being present. 
I have added some logic so it is easier to detect such errors. I see that 
during update, we rely on some coordinates to be there, when the cursor is 
drawn. Other than that, it seems that the usage of coordCache is pretty 
good. (I did not try with the user guide, because noone sent me one in the 
latest format, and I'm too lazy to install Python.)

To find all these places and replace them by sensible code is no 1.4
business as far as I am concerned, so at the moment, DEPM probably has
to make sure that the cache is in no worse condition then before the
DEPM call.
OK, I propose to add an "invalidate" method to the cache, and use this to 
flag whether a refresh is needed. The DEPM will set this flag. When I find 
time, I'll implement such a fix, unless someone else beats me to it.

Regards,
Asger


Re:

2005-02-02 Thread Angus Leeming
Asger Alstrup wrote:
> I have added some logic so it is easier to detect such errors. I see that
> during update, we rely on some coordinates to be there, when the cursor
> is drawn. Other than that, it seems that the usage of coordCache is
> pretty good. (I did not try with the user guide, because noone sent me
> one in the latest format, and I'm too lazy to install Python.)

I've just sent it to your laerdal dot dk address.

-- 
Angus



Re: The latest patches break cygwin again

2005-02-02 Thread Angus Leeming
L>>> #define BOOST_POSIX 1
>>
> | Yes, this works.
> 
> Ok.
> 
> Then we have to decide on the best way to handle this.
> 
> If we just make BOOST_POSIX be set for cygwin, then it works for you.
> But for the next guy using cygwin it will break.

No, I don't think so. All our file names currently go through
"internal_path" which sort-of-posixifies them. I've no idea why things
appear to be working on a true Windows platform, but I think you've just
been lucky.

Seems to me that this is an example of coding practice that we should try
and avaoid in future...

> So are there any kindo of configure tests we can use to discover the
> setting of win/posix kind of setup on cygwin?

Cygwin can understand both. Boost.Filesystem is poorly designed in this
regard. It's been noted before on the boost lists.

-- 
Angus



Re: The latest patches break cygwin again

2005-02-02 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes:

| L>>> #define BOOST_POSIX 1
>>>
>> | Yes, this works.
>> 
>> Ok.
>> 
>> Then we have to decide on the best way to handle this.
>> 
>> If we just make BOOST_POSIX be set for cygwin, then it works for you.
>> But for the next guy using cygwin it will break.
>
| No, I don't think so. All our file names currently go through
| "internal_path" which sort-of-posixifies them. I've no idea why things
| appear to be working on a true Windows platform, but I think you've just
| been lucky.

Ok, then we are back to scratch.

What you are saying is that using filesystem calls from windows.h is
perfectly ok when writing appications for cygwin?

-- 
Lgb



Re: The latest patches break cygwin again

2005-02-02 Thread Angus Leeming
Lars Gullik Bjønnes wrote:
> | L>>> #define BOOST_POSIX 1

>>> | Yes, this works.
>>> 
>>> Ok.
>>> 
>>> Then we have to decide on the best way to handle this.
>>> 
>>> If we just make BOOST_POSIX be set for cygwin, then it works for you.
>>> But for the next guy using cygwin it will break.
>>
> | No, I don't think so. All our file names currently go through
> | "internal_path" which sort-of-posixifies them. I've no idea why things
> | appear to be working on a true Windows platform, but I think you've
> | just been lucky.
> 
> Ok, then we are back to scratch.
> 
> What you are saying is that using filesystem calls from windows.h is
> perfectly ok when writing appications for cygwin?

I think that we two need to sit down with beers, because all this
long-distance typing just leads to mutual confusion. I'm not trying to
have a go. I'm just trying to help see through the mess.

At the moment, we have "a bit of this and a bit of that". 

We have the "old" way, in which all file names are "sort-of-posixified" by
os::internal_path before the rest of LyX sees them. Similarly, we
"sort-of-go-native" when we pass these names through os::external_path on
the way back to the outside world.

We have the "new", Boost.Filesystem way which handles all operations on
these file names. You've got lucky because you're effectively constructing
these fs::paths using "generic Boost.Filesystem path syntax". Ie, you're
always passing "sort-of-posixified" file names to the fs::path
constructor, irrespective of the OS.

I guess that the problems are arising because of this "half one way, half
the other". Unfortunately, we can't get rid of os::internal_path and use
the obvious and explicit
fs::path(name, fs::native);
to constuct these paths because, as we've just found out, Boost.Filesystem
expects a particular OS to use either Windows or Posix-style paths and
Cygwin can use BOTH. Boost.Filesystem cannot cope with that.

That's my yake on the situation. Does it make sense to you too?

-- 
Angus



Re: scripting support via lyxserver

2005-02-02 Thread Jean-Marc Lasgouttes
> "G" == G Milde <[EMAIL PROTECTED]> writes:

G> Feature Request ===

G> Could the lfun "server-notify" take an data argument, that is
G> passed on to the lyxserver?

Sure. And what about getting rid of the key binding too? Is it really
useful to the client?

JMarc


Re: lyx->tex->lyx round trip problems

2005-02-02 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:

Georg> The attached patch fixes that. It assumes that font changes
Georg> like

Georg> \size small

Georg> are local to a

Georg> \begin_layout ... \end_layout

Georg> block. Please tell if if assumption is wrong, otherwise thsi
Georg> will go in tomorrow.

Well, the assumption is wrong in the sense that some prople like to
write

{\small first paragraph

second paragraph}

If you meant that your patch does not handle that, then indeed some
people will be bitten by that. But it may be that it is too
complicated to handle correctly.

JMarc


Re: Is this too cute?

2005-02-02 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> gv changed its command line options in version 3.6.1 so that it
Angus> no longer recognizes `gv -swap`. Instead we need `gv --swap`.
Angus> (An extra '-').

Do we really need this -swap option? What about telling people to set
this in their gv prefs instead of doing it for them?

I prefer removing code to adding it :)

JMarc



Re: Is this too cute?

2005-02-02 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:
> Angus> gv changed its command line options in version 3.6.1 so that it
> Angus> no longer recognizes `gv -swap`. Instead we need `gv --swap`.
> Angus> (An extra '-').
> 
> Do we really need this -swap option? What about telling people to set
> this in their gv prefs instead of doing it for them?
> 
> I prefer removing code to adding it :)

Me too really. But Andreas' suggestion seems to be a reasonable compromise,
no?

-- 
Angus



Re: scripting support via lyxserver

2005-02-02 Thread G. Milde
On  2.02.05, Jean-Marc Lasgouttes wrote:
> > "G" == G Milde <[EMAIL PROTECTED]> writes:
> 
> G> Feature Request ===
> 
> G> Could the lfun "server-notify" take an data argument, that is
> G> passed on to the lyxserver?
> 
> Sure. And what about getting rid of the key binding too? Is it really
> useful to the client?

The keybinding is not really needed. If the code becomes more clear and
concise by removing, please do so.

I thought to keep it for backwards compatibility (however, did actually
anyone use server-notify until now?)

Günter


-- 
G.Milde web.de


Re: Is this too cute?

2005-02-02 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> Me too really. But Andreas' suggestion seems to be a reasonable
Angus> compromise, no?

Well, it is maybe a good occasion to get rid of this kind of old cruft
that has been here forever. Nobody remembers why it is here, but we do
whatever we can to keep it.

The fact that it requires an X server is enough to avoid running gv in
configure at all (well actually, we could launch an X server just for
the purpose of running the check, but something tells me it is a bad
idea :)

JMarc


Re: [rework docs] default figure placement inside float

2005-02-02 Thread G. Milde
On 28.01.05, G. Milde wrote:
> On 28.01.05, Jean-Marc Lasgouttes wrote:
> > 
> > The contents of figure floats is nothing special, so it is left-right
> > justified by default. Therefore, when including a graphics in there,
> > it should be centered by hand.
> > 
> > Maybe people would be less annoyed by this if we had a lfun to change
> > paragraph alignment (with key bindings).
> 
> This would be a nice thing indeed. A workaround for current LyX 1.3.x would
> be a Centred-Standard layout style
...

I did not consider the center-environment problem. Setting the 
alignment to center (in 1.3.4) puts a paragraph in a \begin{center}
\end{center} pair, thus introducing additional whitespace. This is why
Herberts Tips and Tricks recommend \centering.

The following line binds the ^-Shift-B key to "insert a figure-float with
centred graphic-file".

\bind "C-S-B" "command-sequence float-insert figure; break-paragraph; 
ert-insert; self-insert \centering ;inset-toggle;graphics-insert"

Günter


-- 
G.Milde web.de


Re: scripting support via lyxserver

2005-02-02 Thread Jean-Marc Lasgouttes
> "G" == G Milde <[EMAIL PROTECTED]> writes:

G> The keybinding is not really needed. If the code becomes more clear
G> and concise by removing, please do so.

It does not really change the code. It is just a matter of design of
the lyxsever protocol.

G> I thought to keep it for backwards compatibility (however, did
G> actually anyone use server-notify until now?)

That's the interesting question, actually :)

JMarc


Re: scripting support via lyxserver

2005-02-02 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

>> "G" == G Milde <[EMAIL PROTECTED]> writes:
>
| G> The keybinding is not really needed. If the code becomes more clear
| G> and concise by removing, please do so.
>
| It does not really change the code. It is just a matter of design of
| the lyxsever protocol.

And that needs some love and care. (read: complete rewrite)

I have that on the agenda... but we must get this CVS thingie released
first.

-- 
Lgb



Re: Is this too cute?

2005-02-02 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:

>> "Angus" == Angus Leeming <[EMAIL PROTECTED]>
>> writes:
> 
> Angus> Me too really. But Andreas' suggestion seems to be a reasonable
> Angus> compromise, no?
> 
> Well, it is maybe a good occasion to get rid of this kind of old cruft
> that has been here forever. Nobody remembers why it is here, but we do
> whatever we can to keep it.
> 
> The fact that it requires an X server is enough to avoid running gv in
> configure at all (well actually, we could launch an X server just for
> the purpose of running the check, but something tells me it is a bad
> idea :)

Ok, then I'll do as you suggest.

Currently, I'm trying to get LyX to run as
  /home/angus/Program\ Files/LyX/bin/lyx-1.3.6cvs

but it's hanging whilst running ../share/lyx/configure at
  checking LaTeX configuration... auto

If I subsequently kill lyx and restart it, then all is Ok. At that point,
my .lyx directory contains:

$ ls ~/.lyx-1.3.6cvs/
binddoc   images   reLyX  ui  xfonts
chklayouts.tex  examples  kbd  scriptswrap_chkconfig.log
clipart help  layouts  templates  wrap_chkconfig.ltx

Note, no lyxrc.defaults (because I killed LyX whilst reconfiguring?)

$ cat wrap_chkconfig.ltx
\newcommand\srcdir{/home/angus/Program Files/LyX/share/lyx-1.3.6cvs}
\def\haslinuxdoc{yes}
\def\hasdocbook{yes}
\input{/home/angus/Program Files/LyX/share/lyx-1.3.6cvs/chkconfig.ltx}

$ ls -l wrap_chkconfig.log
-rw-rw-r--  1 angus angus 0 Feb  2 11:25 wrap_chkconfig.log

Any ideas?

-- 
Angus



Re: Is this too cute?

2005-02-02 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
Angus> Currently, I'm trying to get LyX to run as /home/angus/Program\
Angus> Files/LyX/bin/lyx-1.3.6cvs

Angus> but it's hanging whilst running ../share/lyx/configure at
Angus> checking LaTeX configuration... auto

Angus> Any ideas?

Sure, it is not supposed to work :) I have to backport the changes
that I did for 1.4.0cvs to make it work in an environment with hostile
spaces... 

JMarc


Re: lyx->tex->lyx round trip problems

2005-02-02 Thread Georg Baum
Jean-Marc Lasgouttes wrote:

> Well, the assumption is wrong in the sense that some prople like to
> write
> 
> {\small first paragraph
> 
> second paragraph}
> 
> If you meant that your patch does not handle that, then indeed some
> people will be bitten by that. But it may be that it is too
> complicated to handle correctly.


This is handled correctly. What I meant was wether par2 in the
following .lyx snippet is in tiny size or normal:

\begin_layout Standard
\size tiny
par1
\end_layout

\begin_layout Standard
par2
\end_layout


Anyway, I just tried, and par2 is in normal size, so I'll just commit the
patch. I should have tried yesterday instead of asking, but it has been a
long day...


Georg



Re: lyx->tex->lyx round trip problems

2005-02-02 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:

Georg> Anyway, I just tried, and par2 is in normal size, so I'll just
Georg> commit the patch. I should have tried yesterday instead of
Georg> asking, but it has been a long day...

Fine.

JMarc


Re: [rework docs] default figure placement inside float

2005-02-02 Thread Georg Baum
G. Milde wrote:

> I did not consider the center-environment problem. Setting the
> alignment to center (in 1.3.4) puts a paragraph in a \begin{center}
> \end{center} pair, thus introducing additional whitespace. This is why
> Herberts Tips and Tricks recommend \centering.

Again: This is fixed in 1.4. What is still missing is the lyx2lyx conversion
and an option for lyx2lyx to be strict (convert the old centering option to
ERT) or not (implicitly convert the old centering option to the new one)

> The following line binds the ^-Shift-B key to "insert a figure-float with
> centred graphic-file".
> 
> \bind "C-S-B" "command-sequence float-insert figure; break-paragraph;
> ert-insert; self-insert \centering ;inset-toggle;graphics-insert"

This looks useful for 1.3. Is it on the wiki?


Georg



[PATCHes 13x, 14x]

2005-02-02 Thread Angus Leeming
The 1.4.x patch enables us to successfully split up a string
into an argv array of words to pass to execvp.

The 1.3.x patch backports this patch, backports also the 1.4.x
code for LibScriptSearch and backports the 1.4.x code to interpret
the $$s placeholder.

Both patches will result in output like this when execvp is invoked:


python
/home/angus/Program Files/LyX/share/lyx-1.3.6cvs/scripts/lyxpreview2ppm.py
/tmp/lyx_tmpdir6936exmZuO/lyx_tmpbuf0/0lyxpreview.tex
129
ppm


(So long as you get beyond the "LyX hands when running configure" problem.)

-- 
AngusIndex: src/support/forkedcall.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/forkedcall.C,v
retrieving revision 1.21
diff -u -p -r1.21 forkedcall.C
--- src/support/forkedcall.C	20 Jan 2005 15:38:14 -	1.21
+++ src/support/forkedcall.C	2 Feb 2005 12:32:23 -
@@ -257,47 +257,59 @@ int Forkedcall::generateChild()
 		return 1;
 
 	// Split the input command up into an array of words stored
-	// in a contiguous block of memory.
-	char const * const c_str = line.c_str();
+	// in a contiguous block of memory. The array contains pointers
+	// to each word.
 	// Don't forget the terminating `\0' character.
+	char const * const c_str = line.c_str();
 	vector vec(c_str, c_str + line.size() + 1);
-	// Turn the string into an array of words, each terminated with '\0'.
-	std::replace(vec.begin(), vec.end(), ' ', '\0');
+
+	// Splitting the command up into an array of words means replacing
+	// the whitespace between words with '\0'. Life is complicated
+	// however, because words protected by quotes can contain whitespace.
+	//
+	// The strategy we adopt is:
+	// 1. If we're not inside quotes, then replace white space with '\0'.
+	// 2. If we are inside quotes, then don't replace the white space
+	//but do remove the quotes themselves. We do this naively by
+	//replacing the quote with '\0' which is fine if quotes
+	//delimit the entire word.
+	char inside_quote = 0;
+	vector::iterator it = vec.begin();
+	vector::iterator const end = vec.end();
+	for (; it != end; ++it) {
+		char const c = *it;
+		if (!inside_quote) {
+			if (c == ' ')
+*it = '\0';
+			else if (c == '\'' || c == '"') {
+*it = '\0';
+inside_quote = c;
+			}
+		} else if (c == inside_quote) {
+			*it = '\0';
+			inside_quote = 0;
+		}
+	}
 
 	// Build an array of pointers to each word.
-	vector::iterator vit = vec.begin();
-	vector::iterator vend = vec.end();
+	it = vec.begin();
 	vector argv;
 	char prev = '\0';
-	for (; vit != vend; ++vit) {
-		if (*vit != '\0' && prev == '\0')
-			argv.push_back(&*vit);
-		prev = *vit;
+	for (; it != end; ++it) {
+		if (*it != '\0' && prev == '\0')
+			argv.push_back(&*it);
+		prev = *it;
 	}
-	// Strip quotes. Does so naively, assuming that the word begins
-	// and ends in quotes.
+	argv.push_back(0);
+
+	// Debug output.
 	vector::iterator ait = argv.begin();
 	vector::iterator const aend = argv.end();
-	for (; ait != aend; ++ait) {
-		char * word = *ait;
-		std::size_t const len = strlen(word);
-		if (len >= 2) {
-			char & first = word[0];
-			char & last = word[len-1];
-
-			if (first == last &&
-			(first == '\'' || first == '"')) {
-first = '\0';
-last = '\0';
-*ait += 1;
-			}
-		}
-	}
-
-	ait = argv.begin();
+	lyxerr << "\n";
 	for (; ait != aend; ++ait)
-		std::cout << *ait << std::endl;
-	argv.push_back(0);
+		if (*ait)
+			lyxerr << '\t'<< *ait << '\n';
+	lyxerr << "" << std::endl;
 
 #ifndef __EMX__
 	pid_t const cpid = ::fork();
Index: lib/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ChangeLog,v
retrieving revision 1.363.2.92
diff -u -p -r1.363.2.92 ChangeLog
--- lib/ChangeLog	28 Jan 2005 15:12:52 -	1.363.2.92
+++ lib/ChangeLog	2 Feb 2005 12:25:02 -
@@ -1,3 +1,7 @@
+2005-01-20  Angus Leeming  <[EMAIL PROTECTED]>
+
+	* configure.m4: Invoke scripts as "python $$s/scripts/foo.py", etc.
+
 2005-01-02  Kayvan A. Sylvan  <[EMAIL PROTECTED]>
 
 	* configure.m4: add \cygwin_path_fix_needed to lyrxc.defaults.
Index: lib/configure.m4
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/configure.m4,v
retrieving revision 1.60.2.13
diff -u -p -r1.60.2.13 configure.m4
--- lib/configure.m4	28 Jan 2005 15:12:53 -	1.60.2.13
+++ lib/configure.m4	2 Feb 2005 12:25:03 -
@@ -297,7 +297,7 @@ SEARCH_PROG([for a DVI to PDF converter]
 test $dvi_to_pdf_command = "dvipdfm" && dvi_to_pdf_command="dvipdfm \$\$i"
 
 # We have a script to convert previewlyx to ppm
-lyxpreview_to_bitmap_command="lyxpreview2ppm.py"
+lyxpreview_to_bitmap_command="python \$\$s/scripts/lyxpreview2ppm.py"
 
 # Search a *roff program (used to translate tables in ASCII export)
 LYXRC_PROG([for a *roff formatter], \ascii_roff_command, dnl
Index: src/frontends/xforms/ChangeLog

Re: [PATCHes 13x, 14x]

2005-02-02 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> The 1.4.x patch enables us to successfully split up a string
Angus> into an argv array of words to pass to execvp.

Angus> The 1.3.x patch backports this patch, backports also the 1.4.x
Angus> code for LibScriptSearch and backports the 1.4.x code to
Angus> interpret the $$s placeholder.

This one is OK with me.

JMarc



Re: Is this too cute?

2005-02-02 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:
> Angus> Currently, I'm trying to get LyX to run as /home/angus/Program\
> Angus> Files/LyX/bin/lyx-1.3.6cvs
> 
> Angus> but it's hanging whilst running ../share/lyx/configure at
> Angus> checking LaTeX configuration... auto
> 
> Angus> Any ideas?
> 
> Sure, it is not supposed to work :) I have to backport the changes
> that I did for 1.4.0cvs to make it work in an environment with hostile
> spaces...

Yes, it is getting stuck in the call to LaTeX here:

  done | sed -e 's%^.*layouts/\(.*\)\.layout$%\\TestDocClass{\1}%'\
  > chklayouts.tex
  eval ${LATEX} wrap_chkconfig.ltx 2>/dev/null | grep '^\+'
  eval `cat chkconfig.vars | sed 's/-/_/g'`
fi

So, should we make it work? I guess that it will work already on Windows
for those who use MikTeX and they're the ones who will be running a LyX
installed as C:\Program Files\LyX\bin\lyx.exe

*sigh*. Sometimes this coding lark is a PITA. I only tried this out because
I wanted to test the code in forkedcall.C that breaks a string into an
array of words.

-- 
Angus



Re: Is this too cute?

2005-02-02 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> So, should we make it work? I guess that it will work already
Angus> on Windows for those who use MikTeX and they're the ones who
Angus> will be running a LyX installed as C:\Program
Angus> Files\LyX\bin\lyx.exe

I'll send a tentative patch soon. 

JMarc



Re: Is this too cute?

2005-02-02 Thread Andreas Vox
Jean-Marc wrote:
The fact that it requires an X server is enough to avoid running gv in
configure at all (well actually, we could launch an X server just for
the purpose of running the check, but something tells me it is a bad
idea :)
Well, actually it would also work with "(man gv | grep -e --swap)",
then it would only require a correctly set MANPATH ;-)
/Andreas


Re: [PATCHes 13x, 14x]

2005-02-02 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:
> Angus> The 1.4.x patch enables us to successfully split up a string
> Angus> into an argv array of words to pass to execvp.
> 
> Angus> The 1.3.x patch backports this patch, backports also the 1.4.x
> Angus> code for LibScriptSearch and backports the 1.4.x code to
> Angus> interpret the $$s placeholder.
> 
> This one is OK with me.

Ok. Committed.

I do believe that we're just about done. Here's the top of my immediate
to-do list that I posted to Asger this morning (he was trying to distract
me ;-))

1. Enable LyX 1.3.x to spawn child processes on Windows in a 
non-blocking way. Code should be minimally invasive. Ignore stream 
redirection.

2. Release LyX 1.3.6. LyX/Win will (for the first time) be a 
formally-supported platform. Indeed, it looks like it will be an 
almost-first-class-citizen. The only thing not working will be the 
lyxserver.

However, if we're going to stick our heads up above the parapet and 
say, "Look! LyX works on Windows too!", then we'd better make sure it 
works well. So there's lots of testing and tweaking to go before (2) 
becomes a reality.

Many thanks for bearing with me with all this. It's been 7 weeks and 2 days
of hard work to get here ;-)

-- 
Angus



Re: Is this too cute?

2005-02-02 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> So, should we make it work? I guess that it will work already
Angus> on Windows for those who use MikTeX and they're the ones who
Angus> will be running a LyX installed as C:\Program
Angus> Files\LyX\bin\lyx.exe

Could you try the following backport of the 1.4.x port? I did not have
the time to actually test it, all I can say is that it still seems to
work in the normal case.

JMarc

Index: lib/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ChangeLog,v
retrieving revision 1.363.2.94
diff -u -p -r1.363.2.94 ChangeLog
--- lib/ChangeLog	2 Feb 2005 13:12:21 -	1.363.2.94
+++ lib/ChangeLog	2 Feb 2005 13:20:49 -
@@ -1,3 +1,16 @@
+2005-02-02  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* configure.m4: instead of \input-ing the layout files directly in
+	latex, grep out the correct command from them; remove need for
+	\srcdir. This should fix the bug where latex configuration cannot
+	be done because LyX is installed in a directory which name
+	contains spaces.
+
+	* chkconfig.ltx: remove use of macro \srcdir
+	(\TestDocClass): change to take two arguments
+	(\DeclareLaTeXClass, \DeclareLinuxDocClass, \DeclareDocBookClass):
+	do not exit after execution
+
 2005-01-28  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
 	* reLyX/acinclude.m4 (RELYX_ERROR, RELYX_USE_PACKAGING): new
Index: lib/chkconfig.ltx
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/chkconfig.ltx,v
retrieving revision 1.9.6.2
diff -u -p -r1.9.6.2 chkconfig.ltx
--- lib/chkconfig.ltx	13 Nov 2003 15:51:43 -	1.9.6.2
+++ lib/chkconfig.ltx	2 Feb 2005 13:20:49 -
@@ -35,24 +35,16 @@
 
 % we do not want to stop on errors
 \nonstopmode\makeatletter
-% Have we been called from the configure script?
[EMAIL PROTECTED]
- {\message{%
- WARNING: For proper results, you should not run this script directly.^^J%
- Please use the `configure' script.^^J}
-  \newcommand\srcdir{.}}
- [EMAIL PROTECTED]/}}}
 
 %%% Some useful macros.
 %   Several commands are defined to test for packages:
 %\AddLayout{} adds an entry for  in textclass.lst
 %\AddVariable{}{} creates a new variable chk_,
 %  and gives it the value .
-%\TestDocClass[]{} tests whether .cls (or ,
-%  if it is provided) exists and creates a new entry with
-%  \AddLayout if this is the case. Note that you will probably not
-%  need to use this directly, since the configure script generates
-%  the needed macro calls automatically.
+%\TestDocClass{}{} if layout  has not already
+%  been tested for, execute . Note that you will
+%  probably not need to use this directly, since the configure
+%  script generates the needed macro calls automatically.
 %\TestPackage[]{} tests whether .sty (or ,
 %  if it is provided) exists. 
 %   Both commands call \AddVariable to give value 'yes' or 'no' to
@@ -95,13 +87,10 @@
   \fi}
 \newcommand{\TestPackage}[2][\default]{
   \TestItem[#1]{#2}{package}{sty}{\AddPackage{#2}}{}}
-\newcommand{\TestDocClass}[1]{
+\newcommand{\TestDocClass}[2]{
\def\layoutname{#1}  % remember the name of the layout file
[EMAIL PROTECTED]@#1}
- {\bgroup
-\catcode`\#=9  % consider # as a space
-\input{layouts/#1.layout}  % read the layout file
-  \egroup
+ {#2  % execute the command
   [EMAIL PROTECTED]@#1}{}} 
  {} % we have already tried this one.
 }
@@ -109,7 +98,6 @@
   \TestItem[#1]{\layoutname}{document class}{cls}
{\AddLayout[\firstelement]{\layoutname}{#2}{true}}
{\AddLayout[\firstelement]{\layoutname}{#2}{false}}
-  \expandafter\endinput
 }
 \newcommand{\DeclareLinuxDocClass}[2][\default]{
   \message{^^J\prefix checking for linuxdoc class \layoutname... }
@@ -118,7 +106,6 @@
  \AddLayout[#1]{\layoutname}{#2}{false}}
 {\message{yes^^J}
  \AddLayout[#1]{\layoutname}{#2}{true}}
-  \expandafter\endinput
 }
 % Only for compatibility. Will be removed later.
 \let\DeclareSGMLClass=\DeclareDocBookClass
@@ -130,7 +117,6 @@
  \AddLayout[#1]{\layoutname}{#2}{false}}
 {\message{yes^^J}
  \AddLayout[#1]{\layoutname}{#2}{true}}
-  \expandafter\endinput
 }
 
 % Stolen from article.cls
Index: lib/configure.m4
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/configure.m4,v
retrieving revision 1.60.2.14
diff -u -p -r1.60.2.14 configure.m4
--- lib/configure.m4	2 Feb 2005 12:58:05 -	1.60.2.14
+++ lib/configure.m4	2 Feb 2005 13:20:49 -
@@ -165,8 +165,8 @@ ac_prog=[$]0
 changequote(,)dnl
 srcdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-test "x$srcdir" = "x$ac_prog" && srcdir=.
-if test ! -r ${srcdir}/chkconfig.ltx ; then
+test "x${srcdir}" = "x$ac_prog" && srcdir=.
+if test ! -r "${srcdir}"/chkconfig.ltx ; then
   echo 

Re: JMarc's configure changes

2005-02-02 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> Ok, I tried out the patch. In fact, it does not address the
Angus> problem above.

Did you run autogen.sh? I am surprised that this problem is still
present (note the added RELYX_USE_PACKAGING).

Anyway, here is the same patch for 1.4.0cvs, which I intend to apply,
since I did apply the 1.3.x version.

JMarc

Index: ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v
retrieving revision 1.995
diff -u -p -r1.995 ChangeLog
--- ChangeLog	2 Feb 2005 13:15:54 -	1.995
+++ ChangeLog	2 Feb 2005 13:38:02 -
@@ -1,5 +1,8 @@
 2005-02-02  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
+	* configure.ac: if the prefix contains space, replace it with
+	${builddir}/installprefix and issue a warning.
+
 	* configure.ac: when testing for AikSaurus, do not require libbz2.
 
 2005-01-27  Lars Gullik Bjonnes  <[EMAIL PROTECTED]>
Index: configure.ac
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v
retrieving revision 1.42
diff -u -p -r1.42 configure.ac
--- configure.ac	2 Feb 2005 13:17:23 -	1.42
+++ configure.ac	2 Feb 2005 13:38:02 -
@@ -229,6 +229,13 @@ LYX_USE_PACKAGING
 # fix the value of the prefixes.
 test "x$prefix" = xNONE && prefix=$default_prefix
 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+if echo $prefix |grep ' ' >/dev/null 2>/dev/null ; then
+  LYX_WARNING([The installation prefix \"${prefix}\" contains a space, which
+   causes problems with the Makefiles. The installation will be done in 
+   directory \"`pwd`/installprefix\" instead. Please move its contents to
+   the right place after installation.])
+  prefix=`pwd`/installprefix
+fi
 
 ### Setup GNU gettext
 dnl GNU gettext is written in C
Index: config/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/ChangeLog,v
retrieving revision 1.153
diff -u -p -r1.153 ChangeLog
--- config/ChangeLog	20 Jan 2005 14:44:19 -	1.153
+++ config/ChangeLog	2 Feb 2005 13:38:02 -
@@ -1,3 +1,8 @@
+2005-02-02  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* lyxinclude.m4 (LYX_USE_PACKAGING): remove single quotes around
+	prefix in the windows case.
+
 2005-01-20  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
 	* common.am (pch-file): new target, used recursively by target
Index: config/lyxinclude.m4
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/lyxinclude.m4,v
retrieving revision 1.106
diff -u -p -r1.106 lyxinclude.m4
--- config/lyxinclude.m4	12 Jan 2005 17:01:35 -	1.106
+++ config/lyxinclude.m4	2 Feb 2005 13:38:02 -
@@ -571,7 +571,7 @@ case $lyx_use_packaging in 
 	   datadir='${prefix}/Contents/Resources'
 	   mandir='${prefix}/Contents/Resources/man' ;;
   windows) AC_DEFINE(USE_WINDOWS_PACKAGING, 1, [Define to 1 if LyX should use a Windows-style file layout]) 
-   default_prefix="'C:/Program Files/LyX'"
+   default_prefix="C:/Program Files/LyX"
 	   bindir='${prefix}/bin'
 	   datadir='${prefix}/Resources'
 	   mandir='${prefix}/Resources/man' ;;
Index: lib/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ChangeLog,v
retrieving revision 1.668
diff -u -p -r1.668 ChangeLog
--- lib/ChangeLog	24 Jan 2005 17:12:15 -	1.668
+++ lib/ChangeLog	2 Feb 2005 13:38:04 -
@@ -1,3 +1,10 @@
+2005-02-02  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* reLyX/configure.ac: use RELYX_USE_PACKAGING as in main configure.
+
+	* reLyX/acinclude.m4 (RELYX_ERROR, RELYX_USE_PACKAGING): new
+	macros. 
+
 2005-01-15  Georg Baum  <[EMAIL PROTECTED]>
 
 	* ui/classic.ui, ui/stdmenus.ui: add output-changes.
Index: lib/reLyX/acinclude.m4
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/reLyX/acinclude.m4,v
retrieving revision 1.5
diff -u -p -r1.5 acinclude.m4
--- lib/reLyX/acinclude.m4	25 May 2004 14:42:10 -	1.5
+++ lib/reLyX/acinclude.m4	2 Feb 2005 13:38:04 -
@@ -7,6 +7,15 @@ relyx_warning_txt="$relyx_warning_txt
 relyx_warning=yes])
 
 
+dnl Usage: RELYX_ERROR(message)  Displays the error "message" and sets
+dnl the flag lyx_error to yes.
+AC_DEFUN([RELYX_ERROR],[
+relyx_error_txt="$relyx_error_txt
+== $1
+"
+relyx_error=yes])
+
+
 dnl RELYX_SEARCH_PROG(VARIABLE-NAME,PROGRAMS-LIST,ACTION-IF-FOUND)
 dnl
 define([RELYX_SEARCH_PROG],[dnl
@@ -99,3 +108,32 @@ $relyx_warning_txt
 EOF
 fi
 fi])
+
+
+dnl Check what kind of packaging should be used at install time. 
+dnl The default is autodetected. 
+AC_DEFUN([RELYX_USE_PACKAGING],
+[AC_MSG_CHECKING([what packaging should be used])
+AC_ARG_WITH(packaging,
+  [  --with-packaging=THIS   Use THIS packaging for installation:
+			Possible values: posix, windows, macosx],
+  

Re: Is this too cute?

2005-02-02 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:

> Angus> So, should we make it work? I guess that it will work already
> Angus> on Windows for those who use MikTeX and they're the ones who
> Angus> will be running a LyX installed as C:\Program
> Angus> Files\LyX\bin\lyx.exe
> 
> Could you try the following backport of the 1.4.x port? I did not have
> the time to actually test it, all I can say is that it still seems to
> work in the normal case.

Yes, that works when LyX is installed as
/home/angus/Program\ Files/LyX/bin/lyx-1.3.6cvs

and invoked either with the full path to the binary or by putting this path
in the PATH environment variable and iinvoking it as lyx-1.3.6cvs.

-- 
Angus



Re: JMarc's configure changes

2005-02-02 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:

> Angus> Ok, I tried out the patch. In fact, it does not address the
> Angus> problem above.
> 
> Did you run autogen.sh? I am surprised that this problem is still
> present (note the added RELYX_USE_PACKAGING).

I'd have thought so. I'll go and try again now.

-- 
Angus



Problem writing a converter

2005-02-02 Thread Bernard Hurley
Hi,

I have been trying to write a converter so that I can easily use lyx
with lilypond book. I have a simple shell script that I can use
successfully if I export the lyx file to latex. The problem with using
it as a converter is that the script needs to know the directory that
contains the original lyx file. How can this be achieved?

Bernard Hurley



Re: JMarc's configure changes

2005-02-02 Thread Angus Leeming
Angus Leeming wrote:
Jean-Marc Lasgouttes wrote:

Angus> Ok, I tried out the patch. In fact, it does not address the
Angus> problem above.
Did you run autogen.sh? I am surprised that this problem is still
present (note the added RELYX_USE_PACKAGING).

I'd have thought so. I'll go and try again now.
Yup. I've just updated so my local tree contains all of your just 
committed bits.

I have removed the autom4te.cache dirs from  and from 
lib/reLyX. I also:

$ cd ~/lyx/13x/lib/reLyX
$ rm -f configure Makefile.in aclocal.m4 configure.ac
$ cd ~/lyx/13x
$ rm -f configure.ac
$ ./autogen.sh
$ cd lib/reLyX
$ ls -t | cat
configure
Makefile.in
aclocal.m4
configure.ac
acinclude.m4
...
Ie, the first four files have all been generated from your acinclude.m4 
et al.

$ cd ~/lyx/13x/build-qt
$ ../configure --prefix='J:/Programs/LyX' \
  --enable-maintainer-mode --with-included-gettext \
  --with-frontend=qt  --with-qt-dir=/home/angus/qt3
configure: configuring in lib/reLyX
configure: running /bin/sh '../../../lib/reLyX/configure' 
--prefix=J:/Programs/LyX  '--prefix=J:/Programs/LyX' 
'--enable-maintainer-mode' '--with-included-gettext' 
'--with-frontend=qt' '--with-qt-dir=/home/angus/qt3' 
--cache-file=/dev/null --srcdir=../../../lib/reLyX

  Packaging:  windows
LyX binary dir:   J:/Programs/LyX/bin
LyX files dir:J:/Programs/LyX/Resources/lyx
$ rm -rf J:/Programs
$ cd lib/reLyX
$ grep share Makefile
LYX_DIR = J:/Programs/LyX/share/lyx
datadir = ${prefix}/share
sharedstatedir = ${prefix}/com
Sure enough:
$ cd ~/lyx/13x/build-qt/lib
$ make install > lyx_13x_lib_make_install.log 2>&1
Results in the directory heirarchy below.
Attached are lyx_13x_lib_make_install.log and reLyX/configure.
HTH,
Angus





configure.bz2
Description: Binary data


lyx_13x_lib_make_install.log.bz2
Description: Binary data


Re: JMarc's configure changes

2005-02-02 Thread Angus Leeming
Results in the directory heirarchy below.
Sorry. Forgot that bit.
Angus
/j/Programs/LyX/
Resources/
lyx/
bind/
clipart/
doc/
examples/
help/
images/
kbd/
layouts/
lyx2lyx/
scripts/
templates/
tex/
ui/
CREDITS
chkconfig.ltx
configure
encodings
external_templates
languages
lyxrc.defaults
lyxrc.example
packages.lst
symbols
textclass.lst
bin/
noweb2lyx
reLyX
man/
man1/
reLyX.1
share/
lyx/
reLyX/
Text/
BUGS
BasicLyX.pm
CHANGES
CleanTeX.pm
LastLyX.pm
MakePreamble.pm
README
ReadCommands.pm
RelyxFigure.pm
RelyxTable.pm
Verbatim.pm
reLyX.pod
reLyXmain.pl
syntax.default


Re: [rework docs] default figure placement inside float

2005-02-02 Thread G. Milde
On  2.02.05, Georg Baum wrote:
> 
> > The following line binds the ^-Shift-B key to "insert a figure-float with
> > centred graphic-file".
> > 
> > \bind "C-S-B" "command-sequence float-insert figure; break-paragraph;
> > ert-insert; self-insert \centering ;inset-toggle;graphics-insert"
> 
> This looks useful for 1.3. Is it on the wiki?

Just added it under http://wiki.lyx.org/Tips/CommandSequences

GM

-- 
G.Milde web.de


Re: Is this too cute?

2005-02-02 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> Jean-Marc Lasgouttes wrote: So, should we make it work? I guess
Angus> that it will work already on Windows for those who use MikTeX
Angus> and they're the ones who will be running a LyX installed as
Angus> C:\Program Files\LyX\bin\lyx.exe
>>  Could you try the following backport of the 1.4.x port? I did not
>> have the time to actually test it, all I can say is that it still
>> seems to work in the normal case.

Angus> Yes, that works when LyX is installed as /home/angus/Program\
Angus> Files/LyX/bin/lyx-1.3.6cvs

Angus> and invoked either with the full path to the binary or by
Angus> putting this path in the PATH environment variable and
Angus> iinvoking it as lyx-1.3.6cvs.

Very good, I'll commit it.

JMarc


Re: Updated de.po for LyX 1.3.6cvs

2005-02-02 Thread Jean-Marc Lasgouttes
> "Michael" == Michael Schmitt <[EMAIL PROTECTED]> writes:

Michael> Dear Jean-Marc, dear Angus, could you please commit my
Michael> changes to de.po for LyX 1.3.6cvs? I send you the complete
Michael> de.po (in bzip2 format) because it is only marginally larger
Michael> than a patch would be.

Done.

Michael> Before you commit, could you please save the new de.po in
Michael> your local tree, run "make de.pox", and compare de.po with
Michael> de.pox? This is the first time that I have edited de.po on
Michael> Windows and I want to make sure that de.po was updated
Michael> correctly.

It was correct. I have remerged it.

Michael> And then you should refresh all po files in the 1.3.6 branch,
Michael> because a lot of messages have changed recently... (We should
Michael> also inform the translators eventually)

I did so, and updated the french translation too.

JMarc


LyX export to latex broken

2005-02-02 Thread Angus Leeming
This smacks of Boost.Filesystem breakage.

qlyxcvs is a symbolic link pointing at ~/lyx/devel/build/src/lyx-qt

$ qlyxcvs -e latex UserGuide_13x.lyx
LyXTextClassList::Read: unable to find textclass file  `'. Exiting.

$ ~/lyx/devel/build/src/lyx-qt -e latex UserGuide_13x.lyx
creating local macro macro
creating local macro macrowarg

-- 
Angus



tex2lyx, lyx2lyx round trip is still broken (worse!)

2005-02-02 Thread Angus Leeming
Start from UserGuide.lyx, export to latex using LyX 1.3.x and then try the
tex2lyx, lyx2lyx round trip. Finally export the regenerated UserGuide to
latex again. 42 errors.

# Export the LyX User guide to LaTeX using LyX 1.3.x
# This creates a file UserGuide_13x.tex

  ~/lyx/13x/build-qt/src/lyx -e latex UserGuide_13x.lyx

# Convert this .tex file back to LyX using tex2lyx.
# This will generate a file UserGuide_14x.lyx
# in LyX 1.4.x format.

  ~/lyx/devel/build/src/tex2lyx/tex2lyx UserGuide_13x.tex > \
  UserGuide_14x.lyx

# Convert this LyX 1.4.x file to LyX 1.3.x format.
# This creates UserGuide_13x_2.lyx

  python ~/lyx/devel/lib/lyx2lyx/lyx2lyx --to 221 --output \
  UserGuide_13x_2.lyx UserGuide_14x.lyx

# Export this file to LaTeX once again using LyX 1.3.x.
# This creates UserGuide_13x_2.tex

  ~/lyx/13x/build-qt/src/lyx -e latex UserGuide_13x_2.lyx

--
Textclass Loading Error!
Encountered 42 unknown tokens
When reading /home/angus/tmp/UserGuide_13x_2.lyx
--
Document exported as LaTeX to file `~/tmp/UserGuide_13x_2.tex'

I suspect that this breakage is due to Boost.Filesystem problems. See my
"LyX export to latex broken" mail.

-- 
Angus



Re: Directions needed: Preview and Exportdata

2005-02-02 Thread Georg Baum
Am Dienstag, 1. Februar 2005 20:11 schrieb Andreas Vox:

> Exportdata: 
> 
>   Is it ok if I add another member "snippets" to this structure?

What would this member do (and of what type would it be)? The purpose of 
ExportData is to collect data (currently only files) from the insets that 
need some common treatment (currently invoking the mover and check for 
overwrite).

>   How do I create external files in a new subdirectory?

You could create a

ExportData::addExternalDir(string const & format, string const & dir)

method and use that to record all desired subdirectories. Then you could 
simply call ExportData::addExternalFile() with the desired filename, 
including the subdirectory part. And of course you'll need something like

vector ExportData:externalDirs(string const & format)

and use it, but you get the idea.

>   Who is willing to commit the patch once it is ready? :-)

I'd do that immediately if we were not in bugfix-only mode, but since we 
are I am not the one to decide that. OTOH it would probably be ok with 
me, but I also really want to have a released 1.4.0 ASAP.


Georg



Re: Problem writing a converter

2005-02-02 Thread Georg Baum
Am Mittwoch, 2. Februar 2005 15:48 schrieb Bernard Hurley:
> Hi,
> 
> I have been trying to write a converter so that I can easily use lyx
> with lilypond book. I have a simple shell script that I can use
> successfully if I export the lyx file to latex. The problem with using
> it as a converter is that the script needs to know the directory that
> contains the original lyx file. How can this be achieved?

There is a flag originaldir that you can use to tell LyX to run the 
converter in the original document directory. Does something like

\\converter latex xyz "my_converter $$i $$o" "originaldir"

in .lyx/preferences work?


Georg



Sun Studio...

2005-02-02 Thread John Levon

For fun, I thought I'd try to compile lyx 1.3.5 with the version of Sun
Studio we use internally. I almost immediately got:

/bin/bash ../../../../libtool --mode=compile CC -DHAVE_CONFIG_H -I. -I.
-I../../../../src -I../../../../boost-g -c -o cregex.lo `test -f
'cregex.cpp' || echo './'`cregex.cpp
CC -DHAVE_CONFIG_H -I. -I. -I../../../../src -I../../../../boost -g -c
cregex.cpp
"../../../../boost/boost/regex/detail/regex_match.hpp", line 218: Error:
Could not find a match for std::distance(const char*, const char*).
"../../../../boost/boost/regex/detail/regex_match.hpp", line 243:
Where: While instantiating "boost::re_detail::_priv_match_data>::estimate_max_state_count(const
char*, const char*, unsigned, std::random_access_iterator_tag*)".
"../../../../boost/boost/regex/detail/regex_match.hpp", line 243:
Where: Instantiated from non-template code.

But I'm too lazy to make head or tail of this. Lars?

I'm doing a make -k and will report any others I see.

regards,
john


Re: Sun Studio...

2005-02-02 Thread John Levon
On Wed, Feb 02, 2005 at 06:15:02PM +, John Levon wrote:

> I'm doing a make -k and will report any others I see.

BTW, we now require GNU Make. We should document this in INSTALL.

"formulabase.h", line 146: Warning: InsetFormulaBase::display hides the virtual 
function Inset::display(bool).
"../../boost/boost/detail/iterator.hpp", line 333: Warning (Anachronism): Type 
names qualified by template parameters require "typename".
"../../boost/boost/detail/iterator.hpp", line 362: Where: While 
specializing "boost::detail::iterator_traits".
"../../boost/boost/detail/iterator.hpp", line 362: Where: Specialized in 
non-template code.
"../../boost/boost/detail/iterator.hpp", line 333: Warning (Anachronism): Type 
names qualified by template parameters require "typename".
"../../boost/boost/detail/iterator.hpp", line 362: Where: While 
specializing "boost::detail::iterator_traits".
"../../boost/boost/detail/iterator.hpp", line 362: Where: Specialized in 
non-template code.
"math_nestinset.h", line 114: Warning: MathNestInset::metrics hides the virtual 
function MathInset::metrics(MathMetricsInfo&) const.
"math_charinset.h", line 49: Warning: MathCharInset::match hides the virtual 
function MathInset::match(const MathAtom&) const.
"ref_inset.h", line 51: Warning: RefInset::getType hides the virtual function 
MathInset::getType() const.

"math_nestinset.h", line 114: Warning: MathNestInset::metrics hides the virtual 
function MathInset::metrics(MathMetricsInfo&) const.
"math_arrayinset.C", line 48: Error: Could not find a match for 
std::vector::vector(std::istream_iterator, std::istream_iterator).
1 Error(s) and 1 Warning(s) detected.


"../../src/support/lyxalgo.h", line 79: Error: iterator_traits is not a member 
of std.
"../../src/support/lyxalgo.h", line 79: Error: A declaration does not specify a 
tag or an identifier.
"../../src/support/lyxalgo.h", line 79: Error: Templates can only declare 
classes or functions.
"../../src/support/lyxalgo.h", line 86: Error: A declaration was expected 
instead of "while".
"../../src/support/lyxalgo.h", line 86: Error: ")" expected instead of "!=".
"../../src/support/lyxalgo.h", line 108: Error: A declaration was expected 
instead of "}".
"math_mathmlstream.C", line 80: Error: count is not a member of lyx.


"insetbib.h", line 121: Warning: InsetBibtex::display hides the virtual 
function Inset::display(bool).

And more...

john


RE: Windows build problem

2005-02-02 Thread Rob Bearman
> Thank *you*.
> 
> -- 
> Angus
> 
> 

I'll return the thanks again if someone can give me a pointer on how to
set up the LyX installation tree based on a vcproj build. The
win32\readme.txt file hints that this information was given previously
somewhere in the January list, but I can't find it beyond hints and
winks. How do I go about generating the configuration for a Windows
installation?

If this information is obvious to non-novices like me, it still might be
helpful to add it to the win32\readme.txt file.

By the way, the executable I've built launches under the Visual Studio
IDE debugger, so there's lots of promise there. I'm just not able to get
past the search for chkconfig.ltx file.

Thanks
Rob

P.S. I've tried installing Ruurd's configuration and replacing his
binaries with mine. This launches (at least under the debugger) and
staggers along, but a large crack developed in the ground outside my
window and demons spawned from hell are now pressing their noses against
my window, so I doubt that's a very safe thing to do.


Re: tex2lyx, lyx2lyx round trip is still broken (worse!)

2005-02-02 Thread Georg Baum
Try it again. Somehow an additional backslash slipped in so that a newline 
'\n' became '\\n'.


Georg



Re: LyX export to latex broken

2005-02-02 Thread Angus Leeming
Angus Leeming wrote:

> This smacks of Boost.Filesystem breakage.
> qlyxcvs is a symbolic link pointing at ~/lyx/devel/build/src/lyx-qt
> $ qlyxcvs -e latex UserGuide_13x.lyx
> LyXTextClassList::Read: unable to find textclass file  `'. Exiting.

This was my bad. I had a ~/lib/lyxrc.defaults file left around from my
testing of the packaging stuff. Messes up build_support...
 

binary_dir /home/angus/bin/
system_support /home/angus/lyx/devel/lib/
build_support /home/angus/lib/
user_support /home/angus/.lyx-1.4.0cvs/
locale_dir
document_dir /home/angus
temp_dir /tmp
home_dir /home/angus


-- 
Angus



Re: Sun Studio...

2005-02-02 Thread Angus Leeming
John Levon wrote:
> On Wed, Feb 02, 2005 at 06:15:02PM +, John Levon wrote:
>> I'm doing a make -k and will report any others I see.
> BTW, we now require GNU Make. We should document this in INSTALL.

If that is the case, then that has changed recently. I've been able to
build the XForms frontend quite happily with DEC make. The Qt frontend
requires the use of some gnu-isms though.

-- 
Angus



Re: tex2lyx, lyx2lyx round trip is still broken (worse!)

2005-02-02 Thread Angus Leeming
Georg Baum wrote:

> Try it again. Somehow an additional backslash slipped in so that a
> newline '\n' became '\\n'.

Better. Now it falls over when running latex.

$ ~/lyx/13x/build-qt/src/lyx -e latex UserGuide_13x.lyx
$ ~/lyx/13x/build-qt/src/lyx -e latex UserGuide_13x.lyx
$ ~/lyx/devel/build/src/tex2lyx/tex2lyx UserGuide_13x.tex > \
  UserGuide_14x.lyx
$ python ~/lyx/devel/lib/lyx2lyx/lyx2lyx --to 221 --output \
  UserGuide_13x_2.lyx UserGuide_14x.lyx
$ ~/lyx/13x/build-qt/src/lyx -e latex UserGuide_13x_2.lyx
$ ls -l UserGuide_13x.tex UserGuide_13x_2.tex
-rw-rw-r--  1 angus angus 229811 Feb  2 18:45 UserGuide_13x_2.tex
-rw-rw-r--  1 angus angus 228988 Feb  2 18:44 UserGuide_13x.tex
$ latex UserGuide_13x
$ latex UserGuide_13x_2

[18] [19]
! Extra }, or forgotten \endgroup.
[EMAIL PROTECTED]@tempboxa ...begingroup [EMAIL PROTECTED] }
  \def \width {\wd
[EMAIL PROTECTED]
l.1295 }
 Usually, starting a new paragraph resets both the paragraph
environ...


-- 
Angus



  1   2   >