Til startsiden
    Studier   Studentsider   Om høgskolen   Kontakt oss Søk i vår web   English web   Printer friendly  
 
     Til startsiden
 
 
 

Using the LaTeX template with LyX

Important things to remember:

  • Use the same name for your BibTeX file as for the report itself. If the report is called mastersthesis.lyx, name the BibTeX file mastersthesis.bib.
  • Use the layout "report" when writing your report in LyX, (Layout/Document->Document class).

Approach:

When the final report is to be produced, export the document to LaTeX (File/Export/LaTeX).

Now you need to edit the .tex file itself. The first part of your file will look somewhat like this:

%% LyX 1.3 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[a4paper,english]{report}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\newenvironment{lyxcode}
{\begin{list}{}{
\setlength{\rightmargin}{\leftmargin}
\setlength{\listparindent}{0pt}% needed for AMS classes
\raggedright
\setlength{\itemsep}{0pt}
\setlength{\parsep}{0pt}
\normalfont\ttfamily}%
\item[]}
{\end{list}}

\usepackage{babel}
\makeatother
\begin{document}

\title{Web based annotations\\
Taking the web from an information publishing platform to an interactive
learning environment}


\author{Øivind Kolloen}

\maketitle

This must be altered to something like this (alterations are emphasised):

%% LyX 1.3 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[a4paper,english]{gucmasterthesis}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\newenvironment{lyxcode}
{\begin{list}{}{
\setlength{\rightmargin}{\leftmargin}
\setlength{\listparindent}{0pt}% needed for AMS classes
\raggedright
\setlength{\itemsep}{0pt}
\setlength{\parsep}{0pt}
\normalfont\ttfamily}%
\item[]}
{\end{list}}

\usepackage{babel}
\makeatother
\begin{document}

\thesistitle{Web based annotations\\
Taking the web from an information publishing platform to an interactive
learning environment}

\thesisauthor{Xivind Kolloen}
\thesisdate{\gucmasterthesisdate}

\thesistitlepage

Further down in your .tex file you will also find the lines:
\bibliographystyle{plain}
\bibliography{mastersthesis}
("mastersthesis" will be replaced by the name of your BibTeX file).

Change \bibliographystyle{plain} to \bibliographystyle{gucmasterthesis}

These are all the changes you need to do in the .tex file.

You are now ready to create the pdf file. Run LaTeX once at first to prepare the bibliography to be created, using the command latex:
latex mastersthesis.tex
Then run BibTeX to create the bibliography, and run LaTeX twice more to update the internal references and to create the final version.

You now have a dvi version of your report. To create a pdf version, you use the command dvipdf:
dvipdf mastersthesis.dvi

You will now have a new file named mastersthesis.pdf containing the pdf version of your report.

Remember: You should use the LyX built-in viewing of the document for document control when writing.

Also remember: Do NOT leave this to the last day before deadline, try to do it a few times, as things can go wrong!

 

© Høgskolen i Gjøvik,
Postboks 191, Teknologivn. 22, 2815 Gjøvik, Tlf. 61135100, Faks 61135170,  E-post: postmottak@hig.no
Ved spørsmål eller kommentarer til HiG sin web, kontakt webredaksjonen
Ansvarlig for siden Øivind Kolloen, Administrator, siden ble sist oppdatert 10/08-2005 09:35:36