LyX ⇒ moderncv | Undefined Control Sequence Errors
moderncv | Undefined Control Sequence Errors
Hello All,
I recently downloaded LyX 2.0 (having used LyX 1.x a long time ago) and I was trying to make my CV in it. However, for document class curriculum vitae (modern) I cannot even view a blank page of pdf-output without getting five "Undefined control sequence" errors with the following short log text:
\begin{document}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
I'm relatively new to the new LyX. What do I do?
Thank you.
MSL
I recently downloaded LyX 2.0 (having used LyX 1.x a long time ago) and I was trying to make my CV in it. However, for document class curriculum vitae (modern) I cannot even view a blank page of pdf-output without getting five "Undefined control sequence" errors with the following short log text:
\begin{document}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
I'm relatively new to the new LyX. What do I do?
Thank you.
MSL
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Re: moderncv | Undefined Control Sequence Errors
Hi,
welcome to the board!
Perhaps post the .log file here as attachment. For this, click the "Upload attachment" below the edit text field when writing.
Generally, it's good to post the document code itself which causes the problem.
Stefan
welcome to the board!
Perhaps post the .log file here as attachment. For this, click the "Upload attachment" below the edit text field when writing.
Generally, it's good to post the document code itself which causes the problem.
Stefan
LaTeX.org admin
moderncv | Undefined Control Sequence Errors
Thank you for the advice. The Log file is attached. According to LyX 2.0.2, the LaTeX source is the following:
Thanks for anything you could tell me.
Code: Select all
Code, edit and compile here:
% Preview source code%% LyX 2.0.2 created this file. For more info, see http://www.lyx.org/.%% Do not edit unless you really know what you are doing.\documentclass[english]{moderncv}\usepackage[T1]{fontenc}\usepackage[latin9]{inputenc}\setcounter{secnumdepth}{2}\setcounter{tocdepth}{2}\usepackage{babel}\begin{document}\section{}\end{document}
- Attachments
-
- Logfile.txt
- (20.91 KiB) Downloaded 426 times
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
moderncv | Undefined Control Sequence Errors
In the .log file I can see:
This shows the problem: you did not set a name, and at least the name is required for the CV. The error would go away and the document is compilable when the name is added, I tested it in the preamble:
Stefan
Code: Select all
! Undefined control sequence.<argument> \@firstname~\@familyname
Code: Select all
\firstname{John}\familyname{Doe}
LaTeX.org admin
moderncv | Undefined Control Sequence Errors
Thanks,
How do I set a name in the LyX?
How do I access the preamble of the document from LyX 2.0.2?
Simply writing:
into the body after selecting TeX Code doesn't work as expected.
Once again, thanks!
How do I set a name in the LyX?
How do I access the preamble of the document from LyX 2.0.2?
Simply writing:
Code: Select all
\firstname{John}\familyname{Doe}
Once again, thanks!
Last edited by Stefan Kottwitz on Tue Mar 13, 2012 12:52 pm, edited 1 time in total.
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Re: moderncv | Undefined Control Sequence Errors
It doesn't work in the body text, it has to be in the preamble. There's a menu item "Document settings" in LyX, where you can find a text field where you can put such preamble settings.
Stefan
Stefan
LaTeX.org admin
Re: moderncv | Undefined Control Sequence Errors
Ok, I can get it to work with text in the document. However, if I leave no text in the document I get the following error:
Adobe Reader could not open 'CV.2012.14.3.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).
This is in Adobe X. What is going on here?
Adobe Reader could not open 'CV.2012.14.3.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).
This is in Adobe X. What is going on here?
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Re: moderncv | Undefined Control Sequence Errors
Check if the file exists and if it has a file size greater than zero.
If it exists, you could try a different viewer instead of the Adobe Reader X. You could also post it as attachment here to a post.
Stefan
If it exists, you could try a different viewer instead of the Adobe Reader X. You could also post it as attachment here to a post.
Stefan
LaTeX.org admin
Re: moderncv | Undefined Control Sequence Errors
Ok, here is the attached file. According to Windows explorer is 1.37 kb and not size-zero. I have no idea why it will not work without any words in the body of the document.
- Attachments
-
- CV.2012.4.3.lyx
- (1.37 KiB) Downloaded 437 times
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Re: moderncv | Undefined Control Sequence Errors
If there are no pages (because of no text in the document body), LaTeX doesn't produce a PDF. So it cannot be opened.
I don't see a problem here. Just write text into the document body. For sure it's not the intention to work with a LaTeX file without text. Or why should there be a problem?
Stefan
I don't see a problem here. Just write text into the document body. For sure it's not the intention to work with a LaTeX file without text. Or why should there be a problem?
Stefan
LaTeX.org admin