Re: Document-specific layout extensions

2007-02-24 Thread Steve Litt
On Wednesday 21 February 2007 12:02, Daniel Lohmann wrote:
 Hi,

 I am looking for way to extend or customize the LyX layout (such as the
 available styles) for a particular document only. While I know how to tweak
 layouts in the global or user-specific Resources/layouts/ folder, I would
 like to avoid this, as the document is shared with a couple of other users
 and I don't want them to have to modify their personal configuration. The
 document (which otherwise uses just standard classes and a standard layout)
 should be editable out of the box.

I do this on every document I write. I make a new .layout file, for the book, 
in the directory containing the book. The new layout style starts something 
like this:

#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[book]{tsjfbook}

Then I add/redefine any environments I desire.

The final step is making the file a symlink so it automatically works with 
LyX:

ln -s /data/books/tsjf/tsjfbook.layout /home/slitt/.lyx/layouts/tsjfbook.layout

Then within LyX I Tools-reconfigure, and the new styles are visible.

HTH

SteveT

Steve Litt
Author: Universal Troubleshooting Process books and courseware
http://www.troubleshooters.com/


Re: Document-specific layout extensions

2007-02-24 Thread Steve Litt
On Wednesday 21 February 2007 12:02, Daniel Lohmann wrote:
 Hi,

 I am looking for way to extend or customize the LyX layout (such as the
 available styles) for a particular document only. While I know how to tweak
 layouts in the global or user-specific Resources/layouts/ folder, I would
 like to avoid this, as the document is shared with a couple of other users
 and I don't want them to have to modify their personal configuration. The
 document (which otherwise uses just standard classes and a standard layout)
 should be editable out of the box.

I do this on every document I write. I make a new .layout file, for the book, 
in the directory containing the book. The new layout style starts something 
like this:

#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[book]{tsjfbook}

Then I add/redefine any environments I desire.

The final step is making the file a symlink so it automatically works with 
LyX:

ln -s /data/books/tsjf/tsjfbook.layout /home/slitt/.lyx/layouts/tsjfbook.layout

Then within LyX I Tools-reconfigure, and the new styles are visible.

HTH

SteveT

Steve Litt
Author: Universal Troubleshooting Process books and courseware
http://www.troubleshooters.com/


Re: Document-specific layout extensions

2007-02-24 Thread Steve Litt
On Wednesday 21 February 2007 12:02, Daniel Lohmann wrote:
> Hi,
>
> I am looking for way to extend or customize the LyX layout (such as the
> available styles) for a particular document only. While I know how to tweak
> layouts in the global or user-specific Resources/layouts/ folder, I would
> like to avoid this, as the document is shared with a couple of other users
> and I don't want them to have to modify their personal configuration. The
> document (which otherwise uses just standard classes and a standard layout)
> should be editable "out of the box".

I do this on every document I write. I make a new .layout file, for the book, 
in the directory containing the book. The new layout style starts something 
like this:

#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[book]{tsjfbook}

Then I add/redefine any environments I desire.

The final step is making the file a symlink so it automatically works with 
LyX:

ln -s /data/books/tsjf/tsjfbook.layout /home/slitt/.lyx/layouts/tsjfbook.layout

Then within LyX I Tools->reconfigure, and the new styles are visible.

HTH

SteveT

Steve Litt
Author: Universal Troubleshooting Process books and courseware
http://www.troubleshooters.com/


Re: Document-specific layout extensions

2007-02-23 Thread Daniel Lohmann
Georg Baum wrote:
 [...] 
 I would suggest to create a layout file that you ship together with your 
 document. It should have a new name, so that users can simply copy it into 
 their resource directory and reconfigure LyX. If you change the file and 
 ship an update then the reconfigure step is not even necessary, it is 
 enough to overwrite the old file with the new version.

Thanks, Georg - excellent suggestion!

I never thought about the possibility to have more than one layout file
for a specific latex document class. Obviously this makes a lot of sense.


Daniel


Re: Document-specific layout extensions

2007-02-23 Thread Daniel Lohmann
Georg Baum wrote:
 [...] 
 I would suggest to create a layout file that you ship together with your 
 document. It should have a new name, so that users can simply copy it into 
 their resource directory and reconfigure LyX. If you change the file and 
 ship an update then the reconfigure step is not even necessary, it is 
 enough to overwrite the old file with the new version.

Thanks, Georg - excellent suggestion!

I never thought about the possibility to have more than one layout file
for a specific latex document class. Obviously this makes a lot of sense.


Daniel


Re: Document-specific layout extensions

2007-02-23 Thread Daniel Lohmann
Georg Baum wrote:
> [...] 
> I would suggest to create a layout file that you ship together with your 
> document. It should have a new name, so that users can simply copy it into 
> their resource directory and reconfigure LyX. If you change the file and 
> ship an update then the reconfigure step is not even necessary, it is 
> enough to overwrite the old file with the new version.

Thanks, Georg - excellent suggestion!

