lyx-1.4.0pre2-qt-cygwin doesn't display characters

2005-10-15 Thread Luis Rivera
Hello,

I compiled and use LyX --with-frontend=xforms succesfully on cygwin 
(version 1.5.18-1, with gcc 3.4.4-1).

However, --with-frontend=qt, I can can compile LyX succesfully, but it 
doesn't display any characters: just plain white squares. 

Perhaps there is nothing wrong with LyX, and the problem is the qt library; 
but I have no clue. I'm using the qt3 3.3.4-2 bundled with cygwin.

Meanwhile, I'll be testing the xforms version... which looks pretty good, 
actually.

Luis.




Re: lyx-1.4.0pre2-qt-cygwin doesn't display characters

2005-10-19 Thread Luis Rivera
Luis Rivera <[EMAIL PROTECTED]> writes:

> 
> Hello,
> 
> I compiled and use LyX --with-frontend=xforms succesfully on cygwin 
> (version 1.5.18-1, with gcc 3.4.4-1).
> 
> However, --with-frontend=qt, I can can compile LyX succesfully, but it 
> doesn't display any characters: just plain white squares. 
> Perhaps there is nothing wrong with LyX, and the problem is the qt library; 
> but I have no clue. 

The answer is: RTFM!  

In fact, there is nothing wrong, AFAICT, with LyX or the Qt library; but Qt is
trying to use proportional fonts, so I needed to install the missing font
package for Cygwin-X.

In short, this port of LyX-Qt on Cygwin-X requires the Cygwin native python
interpreter, ImageMagick, ghostscript, and the jpeg and qt3 packages, plus the
Xserver scalable fonts.  Apparently, LyX-Qt on Cygwin-X does posix style
searches for the conversion scripts, so it doesn't recognize the paths to
Windows native python, imgck or gs. This far it's been talking pretty well to
MiKTeX, so it seems that the TeX distribution included in Cygwin is not 
necessary.

Cheers,

Luis.



Re: lyx-1.4.0pre2-qt-cygwin doesn't display characters

2005-10-19 Thread Kayvan A. Sylvan
COOL

So you are saying that I can just go to gcc-3.4.4 and the Cygwin supplied QT
and it will just work??!!

Great!!

---Kayvan

On Wed, Oct 19, 2005 at 04:14:24PM +, Luis Rivera wrote:
> Luis Rivera <[EMAIL PROTECTED]> writes:
> 
> > 
> > Hello,
> > 
> > I compiled and use LyX --with-frontend=xforms succesfully on cygwin 
> > (version 1.5.18-1, with gcc 3.4.4-1).
> > 
> > However, --with-frontend=qt, I can can compile LyX succesfully, but it 
> > doesn't display any characters: just plain white squares. 
> > Perhaps there is nothing wrong with LyX, and the problem is the qt library; 
> > but I have no clue. 
> 
> The answer is: RTFM!  
> 
> In fact, there is nothing wrong, AFAICT, with LyX or the Qt library; but Qt is
> trying to use proportional fonts, so I needed to install the missing font
> package for Cygwin-X.
> 
> In short, this port of LyX-Qt on Cygwin-X requires the Cygwin native python
> interpreter, ImageMagick, ghostscript, and the jpeg and qt3 packages, plus the
> Xserver scalable fonts.  Apparently, LyX-Qt on Cygwin-X does posix style
> searches for the conversion scripts, so it doesn't recognize the paths to
> Windows native python, imgck or gs. This far it's been talking pretty well to
> MiKTeX, so it seems that the TeX distribution included in Cygwin is not 
> necessary.
> 
> Cheers,
> 
> Luis.
> 

-- 
Kayvan A. Sylvan  | Proud husband of   | Father to my kids:
Sylvan Associates, Inc.   | Laura Isabella Sylvan  | Katherine Yelena (8/8/89)
http://sylvan.com/~kayvan | "crown of her husband" | Robin Gregory (2/28/92)


Re: lyx-1.4.0pre2-qt-cygwin doesn't display characters

