Re: Converting msword to LyX is ugly!

2008-07-20 Thread Nicolás

All that seems like too much work!

I would first try to convert Word to Latex, import into LyX and chechk the result. You will still probably have to do some manual 
adjustment, but they will hopefully be less.


I recently use this application:
http://www.grindeq.com/index.php?p=word2latex

It is not free, but you can download a trail version. If I am not wrong, it works with all the features for a limited period of time. 
Since you only want to do one conversion, it should be enough.


Good luck!

Nicolás

Steve Litt wrote:

Hi all,

I have a 300 page book written in MS Word version 97, and I have to convert it 
to LyX in order to make the second edition.


I'll accept all condolences now :-)

Believe it or not, the MS Word version was written very much what you guys 
would call WYSIWYM. I had styles for everything -- almost no appearance was 
fine tuned. Obviously it's essential that all those styles transfer over into 
the LyX version.


I'll accept all condolences now :-)

So heres what my plan, unless someone else has a better idea.

First, I'll export to RTF.

I'll accept all condolences now :-)

Then in Vim I'll do this:

:%s/}/}\r/g

Now the rtf file will have lines that are somewhat recognizeable as markup.

Next I'll look at the \stylesheet part of the RTF, and make a list of all 
paragraph and character styles, sort of like this:


\fs20 Normal
\s1 heading 1
\s2 heading 2
\cs10 \additive Default Paragraph Font
\s16 myparagraphstyle
\cs17 mycharstyle
\cs18 mycharstyle2

Then, within Vim I'll run substitions so that the text referred to by the 
numbers such as \s2 are prepended with my own tags such as phdr2, and better 
yet that text has a proper ending tag appended. This is not so simple for 
three reasons:


1) There's always a bunch of gobblety gook between the \s2 and the text to 
which it refers, and that must eventually be deleted.


2) There's often gobblety gook before the \s2, and that gobblety gook must 
eventually be deleted.


3) It's MUCH harder to reliably put end tags at the end of the text to which 
it refers. If I don't put end tags, that means I'll have a much harder time 
converting it to LyX.


Next, I'll re-import the rtf into MS Word. What should happen is it re-imports 
the same as it originally was, only now it has my tags. From there I should 
be able to export it to plain text, and use my tags to create the LyX file 
with suitable scripts. Or maybe make scripts to directly manipulate the RTF. 
Of course, for all my custom character and paragraph styles, I'll need to 
create those styles within LyX, in a blank document, before appending the 
actual content.


Then comes the cleanup. Stuff like tables and images won't convert -- I'll 
need to manually do that cleanup and then run at least a rough proofread.


The good news is, because the original document used styles for almost every 
appearance, fine tuning won't be necessary (hooray for styles!).


I'd estimate this to be about a week's job. That's a lot of time, but in the 
end I'll have converted a 300 page book, style for style, from MS Word to 
LyX.


If anyone has a better idea for converting a 300 page MS Word document to LyX, 
style for style and word for word, please let me know.


Thanks

STeveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US






Re: Inconsistent indentation behaviour after LyX-Code and Program Listing Inset

2008-07-20 Thread Jürgen Spitzmüller
Paul A. Rubin wrote:
 If you mean an example for doing a listing in ERT, the OP (Álvaro) had
 one in his original message.  If you mean an example using multibyte
 encoding, 

Yes, I mean the latter.

 I don't think so -- the closest I come to a foreign language 
 is some long-forgotten German, and that's still single byte, isn't it?

It is. I LyX, the only multibyte encodings besides utf8 are the CJK encodings 
(EUC-JP, BIG5, etc.).

Anyway, I don't think you'll find a working example. As listings fails with 
multibyte glyphs, it will also fail when multibyte glyphs are used in ERT, 
no?

Jürgen


Re: Converting msword to LyX is ugly!

2008-07-20 Thread cmiramon
Steve Litt wrote:
 It would have been wonderful. Unfortunately, writer2latex preserves the
 level class hierarchy (level1-part, level2-chapter, etc) but it dumps
 all my custom made classes and does its best to reproduce them with fine
 tuning. This is the second tool that's tried to do me the favor of
 converting my styles to fine tuning.
 

You can add your custom styles to the writer2latex configuration files. It
is explained here :
http://www.hj-gym.dk/~hj/writer2latex/doc/user-manual4.html#toc10

Globally what you have to do is to create a custom configuration file where
you :
1) give the writer2latex options to take away most of the wysiwyg stuff
(options formatting, and page_formatting) but leave the italic/bold etc...
2) create mapping for all your styles

Then :  
3) convert the file with writer2latex
4) clean the latex file. I have a sed script to do it but you can do it in
your favorite vim.
5) Create a custom layout in LyX
5) import it in LyX with your layout.

I use this workflow to convert old articles from MsWord to LyX and it works
well. 

Cheers,
Charles



Re: Converting msword to LyX is ugly!

2008-07-20 Thread Daniel Lohmann


On 20.07.2008, at 05:44, Steve Litt wrote:


On Saturday 19 July 2008 19:57, Typhoon wrote:

SNIP


This is by far the best solution, in my opinion.

Unfortunately for me, my only Windows machine is a 1997 Pentium
II/300 with 128MB of RAM, which would be painfully slow.


Steve,
What happens if you import the RTF file into OO and then follow the
procedures suggested?


I don't know. I don't trust OO Writer as far as I can throw my  
house. OO

Writer's not touching my book.

About 2 years ago, during one of my occasional I'm mad at LyX  
months, I
evaluated OO Writer as book writing software. What I would have lost  
in
typeset quality, I hoped to gain in faster creation of styles.  
However, OO

Writer kept changing styles all by itself. It was one of the most
untrustworthy pieces of software I've ever seen. That gave me an  
incentive to

learn a lot more about LyX style creation.


Steve,

Do not close this door to early. While I can understand very well that  
you actually do not like OO Writer, I think you should give it another  
try -- you do not have to really work with it.


