FiLeNamE CaSe problems windows

2006-08-01 Thread Johann Kellerman
Hi everyone,

Lyx 1.4.2 works like a charm on windows, even got bibunits 
working from within Lyx now! The new install is brilliant, 
I got Lyx installed in my application profile directory (a 
lot of spaces!) on a machine where you have literally no 
privilages. Lyx is completely self contained (without image
support and tex compilation though), but at least I can 
finish my thesis in my spare time at work :)

One serious problem though. Lyx can open fILe.lyx and 
file.lyx at the same time. 
The one saved last will be, quite literally, the final
one. I found this out the hard way...

Cheers,
Johann





FiLeNamE CaSe problems windows

2006-08-01 Thread Johann Kellerman
Hi everyone,

Lyx 1.4.2 works like a charm on windows, even got bibunits 
working from within Lyx now! The new install is brilliant, 
I got Lyx installed in my application profile directory (a 
lot of spaces!) on a machine where you have literally no 
privilages. Lyx is completely self contained (without image
support and tex compilation though), but at least I can 
finish my thesis in my spare time at work :)

One serious problem though. Lyx can open "fILe.lyx" and 
"file.lyx" at the same time. 
The one saved last will be, quite literally, the final
one. I found this out the hard way...

Cheers,
Johann





Re: Why Bibtex name mangling is bad....

2006-03-07 Thread Johann Kellerman
Am Montag, 6. März 2006 21:35 schrieb Georg Baum:
 
 This solution is wrong for two reasons:
 1. All file names in the temp dir must be mangled in order to avoid name 
 clashes
 
The extension .bib should be fairly unique, only a problem if you have refs.bib 
for subdocument 1 in one folder and refs.bib for subdocument 2 in another 
folder. Which would be pointless, since the point of bibtex is to have a 
library like '.bib' file.
 
 2. This solution would not work if you only used bibunits bibliography, or 
 a different file for the bibunits bibliography than for the main 
 bibliography.
 
This point is valid, since Lyx wont even try to do anything with it. But in my 
case it would be more than perfect.
 
I redefine \bibliography to do the nasty stuff. This way Lyx thinks its happily 
using normal bibtex and after all it's using a sectioned approach. That's why 
my first problem with the mangled name passing to the bibtex inset was 
important.
 
This works with bibtopic

