3

I am trying to get the TeX template of my university into my LyX where I have written my thesis already before trying this and I am freaking out.

The full template can be retrieved from https://www2.vmi.ei.tum.de/templates/; I use thesis-current-utf8.zip.

By copying the sources to the user folder, etc.

I can choose the document style article (tum) and with slight modifications of tum.cls as removing the hyperref part which does not work with LyX. I still need to somehow import the frontpage.tex file which is quite complicated (see below).

I cannot import this file to LyX though. It gives me a lot of

Undefined Control Sequence

errors.

Maybe you can try import the TeX file below and display it and tell me what is wrong. Don't mind the pictures or go with the download link. It would be really great since I am working already a week on this!

\RestoreLanguage
\ifthenelse{\equal{\MyType}{PhD}}{%
\GeneratePhDHead\\[8ex]
%%--------------------Dissertations-Deckblatt----------------------------------------------------
\onehalfspacing
{\centering
\color{tumblue}{\huge\bf{\insertTitle \par \parindent 0pt }}
}
\vspace{2cm}
\begin{center}
{\Large{\bf{\insertAuthor}}}\\[6ex]
Vollständiger Abdruck der von der Fakultät für Elektrotechnik und Informationstechnik der Technischen Universität München zur Erlangung des akademischen Grades eines\\[3ex]
\textbf{Doktor-Ingenieurs (Dr.-Ing.)}\\[3ex]
genehmigten Dissertation.
\end{center}
\vfill
{\begin{tabular}{ll}
Vorsitzender                    & \insertVorsitzender \\[1ex]
Prüfer der Disseration:         & 1. \insertProfessorFirst \\
                                & 2. \insertProfessorSecond 
\end{tabular}}\\[6ex]
{Die Disseration wurde am \insertDateEnd\ bei der Technischen Universität München eingereicht und durch die Fakultät für Elektrotechnik und Informationstechnik am \insertDateBegin\ angenommen.}\\
\cleardoublepage
%%-------------------Ende Dissertation Deckblatt----------------------------
}{%
%%-------------------Studienarbeiten Deckblatt und erste Seiten----------------------------
%
\GenerateHead
\\[8ex]
%---------------------------------Thema und Autor--------------------------------
\onehalfspacing
%%%%%%%%%%%%%%
%{\color{tumblue}{\huge\bf{\insertTitle\par\ }}}\\[5ex]
%print1
%{\color{tumblue}{\huge\bf{\insertFirstTitle }}} \\[3ex] %\par\ %\parindent 0pt
%{\color{tumblue}{\huge\bf{\insertSecondTitle\par\ }}} \\[5ex]
%print2
%{\color{tumblue}{\huge\bf{\insertFirstTitle \par\ }}} \\[0ex] % %
%{\color{tumblue}{\Large\bf{\insertSecondTitle\par\ }}} \\[5ex]
%print3
%{\color{tumblue}{\huge\bf{\insertFirstTitle \par \parindent 0pt }}} %\\[0ex] % %
%{\color{tumblue}{\Large\bf{\insertSecondTitle\par\ }}} \\[5ex]
%print4
%{\color{tumblue}{\huge\bf{\insertFirstTitle }}} \\[4ex] 
%{\color{tumblue}{\huge\bf{\insertSecondTitle\par\ }}} \\[5ex]
%print5
{\color{tumblue}{\huge\textbf{\insertFirstTitle \par \parindent 0pt }}} \vspace{0.75\baselineskip}
{\color{tumblue}{\LARGE\textbf{\insertSecondTitle\par\ }}} \\[5ex]

{\Large{\bf{\insertAuthor}}}\\[3ex]
{\Large{{\insertType}}}\\[5ex]
\ \\
\vfill
%-----------------------------weitere Angaben -----------------------------------
\SelectByReport{%
\begin{tabular}{ll}
\intlAuthor:                   & \insertTableAuthor \\
\intlGroup:                    & \insertGroup \\
\intlProfessor: \hspace*{2cm}  & \insertProfessor \\
\intlAdvisor:                  & \insertAdvisor \\
\intlSemester:                 & \insertSemester \\
\intlDateEnd:                  & \insertDateEnd 
\end{tabular}}
{%
\begin{tabular}{ll}
\intlAuthor:                   & \insertTableAuthor \\
\intlLocation:                 & \insertStreet \\
                               & \insertTown \\
\intlNumber:                   & \insertMatrikelNr \\
\intlProfessor: \hspace*{2cm}  & \insertProfessor \\
\intlAdvisor:                  & \insertAdvisor \\
\intlDateStart:                & \insertDateBegin \\
\intlDateEnd:                  & \insertDateEnd 
\end{tabular}}

\cleardoublepage
%-----------------------
%echwechgema an mengen clearpage baigesaat

\SelectIfPartner{%
\GenerateHead
\ \\[-2ex]
% %------------------------- Beteiligte Organisationen -----------------
\singlespacing\noindent%%%%%%%%%%%%%%%
{\color{tumblue}{\huge\bf{\intlOrgans}}}\\

\parbox[c]{2.5cm}{\includegraphics{\insertInstituteLogo}}
\parbox[c]{13.5cm}{\insertFullAddress}
\ \\[5ex]%
\parbox[c]{2.5cm}{ \includegraphics[height=1cm]{\insertIPLogo}}
\parbox[c]{13.5cm}{\insertFullIPAddress}
\\[5ex]\par
% %------------------------- Eidesstattliche Erklaerung -----------------
{\color{tumblue}{\huge\bf{\intlStatement}}}\\[5ex]
\SelectByLanguage{I declare under penalty of perjury, that I wrote this \insertType\ entitled}
{Hiermit erkl\"are ich an Eides statt, dass ich diese \insertType\ zum Thema}\\[3ex]
{\color{tumblue}{\bf{\insertTitle}}}
\\[3ex]
\SelectByLanguage{by myself and that I used no other than the specified sources and tools.}
{selbstst\"andig verfasst und keine anderen als die angegebenen Quellen und Hilfsmittel verwendet habe.}
\\[7ex]
\SelectByLanguage{\insertUniSmallTown, \today}{\insertUniSmallTown, den \insertDateEnd}\\[-6ex]
\begin{flushright}{\rule{7cm}{0.5pt}}\\{\footnotesize{\insertAuthor}}\end{flushright}
\ \\[-8ex]\\\vfill\noindent
\insertAuthor\\
\insertStreet \\
\insertTown \\
\clearpage
%%%%%%%%%%%%%%%%%%
\onehalfspacing
}{%
\GenerateHead
\ \\[4ex]
% %------------------------- Beteiligte Organisationen -----------------
\singlespacing\noindent%%%%%%%%%%%%%%%
\ \\[20ex]%
% %------------------------- Eidesstattliche Erklaerung -----------------
{\color{tumblue}{\huge\bf{\intlStatement}}}\\[5ex]
\SelectByLanguage{I declare under penalty of perjury that I wrote this \insertType\ entitled}
{Hiermit erkl\"are ich an Eides statt, dass ich diese \insertType\ zum Thema}\\[3ex]
{\color{tumblue}{\bf{\insertTitle}}}
\\[3ex]
\SelectByLanguage{by myself and that I used no other than the specified sources and tools.}
{selbstst\"andig verfasst und keine anderen als die angegebenen Quellen und Hilfsmittel verwendet habe.}
\\[7ex]
\SelectByLanguage{\insertUniSmallTown, \today}{\insertUniSmallTown, den \insertDateEnd}\\[-6ex]
\begin{flushright}{\rule{7cm}{0.5pt}}\\{\footnotesize{\insertAuthor}}\end{flushright}
\ \\\vfill\noindent
\insertAuthor\\
\insertStreet \\
\insertTown \\
\clearpage
%%%%%%%%%%%%%%%%%%
\onehalfspacing
}
\cleardoublepage
%%----------------Ende Studienarbeiten Deckblatt und erste Seiten------------------%
}
1
  • If you don't get a response here, you might have better luck emailing lyx-users@lists.lyx.org
    – scottkosty
    Apr 4 '13 at 7:10
1

In general, instead of importing a ".tex" file like "frontpage.tex" into LyX, it is also possible to include a ".tex" file as a child document.

Let us look at the LaTeX situation here. There is the main file "thesis.tex" using document class "tum.cls", indirectly defining several macros via \Define...., and including the file "frontpage.tex" via \input. Hence, to get the frontpage quickly into a LyX document

  1. we copy the class style file "tum.cls" into the LaTeX Preamble and remove lines (or make them comments) that are connected to the document class (e.g., \ProvidesClass, \LoadClass, \DeclareOption, ...) and also remove packages (\usepackage) that are otherwise provided by LyX.

  2. we copy the setup by the \Define... macros from the main file "thesis.tex" to the end of the LaTeX Preamble, i.e.,

    \DefineType{Diplom}
      ...
    \DefineIPLogo{logos/FG_VMI_RGB}
    

    (and, of course, set correct values.)

  3. we include "frontpage.tex" as child document with the include type "Input" into LyX ("Insert > File > Child Document...").

Furthermore, if the document class "article (tum)", which is not in a standard LyX distribution, translates to the LaTeX class "article" then it seems to be the wrong choice. The class "tum.cls" is based on the class "scrreprt". That corresponds to "report (KOMA-Script)" in LyX.

Finally, to compile and view the LyX document we use "View PDF (pdflatex)" (as pdflatex is used by the tum template).

(BTW, for this situation it would make sense to create a LyX layout file. More information about this can be found in the LyX menu "Help > Customization" in Chapter "Installing New Document Classes".)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.