Even if all that Writer2LaTeX stuff does not work, OO Writer might be  
a good transition format:


(1) OO Writer preserves the structure of styles when importing from  
Word (AFAIK).
(2) OO uses an XML-based document format (zips them on disk, but you  
can just use a common unzip tool to get the actual content)


The XLM-based representation is for sure a better source for script- 
based / structure-preserving transformation than RTF.



Daniel 
 


Re: More on 1.6 beta4 crashing on Ubuntu

2008-07-20 Thread Michael Beckmann

Hi Pandita

your document did not cause any problems on my computer, however, since 
the bug you found seems to be reproducible under certain circumstances 
it'll probably be fixed in one of the next releases.
If you are in the need to work with lyx in the meantime I suggest that 
you compile and install the last stable version.


cheers
Michael



[EMAIL PROTECTED] wrote:

Hi Michael and all list members

I posted the following question to the list:

I have just compiled Lyx 1.6 beta4 on Ubuntu (8.04) and installed it. 
When I tried to open my Lyx documents, one document is constantly 
crashing when I click on the title in the document (very strange).  Can 
someone tell me how to fix it?


Then Michael asked me Could you run lyx in the terminal and post the 
crash/error output? I followed his advice and I got the following 
terminal output:


CoordCache.cpp(39): break on pointer: 0x8bb1640 hint: x size: 4
lassert.cpp(21): ASSERTION false VIOLATED IN CoordCache.cpp:40
Assertion triggered in void lyx::doAssert(const char*, const char*, long
int) by failing check false in file lassert.cpp:23
Aborted

Then Michael wrote:

I'm not sure what this actually means, maybe somebody else has an idea.

Can you provide the document as Pavel suggested? Does the error
occur only with this document or with every (even newly created) file?

Please remember to reply to all recipients (i.e
lyx-users@lists.lyx.org mailto:lyx-users@lists.lyx.org) when
answering emails in the userlist, otherwise its just me reading it
and I'm not really an expert :-)


So I have attached my document herewith. Really hope somebody kindly helps.

Thanking in advance

Ven. Pandita


Re: export to latex(plain) not working in lyx1.6.0Beta4

2008-07-20 Thread Olivier Ripoll

Abdelrazak Younes wrote:

Olivier Ripoll wrote:

Abdelrazak Younes wrote:


[...]


I have by the way no problem to export to pdf (pdflatex or ps2pdf) on
Windows.


Olivier,

Could you please look at http://bugzilla.lyx.org/show_bug.cgi?id=4693
There is a question for you.

Thanks in advance,
Abdel.


Abdel,

