Re: [LyXWin 1.3.6pre12] View (pdflatex) dies at graphic

2005-06-15 Thread Georg Baum
Paul A. Rubin wrote:

 (version 1.3.5)
 C:/LyX/tmp/lyx_tmpdir2408a00864/lyx_tmpbuf0/_LyX_Documents_MGT914_princomp
 
 (version 1.3.6) C:/Documents and Settings/rubin.BUSINESS/Local
 Settings/Temp/lyx_tmpdir3112a03360/lyx_tmpbuf0/C__Documents and
 Settings_rubin_BUSINESS_My Documents_MGT 914_Lecture Notes_princomp
 
 So apparently the .pdf extension is not needed (since 1.3.5 doesn't use
 it, and pdflatex works in that case).  Maybe it really is the spaces in
 the path causing the problem?

No. I looked up the old tests I did and it appears that the .pdf extension
is needed if the file name is quoted with . This was not the case on
Angus' machine because the path to his temp directory did not contain
spaces, but it is the case on your machine because it does contain spaces.
Therefore a simple workaround for now is to change the location of the temp
directory.

Angus, I have a half finished patch for this problem which I hope to
complete soon.


Georg




Re: Installing Windows fonts

2005-06-15 Thread Johann Kellerman

  and the \t issue when you write to 
!insertmacro MUI_INSTALLOPTIONS_WRITE ioSummary.ini Field 2 Text \
 $INSTDIR\bin \r\n$MiKTeXPath \r\n$GhostscriptPath
  \r\n$ImageMagickPath\r\n$PythonPath\r\n$PerlPath
  you have to quote the paths.
 
 What do you mean with the \t issue did I missed something? And what 
 should I quote? This is a string of a label and threrfore still in quotes.

Sorry for the confusion. It was discussed in an earlier post. If you write to
the installoptions ini file. you have to quote (or rather escape) \t \r \n in
the paths. else they get turned into spaces, newlines etc. According the the
abovementioned section you should have \\t for tab (located in path strings like
c:\texmf). They have the nessacery function in installoption(see below).

So after constructing and writing out the complete path variable to anther
variable, the one that you send to Angus's plugin. You should escape al the path
names:

Push $GhostscriptPath
Call Nsis2Io
Pop $GhostscriptPath
Push $INSTDIR
Call Nsis2Io
Pop $R0   ; dont mess with instdir
Push $MiKTeXPath
Call Nsis2Io
Pop $MiKTeXPath
Push $PerlPath
Call Nsis2Io
Pop $PerlPath
Push $ImageMagickPath
Call Nsis2Io
Pop $ImageMagickPath
Push $PythonPath
Call Nsis2Io
Pop $PythonPath
;and then only -- note the $R0 change
!insertmacro MUI_INSTALLOPTIONS_WRITE ioSummary.ini Field 2 Text \
$R0\bin \r\n$MiKTeXPath \r\n$GhostscriptPath
 \r\n$ImageMagickPath\r\n$PythonPath\r\n$PerlPath


Haven't tested it but it should work (hopefully)

I will look into skipping a page. I no it is possible to skip standard pages
with _PRE and _POST macros, but I'll try to construct a small installoptions
case and pass it along


Regards, 
Johann







; Convert an NSIS string to a form suitable for use by InstallOptions
; Usage:
;   Push NSIS-string
;   Call Nsis2Io
;   Pop IO-string
Function Nsis2Io
  Exch $0 ; The source
  Push $1 ; The output
  Push $2 ; Temporary char
  StrCpy $1  ; Initialise the output
loop:
  StrCpy $2 $0 1 ; Get the next source char
  StrCmp $2  done ; Abort when none left
StrCpy $0 $0  1 ; Remove it from the source
StrCmp $2 \  +3 ; Back-slash?
  StrCpy $1 $1\\
  Goto loop
StrCmp $2 $\r  +3 ; Carriage return?
  StrCpy $1 $1\r
  Goto loop
StrCmp $2 $\n  +3 ; Line feed?
  StrCpy $1 $1\n
  Goto loop
StrCmp $2 $\t  +3 ; Tab?
  StrCpy $1 $1\t
  Goto loop
StrCpy $1 $1$2 ; Anything else
Goto loop
done:
  StrCpy $0 $1
  Pop $2
  Pop $1
  Exch $0
FunctionEnd





Re: generated filenames too long

2005-06-15 Thread Stefan Kostner

Hi Andre,
On Jun 13, 2005, at 9:27 PM, Andre Poenitz wrote:


On Mon, Jun 13, 2005 at 07:42:15PM +0200, Stefan Kostner wrote:

Stefan Kostner wrote:

This means that the filenames of the eps files can be extremely long
causing tools like dvips to crash with either segfault or
for instance dvips: ! out of string space.


Looks like a fundamental limitation. We don't add characters to the
path,
just replace them. If your path has more than PATH_MAX characters,
you've
lucked out.


So, why not using other filenames. Since those files are only of
temporary nature they could just be numberd, or a combination of
numbers and the real filename (without the full path), or only a
relative paths...?


The idea was to leave the user with some information were things came
from in case anything went wrong. Just having an error message
'lyxtmp133241.pdf corrupt' is not very helpful.

That's a good point, but still I think that skipping the full path and 
keeping the filename only would be a good option. In this case the 
information about the files being processed is still there but the 
filenames are shorter.
It would also help to use the relative path between document and images 
instead of the full path. Then there is also no way to mix up same 
filenames included  from different directories while keeping the full 
information.


regards,
stefan



Re: More about LyX meeting

2005-06-15 Thread Alfredo Braunstein
Angus Leeming wrote:

 finding a new job and me expecting in November too! In fact, if, after

Congratulations both!

Alfredo




Re: Installing Windows fonts

2005-06-15 Thread Johann Kellerman

  Create one string that contains
  the lang environment variable and just makes sure that is translated
for now.
  That solves the language step in one go. You select your installation 
  language
  and your environment variable is set according to that.
 
 That is not possible as we have only six available installer languages. 
 That means an italian user must start the installer in english and can 
 later choose Italiano.

I know there are only a couple of translated languages. What I propose is create
the other languages as nullsoft languages. For now the installer strings can be
in english until a concerned user post the correct translations. The only string
we can translate for now is the lang environment variable.

This means a user selects a language only once. If not translated yet, maybe
show a message that the installer is in english until we receive a contribution,
but at least lyx should be fine.

Regards, Johann






Re: Installing Windows fonts

2005-06-15 Thread Angus Leeming
Johann Kellerman wrote:
 So after constructing and writing out the complete path variable to
 anther variable, the one that you send to Angus's plugin. You should
 escape al the path names:
 
 Push $GhostscriptPath
 Call Nsis2Io
 Pop $GhostscriptPath
 Push $INSTDIR
 Call Nsis2Io
 Pop $R0   ; dont mess with instdir
 Push $MiKTeXPath
 Call Nsis2Io
 Pop $MiKTeXPath
 Push $PerlPath
 Call Nsis2Io
 Pop $PerlPath
 Push $ImageMagickPath
 Call Nsis2Io
 Pop $ImageMagickPath
 Push $PythonPath
 Call Nsis2Io
 Pop $PythonPath
 ;and then only -- note the $R0 change
 !insertmacro MUI_INSTALLOPTIONS_WRITE ioSummary.ini Field 2 Text \
 $R0\bin \r\n$MiKTeXPath \r\n$GhostscriptPath
  \r\n$ImageMagickPath\r\n$PythonPath\r\n$PerlPath

Or, perhaps more simply:

  StrCpy $0
$MiKTeXPath$\r$\n$GhostscriptPath$\r$\n$ImageMagickPath$\r$\n$PythonPath$\r$\n$PerlPath
  ${StrNSISToIO} $0 $0

Note that ${StrNSISToIO} is part of StrUtils.nsh...

You don't want to manipulate (change) $GhostscriptPath et al, because
you're actually going to use them later...

-- 
Angus



Re: More about LyX meeting

2005-06-15 Thread Angus Leeming
Alfredo Braunstein wrote:
... and me expecting in November too!...
 Congratulations both! 

Thanks, Alfredo. Hope your little family is doing well too.

-- 
Angus



Re: The LANG environment variable...

2005-06-15 Thread Helge Hafting

Angus Leeming wrote:


On Tuesday 14 June 2005 21:34, Andre Poenitz wrote:
 


On Tue, Jun 14, 2005 at 01:14:05PM +0200, Helge Hafting wrote:
   


if %LANG%== SET LANG=no_NO
lyx.exe %*
[...]
Second line starts the lyx executable and passes any parameters
to it. The script is tested on windows XP.  (I don't have lyx for
windows, but the LANG test and parameter passing works fine.)
 


I don't think it works on older Windows versions. I've seen
%1 %2 %3 %4 %5 %6 %7 %8 %9  in this place often enough to assume
that it can't be a mere oversight of lazy programmers...
   



 


I tested with windows98 - windows98 don't support .cmd files
(they have to end in .bat instead), and there is no support for %*
So it depends on how old windows versions you want to support.
Of course %1 %2 %3 ... works on newer windows too, but limits you
to 9 arguments.  (You can probably get more by using some
ugly tricks with the shift command...)


In that case, shouldn't it be

lyx.exe %1 %2 %3 %4 %5 %6 %7 %8 %9

 


No, that will turn
lyx.bat file with spaces.lyx
into
lyx.exe file with spaces.lyx and that won't work too well.

The windows shell is like most other ms software - not well planned
for corner cases.

If you pass a filename with quotes to a windows batchfile, then
the quotes are preserved as part of the %1 variable.  Any
subsequent use of %1 will retain the quotes.  So they shouldn't
be necessary, at least not on windows98.

Helge Hafting










Re: The LANG environment variable...

2005-06-15 Thread Helge Hafting

Andre Poenitz wrote:


On Tue, Jun 14, 2005 at 10:45:07AM +0200, Asger Alstrup wrote:
 


Angus Leeming wrote:
   


That way, Uwe wouldn't set LANG globably from the Windows installer but
rather would get the configure script to output

 \ui_language de_DE

to lyxrc.defaults.

Thoughts?
 

Looks good to me. I was thinking the same, except that I was leaning 
towards a command-line option, but lyxrc will do for me as well.
   



The command line option is  'LANG=de_DE lyx' in a decent shell.


That'll be  'set LANG=de_DE' in the windows shell.

Helge Hafting



Re: More about LyX meeting

2005-06-15 Thread Alfredo Braunstein
Angus Leeming wrote:

 Alfredo Braunstein wrote:
... and me expecting in November too!...
 Congratulations both!
 
 Thanks, Alfredo. Hope your little family is doing well too.

We are overwhelmingly happy, it's just a pitty that it's a bit
LyX-incompatible (I mean new job, new city, new house, pre-birth courses
and exams and all that -- and this is just *before*, so I can't really
imagine how things will be *after*). But I'm sure things will adjust
eventually.

Otherwise, we can think of this small LyX investment in exchange of a
kick-ass development team in about twenty years! (I would expect another
entry in CREDITS then)

Regards, Alfredo




Re: The LANG environment variable...

2005-06-15 Thread Angus Leeming

Helge Hafting wrote:

Angus Leeming wrote:


On Tuesday 14 June 2005 21:34, Andre Poenitz wrote:
 


On Tue, Jun 14, 2005 at 01:14:05PM +0200, Helge Hafting wrote:
  


if %LANG%== SET LANG=no_NO
lyx.exe %*
[...]
Second line starts the lyx executable and passes any parameters
to it. The script is tested on windows XP.  (I don't have lyx for
windows, but the LANG test and parameter passing works fine.)



I don't think it works on older Windows versions. I've seen
%1 %2 %3 %4 %5 %6 %7 %8 %9  in this place often enough to assume
that it can't be a mere oversight of lazy programmers...
  



 


I tested with windows98 - windows98 don't support .cmd files
(they have to end in .bat instead), and there is no support for %*
So it depends on how old windows versions you want to support.
Of course %1 %2 %3 ... works on newer windows too, but limits you
to 9 arguments.  (You can probably get more by using some
ugly tricks with the shift command...)


In that case, shouldn't it be

lyx.exe %1 %2 %3 %4 %5 %6 %7 %8 %9

 


No, that will turn
lyx.bat file with spaces.lyx
into
lyx.exe file with spaces.lyx and that won't work too well.

The windows shell is like most other ms software - not well planned
for corner cases.

If you pass a filename with quotes to a windows batchfile, then
the quotes are preserved as part of the %1 variable.  Any
subsequent use of %1 will retain the quotes.  So they shouldn't
be necessary, at least not on windows98.

Helge Hafting


Hi, Helge. Thanks for the info.

I've been testing things out and have two remaining problems:
1. Creating short cuts from the desktop and from the start menu to
c:\Program Files\LyX\bin\lyx.bat
works perfectly well, but my icons are replaced with that of a .bat file. 
Any idea how to get back to the icon embedded in lyx.exe?


2 Launching LyX at the end of the installer as
   !define PRODUCT_BAT $INSTDIR\bin\lyx.bat
   !define MUI_FINISHPAGE_RUN ${PRODUCT_BAT}
works perfectly well, but I get a bloody great cmd window in the 
background. How do I make it go away? :-)


Angus



Re: [LyXWin Installer] small version updated again

2005-06-15 Thread Angus Leeming

Uwe Stöhr wrote:

Hello LyXers,

again an update to the installer:

http://fkurth.de/uwest/LyX/Installer/lyx_setup_136proposal-v14-2.exe


Angus Leeming wrote:



In other words, I think that the installer should lead the user 
through the installation. It shouldn't just do it for him. That's 
why I think a summary page at the beginning listing everything that 
LyX has found (or not found) that it can use would be a good thing.



It is implemented now. Please have a look if you could agree with this 
solution.


But there are more improvements:


Wooo! Slow downn! I can't keep up ;-)


- The installer comes now with the actual documentation files
 (Argh, I just see that I shipped the wrong files for LateXConfig.lyx)
- The installer searches now for Acrobat and add its path to
  lyxrc.default so that LyX can find it while configuring.


Good.


- Now also LyX's configuration files are deleted while uninstalling LyX.
  The files are under
  C:\Documents and Settings\name of current user\Application Data\


Be careful here. Don't delete this unless the user explicitly asks you to. 
A MessageBox?


I've been merging your UI language stuff and Helge's suggestion to use a 
lyx.bat file. A couple of minor issues (I hope) still to deal with but I 
hope to commit it to the CVS repository v. soon.



Remaining issues:

- I need the registry path for Acroread. If anybody has installed it, 
please send it to me.


