Re: Sty to Layout problem

2009-07-27 Thread Luis F . Amorim França
2009/7/23 rgheck 


> LyX thinks this is normal content, not something for before \maketitle. You
> need to put this in some kind of TitleERT environment, as mentioned before.
>
> rh


I edited the .layout file and added the statement:

Style TitleERT
  InTitle 1
End

then I used the TitleERT in a big ERT before the text. It almost worked,
except for some differences (at the e-mail font for example). Could that be
the fact that the .tex file in example uses another packages, like:

 \documentclass[12pt]{article}

 \usepackage{graphicx,url}

\usepackage[latin1]{inputenc}

I tried to add this at the preamble in the .layout file, but got an error.


2009/7/27 Daniel Lohmann 

>
> Depending on the peculiarities of the latex class, more or less stuff has
> to be given in ERT - maybe even the abstract. The example I have attached,
> for instance, uses the "IOS-Book" class, which  requires the abstract to be
> defined within a special frontmatter environment. Because I did not want to
> bother with getting the peculiarities of this class right into a LyX layout,
> I ended up with a big ERT box in the beginning and only the real content is
> written in LyX.
>
> The process: I usually use the latex example file that comes with the paper
> class as template, activate source preview in Lyx ("View->View Source", then
> check "Complete Source") to see what LyX would generate and then copy parts
> or larger chunks of the LaTeX example into ERT until the result looks
> compilable.
>
> Daniel
>
> I guess this is my case. I did a big ERT before the text (as mentioned
above) but something is still wrong. I'll try to do like you now, maybe it
works.


Thanks again!

Luis.


Re: Sty to Layout problem

2009-07-27 Thread Daniel Lohmann


On 24.07.2009, at 02:25, Luis F. Amorim França wrote:


Thanks Daniel!

I tried to create a document with a ERT like

\title(Paper Title)
\author{Luis}

but when I compile it, the document is empty. Trying to use the Lyx  
Title

and Author, I get this message:

\author{Luis}\maketitle

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


Depending on the peculiarities of the latex class, more or less stuff  
has to be given in ERT - maybe even the abstract. The example I have  
attached, for instance, uses the "IOS-Book" class, which  requires the  
abstract to be defined within a special frontmatter environment.  
Because I did not want to bother with getting the peculiarities of  
this class right into a LyX layout, I ended up with a big ERT box in  
the beginning and only the real content is written in LyX.


The process: I usually use the latex example file that comes with the  
paper class as template, activate source preview in Lyx ("View->View  
Source", then check "Complete Source") to see what LyX would generate  
and then copy parts or larger chunks of the LaTeX example into ERT  
until the result looks compilable.


Daniel


is-book-example.lyx
Description: Binary data







Hi Luis,

This may not be exactly the answer you are looking for :-)

IMHO the front matter (the stuff that is rendered by \maketitle) is  
the
most difficult part to get right into a LyX layout, especially with  
paper

styles. Every paper style uses different concepts on how authors,
institutions, multiple authors per institution, authors with multiple
institutions,  "thanks"-titlenotes, and so on have to be specified.  
So even
with the well-designed paper layout files that ship with LyX (LNCS,  
IEEE,
...) I usually end up using ERT in the front matter to get what I  
need.


So if you are not going to write dozens of articles using that  
style, I
would just not bother in getting everything right into the layout  
and use

ERT in the paper to specify the front matter.


Daniel


On 23.07.2009, ad 01:43, Luis Amorim wrote:

Hi,


I'm trying to write an article at Lyx, but I had some problems  
when I

tried
to use a .layout I created from the .sty file provided by the
conference. I've followed the Customization Instructions (5.2.3)  
but it


doesn't work at Lyx, especially when I try to add a Title (it says  
is a
\maketitle problem). Searching the mailing list I found someone  
who had

almost the same problem, and added

Style TitleERT
   InTitle 1

End

in the .layout to solve it. I tried to do that, but I still can't  
compile

my
files.

I attached the .sty and .layout files, and a .tex which is an  
example of

use.

Thanks!

Luis Amorim










Re: Sty to Layout problem

2009-07-23 Thread rgheck

On 07/23/2009 08:25 PM, Luis F. Amorim França wrote:

Thanks Daniel!

I tried to create a document with a ERT like

\title(Paper Title)
\author{Luis}

but when I compile it, the document is empty. Trying to use the Lyx Title
and Author, I get this message:

  \author{Luis}\maketitle

  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.

Am I doing something wrong?

   
LyX thinks this is normal content, not something for before \maketitle. 
You need to put this in some kind of TitleERT environment, as mentioned 
before.


rh


Re: Sty to Layout problem

2009-07-23 Thread Luis F . Amorim França
Thanks Daniel!

I tried to create a document with a ERT like

\title(Paper Title)
\author{Luis}

but when I compile it, the document is empty. Trying to use the Lyx Title
and Author, I get this message:

 \author{Luis}\maketitle

 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.