I tried this morning to do what Uwe asked in the bug (deleting my 
Application Data\lyx16 directory). After that is done, I cannot 
export to pdf, indeed.
When I uninstalled the beta3, I chose not to delete the preferences 
(there is a checkbox in Uwe's uninstaller for that), so it probably 
explains why I could export fine with beta4.
I read the bug 4693 yesterday evening but only tried today, and 
unfortunately, today, lyx bugzilla cannot be accessed, thus I cannot 
answer in the bug. That's why I am answering here in the list.


Best regards,

Olivier



Re: Ugly output in PDF

2008-07-20 Thread Acme


Hi,

It worked fine a couple of times, and then it went wrong again. 

When I was about to go crazy today, I checked the emails, which I forget to
do during the past one  week, and found some replies from forum users. I
followed the suggestion from Richard to CHANGE THE FONT FROM ROMAN TO TIMES
ROMAN, and then tried dozens of times. Now, I am sure that Richard's
suggestion really works!! Thanks to Richard, and all those who tried to help
me!!

Best
Acme
-- 
View this message in context: 
http://n2.nabble.com/Ugly-output-in-PDF-tp529343p573906.html
Sent from the LyX - Users mailing list archive at Nabble.com.



Re: Converting msword to LyX is ugly!

2008-07-20 Thread Steve Litt
On Sunday 20 July 2008 06:50, Daniel Lohmann wrote:
 On 20.07.2008, at 05:44, Steve Litt wrote:
  On Saturday 19 July 2008 19:57, Typhoon wrote:
  SNIP
 
  This is by far the best solution, in my opinion.
 
  Unfortunately for me, my only Windows machine is a 1997 Pentium
  II/300 with 128MB of RAM, which would be painfully slow.
 
  Steve,
  What happens if you import the RTF file into OO and then follow the
  procedures suggested?
 
  I don't know. I don't trust OO Writer as far as I can throw my
  house. OO
  Writer's not touching my book.
 
  About 2 years ago, during one of my occasional I'm mad at LyX
  months, I
  evaluated OO Writer as book writing software. What I would have lost
  in
  typeset quality, I hoped to gain in faster creation of styles.
  However, OO
  Writer kept changing styles all by itself. It was one of the most
  untrustworthy pieces of software I've ever seen. That gave me an
  incentive to
  learn a lot more about LyX style creation.

 Steve,

 Do not close this door to early. While I can understand very well that
 you actually do not like OO Writer, I think you should give it another
 try -- you do not have to really work with it.

 Even if all that Writer2LaTeX stuff does not work, OO Writer might be
 a good transition format:

 (1) OO Writer preserves the structure of styles when importing from
 Word (AFAIK).
 (2) OO uses an XML-based document format (zips them on disk, but you
 can just use a common unzip tool to get the actual content)

 The XLM-based representation is for sure a better source for script-
 based / structure-preserving transformation than RTF.

Thanks Daniel,

That's a good idea. If I weren't half way though the conversion I'd evaluate 
it.

Unfortunately, OO Writer's XML structure is complex and difficult. There are 
something like 6 files, and if you tweak one it's likely you'll never get the 
thing to work with OO Writer again. Of course that doesn't preclude parsing 
its XML, but when XML is that touchy, it's all too easy to lose something.

XML is getting really hip these days, but from my perspective, the huge number 
of interdependencies make it very hard to tweak. I know modern versions of 
LyX are XML native -- I hope LyX native format never becomes complex like OO.

Thanks

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US



Re: .kmap ortography

2008-07-20 Thread Pavel Sanda
 I just want to write this lines
 
 \kmap  ??
 \kmap  ??
 
 in my personal.kmap file to have a chevrons or guillemets marks (I use
 also double quotes)

at worst you can alway use key binding instead, i.e. to bind shift+ to
unicode-insert 0x0bb lfun. 

pavel

 But it doesn't work, perhaps due to the mistaken ortography in the ASCII
 file. How to refer to this characters?


Re: Inconsistent indentation behaviour after LyX-Code and Program Listing Inset

2008-07-20 Thread Paul A. Rubin

Jürgen Spitzmüller wrote:



Anyway, I don't think you'll find a working example. As listings fails with 
multibyte glyphs, it will also fail when multibyte glyphs are used in ERT, 
no?


Not according to the documentation.  You can define an escape to LaTeX 
character, and anything bracketed by that character is handed off to 
LaTeX verbatim.  According to the docs, that allows you to put multibyte 
characters in a comment (though apparently _only_ in a comment).


Anyway, I can't find a way to test this here, since I don't have any CJK 
fonts installed and wouldn't know how to use them if I did.  If this is 
an issue, we'll find out when someone barks about it.  Until then, I'm 
not sure it's worth worrying about.


/Paul



Converting msword to LyX: Lessons learned so far

2008-07-20 Thread Steve Litt
Hi all,

One way or another, within the text of the .doc file I've written tags for the 
following:

* The whole heading hierarchy
* Major (and all home grown) paragraph styles
* Major (and all home grown) character styles
* Lists, both numbered and unnumbered
* Markers for graphics, summarizing what they are
* Markers for tables, telling how many columns and what kind of header
* Markers for boxes

At this point I think I have a fighting chance of exporting to text, 
converting to LyX, and then doing the final patchups within LyX itself. 
Dirty? Yes. Ugly? Yes. Necessary? Yes.

It turns out Mr. Always Use Styles didn't always use styles, and sometimes 
applied different styles for the same conceptual uses. This wasn't all the 
fault of the Steve Litt who existed in 1999 -- some of it was MS Word 
silliness. Without the LaTeX back end, I had to fine tune stuff to prevent 
page breaking and the like. Lists were sometimes special environments but 
sometimes Normal.

In the past I've told people it's just fine to create mail order books in MS 
Word. After going through that document I no longer feel that way. MS Word 
has too many gotchas requiring fine tuning. It's not much better than OO 
Writer.

WordPerfect 5.1 was another matter entirely. It was a professional product way 
beyond its time. However, the one book I have in WordPerfect 5.1 is 18 years 
old and I doubt there will be a second edition.

Anyway, the work I did today convinced me that solving this programatically 
would have been futile, and it would have taken a long time to learn it was 
futile. Next week I'll try to convert my tagged-up text file to LyX, and then 
start the (massive) cleanup. Then I'll save to yet another file and begin 
making the changes that will result in the second edition.

By the way, if I ever write a second edition of Troubleshooting Techniques of 
the Successful Technologist, I'll need to convert all my uses of LyX color 
based character styles (Dekl Tsur's pre-characterstyle workaround) to 
modern character styles. That should be a laugh a minute :-)

Thanks

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US



Re: Converting msword to LyX: Lessons learned so far

2008-07-20 Thread Richard heck

Steve Litt wrote:
By the way, if I ever write a second edition of Troubleshooting Techniques of 
the Successful Technologist, I'll need to convert all my uses of LyX color 
based character styles (Dekl Tsur's pre-characterstyle workaround) to 
modern character styles. That should be a laugh a minute :-)


  
I'd bet that wouldn't be too bad. The code in lyx2lyx could be adapted 
to this purpose.


rh



Re: Converting msword to LyX is ugly!

2008-07-20 Thread Nicolás

All that seems like too much work!

I would first try to convert Word to Latex, import into LyX and chechk the result. You will still probably have to do some manual 
adjustment, but they will hopefully be less.


I recently use this application:
http://www.grindeq.com/index.php?p=word2latex

It is not free, but you can download a trail version. If I am not wrong, it works with all the features for a limited period of time. 
Since you only want to do one conversion, it should be enough.


Good luck!

Nicolás

Steve Litt wrote:

Hi all,

I have a 300 page book written in MS Word version 97, and I have to convert it 
to LyX in order to make the second edition.


I'll accept all condolences now :-)

Believe it or not, the MS Word version was written very much what you guys 
would call WYSIWYM. I had styles for everything -- almost no appearance was 
fine tuned. Obviously it's essential that all those styles transfer over into 
the LyX version.


I'll accept all condolences now :-)

So heres what my plan, unless someone else has a better idea.

First, I'll export to RTF.

I'll accept all condolences now :-)

Then in Vim I'll do this:

:%s/}/}\r/g

Now the rtf file will have lines that are somewhat recognizeable as markup.

Next I'll look at the \stylesheet part of the RTF, and make a list of all 
paragraph and character styles, sort of like this:


\fs20 Normal
\s1 heading 1
\s2 heading 2
\cs10 \additive Default Paragraph Font
\s16 myparagraphstyle
\cs17 mycharstyle
\cs18 mycharstyle2

Then, within Vim I'll run substitions so that the text referred to by the 
numbers such as \s2 are prepended with my own tags such as phdr2, and better 
yet that text has a proper ending tag appended. This is not so simple for 
three reasons:


1) There's always a bunch of gobblety gook between the \s2 and the text to 
which it refers, and that must eventually be deleted.


2) There's often gobblety gook before the \s2, and that gobblety gook must 
eventually be deleted.


3) It's MUCH harder to reliably put end tags at the end of the text to which 
it refers. If I don't put end tags, that means I'll have a much harder time 
converting it to LyX.