Under HKLM I have
  Software\Adobe\Acrobat\Exe
which stores
  C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe

so perhaps you can use the same test for both?


\viewer pdf acrobat

But we need also the entries

\viewer pdf2 acrobat
\viewer pdf3 acrobat

Simple fix attached, please apply.


Will do.
Angus



Re: [LyXWin Installer] small version updated again

2005-06-15 Thread Uwe Stöhr

I wrote:


But we need also the entries

\viewer pdf2 acrobat
\viewer pdf3 acrobat

Simple fix attached, please apply.


I've a better solution. The entries should only be made if pdflatex and 
dvipdfm does really exists. The attached patch works for me.


Angus, two questions about the configure file:

- What script language is it?
- Where can I find it in the CVS reposotory? I find only the file
  configure.mt4 nut this one is different from the one shipped with
  LyxWin pre 136.

thanks and regards Uwe
--- configureOld	Wed Jun 15 03:35:49 2005
+++ configure	Wed Jun 15 04:11:22 2005
@@ -116,6 +116,43 @@
 
 
  Searching some useful programs
+
+# Search for a program to preview pdf
+echo $ac_n checking for a PDF preview... $ac_c
+echo $ac_t(acrobat acrord32 gsview32 acroread gv ghostview xpdf)
+PDF_VIEWER=
+for ac_prog in acrobat acrord32 gsview32 acroread gv ghostview xpdf
+do
+# Extract the first word of $ac_prog, so it can be a program name with args.
+set dummy $ac_prog ; ac_word=$2
+if test -n $ac_word; then
+  echo $ac_n +checking for \$ac_word\... $ac_c
+  IFS=${IFS=	}; ac_save_ifs=$IFS; IFS=:
+  for ac_dir in $PATH; do
+test -z $ac_dir  ac_dir=.
+if test -x $ac_dir/$ac_word; then
+  PDF_VIEWER=$ac_prog
+  break
+fi
+  done
+  IFS=$ac_save_ifs
+
+  if test -n $PDF_VIEWER; then
+ac_result=yes
+
+  else
+ac_result=no
+  fi
+  echo $ac_t$ac_result
+  test -n $PDF_VIEWER  break
+fi
+done
+
+if test -z $PDF_VIEWER ; then
+  PDF_VIEWER=none
+fi
+
+
 # Search LaTeX2e
 echo $ac_n checking for a LaTeX2e program... $ac_c
 echo $ac_t(latex latex2e)
@@ -179,6 +216,7 @@
   echo $ac_n checking for the pdflatex program... $ac_c
 echo $ac_t(pdflatex)
 latex_to_pdf=
+latexpdf=
 for ac_prog in pdflatex
 do
 # Extract the first word of $ac_prog, so it can be a program name with args.
@@ -197,7 +235,7 @@
 
   if test -n $latex_to_pdf; then
 ac_result=yes
-
+latexpdf=$PDF_VIEWER
   else
 ac_result=no
   fi
@@ -480,41 +518,6 @@
 esac
 EPS_VIEWER=$GHOSTVIEW
 
-# Search for a program to preview pdf
-echo $ac_n checking for a PDF preview... $ac_c
-echo $ac_t(acrobat acrord32 gsview32 acroread gv ghostview xpdf)
-PDF_VIEWER=
-for ac_prog in acrobat acrord32 gsview32 acroread gv ghostview xpdf
-do
-# Extract the first word of $ac_prog, so it can be a program name with args.
-set dummy $ac_prog ; ac_word=$2
-if test -n $ac_word; then
-  echo $ac_n +checking for \$ac_word\... $ac_c
-  IFS=${IFS=	}; ac_save_ifs=$IFS; IFS=:
-  for ac_dir in $PATH; do
-test -z $ac_dir  ac_dir=.
-if test -x $ac_dir/$ac_word; then
-  PDF_VIEWER=$ac_prog
-  break
-fi
-  done
-  IFS=$ac_save_ifs
-
-  if test -n $PDF_VIEWER; then
-ac_result=yes
-
-  else
-ac_result=no
-  fi
-  echo $ac_t$ac_result
-  test -n $PDF_VIEWER  break
-fi
-done
-
-if test -z $PDF_VIEWER ; then
-  PDF_VIEWER=none
-fi
-
 
 # Search something to preview dvi
 echo $ac_n checking for a DVI previewer... $ac_c
@@ -665,6 +668,7 @@
 echo $ac_n checking for a DVI to PDF converter... $ac_c
 echo $ac_t(dvipdfm)
 dvi_to_pdf_command=
+dvipdf=
 for ac_prog in dvipdfm
 do
 # Extract the first word of $ac_prog, so it can be a program name with args.
@@ -683,7 +687,7 @@
 
   if test -n $dvi_to_pdf_command; then
 ac_result=yes
-
+dvipdf=$PDF_VIEWER
   else
 ac_result=no
   fi
@@ -1346,6 +1350,8 @@
 \\viewer dvi $DVI_VIEWER
 \\viewer html $HTML_VIEWER
 \\viewer pdf $PDF_VIEWER
+\\viewer pdf2 $latexpdf
+\\viewer pdf3 $dvipdf
 \\viewer ps $PS_VIEWER
 \\viewer eps $EPS_VIEWER
 


Re: [LyXWin Installer] small version updated again

2005-06-15 Thread Angus Leeming

Uwe Sthr wrote:

I wrote:


But we need also the entries

\viewer pdf2 acrobat
\viewer pdf3 acrobat

Simple fix attached, please apply.


I've a better solution. The entries should only be made if pdflatex and 
dvipdfm does really exists. The attached patch works for me.


This is overkill and anyway you should be hacking the .m4 file. If the 
converters to pdf2, pdf3 don't exist then it doesn't matter how the viewer 
is defined. It just won't be used.



Angus, two questions about the configure file:

- What script language is it?


sh. But it is generated from configure.m4:
$ m4 configure.m4  configure


- Where can I find it in the CVS reposotory? I find only the file
  configure.mt4 nut this one is different from the one shipped with
  LyxWin pre 136.


You need to look at BRANCH_1_3_X again...
Angus



thanks and regards Uwe





Re: The LANG environment variable...

2005-06-15 Thread Angus Leeming

Angus Leeming wrote:

I've been testing things out and have two remaining problems:
1. Creating short cuts from the desktop and from the start menu to
c:\Program Files\LyX\bin\lyx.bat
works perfectly well, but my icons are replaced with that of a .bat 
file. Any idea how to get back to the icon embedded in lyx.exe?


Resolved. Read the documentation, Angus!


2 Launching LyX at the end of the installer as
   !define PRODUCT_BAT $INSTDIR\bin\lyx.bat
   !define MUI_FINISHPAGE_RUN ${PRODUCT_BAT}
works perfectly well, but I get a bloody great cmd window in the 
background. How do I make it go away? :-)


Still to resolve.
Angus



Re: [patch] math_colorinset fix

2005-06-15 Thread Georg Baum
Andre Poenitz wrote:

 On Tue, Jun 14, 2005 at 12:11:53PM +0200, Georg Baum wrote:
 Done. Please test. I also changed inheritance from MathNestInset to
 MathGridInset in order to get the corner markers.
 
 That's wrong IIRC. You can add corner markers by calling
 metricsMarkers[2] and drawMarkers[2] to any inset  (the '2'
 version is for corners everywhere, the unadorned version only
 for lower left and lower right corner).

I changed that.

 Otherwise it is impossible to delete a color inset by pressing
 backspace at the beginning.
 
 The responsible code is LCursor::pullArg which should work for e.g.
 any MathNestInset, even for such that are not a MathGridInset.

Of course it does, but it is difficult to navigate to the right position
without markers.

 The disadvantage of this patch is that user defined colors are not
 editable in LyX anymore. They are correctly read and written, so that
 you don't lose data. IMHO the better UI for supported colors outweighs
 this disadvantage.  What do you think?
 
 *shrug* It's a rarely used gimmick as far as I am concerned so I really
 don't care. User defined colors means ERT somewhere, so we can expect
 the user to use ERT also when using it...

Then I am going to commit the attached patch provided that Jürgens testing
does not show problems.
  
 The MathHullInset some how should change the 'inherited base color'.
 Don't ask me how this could be achieved exactly.

I hoped you knew that!


GeorgIndex: src/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.2199
diff -u -p -r1.2199 ChangeLog
--- src/ChangeLog	9 Jun 2005 15:19:06 -	1.2199
+++ src/ChangeLog	14 Jun 2005 09:58:47 -
@@ -1,3 +1,7 @@
+2005-06-14  Georg Baum  [EMAIL PROTECTED]
+
+	* LColor.[Ch] (getFromLaTeXName): new
+
 2005-06-11  Georg Baum  [EMAIL PROTECTED]
 
 	* LaTeXFeatures.C (getPackages): solve amsmath-wasysym conflict
Index: src/LColor.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LColor.C,v
retrieving revision 1.55
diff -u -p -r1.55 LColor.C
--- src/LColor.C	19 Jan 2005 15:03:27 -	1.55
+++ src/LColor.C	14 Jun 2005 09:58:47 -
@@ -66,7 +66,8 @@ public:
 		in.x11name   = string(entry.x11name);
 		in.guiname   = string(entry.guiname);
 		infotab[entry.lcolor] = in;
-		transform[string(entry.lyxname)] = int(entry.lcolor);
+		LyXTransform[string(entry.lyxname)] = int(entry.lcolor);
+		LaTeXTransform[string(entry.latexname)] = int(entry.lcolor);
 	}
 
 	///
@@ -75,8 +76,10 @@ public:
 	InfoTab infotab;
 
 	typedef std::mapstring, int Transform;
-	/// the transform between colour name string and integer code.
-	Transform transform;
+	/// the transform between LyX color name string and integer code.
+	Transform LyXTransform;
+	/// the transform between LaTeX color name string and integer code.
+	Transform LaTeXTransform;
 
 };
 
