Re: Re-organizing templates and examples folders (#8715)

2017-06-09 Thread Scott Kostyshak
On Tue, Jun 06, 2017 at 08:37:06PM +, Guenter Milde wrote:
> On 2017-06-01, Scott Kostyshak wrote:
> 
> > [-- Type: text/plain, Encoding: quoted-printable --]
> 
> > On Wed, May 03, 2017 at 08:37:17PM +, Guenter Milde wrote:
> >> Dear LyX developers,
> 
> >> with feature freeze nearing, I'd like to take up the discussion of
> >> templates and examples folders:
> 
> > Does anyone else have comments regarding Günter's proposal? Günter, are
> > you volunteering to do everything you proposed?
> 
> Unfortunately, I don't know how to set up symlink creation for
>   $LYX_USERDIR/templates/stdtemplates -> $LYX_DIR/templates
> 
> Nor do I know where to change the default templates dir path from
> $LYX_DIR/templates to $LYX_USERDIR/templates.
> 
> All I can do, is appending a patch moving the non-English templates into
> "language subdirectories". I don't know whether it is complete, though,
> maybe there some other listing of the templates (for cmake, say).

I guess we should wait for 2.4 then unless someone volunteers soon to
help implement Günter's proposal.

Scott


signature.asc
Description: PGP signature


Re: Re-organizing templates and examples folders (#8715)

2017-06-06 Thread Guenter Milde
On 2017-06-01, Scott Kostyshak wrote:

> [-- Type: text/plain, Encoding: quoted-printable --]

> On Wed, May 03, 2017 at 08:37:17PM +, Guenter Milde wrote:
>> Dear LyX developers,

>> with feature freeze nearing, I'd like to take up the discussion of
>> templates and examples folders:

> Does anyone else have comments regarding Günter's proposal? Günter, are
> you volunteering to do everything you proposed?

Unfortunately, I don't know how to set up symlink creation for
  $LYX_USERDIR/templates/stdtemplates -> $LYX_DIR/templates

Nor do I know where to change the default templates dir path from
$LYX_DIR/templates to $LYX_USERDIR/templates.

All I can do, is appending a patch moving the non-English templates into
"language subdirectories". I don't know whether it is complete, though,
maybe there some other listing of the templates (for cmake, say).

Günter



>From 36473d2dbdc7d623b3f21585540e417801808cfb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnter=20Milde?= 
Date: Tue, 6 Jun 2017 22:25:24 +0200
Subject: [PATCH] Move non-English templates to language subdirectories.

---
 lib/Makefile.am| 24 --
 .../beamer-conference-ornate-20min.lyx}|  0
 lib/templates/{ => de}/dinbrief.lyx|  0
 .../beamer-conference-ornate-20min.lyx}|  0
 .../beamer-conference-ornate-20min.lyx}|  0
 lib/templates/{ => fr}/frletter.lyx|  0
 .../beamer-conference-ornate-20min.lyx}|  0
 lib/templates/{ => zh_CN}/ctex.lyx |  0
 8 files changed, 18 insertions(+), 6 deletions(-)
 rename lib/templates/{de_beamer-conference-ornate-20min.lyx => 
de/beamer-conference-ornate-20min.lyx} (100%)
 rename lib/templates/{ => de}/dinbrief.lyx (100%)
 rename lib/templates/{es_beamer-conference-ornate-20min.lyx => 
es/beamer-conference-ornate-20min.lyx} (100%)
 rename lib/templates/{fr_beamer-conference-ornate-20min.lyx => 
fr/beamer-conference-ornate-20min.lyx} (100%)
 rename lib/templates/{ => fr}/frletter.lyx (100%)
 rename lib/templates/{ja_beamer-conference-ornate-20min.lyx => 
ja/beamer-conference-ornate-20min.lyx} (100%)
 rename lib/templates/{ => zh_CN}/ctex.lyx (100%)