Next, I'll re-import the rtf into MS Word. What should happen is it re-imports 
the same as it originally was, only now it has my tags. From there I should 
be able to export it to plain text, and use my tags to create the LyX file 
with suitable scripts. Or maybe make scripts to directly manipulate the RTF. 
Of course, for all my custom character and paragraph styles, I'll need to 
create those styles within LyX, in a blank document, before appending the 
actual content.


Then comes the cleanup. Stuff like tables and images won't convert -- I'll 
need to manually do that cleanup and then run at least a rough proofread.


The good news is, because the original document used styles for almost every 
appearance, fine tuning won't be necessary (hooray for styles!).


I'd estimate this to be about a week's job. That's a lot of time, but in the 
end I'll have converted a 300 page book, style for style, from MS Word to 
LyX.


If anyone has a better idea for converting a 300 page MS Word document to LyX, 
style for style and word for word, please let me know.


Thanks

STeveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US






Re: Inconsistent indentation behaviour after LyX-Code and Program Listing Inset

2008-07-20 Thread Jürgen Spitzmüller
Paul A. Rubin wrote:
 If you mean an example for doing a listing in ERT, the OP (Álvaro) had
 one in his original message.  If you mean an example using multibyte
 encoding, 

Yes, I mean the latter.

 I don't think so -- the closest I come to a foreign language 
 is some long-forgotten German, and that's still single byte, isn't it?

It is. I LyX, the only multibyte encodings besides utf8 are the CJK encodings 
(EUC-JP, BIG5, etc.).

Anyway, I don't think you'll find a working example. As listings fails with 
multibyte glyphs, it will also fail when multibyte glyphs are used in ERT, 
no?

Jürgen


Re: Converting msword to LyX is ugly!

2008-07-20 Thread cmiramon
Steve Litt wrote:
 It would have been wonderful. Unfortunately, writer2latex preserves the
 level class hierarchy (level1-part, level2-chapter, etc) but it dumps
 all my custom made classes and does its best to reproduce them with fine
 tuning. This is the second tool that's tried to do me the favor of
 converting my styles to fine tuning.
 

You can add your custom styles to the writer2latex configuration files. It
is explained here :
http://www.hj-gym.dk/~hj/writer2latex/doc/user-manual4.html#toc10

Globally what you have to do is to create a custom configuration file where
you :
1) give the writer2latex options to take away most of the wysiwyg stuff
(options formatting, and page_formatting) but leave the italic/bold etc...
2) create mapping for all your styles

Then :  
3) convert the file with writer2latex
4) clean the latex file. I have a sed script to do it but you can do it in
your favorite vim.
5) Create a custom layout in LyX
5) import it in LyX with your layout.

I use this workflow to convert old articles from MsWord to LyX and it works
well. 

Cheers,
Charles



Re: Converting msword to LyX is ugly!

2008-07-20 Thread Daniel Lohmann


On 20.07.2008, at 05:44, Steve Litt wrote:


On Saturday 19 July 2008 19:57, Typhoon wrote:

SNIP


This is by far the best solution, in my opinion.

Unfortunately for me, my only Windows machine is a 1997 Pentium
II/300 with 128MB of RAM, which would be painfully slow.


Steve,
What happens if you import the RTF file into OO and then follow the
procedures suggested?


I don't know. I don't trust OO Writer as far as I can throw my  
house. OO

Writer's not touching my book.

About 2 years ago, during one of my occasional I'm mad at LyX  
months, I
evaluated OO Writer as book writing software. What I would have lost  
in
typeset quality, I hoped to gain in faster creation of styles.  
However, OO

Writer kept changing styles all by itself. It was one of the most
untrustworthy pieces of software I've ever seen. That gave me an  
incentive to

learn a lot more about LyX style creation.


Steve,

Do not close this door to early. While I can understand very well that  
you actually do not like OO Writer, I think you should give it another  
try -- you do not have to really work with it.


Even if all that Writer2LaTeX stuff does not work, OO Writer might be  
a good transition format:


(1) OO Writer preserves the structure of styles when importing from  
Word (AFAIK).
(2) OO uses an XML-based document format (zips them on disk, but you  
can just use a common unzip tool to get the actual content)


The XLM-based representation is for sure a better source for script- 
based / structure-preserving transformation than RTF.



Daniel 
 


Re: More on 1.6 beta4 crashing on Ubuntu

2008-07-20 Thread Michael Beckmann

Hi Pandita

your document did not cause any problems on my computer, however, since 
the bug you found seems to be reproducible under certain circumstances 
it'll probably be fixed in one of the next releases.
If you are in the need to work with lyx in the meantime I suggest that 
you compile and install the last stable version.


cheers
Michael



[EMAIL PROTECTED] wrote:

Hi Michael and all list members

I posted the following question to the list:

I have just compiled Lyx 1.6 beta4 on Ubuntu (8.04) and installed it. 
When I tried to open my Lyx documents, one document is constantly 
crashing when I click on the title in the document (very strange).  Can 
someone tell me how to fix it?


Then Michael asked me Could you run lyx in the terminal and post the 
crash/error output? I followed his advice and I got the following 
terminal output:


CoordCache.cpp(39): break on pointer: 0x8bb1640 hint: x size: 4
lassert.cpp(21): ASSERTION false VIOLATED IN CoordCache.cpp:40
Assertion triggered in void lyx::doAssert(const char*, const char*, long
int) by failing check false in file lassert.cpp:23
Aborted

Then Michael wrote:

I'm not sure what this actually means, maybe somebody else has an idea.

Can you provide the document as Pavel suggested? Does the error
occur only with this document or with every (even newly created) file?

Please remember to reply to all recipients (i.e
lyx-users@lists.lyx.org mailto:lyx-users@lists.lyx.org) when
answering emails in the userlist, otherwise its just me reading it
and I'm not really an expert :-)


