2.3.1

2018-07-29 Thread Richard Kimberly Heck
Anyone have issues that need resolving before I freeze strings? Thinking
to do that on Tuesday...

Riki




Re: templates/RJournal.lyx not compilable

2018-07-29 Thread Jürgen Spitzmüller
Am Sonntag, den 29.07.2018, 20:11 +0200 schrieb Jürgen Spitzmüller:
> Hm, not as easy here, since that file has "no language package".
> Have to think about that.

It's actually the problem you already reported some time ago: we need
to output global language options even if babel is provided or even not
used (if only for packages that inherit these options).

Jürgen

> 
> Jürgen
> 
> > 
> > Jürgen
> > 
> > > 
> > >   Kornel


signature.asc
Description: This is a digitally signed message part


Re: templates/RJournal.lyx not compilable

2018-07-29 Thread Jürgen Spitzmüller
Am Sonntag, den 29.07.2018, 19:52 +0200 schrieb Jürgen Spitzmüller:
> Am Sonntag, den 29.07.2018, 19:15 +0200 schrieb Kornel Benko:
> > Latest lyx-version.
> > ! Package babel Error: Unknown language `slovak'. Either you
> > have
> > (babel)misspelled its name, it has not been
> > installed,
> > (babel)or you requested it in a previous run.
> > Fix its name,
> > (babel)install it or just rerun the file,
> > respectively. In
> > (babel)some cases, you may need to remove the
> > aux file.
> > 
> > This is not correct, because only the lyx-GUI is Slovak, not the
> > content of RJournal.lyx
> 
> This is due to 803a88f243120. The shortcut and menu info insets now
> (correctly) use the GUI language, but this is not loaded.
> 
> I'll have a look.

Hm, not as easy here, since that file has "no language package".
Have to think about that.

Jürgen

> 
> Jürgen
> 
> > 
> > Kornel


signature.asc
Description: This is a digitally signed message part


Re: Failing exports

2018-07-29 Thread Jürgen Spitzmüller
Am Sonntag, den 29.07.2018, 19:52 +0200 schrieb Kornel Benko:
> Reasonable.  But not pragmatic in my eyes. The only bug I see in this
> case, is a missing error/warning
> message which would identify the failing reason.

No, it's a real error. Something is fishy with their counter
calculation.

> > I expect the RiverValley people to resolve this issue in the next
> > version. If not, more people should complain to them (and they
> > won't if
> > we hide the error from them).
> 
> That is, what I doubt. Once you have compiled your source, you get a
> .aux file. From then on, no errors occur.
> So I would not be surprised at missing complains.

This error will hassle you in any decent LaTeX editor, not only in LyX.
And this is how it should be.

Jürgen

> 
> > Jürgen
> 
>   Kornel
> 


signature.asc
Description: This is a digitally signed message part


Re: [LyX/master] Replace styles '(Begin|End)Frontmatter' with environment in elsarticle

2018-07-29 Thread Kornel Benko
Am Sonntag, 29. Juli 2018 19:47:35 CEST schrieb Jürgen Spitzmüller 
:
> > The tests are OK, attached. I have not tested the case, when the
> > InTitle styles are somehow spread across
> > the lyx-file.
> > 
> > elsarticle.lyx is reverted to the original from lyx2.3.x
> 
> I don't have time for a thorough review ATM, but you need to add a
> format change in version.h

Is in the patch

> and an entry in development/FORMAT

This one is missing, will do

> (like in
> just have done for the commit that will cause you conflicts; sorry
> about that).

No problem.

> Jürgen
> 

Kornel



signature.asc
Description: This is a digitally signed message part.


Re: Failing exports

2018-07-29 Thread Kornel Benko
Am Sonntag, 29. Juli 2018 18:36:12 CEST schrieb Jürgen Spitzmüller 
:
> Am Sonntag, den 29.07.2018, 18:28 +0200 schrieb Kornel Benko:
> > And I like it. I would even remove our log-checking with hardcoded
> > messages (in LaTeX.cpp) and instead
> > replace them with specific strings from the layout/module files. But
> > that will be rejected too I suppose.
> 
> Note that I am not the one to "reject" things. My point is, though,
> that if we start things like this to work around bugs in current
> versions of packages/classes, this will become unmaintainable at some
> point.

Reasonable.  But not pragmatic in my eyes. The only bug I see in this case, is 
a missing error/warning
message which would identify the failing reason.

> I expect the RiverValley people to resolve this issue in the next
> version. If not, more people should complain to them (and they won't if
> we hide the error from them).

That is, what I doubt. Once you have compiled your source, you get a .aux file. 
From then on, no errors occur.
So I would not be surprised at missing complains.

> Jürgen

Kornel



signature.asc
Description: This is a digitally signed message part.


Re: templates/RJournal.lyx not compilable

2018-07-29 Thread Jürgen Spitzmüller
Am Sonntag, den 29.07.2018, 19:15 +0200 schrieb Kornel Benko:
> Latest lyx-version.
>   ! Package babel Error: Unknown language `slovak'. Either you
> have
>   (babel)misspelled its name, it has not been
> installed,
>   (babel)or you requested it in a previous run.
> Fix its name,
>   (babel)install it or just rerun the file,
> respectively. In
>   (babel)some cases, you may need to remove the
> aux file.
> 
> This is not correct, because only the lyx-GUI is Slovak, not the
> content of RJournal.lyx

