Re: LyX not completely importing new class/layout

2020-08-09 Thread Richard Kimberly Heck
On 8/8/20 11:47 PM, Steve Burnham wrote:
> I have attempted to create my own CV Latex class based on another
> template I downloaded and incorporate it into LyX. I've done this
> before with my School's dissertation class long ago. I have done the
> following (Linux):
>
>  1. I downloaded the CV .cls file and I placed it in my LaTeX directory
>  2. I ran texhash to update
>  3. I created a LyX layout file (text below) and placed it in
> ~/.lyx/layouts/ and then reconfigured LyX and restarted the program
>  4. Created a new file and under Document>Settings>Document Class I
> selected my new CV class called "resume" and hit apply. LyX then
> says it's converting the document to the new document class.
>
> After these steps the pull down menu for the layout list does not
> populate according to the new class. It appears populated as a
> standard article class rather than the custom layout options from the
> CV class. If I add in front matter and compile the document it does
> compile successfully and things like name, address, phone are
> formatted correctly. So I know that LyX can see the class and is using
> it to compile the document. I can also import plain LaTeX and
> everything works but this just turns LyX into a glorified TeX editor
> rather than what it should be doing. Below is the contents of my
> layout file which is quite minimal:
>
> #% comment line
> # \DeclareLaTeXClass{resume}
> Input stdclass.inc

This is as expected: You've basically made resume a completely minimal
class, since all you've done is to import what's common to (almost) all
classes.

If you want the LyX layout to include whatever is specific to
resume.cls, then all of that has to be declared. Have a look, for
example, at moderncv.layout, and at Chapter 5 of the Customization manual.

Riki



-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: LyX not completely importing new class/layout

2020-08-09 Thread Kornel Benko
Am Sat, 8 Aug 2020 23:47:05 -0400
schrieb Steve Burnham :

> I have attempted to create my own CV Latex class based on another template
> I downloaded and incorporate it into LyX. I've done this before with my
> School's dissertation class long ago. I have done the following (Linux):
> 
>1. I downloaded the CV .cls file and I placed it in my LaTeX directory
>2. I ran texhash to update
>3. I created a LyX layout file (text below) and placed it in
>~/.lyx/layouts/ and then reconfigured LyX and restarted the program
>4. Created a new file and under Document>Settings>Document Class I
>selected my new CV class called "resume" and hit apply. LyX then says it's
>converting the document to the new document class.
> 
> After these steps the pull down menu for the layout list does not populate
> according to the new class. It appears populated as a standard article
> class rather than the custom layout options from the CV class. If I add in
> front matter and compile the document it does compile successfully and
> things like name, address, phone are formatted correctly. So I know that
> LyX can see the class and is using it to compile the document. I can also
> import plain LaTeX and everything works but this just turns LyX into a
> glorified TeX editor rather than what it should be doing. Below is the
> contents of my layout file which is quite minimal:
> 
> #% comment line
> # \DeclareLaTeXClass{resume}
> Input stdclass.inc
> 
> -Steve

You missed
#  \DeclareCategory{Curricula Vitae}
in the 'comment' part (which in reality is not a comment)

Kornel


pgpvPcnEK6ovG.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users