LaTeX forum ⇒ LyXImport .tex in LyX

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
NewToLyX
Posts: 2
Joined: Sun Sep 16, 2012 10:47 pm

Import .tex in LyX

Postby NewToLyX » Sun Sep 16, 2012 11:01 pm

Hi, I am a new user to LaTeX and I am trying to write a thesis using LyX.
I have a thesis template in .tex format. When I import it in LyX and compile it, it does not work. LyX stops working. Any Suggestion ? The template when opened in LyX looks like this

  1. % SAMPLE FRONT MATTER: \graduationmonth{December} \graduationyear{2003} \defensedate{November 15, 2003}
  2.  
  3. JAY VICTOR SMITH
  4.  
  5. \committee{Vasant K. Prabhu}{Jonathan Bredow}{Jung-Chih Chiao}{Sajal K. Das}{Harold Sobol}
  6.  
  7. COMPARATIVE ANALYSIS OF PARTIALLY COHERENT AND DIFFERENTIALLY COHERENT PSK SYSTEMS WITH FADING AND COCHANNEL INTEREFERENCE
  8.  
  9. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% title page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  10.  
  11. \titlepage
  12.  
  13. % If submitting electronically, the signature page should not be included.% You should then comment out the line that produces the signature page and% move the title page up here so that it appears first.% added by Darin Brezeale, Fri Jan 11 10:29:12 CST 2008% \signaturepageMs% \signaturepagePhD%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% copyright page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  14.  
  15. \copyrightpage
  16.  
  17. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Dedication page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\thispagestyle{empty}
  18.  
  19.  
  20.  
  21. To my mother Sari and my uncle Luis Alfredo (my father figure)
  22.  
  23. who set the example and who made me who I am.
  24.  
  25.  
  26.  
  27. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% acknowledgements %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  28.  
  29. \begin{acknowledgements}
  30.  
  31. acknowledge.tex
  32.  
  33. \end{acknowledgements} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% abstract %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  34.  
  35. Abstract abstract.tex
  36.  
  37. Abstract \indent
  38.  
  39. \addtocontents{toc}{\mbox{Chapter} \mbox{Page}}%\addtocontents{toc}{\noindent\mbox{Chapter}}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% First and Following Chapters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \input macros.tex % file containing author's macro definitionschap1.tex % file containing Chapter 2 contentschap2.tex % file containing Chapter 2 contents%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Appendices %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  40.  
  41. %dummy comment inserted by tex2lyx to ensure that this paragraph is not empty% \chapter{FIRST APPENDIX NAME}
  42.  
  43. Appendix A JENSEN'S INEQUALITY FOR CONVEX FUNCTIONS
  44.  
  45. appA.tex % file with Appendix A contents
  46.  
  47. Appendix B UPPER BOUNDS ON MOMENTS
  48.  
  49. appB.tex % file with Appendix B contents%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Bibliography %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  50.  
  51. %\bibliographystyle{plain}%\bibliography{test}%\bibliography{alpha} % use IEEEtran.bst style%\nocite{*} % list all refs in database, cited or not%bibliography{refs} % bib database file refs.bib
  52.  
  53. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Biographical Statement %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\thebiography biography.tex

insipidtoast
Posts: 128
Joined: Wed Jul 04, 2012 5:34 pm

Postby insipidtoast » Mon Sep 17, 2012 12:06 am

Did you use the
  1. \include{filename}
command as an ERT at the location you want that file to be inserted?

You might also need to copy and paste whatever you had in the preamble in the other document.
FYI:
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class

NewToLyX
Posts: 2
Joined: Sun Sep 16, 2012 10:47 pm

Postby NewToLyX » Mon Sep 17, 2012 12:14 am

I have no idea what you just said. I just started looking at LaTeX today itself.
But I will try to explain the problem.
I downloaded the standard template of my thesis from the school website.
It has lot of different chapters like appendix, abstract, index and so on.
And the main file which compiles all those chapters. I opened that file in LyX and posted in my previous thread. When I try to compile it, LyX stops working.
So is there anything I need to change in that file ?

insipidtoast
Posts: 128
Joined: Wed Jul 04, 2012 5:34 pm

Postby insipidtoast » Mon Sep 17, 2012 12:22 am

Well, I'm pretty new, so I would just recommend reading a tutorial and hoping that someone more experienced responds to you.
FYI:
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class

insipidtoast
Posts: 128
Joined: Wed Jul 04, 2012 5:34 pm

Postby insipidtoast » Sun Sep 23, 2012 1:29 am

Actually it appears that that ERT code I showed you above does not work in lyx. That was a code from a latex2e tutorial. Sometimes Latex doesn't cross over to lyx.

Did you figure out how to add another document to the one you're working on? I haven't been able to figure it out yet.

*Edit: Did you go insert-file-child document? That's how to get .lyx documents inserted as part of the main document.
FYI:
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class


Return to “LyX”

Who is online

Users browsing this forum: No registered users and 3 guests