This is due to 803a88f243120. The shortcut and menu info insets now
(correctly) use the GUI language, but this is not loaded.

I'll have a look.

Jürgen

> 
>   Kornel


signature.asc
Description: This is a digitally signed message part


Re: [LyX/master] Replace styles '(Begin|End)Frontmatter' with environment in elsarticle

2018-07-29 Thread Jürgen Spitzmüller
> The tests are OK, attached. I have not tested the case, when the
> InTitle styles are somehow spread across
> the lyx-file.
> 
> elsarticle.lyx is reverted to the original from lyx2.3.x

I don't have time for a thorough review ATM, but you need to add a
format change in version.h and an entry in development/FORMAT (like in
just have done for the commit that will cause you conflicts; sorry
about that).

Jürgen

> 
>   Kornel
> 


signature.asc
Description: This is a digitally signed message part


Re: [LyX/master] Replace styles '(Begin|End)Frontmatter' with environment in elsarticle

2018-07-29 Thread Kornel Benko
Am Sonntag, 29. Juli 2018 17:09:10 CEST schrieb Kornel Benko :
> Am Sonntag, 29. Juli 2018 12:15:24 CEST schrieb Jürgen Spitzmüller 
> :
> > Am Sonntag, den 29.07.2018, 10:26 +0200 schrieb Kornel Benko:
> > > I like it. But the existence of Begin/EndFrontmater in the lyx-file
> > > is a problem.
> > > With the new layout, we can omit it, but the conversion to old
> > > (2.3.x) format would miss these styles.
> > > 
> > > Attached the new version. Working without need of additional lyx2lyx
> > > conversion.
> > 
> > You need a file format change nevertheless. The lyx2lyx convert routine
> > needs to remove existing Begin/EndFrontmatter styles, the revert
> > routine needs to insert a BeginFrontmatter before the first and an
> > EndFrotmatter after the last InTitle style.
> > 
> > Jürgen
> > 
> 
> Done. I am testing now, will report later.
> 

The tests are OK, attached. I have not tested the case, when the InTitle styles 
are somehow spread across
the lyx-file.

elsarticle.lyx is reverted to the original from lyx2.3.x

Kornel

diff --git a/lib/layouts/elsarticle.layout b/lib/layouts/elsarticle.layout
index d2cef14..943962c 100644
--- a/lib/layouts/elsarticle.layout
+++ b/lib/layouts/elsarticle.layout
@@ -16,10 +16,12 @@ Provides refstyle	1
 
 ClassOptions
 	FontSize		10|11|12
 end
 
+TitleLatexType Environment
+TitleLatexName frontmatter
 
 # This is just to show how to declare the default font.
 # The defaults are exactly those shown here.
 DefaultFont
 	Family			Roman
@@ -51,32 +53,16 @@ Input stdlayouts.inc
 
 NoStyleChapter
 NoCounter			chapter
 NoStyleChapter*
 
-InsetLayout "Flex:Frontmatter"
-	LyXType			custom
-	LabelString		"Frontmatter"
-	LatexType		Environment
-	LatexName		frontmatter
-	Display			true
-	Decoration		Classic
-	KeepEmpty		true
-	MultiPar		true
-	ResetsFont		true
-	LabelFont
-	  Series		Bold
-	  Color			Green
-	EndFont
-End
-
 Style Title
 	Margin			Static
 	LatexType		Command
 	LatexName		title
 	Category		FrontMatter