So I have attached my document herewith. Really hope somebody kindly helps.

Thanking in advance

Ven. Pandita


Re: export to latex(plain) not working in lyx1.6.0Beta4

2008-07-20 Thread Olivier Ripoll

Abdelrazak Younes wrote:

Olivier Ripoll wrote:

Abdelrazak Younes wrote:


[...]


I have by the way no problem to export to pdf (pdflatex or ps2pdf) on
Windows.


Olivier,

Could you please look at http://bugzilla.lyx.org/show_bug.cgi?id=4693
There is a question for you.

Thanks in advance,
Abdel.


Abdel,

I tried this morning to do what Uwe asked in the bug (deleting my 
Application Data\lyx16 directory). After that is done, I cannot 
export to pdf, indeed.
When I uninstalled the beta3, I chose not to delete the preferences 
(there is a checkbox in Uwe's uninstaller for that), so it probably 
explains why I could export fine with beta4.
I read the bug 4693 yesterday evening but only tried today, and 
unfortunately, today, lyx bugzilla cannot be accessed, thus I cannot 
answer in the bug. That's why I am answering here in the list.


Best regards,

Olivier



Re: Ugly output in PDF

2008-07-20 Thread Acme


Hi,

It worked fine a couple of times, and then it went wrong again. 

When I was about to go crazy today, I checked the emails, which I forget to
do during the past one  week, and found some replies from forum users. I
followed the suggestion from Richard to CHANGE THE FONT FROM ROMAN TO TIMES
ROMAN, and then tried dozens of times. Now, I am sure that Richard's
suggestion really works!! Thanks to Richard, and all those who tried to help
me!!

Best
Acme
-- 
View this message in context: 
http://n2.nabble.com/Ugly-output-in-PDF-tp529343p573906.html
Sent from the LyX - Users mailing list archive at Nabble.com.



Re: Converting msword to LyX is ugly!

2008-07-20 Thread Steve Litt
On Sunday 20 July 2008 06:50, Daniel Lohmann wrote:
 On 20.07.2008, at 05:44, Steve Litt wrote:
  On Saturday 19 July 2008 19:57, Typhoon wrote:
  SNIP
 
  This is by far the best solution, in my opinion.
 
  Unfortunately for me, my only Windows machine is a 1997 Pentium
  II/300 with 128MB of RAM, which would be painfully slow.
 
  Steve,
  What happens if you import the RTF file into OO and then follow the
  procedures suggested?
 
  I don't know. I don't trust OO Writer as far as I can throw my
  house. OO
  Writer's not touching my book.
 
  About 2 years ago, during one of my occasional I'm mad at LyX
  months, I
  evaluated OO Writer as book writing software. What I would have lost
  in
  typeset quality, I hoped to gain in faster creation of styles.
  However, OO
  Writer kept changing styles all by itself. It was one of the most
  untrustworthy pieces of software I've ever seen. That gave me an
  incentive to
  learn a lot more about LyX style creation.

 Steve,

 Do not close this door to early. While I can understand very well that
 you actually do not like OO Writer, I think you should give it another
 try -- you do not have to really work with it.

 Even if all that Writer2LaTeX stuff does not work, OO Writer might be
 a good transition format:

 (1) OO Writer preserves the structure of styles when importing from
 Word (AFAIK).
 (2) OO uses an XML-based document format (zips them on disk, but you
 can just use a common unzip tool to get the actual content)

 The XLM-based representation is for sure a better source for script-
 based / structure-preserving transformation than RTF.

Thanks Daniel,

That's a good idea. If I weren't half way though the conversion I'd evaluate 
it.

Unfortunately, OO Writer's XML structure is complex and difficult. There are 
something like 6 files, and if you tweak one it's likely you'll never get the 
thing to work with OO Writer again. Of course that doesn't preclude parsing 
its XML, but when XML is that touchy, it's all too easy to lose something.

XML is getting really hip these days, but from my perspective, the huge number 
of interdependencies make it very hard to tweak. I know modern versions of 
LyX are XML native -- I hope LyX native format never becomes complex like OO.

Thanks

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US



Re: .kmap ortography

2008-07-20 Thread Pavel Sanda
 I just want to write this lines
 
 \kmap  ??
 \kmap  ??
 
 in my personal.kmap file to have a chevrons or guillemets marks (I use
 also double quotes)

at worst you can alway use key binding instead, i.e. to bind shift+ to
unicode-insert 0x0bb lfun. 

pavel

 But it doesn't work, perhaps due to the mistaken ortography in the ASCII
 file. How to refer to this characters?


Re: Inconsistent indentation behaviour after LyX-Code and Program Listing Inset

2008-07-20 Thread Paul A. Rubin

Jürgen Spitzmüller wrote:



Anyway, I don't think you'll find a working example. As listings fails with 
multibyte glyphs, it will also fail when multibyte glyphs are used in ERT, 
no?


Not according to the documentation.  You can define an escape to LaTeX 
character, and anything bracketed by that character is handed off to 
LaTeX verbatim.  According to the docs, that allows you to put multibyte 
characters in a comment (though apparently _only_ in a comment).


Anyway, I can't find a way to test this here, since I don't have any CJK 
fonts installed and wouldn't know how to use them if I did.  If this is 
an issue, we'll find out when someone barks about it.  Until then, I'm 
not sure it's worth worrying about.


/Paul



Converting msword to LyX: Lessons learned so far

2008-07-20 Thread Steve Litt
Hi all,

One way or another, within the text of the .doc file I've written tags for the 
following:

* The whole heading hierarchy
* Major (and all home grown) paragraph styles
* Major (and all home grown) character styles
* Lists, both numbered and unnumbered
* Markers for graphics, summarizing what they are
* Markers for tables, telling how many columns and what kind of header
* Markers for boxes

At this point I think I have a fighting chance of exporting to text, 
converting to LyX, and then doing the final patchups within LyX itself. 
Dirty? Yes. Ugly? Yes. Necessary? Yes.

It turns out Mr. Always Use Styles didn't always use styles, and sometimes 
applied different styles for the same conceptual uses. This wasn't all the 
fault of the Steve Litt who existed in 1999 -- some of it was MS Word 
silliness. Without the LaTeX back end, I had to fine tune stuff to prevent 
page breaking and the like. Lists were sometimes special environments but 
sometimes Normal.

In the past I've told people it's just fine to create mail order books in MS 
Word. After going through that document I no longer feel that way. MS Word 
has too many gotchas requiring fine tuning. It's not much better than OO 
Writer.

WordPerfect 5.1 was another matter entirely. It was a professional product way 
beyond its time. However, the one book I have in WordPerfect 5.1 is 18 years 
old and I doubt there will be a second edition.

Anyway, the work I did today convinced me that solving this programatically 
would have been futile, and it would have taken a long time to learn it was 
futile. Next week I'll try to convert my tagged-up text file to LyX, and then 
start the (massive) cleanup. Then I'll save to yet another file and begin 
making the changes that will result in the second edition.

By the way, if I ever write a second edition of Troubleshooting Techniques of 
the Successful Technologist, I'll need to convert all my uses of LyX color 
based character styles (Dekl Tsur's pre-characterstyle workaround) to 
modern character styles. That should be a laugh a minute :-)

Thanks

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US



Re: Converting msword to LyX: Lessons learned so far

2008-07-20 Thread Richard heck

Steve Litt wrote:
By the way, if I ever write a second edition of Troubleshooting Techniques of 
the Successful Technologist, I'll need to convert all my uses of LyX color 
based character styles (Dekl Tsur's pre-characterstyle workaround) to 
modern character styles. That should be a laugh a minute :-)


  
I'd bet that wouldn't be too bad. The code in lyx2lyx could be adapted 
to this purpose.


rh



Re: Converting msword to LyX is ugly!

2008-07-20 Thread Nicolás

All that seems like too much work!

I would first try to convert Word to Latex, import into LyX and chechk the result. You will still probably have to do some manual 
adjustment, but they will hopefully be less.


I recently use this application:
http://www.grindeq.com/index.php?p=word2latex

It is not free, but you can download a trail version. If I am not wrong, it works with all the features for a limited period of time. 
Since you only want to do one conversion, it should be enough.


Good luck!

Nicolás

Steve Litt wrote:

Hi all,

I have a 300 page book written in MS Word version 97, and I have to convert it 
to LyX in order to make the second edition.


I'll accept all condolences now :-)

Believe it or not, the MS Word version was written very much what you guys 
would call WYSIWYM. I had styles for everything -- almost no appearance was 
fine tuned. Obviously it's essential that all those styles transfer over into 
the LyX version.


I'll accept all condolences now :-)

So heres what my plan, unless someone else has a better idea.

First, I'll export to RTF.

I'll accept all condolences now :-)

Then in Vim I'll do this:

:%s/}/}\r/g

