Re: Custom Paragraph Styles -- Can I add things to the preamble?

2009-03-10 Thread Guenter Milde
On 2009-03-09, Ross O'Connell wrote:
 I'm trying to put together a LyX layout for JHEP3.cls.  This is fairly 
 widely used in physics, and produces a nice titlepage and toc.  It has 
 the peculiarity that all of the titlepage type material (title, authors, 
 abstract, etc.) has to appear /before/ the \begin{document} command.  
 I'd like to be able to edit these things through the main LyX interface, 
 rather than through the preamble window, so I was wondering if there's a 
 way to define a new paragraph style that would put the contents in the 
 preamble, rather than after it.

A Style that writes into the preamble is impossible.

But there is a workaround: A separate document with just the Preamble
Styles that is exported to TeX and included from the main document preamble
with \input{thepreamble.tex}.

You could also file an enhancement request to bugzilla asking for a
InPreamble keyword (similar to InTitle).


Günter



Re: Custom Paragraph Styles -- Can I add things to the preamble?

2009-03-10 Thread Guenter Milde
On 2009-03-09, Ross O'Connell wrote:
 I'm trying to put together a LyX layout for JHEP3.cls.  This is fairly 
 widely used in physics, and produces a nice titlepage and toc.  It has 
 the peculiarity that all of the titlepage type material (title, authors, 
 abstract, etc.) has to appear /before/ the \begin{document} command.  
 I'd like to be able to edit these things through the main LyX interface, 
 rather than through the preamble window, so I was wondering if there's a 
 way to define a new paragraph style that would put the contents in the 
 preamble, rather than after it.

A Style that writes into the preamble is impossible.

But there is a workaround: A separate document with just the Preamble
Styles that is exported to TeX and included from the main document preamble
with \input{thepreamble.tex}.

You could also file an enhancement request to bugzilla asking for a
InPreamble keyword (similar to InTitle).


Günter



Re: Custom Paragraph Styles -- Can I add things to the preamble?

2009-03-10 Thread Guenter Milde
On 2009-03-09, Ross O'Connell wrote:
> I'm trying to put together a LyX layout for JHEP3.cls.  This is fairly 
> widely used in physics, and produces a nice titlepage and toc.  It has 
> the peculiarity that all of the titlepage type material (title, authors, 
> abstract, etc.) has to appear /before/ the \begin{document} command.  
> I'd like to be able to edit these things through the main LyX interface, 
> rather than through the preamble window, so I was wondering if there's a 
> way to define a new paragraph style that would put the contents in the 
> preamble, rather than after it.

A Style that writes into the preamble is impossible.

But there is a workaround: A separate document with just the "Preamble
Styles" that is exported to TeX and included from the main document preamble
with \input{thepreamble.tex}.

You could also file an enhancement request to bugzilla asking for a
"InPreamble" keyword (similar to "InTitle").


Günter



Custom Paragraph Styles -- Can I add things to the preamble?

2009-03-09 Thread Ross O'Connell
I'm trying to put together a LyX layout for JHEP3.cls.  This is fairly 
widely used in physics, and produces a nice titlepage and toc.  It has 
the peculiarity that all of the titlepage type material (title, authors, 
abstract, etc.) has to appear /before/ the \begin{document} command.  
I'd like to be able to edit these things through the main LyX interface, 
rather than through the preamble window, so I was wondering if there's a 
way to define a new paragraph style that would put the contents in the 
preamble, rather than after it.


I've read through section 5.3 of the Cusotmization file, looked at a 
few of the standard layout files, and looked through the forums a bit, 
but haven't found a way to make this happen.  I noticed the Preamble 
command, but it sounds like that only put some fixed text into the 
preamble, whereas I want to be able to type something e.g. the JHEP 
Abstract environment in LyX and have it appear in \abstract{...} 
/before/ the \begin{document} command.


Is there any way to make this happen?

-ross


Re: Custom Paragraph Styles -- Can I add things to the preamble?

2009-03-09 Thread Steve Litt
On Monday 09 March 2009 06:06:00 pm Ross O'Connell wrote:
 I'm trying to put together a LyX layout for JHEP3.cls.  This is fairly
 widely used in physics, and produces a nice titlepage and toc.  It has
 the peculiarity that all of the titlepage type material (title, authors,
 abstract, etc.) has to appear /before/ the \begin{document} command.
 I'd like to be able to edit these things through the main LyX interface,
 rather than through the preamble window, so I was wondering if there's a
 way to define a new paragraph style that would put the contents in the
 preamble, rather than after it.

 I've read through section 5.3 of the Cusotmization file, looked at a
 few of the standard layout files, and looked through the forums a bit,
 but haven't found a way to make this happen.  I noticed the Preamble
 command, but it sounds like that only put some fixed text into the
 preamble, whereas I want to be able to type something e.g. the JHEP
 Abstract environment in LyX and have it appear in \abstract{...}
 /before/ the \begin{document} command.

 Is there any way to make this happen?

 -ross

