Discussion:
Error message "LaTeX Error: no \title given"
winson
2006-09-26 05:24:33 UTC
Permalink
Hello there,

I use LyX 1.42 on Windows XP. I am typing an article
with the attached 'ndst.sty' style file. Each time I
tried to view the article 'Example.lyx' in DVI format,
I got an error message "LaTeX Error: no \title given".
There are only three lines in 'Example.lyx': title,
author, and date. I have not used LaTeX and LyX for a
long time until now. So I am not sure if this is a
problem of 'ndst.sty' or a bug of LyX. Could anyone
give me a little help? Thanks.

Winson

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Juergen Spitzmueller
2006-09-26 06:38:11 UTC
Permalink
Post by winson
I use LyX 1.42 on Windows XP. I am typing an article
with the attached 'ndst.sty' style file. Each time I
tried to view the article 'Example.lyx' in DVI format,
I got an error message "LaTeX Error: no \title given".
There are only three lines in 'Example.lyx': title,
author, and date. I have not used LaTeX and LyX for a
long time until now. So I am not sure if this is a
problem of 'ndst.sty' or a bug of LyX. Could anyone
give me a little help? Thanks.
Your ndst.sty redefines \title, \author etc. to be used _without_ the
\maketitle command. This interferes with article.cls when LyX inserts the
\maketitle command.

Two solutions:

1. quick and dirty:
insert
\renewcommand\maketitle{}
to your preamble

2. Better:
in your layout file, insert add the end of the file something like (untested)

Style Title
InTitle 0
End

Style Author
InTitle 0
End

Style Date
InTitle 0
End

HTH,
Jürgen
Post by winson
Winson
winson
2006-09-26 17:25:03 UTC
Permalink
Juergen:

Thank you! Your Dirty & Quick approach works. I will refresh my LaTeX knowledge
a little bit, and will try the 'better approach' soon. Thanks again.
Continue reading on narkive:
Loading...