2005-10-19 Thread Mike Meyer
In <[EMAIL PROTECTED]>, Luis Rivera <[EMAIL PROTECTED]> typed:
> In short, this port of LyX-Qt on Cygwin-X requires the Cygwin native python
> interpreter, ImageMagick, ghostscript, and the jpeg and qt3 packages, plus the
> Xserver scalable fonts.  Apparently, LyX-Qt on Cygwin-X does posix style
> searches for the conversion scripts, so it doesn't recognize the paths to
> Windows native python, imgck or gs.

Just out of curiosity, what happens if you add the appropriate
directories to the PATH?

Thanks,
  http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.


Re: lyx-1.4.0pre2-qt-cygwin doesn't display characters

2005-10-19 Thread Angus Leeming
Mike Meyer wrote:

> In <[EMAIL PROTECTED]>,
> Luis Rivera <[EMAIL PROTECTED]> typed:
>> In short, this port of LyX-Qt on Cygwin-X requires the Cygwin native
>> python interpreter, ImageMagick, ghostscript, and the jpeg and qt3
>> packages, plus the
>> Xserver scalable fonts.  Apparently, LyX-Qt on Cygwin-X does posix style
>> searches for the conversion scripts, so it doesn't recognize the paths
>> to Windows native python, imgck or gs.
> 
> Just out of curiosity, what happens if you add the appropriate
> directories to the PATH?

Or, within LyX, using the path_prefix entry in the preferences file
(Edit->Preferences dialog, Paths pane), using native Cygwin syntax.

-- 
Angus



Re: lyx-1.4.0pre2-qt-cygwin doesn't display characters

2005-10-19 Thread Luis Rivera
Angus Leeming <[EMAIL PROTECTED]> writes:

> 
> Mike Meyer wrote:
> 
> > In <[EMAIL PROTECTED]>,
> > Luis Rivera <[EMAIL PROTECTED]> typed:
> >> In short, this port of LyX-Qt on Cygwin-X requires the Cygwin native
> >> python interpreter, ImageMagick, ghostscript, and the jpeg and qt3
> >> packages, plus the
> >> Xserver scalable fonts.  Apparently, LyX-Qt on Cygwin-X does posix 
> >> style searches for the conversion scripts, so it doesn't recognize 
> >> the paths to Windows native python, imgck or gs.
> > 
> > Just out of curiosity, what happens if you add the appropriate
> > directories to the PATH?
> 
> Or, within LyX, using the path_prefix entry in the preferences file
> (Edit->Preferences dialog, Paths pane), using native Cygwin syntax.
> 

Indeed, I tried both (in reverse order, btw, since I thought instructions 
for lusers should go from inside out the application), and as I said, it 
seems that LyX sticks to posix-style path searches, not for the
applications (rightly found through either the PATH environment or the
path_prefix preferences), but for the files to convert.

eg. In trying to display the User's Guide, convert fails with the 
following message:

convert.exe: unable to open image '/usr/local/share/lyx/doc/mobius.eps': 
No such file or directory.