Now the rtf file will have lines that are somewhat recognizeable as markup.

Next I'll look at the \stylesheet part of the RTF, and make a list of all 
paragraph and character styles, sort of like this:


\fs20 Normal
\s1 heading 1
\s2 heading 2
\cs10 \additive Default Paragraph Font
\s16 myparagraphstyle
\cs17 mycharstyle
\cs18 mycharstyle2

Then, within Vim I'll run substitions so that the text referred to by the 
numbers such as \s2 are prepended with my own tags such as phdr2, and better 
yet that text has a proper ending tag appended. This is not so simple for 
three reasons:


1) There's always a bunch of gobblety gook between the \s2 and the text to 
which it refers, and that must eventually be deleted.


2) There's often gobblety gook before the \s2, and that gobblety gook must 
eventually be deleted.


3) It's MUCH harder to reliably put end tags at the end of the text to which 
it refers. If I don't put end tags, that means I'll have a much harder time 
converting it to LyX.


Next, I'll re-import the rtf into MS Word. What should happen is it re-imports 
the same as it originally was, only now it has my tags. From there I should 
be able to export it to plain text, and use my tags to create the LyX file 
with suitable scripts. Or maybe make scripts to directly manipulate the RTF. 
Of course, for all my custom character and paragraph styles, I'll need to 
create those styles within LyX, in a blank document, before appending the 
actual content.


Then comes the cleanup. Stuff like tables and images won't convert -- I'll 
need to manually do that cleanup and then run at least a rough proofread.


The good news is, because the original document used styles for almost every 
appearance, fine tuning won't be necessary (hooray for styles!).


I'd estimate this to be about a week's job. That's a lot of time, but in the 
end I'll have converted a 300 page book, style for style, from MS Word to 
LyX.


If anyone has a better idea for converting a 300 page MS Word document to LyX, 
style for style and word for word, please let me know.


Thanks

STeveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US






Re: Inconsistent indentation behaviour after LyX-Code and Program Listing Inset

2008-07-20 Thread Jürgen Spitzmüller
Paul A. Rubin wrote:
> If you mean an example for doing a listing in ERT, the OP (Álvaro) had
> one in his original message.  If you mean an example using multibyte
> encoding, 

Yes, I mean the latter.

> I don't think so -- the closest I come to a "foreign" language 
> is some long-forgotten German, and that's still single byte, isn't it?

It is. I LyX, the only multibyte encodings besides utf8 are the CJK encodings 
(EUC-JP, BIG5, etc.).

Anyway, I don't think you'll find a working example. As listings fails with 
multibyte glyphs, it will also fail when multibyte glyphs are used in ERT, 
no?

Jürgen


Re: Converting msword to LyX is ugly!

2008-07-20 Thread cmiramon
Steve Litt wrote:
> It would have been wonderful. Unfortunately, writer2latex preserves the
> level class hierarchy (level1->part, level2->chapter, etc) but it dumps
> all my custom made classes and does its best to reproduce them with fine
> tuning. This is the second tool that's tried to do me the "favor" of
> converting my styles to fine tuning.
> 

