Re: insert custom layout
It seems very obvious that i have get down more on the basics of LaTeX. Even though i managed so far with LyX, without getting too much on LaTeX, it will not take me any further. Some of the options can be set by editing the from the LyX interface and some of hem through inserting TEX code. And i find that hard to decide which one is the better option to go with . Regards Sajjad On Tue, Apr 13, 2010 at 4:25 PM, rgheck rgh...@bobjweil.com wrote: On 04/13/2010 06:12 AM, Guenter Milde wrote: The problem occured also in the dinbrief class. It's solved by defining two styles. From dinbrief.layout:: # dinbrief's \phone has 2 args, area and number. We define an empty # command that can be set by the Area_Code style Preamble \newcommand{\areacode}{} EndPreamble ... # dinbrief's \phone has 2 args, area and number, # define both as distinct styles Style Area code CopyStyle DinBrief LabelString Vorwahl: LatexName renewcommand{\areacode} End Style Telephone CopyStyle DinBrief LabelString Telefon: LatexName phone LatexParam {\areacode} End It should be possible to adapt this technique to liuthesis if the ERT hack is too hackish. That's impressive, but pretty hackish itself! Perhaps for 2.1 I'll try to get actual multi-argument commands working. rh
Re: insert custom layout
On 14/04/2010 3:03 PM, Sajjad wrote: It seems very obvious that i have get down more on the basics of LaTeX. Even though i managed so far with LyX, without getting too much on LaTeX, it will not take me any further. Some of the options can be set by editing the from the LyX interface and some of hem through inserting TEX code. And i find that hard to decide which one is the better option to go with . Regards Sajjad When a feature is already implemented in LyX, you should use it over TeX code. For example, a \clearpage command can be put in TeX code, but it is neater to use LyX's Import Formatting Clear Page. When a feature is not already supported by LyX, it could be implemented. LyX can be customized in many ways, which makes it quite powerful. To list those options from the top of my head: file formats and converters: for inserting graphics from your favorite editor and what not. layouts: for new types of documents (closely linked to latex document classes) modules: for simple functionality not necessarily tied to a document type (closely related to latex packages) Mind you, editing a custom layout or module is something of an advanced feature. It's not overly difficult in simple cases, but it sure can get complicated, and relies on knowledge of LyX's syntax and of LaTeX in many cases. When done properly, one can happily write text inside LyX and not worry about programming your document so that it produces output. But the starting point for new features will often be tried out first in TeX code boxes, and then moved to a module or layout. And sometimes one can be very happy with TeX code in the document and in the preamble, as long as it works. So whatever works for you, I guess. If you have specific issues we'll be happy to help. Regards, Julien
Re: insert custom layout
It seems very obvious that i have get down more on the basics of LaTeX. Even though i managed so far with LyX, without getting too much on LaTeX, it will not take me any further. Some of the options can be set by editing the from the LyX interface and some of hem through inserting TEX code. And i find that hard to decide which one is the better option to go with . Regards Sajjad On Tue, Apr 13, 2010 at 4:25 PM, rgheck rgh...@bobjweil.com wrote: On 04/13/2010 06:12 AM, Guenter Milde wrote: The problem occured also in the dinbrief class. It's solved by defining two styles. From dinbrief.layout:: # dinbrief's \phone has 2 args, area and number. We define an empty # command that can be set by the Area_Code style Preamble \newcommand{\areacode}{} EndPreamble ... # dinbrief's \phone has 2 args, area and number, # define both as distinct styles Style Area code CopyStyle DinBrief LabelString Vorwahl: LatexName renewcommand{\areacode} End Style Telephone CopyStyle DinBrief LabelString Telefon: LatexName phone LatexParam {\areacode} End It should be possible to adapt this technique to liuthesis if the ERT hack is too hackish. That's impressive, but pretty hackish itself! Perhaps for 2.1 I'll try to get actual multi-argument commands working. rh
Re: insert custom layout
On 14/04/2010 3:03 PM, Sajjad wrote: It seems very obvious that i have get down more on the basics of LaTeX. Even though i managed so far with LyX, without getting too much on LaTeX, it will not take me any further. Some of the options can be set by editing the from the LyX interface and some of hem through inserting TEX code. And i find that hard to decide which one is the better option to go with . Regards Sajjad When a feature is already implemented in LyX, you should use it over TeX code. For example, a \clearpage command can be put in TeX code, but it is neater to use LyX's Import Formatting Clear Page. When a feature is not already supported by LyX, it could be implemented. LyX can be customized in many ways, which makes it quite powerful. To list those options from the top of my head: file formats and converters: for inserting graphics from your favorite editor and what not. layouts: for new types of documents (closely linked to latex document classes) modules: for simple functionality not necessarily tied to a document type (closely related to latex packages) Mind you, editing a custom layout or module is something of an advanced feature. It's not overly difficult in simple cases, but it sure can get complicated, and relies on knowledge of LyX's syntax and of LaTeX in many cases. When done properly, one can happily write text inside LyX and not worry about programming your document so that it produces output. But the starting point for new features will often be tried out first in TeX code boxes, and then moved to a module or layout. And sometimes one can be very happy with TeX code in the document and in the preamble, as long as it works. So whatever works for you, I guess. If you have specific issues we'll be happy to help. Regards, Julien
Re: insert custom layout
It seems very obvious that i have get down more on the basics of LaTeX. Even though i managed so far with LyX, without getting too much on LaTeX, it will not take me any further. Some of the options can be set by editing the from the LyX interface and some of hem through inserting TEX code. And i find that hard to decide which one is the better option to go with . Regards Sajjad On Tue, Apr 13, 2010 at 4:25 PM, rgheckwrote: > On 04/13/2010 06:12 AM, Guenter Milde wrote: > >> >> The problem occured also in the dinbrief class. It's solved by >> defining two styles. From dinbrief.layout:: >> >> # dinbrief's \phone has 2 args, area and number. We define an empty >> # command that can be set by the Area_Code style >> Preamble >>\newcommand{\areacode}{} >> EndPreamble >> >> ... >> >> # dinbrief's \phone has 2 args, area and number, >> # define both as distinct styles >> >> Style "Area code" >>CopyStyle DinBrief >>LabelString "Vorwahl:" >>LatexName "renewcommand{\areacode}" >> End >> >> Style Telephone >>CopyStyle DinBrief >>LabelString "Telefon:" >>LatexName phone >>LatexParam {\areacode} >> End >> >> >> It should be possible to adapt this technique to liuthesis if the ERT >> hack is too hackish. >> >> >> > That's impressive, but pretty hackish itself! Perhaps for 2.1 I'll try to > get actual multi-argument commands working. > > rh > >
Re: insert custom layout
On 14/04/2010 3:03 PM, Sajjad wrote: It seems very obvious that i have get down more on the basics of LaTeX. Even though i managed so far with LyX, without getting too much on LaTeX, it will not take me any further. Some of the options can be set by editing the from the LyX interface and some of hem through inserting TEX code. And i find that hard to decide which one is the better option to go with . Regards Sajjad When a feature is already implemented in LyX, you should use it over TeX code. For example, a \clearpage command can be put in TeX code, but it is neater to use LyX's Import > Formatting > Clear Page. When a feature is not already supported by LyX, it could be implemented. LyX can be customized in many ways, which makes it quite powerful. To list those options from the top of my head: file formats and converters: for inserting graphics from your favorite editor and what not. layouts: for new types of documents (closely linked to latex document classes) modules: for simple functionality not necessarily tied to a document type (closely related to latex packages) Mind you, editing a custom layout or module is something of an advanced feature. It's not overly difficult in simple cases, but it sure can get complicated, and relies on knowledge of LyX's syntax and of LaTeX in many cases. When done properly, one can happily write text inside LyX and not worry about "programming" your document so that it produces output. But the starting point for new features will often be tried out first in TeX code boxes, and then moved to a module or layout. And sometimes one can be very happy with TeX code in the document and in the preamble, as long as it works. So whatever works for you, I guess. If you have specific issues we'll be happy to help. Regards, Julien
Re: insert custom layout
On 2010-04-12, rgheck wrote: On 04/10/2010 06:24 PM, Julien Rioux wrote: Sajjaddosto.wa...@... writes: ... there is a problem here because liuthesis redefines \title to take 2 arguments: You must always provide both a Swedish (first argument) and an English title (second argument), \title{Svensk titel}{English Title}. but LyX will output \title{YOUR TITLE} no matter what (i.e., only 1 argument). This can be changed in the layout file (although not straightforward). A workaround is to write your Swedish title like usual and then, at the end of the line, insert a TeX box and write }{English title inside it (with the braces). Or put just the }{ in the ERT box and write the English Title as normal text. There isn't at present any good way to do this. Multi-argument commands aren't directly supported. I've been thinking about this for a while, but haven't done anything. The problem occured also in the dinbrief class. It's solved by defining two styles. From dinbrief.layout:: # dinbrief's \phone has 2 args, area and number. We define an empty # command that can be set by the Area_Code style Preamble \newcommand{\areacode}{} EndPreamble ... # dinbrief's \phone has 2 args, area and number, # define both as distinct styles Style Area code CopyStyle DinBrief LabelString Vorwahl: LatexName renewcommand{\areacode} End Style Telephone CopyStyle DinBrief LabelString Telefon: LatexName phone LatexParam {\areacode} End It should be possible to adapt this technique to liuthesis if the ERT hack is too hackish. Günter
Re: insert custom layout
On 04/13/2010 06:12 AM, Guenter Milde wrote: The problem occured also in the dinbrief class. It's solved by defining two styles. From dinbrief.layout:: # dinbrief's \phone has 2 args, area and number. We define an empty # command that can be set by the Area_Code style Preamble \newcommand{\areacode}{} EndPreamble ... # dinbrief's \phone has 2 args, area and number, # define both as distinct styles Style Area code CopyStyle DinBrief LabelString Vorwahl: LatexName renewcommand{\areacode} End Style Telephone CopyStyle DinBrief LabelString Telefon: LatexName phone LatexParam {\areacode} End It should be possible to adapt this technique to liuthesis if the ERT hack is too hackish. That's impressive, but pretty hackish itself! Perhaps for 2.1 I'll try to get actual multi-argument commands working. rh
Re: insert custom layout
On 2010-04-12, rgheck wrote: On 04/10/2010 06:24 PM, Julien Rioux wrote: Sajjaddosto.wa...@... writes: ... there is a problem here because liuthesis redefines \title to take 2 arguments: You must always provide both a Swedish (first argument) and an English title (second argument), \title{Svensk titel}{English Title}. but LyX will output \title{YOUR TITLE} no matter what (i.e., only 1 argument). This can be changed in the layout file (although not straightforward). A workaround is to write your Swedish title like usual and then, at the end of the line, insert a TeX box and write }{English title inside it (with the braces). Or put just the }{ in the ERT box and write the English Title as normal text. There isn't at present any good way to do this. Multi-argument commands aren't directly supported. I've been thinking about this for a while, but haven't done anything. The problem occured also in the dinbrief class. It's solved by defining two styles. From dinbrief.layout:: # dinbrief's \phone has 2 args, area and number. We define an empty # command that can be set by the Area_Code style Preamble \newcommand{\areacode}{} EndPreamble ... # dinbrief's \phone has 2 args, area and number, # define both as distinct styles Style Area code CopyStyle DinBrief LabelString Vorwahl: LatexName renewcommand{\areacode} End Style Telephone CopyStyle DinBrief LabelString Telefon: LatexName phone LatexParam {\areacode} End It should be possible to adapt this technique to liuthesis if the ERT hack is too hackish. Günter
Re: insert custom layout
On 04/13/2010 06:12 AM, Guenter Milde wrote: The problem occured also in the dinbrief class. It's solved by defining two styles. From dinbrief.layout:: # dinbrief's \phone has 2 args, area and number. We define an empty # command that can be set by the Area_Code style Preamble \newcommand{\areacode}{} EndPreamble ... # dinbrief's \phone has 2 args, area and number, # define both as distinct styles Style Area code CopyStyle DinBrief LabelString Vorwahl: LatexName renewcommand{\areacode} End Style Telephone CopyStyle DinBrief LabelString Telefon: LatexName phone LatexParam {\areacode} End It should be possible to adapt this technique to liuthesis if the ERT hack is too hackish. That's impressive, but pretty hackish itself! Perhaps for 2.1 I'll try to get actual multi-argument commands working. rh
Re: insert custom layout
On 2010-04-12, rgheck wrote: > On 04/10/2010 06:24 PM, Julien Rioux wrote: >> Sajjadwrites: >> ... there is a problem here because liuthesis redefines \title >> to take 2 arguments: >> "You must always provide both a Swedish (first argument) and an English >> title (second argument), \title{Svensk titel}{English Title}." >> but LyX will output \title{YOUR TITLE} no matter what (i.e., only 1 >> argument). This can be changed in the layout file (although not straightforward). >> A workaround is to write your Swedish title like usual and then, at >> the end of the line, insert a TeX box and write "}{English title" >> inside it (with the braces). Or put just the }{ in the ERT box and write the English Title as normal text. > There isn't at present any good way to do this. Multi-argument commands > aren't directly supported. I've been thinking about this for a while, > but haven't done anything. The problem occured also in the dinbrief class. It's solved by defining two styles. From dinbrief.layout:: # dinbrief's \phone has 2 args, area and number. We define an empty # command that can be set by the Area_Code style Preamble \newcommand{\areacode}{} EndPreamble ... # dinbrief's \phone has 2 args, area and number, # define both as distinct styles Style "Area code" CopyStyle DinBrief LabelString "Vorwahl:" LatexName "renewcommand{\areacode}" End Style Telephone CopyStyle DinBrief LabelString "Telefon:" LatexName phone LatexParam {\areacode} End It should be possible to adapt this technique to liuthesis if the ERT hack is too hackish. Günter
Re: insert custom layout
On 04/13/2010 06:12 AM, Guenter Milde wrote: The problem occured also in the dinbrief class. It's solved by defining two styles. From dinbrief.layout:: # dinbrief's \phone has 2 args, area and number. We define an empty # command that can be set by the Area_Code style Preamble \newcommand{\areacode}{} EndPreamble ... # dinbrief's \phone has 2 args, area and number, # define both as distinct styles Style "Area code" CopyStyle DinBrief LabelString "Vorwahl:" LatexName "renewcommand{\areacode}" End Style Telephone CopyStyle DinBrief LabelString "Telefon:" LatexName phone LatexParam {\areacode} End It should be possible to adapt this technique to liuthesis if the ERT hack is too hackish. That's impressive, but pretty hackish itself! Perhaps for 2.1 I'll try to get actual multi-argument commands working. rh
Re: insert custom layout
On 04/10/2010 06:24 PM, Julien Rioux wrote: Sajjaddosto.wa...@... writes: then i choose the Title Environment and set the title of the thesis work and then i select the author and put my name there. By the way, there is a problem here because liuthesis redefines \title to take 2 arguments: You must always provide both a Swedish (first argument) and an English title (second argument), \title{Svensk titel}{English Title}. but LyX will output \title{YOUR TITLE} no matter what (i.e., only 1 argument). A workaround is to write your Swedish title like usual and then, at the end of the line, insert a TeX box and write }{English title inside it (with the braces). This is a hack, but I am not sure how you would do this elegantly in LyX. There isn't at present any good way to do this. Multi-argument commands aren't directly supported. I've been thinking about this for a while, but haven't done anything. rh
Re: insert custom layout
On 04/10/2010 06:24 PM, Julien Rioux wrote: Sajjaddosto.wa...@... writes: then i choose the Title Environment and set the title of the thesis work and then i select the author and put my name there. By the way, there is a problem here because liuthesis redefines \title to take 2 arguments: You must always provide both a Swedish (first argument) and an English title (second argument), \title{Svensk titel}{English Title}. but LyX will output \title{YOUR TITLE} no matter what (i.e., only 1 argument). A workaround is to write your Swedish title like usual and then, at the end of the line, insert a TeX box and write }{English title inside it (with the braces). This is a hack, but I am not sure how you would do this elegantly in LyX. There isn't at present any good way to do this. Multi-argument commands aren't directly supported. I've been thinking about this for a while, but haven't done anything. rh
Re: insert custom layout
On 04/10/2010 06:24 PM, Julien Rioux wrote: Sajjadwrites: then i choose the Title Environment and set the title of the thesis work and then i select the author and put my name there. By the way, there is a problem here because liuthesis redefines \title to take 2 arguments: "You must always provide both a Swedish (first argument) and an English title (second argument), \title{Svensk titel}{English Title}." but LyX will output \title{YOUR TITLE} no matter what (i.e., only 1 argument). A workaround is to write your Swedish title like usual and then, at the end of the line, insert a TeX box and write "}{English title" inside it (with the braces). This is a hack, but I am not sure how you would do this elegantly in LyX. There isn't at present any good way to do this. Multi-argument commands aren't directly supported. I've been thinking about this for a while, but haven't done anything. rh
Re: insert custom layout
Hello all, I have attached the liuthesis.layout and the liuhesis.cls for your reference. Now i can choose the liuthesis layout from the Documents-Settings-Document class option. then i choose the Title Environment and set the title of the thesis work and then i select the author and put my name there. When i try to see a preview it gives me several LaTeX error. They are : Undefined Control sequence .ding division definition \the...@divtag.} 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. AND LaTeX Error: Option clash for package inputenc. \setcounter {secnumdepth}{3} The package inputenc has already been loaded with options: [latin1] There has now been an attempt to load it with options [latin9] Adding the global options: latin1,latin9 to your \documentclass declaration may fix this. Try typing return to proceed. Any hint on that ? I have several LateX file inside that package folder. Do i have to edit any one of them to get it functional? Regards Sajjad On Fri, Apr 9, 2010 at 1:38 PM, rgheck rgh...@bobjweil.com wrote: On 04/08/2010 03:29 PM, Sajjad wrote: On Thu, Apr 8, 2010 at 4:24 AM, Julien Riouxjri...@physics.utoronto.ca wrote: On 07/04/2010 7:08 PM, Sajjad wrote: 6. The liuthesis.layout file contain the following: #% Do not delete this line below; configure depends on this # \DeclareLaTeXClass{liuthesis} If that's all you have in there, this is not sufficient. As suggested, a good starting point for you would be to copy the book.layout file. If it not then , i did copy the contents of book.layout and put it into the liuthesis.layout. What should i do now? Any reference ? Yes. Do this: If that is what you did, I don't know what the matter is. If you start LyX from a console you might get useful information for debugging. You probably have an error somewhere in the layout file. rh %% %% This is file `liuthesis.cls', %% generated with the docstrip utility. %% %% The original source files were: %% %% liuthesis.dtx (with options: `class') %% %% IMPORTANT NOTICE: %% %% For the copyright see the source file. %% %% Any modified versions of this file must be renamed %% with new filenames distinct from liuthesis.cls. %% %% For distribution of the original source see the terms %% for copying and modification in the file liuthesis.dtx. %% %% This generated file may be distributed as long as the %% original source files, as listed above, are part of the %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) \ProvidesClass{liuthesis}[2007/01/13 liuthesis Class v. 1.3] \NeedsTeXFormat{LaTeX2e} \RequirePackage{lmodern} \RequirePackage[T1]{fontenc} \RequirePackage[latin1]{inputenc} \RequirePackage[swedish, english]{babel} \newcommand*{\liuthesisDefinition}[2]{% \ClassInfo{liuthesis}{Loaded definition file '\CurrentOption.ltd'}% \newcommand*{\the...@divtag}{#1}% \newcommand...@address}{#2}} \newif\ifliuthe...@hyperref \liuthe...@hyperreffalse \newcommand*\phantomsection{\relax} \newcommand*\href[2][]{#1} \newcommand*\pdfbookmark[3][]{\relax} % %%% Language%%% % \def\acknowledgementsname{Acknowledgments}% \def\corollaryname{Corollary} \def\definitionname{Definition} \def\examplename{Example} \def\lemmaname{Lemma} \def\listexamplename{List of Examples} \def\theoremname{Theorem} \newcommand*{\monthName}[1]{\ifcase#1\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\else Unknown\fi} \addto{\captionsenglish}{% \def\acknowledgementsname{Acknowledgments}% \def\corollaryname{Corollary}% \def\definitionname{Definition}% \def\examplename{Example}% \def\lemmaname{Lemma}% \def\listexamplename{List of Examples}% \def\theoremname{Theorem}% \renewcommand*{\monthName}[1]{\ifcase#1\or% January\or February\or March\or% April\or May\or June\or% July\or August\or September\or% October\or November\or December\else Unknown\fi}% } \addto{\captionsswedish}{% \def\acknowledgementsname{Tack}% \def\corollaryname{Korrolarium}% \def\definitionname{Definition}% \def\examplename{Exempel}% \def\lemmaname{Lemma}% \def\listexamplename{Exempellista}% \def\theoremname{Sats}% \renewcommand*{\monthName}[1]{\ifcase#1\or% januari\or februari\or mars\or% april\or maj\or juni\or% juli\or augusti\or september\or% oktober\or november\or december\else Unknown\fi}% } \DeclareOption{english}{% \AtBeginDocument{\selectlanguage{english}}% } \DeclareOption{swedish}{% \AtBeginDocument{\selectlanguage{swedish}}% } % %%% CROP SETTINGS %%% %
Re: insert custom layout
Hi, Sajjad dosto.wa...@... writes: Hello all, I have attached the liuthesis.layout and the liuhesis.cls for your reference. Thanks. This makes it much easier to troubleshoot. When i try to see a preview it gives me several LaTeX error. They are : Undefined Control sequence .ding division definition \thesis at divTAG.} The documentation for liuthesis (section 2.1.4) says that you must provide the department (one of ida, ifm, etc.) as a class option. In LyX you would go with the menu to: Document Settings Document Class And then insert your choice in the custom field under Class options. AND LaTeX Error: Option clash for package inputenc. The package inputenc has already been loaded with options: [latin1] There has now been an attempt to load it with options [latin9] Adding the global options: latin1,latin9 to your \documentclass declaration may fix this. Try typing return to proceed. Any hint on that ? This is because liuthesis requires a specific input encoding. Instruct LyX to obey this by going to: Document Settings Language and set the Encoding to Other: Western European (ISO 8859-1) I have several LateX file inside that package folder. Do i have to edit any one of them to get it functional? In principle, no, you don't have to edit any tex file. You should consult liuthesis.pdf; it seems to give a good description of your LaTeX class. Some non-standard commands, such as \thesisDate, can be inputed in LyX inside a TeX box (Insert TeX Code). If you feel adventurous, you can modify your layout file to make LyX understand these commands without the use of TeX Code. For that, see LyX's Help Customization. Eventually, if you implement all the features of the TeX class into the LyX layout, you might want to submit your layout file for inclusion with the liuthesis.zip distribution. Regards Sajjad Cheers, Julien
Re: insert custom layout
Sajjad dosto.wa...@... writes: then i choose the Title Environment and set the title of the thesis work and then i select the author and put my name there. By the way, there is a problem here because liuthesis redefines \title to take 2 arguments: You must always provide both a Swedish (first argument) and an English title (second argument), \title{Svensk titel}{English Title}. but LyX will output \title{YOUR TITLE} no matter what (i.e., only 1 argument). A workaround is to write your Swedish title like usual and then, at the end of the line, insert a TeX box and write }{English title inside it (with the braces). This is a hack, but I am not sure how you would do this elegantly in LyX. Good luck! Julien
Re: insert custom layout
Hello all, I have attached the liuthesis.layout and the liuhesis.cls for your reference. Now i can choose the liuthesis layout from the Documents-Settings-Document class option. then i choose the Title Environment and set the title of the thesis work and then i select the author and put my name there. When i try to see a preview it gives me several LaTeX error. They are : Undefined Control sequence .ding division definition \the...@divtag.} 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. AND LaTeX Error: Option clash for package inputenc. \setcounter {secnumdepth}{3} The package inputenc has already been loaded with options: [latin1] There has now been an attempt to load it with options [latin9] Adding the global options: latin1,latin9 to your \documentclass declaration may fix this. Try typing return to proceed. Any hint on that ? I have several LateX file inside that package folder. Do i have to edit any one of them to get it functional? Regards Sajjad On Fri, Apr 9, 2010 at 1:38 PM, rgheck rgh...@bobjweil.com wrote: On 04/08/2010 03:29 PM, Sajjad wrote: On Thu, Apr 8, 2010 at 4:24 AM, Julien Riouxjri...@physics.utoronto.ca wrote: On 07/04/2010 7:08 PM, Sajjad wrote: 6. The liuthesis.layout file contain the following: #% Do not delete this line below; configure depends on this # \DeclareLaTeXClass{liuthesis} If that's all you have in there, this is not sufficient. As suggested, a good starting point for you would be to copy the book.layout file. If it not then , i did copy the contents of book.layout and put it into the liuthesis.layout. What should i do now? Any reference ? Yes. Do this: If that is what you did, I don't know what the matter is. If you start LyX from a console you might get useful information for debugging. You probably have an error somewhere in the layout file. rh %% %% This is file `liuthesis.cls', %% generated with the docstrip utility. %% %% The original source files were: %% %% liuthesis.dtx (with options: `class') %% %% IMPORTANT NOTICE: %% %% For the copyright see the source file. %% %% Any modified versions of this file must be renamed %% with new filenames distinct from liuthesis.cls. %% %% For distribution of the original source see the terms %% for copying and modification in the file liuthesis.dtx. %% %% This generated file may be distributed as long as the %% original source files, as listed above, are part of the %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) \ProvidesClass{liuthesis}[2007/01/13 liuthesis Class v. 1.3] \NeedsTeXFormat{LaTeX2e} \RequirePackage{lmodern} \RequirePackage[T1]{fontenc} \RequirePackage[latin1]{inputenc} \RequirePackage[swedish, english]{babel} \newcommand*{\liuthesisDefinition}[2]{% \ClassInfo{liuthesis}{Loaded definition file '\CurrentOption.ltd'}% \newcommand*{\the...@divtag}{#1}% \newcommand...@address}{#2}} \newif\ifliuthe...@hyperref \liuthe...@hyperreffalse \newcommand*\phantomsection{\relax} \newcommand*\href[2][]{#1} \newcommand*\pdfbookmark[3][]{\relax} % %%% Language%%% % \def\acknowledgementsname{Acknowledgments}% \def\corollaryname{Corollary} \def\definitionname{Definition} \def\examplename{Example} \def\lemmaname{Lemma} \def\listexamplename{List of Examples} \def\theoremname{Theorem} \newcommand*{\monthName}[1]{\ifcase#1\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\else Unknown\fi} \addto{\captionsenglish}{% \def\acknowledgementsname{Acknowledgments}% \def\corollaryname{Corollary}% \def\definitionname{Definition}% \def\examplename{Example}% \def\lemmaname{Lemma}% \def\listexamplename{List of Examples}% \def\theoremname{Theorem}% \renewcommand*{\monthName}[1]{\ifcase#1\or% January\or February\or March\or% April\or May\or June\or% July\or August\or September\or% October\or November\or December\else Unknown\fi}% } \addto{\captionsswedish}{% \def\acknowledgementsname{Tack}% \def\corollaryname{Korrolarium}% \def\definitionname{Definition}% \def\examplename{Exempel}% \def\lemmaname{Lemma}% \def\listexamplename{Exempellista}% \def\theoremname{Sats}% \renewcommand*{\monthName}[1]{\ifcase#1\or% januari\or februari\or mars\or% april\or maj\or juni\or% juli\or augusti\or september\or% oktober\or november\or december\else Unknown\fi}% } \DeclareOption{english}{% \AtBeginDocument{\selectlanguage{english}}% } \DeclareOption{swedish}{% \AtBeginDocument{\selectlanguage{swedish}}% } % %%% CROP SETTINGS %%% %
Re: insert custom layout
Hi, Sajjad dosto.wa...@... writes: Hello all, I have attached the liuthesis.layout and the liuhesis.cls for your reference. Thanks. This makes it much easier to troubleshoot. When i try to see a preview it gives me several LaTeX error. They are : Undefined Control sequence .ding division definition \thesis at divTAG.} The documentation for liuthesis (section 2.1.4) says that you must provide the department (one of ida, ifm, etc.) as a class option. In LyX you would go with the menu to: Document Settings Document Class And then insert your choice in the custom field under Class options. AND LaTeX Error: Option clash for package inputenc. The package inputenc has already been loaded with options: [latin1] There has now been an attempt to load it with options [latin9] Adding the global options: latin1,latin9 to your \documentclass declaration may fix this. Try typing return to proceed. Any hint on that ? This is because liuthesis requires a specific input encoding. Instruct LyX to obey this by going to: Document Settings Language and set the Encoding to Other: Western European (ISO 8859-1) I have several LateX file inside that package folder. Do i have to edit any one of them to get it functional? In principle, no, you don't have to edit any tex file. You should consult liuthesis.pdf; it seems to give a good description of your LaTeX class. Some non-standard commands, such as \thesisDate, can be inputed in LyX inside a TeX box (Insert TeX Code). If you feel adventurous, you can modify your layout file to make LyX understand these commands without the use of TeX Code. For that, see LyX's Help Customization. Eventually, if you implement all the features of the TeX class into the LyX layout, you might want to submit your layout file for inclusion with the liuthesis.zip distribution. Regards Sajjad Cheers, Julien
Re: insert custom layout
Sajjad dosto.wa...@... writes: then i choose the Title Environment and set the title of the thesis work and then i select the author and put my name there. By the way, there is a problem here because liuthesis redefines \title to take 2 arguments: You must always provide both a Swedish (first argument) and an English title (second argument), \title{Svensk titel}{English Title}. but LyX will output \title{YOUR TITLE} no matter what (i.e., only 1 argument). A workaround is to write your Swedish title like usual and then, at the end of the line, insert a TeX box and write }{English title inside it (with the braces). This is a hack, but I am not sure how you would do this elegantly in LyX. Good luck! Julien
Re: insert custom layout
Hello all, I have attached the liuthesis.layout and the liuhesis.cls for your reference. Now i can choose the liuthesis layout from the Documents->Settings->Document class option. then i choose the Title Environment and set the title of the thesis work and then i select the author and put my name there. When i try to see a preview it gives me several LaTeX error. They are : Undefined Control sequence ".ding division definition \the...@divtag.} 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." AND LaTeX Error: Option clash for package inputenc. "\setcounter {secnumdepth}{3} The package inputenc has already been loaded with options: [latin1] There has now been an attempt to load it with options [latin9] Adding the global options: latin1,latin9 to your \documentclass declaration may fix this. Try typing to proceed. " Any hint on that ? I have several LateX file inside that package folder. Do i have to edit any one of them to get it functional? Regards Sajjad On Fri, Apr 9, 2010 at 1:38 PM, rgheckwrote: > On 04/08/2010 03:29 PM, Sajjad wrote: > >> On Thu, Apr 8, 2010 at 4:24 AM, Julien Rioux > >wrote: >> >> >> >>> >>> On 07/04/2010 7:08 PM, Sajjad wrote: >>> >>> >>> 6. The liuthesis.layout file contain the following: #% Do not delete this line below; configure depends on this # \DeclareLaTeXClass{liuthesis} >>> If that's all you have in there, this is not sufficient. As suggested, a >>> good starting point for you would be to copy the book.layout file. >>> >>> >>> >> If it not then , i did copy the contents of book.layout and put it into >> the >> liuthesis.layout. >> >> What should i do now? Any reference ? >> >> >> > Yes. Do this: > > > If that is what you did, I don't know what the matter is. If you start LyX >>> from a console you might get useful information for debugging. >>> >>> >>> >> You probably have an error somewhere in the layout file. > > rh > > %% %% This is file `liuthesis.cls', %% generated with the docstrip utility. %% %% The original source files were: %% %% liuthesis.dtx (with options: `class') %% %% IMPORTANT NOTICE: %% %% For the copyright see the source file. %% %% Any modified versions of this file must be renamed %% with new filenames distinct from liuthesis.cls. %% %% For distribution of the original source see the terms %% for copying and modification in the file liuthesis.dtx. %% %% This generated file may be distributed as long as the %% original source files, as listed above, are part of the %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) \ProvidesClass{liuthesis}[2007/01/13 liuthesis Class v. 1.3] \NeedsTeXFormat{LaTeX2e} \RequirePackage{lmodern} \RequirePackage[T1]{fontenc} \RequirePackage[latin1]{inputenc} \RequirePackage[swedish, english]{babel} \newcommand*{\liuthesisDefinition}[2]{% \ClassInfo{liuthesis}{Loaded definition file '\CurrentOption.ltd'}% \newcommand*{\the...@divtag}{#1}% \newcommand...@address}{#2}} \newif\ifliuthe...@hyperref \liuthe...@hyperreffalse \newcommand*\phantomsection{\relax} \newcommand*\href[2][]{#1} \newcommand*\pdfbookmark[3][]{\relax} % %%% Language%%% % \def\acknowledgementsname{Acknowledgments}% \def\corollaryname{Corollary} \def\definitionname{Definition} \def\examplename{Example} \def\lemmaname{Lemma} \def\listexamplename{List of Examples} \def\theoremname{Theorem} \newcommand*{\monthName}[1]{\ifcase#1\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\else Unknown\fi} \addto{\captionsenglish}{% \def\acknowledgementsname{Acknowledgments}% \def\corollaryname{Corollary}% \def\definitionname{Definition}% \def\examplename{Example}% \def\lemmaname{Lemma}% \def\listexamplename{List of Examples}% \def\theoremname{Theorem}% \renewcommand*{\monthName}[1]{\ifcase#1\or% January\or February\or March\or% April\or May\or June\or% July\or August\or September\or% October\or November\or December\else Unknown\fi}% } \addto{\captionsswedish}{% \def\acknowledgementsname{Tack}% \def\corollaryname{Korrolarium}% \def\definitionname{Definition}% \def\examplename{Exempel}% \def\lemmaname{Lemma}% \def\listexamplename{Exempellista}% \def\theoremname{Sats}% \renewcommand*{\monthName}[1]{\ifcase#1\or% januari\or februari\or mars\or% april\or maj\or juni\or% juli\or augusti\or september\or% oktober\or november\or december\else Unknown\fi}% } \DeclareOption{english}{% \AtBeginDocument{\selectlanguage{english}}% } \DeclareOption{swedish}{%
Re: insert custom layout
Hi, Sajjadwrites: > Hello all, > > I have attached the liuthesis.layout and the liuhesis.cls for your reference. Thanks. This makes it much easier to troubleshoot. > When i try to see a preview it gives me several LaTeX error. They are : > > > Undefined Control sequence > > ".ding division definition \thesis divTAG.} The documentation for liuthesis (section 2.1.4) says that you must provide the department (one of ida, ifm, etc.) as a class option. In LyX you would go with the menu to: Document > Settings > Document Class And then insert your choice in the "custom" field under "Class options". > AND > > > LaTeX Error: Option clash for package inputenc. > > The package inputenc has already been loaded with options: > [latin1] > There has now been an attempt to load it with options > [latin9] > Adding the global options: > latin1,latin9 > to your \documentclass declaration may fix this. > Try typingto proceed. > > > Any hint on that ? This is because liuthesis requires a specific input encoding. Instruct LyX to obey this by going to: Document > Settings > Language and set the Encoding to "Other: Western European (ISO 8859-1)" > I have several LateX file inside that package folder. Do i have to edit any one of them to get it functional? In principle, no, you don't have to edit any tex file. You should consult liuthesis.pdf; it seems to give a good description of your LaTeX class. Some non-standard commands, such as \thesisDate, can be inputed in LyX inside a TeX box (Insert > TeX Code). If you feel adventurous, you can modify your layout file to make LyX understand these commands without the use of TeX Code. For that, see LyX's Help > Customization. Eventually, if you implement all the features of the TeX class into the LyX layout, you might want to submit your layout file for inclusion with the liuthesis.zip distribution. > > > Regards > Sajjad > Cheers, Julien
Re: insert custom layout
Sajjadwrites: > then i choose the Title Environment and set the title of the thesis work > and then i select the author and put my name there. By the way, there is a problem here because liuthesis redefines \title to take 2 arguments: "You must always provide both a Swedish (first argument) and an English title (second argument), \title{Svensk titel}{English Title}." but LyX will output \title{YOUR TITLE} no matter what (i.e., only 1 argument). A workaround is to write your Swedish title like usual and then, at the end of the line, insert a TeX box and write "}{English title" inside it (with the braces). This is a hack, but I am not sure how you would do this elegantly in LyX. Good luck! Julien
Re: insert custom layout
On 04/08/2010 03:29 PM, Sajjad wrote: On Thu, Apr 8, 2010 at 4:24 AM, Julien Riouxjri...@physics.utoronto.cawrote: On 07/04/2010 7:08 PM, Sajjad wrote: 6. The liuthesis.layout file contain the following: #% Do not delete this line below; configure depends on this # \DeclareLaTeXClass{liuthesis} If that's all you have in there, this is not sufficient. As suggested, a good starting point for you would be to copy the book.layout file. If it not then , i did copy the contents of book.layout and put it into the liuthesis.layout. What should i do now? Any reference ? Yes. Do this: If that is what you did, I don't know what the matter is. If you start LyX from a console you might get useful information for debugging. You probably have an error somewhere in the layout file. rh
Re: insert custom layout
On 04/08/2010 03:29 PM, Sajjad wrote: On Thu, Apr 8, 2010 at 4:24 AM, Julien Riouxjri...@physics.utoronto.cawrote: On 07/04/2010 7:08 PM, Sajjad wrote: 6. The liuthesis.layout file contain the following: #% Do not delete this line below; configure depends on this # \DeclareLaTeXClass{liuthesis} If that's all you have in there, this is not sufficient. As suggested, a good starting point for you would be to copy the book.layout file. If it not then , i did copy the contents of book.layout and put it into the liuthesis.layout. What should i do now? Any reference ? Yes. Do this: If that is what you did, I don't know what the matter is. If you start LyX from a console you might get useful information for debugging. You probably have an error somewhere in the layout file. rh
Re: insert custom layout
On 04/08/2010 03:29 PM, Sajjad wrote: On Thu, Apr 8, 2010 at 4:24 AM, Julien Riouxwrote: On 07/04/2010 7:08 PM, Sajjad wrote: 6. The liuthesis.layout file contain the following: #% Do not delete this line below; configure depends on this # \DeclareLaTeXClass{liuthesis} If that's all you have in there, this is not sufficient. As suggested, a good starting point for you would be to copy the book.layout file. If it not then , i did copy the contents of book.layout and put it into the liuthesis.layout. What should i do now? Any reference ? Yes. Do this: If that is what you did, I don't know what the matter is. If you start LyX from a console you might get useful information for debugging. You probably have an error somewhere in the layout file. rh
Re: insert custom layout
On 2010-04-08, Julien Rioux wrote: On 07/04/2010 7:08 PM, Sajjad wrote: 6. The liuthesis.layout file contain the following: #% Do not delete this line below; configure depends on this # \DeclareLaTeXClass{liuthesis} If that's all you have in there, this is not sufficient. As suggested, a good starting point for you would be to copy the book.layout file. I rather recommend to Input book.layout instead of copying. You can then add and override definitions in the rest of the file (once the layout is up and working). (See e.g. the dinbrief.layout for an example of this approach.) Also, for debugging * Test if the liuthesis document class works as expected in pure LaTeX. (Check if the sample LaTeX documents (or a self-written LaTeX file) works if compiled from the command line.) * Export your non-working LyX document to LaTeX and see if this works fine or why it fails. Günter
Re: insert custom layout
On Thu, Apr 8, 2010 at 4:24 AM, Julien Rioux jri...@physics.utoronto.cawrote: On 07/04/2010 7:08 PM, Sajjad wrote: 6. The liuthesis.layout file contain the following: #% Do not delete this line below; configure depends on this # \DeclareLaTeXClass{liuthesis} If that's all you have in there, this is not sufficient. As suggested, a good starting point for you would be to copy the book.layout file. If it not then , i did copy the contents of book.layout and put it into the liuthesis.layout. What should i do now? Any reference ? If that is what you did, I don't know what the matter is. If you start LyX from a console you might get useful information for debugging. -- Julien
Re: insert custom layout
On 2010-04-08, Julien Rioux wrote: On 07/04/2010 7:08 PM, Sajjad wrote: 6. The liuthesis.layout file contain the following: #% Do not delete this line below; configure depends on this # \DeclareLaTeXClass{liuthesis} If that's all you have in there, this is not sufficient. As suggested, a good starting point for you would be to copy the book.layout file. I rather recommend to Input book.layout instead of copying. You can then add and override definitions in the rest of the file (once the layout is up and working). (See e.g. the dinbrief.layout for an example of this approach.) Also, for debugging * Test if the liuthesis document class works as expected in pure LaTeX. (Check if the sample LaTeX documents (or a self-written LaTeX file) works if compiled from the command line.) * Export your non-working LyX document to LaTeX and see if this works fine or why it fails. Günter
Re: insert custom layout
On Thu, Apr 8, 2010 at 4:24 AM, Julien Rioux jri...@physics.utoronto.cawrote: On 07/04/2010 7:08 PM, Sajjad wrote: 6. The liuthesis.layout file contain the following: #% Do not delete this line below; configure depends on this # \DeclareLaTeXClass{liuthesis} If that's all you have in there, this is not sufficient. As suggested, a good starting point for you would be to copy the book.layout file. If it not then , i did copy the contents of book.layout and put it into the liuthesis.layout. What should i do now? Any reference ? If that is what you did, I don't know what the matter is. If you start LyX from a console you might get useful information for debugging. -- Julien
Re: insert custom layout
On 2010-04-08, Julien Rioux wrote: > On 07/04/2010 7:08 PM, Sajjad wrote: >> 6. The liuthesis.layout file contain the following: >> #% Do not delete this line below; configure depends on this >> # \DeclareLaTeXClass{liuthesis} > If that's all you have in there, this is not sufficient. As suggested, a > good starting point for you would be to copy the book.layout file. I rather recommend to Input book.layout instead of copying. You can then add and override definitions in the rest of the file (once the layout is up and working). (See e.g. the dinbrief.layout for an example of this approach.) Also, for debugging * Test if the liuthesis document class works as expected in pure LaTeX. (Check if the sample LaTeX documents (or a self-written LaTeX file) works if compiled from the command line.) * Export your non-working LyX document to LaTeX and see if this works fine or why it fails. Günter
Re: insert custom layout
On Thu, Apr 8, 2010 at 4:24 AM, Julien Riouxwrote: > > > On 07/04/2010 7:08 PM, Sajjad wrote: > >> 6. The liuthesis.layout file contain the following: >> >> #% Do not delete this line below; configure depends on this >> # \DeclareLaTeXClass{liuthesis} >> >> > If that's all you have in there, this is not sufficient. As suggested, a > good starting point for you would be to copy the book.layout file. > If it not then , i did copy the contents of book.layout and put it into the liuthesis.layout. What should i do now? Any reference ? > > If that is what you did, I don't know what the matter is. If you start LyX > from a console you might get useful information for debugging. > > -- > Julien > >
Re: insert custom layout
On 04/06/2010 04:27 PM, Sajjad wrote: Hello, In most of the report writing i used the report class. The university that i am studying in have own class and i want to import it into LyX's document class by importing custom layout. The custom layout accepts only one .layout file, where as the my university 'liuthesis' contains several .tex file. Since liuthesis is a document class, it is provided as a .cls file, liuthesis.cls. The .tex files that are provided with it are examples, documentation, and the like, and have nothing to do with layout. What you will need to be able to use liuthesis with LyX is a file liuthesis.layout. Since liuthesis is based upon book, you can get started simply by copying book.layout to liuthesis.layout and changing the second line to: \DeclareLaTeXClass{liuthesis} This will not give you access in LyX to the special constructs of liuthesis, but it will get you started. You should then be able to import the .tex files provided as examples. Richard
Re: insert custom layout
Thanks rgcheck, I have gone through the manual of configuring Lyx and there they have explained how to include custom .clas file. I think i followed the steps and i do see the 'liuthesis' in the Document class option under Documents-Settings. But When i check liuthesis , the system hangs. So i think i need to elaborate the steps that i have followed. 1. I created a directory called /usr/local/texmf/latex/liuthesis and unzipped the file under the liuthesis folder. Now the folder 'liuthesis' contains more subdirectories. 2. Opened the texmf.cnf file and edited the TEXMFLOCAL with the path specified in step 1. 3. Executed texhash and it created a ls-R. 4. From LyX i executed the Reconfigure command. 5. created a liuthesis.layout file and put in the directory where the LyX installation put all the layout files, so that LyX can find it. 6. The liuthesis.layout file contain the following: #% Do not delete this line below; configure depends on this # \DeclareLaTeXClass{liuthesis} 7. I ran Reconfigure again. 8 Restarted LyX and chose the liuthesis class from the layout option and the program hangs. Is there anything i missed? Where should i look into to fix this? Regards Sajjad On Wed, Apr 7, 2010 at 1:49 PM, rgheck rgh...@bobjweil.com wrote: On 04/06/2010 04:27 PM, Sajjad wrote: Hello, In most of the report writing i used the report class. The university that i am studying in have own class and i want to import it into LyX's document class by importing custom layout. The custom layout accepts only one .layout file, where as the my university 'liuthesis' contains several .tex file. Since liuthesis is a document class, it is provided as a .cls file, liuthesis.cls. The .tex files that are provided with it are examples, documentation, and the like, and have nothing to do with layout. What you will need to be able to use liuthesis with LyX is a file liuthesis.layout. Since liuthesis is based upon book, you can get started simply by copying book.layout to liuthesis.layout and changing the second line to: \DeclareLaTeXClass{liuthesis} This will not give you access in LyX to the special constructs of liuthesis, but it will get you started. You should then be able to import the .tex files provided as examples. Richard
Re: insert custom layout
On 07/04/2010 7:08 PM, Sajjad wrote: 6. The liuthesis.layout file contain the following: #% Do not delete this line below; configure depends on this # \DeclareLaTeXClass{liuthesis} If that's all you have in there, this is not sufficient. As suggested, a good starting point for you would be to copy the book.layout file. If that is what you did, I don't know what the matter is. If you start LyX from a console you might get useful information for debugging. -- Julien
Re: insert custom layout
On 04/06/2010 04:27 PM, Sajjad wrote: Hello, In most of the report writing i used the report class. The university that i am studying in have own class and i want to import it into LyX's document class by importing custom layout. The custom layout accepts only one .layout file, where as the my university 'liuthesis' contains several .tex file. Since liuthesis is a document class, it is provided as a .cls file, liuthesis.cls. The .tex files that are provided with it are examples, documentation, and the like, and have nothing to do with layout. What you will need to be able to use liuthesis with LyX is a file liuthesis.layout. Since liuthesis is based upon book, you can get started simply by copying book.layout to liuthesis.layout and changing the second line to: \DeclareLaTeXClass{liuthesis} This will not give you access in LyX to the special constructs of liuthesis, but it will get you started. You should then be able to import the .tex files provided as examples. Richard
Re: insert custom layout
Thanks rgcheck, I have gone through the manual of configuring Lyx and there they have explained how to include custom .clas file. I think i followed the steps and i do see the 'liuthesis' in the Document class option under Documents-Settings. But When i check liuthesis , the system hangs. So i think i need to elaborate the steps that i have followed. 1. I created a directory called /usr/local/texmf/latex/liuthesis and unzipped the file under the liuthesis folder. Now the folder 'liuthesis' contains more subdirectories. 2. Opened the texmf.cnf file and edited the TEXMFLOCAL with the path specified in step 1. 3. Executed texhash and it created a ls-R. 4. From LyX i executed the Reconfigure command. 5. created a liuthesis.layout file and put in the directory where the LyX installation put all the layout files, so that LyX can find it. 6. The liuthesis.layout file contain the following: #% Do not delete this line below; configure depends on this # \DeclareLaTeXClass{liuthesis} 7. I ran Reconfigure again. 8 Restarted LyX and chose the liuthesis class from the layout option and the program hangs. Is there anything i missed? Where should i look into to fix this? Regards Sajjad On Wed, Apr 7, 2010 at 1:49 PM, rgheck rgh...@bobjweil.com wrote: On 04/06/2010 04:27 PM, Sajjad wrote: Hello, In most of the report writing i used the report class. The university that i am studying in have own class and i want to import it into LyX's document class by importing custom layout. The custom layout accepts only one .layout file, where as the my university 'liuthesis' contains several .tex file. Since liuthesis is a document class, it is provided as a .cls file, liuthesis.cls. The .tex files that are provided with it are examples, documentation, and the like, and have nothing to do with layout. What you will need to be able to use liuthesis with LyX is a file liuthesis.layout. Since liuthesis is based upon book, you can get started simply by copying book.layout to liuthesis.layout and changing the second line to: \DeclareLaTeXClass{liuthesis} This will not give you access in LyX to the special constructs of liuthesis, but it will get you started. You should then be able to import the .tex files provided as examples. Richard
Re: insert custom layout
On 07/04/2010 7:08 PM, Sajjad wrote: 6. The liuthesis.layout file contain the following: #% Do not delete this line below; configure depends on this # \DeclareLaTeXClass{liuthesis} If that's all you have in there, this is not sufficient. As suggested, a good starting point for you would be to copy the book.layout file. If that is what you did, I don't know what the matter is. If you start LyX from a console you might get useful information for debugging. -- Julien
Re: insert custom layout
On 04/06/2010 04:27 PM, Sajjad wrote: Hello, In most of the report writing i used the report class. The university that i am studying in have own class and i want to import it into LyX's document class by importing custom layout. The custom layout accepts only one .layout file, where as the my university 'liuthesis' contains several .tex file. Since liuthesis is a document class, it is provided as a .cls file, liuthesis.cls. The .tex files that are provided with it are examples, documentation, and the like, and have nothing to do with layout. What you will need to be able to use liuthesis with LyX is a file liuthesis.layout. Since liuthesis is based upon book, you can get started simply by copying book.layout to liuthesis.layout and changing the second line to: \DeclareLaTeXClass{liuthesis} This will not give you access in LyX to the special constructs of liuthesis, but it will get you started. You should then be able to import the .tex files provided as examples. Richard
Re: insert custom layout
Thanks rgcheck, I have gone through the manual of configuring Lyx and there they have explained how to include custom .clas file. I think i followed the steps and i do see the 'liuthesis' in the Document class option under Documents->Settings. But When i check "liuthesis" , the system hangs. So i think i need to elaborate the steps that i have followed. 1. I created a directory called /usr/local/texmf/latex/liuthesis and unzipped the file under the liuthesis folder. Now the folder 'liuthesis' contains more subdirectories. 2. Opened the texmf.cnf file and edited the TEXMFLOCAL with the path specified in step 1. 3. Executed texhash and it created a ls-R. 4. From LyX i executed the Reconfigure command. 5. created a liuthesis.layout file and put in the directory where the LyX installation put all the layout files, so that LyX can find it. 6. The liuthesis.layout file contain the following: #% Do not delete this line below; configure depends on this # \DeclareLaTeXClass{liuthesis} 7. I ran Reconfigure again. 8 Restarted LyX and chose the liuthesis class from the layout option and the program hangs. Is there anything i missed? Where should i look into to fix this? Regards Sajjad On Wed, Apr 7, 2010 at 1:49 PM, rgheckwrote: > On 04/06/2010 04:27 PM, Sajjad wrote: > >> Hello, >> >> In most of the report writing i used the report class. The university that >> i >> am studying in have own class and i want to import it into LyX's document >> class by importing custom layout. The custom layout accepts only one >> .layout file, >> where as the my university 'liuthesis' contains several .tex file. >> >> >> > Since liuthesis is a document class, it is provided as a .cls file, > liuthesis.cls. The .tex files that are provided with it are examples, > documentation, and the like, and have nothing to do with layout. > > What you will need to be able to use liuthesis with LyX is a file > liuthesis.layout. Since liuthesis is based upon book, you can get started > simply by copying book.layout to liuthesis.layout and changing the second > line to: >\DeclareLaTeXClass{liuthesis} > This will not give you access in LyX to the special constructs of > liuthesis, but it will get you started. You should then be able to import > the .tex files provided as examples. > > Richard > >
Re: insert custom layout
On 07/04/2010 7:08 PM, Sajjad wrote: 6. The liuthesis.layout file contain the following: #% Do not delete this line below; configure depends on this # \DeclareLaTeXClass{liuthesis} If that's all you have in there, this is not sufficient. As suggested, a good starting point for you would be to copy the book.layout file. If that is what you did, I don't know what the matter is. If you start LyX from a console you might get useful information for debugging. -- Julien