So it seems to me that LyX is failing to add the prefix `/cygdrive/c' 
directory, necessary for the native windows convert.exe file to find the 
.eps file in its own search.

Why MiKTeX doesn't complain, I don't know.  I guess I have to RTFM! :)

And, yes, using the compiling combo I mentioned above, LyX seems to be 
happy...

Cheers,

Luis.



Re: lyx-1.4.0pre2-qt-cygwin doesn't display characters

2005-10-19 Thread Angus Leeming
Luis Rivera wrote:

> Angus Leeming <[EMAIL PROTECTED]> writes:
> 
>> 
>> Mike Meyer wrote:
>> 
>> > In <[EMAIL PROTECTED]>,
>> > Luis Rivera <[EMAIL PROTECTED]> typed:
>> >> In short, this port of LyX-Qt on Cygwin-X requires the Cygwin native
>> >> python interpreter, ImageMagick, ghostscript, and the jpeg and qt3
>> >> packages, plus the
>> >> Xserver scalable fonts.  Apparently, LyX-Qt on Cygwin-X does posix
>> >> style searches for the conversion scripts, so it doesn't recognize
>> >> the paths to Windows native python, imgck or gs.
>> > 
>> > Just out of curiosity, what happens if you add the appropriate
>> > directories to the PATH?
>> 
>> Or, within LyX, using the path_prefix entry in the preferences file
>> (Edit->Preferences dialog, Paths pane), using native Cygwin syntax.
>> 
> 
> Indeed, I tried both (in reverse order, btw, since I thought instructions
> for lusers should go from inside out the application), and as I said, it
> seems that LyX sticks to posix-style path searches, not for the
> applications (rightly found through either the PATH environment or the
> path_prefix preferences), but for the files to convert.

Right. Now I understand.

Basically, the current code is a bit of a kludge. Here it is (from
src/support/os_cygwin.C):

string external_path(string const & p)
{
string dos_path;

// Translate from cygwin path syntax to dos path syntax
if (cygwin_path_fix_ && is_absolute_path(p)) {
char dp[PATH_MAX];
cygwin_conv_to_full_win32_path(p.c_str(), dp);
dos_path = !dp ? "" : dp;
}

else return p;

//No backslashes in LaTeX files
dos_path = subst(dos_path,'\\','/');

lyxerr[Debug::LATEX]
<< " ["
<< p << "]->>["
<< dos_path << ']' << endl;
return dos_path;
}

The kludge is the "cygwin_path_fix_" which is settable from the
Edit->Preferences dialog IIRC and can certainly be set manually in your
preferences file as:

\cygwin_path_fix_needed true

The "real" solution would be to tell LyX about different path styles in the
converters:
native, Cygwin paths: convert $$i $$o
Win32 paths: convert $$win32i $$win32o

Anyway, try it out. LaTeX always gets paths it understands now anyway, so
things might "just work" for both Cygwin and Win32 apps.

-- 
Angus



Re: lyx-1.4.0pre2-qt-cygwin doesn't display characters

2005-10-19 Thread Luis Rivera
Angus Leeming <[EMAIL PROTECTED]> writes:

> 
> Basically, the current code is a bit of a kludge. 
> The kludge is the "cygwin_path_fix_" which is settable from the
> Edit->Preferences dialog IIRC and can certainly be set manually in your
> preferences file as:
> 
> \cygwin_path_fix_needed true
> 

Tried it, and now the error message is

22 [main] lyx 440 fork_parent: child 1276 died waiting for longjmp before
initialization.
Could not fork: No such file or directory

> The "real" solution would be to tell LyX about different path styles in the
> converters:
> native, Cygwin paths: convert $$i $$o
> Win32 paths: convert $$win32i $$win32o
> 

???  I don't get it. Sorry.

> Anyway, try it out. LaTeX always gets paths it understands now anyway, so
> things might "just work" for both Cygwin and Win32 apps.
> 

LyX preview and export to DVI/PDF work fine: the images show up in the 
output files as expected, even as the LyX editor keep them hidden. 

Luis.



Re: lyx-1.4.0pre2-qt-cygwin doesn't display characters

2005-10-19 Thread Luis Rivera
Angus Leeming <[EMAIL PROTECTED]> writes:

> 
> Luis Rivera wrote:
> 
> > Indeed, I tried both (in reverse order, btw, since I thought instructions
> > for lusers should go from inside out the application), and as I said, it
> > seems that LyX sticks to posix-style path searches, not for the
> > applications (rightly found through either the PATH environment or the
> > path_prefix preferences), but for the files to convert.
> 
> Right. Now I understand.
> 
> Basically, the current code is a bit of a kludge. Here it is (from
> src/support/os_cygwin.C):
> 

I wonder whether this code only handles (and thus, fixes) the paths for the
applications, not the target input/output files.

Just shooting from the hip...

Luis.




Re: lyx-1.4.0pre2-qt-cygwin doesn't display characters

2005-10-19 Thread Angus Leeming
Luis Rivera wrote:
>> \cygwin_path_fix_needed true

> Tried it, and now the error message is
> 22 [main] lyx 440 fork_parent: child 1276 died waiting for longjmp before
> initialization.
> Could not fork: No such file or directory

Presumably because some unix shell script (convertDefault.sh ?) is
expecting unix-ish paths. I never said this would be easy :)

Kayvan's the Cygwin expert. I know nothing. zip. nichts. nada.

>> The "real" solution would be to tell LyX about different path styles in
>> the converters:
>> native, Cygwin paths: convert $$i $$o
>> Win32 paths: convert $$win32i $$win32o

> ???  I don't get it. Sorry

All I meant was, rather than have a single global value (to win32path or to
not win32path), individual converters (Edit->Preferences dialog,
converters pane) could tell LyX what style of path they wanted.
$$i input file
$$o output file

-- 
Angus



Re: lyx-1.4.0pre2-qt-cygwin doesn't display characters

2005-10-19 Thread Angus Leeming
Luis Rivera wrote:
>> Basically, the current code is a bit of a kludge. Here it is (from
>> src/support/os_cygwin.C):

> I wonder whether this code only handles (and thus, fixes) the paths for
> the applications, not the target input/output files.

> Just shooting from the hip...

All file names should be transformed using "external_path".

-- 
Angus



Re: lyx-1.4.0pre2-qt-cygwin doesn't display characters

2005-10-20 Thread Luis Rivera
Angus Leeming <[EMAIL PROTECTED]> writes:

> 
> Luis Rivera wrote:
> > I wonder whether this code only handles (and thus, fixes) the paths for
> > the applications, not the target input/output files.
> 
> All file names should be transformed using "external_path".
> 

OK.

No need to quote them?

Cheers,

Luis.




Re: lyx-1.4.0pre2-qt-cygwin doesn't display characters

2005-10-20 Thread Luis Rivera
Angus Leeming <[EMAIL PROTECTED]> writes:

> 
> >> The "real" solution would be to tell LyX about different path styles in
> >> the converters:
> >> native, Cygwin paths: convert $$i $$o
> >> Win32 paths: convert $$win32i $$win32o
>
> All I meant was, rather than have a single global value (to win32path or to
> not win32path), individual converters (Edit->Preferences dialog,
> converters pane) could tell LyX what style of path they wanted.
> $$i input file
> $$o output file
> 

Got it.  However, I can't find which converters need to be tuned up to fix LyX's
misbehavior.

This far, I've fixed the converter to OpenOffice and Word, since I know what
formats to look for; but to make graphics conversion, I have no clue.

(Usually, I work only with text, not graphics... perhaps that's why I stick to
old borlandish joe editor... :)

Luis.




Re: lyx-1.4.0pre2-qt-cygwin doesn't display characters

2005-10-20 Thread Angus Leeming
Luis Rivera wrote:
>> All file names should be transformed using "external_path".
> OK.
> No need to quote them?

At the moment, yes. (Hence our problems with "files with spaces".)

Eventually, I'd hope we wouldn't have to quote them because we'd store
the arguments in an array and pass this array to the code that spawns
the child process. Even if, on Windows, we have then to quote these
args, we would have to do it in one place only.

At the moment, there are two many places where the generation of the
child command can go wrong.

-- 
Angus



Re: lyx-1.4.0pre2-qt-cygwin doesn't display characters

2005-10-21 Thread Angus Leeming
Luis Rivera wrote:
>> >> The "real" solution would be to tell LyX about different path
>> >> styles in the converters:
>> >> native, Cygwin paths: convert $$i $$o
>> >> Win32 paths: convert $$win32i $$win32o

>> All I meant was, rather than have a single global value (to
>> win32path or to not win32path), individual converters
>> (Edit->Preferences dialog, converters pane) could tell LyX what
>> style of path they wanted.
>> $$i input file
>> $$o output file

> Got it.  However, I can't find which converters need to be tuned up
> to fix LyX's misbehavior.
 > This far, I've fixed the converter to OpenOffice and Word, since I
> know what formats to look for; but to make graphics conversion, I
> have no clue.

There's a page on the wiki that explains enough to get you started:

http://wiki.lyx.org/LyX/FiguresInLyX

If you haven't explicitly defined a converter from format X to PNG,
then LyX will fall through to the convertDefault.sh script found in
the scripts subdirectory of the support dir.

This script is just a wrapper for ImageMagick's convert.exe.

I'd either modify the script so that convert.exe receives paths that
it knows what to do with, or I'd define an explicit converter from
format X to PNG.

-- 
Angus



Re: lyx-1.4.0pre2-qt-cygwin doesn't display characters

2005-10-22 Thread Luis Rivera
Angus Leeming <[EMAIL PROTECTED]> writes:

> 
> Luis Rivera wrote:
> > Got it.  However, I can't find which converters need to be tuned up
> > to fix LyX's misbehavior.
> 
> There's a page on the wiki that explains enough to get you started:
> 

Thanks a lot!!!

Now I think we can close this thread...

Cheers!

Luis.