@@ -234,14 +237,14 @@ bool LColor::setColor(LColor::color col,
 bool LColor::setColor(string const  lyxname, string const x11name)
 {
 	string const lcname = ascii_lowercase(lyxname);
-	if (pimpl_-transform.find(lcname) == pimpl_-transform.end()) {
+	if (pimpl_-LyXTransform.find(lcname) == pimpl_-LyXTransform.end()) {
 		lyxerr[Debug::GUI]
 			 LColor::setColor: Unknown color \
 		lyxname  ''  endl;
 		addColor(static_castcolor(pimpl_-infotab.size()), lcname);
 	}
 
-	return setColor(static_castLColor::color(pimpl_-transform[lcname]),
+	return setColor(static_castLColor::color(pimpl_-LyXTransform[lcname]),
 			x11name);
 }
 
@@ -268,13 +271,25 @@ void LColor::addColor(LColor::color c, s
 LColor::color LColor::getFromLyXName(string const  lyxname) const
 {
 	string const lcname = ascii_lowercase(lyxname);
-	if (pimpl_-transform.find(lcname) == pimpl_-transform.end()) {
+	if (pimpl_-LyXTransform.find(lcname) == pimpl_-LyXTransform.end()) {
 		lyxerr  LColor::getFromLyXName: Unknown color \
 		lyxname  ''  endl;
 		return none;
 	}
 
-	return static_castLColor::color(pimpl_-transform[lcname]);
+	return static_castLColor::color(pimpl_-LyXTransform[lcname]);
+}
+
+
+LColor::color LColor::getFromLaTeXName(string const  latexname) const
+{
+	if (pimpl_-LaTeXTransform.find(latexname) == pimpl_-LaTeXTransform.end()) {
+		lyxerr  LColor::getFromLaTeXName: Unknown color \
+		latexname  ''  endl;
+		return none;
+	}
+
+	return static_castLColor::color(pimpl_-LaTeXTransform[latexname]);
 }
 
 
Index: src/LColor.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LColor.h,v
retrieving revision 1.44
diff -u -p -r1.44 LColor.h
--- src/LColor.h	19 Jan 2005 15:03:27 -	1.44
+++ src/LColor.h	14 Jun 2005 09:58:47 -
@@ -218,6 +218,8 @@ public:
 	LColor::color getFromGUIName(std::string const  guiname) const;
 	/// \returns the LColor::color associated with the LyX name.
 	LColor::color getFromLyXName(std::string 

Re: Installing Windows fonts

2005-06-15 Thread Johann Kellerman
 
  StrCpy $0
$MiKTeXPath$\r$\n$GhostscriptPath$\r$\n$ImageMagickPath$\r$\n$PythonPa
th$\r 
 $\n$PerlPath
  ${StrNSISToIO} $0 $0

Note that ${StrNSISToIO} is part of StrUtils.nsh...

You don't want to manipulate (change) $GhostscriptPath et al, 
because you're actually going to use them later...

It's a bit cleaner solution, was not sure how to escape the \r and \n to
avoid it begin escaped by the escaping StrNSISToIO function Or
something like that


Uwe, attached is the small test script to show page skipping by using 
  !define MUI_PAGE_CUSTOMFUNCTION_PRE ___
And another suggested solution for choosing the fonts by better usage of
the nsi sections  components.

Regards,
Johann


section_and_page_skip.nsi
Description: section_and_page_skip.nsi


Re: Screen resolution / dpi

2005-06-15 Thread Jean-Marc Lasgouttes
 Andre == Andre Poenitz [EMAIL PROTECTED] writes:

 LyX 1.3.6 , therefore, won't use it. LyX 1.4 is in feature freeze,
 so I guess that it won't use it either. Looks like you'll be having
 considerable usage for a while yet.

Andre Qt 4 is no go for LyX 1.4 as far as I am concerned...

We will probably have to tweak LyX 1.4 to work (in qt3 compatibility
mode) with it at some point.

JMarc


RE: [LyXWin Installer] small version updated again

2005-06-15 Thread Johann Kellerman

- I need the registry path for Acroread. If anybody has installed it,
please send it to me.

I started working on this. My thoughts was to extract the pdf viewer
associated with pdf's on the windows machine.

With:

Function getFileAssociation
  Exch $R1
  Push $R0
  ReadRegStr $R0 HKCR $R1  
  ReadRegStr $R1 HKCR $R0\shell\open\command  
  Pop $R0
  Exch $R1
FunctionEnd

And then using:
  Push .pdf
  Call getFileAssociation 
  pop $acrobat_path
--
The result is:
C:\Program Files\acrobat\acrord32.exe %1

So you'll still need to do some parsing, but this will cater for acrobat
and other pdf viewers. So maybe in lyxrc.defaults add the line
\viewer pdf acrord32   ??

Regards, 
Johann




Re: [LyXWin Installer] small version updated again

2005-06-15 Thread Jean-Marc Lasgouttes
 Uwe == Uwe Stöhr [EMAIL PROTECTED] writes:

Uwe - If Acrobat/Acrored if found by LyX's configure script the
Uwe following entry is made to lyxrc.defaults:

Uwe \viewer pdf acrobat

Isn't there a way in NSIS to check whether the pdf extension is
registered? There is no reason to force the user to use acrobat if he
prefers gsview or whatever. 

So what would be nice for all viewers is to check whether the
extension is registered and in this case to use start with proper
options as a viewers. Actually, we should add code in LyX itself to
use the built-in viewers if they exist. I am not sure it would be so
difficult to do. 

JMarc


Re: [patch] math_colorinset fix

2005-06-15 Thread Lars Gullik Bjønnes
Georg Baum [EMAIL PROTECTED] writes:

| Then I am going to commit the attached patch provided that Jürgens testing
| does not show problems.

change hte names first

|   
 The MathHullInset some how should change the 'inherited base color'.
 Don't ask me how this could be achieved exactly.

| I hoped you knew that!


| Georg

| Index: src/ChangeLog
| ===
| RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
| retrieving revision 1.2199
| diff -u -p -r1.2199 ChangeLog
| --- src/ChangeLog 9 Jun 2005 15:19:06 -   1.2199
| +++ src/ChangeLog 14 Jun 2005 09:58:47 -
| @@ -1,3 +1,7 @@
| +2005-06-14  Georg Baum  [EMAIL PROTECTED]
| +
| + * LColor.[Ch] (getFromLaTeXName): new
| +
|  2005-06-11  Georg Baum  [EMAIL PROTECTED]
|  
|   * LaTeXFeatures.C (getPackages): solve amsmath-wasysym conflict
| Index: src/LColor.C
| ===
| RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LColor.C,v
| retrieving revision 1.55
| diff -u -p -r1.55 LColor.C
| --- src/LColor.C  19 Jan 2005 15:03:27 -  1.55
| +++ src/LColor.C  14 Jun 2005 09:58:47 -
| @@ -66,7 +66,8 @@ public:
|   in.x11name   = string(entry.x11name);
|   in.guiname   = string(entry.guiname);
|   infotab[entry.lcolor] = in;
| - transform[string(entry.lyxname)] = int(entry.lcolor);
| + LyXTransform[string(entry.lyxname)] = int(entry.lcolor);
| + LaTeXTransform[string(entry.latexname)] = int(entry.lcolor);

Can you please change the names of these variables.

is the string() cast really needed?

-- 
Lgb



Re: More about LyX meeting

2005-06-15 Thread Stephan Witt

Jean-Marc Lasgouttes wrote:

Jean-Marc == Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:




Dear Jean-Marc,

I spent some time outside of my office, so I couldn't respond...


Jean-Marc So, I know have the following table for our next meeting:

Update:

13  14  15  16  17  18  19Laptop
JMarcX   X   X   X   X   X   X   X (and a PC and more if needed)
Lars X   X   X   X   X   X   X   X
AndréX   X   X   X   X   X (possibility of a second one)
Michael  X   X
Juergen  X   X   X   X   X
José X   X   X   X   X   X   X
Martin
Andreas
Angus


  Stephan  x   x   x   x (one or two of these days)



Won't come after all: Asger.

As you can see, I am still waiting for confirmation from Martin,
Andreas, Angus and Stefan. Stefan, I remember you plan to come just
for a day, but I do not remember which one :)


I stay from the 8th of July til 20th of July in Paris together with
my wife and my children (2) and we'll be guests of our friends.
So there is no need to care for us. But I have to see what our
plans are. Currently there is a meeting at the 14th planned already.

I propose to talk about the details in July.

Regards,

Stephan

--



Re: The LANG environment variable...

2005-06-15 Thread Uwe Stöhr

Angus Leeming wrote:


Putting the two dataabses together:



nn_NO Nynorsk


It is no_NY.

I put some code tables on

http://fkurth.de/uwest/LyX/Installer/LangCodes/

regards Uwe


Re: The LANG environment variable...

2005-06-15 Thread Angus Leeming

Uwe Sthr wrote:

nn_NO Nynorsk

It is no_NY.


Both appear to be quite common. google on nn_NO and on no_NY. Note that 
the po file is nn.po...


Angus



Re: The LANG environment variable...

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

| Uwe Stöhr wrote:
 nn_NO Nynorsk
 It is no_NY.

| Both appear to be quite common. google on nn_NO and on no_NY. Note
| that the po file is nn.po...

I think it really should be nn. nn is the language XX is the
country.

en_EN is english in england
en_US is english in the us
nn_NO nynorsk in norway
no_NO norsk aka bokmål in norway.

no_NY just seems wrong.

-- 
Lgb



Re: The LANG environment variable...

2005-06-15 Thread Enrico Forestieri
Helge Hafting [EMAIL PROTECTED] writes:
 
 Angus Leeming wrote:
 

[snip]
 
 In that case, shouldn't it be
 
 lyx.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
 
   
 
 No, that will turn
 lyx.bat file with spaces.lyx
 into
 lyx.exe file with spaces.lyx and that won't work too well.
 

To avoid double quoting the ~ character should be used. So:

lyx.exe %~1 %~2 %~3 %~4 %~5 %~6 %~7 %~8 %~9

works as expected.

Enrico




Re: The LANG environment variable...

2005-06-15 Thread Enrico Forestieri
Angus Leeming [EMAIL PROTECTED] writes:

  2 Launching LyX at the end of the installer as
 !define PRODUCT_BAT $INSTDIR\bin\lyx.bat
 !define MUI_FINISHPAGE_RUN ${PRODUCT_BAT}
  works perfectly well, but I get a bloody great cmd window in the 
  background. How do I make it go away? 
 
 Still to resolve.
 Angus

Launching the last command in the bat file with start should do the trick.

$ cat lyx.bat
@echo off
rem
rem some stuff here
rem
start lyx.exe 

Enrico






Re: [PATCH 13x, 14x] the PATH env var

2005-06-15 Thread Enrico Forestieri
Angus Leeming [EMAIL PROTECTED] writes:
 Jean-Marc Lasgouttes wrote:
  Angus The attached patch ensures that the LyX binary dir is the first
  Angus element in the PATH on non-POSIX builds. The change will mean
  Angus that fixes like Enrico Forestieri's, described here:
  Angus http://marc.theaimsgroup.com/?l=lyx-develm=111851430815315w=2
  Angus are much easier to apply. (His python.bat stuff.)
  
  The patches are OK in general, but I am not sure how it helps Enrico.
  
  JMarc
 
 He can create his python.bat in the LyX/bin dir and it will be found before 
 his broken python.exe symlink. At the moment I suspect that he has to add 
 this directory to the front of the path_prefix string.
 
 Angus

Actually, I am playing tricks with the installer ;-)
As I already have in the path everything lyx needs, I created a C:\lyxbats
directory where I put batch files. Before launching the installer, from a
command line I do touch sh.exe python.exe perl.exe ... in that directory
and point at it the installer for everything. Then, before continuing with
the installation I rm *.exe the faked executables.

I investigated the symlink thing and it turns out that Windows doesn't really
supports symlinks. It has shortcuts (.lnk files) which do their job only
using explorer windows but are inaccessible through cmd.exe. MinSys ln.exe
works because it really does a copy of the file, whereas the cygwin ln.exe
creates a shortcut (.lnk file).

Enrico








Re: The LANG environment variable...

2005-06-15 Thread Angus Leeming

Enrico Forestieri wrote:

Angus Leeming [EMAIL PROTECTED] writes:



2 Launching LyX at the end of the installer as
  !define PRODUCT_BAT $INSTDIR\bin\lyx.bat
  !define MUI_FINISHPAGE_RUN ${PRODUCT_BAT}
works perfectly well, but I get a bloody great cmd window in the 
background. How do I make it go away? 


Still to resolve.
Angus



Launching the last command in the bat file with start should do the trick.

$ cat lyx.bat
@echo off
rem
rem some stuff here
rem
start lyx.exe 

Enrico


I'm afraid that doesn't work. But anyway, I went a different route:

!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_TEXT $(FinishPageMessage)
!define MUI_FINISHPAGE_RUN_TEXT $(FinishPageRun)
!define MUI_FINISHPAGE_RUN_FUNCTION LaunchProduct
!insertmacro MUI_PAGE_FINISH

Function LaunchProduct
  lyx_configure::set_env LANG $LangCode
  Exec ${PRODUCT_EXE}
FunctionEnd

where lyx_configure is a .dll containing (among other things):

// Set an environment variable
extern C
void __declspec(dllexport) set_env(HWND hwndParent, int string_size,
   char *variables, stack_t **stacktop)
{
EXDLL_INIT();

std::string const var_name = pop_from_stack();
std::string const var_value = pop_from_stack();

SetEnvironmentVariableA(var_name.c_str(), var_value.c_str());

pushstring(0);
}

Angus





Re: The LANG environment variable...

2005-06-15 Thread Angus Leeming

Enrico Forestieri wrote:

Helge Hafting [EMAIL PROTECTED] writes:
To avoid double quoting the ~ character should be used. So:
lyx.exe %~1 %~2 %~3 %~4 %~5 %~6 %~7 %~8 %~9
works as expected.


Excellent! Done.

I'll upload Version 15 ASAP. It has this lyx.bat and a reLyX.bat for you ;-)

Angus



Windows installer version 15

2005-06-15 Thread Angus Leeming
Now uploaded to the wiki. It merges Uwe's and Helge's code and enables the 
user to specify the language of the UI by creating and running a lyx.bat file:


@echo off
if %LANG%== SET LANG=fr_FR
C:\Program Files\LyX\bin\lyx.exe %~1 %~2 %~3 %~4 %~5 %~6 %~7 %~8 %~9

Similarly, we now have a reLyX.bat file:

@echo off
perl.exe C:\Program Files\LyX\bin\reLyX %~1 %~2 %~3 %~4 %~5 %~6 %~7 %~8 %~9

Uwe, I didn't do anythiing with your fonts stuff because I don't think it 
should go on the same page as the UI language stuff and, more importantly, 
becase I was unsure whether it was finished. Why don't you start making 
patches against the stuff in CVS (BRANCH_1_3_X ;-)) and I'll start shoving 
it in.


I've just got rid of all CamelCase file names. Let's stick with lower_case 
ones.


Angus



Re: More about LyX meeting

2005-06-15 Thread Jean-Marc Lasgouttes
 Stephan == Stephan Witt [EMAIL PROTECTED] writes:

Stephan I stay from the 8th of July til 20th of July in Paris
Stephan together with my wife and my children (2) and we'll be guests
Stephan of our friends. So there is no need to care for us. But I
Stephan have to see what our plans are. Currently there is a meeting
Stephan at the 14th planned already.

Stephan I propose to talk about the details in July.

Thanks for the details. There is indeed no need to make things precise
now.

JMarc


Re: The LANG environment variable...

2005-06-15 Thread Jean-Marc Lasgouttes
 Jean-Marc == Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:

 Angus == Angus Leeming [EMAIL PROTECTED] writes:
 You didn't look in the right place, obviously. google for gettext
 windows:
 
 http://gnuwin32.sourceforge.net/install.html#Native-language_support_

Angus However, see also the message I've just posted to the MinSYS
Angus list: http://article.gmane.org/gmane.comp.gnu.mingw.msys/2611

Jean-Marc Actually the right place is intl/localename.c in 1.4.0cvs
Jean-Marc :) There is native support for windows in gettext  0.13.

Jean-Marc This probably means that if you manage to link against the
Jean-Marc gettext provided with mingw tools, it should just work.

Hello? Angus? Do you think it is possible to build LyX against the
gettext provided with mingw? This would probably fix a lot of the
language nastiness, and avoid setting of environment variables.

JMarc



Re: The LANG environment variable...

2005-06-15 Thread Angus Leeming

Jean-Marc Lasgouttes wrote:

Jean-Marc This probably means that if you manage to link against the
Jean-Marc gettext provided with mingw tools, it should just work.

Hello? Angus? Do you think it is possible to build LyX against the
gettext provided with mingw? This would probably fix a lot of the
language nastiness, and avoid setting of environment variables.


Sorry, I guess that I missed this bit of your mail.

I could certainly try, but I don't see what it gains us. There's about 20 
lines in the installer to set the language of the UI. Moreover, because it 
is encapsulated in a lyx.bat file, it's trivially easy for people to change.


I see on http://www.mingw.org/download.shtml that I would be grabbing
  gettext-0.11.5-2003.02.01-1-src.tar.bz2
  libiconv-1.8-2003.02.01-1-src.tar.bz2
Do you want me to try this anyway?

Angus (currently running lyx in french on an otherwise entirely english box)



Re: The LANG environment variable...

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

Angus Sorry, I guess that I missed this bit of your mail.

Angus I could certainly try, but I don't see what it gains us.
Angus There's about 20 lines in the installer to set the language of
Angus the UI. Moreover, because it is encapsulated in a lyx.bat file,
Angus it's trivially easy for people to change.

OK, if you are satisfied about how things work now, I guess it is not
worth trying it after all. I agree that the .bat file solution is
simple enough. 

Angus I see on http://www.mingw.org/download.shtml that I would be
Angus grabbing gettext-0.11.5-2003.02.01-1-src.tar.bz2
Angus libiconv-1.8-2003.02.01-1-src.tar.bz2 Do you want me to try
Angus this anyway?

I thought it would be present by default in the build tools.

Angus Angus (currently running lyx in french on an otherwise entirely
Angus english box)

Lucky guy!

JMarc


Re: [LyXWin Installer] small version updated again

2005-06-15 Thread Uwe Stöhr

Jean-Marc Lasgouttes a écrit:


Isn't there a way in NSIS to check whether the pdf extension is
registered? There is no reason to force the user to use acrobat if he
prefers gsview or whatever.


Good idea. The actual version:

http://fkurth.de/uwest/LyX/Installer/lyx_setup_136proposal-v15.exe

checks now for the program associated with the file extension .pdf. So 
it should work for all pdf viewers.


Angus, could you please test if Acroread is recognized? Thanks.

Johann Kellerman wrote:

 I started working on this. My thoughts was to extract the pdf viewer
 associated with pdf's on the windows machine.

 With:
 
 Function getFileAssociation
   Exch $R1
   Push $R0
   ReadRegStr $R0 HKCR $R1 
   ReadRegStr $R1 HKCR $R0\shell\open\command 
   Pop $R0
   Exch $R1
 FunctionEnd

 And then using:
   Push .pdf
   Call getFileAssociation
   pop $acrobat_path
 --

Thanks Johann, based on your idea I implemented it now as

---
!macro GetFileExtProg ProgPath AppExe Extension

 ReadRegStr ${AppExe} HKCU \
Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\${Extension}\OpenWithList 
 a

 ${if} ${AppExe} != 
  ReadRegStr ${ProgPath} HKLM \
 Software\Microsoft\Windows\CurrentVersion\App Paths\${AppExe} Path
  ;remove the \ at the end
  StrCpy ${ProgPath} ${ProgPath} -1
 ${endif}

!macroend
-

This macro is in

http://fkurth.de/uwest/LyX/Installer/Scripts/LyXUtils.nsh

The call is:

!insertmacro GetFileExtProg $PDFVPath $PDFProg .pdf

regards Uwe


Re: Installing Windows fonts

2005-06-15 Thread Uwe Stöhr

Angus Leeming wrote:


Or, perhaps more simply:

  StrCpy $0
$MiKTeXPath$\r$\n$GhostscriptPath$\r$\n$ImageMagickPath$\r$\n$PythonPath$\r$\n$PerlPath
  ${StrNSISToIO} $0 $0


Thanks Angus. I implemented it in the actual version:

(http://fkurth.de/uwest/LyX/Installer/lyx_setup_136proposal-v15.exe)

http://fkurth.de/uwest/LyX/Installer/Scripts/


Note that ${StrNSISToIO} is part of StrUtils.nsh...


BTW. It is in StrFunc.nsh

regards Uwe


Re: Installing Windows fonts

2005-06-15 Thread Uwe Stöhr

Johann Kellerman wrote:


I know there are only a couple of translated languages. What I propose is create
the other languages as nullsoft languages. For now the installer strings can be
in english until a concerned user post the correct translations. The only string
we can translate for now is the lang environment variable.


I don't know how this can be done but I mean this is confusing as the 
language popup window at the install start asks for the Installer 
Language. And it wuld also be a bit confusing if it asks for the 
program language and then displays the installer in english.


regards Uwe


Re: The LANG environment variable...

2005-06-15 Thread Uwe Stöhr

Lars Gullik Bjønnes wrote:


| Both appear to be quite common. google on nn_NO and on no_NY. Note
| that the po file is nn.po...


I'll apply this.

thanks and regards Uwe


Re: [patch] bug 1837

2005-06-15 Thread Jean-Marc Lasgouttes
 Juergen == Juergen Spitzmueller [EMAIL PROTECTED] writes:

Juergen Also, inserting of several other insets is already disabled
Juergen over multiple selected cells (because LyX crashed). I think
Juergen it is consistent to disable tabular too.

This is what I wanted to know, thanks. 

JMarc


Re: Insert-File crashes

2005-06-15 Thread Jean-Marc Lasgouttes
 Kayvan == Kayvan A Sylvan [EMAIL PROTECTED] writes:

Kayvan This is under Cygwin, using xforms frontend: Using CVS lyx,
Kayvan upon Insert-File-Plain Text As Paragraphs

Kayvan Lyx crashes with the following messages (Plain Text As Lines
Kayvan works, though):

I cannot reproduce that. Does it depend on the file?

JMarc



Re: Windows installer version 15

2005-06-15 Thread Uwe Stöhr

Angus Leeming wrote:

Uwe, I didn't do anythiing with your fonts stuff because I don't think 
it should go on the same page as the UI language stuff and, more 
importantly, becase I was unsure whether it was finished. Why don't you 
start making patches against the stuff in CVS (BRANCH_1_3_X ;-)) and 
I'll start shoving it in.


Hello Angus,

It is too complicated for me as my script differs now so much from 
yours. E.g. I don't use download.nsh etc. I've new scripts and 
ini-files. It is easier for me to implement your changes.


But why can't we agree to an installer basis? I send my proposal to the 
list and got three opinions:


Positive: Ansger, Peter Kümmel
Negative: You

That's why I changed my installer proposal but got no reply if you could 
agree with it.
If you do so, we could use my script as basis as it has implemented all 
stuff as in your version. (I'll implement the lastest change for the 
language setting now.)
If you don't agree, I'll upload my scripts this evening to the usual 
place, so that you can merge it to your version.


I'm not grumpy, but has to stop to work on the installer today - real 
life is calling me ;-). (That doesn't mean that I don't have an hour a 
day left.)


At the moment I've only feedback from my collegues. But most of the 
ideas for the improvements are from them and they therefore like the way 
I implemented it. So could I upload a version of my installer to the 
usual place this evening and you move it to the Wiki, inform me where it 
is, and I'll announce it there? Is this OK for you?


I want to hear what people think about the installer pages: Is it clear 
enough to set the language AND the fonts on the same installer page, are 
more informations about the found programs needed, could normal Win 
users understand why informations about the path_prefix is given in a 
summary page altough the found programs are listed before etc.


I mean the first impression of a program is important, not too much but 
 enough to be not decided by only two persons.


I've just got rid of all CamelCase file names. Let's stick with 
lower_case ones.


What's the advantage? It was you who started with ioSummary.ini 
instead of io_summary.ini. I just follow your scheme.


best regards
Uwe


Re: The LANG environment variable...

2005-06-15 Thread Angus Leeming

Jean-Marc Lasgouttes wrote:

Angus Sorry, I guess that I missed this bit of your mail.

Angus I could certainly try, but I don't see what it gains us.
Angus There's about 20 lines in the installer to set the language of
Angus the UI. Moreover, because it is encapsulated in a lyx.bat file,
Angus it's trivially easy for people to change.

OK, if you are satisfied about how things work now, I guess it is not
worth trying it after all. I agree that the .bat file solution is
simple enough. 


Angus I see on http://www.mingw.org/download.shtml that I would be
Angus grabbing gettext-0.11.5-2003.02.01-1-src.tar.bz2
Angus libiconv-1.8-2003.02.01-1-src.tar.bz2 Do you want me to try
Angus this anyway?

I thought it would be present by default in the build tools.


Is is now. I ran the libiconv and gettext installers. However, when I now 
configure 1.3.x without --with-included-gettext, the tests for gettext fail:


#include libintl.h
extern int _nl_msg_cat_cntr;
int
main ()
{
bindtextdomain (, );
return (int) gettext () + _nl_msg_cat_cntr
  ;
  return 0;
}

$ gcc -o conftest.exe -g -O2 -Wl,--export-all-symbols conftest.c -lm -lintl -li
conv
C:/DOCUME~1/Angus/LOCALS~1/Temp/ccwjbaaa.o: In function `main':
J:/MinSYS/home/Angus/lyx/13x/build/conftest.c:7: undefined reference to 
`_nl_msg_cat_cntr'

collect2: ld returned 1 exit status

No less a person than Bruno Haible explains here:
http://lists.gnu.org/archive/html/bug-gnu-utils/2001-05/msg00339.html
that the gettext-0.10.35 m4 macros are at fault.

I propose not to persue this further as I understand you use gettext-0.13 
in the 1.4.x tree and things work well enough --with-included-gettext in 
teh 1.3.x tree.


Angus




Re: The LANG environment variable...

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

Angus I propose not to persue this further as I understand you use
Angus gettext-0.13 in the 1.4.x tree and things work well enough
Angus --with-included-gettext in teh 1.3.x tree.

Sure. Thanks a lot to testing that.

JMarc


Re: Windows installer version 15

2005-06-15 Thread Angus Leeming

Uwe Stöhr wrote:
Uwe, I didn't do anythiing with your fonts stuff because I don't think 
it should go on the same page as the UI language stuff and, more 
importantly, becase I was unsure whether it was finished. Why don't 
you start making patches against the stuff in CVS (BRANCH_1_3_X ;-)) 
and I'll start shoving it in.


