4

A possible duplicate using LYX to write journal with given formatting but re-adding for no answers given. The comment to abstain from "LyX-ifying" isn't very helpful and moreover, I have an extensive query.

Any conference/ journal template will generally provide with .cls, .aux, .bib, .bbl, .tex, .blg, .bst files. What are the roles of these files?

How can one integrate these files to LyX? Where should you place these files and how can you get started?

For the operating system, I'm on Ubuntu 12.04.

Note: Even apposite references will be appreciated. I highly appreciate the pure code users but kindly allow novices to advance as well.

  • 1
    Welcome to TeX.SX! You can have a look on our our starter page to familiarize yourself further with our format. – Claudio Fiandrino Jul 9 '13 at 13:26
  • Thanks @ClaudioFiandrino, I hope stackexchange format is same across sites. I just don't know why it didn't sync TeX.SX with my stackoverflow or math.stackexchange accounts. – Aseem Dua Jul 9 '13 at 13:36
  • On your account it seems that Mathematics and TeX are already merged... – Claudio Fiandrino Jul 9 '13 at 13:39
  • Thanks! I was wondering why doesn't sync my reputation points. Anyways, that is not an issue, I'm more interested in the answer to this question! – Aseem Dua Jul 9 '13 at 15:08
3

Any conference/ journal template will generally provide with .cls, .aux, .bib, .bbl, .tex, .blg, .bst files. What are the roles of these files?

.cls is a document class file (like the standard article or report; you use them via \documentclass) .bst is a bibliography style file (written in bibtex's own Forth-like language). These are actual style files you need to point LyX to; the rest either belong to an example paper (.bib, .tex) or are temporary files produced when this paper is compiled (.aux, .bbl, .blg) — probably included in the style pack by mistake. There may be some .sty files present as well (these are the ones you include via \usepackage).

How can one integrate these files to LyX? Where should you place these files and how can you get started?

The files (.cls, .sty, .bst) should be placed to standard TeX search directories. These may vary depending on OS/distribution, and on TeX distribution. For example, on Ubuntu and with TexLive, these are:

  • ~/texmf/ if you want these files to be accessible for you only, and
  • /usr/share/texmf/ if you want them to be accessible system-wide.

(see https://help.ubuntu.com/community/LaTeX for details). In order to test that this part works, take .tex and .bib files from the conference/journal pack, place them in the separate directory and try to compile with TeX.

Now for the layout. LyX layouts are the way to describe how the style's sectioning commands and (possibly) other macros are represented in LyX's GUI. For example, this code in the layout file (taken from RevTeX layout file, with some omissions for simplicity):

Style Affiliation
    Category              FrontMatter
    LatexType             Command
    InTitle               1
    LatexName             affiliation
    LabelType             Static
    LabelString           "Affiliation:"
    LabelFont
        Shape               Italic
    EndFont
End

adds "Affiliation" to the list of styles at the top left, in the "FrontMatter" category, and when you select it, it shows the label "Affiliation:" in italic to the left from the paragraph you are typing; and when the file is compiled, this paragraph is placed into the \affiliation{} macro.

Fairly extensive documentation can be found in LyX docs, "Customization" part, section 5 "Installing New Document Classes, Layouts, and Templates". Or you can just look for existing layout files (not sure where LyX keeps them on Ubuntu, look for *.layout) and hack away.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.