Friday, 7 December 2012

Lyx 2.0 (LaTeX): How to export from Lyx (2.0.5 Win7) to MS Office (2010)

Lyx 2.0 (LaTeX): How to export from Lyx (2.0.5 Win7) to MS Office (2010)

I assume you've Phyton 2.7 and Elyxer installed (they should be installed by default).

1# Go to Lyx Preferences/File Handling/File Formats: Choose "HTML (Word)"
Set active: "Document format", "Show in export menu"
Choose Short Name: "wordhtml"
Choose Extension: "html"
Set Editor and Viewer: "None"  (or a program of choice)
Copier: "python -tt $$s/scripts/ext_copy.py -e html,png,jpg,jpeg,css $$i $$o" (Without " ")
Set Output Format: "PDF (pdflatex)".

2#Switch to Entry "Converters", Choose "Lyx->HTML (MS Word)"
Set From format: "Lyx" and To format: "HTML (MS Word)"
Write in "Converter": "python -m elyxer --html --directory $$r $$i $$o"  (Without " ")
Enable "Converter File Cache".

3# Now you should be able to export (File/Export/HTML (MS Word)) your document to HTML. (There is a known clash with \xdefinecolor if you have enabled "change tracking" + "show in output" and \definecolor without O_o)

4# The HTML Document can be opened by MS Word and looks quite good. There's only a minimal polishment needed with Hyperlinks and \ce environment.

The file formats settings.

The converter handling options.

Thursday, 6 December 2012

Lyx 2.0 (LaTeX) Nomenclature as numbered chapter/section

Lyx 2.0 (LaTeX): How to set nomenclature as numbered section:


%Nomenclature
\usepackage{nomencl}
\let\abbrev\nomenclature
\renewcommand{\nomname}{Abkürzungsverzeichnis}
\setlength{\nomlabelwidth}{.25\hsize}
\renewcommand{\nomlabel}[1]{#1 \dotfill}
\setlength{\nomitemsep}{-\parsep}
\makenomenclature
%...with number
\usepackage{etoolbox}
\makeatletter
\patchcmd{\idx@@heading}{\chapter*}{\section}{}{}%<= or \chapter*... \chapter
\patchcmd{\thenomenclature}{\chapter*}{\section}{} {}% dito
\makeatother