Just thought I'd share a few things I've found out in the course of my
intensive LyX investigations...

If you want to import plain text (Import->ASCII) into a new document,
here's a way that preserves a bit more formatting information: convert
it to HTML first.  There are a bunch of text->HTML converters that do a
pretty good job of detecting headers and sometimes *italics* and
_underlines_ too.
(Do a google search for text HTML convert <http://www.google.com>)

Me, personally I use htmlpp from Imatix <http://www.imatix.com/> (in
"guru mode") though they don't seem to be actively maintaining it any
more, it's been at version 4.2a for years.  (However, since it's a perl
script, and allowed to be modified, I've hacked my version to recognise
*italics*, _underline_ and ^bold^...)  But htmlpp is more than just a
text->HTML converter, so it would probably be more than what most people
want.

Anyway, the next thing you need to get is a HTML->LaTeX converter.
There are two of them out there (if you go and do a google search for
html2latex) -- one of them is a C program, the other one is a perl
script which uses a number of perl modules.  The perl script is better.
You will have to download the perl modules from CPAN if you don't have
them, but using the CPAN module that comes with most perl distribs makes
it all easy...

Then, how to add these to LyX after you have installed them on your
machine?  Use the Edit->Preferences -->Converters window.
- add a new format ASCII(formatted) (take the ASCII(paragraphs) entry as
  a model)
- add two more conversions:
  - ASCII(formatted) -> HTML
    For the converter, put the text->HTML converter, with the suitable
    arguments, and $$i for the input filename and $$o for the output
    filename if you need one.
  - HTML -> LaTeX
    For the converter, put html2latex $$i

When you restart LyX, there should be two more entries on the Import
menu -- ASCII(formatted) and HTML.

I like LyX!

Kathryn Andersen
-=-=-=-=-=-=-=-=-
Tron: How'd you do that?
Flynn: Elementary physics - a beam of energy can always be diverted.
        Are we there yet mommy?                 (Tron)
-- 
 _--_|\     | Kathryn Andersen          <[EMAIL PROTECTED]>
/      \    |   <http://www.katspace.com>
\_.--.*/    |   
      v     | #include "standard/disclaimer.h"
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |   -> Earth -> Sol -> Milky Way Galaxy -> Universe

Reply via email to