It is too complicated for me as my script differs now so much from 
yours. E.g. I don't use download.nsh etc. I've new scripts and 
ini-files. It is easier for me to implement your changes.


But why can't we agree to an installer basis? I send my proposal to the 
list and got three opinions:


Positive: Ansger, Peter Kümmel
Negative: You

That's why I changed my installer proposal but got no reply if you could 
agree with it.


To be honest, I haven't tried it since the original proposal. I don't think 
that our views are wildly different though, so there's hope ;-)


OK, here's what I propose: I'll merge in:
fonts
summary page
viewers

Then, the only remaining difference is how we deal with MinSYS,Python,Perl, 
right?


I mean the first impression of a program is important, not too much but 
 enough to be not decided by only two persons.


Agreed. but having two development trees is just confusing us both. Let's 
merge it all into a single set of sources and move forward.


I've just got rid of all CamelCase file names. Let's stick with 
lower_case ones.


What's the advantage? It was you who started with ioSummary.ini 
instead of io_summary.ini. I just follow your scheme.


Consistency. (Yes, I'm a PITA sometimes ;-))

Angus



Re: Insert-File crashes

2005-06-15 Thread Kayvan A. Sylvan
On Wed, Jun 15, 2005 at 04:20:27PM +0200, Jean-Marc Lasgouttes wrote:
  Kayvan == Kayvan A Sylvan [EMAIL PROTECTED] writes:
 
 Kayvan This is under Cygwin, using xforms frontend: Using CVS lyx,
 Kayvan upon Insert-File-Plain Text As Paragraphs
 
 Kayvan Lyx crashes with the following messages (Plain Text As Lines
 Kayvan works, though):
 
 I cannot reproduce that. Does it depend on the file?

No, it doesn't.

Is there anything I can do to help?


Re: Windows installer version 15

2005-06-15 Thread Peter Kümmel

Angus Leeming wrote:
Then, the only remaining difference is how we deal with 
MinSYS,Python,Perl, right?


You could provide both ways and give the user the choice.
Attached a shot from the Firefox setup.

Peter
inline: firefox_install.png

Re: [LyXWin Installer] small version updated again

2005-06-15 Thread Paul A. Rubin

Angus Leeming wrote:

- I need the registry path for Acroread. If anybody has installed it, 
please send it to me.



Under HKLM I have
  Software\Adobe\Acrobat\Exe
which stores
  C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe

so perhaps you can use the same test for both?



Don't know if it makes a difference, but it might be safer to use

HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\7.0\InstallPath

which on my laptop shows C:\Program Files\Adobe\Acrobat 7.0\Reader 
(i.e. everything but the file name).  The only question is whether, on a 
multi-user machine, there would be different copies of Reader in 
limited-access directories.  Seems unlikely, but ...


-- Paul




Re: Windows installer version 15

2005-06-15 Thread Uwe Stöhr

Angus Leeming wrote:

To be honest, I haven't tried it since the original proposal. I don't 
think that our views are wildly different though, so there's hope ;-)


I added a summary page at the beginning as you want it. So please give 
it a try and PLEASE report me if acroread was found (I need feedback if 
the pdf stuff is now correct). The actual version is here:


http://fkurth.de/uwest/LyX/Installer/lyx_setup_136proposal-v15-2.exe


OK, here's what I propose: I'll merge in:
fonts
summary page
viewers


I uploaded all my scripts to

http://fkurth.de/uwest/LyX/Installer/Scripts/

I changed the filenames as you wnated and tried to make my script as 
similar to the lasest CVS version. The diff is attached and at my script 
webpage.


Btw. please don't deform my code as you for example did in 
lyx_utils.nsh. I don't like meaningless variable names like $0 as it 
makes it difficult for me, others and yourself (e.g. if you haven't had 
a look at the code for half a year).


NOTE I updated the languages files as follows:

- The Program description doesn't contain the webadress as this is 
unneccesary (we have the download option for this) and often leads to 
very long strings (they are then cutted in the installer which looks ugly).


- I translated the latest error string CreateCmdFilesFailed in german.nsh

- I changed the summary description SummaryPathPrefix in english.nsh 
and german.nsh to make it clearer as not everybody knows what to do with 
an information about lyxrc.default.


NOTE My installer version supports also the swedish language, please 
also add this to your version too.


Then, the only remaining difference is how we deal with 
MinSYS,Python,Perl, right?


Yup. But as understand it you also don't like the way of my font 
installation.


I mean the first impression of a program is important, not too much 
but  enough to be not decided by only two persons.


Agreed. but having two development trees is just confusing us both. 
Let's merge it all into a single set of sources and move forward.


Also my opinion. The problem was that I changed too much in a relative 
short time ;-)



Consistency. (Yes, I'm a PITA sometimes ;-))


Hä? What is a PITA?

Peter Kümmel wrote:

 Then, the only remaining difference is how we deal with
 MinSYS,Python,Perl, right?

 You could provide both ways and give the user the choice.
 Attached a shot from the Firefox setup.

I also prefer this option. Angus' version could be the one for advanced 
users and my for average user.

Angus, is this an option also for you?

regards Uwe


Re: [LyXWin Installer] small version updated again

2005-06-15 Thread Uwe Stöhr

Paul A. Rubin wrote:


Don't know if it makes a difference, but it might be safer to use

HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\7.0\InstallPath


Hello Paul,

I implement a solution that checks which program is associated to the 
.pdf file extension. Could you please thest if this installer finds 
Adobe Reader on your computer:


http://fkurth.de/uwest/LyX/Installer/lyx_setup_136proposal-v15-2.exe

thanks in advance and regards
Uwe


Re: The LANG environment variable...

2005-06-15 Thread Enrico Forestieri
Angus Leeming [EMAIL PROTECTED] writes:
 
 Enrico Forestieri wrote:
  Helge Hafting helge.hafting at ... writes:
  To avoid double quoting the ~ character should be used. So:
  lyx.exe %~1 %~2 %~3 %~4 %~5 %~6 %~7 %~8 %~9
  works as expected.
 
 Excellent! Done.
 
 I'll upload Version 15 ASAP. It has this lyx.bat and a reLyX.bat for you 
 
 Angus

Thank you Angus, however I think it is better to simply use
lyx.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
otherwise lyx.exe would get called like this:
lyx.exe file.lyx
and it would ask you if you want to create a file with no name for eight times!
This is not harmful, because you should take care to quote the file if it has
spaces (the explorer windows always quote the filenames they pass in).
On the other hand, if you omit the quotes and use:
lyx.exe %~1 %~2 %~3 %~4 %~5 %~6 %~7 %~8 %~9
then if a passed argument was quoted it gets unquoted and problems arise if
there were spaces. I really hate Windows :-(

As regards v15 I just tried it.
1) I have no LANG variable set in my preferences, but when starting a cmd.exe
it is automatically set to my locale, so I cannot really choose a different
language for the lyx GUI, unless modifying lyx.bat.
2) The reLyX script is not catched by the configure script, so I have no
menu entries for importing a latex file (to fix this, the LyXdir/bin
directory should be in the path the moment configure is called).
3) There still is the problem with symlinks in cygwin preventing to run
successfully Edit-Reconfigure if one has miktex (it is not a problem with the
cygwin latex package).

