# How to export yourarticle.lyx from LyX to LaTex ?

I like writing my articles in LyX because of its GUI interface, ease of making tables, equations and their alignment, support to any Image format etc etc.

However, many a times for submitting an article to a Journal (PDFexpress, Elsevier EES, Springer…), LaTex source is required.

LyX can export yourarticles.lyx to yourarticle.tex format, but that wont make it complied to a PDF as it is. The exported yourarticle.tex file needs some modifications.

So here we go,

## In LyX; Exporting yourarticle.lyx to yourarticle.tex

Before start exporting anything: A NEAT way is to make new folder, name it as Latex file or whatever; now copy the lyx file along with all the Figure#.eps and reference.bib file. Now, we are good to begin,

1-      File=> Export => Latex(PDFTex)

2-      The tex file will be generated in the same folder as the base lyx file.

## In LaTex; editing yourarticle.tex

The LaTeX logo, typeset with LaTeX (Photo credit: Wikipedia)

3-      Change the line

\includegraphics[scale=0.1]{\string”path to image/image name\string”.jpg} to

\includegraphics[scale=0.1]{image_name.eps}

There should be no space in the names of the image. All the images need to be in .eps format and are to be placed in the same folder along with yourarticle.tex file

4-      For the bibliography also copy the *.bib file to the same folder and do the following modification in last line of the document (if you have not done this before beginning).

\bibliographystyle{journal bibliography style is mentioned here}

\bibliography{put only the name, delete “.bib”}

5-      Now do {COMPILING Sequence}

Ctrl+Shift+L

Ctrl+Shift+B

Ctrl+Shift+L

Ctrl+Shift+L

This will do the trick and a PDF file can be seen now by clicking dvitopdf icon.

This concludes the LyX to LaTex Conversion, if your facing any issue while using this method or have any suggestion to improve/simplify it, please let me know.

Note1:

Case 1: Reference number Issue:

If the citation are coming as [?] and not as a number then try this…

Add~\cite to the first reference (Note that, there is no space in between

for example  in the tex it is

“like microheater~\cite{deniss}.)

do the  COMPILING SEQUENCE again and see the dvi to pdf output

CASE-2: Figures

For figures, there are few point to keep in mind,

-          If you are using absolute paths, there should not be any space in path of figure

-          In converted yourarticle.tex file look for \includefigure line, specifically

the line

scale=0.3,bb = 0 0 200 100, draft, type=eps

keep only [scale=0.3] remove rest. Other wise images will not appear in the pdf as well as dvi output

Example,

\begin{center}

\begin{figure}

\centering{}\includegraphics[scale=0.3,bb = 0 0 200 100, draft, type=eps]{imagename.png}\caption{your figure caption goes here\label{these are my awesome results}}

\end{figure}

After including the figure, use the COMPILING sequence once again:  And use dvi to pdf  to view the pdf output

Note2: I have noticed that texify;  gives an error “figure.eps not found”; so the solution is to use the compiling sequence  AND  view the dvi to pdf