I can not solve my problem.
I have definition:
\def\mfTitle{askdj asldj asdlk jhasd kjhaslkjd asdas}
and I would like add a newline into it:
\def\mfTitle{askdj asldj asdlk \newline jhasd kjhaslkjd asdas}
but I get an error:
! Undefined control sequence.
\@normalcr ->\let \reserved@e
\relax \let \reserved@f \relax \@ifstar {\let ...
l.20 ...fined\relax\else\pdfinfo{ /Title (\mfTitle
) /Author (\mfAuthor) /Cre...
Is it possible to do it in some easy way? Thanks
EDIT
usage of \mfTitle
:
\documentclass[12pt]{book}
\usepackage{slovak}
\usepackage{epsfig}
\usepackage{color}
\usepackage{url}
\usepackage[utf8]{inputenc}
\renewcommand\baselinestretch{1.3} % riadkovanie jeden a pol
% pekne pokope definujeme potrebne udaje
\def\mftitle{Názov Práce}
\def\mfthesistype{Diplomová alebo neviem aká práca}
\def\mfauthor{Študent Autor}
\def\mfadvisor{Dr. Evorubač, ZLe.Sa.}
\def\mfplacedate{Bratislava, 2008}
\ifx\pdfoutput\undefined\relax\else\pdfinfo{ /Title (\mftitle) /Author (\mfauthor) /Creator (PDFLaTeX) } \fi
\begin{document}
\frontmatter
\thispagestyle{empty}
\noindent
\begin{minipage}{0.20\textwidth}
\includegraphics[width=0.9\textwidth]{komlogo-new}
\end{minipage}
\begin{minipage}{0.79\textwidth}
\begin{center}
\sc asd asdasd \\
asd asd, asd a asd \\
asd asd, asd
\end{center}
\end{minipage}
\vfill
\begin{center}
\begin{minipage}{0.8\textwidth}
\hrule
\bigskip\bigskip
\centerline{\LARGE\sc\mftitle}
\smallskip
\centerline{(\mfthesistype)}
\bigskip
\bigskip
\centerline{\large\sc\mfauthor}
\bigskip\bigskip
\hrule
\end{minipage}
\end{center}
\vfill
{\bf Vedúci:} \mfadvisor
\hfill\mfplacedate
\eject % EOP i
\thispagestyle{empty}~\vfill\eject % EOP ii
{~}\vspace{12cm}
\noindent
\begin{minipage}{0.25\textwidth}~\end{minipage}
\begin{minipage}{0.68\textwidth}
Čestne prehlasujem, že som túto diplomovú prácu vypracoval(a) samostatne s použitím citovaných zdrojov.
\bigskip\bigskip
\hfill\hbox to 6cm{\dotfill}
\end{minipage}
\vfill\eject % EOP iii
~\vfill\eject % EOP iv
\tableofcontents
\mainmatter
\input 01intro.tex
\input 02dalej.tex
\backmatter
\nocite{*}
\bibliographystyle{alpha}
\bibliography{literatura}
\end{document}
Best Answer
First of all you shouldn't be using
\def
, but\newcommand
. The problem is that\newline
makes no sense when passed to\pdfinfo
.In any case you should probably use
\\
rather than\newline
. The idea is the same, though.The
\ifx\pdfoutput\undefined
test is obsolete and won't distinguish between DVI or PDF output. Use\ifpdf
from theifpdf
package instead.Here's a possibly better version of your (really bad) template. The
demo
option tographicx
is just because I don't have your logo; the packageepsfig
is obsolete. Alsoslovak
is obsolete and it's better to go withbabel
. For the info, I usedhyperref
, which knows UTF-8 (with\pdfinfo
you wouldn't get correct results).