ERT  \begin{btUnit} after each chapter / section etc.
And then a normal lyx bibtex inset with the following in the preamble.
 \usepackage[dot]{bibtopic}   % multiple bibliographies
 \renewcommand{\bibliography}[1]{
   \section{References}
   \begin{btSect}[IEEEtr]{##1} 
   \btPrintCited
   \end{btSect}
   \end{btUnit}
}
 
I'm trying to get this to work with bibunit (no luck yet)
---
ERT  \begin{bibunit} after each chapter / section etc.
And then a normal lyx bibtex inset with the following in the preamble.
\usepackage{bibunits}   % multiple bibliographies
[EMAIL PROTECTED]@bibunitauxcnt}
\renewcommand{\bibliography}[1]{
   \section{References}
   \putbib[##1] 
   \end{bibunit}
}
 
 
 
 A solution that would work in all cases is to set the BIBUNITS variable 
 from within LyX.
 export BIBINPUTS=.:${HOME}
 
 
This solution will also fail if you have bibtex files with the same name as my 
example above. (point 1)
At least it will still work for your point 2.
 
This seems like the best solution. And is already being done for another path 
type variable since tex can find the preamble \include{xx.tex} files (which is 
not copied to temp)
As long as the ${home} is the home of the document and not global home!
 
 Do you file this in bugzilla?

Should I file request to export BIBINPUTS?

 

Regards,

Johann



Re: Why Bibtex name mangling is bad....

2006-03-07 Thread Johann Kellerman
Am Montag, 6. März 2006 21:35 schrieb Georg Baum:
 
> This solution is wrong for two reasons:
> 1. All file names in the temp dir must be mangled in order to avoid name 
> clashes
 
The extension .bib should be fairly unique, only a problem if you have refs.bib 
for subdocument 1 in one folder and refs.bib for subdocument 2 in another 
folder. Which would be pointless, since the point of bibtex is to have a 
library like '.bib' file.
 
> 2. This solution would not work if you only used bibunits bibliography, or 
> a different file for the bibunits bibliography than for the main 
> bibliography.
 
This point is valid, since Lyx wont even try to do anything with it. But in my 
case it would be more than perfect.
 
I redefine \bibliography to do the nasty stuff. This way Lyx thinks its happily 
using normal bibtex and after all it's using a sectioned approach. That's why 
my first problem with the mangled name passing to the bibtex inset was 
important.
 
This works with bibtopic

ERT  "\begin{btUnit}" after each chapter / section etc.
And then a normal lyx bibtex inset with the following in the preamble.
 \usepackage[dot]{bibtopic}   % multiple bibliographies
 \renewcommand{\bibliography}[1]{
   \section{References}
   \begin{btSect}[IEEEtr]{##1} 
   \btPrintCited
   \end{btSect}
   \end{btUnit}
}
 
I'm trying to get this to work with bibunit (no luck yet)
---
ERT  "\begin{bibunit}" after each chapter / section etc.
And then a normal lyx bibtex inset with the following in the preamble.
\usepackage{bibunits}   % multiple bibliographies
[EMAIL PROTECTED]@bibunitauxcnt}
\renewcommand{\bibliography}[1]{
   \section{References}
   \putbib[##1] 
   \end{bibunit}
}
 
 
> 
> A solution that would work in all cases is to set the BIBUNITS variable 
> from within LyX.
> export BIBINPUTS=.:${HOME}
> 
 
This solution will also fail if you have bibtex files with the same name as my 
example above. (point 1)
At least it will still work for your point 2.
 
This seems like the best solution. And is already being done for another path 
type variable since tex can find the preamble \include{xx.tex} files (which is 
not copied to temp)
As long as the ${home} is the home of the document and not global home!
 
> Do you file this in bugzilla?

Should I file request to export BIBINPUTS?

 

Regards,

Johann



Why Bibtex name mangling is bad....

2006-03-06 Thread Johann Kellerman
Hi,

 

I've had a couple of problems about bibtex support for lyx and last time
Georg helped me fix one of my problems. I now have a problem with the
whole idea of name mangling (although I see its necessity)
 
I decided I need to use the bibunits package. I was using bibtopic but
its got a fundamental drawback (no unsorted lists). Use the example on
http://wiki.lyx.org/Examples/Bibunits to see why name mangling breaks
support for the bibunits package.
 
Why?
 
Bibunits creates name.xxx.aux files, which lyx 1.37 should have no
problem with, but since the aux was not created by lyx, the original
name instead of the mangled name is in the file.
 
Possible solution?
 
Copy the file (non mangled) to the temp dir. You may still mangle it for
the rest of lyx, but please supply a copy of the original. That should
restore bibunits support at least and normally bib files are very small
(compared to the rest of the temp files at least)
 
One other question, why does sub documents get their own temp sub
directories? The mangled names is always unique (because of $(ID)
prefix)
 
Regards,
Johann
 


Why Bibtex name mangling is bad....

2006-03-06 Thread Johann Kellerman
Hi,

 

I've had a couple of problems about bibtex support for lyx and last time
Georg helped me fix one of my problems. I now have a problem with the
whole idea of name mangling (although I see its necessity)
 
I decided I need to use the bibunits package. I was using bibtopic but
its got a fundamental drawback (no unsorted lists). Use the example on
http://wiki.lyx.org/Examples/Bibunits to see why name mangling breaks
support for the bibunits package.
 
Why?
 
Bibunits creates name.xxx.aux files, which lyx 1.37 should have no
problem with, but since the aux was not created by lyx, the original
name instead of the mangled name is in the file.
 
Possible solution?
 
Copy the file (non mangled) to the temp dir. You may still mangle it for
the rest of lyx, but please supply a copy of the original. That should
restore bibunits support at least and normally bib files are very small
(compared to the rest of the temp files at least)
 
One other question, why does sub documents get their own temp sub
directories? The mangled names is always unique (because of $(ID)
prefix)
 
Regards,
Johann
 


Bug in subdocument bibtex support 1.3.6, 1.3.7-pre2 [proposed fix]

2005-11-17 Thread Johann Kellerman
Hi,

Please refer to my previous message for the problem. Bug in subdocument
bibtex support 1.3.6, 1.3.7-pre2

What I could see from looking at the code is the following.

The copy problem is around line 244 in insetbib.C

database = mangled_filename(database);
string const out_file = MakeAbsPath(database +
.bib,

buffer-tmppath);  

I assume buffer-tmppath is set to the sub documents temp path. (same as
for the images)
Maybe the buffer-tmppath should be the path to where the temp documents
.tex file is output to. (thus the main documents temp path)
 
I have no knowledge of the main document / sub document mechanisms. So
another solution might be constructing a relative path. The temp dir
contains no spaces, so this should be safe. And even if there is no main
document, stepping one path back and into the correct one again will
pose no problem. Maybe just add some checking to see if there is no
absolute path already.

Inserting something like this where the actual tex is output might work.
(about line 277, see the -- below)

// Chomp off everything in the temp path except the last
directory.
  String last_path_bit = buffer-tmppath;
  while (int tmp_int=AnisPos(\, last_path_bit)0) {
last_path_bit=AnsiDelete(last_path_bit, 1, tmp_int);
}
  // add the relative path.
--  os  \\bibliography{  dbs_str  }\n;
++  os  \\bibliography{../  last_path_bit  /  dbs_str 
}\n;


This is from the lyx 1.3.7cvs downloaded from ftp.sylvan.com. Please
excuse the use of AnisString / AnsiPos. I've only written one C++
program in Borland C Builder in windows and have no other knowledge of
function / libraries. This is done from a more dominant windows/Delphi
and avr-gcc c viewpoint.

Hope it helps locating the problem.

Regards,
Johann


Bug in subdocument bibtex support 1.3.6, 1.3.7-pre2 [proposed fix]

2005-11-17 Thread Johann Kellerman
Hi,

Please refer to my previous message for the problem. "Bug in subdocument
bibtex support 1.3.6, 1.3.7-pre2"

What I could see from looking at the code is the following.

The copy problem is around line 244 in insetbib.C

database = mangled_filename(database);
string const out_file = MakeAbsPath(database +
".bib",

buffer->tmppath);  

I assume buffer->tmppath is set to the sub documents temp path. (same as
for the images)
Maybe the buffer->tmppath should be the path to where the temp documents
.tex file is output to. (thus the main documents temp path)
 
I have no knowledge of the main document / sub document mechanisms. So
another solution might be constructing a relative path. The temp dir
contains no spaces, so this should be safe. And even if there is no main
document, stepping one path back and into the correct one again will
pose no problem. Maybe just add some checking to see if there is no
absolute path already.

Inserting something like this where the actual tex is output might work.
(about line 277, see the -- below)

// Chomp off everything in the temp path except the last
directory.
  String last_path_bit = buffer->tmppath;
  while (int tmp_int=AnisPos("\", last_path_bit)>0) {
last_path_bit=AnsiDelete(last_path_bit, 1, tmp_int);
}
  // add the relative path.
--  os << "\\bibliography{" << dbs_str << "}\n";
++  os << "\\bibliography{../" << last_path_bit << "/" << dbs_str <<
"}\n";


This is from the lyx 1.3.7cvs downloaded from ftp.sylvan.com. Please
excuse the use of AnisString / AnsiPos. I've only written one C++
program in Borland C Builder in windows and have no other knowledge of
function / libraries. This is done from a more dominant windows/Delphi
and avr-gcc c viewpoint.

Hope it helps locating the problem.

Regards,
Johann


Re: Path to bibtex file?

2005-10-27 Thread Johann Kellerman

 BibTeX *hates* paths with spaces. So we copy the BibTeX database to
 the temp directory and give it a nice, BibTeX-friendly mangled name.
 \bibliography should refer to this copied database in the same
 directory as the .tex file.

The bibtex file is NOT copied to the same directory as my tex file. I have the
followig situation:

One master document that inputs a bunch of lyx documents (chapters). I need
references at the end of each chapter and i need to be able to compile these
chapters seperate.

I use \usepackage[dot]{bibtopic}

then I add a \begin{btUnit} after each chapter heading and I redefine the
\bibliography

\renewcommand{\bibliography}[1]{
\section{References}
\bibliographystyle{\kstyle}
\begin{btSect}{\kpath\kname}
\btPrintCited
\end{btSect}
\end{btUnit}
}

Instead of using \kpath\kname I would like to use #1, but the file is in some
unknown temp directory?!

My temp dir looks something like this

lyxtmpdir124312412
   ./lyx_tmpbuf0
 master_file.tex
 chap1.tex
 chap2.tex
   ./lyx_tmpbuf1
 3d_bibtex_file.bib
 4d_image.eps
 5d_image.eps
   ./lyx_tmpbuf2
 6d_bibtex_file.bib
 7d_image_file.eps

inside of chap1.tex and chap2.tex that refer to the FULL path of the eps files,
but the bibtext files is without path - resulting in a failed latex 
compilation.

Any suggestions?

Thanks,
Johann





Re: http://wiki.lyx.org/Windows/LyX137pre

2005-10-27 Thread Johann Kellerman
Paul A. Rubin [EMAIL PROTECTED] writes:


 I also did the reverse of Johann's experiment:  I reinstalled LyX 1.3.6 
 (in a separate directory -- installation went fine) and copied the 
 qt-mt3.dll file from that version into the 1.3.7 bin directory.  That 
 cured the font problems in 1.3.7.
 
 Paul
 
 
 

My Lyx used exactly the same font! A simple solution is to delete the Algerian
font from your windows\fonts directory.  The next best is Arial, which looks
decent. Algerian is an ugly font anyway...

Johann



Re: Path to bibtex file?

2005-10-27 Thread Johann Kellerman

> BibTeX *hates* "paths with spaces". So we copy the BibTeX database to
> the temp directory and give it a nice, BibTeX-friendly mangled name.
> \bibliography should refer to this copied database in the same
> directory as the .tex file.

The bibtex file is NOT copied to the same directory as my tex file. I have the
followig situation:

One master document that inputs a bunch of lyx documents (chapters). I need
references at the end of each chapter and i need to be able to compile these
chapters seperate.

I use \usepackage[dot]{bibtopic}

then I add a \begin{btUnit} after each chapter heading and I redefine the
\bibliography

\renewcommand{\bibliography}[1]{
\section{References}
\bibliographystyle{\kstyle}
\begin{btSect}{\kpath\kname}
\btPrintCited
\end{btSect}
\end{btUnit}
}

Instead of using \kpath\kname I would like to use #1, but the file is in some
unknown temp directory?!

My temp dir looks something like this

lyxtmpdir124312412
   ./lyx_tmpbuf0
 master_file.tex
 chap1.tex
 chap2.tex
   ./lyx_tmpbuf1
 3d_bibtex_file.bib
 4d_image.eps
 5d_image.eps
   ./lyx_tmpbuf2
 6d_bibtex_file.bib
 7d_image_file.eps

inside of chap1.tex and chap2.tex that refer to the FULL path of the eps files,
but the bibtext files is without path -> resulting in a failed latex 
compilation.

Any suggestions?

Thanks,
Johann





Re: http://wiki.lyx.org/Windows/LyX137pre

2005-10-27 Thread Johann Kellerman
Paul A. Rubin <[EMAIL PROTECTED]> writes:


> I also did the reverse of Johann's experiment:  I reinstalled LyX 1.3.6 
> (in a separate directory -- installation went fine) and copied the 
> qt-mt3.dll file from that version into the 1.3.7 bin directory.  That 
> cured the font problems in 1.3.7.
> 
> Paul
> 
> 
> 

My Lyx used exactly the same font! A simple solution is to delete the Algerian
font from your windows\fonts directory.  The next best is Arial, which looks
decent. Algerian is an ugly font anyway...

Johann



Re: http://wiki.lyx.org/Windows/LyX137pre

2005-10-26 Thread Johann Kellerman
A couple of problems.

When installing it over the previous 1.3.6 the configure step during setup fails
and lyx has to be closed and opended again to configure. Doing it this way gives
completely unreadable fonts in all the dialogs - looks likes 'Algerian' font.
The fonts on the menu bars is also a very bold font.

Removing the old lyx dir and installing fresh: Once again configure failed. and
Lyx wouldn't even start this time - textclass.lst not found.

Going back to 1.3.6...

Copied the new qt-mt3.dll to lyx 1.3.6 and got the same font issues. At least
reconfigure seems to work.

Regards,
Johann




Re: http://wiki.lyx.org/Windows/LyX137pre

2005-10-26 Thread Johann Kellerman

 Anyway, clearly more work needed :(
 

Keep up the good work! Lyx 1.3.6 is very impressive already, got 3 windows
people LyXing with it.

The font issue is with the actual text in the dialogs. All the controls/widgets
except the buttons use the strange font. The fonts in the Lyx editor window (the
ones you can set) is fine.

Johann



Path to bibtex file?

2005-10-26 Thread Johann Kellerman
One question about the paths. Why does the temporary tex file not contain the
full path to the bibtex file? It contains full path to all the included
graphics, but for the bibtex inset, only the filename. 

I've rewritten the \bibliography comand to enable btunits to add chapter
bibliography and i have to manually add the path tho the \bibliography entry.
How can \bibliography do a search in the paths, say: ../lyx_tmpbuf4/ ?

Thanks,
Johann



Re: http://wiki.lyx.org/Windows/LyX137pre

2005-10-26 Thread Johann Kellerman
A couple of problems.

When installing it over the previous 1.3.6 the configure step during setup fails
and lyx has to be closed and opended again to configure. Doing it this way gives
completely unreadable fonts in all the dialogs - looks likes 'Algerian' font.
The fonts on the menu bars is also a very bold font.

Removing the old lyx dir and installing fresh: Once again configure failed. and
Lyx wouldn't even start this time - textclass.lst not found.

Going back to 1.3.6...

Copied the new qt-mt3.dll to lyx 1.3.6 and got the same font issues. At least
reconfigure seems to work.

Regards,
Johann




Re: http://wiki.lyx.org/Windows/LyX137pre

2005-10-26 Thread Johann Kellerman

> Anyway, clearly more work needed :(
> 

Keep up the good work! Lyx 1.3.6 is very impressive already, got 3 windows
people LyXing with it.

The font issue is with the actual text in the dialogs. All the controls/widgets
except the buttons use the strange font. The fonts in the Lyx editor window (the
ones you can set) is fine.

Johann



Path to bibtex file?

2005-10-26 Thread Johann Kellerman
One question about the paths. Why does the temporary tex file not contain the
full path to the bibtex file? It contains full path to all the included
graphics, but for the bibtex inset, only the filename. 

I've rewritten the \bibliography comand to enable btunits to add chapter
bibliography and i have to manually add the path tho the \bibliography entry.
How can \bibliography do a search in the paths, say: ../lyx_tmpbuf4/ ?

Thanks,
Johann



Input / include, Lyx error. 1.3.6-1 windows

2005-10-06 Thread Johann Kellerman

In lyx I get the latex error just after one of my INCLUDED chapters,
I have about 9 included chapters but just this specific one give the
problem. I use listings package alot in this chapter, but this is not 
the only chapter I use it in.


Extra \else.
 \include{apdx2-AutoLAB}

I'm ignoring this; it doesn't match any \if.


If I go the the command prompt, I can compile without any errors, using

latex m-ing
bibtex m-ing.1
bibtex m-ing.2  7
latex m-ing
latex m-ing

And I've got a perfetly working dvi! How does lyx compile a document? 

One way to get Lyx to behave is to change the INCLUDE to INPUT 
very strange.

Any suggestions would be appreciated. (It gave the same problem before
 bibtopic)

Regards,
Johann



Input / include, Lyx error. 1.3.6-1 windows

2005-10-06 Thread Johann Kellerman

In lyx I get the latex error just after one of my INCLUDED chapters,
I have about 9 included chapters but just this specific one give the
problem. I use listings package alot in this chapter, but this is not 
the only chapter I use it in.


Extra \else.
 \include{apdx2-AutoLAB}

I'm ignoring this; it doesn't match any \if.


If I go the the command prompt, I can compile without any errors, using

latex m-ing
bibtex m-ing.1
bibtex m-ing.2  7
latex m-ing
latex m-ing

And I've got a perfetly working dvi! How does lyx compile a document? 

One way to get Lyx to behave is to change the INCLUDE to INPUT 
very strange.

Any suggestions would be appreciated. (It gave the same problem before
 bibtopic)

Regards,
Johann



Re: Batch file help needed!

2005-06-30 Thread Johann Kellerman

 Then Ruurd's clever stuff to hide the console window in os_win32.C kicks in.

just add:
cmdow @ /HID

and include cmdow.exe from http://www.commandline.co.uk/cmdow/cmdow.zip. 

Very powerful window manager console program read more at
http://www.commandline.co.uk/cmdow/

Regards, 
Johann




Re: Batch file help needed!

2005-06-30 Thread Johann Kellerman

> Then Ruurd's clever stuff to hide the console window in os_win32.C kicks in.

just add:
cmdow @ /HID

and include cmdow.exe from http://www.commandline.co.uk/cmdow/cmdow.zip. 

Very powerful window manager console program read more at
http://www.commandline.co.uk/cmdow/

Regards, 
Johann




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: 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 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: [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: 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: 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 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: [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: Installing Windows fonts

2005-06-14 Thread Johann Kellerman
Hi Uwe,

Everything seems fine. The summary of the page is nice for novice users, but I
would prefer a advanced button with a more detailed explanation. It just seems
wrong if it says it found everything... the people that know what everything is
will want to know where it found it (msys/cygwin issues) and all that important
for the rest is if it found a harddisk to install to. 

Had a quick look at the instalation script, the fonts seems quite complex
(4+files) compared to the 30 line solution i had. I don't quite understand the
issue between xft and bakoma, but thats probably an issue for a whole other
thread. Xft works, doesn't look that bad and if instant preview is on (which now
works out of the box) do you really need the prettier font with lots of
licensing issues to confuse your average user? Why would you even want to turn
off instant preview?

For the languages I have the following suggestion. Include all the available
languages in Lyx as .nsh files in the installer. 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.

All that really needs to be done is to update to Angus's newer plugin (to stop
installation while running configure) 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. See Get the input in
http://nsis.sourceforge.net/Contrib/InstallOptions/Readme.html for a function to
do it.

Regards, 
Johann





Re: Installing Windows fonts

2005-06-14 Thread Johann Kellerman
Hi Uwe,

Everything seems fine. The summary of the page is nice for novice users, but I
would prefer a advanced button with a more detailed explanation. It just seems
wrong if it says it found everything... the people that know what everything is
will want to know where it found it (msys/cygwin issues) and all that important
for the rest is if it found a harddisk to install to. 

Had a quick look at the instalation script, the fonts seems quite complex
(4+files) compared to the 30 line solution i had. I don't quite understand the
issue between xft and bakoma, but thats probably an issue for a whole other
thread. Xft works, doesn't look that bad and if instant preview is on (which now
works out of the box) do you really need the prettier font with lots of
licensing issues to confuse your average user? Why would you even want to turn
off instant preview?

For the languages I have the following suggestion. Include all the available
languages in Lyx as .nsh files in the installer. 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.

All that really needs to be done is to update to Angus's newer plugin (to stop
installation while running configure) 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. See "Get the input" in
http://nsis.sourceforge.net/Contrib/InstallOptions/Readme.html for a function to
do it.

Regards, 
Johann





Re: [LyXWin1.3.6CVS] installer issue

2005-06-10 Thread Johann Kellerman
Hi Angus,

A small problem with version 10:

If you next, back from the MSYS page you get strange results. 
It keeps on appending \bin. After the second entry into the page
it can't find sh.exe any more.

Probable fix: (from version 9 nsi file)

in file lyx_installer.nsi line 336

  ${DownloadEnter} \
  $MinSYSPath $2 Inno Setup: App Path \
   \bin \

RemovefromPath is blank.
Addtopath is set to \bin.

Johann



Checking for additional software on windows

2005-06-10 Thread Johann Kellerman
Hi all,

I thought about including checking for acrobat, aspell and more.  As Angus
suggested having all these options before even installing lyx could be too much
for most users.

What about creating a secondary installer to check for required software? The
functionality would be a smaller subset of the current installer (first couple
of pages) plus pages for the additional software.

If a user needs to add more functionality to lyx he can just run the config or
features program from the start menu. Maybe later on it can be moved into
Edit-Reconfigure for windows platforms??

The operation would be similar to the installer, the only difference is it can
be run at any time and would include all support software. It will allow a
windows user to easily extend the functionality of lyx (by installing additional
supporting applications). So if a user installs a new version of acrobat or
decides he needs to be able to convert tex files to lyx he can just run the
config/features option from the start menu and be guided through a couple of
questions.

Any further ideas/comments would be appreciated.

Regards, 
Johann



Re: [LyXWin1.3.6CVS] installer issue

2005-06-10 Thread Johann Kellerman
Hi Angus,

A small problem with version 10:

If you next, back from the MSYS page you get strange results. 
It keeps on appending \bin. After the second entry into the page
it can't find sh.exe any more.

Probable fix: (from version 9 nsi file)

in file lyx_installer.nsi line 336

  ${DownloadEnter} \
  $MinSYSPath "$2" "Inno Setup: App Path" \
  "" "\bin" \

RemovefromPath is blank.
Addtopath is set to "\bin".

Johann



Checking for additional software on windows

2005-06-10 Thread Johann Kellerman
Hi all,

I thought about including checking for acrobat, aspell and more.  As Angus
suggested having all these options before even installing lyx could be too much
for most users.

What about creating a secondary installer to check for required software? The
functionality would be a smaller subset of the current installer (first couple
of pages) plus pages for the additional software.

If a user needs to add more functionality to lyx he can just run the "config" or
"features" program from the start menu. Maybe later on it can be moved into
Edit->Reconfigure for windows platforms??

The operation would be similar to the installer, the only difference is it can
be run at any time and would include all support software. It will allow a
windows user to easily extend the functionality of lyx (by installing additional
supporting applications). So if a user installs a new version of acrobat or
decides he needs to be able to convert tex files to lyx he can just run the
"config"/"features" option from the start menu and be guided through a couple of
questions.

Any further ideas/comments would be appreciated.

Regards, 
Johann



Cannot access cvs

2005-06-09 Thread Johann Kellerman
Hi,

I'm trying to get cvs up and running but when I try to checkout
lyx-devel I get the following:


D:\settings\desktop\installlyxset
CVSROOT=:pserver:[EMAIL PROTECTED]:/
cvs/lyx
D:\settings\desktop\installlyxcvs login
Logging in to :pserver:[EMAIL PROTECTED]:2401:/cvs/lyx
CVS password: ***
cvs [login aborted]: connect to anoncvs.us.lyx.org:2401 failed: An
existing conn
ection was forcibly closed by the remote host.
-

It probably means my university is blocking access to the cvs port 2401,
or did I get something else wrong?

Just want to check before I get into a fight with the network people...

Thanks, 
Johann


Re: Bug in Lyx 1.3.6 (Windows)

2005-06-09 Thread Johann Kellerman
Hi Nicols,

 C:   ools\msys1_0\bin;C:   ools\Python24;...
 
 That is, the :\t is missing! (But the result was however OK in 
 lyxrc.defaults file)

\t is a special tab character, thats why you get the big whitespace displayed.
The generated line in the file should be fine.

 Then, when I launched Lyx from the installer, I got this message:
 
 LyX wasn't able to find its layout despcriptions! Check that the 
 textclass.lst is installed correctly. Has to exit
 
 However, the textclass.lst was correct and running lyx.exe by myself 
 gave no errors.

I got the same problem and I quote from Angus:

Yes, I get this sometimes too. It appears that somehow the generated file
takes some seconds to get registered. If you wait twenty seconds or so
before trying to launch lyx from the installer, it tends to work.

It might also have something to do with Lyx still running configure for the
first time, but it still needs some investigation.

Johann



Cannot access cvs

2005-06-09 Thread Johann Kellerman
Hi,

I'm trying to get cvs up and running but when I try to checkout
lyx-devel I get the following:


D:\settings\desktop\installlyx>set
CVSROOT=:pserver:[EMAIL PROTECTED]:/
cvs/lyx
D:\settings\desktop\installlyx>cvs login
Logging in to :pserver:[EMAIL PROTECTED]:2401:/cvs/lyx
CVS password: ***
cvs [login aborted]: connect to anoncvs.us.lyx.org:2401 failed: An
existing conn
ection was forcibly closed by the remote host.
-

It probably means my university is blocking access to the cvs port 2401,
or did I get something else wrong?

Just want to check before I get into a fight with the network people...

Thanks, 
Johann


Re: Bug in Lyx 1.3.6 (Windows)

2005-06-09 Thread Johann Kellerman
Hi Nicolás,

> C:   ools\msys1_0\bin;C:   ools\Python24;...
> 
> That is, the ":\t" is missing! (But the result was however OK in 
> lyxrc.defaults file)

\t is a special tab character, thats why you get the big whitespace displayed.
The generated line in the file should be fine.

> Then, when I launched Lyx from the installer, I got this message:
> 
> "LyX wasn't able to find its layout despcriptions! Check that the 
> textclass.lst is installed correctly. Has to exit"
> 
> However, the textclass.lst was correct and running lyx.exe by myself 
> gave no errors.

I got the same problem and I quote from Angus:

"Yes, I get this sometimes too. It appears that somehow the generated file
takes some seconds to get "registered". If you wait twenty seconds or so
before trying to launch lyx from the installer, it tends to work."

It might also have something to do with Lyx still running configure for the
first time, but it still needs some investigation.

Johann



First impressions of 1.3.6cvs on windows

2005-06-07 Thread Johann Kellerman
Hi,

I used the installer from http://www.lyx.org/~leeming/lyx_setup_136.exe
and it works great! Windows compatibility has imoroved by miles. Instant
preview works 100% and the math boxes seems to be completely aligned.

Some minor issues:

When installation is done the first time lyx is run I get the following
error:
Lyx cannot find it's textclass layout files. Has to exit or similar.
Luckily from the second time it was gone.

Can't get the spell checker to work at all. Lyx option is grayed out and
stuck on ispell. I have aspell, it's in the path and worked fine with
lyx135. Doesn't seem as if 1.3.6cvs picks it up (even after reconfigure)

Any ideas?

Thanks for all the hard work!
Johann


First impressions of 1.3.6cvs on windows

2005-06-07 Thread Johann Kellerman
Hi,

I used the installer from http://www.lyx.org/~leeming/lyx_setup_136.exe
and it works great! Windows compatibility has imoroved by miles. Instant
preview works 100% and the math boxes seems to be completely aligned.

Some minor issues:

When installation is done the first time lyx is run I get the following
error:
"Lyx cannot find it's textclass layout files. Has to exit" or similar.
Luckily from the second time it was gone.

Can't get the spell checker to work at all. Lyx option is grayed out and
stuck on ispell. I have aspell, it's in the path and worked fine with
lyx135. Doesn't seem as if 1.3.6cvs picks it up (even after reconfigure)

Any ideas?

Thanks for all the hard work!
Johann