Dear Adrian,

On 2017-03-30, Adrian Dario Zambrano Fuenmayor wrote:

> I am currently writing my thesis book, and I was provided with a .cls file
> by my previous university to comply with the parameters needed for writing
> my undergraduate thesis. This time I am intending to use the same .cls file
> to write my master thesis, but I would like to edit certain lines of the
> code of the mentioned file.

> I tried to do that by directly editing the file using the Notepad, but when
> I try to compile it with Lyx, it immediately launches an error.

> I would like to know if it is possible to edit the contents of a class file
> (.cls), so that I can customize some of the code lines to comply with the
> new format of my master thesis book.

a) You can edit a *.cls (LaTeX document class) file with any text editor.

   You need to make sure the content stays valid LaTeX code, though.
   You may need to consult a LaTeX book or online documentation, e.g.,
   the starter "clsguide.pdf" that comes with every LaTeX distribution.

b) The cls file cannot be compiled directly, only documents using it can be
   compiled (this holds for both, LaTeX and LyX documents).
   
   To test your *.cls file, create a small LaTeX document and compile this
   "by hand".
   
c) LyX adds a layer, the *.layout file that is an interface between the
   definitions in the *.cls file and what you want to see in LyX.
   See Help>Customization for details.
   
Hope that gets you started. In case of problems, please ask giving a
*minimal* example and the error message.

Günter   

Reply via email to