diff --git a/lib/Makefile.am b/lib/Makefile.am
index fc9b7752df..229dbd4346 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -2367,15 +2367,10 @@ dist_templates_DATA = \
templates/APA6.lyx \
templates/beamer-conference-ornate-20min.lyx \
templates/ctex.lyx \
-   templates/de_beamer-conference-ornate-20min.lyx \
-   templates/dinbrief.lyx \
templates/DocBook_article.lyx \
templates/ectaart.lyx \
templates/elsarticle.lyx \
templates/EPS-cropped.lyx \
-   templates/es_beamer-conference-ornate-20min.lyx \
-   templates/fr_beamer-conference-ornate-20min.lyx \
-   templates/frletter.lyx \
templates/g-brief2.lyx \
templates/hollywood.lyx \
templates/IEEEtran-CompSoc.lyx \
@@ -2386,7 +2381,6 @@ dist_templates_DATA = \
templates/IJMPD.lyx \
templates/IOP-article.lyx \
templates/IUCr-article.lyx \
-   templates/ja_beamer-conference-ornate-20min.lyx \
templates/JASA.lyx \
templates/JSS-article.lyx \
templates/kluwer.lyx \
@@ -2412,6 +2406,24 @@ dist_obsoletetemplates_DATA = \
templates/obsolete/g-brief-de.lyx \
templates/obsolete/g-brief-en.lyx
 
+detemplatesdir = $(pkgdatadir)/examples/de
+dist_detemplates_DATA = \
+   templates/de/beamer-conference-ornate-20min.lyx \
+   templates/de/dinbrief.lyx
+
+estemplatesdir = $(pkgdatadir)/examples/es
+dist_estemplates_DATA = \
+   templates/es/beamer-conference-ornate-20min.lyx
+
+frtemplatesdir = $(pkgdatadir)/examples/fr
+dist_frtemplates_DATA = \
+   templates/fr/beamer-conference-ornate-20min.lyx \
+   templates/fr/frletter.lyx
+
+jatemplatesdir = $(pkgdatadir)/examples/ja
+dist_jatemplates_DATA = \
+   templates/ja/beamer-conference-ornate-20min.lyx
+
 springertemplatesdir = $(pkgdatadir)/templates/springer
 dist_springertemplates_DATA = \
templates/springer/svjour3.lyx
diff --git a/lib/templates/de_beamer-conference-ornate-20min.lyx 
b/lib/templates/de/beamer-conference-ornate-20min.lyx
similarity index 100%
rename from lib/templates/de_beamer-conference-ornate-20min.lyx
rename to lib/templates/de/beamer-conference-ornate-20min.lyx
diff --git a/lib/templates/dinbrief.lyx b/lib/templates/de/dinbrief.lyx
similarity index 100%
rename from lib/templates/dinbrief.lyx
rename to lib/templates/de/dinbrief.lyx
diff --git a/lib/templates/es_beamer-conference-ornate-20min.lyx 
b/lib/templates/es/beamer-conference-ornate-20min.lyx
similarity index 100%
rename from lib/templates/es_beamer-conference-ornate-20min.lyx
rename to lib/templates/es/beamer-conference-ornate-20min.lyx
diff --git a/lib/templates/fr_beamer-conference-ornate-20min.lyx 

