Re: Converting sty to layout
On 07/02/2010 04:54 AM, Andy S Feng wrote: Hi Richard, I copied the layout and ran lyx and it still won't compile. I have no trouble with the ordinary "article" layout or any of the other existing layouts. I've attached a screen capture of the compile error Can you (a) export this file to LaTeX and post the output and (b) post a copy of your aer.sty file? How did you install the latter? Richard
Re: Converting sty to layout
On 07/01/2010 03:46 PM, Andy S Feng wrote: Hi Vincent and Richard, now i am getting a different problem, I'm new to lyx 1.6.6.1 so i must be doing something erroneous. Let me detail my steps 1. Make copy of article.layout renamed as article-aer.layout 2. Changed - \DeclareLaTeXClass{article} To \DeclareLaTeXClass[article, aer.sty]{article (aer)} And added - Preamble \usepackage{aer} EndPreamble Better to use "AddToPreamble" here, lest you accidentally over-write something. 3. Saved article-aer.layout in C:\Program Files\LyX16\Resources\layouts 4. Open lyx, reconfigure, exit lyx 5. Reopen lyx, start new document, go to documents\settings choose "article (aer)" as document class, clicked OK 6. Tried a test document I did this much, with the attached layout file and aer.sty (from CTAN), and the simplest possible test file (nothing but "sss"), and it compiled fine. What else is in your document? Richard #% Do not delete the line below; configure depends on this # \DeclareLaTeXClass[article, aer.sty]{articlei (aer)} # Article textclass definition file. Taken from initial LyX source code # Author : Matthias Ettrich # Transposed by Pascal André # Heavily modifed and enhanced by serveral developers. Format 11 Input stdclass.inc SecNumDepth 3 TocDepth3 NoStyle Chapter NoStyle Chapter* AddToPreamble \usepackage{aer} EndPreamble Style Part Align Left AlignPossible Left TopSep2 BottomSep 1.5 Font SizeLarger EndFont End Style Part* Align Left AlignPossible Left TopSep2 BottomSep 1.5 Font SizeLarger EndFont End \message{Document style option `aer.sty' (29 May 1993) for LaTeX 2.09.} \textwidth=28pc \textheight=46pc \def\bysame{\leavevmode\hbox to\leftmargin{\leaders\hrule height 3pt depth -2.5pt\hfill\,\,}} \def\thebibliography#1{\section*{\refna...@mkboth {\uppercase{\refname}}{\uppercase{\refname}}}\list {...@biblabel{\arabic{enumiv}}}{\labelwidth=12pt \labelsep=0pt \leftmargin\labelwidth \advance\leftmargin\labelsep \itemsep=0pt\parsep=0pt \usecounter{enumiv}% \le...@enumiv\@empty \def\theenumiv{\arabic{enumiv}}}% \def\newblock{\hskip .11em plus.33em minus.07em}% \sloppy\clubpenalty4000\widowpenalty4000 \raggedright \sfcode`\.=1000\relax}
RE: Converting sty to layout
Hi Vincent and Richard, now i am getting a different problem, I'm new to lyx 1.6.6.1 so i must be doing something erroneous. Let me detail my steps 1. Make copy of article.layout renamed as article-aer.layout 2. Changed - \DeclareLaTeXClass{article} To \DeclareLaTeXClass[article, aer.sty]{article (aer)} And added - Preamble \usepackage{aer} EndPreamble 3. Saved article-aer.layout in C:\Program Files\LyX16\Resources\layouts 4. Open lyx, reconfigure, exit lyx 5. Reopen lyx, start new document, go to documents\settings choose "article (aer)" as document class, clicked OK 6. Tried a test document 7. Then tried to view DVI or PS Got the following error "Undefined control sequence. Undefined control sequence. LaTeX error: Missing \begin{document}." Etc With the following Description " \nopagenumbers 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." Advice much appreciated! Andy -Original Message- From: Richard Heck [mailto:rgh...@comcast.net] Sent: Thursday, 1 July, 2010 6:05 PM To: Vincent van Ravesteijn Cc: Andy S Feng; lyx-users@lists.lyx.org Subject: Re: Converting sty to layout On 07/01/2010 01:01 PM, Vincent van Ravesteijn wrote: >> 2) But once i select it and start typing, it reverts to the plain >> "article" layout which is the incorrect layout. >> >> > Can you explain what you do here exactly ? > > Is it reverted without any message ? Does it get reverted if you press > "Apply" ? Is it reverted after "OK" and opening the document settings > again ? > > We do need really detailed information about this. I can't imagine how this might happen. I've tried it with both 1.6.6 and trunk, and don't see any reversion no matter what I do. Richard Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/planningAndCorporatePolicy/legalandComplianceTeam/legal/disclaimer.htm
Re: Converting sty to layout
On 07/01/2010 01:01 PM, Vincent van Ravesteijn wrote: 2) But once i select it and start typing, it reverts to the plain “article” layout which is the incorrect layout. Can you explain what you do here exactly ? Is it reverted without any message ? Does it get reverted if you press "Apply" ? Is it reverted after "OK" and opening the document settings again ? We do need really detailed information about this. I can't imagine how this might happen. I've tried it with both 1.6.6 and trunk, and don't see any reversion no matter what I do. Richard
Re: Converting sty to layout
> 2) But once i select it and start typing, it reverts to the plain > “article” layout which is the incorrect layout. > Can you explain what you do here exactly ? Is it reverted without any message ? Does it get reverted if you press "Apply" ? Is it reverted after "OK" and opening the document settings again ? Which LyX Version are you using ? Vincent
Converting sty to layout
Hi all, I would like to know how to convert a sty file to a layout file. I have read the help\customization pages and followed the steps but it doesn't seem to work. My situation 1) Downloaded miktex along with lyx 2) Installed "vertex" latex package with miktex which includes an "aer.sty" file a. This "aer.sty" file is located in C:\Program Files\MiKTeX 2.8\tex\plain\vertex 3) Followed steps in lyx help\customization to create a layout file that is of the "article" class a. This "articleaer.layout" file is located in C:\Program Files\LyX16\Resources\layouts 4) Reconfigured lyx Problem 1) The "article (aer)" does appear in document\settings\document class 2) But once i select it and start typing, it reverts to the plain "article" layout which is the incorrect layout. Your advice on how i could solve this is most welcome! Andy Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/planningAndCorporatePolicy/legalandComplianceTeam/legal/disclaimer.htm