Am I doing something wrong?

Luis


2009/7/23 Daniel Lohmann 

> Hi Luis,
>
> This may not be exactly the answer you are looking for :-)
>
> IMHO the front matter (the stuff that is rendered by \maketitle) is the
> most difficult part to get right into a LyX layout, especially with paper
> styles. Every paper style uses different concepts on how authors,
> institutions, multiple authors per institution, authors with multiple
> institutions,  "thanks"-titlenotes, and so on have to be specified. So even
> with the well-designed paper layout files that ship with LyX (LNCS, IEEE,
> ...) I usually end up using ERT in the front matter to get what I need.
>
> So if you are not going to write dozens of articles using that style, I
> would just not bother in getting everything right into the layout and use
> ERT in the paper to specify the front matter.
>
>
> Daniel
>
>
> On 23.07.2009, ad 01:43, Luis Amorim wrote:
>
>  Hi,
>>
>> I'm trying to write an article at Lyx, but I had some problems when I
>> tried
>> to use a .layout I created from the .sty file provided by the
>> conference. I've followed the Customization Instructions (5.2.3) but it
>>
>> doesn't work at Lyx, especially when I try to add a Title (it says is a
>> \maketitle problem). Searching the mailing list I found someone who had
>> almost the same problem, and added
>>
>> Style TitleERT
>> InTitle 1
>>
>> End
>>
>> in the .layout to solve it. I tried to do that, but I still can't compile
>> my
>> files.
>>
>> I attached the .sty and .layout files, and a .tex which is an example of
>> use.
>>
>> Thanks!
>>
>> Luis Amorim
>>
>> 
>>
>
>


Re: Sty to Layout problem

2009-07-22 Thread Daniel Lohmann

Hi Luis,

This may not be exactly the answer you are looking for :-)

IMHO the front matter (the stuff that is rendered by \maketitle) is  
the most difficult part to get right into a LyX layout, especially  
with paper styles. Every paper style uses different concepts on how  
authors, institutions, multiple authors per institution, authors with  
multiple institutions,  "thanks"-titlenotes, and so on have to be  
specified. So even with the well-designed paper layout files that ship  
with LyX (LNCS, IEEE, ...) I usually end up using ERT in the front  
matter to get what I need.


So if you are not going to write dozens of articles using that style,  
I would just not bother in getting everything right into the layout  
and use ERT in the paper to specify the front matter.



Daniel

On 23.07.2009, ad 01:43, Luis Amorim wrote:


Hi,

I'm trying to write an article at Lyx, but I had some problems when  
I tried

to use a .layout I created from the .sty file provided by the
conference. I've followed the Customization Instructions (5.2.3) but  
it


doesn't work at Lyx, especially when I try to add a Title (it says  
is a
\maketitle problem). Searching the mailing list I found someone who  
had

almost the same problem, and added

Style TitleERT
 InTitle 1

End

in the .layout to solve it. I tried to do that, but I still can't  
compile my

files.

I attached the .sty and .layout files, and a .tex which is an  
example of

use.

Thanks!

Luis Amorim






Sty to Layout problem

2009-07-22 Thread Luis Amorim
Hi,

I'm trying to write an article at Lyx, but I had some problems when I tried
to use a .layout I created from the .sty file provided by the
conference. I've followed the Customization Instructions (5.2.3) but it
doesn't work at Lyx, especially when I try to add a Title (it says is a
\maketitle problem). Searching the mailing list I found someone who had
almost the same problem, and added

Style TitleERT
 InTitle 1
End

in the .layout to solve it. I tried to do that, but I still can't compile my
files.

I attached the .sty and .layout files, and a .tex which is an example of
use.

Thanks!

Luis Amorim


sbc-template.lyx
Description: Binary data


sbc-template.sty
Description: Binary data


sbc-template.tex
Description: TeX document


Sty to Layout problem

2009-07-09 Thread Luis Amorim
Hi,

I'm trying to write an article at Lyx, but I had some problems when I tried
to use a .layout that I created from the .sty file provided by the
conference. I've followed the Customization Instructions (5.2.3) but it
doesn't work at Lyx, especially when I try to add a Title (it says is a
\maketitle problem). Searching the mailing list I found someone who had
almost the same problem, and added

Style TitleERT
 InTitle 1
End

in the .layout to solve it. I tried to do that, but I still can't compile my
files.

I attached the .sty and .layout files, and a .tex which is an example of
use.

Thanks!

Luis Amorim
% LaTeX definitions for SBC 2001 style
%
% Created by Jomi Hubner & Rafael Bordini, june 2001
% updated march 2005

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{sbc-template}[2001/06/09]

% margem sup 3.5 cm: há 1,5 cm para header, + 2 cm para top
% margem inf 2.5 cm: há 1,5 cm para foot, + 1 cm para bottom
% margem esq/dir 3 cm
\RequirePackage[a4paper,top=3.5cm,left=3cm,right=3cm,bottom=2.5cm]{geometry}