Please, keep in mind that I am reporting this to help you fine tuning the
installer for the casual user, as I am able to fix these small problems for
myself.

Thank you all again for your great work!

Enrico





Re: The LANG environment variable...

2005-06-15 Thread Enrico Forestieri
Angus Leeming [EMAIL PROTECTED] writes:
 
 Enrico Forestieri wrote:

[snip]

  Launching the last command in the bat file with start should do the trick.
  
  $ cat lyx.bat
   at echo off
  rem
  rem some stuff here
  rem
  start lyx.exe 
  
  Enrico
 
 I'm afraid that doesn't work.

How odd. It works in my Win2k. Anyway, I lost my hope for a consistent behavior
in Windows. In my opinion, the phase of the moon also plays a role in Windows 
;-)

Enrico





Re: [patch] math_colorinset fix

2005-06-15 Thread Lars Gullik Bjønnes
Georg Baum [EMAIL PROTECTED] writes:

| Lars Gullik Bjønnes wrote:

 Georg Baum [EMAIL PROTECTED]
 writes:
 
 | -   transform[string(entry.lyxname)] = int(entry.lcolor);
 | +   LyXTransform[string(entry.lyxname)] = int(entry.lcolor);
 | +   LaTeXTransform[string(entry.latexname)] = int(entry.lcolor);
 
 Can you please change the names of these variables.

| Would lyxcolors and latexcolors be OK? Please make a suggestion if not,
| because I don't really know what you want.

 is the string() cast really needed?

| OK, I removed lots of casts. Would the attached be OK?
| BTW, I also tried the multi_index variant because I was curious. The idea
| seems nice, but too much code IMHO (or I missed something).

For 1.5 I think we should use the multi_index.
Too me it looks really nice.

And take the setup of this out ot LColor.

-- 
Lgb



Re: [patch] math_colorinset fix

2005-06-15 Thread Lars Gullik Bjønnes
Georg Baum [EMAIL PROTECTED] writes:

| Lars Gullik Bjønnes wrote:

 Georg Baum [EMAIL PROTECTED]
 writes:
 
 | -   transform[string(entry.lyxname)] = int(entry.lcolor);
 | +   LyXTransform[string(entry.lyxname)] = int(entry.lcolor);
 | +   LaTeXTransform[string(entry.latexname)] = int(entry.lcolor);
 
 Can you please change the names of these variables.

| Would lyxcolors and latexcolors be OK? Please make a suggestion if not,
| because I don't really know what you want.


especially the uppercase is not good.

your suggestion would be ok.

 is the string() cast really needed?

| OK, I removed lots of casts. Would the attached be OK?
| BTW, I also tried the multi_index variant because I was curious. The idea
| seems nice, but too much code IMHO (or I missed something).

Probably not.

-- 
Lgb



Re: Windows installer version 15

2005-06-15 Thread Angus Leeming

Uwe Stöhr wrote:

Angus Leeming wrote:
To be honest, I haven't tried it since the original proposal. I don't 
think that our views are wildly different though, so there's hope ;-)


I added a summary page at the beginning as you want it. So please give 
it a try and PLEASE report me if acroread was found (I need feedback if 
the pdf stuff is now correct). The actual version is here:


OK.

I changed the filenames as you wnated and tried to make my script as 
similar to the lasest CVS version. The diff is attached and at my script 
webpage.


Good man!

Btw. please don't deform my code as you for example did in 
lyx_utils.nsh. I don't like meaningless variable names like $0 as it 
makes it difficult for me, others and yourself (e.g. if you haven't had 
a look at the code for half a year).


Shrug. Your code caused the compiler to emit a couple of warnings, so I 
silenced it. One way of achieving transparency is:


!macro FooBarBody Var1 Var2 Var3
 ; insert code to use Var1 Var2 Var3 here
!macroend

Function FooBar
  Exch $0
  Exch
  Exch $1
  Exch 2
  Exch $2

  !insertmacro FooBarBody $0 S1 S2

  Exch $2
  Exch
  Exch $1
  Exch 2
  Exch $0
!FunctionEnd

But basically, NSIS is a language to hide meaning, not make your intent 
clear :-(



NOTE I updated the languages files as follows:

- The Program description doesn't contain the webadress as this is 
unneccesary (we have the download option for this) and often leads to 
very long strings (they are then cutted in the installer which looks ugly).


- I translated the latest error string CreateCmdFilesFailed in german.nsh

- I changed the summary description SummaryPathPrefix in english.nsh 
and german.nsh to make it clearer as not everybody knows what to do with 
an information about lyxrc.default.


NOTE My installer version supports also the swedish language, please 
also add this to your version too.


??? How peculiar. I thought it already had it... Yes, it does.

Then, the only remaining difference is how we deal with 
MinSYS,Python,Perl, right?


Yup. But as understand it you also don't like the way of my font 
installation.


No, I think that your font stuff is excellent.

I mean the first impression of a program is important, not too much 
but  enough to be not decided by only two persons.


Agreed. but having two development trees is just confusing us both. 
Let's merge it all into a single set of sources and move forward.


Also my opinion. The problem was that I changed too much in a relative 
short time ;-)


:-)


Consistency. (Yes, I'm a PITA sometimes ;-))

Hä? What is a PITA?


Pain In The Ass; Schmerz im Arsch.


Peter Kümmel wrote:

  Then, the only remaining difference is how we deal with
  MinSYS,Python,Perl, right?
 
  You could provide both ways and give the user the choice.
  Attached a shot from the Firefox setup.

I also prefer this option. Angus' version could be the one for advanced 
users and my for average user.

Angus, is this an option also for you?


I'm going to post a minimal, does nothing, installer to show you what I 
think we should have.


Angus



Windows installer, first page

2005-06-15 Thread Angus Leeming

Angus Leeming wrote:
 Peter Kümmel wrote:
   Then, the only remaining difference is how we deal with
   MinSYS,Python,Perl, right?
  
   You could provide both ways and give the user the choice.
   Attached a shot from the Firefox setup.

 I also prefer this option. Angus' version could be the one for
 advanced users and my for average user.
 Angus, is this an option also for you?

 I'm going to post a minimal, does nothing, installer to show you what I
 think we should have.

Ok, here's what I think we should have for the first page. All those other 
pages will be visited only if the user explicitly wants to.


Note the Install Minimal version which is meant to inform the user that 
we're proposing to use your minimal package. However, the user is free to 
change anything and everything...


(As you can see, Uwe, your stuff to find the .pdf viewer works perfectly here.)

Angus
inline: software_audit.png

software_audit.tar.bz2
Description: Binary data


Re: Windows installer version 15

2005-06-15 Thread Uwe Stöhr

Angus Leeming wrote:

Btw. please don't deform my code as you for example did in 
lyx_utils.nsh. I don't like meaningless variable names like $0 as it 
makes it difficult for me, others and yourself (e.g. if you haven't 
had a look at the code for half a year).


Shrug. Your code caused the compiler to emit a couple of warnings, so I 
silenced it.


Hä? What are the warnings messages? I don't get warnings as I 
meticulously pay attention not to get them.

Not to be correct is a strong imputation for a german ;-)

 But basically, NSIS is a language to hide meaning, not make your intent
 clear :-(

I don't think so. One just needs to define variable names stating its 
useage. This increases the writing time but helps a lot.


To be a good german I updated the last update to the package as I promised:

http://fkurth.de/uwest/LyX/Installer/lyx_setup_136proposal-v15-3.exe

In the meantime I got more feedback so thatthis version contains a bug 
fix (logic fault) for the first summary page.
New is that if one of the three needed programs could not be found, the 
Next button is renamed to Quit and the Cancel button disappears. 
The implementation is simple:


   !insertmacro MUI_INSTALLOPTIONS_WRITE io_missing_progs.ini 
Settings NextButtonText Quit
   !insertmacro MUI_INSTALLOPTIONS_WRITE io_missing_progs.ini 
Settings CancelShow 0


See the actual lyx_installer_small.nsh on my script webpage. I leave the 
old version as lyx_installer_small_old.nsh to let you make a diff if you 
started the merge yet.


NOTE My installer version supports also the swedish language, please 
also add this to your version too.


??? How peculiar. I thought it already had it... Yes, it does.


I mean if the installer is started in swedish, the default manue 
language will be set to english as swedish is not yet supported by LyX.
OK this is not necessary but it is good to have te code in lyx_utils.nsh 
for further work.


Yup. But as understand it you also don't like the way of my font 
installation.


No, I think that your font stuff is excellent.


You wanted to add me once to LyX's fame list of lyx just for 
translating the installer strings. I think you can add me now for the 
code contributions to the installer, if my code is really excellent ;-)


regards Uwe


Re: Windows installer, first page

2005-06-15 Thread Uwe Stöhr

Angus Leeming wrote:

Ok, here's what I think we should have for the first page. All those 
other pages will be visited only if the user explicitly wants to.


No this is what I DON'T want!

I want to have a page with two radion buttons, one for the advanced 
installation and one for standard.


If the user chooses advanced the three pages for sh.exe, python, and 
perl appear as they do in your installer version. I think this soulution 
has been proved the last days as perfect for advanced users who want to 
play a bit.


If the user chooses standard something similar to my installer version 
appears. The feedback I got this evening was that I also should get rid 
of the program path informations in the summary pages. They don't want 
to be bothered by that. If they know that a pdf viewer was found (no 
matter in which path the .exe is stored) they are happy.


Please believe me and Asger that an average Win user don't know what 
python or UNIX or a shell is. If you don't believe me, go for example to 
the travel agency next to you and ask the people there (=average Win 
users) if they know what a shell is.
To clearify my intention again: I installed LyXWin for users who e.g. 
didn't know how to create a startmenu entry. But they are able to work 
with LyX and want them also to be able to install LyX. My audience don't 
like to make decisions about programs they haven't heard about. That's 
why I want to have the standard installation as I proposed it.


(As you can see, Uwe, your stuff to find the .pdf viewer works perfectly 
here.)


Cl!



At last some general annotations:

- We can't search for a PostScript viewer in the way I do for pdf. 
Because if acrobat is installed it associates the .ps extension to 
Acrobat Distiller (a ps to pdf converter program). I had a look at the 
PC's at work and that's the setting on many of the machines. It seems 
that some people don't use PostScript (Btw. me too).


- But in my opinion we shouldn't search for a PostScript viewer as we 
don't have a menu entry in LyX for View - PostScript. So standard users 
wont have problems. If advanced users add a menu entry for PostScript 
they know what they are doing and can set the viewer manually in the 
preferences.


best regards Uwe


Latest CVS lyx: crashing on export?

2005-06-15 Thread Kayvan A. Sylvan
Hi everyone,

Is anyone else seeing a crash when trying to view or export?

For me, it's happening every time with View-PDF, or Export-PDF,
Export-HTML, etc.

On Cygwin, xforms frontend.

---Kayvan


Re: [LyXWin 1.3.6pre12] View (pdflatex) dies at graphic

2005-06-15 Thread Georg Baum
Paul A. Rubin wrote:

> (version 1.3.5)
> C:/LyX/tmp/lyx_tmpdir2408a00864/lyx_tmpbuf0/_LyX_Documents_MGT914_princomp
> 
> (version 1.3.6) "C:/Documents and Settings/rubin.BUSINESS/Local
> Settings/Temp/lyx_tmpdir3112a03360/lyx_tmpbuf0/C__Documents and
> Settings_rubin_BUSINESS_My Documents_MGT 914_Lecture Notes_princomp"
> 
> So apparently the .pdf extension is not needed (since 1.3.5 doesn't use
> it, and pdflatex works in that case).  Maybe it really is the spaces in
> the path causing the problem?

No. I looked up the old tests I did and it appears that the .pdf extension
is needed if the file name is quoted with ". This was not the case on
Angus' machine because the path to his temp directory did not contain
spaces, but it is the case on your machine because it does contain spaces.
Therefore a simple workaround for now is to change the location of the temp
directory.

Angus, I have a half finished patch for this problem which I hope to
complete soon.


Georg




Re: Installing Windows fonts

2005-06-15 Thread Johann Kellerman

> > and the \t issue when you write to 
> >   !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSummary.ini" "Field 2" "Text" \
> >"$INSTDIR\bin \r\n$MiKTeXPath \r\n$GhostscriptPath
> > \r\n$ImageMagickPath\r\n$PythonPath\r\n$PerlPath"
> > you have to quote the paths.
> 
> What do you mean with the "\t issue" did I missed something? And what 
> should I quote? This is a string of a label and threrfore still in quotes.

Sorry for the confusion. It was discussed in an earlier post. If you write to
the installoptions ini file. you have to quote (or rather escape) \t \r \n in
the paths. else they get turned into spaces, newlines etc. According the the
abovementioned section you should have \\t for tab (located in path strings like
c:\texmf). They have the nessacery function in installoption(see below).

So after constructing and writing out the complete path variable to anther
variable, the one that you send to Angus's plugin. You should escape al the path
names:

Push $GhostscriptPath
Call Nsis2Io
Pop $GhostscriptPath
Push $INSTDIR
Call Nsis2Io
Pop $R0   ; dont mess with instdir
Push $MiKTeXPath
Call Nsis2Io
Pop $MiKTeXPath
Push $PerlPath
Call Nsis2Io
Pop $PerlPath
Push $ImageMagickPath
Call Nsis2Io
Pop $ImageMagickPath
Push $PythonPath
Call Nsis2Io
Pop $PythonPath
;and then only --> note the $R0 change
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSummary.ini" "Field 2" "Text" \
"$R0\bin \r\n$MiKTeXPath \r\n$GhostscriptPath
 \r\n$ImageMagickPath\r\n$PythonPath\r\n$PerlPath"


Haven't tested it but it should work (hopefully)

I will look into skipping a page. I no it is possible to skip standard pages
with _PRE and _POST macros, but I'll try to construct a small installoptions
case and pass it along


Regards, 
Johann







; Convert an NSIS string to a form suitable for use by InstallOptions
; Usage:
;   Push 
;   Call Nsis2Io
;   Pop 
Function Nsis2Io
  Exch $0 ; The source
  Push $1 ; The output
  Push $2 ; Temporary char
  StrCpy $1 "" ; Initialise the output