I never thought about the possibility to have more than one layout file
for a specific latex document class. Obviously this makes a lot of sense.


Daniel


Re: Document-specific layout extensions

2007-02-21 Thread Georg Baum
Am Mittwoch, 21. Februar 2007 18:02 schrieb Daniel Lohmann:
 Hi,
 
 I am looking for way to extend or customize the LyX layout (such as the 
 available styles) for a particular document only. While I know how to 
tweak 
 layouts in the global or user-specific Resources/layouts/ folder, I would 
 like to avoid this, as the document is shared with a couple of other 
users 
 and I don't want them to have to modify their personal configuration. The 
 document (which otherwise uses just standard classes and a standard 
layout) 
 should be editable out of the box.
 
  From what I have found so far, this does not seem to be possible with 
1.4.x.

That is true.

 LyX already offers means for document-specific extensions to the LaTeX 
 preamble. It would be just consequent to provide something similar for 
 document-specific extensions to the layout as well.
 
 One possibility might be to look up .layout and .inc files in the 
documents 
 path first, something like a document-specific LyxUser directory. 
 Everything not found there is then looked up in the ordinary LyxUser 
 directory and finally in the global LyxDir.

You are not the first one who requests this. It makes a lot of sense, and 
there is even a bugzilla entry IIRC. The only reason why this is not 
implemented yet is that nobody volunteered so far.

I would suggest to create a layout file that you ship together with your 
document. It should have a new name, so that users can simply copy it into 
their resource directory and reconfigure LyX. If you change the file and 
ship an update then the reconfigure step is not even necessary, it is 
enough to overwrite the old file with the new version.

 Any plans in this direction for 1.5?

No. 1.5 is in feature freeze mode to get the remaining bugs ironed out.


Georg



Re: Document-specific layout extensions

2007-02-21 Thread Georg Baum
Am Mittwoch, 21. Februar 2007 18:02 schrieb Daniel Lohmann:
 Hi,
 
 I am looking for way to extend or customize the LyX layout (such as the 
 available styles) for a particular document only. While I know how to 
tweak 
 layouts in the global or user-specific Resources/layouts/ folder, I would 
 like to avoid this, as the document is shared with a couple of other 
users 
 and I don't want them to have to modify their personal configuration. The 
 document (which otherwise uses just standard classes and a standard 
layout) 
 should be editable out of the box.
 
  From what I have found so far, this does not seem to be possible with 
1.4.x.

That is true.

 LyX already offers means for document-specific extensions to the LaTeX 
 preamble. It would be just consequent to provide something similar for 
 document-specific extensions to the layout as well.
 
 One possibility might be to look up .layout and .inc files in the 
documents 
 path first, something like a document-specific LyxUser directory. 
 Everything not found there is then looked up in the ordinary LyxUser 
 directory and finally in the global LyxDir.

You are not the first one who requests this. It makes a lot of sense, and 
there is even a bugzilla entry IIRC. The only reason why this is not 
implemented yet is that nobody volunteered so far.

I would suggest to create a layout file that you ship together with your 
document. It should have a new name, so that users can simply copy it into 
their resource directory and reconfigure LyX. If you change the file and 
ship an update then the reconfigure step is not even necessary, it is 
enough to overwrite the old file with the new version.

 Any plans in this direction for 1.5?

No. 1.5 is in feature freeze mode to get the remaining bugs ironed out.


Georg



Re: Document-specific layout extensions

2007-02-21 Thread Georg Baum
Am Mittwoch, 21. Februar 2007 18:02 schrieb Daniel Lohmann:
> Hi,
> 
> I am looking for way to extend or customize the LyX layout (such as the 
> available styles) for a particular document only. While I know how to 
tweak 
> layouts in the global or user-specific Resources/layouts/ folder, I would 
> like to avoid this, as the document is shared with a couple of other 
users 
> and I don't want them to have to modify their personal configuration. The 
> document (which otherwise uses just standard classes and a standard 
layout) 
> should be editable "out of the box".
> 
>  From what I have found so far, this does not seem to be possible with 
1.4.x.

That is true.

> LyX already offers means for document-specific extensions to the LaTeX 
> preamble. It would be just consequent to provide something similar for 
> document-specific extensions to the layout as well.
> 
> One possibility might be to look up .layout and .inc files in the 
documents 
> path first, something like a document-specific LyxUser directory. 
> Everything not found there is then looked up in the ordinary LyxUser 
> directory and finally in the global LyxDir.

You are not the first one who requests this. It makes a lot of sense, and 
there is even a bugzilla entry IIRC. The only reason why this is not 
implemented yet is that nobody volunteered so far.

I would suggest to create a layout file that you ship together with your 
document. It should have a new name, so that users can simply copy it into 
their resource directory and reconfigure LyX. If you change the file and 
ship an update then the reconfigure step is not even necessary, it is 
enough to overwrite the old file with the new version.

> Any plans in this direction for 1.5?

No. 1.5 is in feature freeze mode to get the remaining bugs ironed out.


Georg