Re: Re-organizing templates and examples folders (#8715)

2017-06-01 Thread Scott Kostyshak
On Wed, May 03, 2017 at 08:37:17PM +, Guenter Milde wrote:
> Dear LyX developers,
> 
> with feature freeze nearing, I'd like to take up the discussion of templates
> and examples folders:

Does anyone else have comments regarding Günter's proposal? Günter, are
you volunteering to do everything you proposed?

Normally I would ask for this issue to wait until the beginning of
2.4.0, but as Julien pointed out [1], putting this in later in the
release cycle minimizes the effort of backporting.

Scott


[1] http://www.lyx.org/trac/ticket/8715#comment:3


signature.asc
Description: PGP signature


Re: Re-organizing templates and examples folders (#8715)

2017-05-03 Thread Guenter Milde
Dear LyX developers,

with feature freeze nearing, I'd like to take up the discussion of templates
and examples folders:


On 2017-04-20, Helge Hafting wrote:

> ... please make [templates] go to ~/.lyx/templates and have
> tools->reconfigure create the symlink to the system template folder.
...
> Lyx should be able to make new documents based on private or std. 
> templates, without the user searching for either. And it should not be 
> necessary to tweak the paths either.

Note: the [templates] and [examples] buttons are missing under OS X and
Windows.

Nevertheless, File>New From template opens the "templates folder" (as set in
the preferences).


Suggestion:

1. easy access to local templates and standard templates:

   * set USERDIR/templates as default templates path
   
   * create a symlink USERDIR/stdtemplates -> SYSDIR/templates.
   
   * Document creation of templates in the User Guide:
   
   Any document can be used as template. 
   For easy acces with File>New from Template, save it under
   USERDIR/templates. Under Linux, you can get to this directory via
   the [templates] box in the File>Save as dialogue.


2. organize templates and examples:

   * create and use language subdirectories


3. "unhide" examples:

   * move examples to lib/doc/examples,
   
   * add a menu entry Help>Examples...

   ? create a symlink USERDIR/examples -> SYSDIR/doc/examples ?


Please comment,

Günter



Re: Re-organizing templates and examples folders (#8715)

2017-04-20 Thread Stephan Witt
Am 20.04.2017 um 14:27 schrieb Helge Hafting :
> 
> Den 11. april 2017 19:05, skrev Guenter Milde:
> 
>> * Under Linux, the local templates are in ~/.lyx/templates
>>   I have set this as my templates path in Tools>Settings and
>>   in this dir a symlink to the standard templates.
>>  
> Nice trick - but user friendliness ought to be the default. When LyX is 
> installed without tweaks, "new from template" will let you use the templates 
> that come with LyX (Template button) or the "Documents" button which merely 
> goes to the home folder. There is no easy way to get at custom templates 
> stored in the standard location ~/.lyx/templates/
> 
> I don't know what limitations qt has, is there only two buttons possible on 
> this dialog?

Please consider platforms where no buttons are available at all: Mac OS X and 
Windows.

Stephan

> If so, the "new from template" dialog should have:
> [Std templates]   that go to the system templates as usual
> [Your templates] that go to ~/.lyx/templates/ instead of ~/
> 
> If this isn't possible due to qt constraints, please make [templates] go to 
> ~/.lyx/templates and have tools->reconfigure create the symlink to the system 
> template folder. That way, users will have easy access to both sets of 
> templates without having to set anything up.
> 
> Lyx should be able to make new documents based on private or std. templates, 
> without the user searching for either. And it should not be necessary to 
> tweak the paths either. Tweaking paths is for those who have company 
> templates in something like /mnt/server17/wordprocessing/templates/
> 
> Helge Hafting



Re: Re-organizing templates and examples folders (#8715)

2017-04-20 Thread Helge Hafting

Den 11. april 2017 19:05, skrev Guenter Milde:


* Under Linux, the local templates are in ~/.lyx/templates
   I have set this as my templates path in Tools>Settings and
   in this dir a symlink to the standard templates.
   
   
Nice trick - but user friendliness ought to be the default. When LyX is 
installed without tweaks, "new from template" will let you use the 
templates that come with LyX (Template button) or the "Documents" button 
which merely goes to the home folder. There is no easy way to get at 
custom templates stored in the standard location ~/.lyx/templates/


I don't know what limitations qt has, is there only two buttons possible 
on this dialog?

If so, the "new from template" dialog should have:
 [Std templates]   that go to the system templates as usual
 [Your templates] that go to ~/.lyx/templates/ instead of ~/

If this isn't possible due to qt constraints, please make [templates] go 
to ~/.lyx/templates and have tools->reconfigure create the symlink to 
the system template folder. That way, users will have easy access to 
both sets of templates without having to set anything up.


Lyx should be able to make new documents based on private or std. 
templates, without the user searching for either. And it should not be 
necessary to tweak the paths either. Tweaking paths is for those who 
have company templates in something like 
/mnt/server17/wordprocessing/templates/


Helge Hafting


Re: Re-organizing templates and examples folders (#8715)

2017-04-20 Thread Guenter Milde
On 2017-04-11, Guenter Milde wrote:
> On 2017-04-06, Scott Kostyshak wrote:

>> There is a proposal to reorganize templates and examples folders. If we
>> do want to do it, I think that soon would be a good time.

>> To take a look at the proposal, check out:

>>   http://www.lyx.org/trac/ticket/8715

> Several points:

> * The OP seems to miss the [examples] button in the File>Open dialogue.

The proeblem is, this button is only present in Linux:

UserGuide.lyx:

  Example files This directory will be opened when you use the button
Examples in the File->Open dialog.

Note: The Examples button does not exist when using LyX
on Mac OS and Windows systems.

Customization.lyx: misses this bit and is vague about the dialogue:

  examples/ contains example files that explain how to use some
features. In the file browser, press the Examples button to
get there.

TODO: fix the Customization guide (may wait until we get a consensus on
what to do with the examples).

In comment #1, Jürgen says:

   I do not like the mixing of templates and examples, which serve a very
   different purpose.

Generally, I agree:

Templates:
  provide a starting point for documents,
  store settings for a class of documents.
  https://en.wikipedia.org/wiki/Template_%28word_processing%29

   Templates should leave out irrelevant settings to be
   filled with user defaults.

   --- Customization, 5.2.4 Creating templates


Examples:
  document a LyX feature, layout, or module.


OTOH,

* In LyX, there is no special template file type, every LyX document can
  serve as a template, just open it via File>New from template.

* Also templates can be considered part of the documentation:

   A template acts as a kind of tutorial for your layout, showing how it
   might be used, though containing dummy content.

   --- Customization, 5.2.4 Creating templates

* Examples may serve as templates (especially if there is no on-purpose
  template for a special document class).


Hence we should not merge templates and examples but it makes sense to
have them not too far in the File>New from template dialogue.


Suggestion:

* move examples to lib/doc/examples,
* create (and use) language subdirectories,
* add a menu entry Help>Examples...

* create a symlink SYSDIR/templates/examples -> SYSDIR/doc/examples,
* create a symlink SYSDIR/templates/my_templates -> USERDIR/templates
  (alternatively, set USERDIR/templates as default templates path and
  create a symlink to SYSDIR/templates there),
* create (and use) language subdirectories for templates, too.

* Document the [templates] box in the File>Save as dialogue in the user Guide
  as an easy option to create local templates.


Günter



Re: Re-organizing templates and examples folders (#8715)

2017-04-11 Thread Guenter Milde
On 2017-04-06, Scott Kostyshak wrote:

> Dear all,

> There is a proposal to reorganize templates and examples folders. If we
> do want to do it, I think that soon would be a good time.

> To take a look at the proposal, check out:

>   http://www.lyx.org/trac/ticket/8715

Several points:

* The OP seems to miss the [examples] button in the File>Open dialogue.

  I am not sure how widely it is used. Actually, the line between an example
  and a template is sometimes blurry, there are documents that are suited
  for both.
  
  OTHOH, I would see examles as a part of the documentation - maybe instead of
  File>Open [Examples], they should be sorted under Help>Examples.

* Under Linux, the local templates are in ~/.lyx/templates
  I have set this as my templates path in Tools>Settings and 
  in this dir a symlink to the standard templates.
  
  
Günter



Re: Re-organizing templates and examples folders (#8715)

2017-04-06 Thread Richard Heck
On 04/06/2017 03:46 AM, Jean-Marc Lasgouttes wrote:
> Le 06/04/2017 à 05:44, Scott Kostyshak a écrit :
>> Dear all,
>>
>> There is a proposal to reorganize templates and examples folders. If we
>> do want to do it, I think that soon would be a good time.
>>
>> To take a look at the proposal, check out:
>>
>>   http://www.lyx.org/trac/ticket/8715
>
> I did take a look, but I do not have an opinion about it, sorry.

I have no objection.

Richard



Re: Re-organizing templates and examples folders (#8715)

2017-04-06 Thread Jean-Marc Lasgouttes

Le 06/04/2017 à 05:44, Scott Kostyshak a écrit :

Dear all,

There is a proposal to reorganize templates and examples folders. If we
do want to do it, I think that soon would be a good time.

To take a look at the proposal, check out:

  http://www.lyx.org/trac/ticket/8715


I did take a look, but I do not have an opinion about it, sorry.

JMarc



Re-organizing templates and examples folders (#8715)

2017-04-05 Thread Scott Kostyshak
Dear all,

There is a proposal to reorganize templates and examples folders. If we
do want to do it, I think that soon would be a good time.

To take a look at the proposal, check out:

  http://www.lyx.org/trac/ticket/8715

Scott


signature.asc
Description: PGP signature