Re: templates handling

2017-05-25 Thread Scott Kostyshak
On Thu, Apr 20, 2017 at 05:02:41PM +, Guenter Milde wrote:
> Dear LyXers,
> 
> background reading for the "reorganize templates folder" ticket, I found an
> interesting statement in the Customization guide (5.2.4 Creating templates):
> 
> 
>   Templates are created just like usual documents: using LyX. The only
>   difference is that usual documents contain all possible settings,
>   including the font scheme and the paper size. Usually a user doesn't
>   want a template to overwrite his preferred settings for such
>   parameters. For that reason, the designer of a template should remove
>   the corresponding commands like \font_roman or \papersize from the
>   template LyX file. This can be done with any simple text-editor, for
>   example vi or notepad.
>   
> I fully agree with the idea to leave out settings that are not relevant for or
> fixed by the template's document class or purpose. 
> 
> This may also solve our problem with the default default fonts beeing ugly
> bitmaps: Choose LatinModern in the default template and leave out the font
> settings in all templates that would use bitmap default fonts.
> 
> However:
> 
> a) The templates that ship with LyX in lib/templates don't do so, they
>contain all possible settings (at least all font settings).
>
>This may be due to "just saving" after some edit or lyx2lyx inserting
>settings with format conversions -- with the developer doing the edit or
>conversion unaware of the above passage in Customization.lyx
>
> b) Documents using a template without settings are *not* filled with a
>user's preferred settings (as stored in templates/defaults.lyx) but with
>the global LyX defaults.
>
> Am I missing something? 
> Is this a bug?

I agree with what you wrote and I had not noticed this before. I took a
look at just \papersize, and only dinbrief.lyx has non-default. Is the
problem worse for other settings?

Note that this conversation is similar to the discussion on math
settings being "automatic".

Scott


signature.asc
Description: PGP signature


templates handling

2017-04-20 Thread Guenter Milde
Dear LyXers,

background reading for the "reorganize templates folder" ticket, I found an
interesting statement in the Customization guide (5.2.4 Creating templates):


  Templates are created just like usual documents: using LyX. The only
  difference is that usual documents contain all possible settings,
  including the font scheme and the paper size. Usually a user doesn't
  want a template to overwrite his preferred settings for such
  parameters. For that reason, the designer of a template should remove
  the corresponding commands like \font_roman or \papersize from the
  template LyX file. This can be done with any simple text-editor, for
  example vi or notepad.
  
I fully agree with the idea to leave out settings that are not relevant for or
fixed by the template's document class or purpose. 

This may also solve our problem with the default default fonts beeing ugly
bitmaps: Choose LatinModern in the default template and leave out the font
settings in all templates that would use bitmap default fonts.

However:

a) The templates that ship with LyX in lib/templates don't do so, they
   contain all possible settings (at least all font settings).
   
   This may be due to "just saving" after some edit or lyx2lyx inserting
   settings with format conversions -- with the developer doing the edit or
   conversion unaware of the above passage in Customization.lyx
   
b) Documents using a template without settings are *not* filled with a
   user's preferred settings (as stored in templates/defaults.lyx) but with
   the global LyX defaults.
   
Am I missing something? 
Is this a bug?

Günter