loop:
  StrCpy $2 $0 1 ; Get the next source char
  StrCmp $2 "" done ; Abort when none left
StrCpy $0 $0 "" 1 ; Remove it from the source
StrCmp $2 "\" "" +3 ; Back-slash?
  StrCpy $1 "$1\\"
  Goto loop
StrCmp $2 "$\r" "" +3 ; Carriage return?
  StrCpy $1 "$1\r"
  Goto loop
StrCmp $2 "$\n" "" +3 ; Line feed?
  StrCpy $1 "$1\n"
  Goto loop
StrCmp $2 "$\t" "" +3 ; Tab?
  StrCpy $1 "$1\t"
  Goto loop
StrCpy $1 "$1$2" ; Anything else
Goto loop
done:
  StrCpy $0 $1
  Pop $2
  Pop $1
  Exch $0
FunctionEnd





Re: generated filenames too long

2005-06-15 Thread Stefan Kostner

Hi Andre,
On Jun 13, 2005, at 9:27 PM, Andre Poenitz wrote:


On Mon, Jun 13, 2005 at 07:42:15PM +0200, Stefan Kostner wrote:

Stefan Kostner wrote:

This means that the filenames of the eps files can be extremely long
causing tools like dvips to crash with either segfault or
for instance "dvips: ! out of string space".


Looks like a fundamental limitation. We don't add characters to the
path,
just replace them. If your path has more than PATH_MAX characters,
you've
lucked out.


So, why not using other filenames. Since those files are only of
temporary nature they could just be numberd, or a combination of
numbers and the real filename (without the full path), or only a
relative paths...?


The idea was to leave the user with some information were things came
from in case anything went wrong. Just having an error message
'lyxtmp133241.pdf corrupt' is not very helpful.

That's a good point, but still I think that skipping the full path and 
keeping the filename only would be a good option. In this case the 
information about the files being processed is still there but the 
filenames are shorter.
It would also help to use the relative path between document and images 
instead of the full path. Then there is also no way to mix up same 
filenames included  from different directories while keeping the full 
information.


regards,
stefan



Re: More about LyX meeting

2005-06-15 Thread Alfredo Braunstein
Angus Leeming wrote:

> finding a new job and me expecting in November too!" In fact, if, after

Congratulations both!

Alfredo




Re: Installing Windows fonts

2005-06-15 Thread Johann Kellerman

> > Create one string that contains
> > the lang environment variable and just makes sure that is translated
for now.
> > That solves the language step in one go. You select your installation 
  language
> > and your environment variable is set according to that.
> 
> That is not possible as we have only six available installer languages. 
> That means an italian user must start the installer in english and can 
> later choose "Italiano".

I know there are only a couple of translated languages. What I propose is create
the other languages as nullsoft languages. For now the installer strings can be
in english until a concerned user post the correct translations. The only string
we can translate for now is the lang environment variable.

This means a user selects a language only once. If not translated yet, maybe
show a message that the installer is in english until we receive a contribution,
but at least lyx should be fine.

Regards, Johann






Re: Installing Windows fonts

2005-06-15 Thread Angus Leeming
Johann Kellerman wrote:
> So after constructing and writing out the complete path variable to
> anther variable, the one that you send to Angus's plugin. You should
> escape al the path names:
> 
> Push $GhostscriptPath
> Call Nsis2Io
> Pop $GhostscriptPath
> Push $INSTDIR
> Call Nsis2Io
> Pop $R0   ; dont mess with instdir
> Push $MiKTeXPath
> Call Nsis2Io
> Pop $MiKTeXPath
> Push $PerlPath
> Call Nsis2Io
> Pop $PerlPath
> Push $ImageMagickPath
> Call Nsis2Io
> Pop $ImageMagickPath
> Push $PythonPath
> Call Nsis2Io
> Pop $PythonPath
> ;and then only --> note the $R0 change
> !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSummary.ini" "Field 2" "Text" \
> "$R0\bin \r\n$MiKTeXPath \r\n$GhostscriptPath
>  \r\n$ImageMagickPath\r\n$PythonPath\r\n$PerlPath"

Or, perhaps more simply:

  StrCpy $0
"$MiKTeXPath$\r$\n$GhostscriptPath$\r$\n$ImageMagickPath$\r$\n$PythonPath$\r$\n$PerlPath"
  ${StrNSISToIO} $0 $0

Note that ${StrNSISToIO} is part of StrUtils.nsh...

You don't want to manipulate (change) $GhostscriptPath et al, because
you're actually going to use them later...

-- 
Angus



Re: More about LyX meeting

2005-06-15 Thread Angus Leeming
Alfredo Braunstein wrote:
>>... and me expecting in November too!"...
> Congratulations both! 

Thanks, Alfredo. Hope your little family is doing well too.

-- 
Angus



Re: The LANG environment variable...

2005-06-15 Thread Helge Hafting

Angus Leeming wrote:


On Tuesday 14 June 2005 21:34, Andre Poenitz wrote:
 


On Tue, Jun 14, 2005 at 01:14:05PM +0200, Helge Hafting wrote:
   


if "%LANG%"=="" SET LANG=no_NO
lyx.exe %*
[...]
Second line starts the lyx executable and passes any parameters
to it. The script is tested on windows XP.  (I don't have lyx for
windows, but the LANG test and parameter passing works fine.)
 


I don't think it works on older Windows versions. I've seen
%1 %2 %3 %4 %5 %6 %7 %8 %9  in this place often enough to assume
that it can't be a mere oversight of lazy programmers...
   



 


I tested with windows98 - windows98 don't support .cmd files
(they have to end in .bat instead), and there is no support for %*
So it depends on how old windows versions you want to support.
Of course %1 %2 %3 ... works on newer windows too, but limits you
to 9 arguments.  (You can probably get more by using some
ugly tricks with the "shift" command...)


In that case, shouldn't it be

lyx.exe "%1" "%2" "%3" "%4" "%5" "%6" "%7" "%8" "%9"

 


No, that will turn
lyx.bat "file with spaces.lyx"
into
lyx.exe ""file with spaces.lyx"" and that won't work too well.

The windows shell is like most other ms software - not well planned
for corner cases.

If you pass a filename with quotes to a windows batchfile, then
the quotes are preserved as part of the %1 variable.  Any
subsequent use of %1 will retain the quotes.  So they shouldn't
be necessary, at least not on windows98.

Helge Hafting










Re: The LANG environment variable...

2005-06-15 Thread Helge Hafting

Andre Poenitz wrote:


On Tue, Jun 14, 2005 at 10:45:07AM +0200, Asger Alstrup wrote:
 


Angus Leeming wrote:
   


That way, Uwe wouldn't set LANG globably from the Windows installer but
rather would get the configure script to output

 \ui_language de_DE

to lyxrc.defaults.

Thoughts?
 

Looks good to me. I was thinking the same, except that I was leaning 
towards a command-line option, but lyxrc will do for me as well.
   



The command line option is  'LANG=de_DE lyx' in a decent shell.


That'll be  'set LANG=de_DE' in the windows shell.

Helge Hafting



Re: More about LyX meeting

2005-06-15 Thread Alfredo Braunstein
Angus Leeming wrote:

> Alfredo Braunstein wrote:
>>>... and me expecting in November too!"...
>> Congratulations both!
> 
> Thanks, Alfredo. Hope your little family is doing well too.

We are overwhelmingly happy, it's just a pitty that it's a bit
LyX-incompatible (I mean new job, new city, new house, pre-birth courses
and exams and all that -- and this is just *before*, so I can't really
imagine how things will be *after*). But I'm sure things will adjust
eventually.

Otherwise, we can think of this small LyX investment in exchange of a
kick-ass development team in about twenty years! (I would expect another
entry in CREDITS then)

Regards, Alfredo




Re: The LANG environment variable...

2005-06-15 Thread Angus Leeming

Helge Hafting wrote:

Angus Leeming wrote:


On Tuesday 14 June 2005 21:34, Andre Poenitz wrote:
 


On Tue, Jun 14, 2005 at 01:14:05PM +0200, Helge Hafting wrote:
  


if "%LANG%"=="" SET LANG=no_NO
lyx.exe %*
[...]
Second line starts the lyx executable and passes any parameters
to it. The script is tested on windows XP.  (I don't have lyx for
windows, but the LANG test and parameter passing works fine.)



I don't think it works on older Windows versions. I've seen
%1 %2 %3 %4 %5 %6 %7 %8 %9  in this place often enough to assume
that it can't be a mere oversight of lazy programmers...
  



 


I tested with windows98 - windows98 don't support .cmd files
(they have to end in .bat instead), and there is no support for %*
So it depends on how old windows versions you want to support.
Of course %1 %2 %3 ... works on newer windows too, but limits you
to 9 arguments.  (You can probably get more by using some
ugly tricks with the "shift" command...)


In that case, shouldn't it be

lyx.exe "%1" "%2" "%3" "%4" "%5" "%6" "%7" "%8" "%9"

 


No, that will turn
lyx.bat "file with spaces.lyx"
into
lyx.exe ""file with spaces.lyx"" and that won't work too well.

The windows shell is like most other ms software - not well planned
for corner cases.

If you pass a filename with quotes to a windows batchfile, then
the quotes are preserved as part of the %1 variable.  Any
subsequent use of %1 will retain the quotes.  So they shouldn't
be necessary, at least not on windows98.

Helge Hafting


Hi, Helge. Thanks for the info.

I've been testing things out and have two remaining problems:
1. Creating short cuts from the desktop and from the start menu to
c:\Program Files\LyX\bin\lyx.bat
works perfectly well, but my icons are replaced with that of a .bat file. 
Any idea how to get back to the icon embedded in lyx.exe?


2 Launching LyX at the end of the installer as
   !define PRODUCT_BAT "$INSTDIR\bin\lyx.bat"
   !define MUI_FINISHPAGE_RUN "${PRODUCT_BAT}"
works perfectly well, but I get a bloody great cmd window in the 
background. How do I make it go away? :-)


Angus



Re: [LyXWin Installer] small version updated again

2005-06-15 Thread Angus Leeming

Uwe Stöhr wrote:

Hello LyXers,

again an update to the installer:

http://fkurth.de/uwest/LyX/Installer/lyx_setup_136proposal-v14-2.exe


Angus Leeming wrote:



In other words, I think that the installer should lead the user 
through the installation. It shouldn't "just do it" for him. That's 
why I think a summary page at the beginning listing everything that 
LyX has found (or not found) that it can use would be a good thing.



It is implemented now. Please have a look if you could agree with this 
solution.


But there are more improvements:


Wooo! Slow downn! I can't keep up ;-)


- The installer comes now with the actual documentation files
 (Argh, I just see that I shipped the wrong files for LateXConfig.lyx)
- The installer searches now for Acrobat and add its path to
  lyxrc.default so that LyX can find it while configuring.


Good.


- Now also LyX's configuration files are deleted while uninstalling LyX.
  The files are under
  C:\Documents and Settings\name of current user\Application Data\


Be careful here. Don't delete this unless the user explicitly asks you to. 
A MessageBox?


I've been merging your UI language stuff and Helge's suggestion to use a 
lyx.bat file. A couple of minor issues (I hope) still to deal with but I 
hope to commit it to the CVS repository v. soon.



Remaining issues:

- I need the registry path for Acroread. If anybody has installed it, 
please send it to me.


Under HKLM I have
  "Software\Adobe\Acrobat\Exe"
which stores
  "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe"

so perhaps you can use the same test for both?


\viewer pdf "acrobat"

But we need also the entries

\viewer pdf2 "acrobat"
\viewer pdf3 "acrobat"

Simple fix attached, please apply.


Will do.
Angus



Re: [LyXWin Installer] small version updated again

2005-06-15 Thread Uwe Stöhr

I wrote:


But we need also the entries

\viewer pdf2 "acrobat"
\viewer pdf3 "acrobat"

Simple fix attached, please apply.


I've a better solution. The entries should only be made if pdflatex and 
dvipdfm does really exists. The attached patch works for me.


Angus, two questions about the configure file:

- What script language is it?
- Where can I find it in the CVS reposotory? I find only the file
  configure.mt4 nut this one is different from the one shipped with
  LyxWin pre 136.

thanks and regards Uwe
--- configureOld	Wed Jun 15 03:35:49 2005
+++ configure	Wed Jun 15 04:11:22 2005
@@ -116,6 +116,43 @@
 
 
  Searching some useful programs
+
+# Search for a program to preview pdf
+echo $ac_n "checking for a PDF preview""... $ac_c"
+echo "$ac_t""(acrobat acrord32 gsview32 acroread gv ghostview xpdf)"
+PDF_VIEWER=
+for ac_prog in acrobat acrord32 gsview32 acroread gv ghostview xpdf
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog ; ac_word=$2
+if test -n "$ac_word"; then
+  echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
+  IFS="${IFS=	}"; ac_save_ifs="$IFS"; IFS=":"
+  for ac_dir in $PATH; do
+test -z "$ac_dir" && ac_dir=.
+if test -x $ac_dir/$ac_word; then
+  PDF_VIEWER="$ac_prog"
+  break
+fi
+  done
+  IFS="$ac_save_ifs"
+
+  if test -n "$PDF_VIEWER"; then
+ac_result=yes
+
+  else
+ac_result=no
+  fi
+  echo "$ac_t""$ac_result"
+  test -n "$PDF_VIEWER" && break
+fi
+done
+
+if test -z "$PDF_VIEWER" ; then
+  PDF_VIEWER=none
+fi
+
+
 # Search LaTeX2e
 echo $ac_n "checking for a LaTeX2e program""... $ac_c"
 echo "$ac_t""(latex latex2e)"
@@ -179,6 +216,7 @@
   echo $ac_n "checking for the pdflatex program""... $ac_c"
 echo "$ac_t""(pdflatex)"
 latex_to_pdf=
+latexpdf=
 for ac_prog in pdflatex
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -197,7 +235,7 @@
 
   if test -n "$latex_to_pdf"; then
 ac_result=yes
-
+latexpdf="$PDF_VIEWER"
   else
 ac_result=no
   fi
@@ -480,41 +518,6 @@
 esac
 EPS_VIEWER=$GHOSTVIEW
 
