On Thu, Oct 15, 2015 at 3:59 PM, Weijie Chen <[email protected]> wrote:
> ________________________________________
> From: Jean-Marc Lasgouttes <[email protected]>
> Sent: Thursday, October 15, 2015 2:52 AM
> To: Weijie Chen; [email protected]
> Subject: Re: Lyx fundamental problem in interpreting new document classes?
>
> Le 14/10/15 18:05, Weijie Chen a écrit :
>> Thank you for your response. Here is the layout file. This is the file I 
>> created following the many instructions online on how to add  a new document 
>> class to lyx. I appreciate if you tell me how to change this file so that 
>> lyx works properly.
>>
>> Thank you again!
>>
>> $ more sagej.layout
>>
>> #% Do not delete the line below; configure depends on this
>> # \DeclareLaTeXClass[sagej]{article (sagej)}
>> # Input general definitions
>> Input stdclass.inc
>>
>
> Hello,
>
> First please keep discussions on list. You never know when answers will
> be useful to someone else.
>
> The code you show above creates a class equivalent to the default
> article class. Since this class does not contain any notion of keyword,
> you don't have any either. The goal of the .layout file is to tell LyX
> what features the cls file contains.
>
> In this case, I would propose to add the following snippet (stolen from
> jasatex.layout) to your layout file.
>
> Hope this helps.
>
> JMarc
>
>
> Style Keywords
>          Margin          Dynamic
>          LatexType       Command
>          LatexName       keywords
>          Category        FrontMatter
>          InTitle         1
>          NextNoIndent    1
>          BottomSep       0.5
>          ParSkip         0.4
>          Align           Block
>          AlignPossible   Block
>          LabelSep        xx
>          LabelType       Static
>          LabelString     "Keywords:"
>          LabelFont
>            Series        Bold
>          EndFont
> End
>
>
> Thank you for the suggestion. This solves the first problem, namely the 
> "Keywords" is now an item in the layout drop-down menu. However, still both 
> the abstract and the keywords do not show in the output PDF file. Any further 
> hints on that?
>

> Also, is there a tutorial on how to write a  layout file like what you 
> suggested? I tried to search but didn't find one. Maybe this is not specific 
> to Lyx but a general Tex topic - for some cls files a simple article-type of 
> layout file like what I pasted just works fine. I'm apparently not a Tex 
> expert, but would like to learn if anyone can point me to a 
> tutorial/manual/etc.
>
Not exactly a tutorial, but the ref is in Help > Customization >
Section 5.3. It is a bit dense for beginners, but it's a start.
Usually you take an existing working layout example as close to what
you need, try to understand its syntax by looking at the reference
manual, then try to modify as you think would yield useful results.

Regards,
Liviu


-- 
Do you think you know what math is?
http://www.ideasroadshow.com/issues/ian-stewart-2013-08-02
Or what it means to be intelligent?
http://www.ideasroadshow.com/issues/john-duncan-2013-08-30
Think again:
http://www.ideasroadshow.com/library

Reply via email to