You can add your custom styles to the writer2latex configuration files. It
is explained here :
http://www.hj-gym.dk/~hj/writer2latex/doc/user-manual4.html#toc10

Globally what you have to do is to create a custom configuration file where
you :
1) give the writer2latex options to take away most of the wysiwyg stuff
(options formatting, and page_formatting) but leave the italic/bold etc...
2) create mapping for all your styles

Then :  
3) convert the file with writer2latex
4) clean the latex file. I have a sed script to do it but you can do it in
your favorite vim.
5) Create a custom layout in LyX
5) import it in LyX with your layout.

I use this workflow to convert old articles from MsWord to LyX and it works
well. 

Cheers,
Charles



Re: Converting msword to LyX is ugly!

2008-07-20 Thread Daniel Lohmann


On 20.07.2008, at 05:44, Steve Litt wrote:


On Saturday 19 July 2008 19:57, Typhoon wrote:




This is by far the best solution, in my opinion.

Unfortunately for me, my only Windows machine is a 1997 Pentium
II/300 with 128MB of RAM, which would be painfully slow.


Steve,
What happens if you import the RTF file into OO and then follow the
procedures suggested?


I don't know. I don't trust OO Writer as far as I can throw my  
house. OO

Writer's not touching my book.

About 2 years ago, during one of my occasional "I'm mad at LyX"  
months, I
evaluated OO Writer as book writing software. What I would have lost  
in
typeset quality, I hoped to gain in faster creation of styles.  
However, OO

Writer kept changing styles all by itself. It was one of the most
untrustworthy pieces of software I've ever seen. That gave me an  
incentive to

learn a lot more about LyX style creation.


Steve,

Do not close this door to early. While I can understand very well that  
you actually do not like OO Writer, I think you should give it another  
try -- you do not have to really work with it.


Even if all that Writer2LaTeX stuff does not work, OO Writer might be  
a good transition format:


(1) OO Writer preserves the structure of styles when importing from  
Word (AFAIK).
(2) OO uses an XML-based document format (zips them on disk, but you  
can just use a common unzip tool to get the actual content)


The XLM-based representation is for sure a better source for script- 
based / structure-preserving transformation than RTF.



Daniel 
 


Re: More on 1.6 beta4 crashing on Ubuntu

2008-07-20 Thread Michael Beckmann

Hi Pandita

your document did not cause any problems on my computer, however, since 
the bug you found seems to be reproducible under certain circumstances 
it'll probably be fixed in one of the next releases.
If you are in the need to work with lyx in the meantime I suggest that 
you compile and install the last stable version.


cheers
Michael



[EMAIL PROTECTED] wrote:

Hi Michael and all list members

I posted the following question to the list:

"I have just compiled Lyx 1.6 beta4 on Ubuntu (8.04) and installed it. 
When I tried to open my Lyx documents, one document is constantly 
crashing when I click on the title in the document (very strange).  Can 
someone tell me how to fix it?"


Then Michael asked me "Could you run lyx in the terminal and post the 
crash/error output?" I followed his advice and I got the following 
terminal output:


CoordCache.cpp(39): break on pointer: 0x8bb1640 hint: x size: 4
lassert.cpp(21): ASSERTION false VIOLATED IN CoordCache.cpp:40
Assertion triggered in void lyx::doAssert(const char*, const char*, long
int) by failing check "false" in file lassert.cpp:23
Aborted

Then Michael wrote:

I'm not sure what this actually means, maybe somebody else has an idea.

Can you provide the document as Pavel suggested? Does the error
occur only with this document or with every (even newly created) file?

Please remember to reply to all recipients (i.e
lyx-users@lists.lyx.org ) when
answering emails in the userlist, otherwise its just me reading it
and I'm not really an expert :-)


So I have attached my document herewith. Really hope somebody kindly helps.

Thanking in advance

Ven. Pandita


Re: export to latex(plain) not working in lyx1.6.0Beta4

2008-07-20 Thread Olivier Ripoll

Abdelrazak Younes wrote:

Olivier Ripoll wrote:

Abdelrazak Younes wrote:


[...]


I have by the way no problem to export to pdf (pdflatex or ps2pdf) on
Windows.


Olivier,

Could you please look at http://bugzilla.lyx.org/show_bug.cgi?id=4693
There is a question for you.

Thanks in advance,
Abdel.


Abdel,

