LyXPNAS layout in lyx

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
SpectrumX
Posts: 7
Joined: Fri Dec 20, 2013 5:55 pm

PNAS layout in lyx

Post by SpectrumX »

Hello all, I am trying to write a simple layout for the PNAS Article in LYX (2.1). I tried to use the Article.layout as a starting point but I was not successful. I also tried to import the PNAS tempalte.tex into lyx but always got errors during the tex import. I am now stuck and do not know what to do. Your help would be most appreciated.

Please not that the required pnastwoF.sty and pnastwo.cls are in the right place under /usr/share/texmf/tex/latex/PNAS, I am using Debian 7, and lyx does not complain about any of these two classes/styles.

Please see the following link for the PNAS journal's Latex templates and classes:
http://www.pnas.org/site/authors/LaTex.xhtml

or see the attached files.

Thanks for your help in advance.
Attachments
PNASTMPL.TEX
PNAS LaTeX Template
(8.24 KiB) Downloaded 289 times
PNASTWOS.TEX
Sample .TEX file
(15.53 KiB) Downloaded 292 times
pnastwo.cls
PNAS Class File
(97.8 KiB) Downloaded 284 times
pnastwoF.sty
PNAS Style File
(10.24 KiB) Downloaded 332 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
SpectrumX
Posts: 7
Joined: Fri Dec 20, 2013 5:55 pm

PNAS layout in lyx

Post by SpectrumX »

Just an update on error faced.

I had to disable the following in the preamble:

Code: Select all

%\usepackage[dvips]{graphicx}
%\usepackage{pnastwoF}
and used a simple layout as follows:

Code: Select all

#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[pnastwo]{article (Proceedings of the National Academy of Science, PNAS)}
# Input general definitions
Input stdclass.inc
With normal (standard) text in the document I get no errors. When I try to add Titles or Authors I get the very annoying error below:

Code: Select all

Missing Number, treated as zero.
 \maketitle
            
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
Any Idea what is going wrong?

I still need to continue trying to sort this out until hopefully get some feedback from someone with better expertise in LATEX and LYX than myself.

Thanks
SpectrumX
Posts: 7
Joined: Fri Dec 20, 2013 5:55 pm

PNAS layout in lyx

Post by SpectrumX »

Another update:

I found the following forum http://tex.stackexchange.com/questions/ ... nt-find-hv in which the font-related problem are solved. Now I can activate the line : \usepackage{pnastwoF} in permeable.

Now lyx preamble look as following with no errors:

Code: Select all

%% ADDITIONAL OPTIONAL STYLE FILES
%\usepackage[dvips]{graphicx}
\usepackage{pnastwoF}
\usepackage{amssymb,amsfonts,amsmath}


%% OPTIONAL MACRO DEFINITIONS
\def\s{\sigma}


%%%%%%%%%%%%
%% For PNAS Only:
\url{www.pnas.org/cgi/doi/10.1073/pnas.0709640104}
\copyrightyear{2008}
\issuedate{Issue Date}
\volume{Volume}
\issuenumber{Issue Number}
\setcounter{page}{2687} %Set page number here if desired
%%%%%%%%%%%%
SpectrumX
Posts: 7
Joined: Fri Dec 20, 2013 5:55 pm

PNAS layout in lyx

Post by SpectrumX »

One more update:

Regarding the title and author error. I did the following to g round the above problem:

Simply use the following command in lyx instead of using the title, author etc from the menu.

Code: Select all

\title{Almost sharp fronts for the surface geostrophic equation}

\author{Roberta Graff\affil{1}{University of Cambridge, Cambridge, United Kingdom}, Javier de Ruiz Garcia\affil{2}{Universidad de Murcia, Bioquimica y Biologia Molecular, Murcia, Spain}, \and Franklin Sonnery\affil{2}{}}

\contributor{Submitted to Proceedings of the National Academy of Sciences of the United States of America}

\maketitle % The \maketitle command is necessary to build the title page 

It seems that the PNAS class do not like the way how lyx handels the

Code: Select all

\maketitle 
command.

I must mention that I also tried both inserting Tables, Figures and Bibliographies and all worked fine.
Post Reply