-# Search for a program to preview pdf
-echo $ac_n "checking for a PDF preview""... $ac_c"
-echo "$ac_t""(acrobat acrord32 gsview32 acroread gv ghostview xpdf)"
-PDF_VIEWER=
-for ac_prog in acrobat acrord32 gsview32 acroread gv ghostview xpdf
-do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog ; ac_word=$2
-if test -n "$ac_word"; then
-  echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
-  IFS="${IFS=	}"; ac_save_ifs="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-test -z "$ac_dir" && ac_dir=.
-if test -x $ac_dir/$ac_word; then
-  PDF_VIEWER="$ac_prog"
-  break
-fi
-  done
-  IFS="$ac_save_ifs"
-
-  if test -n "$PDF_VIEWER"; then
-ac_result=yes
-
-  else
-ac_result=no
-  fi
-  echo "$ac_t""$ac_result"
-  test -n "$PDF_VIEWER" && break
-fi
-done
-
-if test -z "$PDF_VIEWER" ; then
-  PDF_VIEWER=none
-fi
-
 
 # Search something to preview dvi
 echo $ac_n "checking for a DVI previewer""... $ac_c"
@@ -665,6 +668,7 @@
 echo $ac_n "checking for a DVI to PDF converter""... $ac_c"
 echo "$ac_t""(dvipdfm)"
 dvi_to_pdf_command=
+dvipdf=
 for ac_prog in dvipdfm
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -683,7 +687,7 @@
 
   if test -n "$dvi_to_pdf_command"; then
 ac_result=yes
-
+dvipdf="$PDF_VIEWER"
   else
 ac_result=no
   fi
@@ -1346,6 +1350,8 @@
 \\viewer dvi "$DVI_VIEWER"
 \\viewer html "$HTML_VIEWER"
 \\viewer pdf "$PDF_VIEWER"
+\\viewer pdf2 "$latexpdf"
+\\viewer pdf3 "$dvipdf"
 \\viewer ps "$PS_VIEWER"
 \\viewer eps "$EPS_VIEWER"
 


Re: [LyXWin Installer] small version updated again

2005-06-15 Thread Angus Leeming

Uwe Stöhr wrote:

I wrote:


But we need also the entries

\viewer pdf2 "acrobat"
\viewer pdf3 "acrobat"

Simple fix attached, please apply.


I've a better solution. The entries should only be made if pdflatex and 
dvipdfm does really exists. The attached patch works for me.


This is overkill and anyway you should be hacking the .m4 file. If the 
converters to pdf2, pdf3 don't exist then it doesn't matter how the viewer 
is defined. It just won't be used.



Angus, two questions about the configure file:

- What script language is it?


sh. But it is generated from configure.m4:
$ m4 configure.m4 > configure


- Where can I find it in the CVS reposotory? I find only the file
  configure.mt4 nut this one is different from the one shipped with
  LyxWin pre 136.


You need to look at BRANCH_1_3_X again...
Angus



thanks and regards Uwe





Re: The LANG environment variable...

2005-06-15 Thread Angus Leeming

Angus Leeming wrote:

I've been testing things out and have two remaining problems:
1. Creating short cuts from the desktop and from the start menu to
c:\Program Files\LyX\bin\lyx.bat
works perfectly well, but my icons are replaced with that of a .bat 
file. Any idea how to get back to the icon embedded in lyx.exe?


Resolved. Read the documentation, Angus!


2 Launching LyX at the end of the installer as
   !define PRODUCT_BAT "$INSTDIR\bin\lyx.bat"
   !define MUI_FINISHPAGE_RUN "${PRODUCT_BAT}"
works perfectly well, but I get a bloody great cmd window in the 
background. How do I make it go away? :-)


Still to resolve.
Angus



Re: [patch] math_colorinset fix

2005-06-15 Thread Georg Baum
Andre Poenitz wrote:

> On Tue, Jun 14, 2005 at 12:11:53PM +0200, Georg Baum wrote:
>> Done. Please test. I also changed inheritance from MathNestInset to
>> MathGridInset in order to get the corner markers.
> 
> That's wrong IIRC. You can add corner markers by calling
> metricsMarkers[2] and drawMarkers[2] to any inset  (the '2'
> version is for corners everywhere, the unadorned version only
> for lower left and lower right corner).

I changed that.

>> Otherwise it is impossible to delete a color inset by pressing
>> backspace at the beginning.
> 
> The responsible code is LCursor::pullArg which should work for e.g.
> any MathNestInset, even for such that are not a MathGridInset.

Of course it does, but it is difficult to navigate to the right position
without markers.

>> The disadvantage of this patch is that user defined colors are not
>> editable in LyX anymore. They are correctly read and written, so that
>> you don't lose data. IMHO the better UI for supported colors outweighs
>> this disadvantage.  What do you think?
> 
> *shrug* It's a rarely used gimmick as far as I am concerned so I really
> don't care. User defined colors means ERT somewhere, so we can expect
> the user to use ERT also when using it...

Then I am going to commit the attached patch provided that Jürgens testing
does not show problems.
  
> The MathHullInset some how should change the 'inherited base color'.
> Don't ask me how this could be achieved exactly.

I hoped you knew that!


GeorgIndex: src/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.2199
diff -u -p -r1.2199 ChangeLog
--- src/ChangeLog	9 Jun 2005 15:19:06 -	1.2199
+++ src/ChangeLog	14 Jun 2005 09:58:47 -
@@ -1,3 +1,7 @@
+2005-06-14  Georg Baum  <[EMAIL PROTECTED]>
+
+	* LColor.[Ch] (getFromLaTeXName): new
+
 2005-06-11  Georg Baum  <[EMAIL PROTECTED]>
 
 	* LaTeXFeatures.C (getPackages): solve amsmath-wasysym conflict
Index: src/LColor.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LColor.C,v
retrieving revision 1.55
diff -u -p -r1.55 LColor.C
--- src/LColor.C	19 Jan 2005 15:03:27 -	1.55
+++ src/LColor.C	14 Jun 2005 09:58:47 -
@@ -66,7 +66,8 @@ public:
 		in.x11name   = string(entry.x11name);
 		in.guiname   = string(entry.guiname);
 		infotab[entry.lcolor] = in;
-		transform[string(entry.lyxname)] = int(entry.lcolor);
+		LyXTransform[string(entry.lyxname)] = int(entry.lcolor);
+		LaTeXTransform[string(entry.latexname)] = int(entry.lcolor);
 	}
 
 	///
@@ -75,8 +76,10 @@ public:
 	InfoTab infotab;
 
 	typedef std::map Transform;
-	/// the transform between colour name string and integer code.
-	Transform transform;
+	/// the transform between LyX color name string and integer code.
+	Transform LyXTransform;
+	/// the transform between LaTeX color name string and integer code.
+	Transform LaTeXTransform;
 
 };
 