I tried this morning to do what Uwe asked in the bug (deleting my 
"Application Data\lyx16" directory). After that is done, I cannot 
export to pdf, indeed.
When I uninstalled the beta3, I chose not to delete the preferences 
(there is a checkbox in Uwe's uninstaller for that), so it probably 
explains why I could export fine with beta4.
I read the bug 4693 yesterday evening but only tried today, and 
unfortunately, today, lyx bugzilla cannot be accessed, thus I cannot 
answer in the bug. That's why I am answering here in the list.


Best regards,

Olivier



Re: Ugly output in PDF

2008-07-20 Thread Acme


Hi,

It worked fine a couple of times, and then it went wrong again. 

When I was about to go crazy today, I checked the emails, which I forget to
do during the past one  week, and found some replies from forum users. I
followed the suggestion from Richard to CHANGE THE FONT FROM ROMAN TO TIMES
ROMAN, and then tried dozens of times. Now, I am sure that Richard's
suggestion really works!! Thanks to Richard, and all those who tried to help
me!!

Best
Acme
-- 
View this message in context: 
http://n2.nabble.com/Ugly-output-in-PDF-tp529343p573906.html
Sent from the LyX - Users mailing list archive at Nabble.com.



Re: Converting msword to LyX is ugly!

2008-07-20 Thread Steve Litt
On Sunday 20 July 2008 06:50, Daniel Lohmann wrote:
> On 20.07.2008, at 05:44, Steve Litt wrote:
> > On Saturday 19 July 2008 19:57, Typhoon wrote:
> >> 
> >>
> >>> This is by far the best solution, in my opinion.
> >>>
> >>> Unfortunately for me, my only Windows machine is a 1997 Pentium
> >>> II/300 with 128MB of RAM, which would be painfully slow.
> >>
> >> Steve,
> >> What happens if you import the RTF file into OO and then follow the
> >> procedures suggested?
> >
> > I don't know. I don't trust OO Writer as far as I can throw my
> > house. OO
> > Writer's not touching my book.
> >
> > About 2 years ago, during one of my occasional "I'm mad at LyX"
> > months, I
> > evaluated OO Writer as book writing software. What I would have lost
> > in
> > typeset quality, I hoped to gain in faster creation of styles.
> > However, OO
> > Writer kept changing styles all by itself. It was one of the most
> > untrustworthy pieces of software I've ever seen. That gave me an
> > incentive to
> > learn a lot more about LyX style creation.
>
> Steve,
>
> Do not close this door to early. While I can understand very well that
> you actually do not like OO Writer, I think you should give it another
> try -- you do not have to really work with it.
>
> Even if all that Writer2LaTeX stuff does not work, OO Writer might be
> a good transition format:
>
> (1) OO Writer preserves the structure of styles when importing from
> Word (AFAIK).
> (2) OO uses an XML-based document format (zips them on disk, but you
> can just use a common unzip tool to get the actual content)
>
> The XLM-based representation is for sure a better source for script-
> based / structure-preserving transformation than RTF.

Thanks Daniel,

That's a good idea. If I weren't half way though the conversion I'd evaluate 
it.

Unfortunately, OO Writer's XML structure is complex and difficult. There are 
something like 6 files, and if you tweak one it's likely you'll never get the 
thing to work with OO Writer again. Of course that doesn't preclude parsing 
its XML, but when XML is that touchy, it's all too easy to lose something.

XML is getting really hip these days, but from my perspective, the huge number 
of interdependencies make it very hard to tweak. I know modern versions of 
LyX are XML native -- I hope LyX native format never becomes complex like OO.

Thanks

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US



Re: .kmap ortography

2008-07-20 Thread Pavel Sanda
> I just want to write this lines
> 
> \kmap < ??
> \kmap > ??
> 
> in my personal.kmap file to have a "chevrons" or "guillemets" marks (I use
> also double quotes)

at worst you can alway use key binding instead, i.e. to bind shift+> to
unicode-insert 0x0bb lfun. 

pavel

> But it doesn't work, perhaps due to the mistaken ortography in the ASCII
> file. How to refer to this characters?


Re: Inconsistent indentation behaviour after LyX-Code and Program Listing Inset

2008-07-20 Thread Paul A. Rubin

Jürgen Spitzmüller wrote:



Anyway, I don't think you'll find a working example. As listings fails with 
multibyte glyphs, it will also fail when multibyte glyphs are used in ERT, 
no?


Not according to the documentation.  You can define an "escape to LaTeX" 
character, and anything bracketed by that character is handed off to 
LaTeX verbatim.  According to the docs, that allows you to put multibyte 
characters in a comment (though apparently _only_ in a comment).


Anyway, I can't find a way to test this here, since I don't have any CJK 
fonts installed and wouldn't know how to use them if I did.  If this is 
an issue, we'll find out when someone barks about it.  Until then, I'm 
not sure it's worth worrying about.


/Paul



Converting msword to LyX: Lessons learned so far

2008-07-20 Thread Steve Litt
Hi all,

One way or another, within the text of the .doc file I've written tags for the 
following:

* The whole heading hierarchy
* Major (and all home grown) paragraph styles
* Major (and all home grown) character styles
* Lists, both numbered and unnumbered
* Markers for graphics, summarizing what they are
* Markers for tables, telling how many columns and what kind of header
* Markers for boxes

At this point I think I have a fighting chance of exporting to text, 
converting to LyX, and then doing the final patchups within LyX itself. 
Dirty? Yes. Ugly? Yes. Necessary? Yes.

It turns out Mr. Always Use Styles didn't always use styles, and sometimes 
applied different styles for the same conceptual uses. This wasn't all the 
fault of the Steve Litt who existed in 1999 -- some of it was MS Word 
silliness. Without the LaTeX back end, I had to fine tune stuff to prevent 
page breaking and the like. Lists were sometimes special environments but 
sometimes Normal.

In the past I've told people it's just fine to create mail order books in MS 
Word. After going through that document I no longer feel that way. MS Word 
has too many gotchas requiring fine tuning. It's not much better than OO 
Writer.

WordPerfect 5.1 was another matter entirely. It was a professional product way 
beyond its time. However, the one book I have in WordPerfect 5.1 is 18 years 
old and I doubt there will be a second edition.

Anyway, the work I did today convinced me that solving this programatically 
would have been futile, and it would have taken a long time to learn it was 
futile. Next week I'll try to convert my tagged-up text file to LyX, and then 
start the (massive) cleanup. Then I'll save to yet another file and begin 
making the changes that will result in the second edition.

By the way, if I ever write a second edition of "Troubleshooting Techniques of 
the Successful Technologist", I'll need to convert all my uses of LyX color 
based "character styles" (Dekl Tsur's pre-characterstyle workaround) to 
modern character styles. That should be a laugh a minute :-)

Thanks

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US



Re: Converting msword to LyX: Lessons learned so far

2008-07-20 Thread Richard heck

Steve Litt wrote:
By the way, if I ever write a second edition of "Troubleshooting Techniques of 
the Successful Technologist", I'll need to convert all my uses of LyX color 
based "character styles" (Dekl Tsur's pre-characterstyle workaround) to 
modern character styles. That should be a laugh a minute :-)


  
I'd bet that wouldn't be too bad. The code in lyx2lyx could be adapted 
to this purpose.


rh