On 27 July 2010 17:37, Matt Funk <maf...@nmsu.edu> wrote:

> Hi,
> thanks for the reply,
>
> On Tuesday, July 27, 2010, Tennessee Carmel-Veilleux wrote:
> > On 27 July 2010 16:51, Matt Funk <maf...@nmsu.edu> wrote:
> > > Hi,
> > >
> > > i am using lyx (1.6.5) with ubuntu 10.04. I am trying to use the modern
> > > cv document class to do a resume.
> > > When i try to compile it i get error:
> > > undefined control sequence
> > >
> > > I tried to google but did not find anything helping me to resolve this.
> > > Any insight is appreciated.
> >
> > > Two questions to help with resolving the issue:
> >    1. What is in your preamble (Settings:LaTeX preamble) ?
> It is empty.
>
> >    2. Did you enable support for Hyperref ?
> Yes.
>
> OK, I figured it out by trying it on my end :)

Basically, the latest moderncv class is very different from the class
supported by the LyX layout. Let's call LyX's support for moderncv
"obsolete".

See here for a LaTeX template:
ftp://ctan.cms.math.ca/macros/latex/contrib/moderncv/examples/template.tex

The main info is at:
http://www.ctan.org/tex-archive/macros/latex/contrib/moderncv/

The moderncv class is very difficult to support with LyX because it has many
commands which require more than one arguments. Right now, LyX does not have
a good support for these without using ERT (Evil Red Text, basically LaTeX
straight code).

The moderncv class is rather easy to use on its own if you follow the
template example from the distribution.

I attached an example LyX (1.6.7) usage of moderncv. It contains practically
nothing because the layout is for a previous version of moderncv. For
instance, the LyX layout does not support itemized lists, while the class
does (see the example template). The example shows several things:

   1. The LaTeX preamble must contain the \firstname and \familyname
   commands, as well as other identifying info (the cause of your undefined
   control sequence is these commands missing)
   2. Commands that require extra arguments must have the arguments
   separated by the "}{" ERT block which is a hack to cause multiple arguments
   to work
   3. Some commands (\cvline) are unsupported by the Layout, so you have to
   enter them completely as ERT.

If you want to use moderncv, it's really one of these classes that are very
poorly suited to LyX. Your document will be more legible if you use the
LaTeX straight code template than if you try to hack LyX to work with it. If
you feel adventurous, you could upgrade the moderncv LyX layout to support
the latest moderncv version and all its commands. It would take several
hours and still would require the "}{" in some places, but you could cut
down on the ERT significantly.

Best regards,

Tennessee Carmel-Veilleux, EIT
Electrical engineering masters student, ETS (http://www.etsmtl.ca)
Project AREXIMAS (http://areximas.etsmtl.ca)

Attachment: testcv.lyx
Description: Binary data

Reply via email to