@@ -234,14 +237,14 @@ bool LColor::setColor(LColor::color col,
 bool LColor::setColor(string const & lyxname, string const )
 {
 	string const lcname = ascii_lowercase(lyxname);
-	if (pimpl_->transform.find(lcname) == pimpl_->transform.end()) {
+	if (pimpl_->LyXTransform.find(lcname) == pimpl_->LyXTransform.end()) {
 		lyxerr[Debug::GUI]
 			<< "LColor::setColor: Unknown color \""
 		   << lyxname << '"' << endl;
 		addColor(static_cast(pimpl_->infotab.size()), lcname);
 	}
 
-	return setColor(static_cast(pimpl_->transform[lcname]),
+	return setColor(static_cast(pimpl_->LyXTransform[lcname]),
 			x11name);
 }
 
@@ -268,13 +271,25 @@ void LColor::addColor(LColor::color c, s
 LColor::color LColor::getFromLyXName(string const & lyxname) const
 {
 	string const lcname = ascii_lowercase(lyxname);
-	if (pimpl_->transform.find(lcname) == pimpl_->transform.end()) {
+	if (pimpl_->LyXTransform.find(lcname) == pimpl_->LyXTransform.end()) {
 		lyxerr << "LColor::getFromLyXName: Unknown color \""
 		   << lyxname << '"' << endl;
 		return none;
 	}
 
-	return static_cast(pimpl_->transform[lcname]);
+	return static_cast(pimpl_->LyXTransform[lcname]);
+}
+
+
+LColor::color LColor::getFromLaTeXName(string const & latexname) const
+{
+	if (pimpl_->LaTeXTransform.find(latexname) == pimpl_->LaTeXTransform.end()) {
+		lyxerr << "LColor::getFromLaTeXName: Unknown color \""
+		   << latexname << '"' << endl;
+		return none;
+	}
+
+	return static_cast(pimpl_->LaTeXTransform[latexname]);
 }
 
 
Index: src/LColor.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LColor.h,v
retrieving revision 1.44
diff -u -p -r1.44 LColor.h
--- src/LColor.h	19 Jan 2005 15:03:27 -	1.44
+++ src/LColor.h	14 Jun 2005 09:58:47 -
@@ -218,6 +218,8 @@ public:
 	LColor::color getFromGUIName(std::string const & guiname) const;
 	/// \returns the LColor::color associated with the LyX name.
 	LColor::color 

Re: Installing Windows fonts

2005-06-15 Thread Johann Kellerman
 
>  StrCpy $0
>"$MiKTeXPath$\r$\n$GhostscriptPath$\r$\n$ImageMagickPath$\r$\n$PythonPa
th$\r 
> $\n>$PerlPath"
>  ${StrNSISToIO} $0 $0

>Note that ${StrNSISToIO} is part of StrUtils.nsh...

>You don't want to manipulate (change) $GhostscriptPath et al, 
>because you're actually going to use them later...

It's a bit cleaner solution, was not sure how to escape the \r and \n to
avoid it begin escaped by the escaping StrNSISToIO function Or
something like that


Uwe, attached is the small test script to show page skipping by using 
  !define MUI_PAGE_CUSTOMFUNCTION_PRE ___
And another suggested solution for choosing the fonts by better usage of
the nsi sections & components.

Regards,
Johann


section_and_page_skip.nsi
Description: section_and_page_skip.nsi


Re: Screen resolution / dpi

2005-06-15 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes:

>> LyX 1.3.6 , therefore, won't use it. LyX 1.4 is in feature freeze,
>> so I guess that it won't use it either. Looks like you'll be having
>> considerable usage for a while yet.

Andre> Qt 4 is no go for LyX 1.4 as far as I am concerned...

We will probably have to tweak LyX 1.4 to work (in qt3 compatibility
mode) with it at some point.

JMarc


RE: [LyXWin Installer] small version updated again

2005-06-15 Thread Johann Kellerman

>- I need the registry path for Acroread. If anybody has installed it,
please send it to me.

I started working on this. My thoughts was to extract the pdf viewer
associated with pdf's on the windows machine.

With:

Function getFileAssociation
  Exch $R1
  Push $R0
  ReadRegStr $R0 HKCR "$R1" "" 
  ReadRegStr $R1 HKCR "$R0\shell\open\command" "" 
  Pop $R0
  Exch $R1
FunctionEnd

And then using:
  Push ".pdf"
  Call getFileAssociation 
  pop $acrobat_path
--
The result is:
"C:\Program Files\acrobat\acrord32.exe" "%1"

So you'll still need to do some parsing, but this will cater for acrobat
and other pdf viewers. So maybe in lyxrc.defaults add the line
\viewer pdf "acrord32"   ??

Regards, 
Johann




Re: [LyXWin Installer] small version updated again

2005-06-15 Thread Jean-Marc Lasgouttes
> "Uwe" == Uwe Stöhr <[EMAIL PROTECTED]> writes:

Uwe> - If Acrobat/Acrored if found by LyX's configure script the
Uwe> following entry is made to lyxrc.defaults:

Uwe> \viewer pdf "acrobat"

Isn't there a way in NSIS to check whether the pdf extension is
registered? There is no reason to force the user to use acrobat if he
prefers gsview or whatever. 

So what would be nice for all viewers is to check whether the
extension is registered and in this case to use "start" with proper
options as a viewers. Actually, we should add code in LyX itself to
use the built-in viewers if they exist. I am not sure it would be so
difficult to do. 

JMarc


Re: [patch] math_colorinset fix

2005-06-15 Thread Lars Gullik Bjønnes
Georg Baum <[EMAIL PROTECTED]> writes:

| Then I am going to commit the attached patch provided that Jürgens testing
| does not show problems.

change hte names first

|   
>> The MathHullInset some how should change the 'inherited base color'.
>> Don't ask me how this could be achieved exactly.
>
| I hoped you knew that!
>
>
| Georg
>
| Index: src/ChangeLog
| ===
| RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
| retrieving revision 1.2199
| diff -u -p -r1.2199 ChangeLog
| --- src/ChangeLog 9 Jun 2005 15:19:06 -   1.2199
| +++ src/ChangeLog 14 Jun 2005 09:58:47 -
| @@ -1,3 +1,7 @@
| +2005-06-14  Georg Baum  <[EMAIL PROTECTED]>
| +
| + * LColor.[Ch] (getFromLaTeXName): new
| +
|  2005-06-11  Georg Baum  <[EMAIL PROTECTED]>
|  
|   * LaTeXFeatures.C (getPackages): solve amsmath-wasysym conflict
| Index: src/LColor.C
| ===
| RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LColor.C,v
| retrieving revision 1.55
| diff -u -p -r1.55 LColor.C
| --- src/LColor.C  19 Jan 2005 15:03:27 -  1.55
| +++ src/LColor.C  14 Jun 2005 09:58:47 -
| @@ -66,7 +66,8 @@ public:
|   in.x11name   = string(entry.x11name);
|   in.guiname   = string(entry.guiname);
|   infotab[entry.lcolor] = in;
| - transform[string(entry.lyxname)] = int(entry.lcolor);
| + LyXTransform[string(entry.lyxname)] = int(entry.lcolor);
| + LaTeXTransform[string(entry.latexname)] = int(entry.lcolor);

Can you please change the names of these variables.

is the "string()" cast really needed?

-- 
Lgb



Re: More about LyX meeting

2005-06-15 Thread Stephan Witt

Jean-Marc Lasgouttes wrote:

"Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:




Dear Jean-Marc,

I spent some time outside of my office, so I couldn't respond...


Jean-Marc> So, I know have the following table for our next meeting:

Update:

13  14  15  16  17  18  19Laptop
JMarcX   X   X   X   X   X   X   X (and a PC and more if needed)
Lars X   X   X   X   X   X   X   X
AndréX   X   X   X   X   X (possibility of a second one)
Michael  X   X
Juergen  X   X   X   X   X
José X   X   X   X   X   X   X
Martin
Andreas
Angus


  Stephan  x   x   x   x (one or two of these days)



Won't come after all: Asger.

As you can see, I am still waiting for confirmation from Martin,
Andreas, Angus and Stefan. Stefan, I remember you plan to come just
for a day, but I do not remember which one :)


I stay from the 8th of July til 20th of July in Paris together with
my wife and my children (2) and we'll be guests of our friends.
So there is no need to care for us. But I have to see what our
plans are. Currently there is a meeting at the 14th planned already.

I propose to talk about the details in July.

Regards,

Stephan

--



Re: The LANG environment variable...

2005-06-15 Thread Uwe Stöhr

Angus Leeming wrote:


Putting the two dataabses together:



nn_NO Nynorsk


It is no_NY.

I put some code tables on

http://fkurth.de/uwest/LyX/Installer/LangCodes/

regards Uwe


Re: The LANG environment variable...

2005-06-15 Thread Angus Leeming

Uwe Stöhr wrote:

nn_NO Nynorsk

It is no_NY.


Both appear to be quite common. google on "nn_NO" and on "no_NY". Note that 
the po file is nn.po...


Angus



Re: The LANG environment variable...

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

| Uwe Stöhr wrote:
>>> nn_NO Nynorsk
>> It is no_NY.
>
| Both appear to be quite common. google on "nn_NO" and on "no_NY". Note
| that the po file is nn.po...

I think it really should be "nn". nn is the language XX is the
country.

en_EN is english in england
en_US is english in the us
nn_NO "nynorsk" in norway
no_NO "norsk" aka bokmål in norway.

no_NY just seems wrong.

-- 
Lgb



Re: The LANG environment variable...

2005-06-15 Thread Enrico Forestieri
Helge Hafting <[EMAIL PROTECTED]> writes:
> 
> Angus Leeming wrote:
> 

[snip]
 
> >In that case, shouldn't it be
> >
> >lyx.exe "%1" "%2" "%3" "%4" "%5" "%6" "%7" "%8" "%9"
> >
> >  
> >
> No, that will turn
> lyx.bat "file with spaces.lyx"
> into
> lyx.exe ""file with spaces.lyx"" and that won't work too well.
> 

To avoid double quoting the ~ character should be used. So:

lyx.exe "%~1" "%~2" "%~3" "%~4" "%~5" "%~6" "%~7" "%~8" "%~9"

works as expected.

Enrico




Re: The LANG environment variable...

2005-06-15 Thread Enrico Forestieri
Angus Leeming <[EMAIL PROTECTED]> writes:

> > 2 Launching LyX at the end of the installer as
> >!define PRODUCT_BAT "$INSTDIR\bin\lyx.bat"
> >!define MUI_FINISHPAGE_RUN "${PRODUCT_BAT}"
> > works perfectly well, but I get a bloody great cmd window in the 
> > background. How do I make it go away? 
> 
> Still to resolve.
> Angus

Launching the last command in the bat file with "start" should do the trick.

$ cat lyx.bat
@echo off
rem
rem some stuff here
rem
start lyx.exe 

Enrico






Re: [PATCH 13x, 14x] the PATH env var

2005-06-15 Thread Enrico Forestieri
Angus Leeming <[EMAIL PROTECTED]> writes:
> Jean-Marc Lasgouttes wrote:
> > Angus> The attached patch ensures that the LyX binary dir is the first
> > Angus> element in the PATH on non-POSIX builds. The change will mean
> > Angus> that fixes like Enrico Forestieri's, described here:
> > Angus> http://marc.theaimsgroup.com/?l=lyx-devel=111851430815315=2
> > Angus> are much easier to apply. (His python.bat stuff.)
> > 
> > The patches are OK in general, but I am not sure how it helps Enrico.
> > 
> > JMarc
> 
> He can create his python.bat in the LyX/bin dir and it will be found before 
> his broken python.exe symlink. At the moment I suspect that he has to add 
> this directory to the front of the path_prefix string.
> 
> Angus

Actually, I am playing tricks with the installer ;-)
As I already have in the path everything lyx needs, I created a C:\lyxbats
directory where I put batch files. Before launching the installer, from a
command line I do "touch sh.exe python.exe perl.exe ..." in that directory
and point at it the installer for everything. Then, before continuing with
the installation I "rm *.exe" the faked executables.

I investigated the symlink thing and it turns out that Windows doesn't really
supports symlinks. It has shortcuts (.lnk files) which do their job only
using explorer windows but are inaccessible through cmd.exe. MinSys ln.exe
works because it really does a copy of the file, whereas the cygwin ln.exe
creates a shortcut (.lnk file).

Enrico








Re: The LANG environment variable...

2005-06-15 Thread Angus Leeming

Enrico Forestieri wrote:

Angus Leeming <[EMAIL PROTECTED]> writes:



2 Launching LyX at the end of the installer as
  !define PRODUCT_BAT "$INSTDIR\bin\lyx.bat"
  !define MUI_FINISHPAGE_RUN "${PRODUCT_BAT}"
works perfectly well, but I get a bloody great cmd window in the 
background. How do I make it go away? 


Still to resolve.
Angus



Launching the last command in the bat file with "start" should do the trick.

$ cat lyx.bat
@echo off
rem
rem some stuff here
rem
start lyx.exe 

Enrico


I'm afraid that doesn't work. But anyway, I went a different route:

!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_TEXT "$(FinishPageMessage)"
!define MUI_FINISHPAGE_RUN_TEXT "$(FinishPageRun)"
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchProduct"
!insertmacro MUI_PAGE_FINISH

Function LaunchProduct
  lyx_configure::set_env LANG $LangCode
  Exec ${PRODUCT_EXE}
FunctionEnd

where lyx_configure is a .dll containing (among other things):

// Set an environment variable
extern "C"
void __declspec(dllexport) set_env(HWND hwndParent, int string_size,
   char *variables, stack_t **stacktop)
{
EXDLL_INIT();

std::string const var_name = pop_from_stack();
std::string const var_value = pop_from_stack();

SetEnvironmentVariableA(var_name.c_str(), var_value.c_str());

pushstring("0");
}

Angus





Re: The LANG environment variable...

2005-06-15 Thread Angus Leeming

Enrico Forestieri wrote:

Helge Hafting <[EMAIL PROTECTED]> writes:
To avoid double quoting the ~ character should be used. So:
lyx.exe "%~1" "%~2" "%~3" "%~4" "%~5" "%~6" "%~7" "%~8" "%~9"
works as expected.


Excellent! Done.

I'll upload Version 15 ASAP. It has this lyx.bat and a reLyX.bat for you ;-)

Angus



Windows installer version 15

2005-06-15 Thread Angus Leeming
Now uploaded to the wiki. It merges Uwe's and Helge's code and enables the 
user to specify the language of the UI by creating and running a lyx.bat file:


@echo off
if "%LANG%"=="" SET LANG=fr_FR
"C:\Program Files\LyX\bin\lyx.exe" %~1 %~2 %~3 %~4 %~5 %~6 %~7 %~8 %~9

Similarly, we now have a reLyX.bat file:

@echo off
perl.exe "C:\Program Files\LyX\bin\reLyX" %~1 %~2 %~3 %~4 %~5 %~6 %~7 %~8 %~9

Uwe, I didn't do anythiing with your fonts stuff because I don't think it 
should go on the same page as the UI language stuff and, more importantly, 
becase I was unsure whether it was finished. Why don't you start making 
patches against the stuff in CVS (BRANCH_1_3_X ;-)) and I'll start shoving 
it in.


I've just got rid of all CamelCase file names. Let's stick with lower_case 
ones.


Angus



Re: More about LyX meeting

2005-06-15 Thread Jean-Marc Lasgouttes
> "Stephan" == Stephan Witt <[EMAIL PROTECTED]> writes:

Stephan> I stay from the 8th of July til 20th of July in Paris
Stephan> together with my wife and my children (2) and we'll be guests
Stephan> of our friends. So there is no need to care for us. But I
Stephan> have to see what our plans are. Currently there is a meeting
Stephan> at the 14th planned already.

Stephan> I propose to talk about the details in July.

Thanks for the details. There is indeed no need to make things precise
now.

JMarc


Re: The LANG environment variable...

2005-06-15 Thread Jean-Marc Lasgouttes
> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
>>> You didn't look in the right place, obviously. google for "gettext
>>> windows":
>>> 
>>> http://gnuwin32.sourceforge.net/install.html#Native-language_support_

Angus> However, see also the message I've just posted to the MinSYS
Angus> list: http://article.gmane.org/gmane.comp.gnu.mingw.msys/2611

Jean-Marc> Actually the right place is intl/localename.c in 1.4.0cvs
Jean-Marc> :) There is native support for windows in gettext > 0.13.

Jean-Marc> This probably means that if you manage to link against the
Jean-Marc> gettext provided with mingw tools, it should just work.

Hello? Angus? Do you think it is possible to build LyX against the
gettext provided with mingw? This would probably fix a lot of the
language nastiness, and avoid setting of environment variables.

JMarc



Re: The LANG environment variable...

2005-06-15 Thread Angus Leeming

Jean-Marc Lasgouttes wrote:

Jean-Marc> This probably means that if you manage to link against the
Jean-Marc> gettext provided with mingw tools, it should just work.

Hello? Angus? Do you think it is possible to build LyX against the
gettext provided with mingw? This would probably fix a lot of the
language nastiness, and avoid setting of environment variables.


Sorry, I guess that I missed this bit of your mail.

I could certainly try, but I don't see what it gains us. There's about 20 
lines in the installer to set the language of the UI. Moreover, because it 
is encapsulated in a lyx.bat file, it's trivially easy for people to change.


I see on http://www.mingw.org/download.shtml that I would be grabbing
  gettext-0.11.5-2003.02.01-1-src.tar.bz2
  libiconv-1.8-2003.02.01-1-src.tar.bz2
Do you want me to try this anyway?

Angus (currently running lyx in french on an otherwise entirely english box)



Re: The LANG environment variable...

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

Angus> Sorry, I guess that I missed this bit of your mail.

Angus> I could certainly try, but I don't see what it gains us.
Angus> There's about 20 lines in the installer to set the language of
Angus> the UI. Moreover, because it is encapsulated in a lyx.bat file,
Angus> it's trivially easy for people to change.

OK, if you are satisfied about how things work now, I guess it is not
worth trying it after all. I agree that the .bat file solution is
simple enough. 

Angus> I see on http://www.mingw.org/download.shtml that I would be
Angus> grabbing gettext-0.11.5-2003.02.01-1-src.tar.bz2
Angus> libiconv-1.8-2003.02.01-1-src.tar.bz2 Do you want me to try
Angus> this anyway?

I thought it would be present by default in the build tools.

Angus> Angus (currently running lyx in french on an otherwise entirely
Angus> english box)

Lucky guy!

JMarc


Re: [LyXWin Installer] small version updated again

2005-06-15 Thread Uwe Stöhr

Jean-Marc Lasgouttes a écrit:


Isn't there a way in NSIS to check whether the pdf extension is
registered? There is no reason to force the user to use acrobat if he
prefers gsview or whatever.


Good idea. The actual version:

http://fkurth.de/uwest/LyX/Installer/lyx_setup_136proposal-v15.exe

checks now for the program associated with the file extension ".pdf". So 
it should work for all pdf viewers.


Angus, could you please test if Acroread is recognized? Thanks.

Johann Kellerman wrote:

> I started working on this. My thoughts was to extract the pdf viewer
> associated with pdf's on the windows machine.
>
> With:
> 
> Function getFileAssociation
>   Exch $R1
>   Push $R0
>   ReadRegStr $R0 HKCR "$R1" ""
>   ReadRegStr $R1 HKCR "$R0\shell\open\command" ""
>   Pop $R0
>   Exch $R1
> FunctionEnd
>
> And then using:
>   Push ".pdf"
>   Call getFileAssociation
>   pop $acrobat_path
> --

Thanks Johann, based on your idea I implemented it now as

---
!macro GetFileExtProg ProgPath AppExe Extension

 ReadRegStr ${AppExe} HKCU \
"Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\${Extension}\OpenWithList" 
 "a"

 ${if} ${AppExe} != ""
  ReadRegStr ${ProgPath} HKLM \
 "Software\Microsoft\Windows\CurrentVersion\App Paths\${AppExe}" "Path"
  ;remove the "\" at the end
  StrCpy ${ProgPath} ${ProgPath} -1
 ${endif}

!macroend
-

This macro is in

http://fkurth.de/uwest/LyX/Installer/Scripts/LyXUtils.nsh

The call is:

!insertmacro GetFileExtProg $PDFVPath $PDFProg ".pdf"

regards Uwe


Re: Installing Windows fonts

2005-06-15 Thread Uwe Stöhr

Angus Leeming wrote:


Or, perhaps more simply:

  StrCpy $0
"$MiKTeXPath$\r$\n$GhostscriptPath$\r$\n$ImageMagickPath$\r$\n$PythonPath$\r$\n$PerlPath"
  ${StrNSISToIO} $0 $0


Thanks Angus. I implemented it in the actual version:

(http://fkurth.de/uwest/LyX/Installer/lyx_setup_136proposal-v15.exe)

http://fkurth.de/uwest/LyX/Installer/Scripts/


Note that ${StrNSISToIO} is part of StrUtils.nsh...


BTW. It is in StrFunc.nsh

regards Uwe


Re: Installing Windows fonts

2005-06-15 Thread Uwe Stöhr

Johann Kellerman wrote:


I know there are only a couple of translated languages. What I propose is create
the other languages as nullsoft languages. For now the installer strings can be
in english until a concerned user post the correct translations. The only string
we can translate for now is the lang environment variable.


I don't know how this can be done but I mean this is confusing as the 
language popup window at the install start asks for the "Installer 
Language". And it wuld also be a bit confusing if it asks for the 
program language and then displays the installer in english.


regards Uwe


Re: The LANG environment variable...

2005-06-15 Thread Uwe Stöhr

Lars Gullik Bjønnes wrote:


| Both appear to be quite common. google on "nn_NO" and on "no_NY". Note
| that the po file is nn.po...


I'll apply this.

thanks and regards Uwe


Re: [patch] bug 1837

2005-06-15 Thread Jean-Marc Lasgouttes
> "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes:

Juergen> Also, inserting of several other insets is already disabled
Juergen> over multiple selected cells (because LyX crashed). I think
Juergen> it is consistent to disable tabular too.

This is what I wanted to know, thanks. 

JMarc


Re: Insert->File crashes

2005-06-15 Thread Jean-Marc Lasgouttes
> "Kayvan" == Kayvan A Sylvan <[EMAIL PROTECTED]> writes:

Kayvan> This is under Cygwin, using xforms frontend: Using CVS lyx,
Kayvan> upon Insert->File->Plain Text As Paragraphs

Kayvan> Lyx crashes with the following messages (Plain Text As Lines
Kayvan> works, though):

I cannot reproduce that. Does it depend on the file?

JMarc



  1   2   >