\parindent 1.27cm
\parskip   6pt

\flushbottom

% captions
\RequirePackage[bf,sf,footnotesize,indent]{caption2}
\setlength{\captionmargin}{0.8cm}
\renewcommand{\captionfont}{\sffamily\footnotesize\bfseries}
\renewcommand{\captionlabeldelim}{.}

% font
\RequirePackage{times}

\renewcommand{\normalsize...@setfontsize\normalsize\@xii...@xivpt}
\newcommand{\xiiipt...@setfontsize\xiiipt{13}{17}}
\newcommand{\xvipt...@setfontsize\xvipt{16}{20}}

% new commands
\newcounter{instn}
\setcounter{instn}{1}
\newcommand{\instnum}{\arabic{instn}}
\newcommand{\inst}[1]{\ensuremath{^{#1}}}
\newcommand{\nextinstitute}{\\\mbox{}\\[-6pt] \addtocounter{instn}{1}\inst{\instnum}}
\newcommand{\email}[1]{\\\mbox{}\\[-6pt]\footnotesize\texttt{#1}}
\renewcommand{\and}{, }

% to avoid [...] in the bibliography
% \item[] instead of \ite...@biblabel{#1}\hfill]
\d...@lbibitem[#1]#2{\item[]\if@filesw
  {\let\protect\noexpand
   \immediate
   \wri...@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}
\renewenvironment{thebibliography}[1]
 {\section*{\refname
\...@mkboth{\makeuppercase\refname}{\makeuppercase\refname}}%
  \lis...@biblabel{\@arabi...@enumiv}}%
   {\settowidth\labelwidt...@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
%% changed!
   \itemindent -\leftmargin
   \itemsep 6pt
%%%
\...@openbib@code
\usecounter{enumiv}%
\le...@enumiv\@empty
\renewcommand\theenumi...@arabic\c@enumiv}}%
  \sloppy
  \clubpenalty4000
  \...@clubpenalty \clubpenalty
  \widowpenalty4000%
  \sfcode`...@m}
 {\d...@noitemerr
   {...@latex@warning{Empty `thebibliography' environment}}%
  \endlist}


% itens
\setlength\leftmargini   {1.27cm}
\setlength\leftmargin{\leftmargini}
\setlength\leftmarginii  {\leftmargini}
\setlength\leftmarginiii {\leftmargini}
\setlength\leftmarginiv  {\leftmargini}
\setlength  \labelsep{.5em}
\setlength  \labelwidth  {\leftmargini}
\addtolength\labelwidth  {-\labelsep}
\d...@listi{\leftmargin\leftmargini
\parsep 0\p@ \...@plus1\p@ \...@minus\p@
\topsep 0\p@ \...@plus2\p@ \...@minus4\p@
\itemsep...@}
\l...@listi\@listI
\...@listi
\d...@listii {\leftmargin\leftmarginii
  \labelwidth\leftmarginii
  \advance\labelwidth-\labelsep
  \topsep0\p@ \...@plus2\p@ \...@minus\p@}
\d...@listiii{\leftmargin\leftmarginiii
  \labelwidth\leftmarginiii
  \advance\labelwidth-\labelsep
  \topsep0\p@ \...@plus\p@\...@minus\p@
  \parsep\z@
  \partopsep \p@ \...@plus\z@ \...@minus\p@}


% sections
\renewcommand\sectio...@startsection{section}{1}{\z@}%
   {-6\p@ \...@plus -4\p@ \...@minus -...@}%
   {0\p@ \...@plus 4\p@ \...@minus 4...@}%
   {\normalfont\XIIIPT\bfseries\boldmath
\rightskip=\z@ \...@plus 8em\pretolerance=1 }}

\renewcommand\subsectio...@startsection{subsection}{2}{\z@}%
   {-6\p@ \...@plus -4\p@ \...@minus -...@}%
   {0\p@ \...@plus 4\p@ \...@minus 4...@}%
   {\normalfont\normalsize\bfseries\boldmath
\rightskip=\z@ \...@plus 8em\pretolerance=1 }}

%\renewcommand{\thesection}{\arabic{section}.}
%\renewcommand{\thesubsection}{\thesection\arabic{subsection}.}
%\renewcommand{\thesubsubsection}{\thesubsection\arabic{subsubsection}.}

\RequirePackage{titlesec}
\titlelabel{\thetitle.\hspace{1ex}}

% first page

\pagestyle{empty}

\newcommand{\authortag}[1]{$^{#1}$}

\def\address#1{\gd...@address{#1}}

\d...@maketitle{\newpage
 %\null % isso dava um espaco extra antes do title
 \begin{center}
   %\vglue -6pt
%   \vspace*{12pt}
\vspace*{-.7cm}
  {\xvipt\...@title\par}
   \vglue 6pt plus 3pt minus 3pt
  {\n