Within a week or two I'll be posting a web page discussing how to make it 
happen.

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US



Custom Paragraph Styles -- Can I add things to the preamble?

2009-03-09 Thread Ross O'Connell
I'm trying to put together a LyX layout for JHEP3.cls.  This is fairly 
widely used in physics, and produces a nice titlepage and toc.  It has 
the peculiarity that all of the titlepage type material (title, authors, 
abstract, etc.) has to appear /before/ the \begin{document} command.  
I'd like to be able to edit these things through the main LyX interface, 
rather than through the preamble window, so I was wondering if there's a 
way to define a new paragraph style that would put the contents in the 
preamble, rather than after it.


I've read through section 5.3 of the Cusotmization file, looked at a 
few of the standard layout files, and looked through the forums a bit, 
but haven't found a way to make this happen.  I noticed the Preamble 
command, but it sounds like that only put some fixed text into the 
preamble, whereas I want to be able to type something e.g. the JHEP 
Abstract environment in LyX and have it appear in \abstract{...} 
/before/ the \begin{document} command.


Is there any way to make this happen?

-ross


Re: Custom Paragraph Styles -- Can I add things to the preamble?

2009-03-09 Thread Steve Litt
On Monday 09 March 2009 06:06:00 pm Ross O'Connell wrote:
 I'm trying to put together a LyX layout for JHEP3.cls.  This is fairly
 widely used in physics, and produces a nice titlepage and toc.  It has
 the peculiarity that all of the titlepage type material (title, authors,
 abstract, etc.) has to appear /before/ the \begin{document} command.
 I'd like to be able to edit these things through the main LyX interface,
 rather than through the preamble window, so I was wondering if there's a
 way to define a new paragraph style that would put the contents in the
 preamble, rather than after it.

 I've read through section 5.3 of the Cusotmization file, looked at a
 few of the standard layout files, and looked through the forums a bit,
 but haven't found a way to make this happen.  I noticed the Preamble
 command, but it sounds like that only put some fixed text into the
 preamble, whereas I want to be able to type something e.g. the JHEP
 Abstract environment in LyX and have it appear in \abstract{...}
 /before/ the \begin{document} command.

 Is there any way to make this happen?

 -ross

Within a week or two I'll be posting a web page discussing how to make it 
happen.

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US



Custom Paragraph Styles -- Can I add things to the preamble?

2009-03-09 Thread Ross O'Connell
I'm trying to put together a LyX layout for JHEP3.cls.  This is fairly 
widely used in physics, and produces a nice titlepage and toc.  It has 
the peculiarity that all of the titlepage type material (title, authors, 
abstract, etc.) has to appear /before/ the \begin{document} command.  
I'd like to be able to edit these things through the main LyX interface, 
rather than through the preamble window, so I was wondering if there's a 
way to define a new paragraph style that would put the contents in the 
preamble, rather than after it.


I've read through section 5.3 of the "Cusotmization" file, looked at a 
few of the standard layout files, and looked through the forums a bit, 
but haven't found a way to make this happen.  I noticed the "Preamble" 
command, but it sounds like that only put some fixed text into the 
preamble, whereas I want to be able to type something e.g. the "JHEP 
Abstract" environment in LyX and have it appear in \abstract{...} 
/before/ the \begin{document} command.


Is there any way to make this happen?

-ross


Re: Custom Paragraph Styles -- Can I add things to the preamble?

2009-03-09 Thread Steve Litt
On Monday 09 March 2009 06:06:00 pm Ross O'Connell wrote:
> I'm trying to put together a LyX layout for JHEP3.cls.  This is fairly
> widely used in physics, and produces a nice titlepage and toc.  It has
> the peculiarity that all of the titlepage type material (title, authors,
> abstract, etc.) has to appear /before/ the \begin{document} command.
> I'd like to be able to edit these things through the main LyX interface,
> rather than through the preamble window, so I was wondering if there's a
> way to define a new paragraph style that would put the contents in the
> preamble, rather than after it.
>
> I've read through section 5.3 of the "Cusotmization" file, looked at a
> few of the standard layout files, and looked through the forums a bit,
> but haven't found a way to make this happen.  I noticed the "Preamble"
> command, but it sounds like that only put some fixed text into the
> preamble, whereas I want to be able to type something e.g. the "JHEP
> Abstract" environment in LyX and have it appear in \abstract{...}
> /before/ the \begin{document} command.
>
> Is there any way to make this happen?
>
> -ross

Within a week or two I'll be posting a web page discussing how to make it 
happen.

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US