## Monday, June 25, 2012

### Using Elyxer to convert from Lyx to html

To create a html version of my thesis, I found Elyxer to be extremely convenient. I believe the only steps were as follows:
2. In a terminal, run
cd elyxer-1.2.3/
sudo ./install.py
3. If you used \emph{<species name>} in your .bib file, see NOTE below.
4. Go to the directory containing your lyx document (here I use "document.lyx") and create a subdirectory for elyxer to save output images (I used htmlImages).
5. In a terminal, run
elyxer.py --destdirectory "htmlImages" --title "<title of html page>" document.lyx <name of the output>.html
6. Move the html file to the destination directory.
7. Double click the html file to view a nicely formatted and linked version of your lyx file!
NOTE: Elyxer cannot handle \emph{...} in the bibtex bibliography files. It was a bit of a pain to fix this, as the output html file eliminates the second }, making searching and replacing with <i> and </i> tags impossible. To overcome this, I followed these steps:
1. Download the plugin for regular expression search and replace using gedit from here:
2. Move those files to ~/.gnome2/gedit/plugins/ :
cd .gnome2/gedit/
mkdir plugins
cd plugins/
mv /home/peter/Downloads/regex_replace.gedit-plugin ./