-	InTitle			0
+	InTitle			1
 	ResetArgs		1
 	ParSkip			0.4
 	ItemSep			0
 	TopSep			0
 	BottomSep		1
@@ -115,13 +101,13 @@ End
 Style "Title footnote"
 	Margin			Dynamic
 	LatexType		Command
 	LatexName		tnotetext
 	Category		FrontMatter
-	InTitle			0
+	InTitle			1
 	Argument 1
-	  LabelString	"Footnote Label"
+	  LabelString		"Footnote Label"
 	  Tooltip		"Label you refer to in the title"
 	EndArgument
 	ParSkip			0.4
 	BottomSep		0.5
 	Align			Left
@@ -137,11 +123,11 @@ End
 
 Style Author
 	Margin			Static
 	LatexType		Command
 	Category		FrontMatter
-	InTitle			0
+	InTitle			1
 	Argument 1
 	  LabelString	"Author Label"
 	  Tooltip		"Label you will reference in the address"
 	EndArgument
 	LatexName		author
@@ -182,10 +168,11 @@ End
 
 
 Style "Author footnote"
 	CopyStyle		"Title footnote"
 	LatexName		fntext
+	InTitle			1
 	LabelString		"Author footnote:"
 	Argument 1
 	  LabelString	"Author Footnote Label"
 	  Tooltip		"Label you refer to for an author"
 	EndArgument
@@ -203,20 +190,21 @@ End
 
 
 Style "Corresponding author"
 	CopyStyle		"Author footnote"
 	LatexName		cortext
+	InTitle			1
 	LabelString		"Corresponding author text:"
 End
 
 
 Style Address
 	Margin			Static
 	LatexType		Command
 	Category		FrontMatter
 	LatexName		address
-	InTitle			0
+	InTitle			1
 	Argument 1
 	  LabelString	"Address Label"
 	  Tooltip		"Label of the author you refer to"
 	EndArgument
 	ParSkip			0.4
@@ -230,10 +218,11 @@ End
 
 
 Style Email
 	CopyStyle		Address
 	LatexName		ead
+	InTitle			1
 	AlignPossible	Block
 	Argument 1
 	  LabelString	"Internet"
 	  Tooltip		"If content is 'url', email becomes an Internet address"
 	EndArgument
@@ -246,11 +235,11 @@ End
 Style Abstract
 	Margin			Static
 	LatexType		Environment
 	LatexName		abstract
 	Category		FrontMatter
-	InTitle			0
+	InTitle			1
 	NextNoIndent	1
 	LeftMargin		MMM
 	RightMargin		MMM
 	ParIndent		MM
 	ItemSep			0
@@ -275,11 +264,11 @@ End
 Style Keywords
 	Margin			Dynamic
 	LatexType		Environment
 	LatexName		keyword
 	Category		FrontMatter
-	InTitle			0
+	InTitle			1
 	NextNoIndent	1
 	BottomSep		0.5
 	ParSkip			0.4
 	Align			Block
 	LabelSep		xx
diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py
index c00e630..92aacea 100644
--- a/lib/lyx2lyx/lyx_2_4.py
+++ b/lib/lyx2lyx/lyx_2_4.py
@@ -47,11 +47,76 @@ from lyx2lyx_tools import (put_cmd_in_ert, add_to_preamble)
 ###
 ### Conversion and reversion routines
 ###
 ###
 
-  
+def removeFrontMatterStyles(document):
+"convert: Remove Style Begin/EndFromatter"
+
+layouts = ['BeginFrontmatter', 'EndFrontmatter']
+for layout in layouts:
+i = 0
+while True:
+i = find_token(document.body, '\\begin_layout ' + layout, i)
+if i == -1:
+break
+j = find_end_of_layout(document.body, i)
+if j == -1:
+document.warning("Malformed LyX document: Can't find end of layout at line 

templates/RJournal.lyx not compilable

2018-07-29 Thread Kornel Benko
Latest lyx-version.
! Package babel Error: Unknown language `slovak'. Either you have
(babel)misspelled its name, it has not been installed,
(babel)or you requested it in a previous run. Fix its 
name,
(babel)install it or just rerun the file, respectively. 
In
(babel)some cases, you may need to remove the aux file.

This is not correct, because only the lyx-GUI is Slovak, not the content of 
RJournal.lyx

Kornel


signature.asc
Description: This is a digitally signed message part.


Re: Failing exports

2018-07-29 Thread Jürgen Spitzmüller
Am Sonntag, den 29.07.2018, 18:28 +0200 schrieb Kornel Benko:
> And I like it. I would even remove our log-checking with hardcoded
> messages (in LaTeX.cpp) and instead
> replace them with specific strings from the layout/module files. But
> that will be rejected too I suppose.

Note that I am not the one to "reject" things. My point is, though,
that if we start things like this to work around bugs in current
versions of packages/classes, this will become unmaintainable at some
point.

I expect the RiverValley people to resolve this issue in the next
version. If not, more people should complain to them (and they won't if
we hide the error from them).

Jürgen

> 
>   Kornel


signature.asc
Description: This is a digitally signed message part


Re: Failing exports

2018-07-29 Thread Kornel Benko
Am Sonntag, 29. Juli 2018 18:14:04 CEST schrieb Jürgen Spitzmüller 
:
> Am Sonntag, den 29.07.2018, 17:16 +0200 schrieb Kornel Benko:
> > Still no answer. 
> 
> They might have holidays, as well.
> 
> > Can we have a new entry in a layout file like
> > 
> > RerunLatexIfError   3
> > 
> > which would rerun latex in case of errors, but at most 3 times?
> 
> I don't like this idea. This is clearly something to be sorted out
> upstream (in the class).
> 
> Jürgen
> 
> > 

And I like it. I would even remove our log-checking with hardcoded messages (in 
LaTeX.cpp) and instead
replace them with specific strings from the layout/module files. But that will 
be rejected too I suppose.

Kornel


signature.asc
Description: This is a digitally signed message part.


Re: Failing exports

2018-07-29 Thread Jürgen Spitzmüller
Am Sonntag, den 29.07.2018, 17:16 +0200 schrieb Kornel Benko:
> Still no answer. 

They might have holidays, as well.

> Can we have a new entry in a layout file like
> 
>   RerunLatexIfError   3
> 
> which would rerun latex in case of errors, but at most 3 times?

I don't like this idea. This is clearly something to be sorted out
upstream (in the class).

Jürgen

> 
>   Kornel


signature.asc
Description: This is a digitally signed message part


Re: Failing exports

2018-07-29 Thread Scott Kostyshak
On Sun, Jul 29, 2018 at 03:44:09PM +, Kornel Benko wrote:
> Am Sonntag, 29. Juli 2018 11:31:49 CEST schrieb Scott Kostyshak 
> :
> > On Sun, Jul 29, 2018 at 03:16:13PM +, Kornel Benko wrote:
> > > Am Donnerstag, 26. Juli 2018 22:47:04 CEST schrieb Kornel Benko 
> > > :
> > > > Am Mittwoch, 25. Juli 2018 17:07:31 CEST schrieb Jürgen Spitzmüller 
> > > > :
> > > > > Am Mittwoch, den 25.07.2018, 16:07 +0200 schrieb Kornel Benko:
> > > > > > I'd like to, but there is no specific author mentioned, (only
> > > > > > 'Elsevier Ltd'). I probably would have to subscribe some TeX list.
> > > > > 
> > > > > The manual says:
> > > > > 
> > > > > "Bugs, feature requests, suggestions
> > > > > and comments shall be mailed to ."
> > > > > 
> > > > > Jürgen
> > > > > 
> > > > 
> > > > I mailed, but no answer so far :(
> > > > 
> > > 
> > > Still no answer. Can we have a new entry in a layout file like
> > > 
> > >   RerunLatexIfError   3
> > > 
> > > which would rerun latex in case of errors, but at most 3 times?
> > 
> > You know the string in the log that needs to be grepped right?
> 
> This may change with the latex engine ...
> 
> > What
> > about the following instead?
> > 
> > RerunIfLogContains  
> > 
> > Scott
> 
> OK, but we have to make sure, that the rerun count be finite.
> So a max. count should be given too. And only in error-case.
>   RerunIfLogContains ,

Note that there is already a re-run maximum of 6 I think. Note that this
thread is related:

  https://tex.stackexchange.com/a/438735/12212

In any case, I expect both of our proposals to be rejected.

Scott


signature.asc
Description: PGP signature


Re: Failing exports

2018-07-29 Thread Kornel Benko
Am Sonntag, 29. Juli 2018 11:31:49 CEST schrieb Scott Kostyshak 
:
> On Sun, Jul 29, 2018 at 03:16:13PM +, Kornel Benko wrote:
> > Am Donnerstag, 26. Juli 2018 22:47:04 CEST schrieb Kornel Benko 
> > :
> > > Am Mittwoch, 25. Juli 2018 17:07:31 CEST schrieb Jürgen Spitzmüller 
> > > :
> > > > Am Mittwoch, den 25.07.2018, 16:07 +0200 schrieb Kornel Benko:
> > > > > I'd like to, but there is no specific author mentioned, (only
> > > > > 'Elsevier Ltd'). I probably would have to subscribe some TeX list.
> > > > 
> > > > The manual says:
> > > > 
> > > > "Bugs, feature requests, suggestions
> > > > and comments shall be mailed to ."
> > > > 
> > > > Jürgen
> > > > 
> > > 
> > > I mailed, but no answer so far :(
> > > 
> > 
> > Still no answer. Can we have a new entry in a layout file like
> > 
> > RerunLatexIfError   3
> > 
> > which would rerun latex in case of errors, but at most 3 times?
> 
> You know the string in the log that needs to be grepped right?

This may change with the latex engine ...

> What
> about the following instead?
> 
>   RerunIfLogContains  
> 
> Scott

OK, but we have to make sure, that the rerun count be finite.
So a max. count should be given too. And only in error-case.
RerunIfLogContains ,

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: Failing exports

2018-07-29 Thread Scott Kostyshak
On Sun, Jul 29, 2018 at 03:16:13PM +, Kornel Benko wrote:
> Am Donnerstag, 26. Juli 2018 22:47:04 CEST schrieb Kornel Benko 
> :
> > Am Mittwoch, 25. Juli 2018 17:07:31 CEST schrieb Jürgen Spitzmüller 
> > :
> > > Am Mittwoch, den 25.07.2018, 16:07 +0200 schrieb Kornel Benko:
> > > > I'd like to, but there is no specific author mentioned, (only
> > > > 'Elsevier Ltd'). I probably would have to subscribe some TeX list.
> > > 
> > > The manual says:
> > > 
> > > "Bugs, feature requests, suggestions
> > > and comments shall be mailed to ."
> > > 
> > > Jürgen
> > > 
> > 
> > I mailed, but no answer so far :(
> > 
> 
> Still no answer. Can we have a new entry in a layout file like
> 
>   RerunLatexIfError   3
> 
> which would rerun latex in case of errors, but at most 3 times?

You know the string in the log that needs to be grepped right? What
about the following instead?

RerunIfLogContains  

Scott


signature.asc
Description: PGP signature


Re: Failing exports

2018-07-29 Thread Kornel Benko
Am Donnerstag, 26. Juli 2018 22:47:04 CEST schrieb Kornel Benko 
:
> Am Mittwoch, 25. Juli 2018 17:07:31 CEST schrieb Jürgen Spitzmüller 
> :
> > Am Mittwoch, den 25.07.2018, 16:07 +0200 schrieb Kornel Benko:
> > > I'd like to, but there is no specific author mentioned, (only
> > > 'Elsevier Ltd'). I probably would have to subscribe some TeX list.
> > 
> > The manual says:
> > 
> > "Bugs, feature requests, suggestions
> > and comments shall be mailed to ."
> > 
> > Jürgen
> > 
> 
> I mailed, but no answer so far :(
> 

Still no answer. Can we have a new entry in a layout file like

RerunLatexIfError   3

which would rerun latex in case of errors, but at most 3 times?

Kornel


signature.asc
Description: This is a digitally signed message part.


Re: License: Chinese (Simplified) translation for LyX

2018-07-29 Thread Pavel Sanda
> ?: Jürgen Spitzmüller mailto:sp...@lyx.org>>
> ??:  Chinese (Simplified) translation for LyX???
> 
> As you wish.

Hi Winfred,
thanks for your update.
There are few bits which needs your approval:
attached are changes generated by your update to lib/layouttranslations
file. These strings will be used in pdf output and need careful attention
in cases when you change the old translations of. eg Nomenclature or 
List of Listings.

Please could you review the attached file and confirm all the changes
are intended and correct?

Pavel
diff --git a/lib/layouttranslations b/lib/layouttranslations
index 7b8c431..11e55f2 100644
--- a/lib/layouttranslations
+++ b/lib/layouttranslations
@@ -12,7 +12,7 @@ Translation ar
"Assumption" "فرضية"
"Axiom" "مُسلّمة"
"Case" "حالة"
-   "Chart" "رسم بياني"
+   "Chart" "جدول بياني"
"Claim" "متطلب"
"Conclusion" "استنتاج"
"Condition" "شعء"
@@ -23,17 +23,17 @@ Translation ar
"Example" "مثال"
"Exercise" "تمرين"
"Fact" "حقيقة"
-   "Graph[[mathematical]]" "شكل بياني"
+   "Graph[[mathematical]]" "رسم بياني"
"Lemma" "قضية مساعدة"
"List of Algorithms" "قائمة الخوارزميات"
-   "List of Charts" "قائمة الرسوم البيانية"
-   "List of Graphs[[mathematical]]" "قائمة الأشكال 
البيانية"
+   "List of Charts" "قائمة الجداول البيانية"
+   "List of Graphs[[mathematical]]" "قائمة الرسوم 
البيانية"
"List of Listings" "قائمة القوائم"
"List of Schemes" "قائمة المخططات"
"List of Tableaux" "قائمة الجداول"
"Listing" "عمل قوائم"
"Listings[[List of Listings]]" "القوائم"
-   "Nomenclature[[output]]" "المصطلحات"
+   "Nomenclature[[output]]" "المصطلح"
"Notation" "تدوين"
"Note" "ملاحظة"
"Problem" "مشكلة"
@@ -1567,7 +1567,7 @@ Translation zh_CN
"List of Algorithms" "算法列表"
"List of Charts" "图表列表"
"List of Graphs[[mathematical]]" "图形列表"
-   "List of Listings" "程序列表"
+   "List of Listings" "程序列表的列表"
"List of Schemes" "方案列表"
"List of Tableaux" "场景列表"
"Listing" "程序列表"
@@ -1586,8 +1586,8 @@ Translation zh_CN
"Summary" "小结"
"Tableau" "场景"
"Theorem" "定理"
-   "page[[nomencl]]" "page"
-   "see equation[[nomencl]]" "see equation"
+   "page[[nomencl]]" "饾"
+   "see equation[[nomencl]]" "见公式"
 End
 
 Translation zh_TW


Re: [LyX/master] Replace styles '(Begin|End)Frontmatter' with environment in elsarticle

2018-07-29 Thread Kornel Benko
Am Sonntag, 29. Juli 2018 12:15:24 CEST schrieb Jürgen Spitzmüller 
:
> Am Sonntag, den 29.07.2018, 10:26 +0200 schrieb Kornel Benko:
> > I like it. But the existence of Begin/EndFrontmater in the lyx-file
> > is a problem.
> > With the new layout, we can omit it, but the conversion to old
> > (2.3.x) format would miss these styles.
> > 
> > Attached the new version. Working without need of additional lyx2lyx
> > conversion.
> 
> You need a file format change nevertheless. The lyx2lyx convert routine
> needs to remove existing Begin/EndFrontmatter styles, the revert
> routine needs to insert a BeginFrontmatter before the first and an
> EndFrotmatter after the last InTitle style.
> 
> Jürgen
> 

Done. I am testing now, will report later.

Kornel

signature.asc
Description: This is a digitally signed message part.


GPL

2018-07-29 Thread Gilbert Forkel
I hereby grant permission to use my work for LyX under the license GPL
version 2 or later.

Gilbert J. M. Forkel



signature.asc
Description: OpenPGP digital signature


Re: [LyX/master] Replace styles '(Begin|End)Frontmatter' with environment in elsarticle

2018-07-29 Thread Jürgen Spitzmüller
Am Sonntag, den 29.07.2018, 10:26 +0200 schrieb Kornel Benko:
> I like it. But the existence of Begin/EndFrontmater in the lyx-file
> is a problem.
> With the new layout, we can omit it, but the conversion to old
> (2.3.x) format would miss these styles.
> 
> Attached the new version. Working without need of additional lyx2lyx
> conversion.

You need a file format change nevertheless. The lyx2lyx convert routine
needs to remove existing Begin/EndFrontmatter styles, the revert
routine needs to insert a BeginFrontmatter before the first and an
EndFrotmatter after the last InTitle style.

Jürgen

> 
>   Kornel


signature.asc
Description: This is a digitally signed message part


Re: [LyX/master] Replace styles '(Begin|End)Frontmatter' with environment in elsarticle

2018-07-29 Thread Kornel Benko
Am Sonntag, 29. Juli 2018 06:49:39 CEST schrieb Jürgen Spitzmüller 
:
> Am Samstag, den 28.07.2018, 14:49 +0200 schrieb Jürgen Spitzmüller:
> > Am Samstag, den 28.07.2018, 14:33 +0200 schrieb Kornel Benko:
> > > commit 3e92efd118aa66d90cee8e1cd5b305ead0849925
> > > Author: Kornel Benko 
> > > Date:   Sat Jul 28 14:30:25 2018 +0200
> > > 
> > > Replace styles '(Begin|End)Frontmatter' with environment in
> > > elsarticle
> > > 
> > > No change in tex or pdf output.
> > > This does not help in compiling, but still feels more natural.
> > 
> > This is a file format change. Please add the necessary change and
> > lyx2lyx routines.
> 
> Looking at the actual change, I think you don't need an InsetLayout for
> Frontmatter. This is sort of a maketitle environment AFAICS. Hence it
> would be more in line with other layouts (and easier to use) if you'd
> use something like
> 
> TitleLatexType Environment
> TitleLatexName frontmatter
> 
> and the respective layouts that should go there with
> 
> InTitle   1
> 
> like elsart.layout does it, in fact.
> 
> Jürgen

I like it. But the existence of Begin/EndFrontmater in the lyx-file is a 
problem.
With the new layout, we can omit it, but the conversion to old (2.3.x) format 
would miss these styles.

Attached the new version. Working without need of additional lyx2lyx conversion.

Kornel
#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[elsarticle,natbib.sty,pifont.sty]{Elsevier}
#  \DeclareCategory{Articles}
# elsarticle textclass definition file.
# Author: Uwe Stöhr (uwesto...@web.de)

Format 68

Columns 1
Sides   1
SecNumDepth 3
TocDepth3
DefaultStyleStandard
Provides natbib 1
Provides refstyle   1

ClassOptions
FontSize10|11|12
end

TitleLatexType Environment
TitleLatexName frontmatter

# This is just to show how to declare the default font.
# The defaults are exactly those shown here.
DefaultFont
Family  Roman
Series  Medium
Shape   Up
SizeNormal
Color   None
EndFont


Style Standard
CategoryMainText
Margin  Static
LatexType   Paragraph
LatexName   dummy
ParIndent   MM
ParSkip 0.4
Align   Block
AlignPossible   Block, Left, Right, Center
LabelType   No_Label
End

Style BeginFrontmatter
CategoryFrontMatter
LatexType   Paragraph
LatexName   dummy
LabelType   No_Label
End

Style EndFrontmatter
CategoryFrontMatter
LatexType   None
LatexName   dummy
LabelType   No_Label
End

Input stdcounters.inc
Input stdfloats.inc
Input stdlists.inc
Input stdsections.inc
Input stdstarsections.inc
Input stdlayouts.inc

NoStyle Chapter
NoCounter   chapter
NoStyle Chapter*

Style Title
Margin  Static
LatexType   Command
LatexName   title
CategoryFrontMatter
InTitle 1
ResetArgs   1
ParSkip 0.4
ItemSep 0
TopSep  0
BottomSep   1
ParSep  1
Align   Center
LabelType   No_Label
Font
  Size  Largest
EndFont
HTMLTitle   true
End

InsetLayout "Flex:Titlenotemark"
LyxType custom
LatexType   command
ForcePlain  1
LatexName   tnoteref
LabelString "Titlenote mark"
Font
  Color foreground
  Size  Small
  FamilyRoman
  Shape Up
  SeriesMedium
  Misc  No_Emph
  Misc  No_Noun
  Misc  No_Bar
EndFont
LabelFont
  Color green
  Size  Small
EndFont
End


Style "Title footnote"
Margin  Dynamic
LatexType   Command
LatexName   tnotetext
CategoryFrontMatter
InTitle 1
Argument 1
  LabelString   "Footnote Label"
  Tooltip   "Label you refer to in the title"
EndArgument
ParSkip 0.4