How to add a custom class to lyx on Mac.

Preface: Latex is one the most sophisticated typesetting system designed for production of technical and scientific documents. If you are not using it, you do not know what you are missing. Lyx is another open source softwares which has the power and flexibility of Latex with a user friendly graphical interface.

Despite the powerfulness of the above softwares, sometimes there is compatibility issue between them. For example, adding a custom class file (<classname>.cls) written for LaTex to Lyx takes more than copy and paste. In the following the procedure for adding a cls file to Lyx is outlined:

I would like to add three more points:

1) As explained in the link, first you need to copy the cls file in your latex directory. To find your latex directory you can use the following syntax in the Terminal: kpsewhich -var-value TEXMFHOME

2) To make a layout file, you just need to open a text file and name it as <custom>.layout .

3) You also need to find your Lyx package content directory. You can find your package directory  by opening Lyx>About Lyx. There are two addresses. You need the Library directory.

Following the above procedure you would be able to import the class file into the Lyx, however, the new commands defined in the class file do not automatically appear in the Lyx menu, although you can use it as Latex command in the Lyx.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s