9

I want to write a paper for a conference that requires the use of a specific style-sheet, see here: http://www.acl2012.org/call/sub01.asp under "ACL 2012 Style Files".

I would like to use LyX for writing the paper, but, as far as I see, LyX works with .layout files.

How can I convert the acl2012.sty file to a format that LyX can understand?

2
  • 2
    Did you check the LyX help file "Customization", here item 5.2.2? I think this answers your question.
    – vaettchen
    Oct 15, 2012 at 15:12
  • @vaettchen Can you turn your comment into an answer (maybe expanding it a bit)?
    – egreg
    Feb 2, 2013 at 22:23

2 Answers 2

5

Taken from the LyX help file and adapted for the given circumstances:

Start by copying the existing class's layout file into your local directory (I assume the underlying class is report and we work in Linux):

cp report.layout ~/.lyx/layouts/acl2012.layout

Then edit acl2012.layout and change the line:

\DeclareLaTeXClass{report}

to read

\DeclareLaTeXClass[report, acl2012.sty]{report (acl2012)}

Then add:

Preamble     
    \usepackage{acl2012}
EndPreamble

near the top of the file.

Start LyX and select Tools->Reconfigure. Then restart LyX and try creating a new document. You should see report (acl2012) as a document class option in the Document->Settings dialog.

In case of complications (sectioning commands working differently etc.) consult the LyX help file that contains further information.

2
  • Thank you! Can you please add explanation about how to incorporate the bibliography style file - acl.bst ? Usually .sty and .bst files change together, so it makes sense to relate to both of them... Feb 5, 2013 at 5:08
  • Have you tried copying the .bst file into the same directory where your .lyx file is, and then using the style as is from there? You would call the usual Insert -> List / TOC -> BibTex Bibliography menu and select the acl2012 from the browse window. I didn't check this specific one thoroughly but it should work.
    – vaettchen
    Feb 5, 2013 at 7:08
4

The easy way:

  1. Put the .sty file in the same folder which contains the .lyx file.

  2. Open the .lyx file, go to Documents > Settings > LaTeX preamble.

  3. Add this code:

    \usepackage{acl2012}
    
  4. Click apply.

Regards

3
  • How is this different compared to the answer by vaettchen, apart from being shorter and missing some proper formatting?
    – user31729
    Aug 3, 2015 at 7:17
  • @ChristianHupfer Different technique. vaettchen's answer sets up a custom layout so you can select this, and that layout includes adding the package to the preamble. Mandrivagnome's answer just involves adding the package to the preamble (the part the user can modify). Aug 3, 2015 at 7:25
  • @TorbjørnT. Alright, accepted
    – user31729
    Aug 3, 2015 at 7:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .