Properly fix acknowledgment issue part 1/2

Bump file format and convert/revert styles to unique spelling
This commit is contained in:
Juergen Spitzmueller 2023-02-04 17:47:52 +01:00
parent 6746949f39
commit ac6314b834
33 changed files with 157 additions and 179 deletions

View File

@ -166,7 +166,7 @@ Style Mail
End
Style Acknowledgments[[credits]]
Style Acknowledgments
Margin First_Dynamic
LatexType Environment
LatexName acknowledgements
@ -178,7 +178,7 @@ Style Acknowledgments[[credits]]
ParSep 0
Align Block
LabelType Static
LabelString "Acknowledgements[[credits]]."
LabelString "Acknowledgments."
LabelSep M
Font
Size Small
@ -193,11 +193,6 @@ Style Acknowledgments[[credits]]
End
Style Acknowledgement
ObsoletedBy Acknowledgments[[credits]]
End
Style Section
Font
Family Sans

View File

@ -79,7 +79,7 @@ Style Offprint
End
Style Acknowledgments[[credits]]
Style Acknowledgments
Margin Static
LatexType Environment
LatexName acknowledgements
@ -90,7 +90,7 @@ Style Acknowledgments[[credits]]
ParSep 0
Align Block
LabelType Above
LabelString "Acknowledgments[[credits]]"
LabelString "Acknowledgments"
LabelSep M
Font
Size Small
@ -104,11 +104,6 @@ Style Acknowledgments[[credits]]
End
Style Acknowledgement
ObsoletedBy Acknowledgments[[credits]]
End
Style Thesaurus
LabelType Static
LatexType Command

View File

@ -102,7 +102,7 @@ End
Style Abstract
End
Style Acknowledgments[[credits]]
Style Acknowledgments
End
Style Bibliography

View File

@ -351,7 +351,7 @@ Style Keywords
End
Style Acknowledgments[[credits]]
Style Acknowledgments
Category BackMatter
Margin Dynamic
LatexType Command
@ -362,7 +362,7 @@ Style Acknowledgments[[credits]]
BottomSep 0.8
Align Left
LabelType Static
LabelString "[Acknowledgments][[credits]]"
LabelString "[Acknowledgments]"
KeepEmpty 1
Font
Family Roman
@ -374,11 +374,6 @@ Style Acknowledgments[[credits]]
End
Style Acknowledgement
ObsoletedBy Acknowledgments[[credits]]
End
Style PlaceFigure
Margin Dynamic
LatexType Command

View File

@ -222,7 +222,7 @@ Style Altaffilation
Align Center
End
Style Acknowledgments[[credits]]
Style Acknowledgments
Font
Shape Up
EndFont

View File

@ -280,14 +280,14 @@ End
# insert Abtract and Bibliography style
Input stdstruct.inc
Style Acknowledgments[[credits]]
Style Acknowledgments
CopyStyle Abstract
LatexName acknowledgement
Category BackMatter
InTitle 0
BottomSep 0.7
LabelType Above
LabelString "Acknowledgments[[credits]]"
LabelString "Acknowledgments"
Font
Size Normal
EndFont
@ -299,12 +299,8 @@ Style Acknowledgments[[credits]]
DocBookWrapperTag acknowledgements
End
Style Acknowledgement
ObsoletedBy Acknowledgments[[credits]]
End
Style SupplementalInfo
CopyStyle Acknowledgments[[credits]]
CopyStyle Acknowledgments
LatexName suppinfo
LabelString "Supporting Information Available"
DocBookTag para
@ -313,7 +309,7 @@ Style SupplementalInfo
End
Style TOC_entry
CopyStyle Acknowledgments[[credits]]
CopyStyle Acknowledgments
LatexName tocentry
ParSep 0.3
LabelString "Graphical TOC Entry"

View File

@ -654,11 +654,11 @@ InsetLayout Flex:Anonymous_Suppression
LabelString "Non anonymous only"
End
Style Acknowledgments[[credits]]
Style Acknowledgments
Category BackMatter
LatexName acks
LatexType Environment
LabelString "Acknowledgments[[credits]]"
LabelString "Acknowledgments"
LabelType Above
TopSep 1.3
LabelBottomSep 0.7
@ -672,10 +672,6 @@ Style Acknowledgments[[credits]]
DocBookSection true
End
Style Acknowledgements
ObsoletedBy Acknowledgments[[credits]]
End
InsetLayout Flex:Grant_Sponsor
LyxType custom
ContentAsLabel 1

View File

@ -343,20 +343,16 @@ InsetLayout "Flex:Thanks"
End
Style Acknowledgments[[credits]]
Style Acknowledgments
CopyStyle Abstract
LatexName acks
Category BackMatter
InTitle 0
LabelBottomsep 0
LabelType Above
LabelString "Acknowledgments[[credits]]"
LabelString "Acknowledgments"
DocBookTag para
DocBookWrapperTag acknowledgements
DocBookSection true
End
Style Acknowledgments
ObsoletedBy Acknowledgments[[credits]]
End

View File

@ -299,20 +299,16 @@ InsetLayout "Flex:Thanks"
End
Style Acknowledgments[[credits]]
Style Acknowledgments
CopyStyle Abstract
LatexName acks
Category BackMatter
InTitle 0
LabelBottomsep 0
LabelType Above
LabelString "Acknowledgments[[credits]]"
LabelString "Acknowledgments"
DocBookTag para
DocBookWrapperTag acknowledgements
DocBookSection true
End
Style Acknowledgments
ObsoletedBy Acknowledgments[[credits]]
End

View File

@ -190,7 +190,7 @@ Style Notation
End
Style Acknowledgments[[credits]]
Style Acknowledgments
Margin Dynamic
LatexType Environment
LatexName acknowledgments
@ -202,7 +202,7 @@ Style Acknowledgments[[credits]]
BottomSep 0.4
Align Block
LabelType Static
LabelString "Acknowledgments[[credits]]."
LabelString "Acknowledgments."
Font
Size Small
EndFont
@ -216,11 +216,6 @@ Style Acknowledgments[[credits]]
End
Style Acknowledgments
ObsoletedBy Acknowledgments[[credits]]
End
Style Bibliography
Margin First_Dynamic
LatexType Bib_Environment

View File

@ -240,7 +240,7 @@ Style Copyright
End
Style Acknowledgments[[credits]]
Style Acknowledgments
Category BackMatter
LatexName acknowledgements
LatexType Command
@ -253,7 +253,7 @@ Style Acknowledgments[[credits]]
Align Block
AlignPossible Block, Left, Right, Center
Labeltype Static
LabelString "Acknowledgments[[credits]]:"
LabelString "Acknowledgments:"
Labelsep M
LabelFont
Series Bold
@ -265,15 +265,6 @@ Style Acknowledgments[[credits]]
End
Style Acknowledgments
ObsoletedBy Acknowledgments[[credits]]
End
Style Acknowledgements
ObsoletedBy Acknowledgments[[credits]]
End
Style ThickLine
LatexName thickline
LatexType Command

View File

@ -421,19 +421,15 @@ Style Disclaimer
DocBookAttr role='disclaimer'
End
Style Acknowledgments[[credits]]
Style Acknowledgments
CopyStyle Statements2
LatexName acknowledgements
LabelString "Acknowledgments[[credits]]."
LabelString "Acknowledgments."
DocBookTag para
DocBookWrapperTag acknowledgements
DocBookSection true
End
Style Acknowledgements
ObsoletedBy Acknowledgments[[credits]]
End
Style Bibliography
Margin First_Dynamic
LatexType Bib_Environment

View File

@ -592,7 +592,7 @@ Style Abstract
End
Style Acknowledgments[[credits]]
Style Acknowledgments
Category BackMatter
Margin First_Dynamic
LatexType Environment
@ -607,7 +607,7 @@ Style Acknowledgments[[credits]]
Align Block
AlignPossible Block, Left
LabelType Static
LabelString "Acknowledgments[[credits]]."
LabelString "Acknowledgments."
Font
Size Small
EndFont
@ -617,12 +617,7 @@ Style Acknowledgments[[credits]]
EndFont
End
Style Acknowledgements
ObsoletedBy Acknowledgments[[credits]]
End
Style Acknowledgement[[credits]]
Style Acknowledgment
Margin First_Dynamic
LatexType Environment
LatexName acknowledgement
@ -636,7 +631,7 @@ Style Acknowledgement[[credits]]
Align Block
AlignPossible Block, Left
LabelType Static
LabelString "Acknowledgement[[credits]]."
LabelString "Acknowledgment."
Font
Size Small
EndFont
@ -646,11 +641,6 @@ Style Acknowledgement[[credits]]
EndFont
End
Style Acknowledgement
ObsoletedBy Acknowledgment[[credits]]
End
Style Bibliography
Category BackMatter
Margin First_Dynamic

View File

@ -546,13 +546,13 @@ End
# This is not taken from the AMS defs, so as to match the output of the
# style file.
Style Acknowledgment[[theorem]]
Style Acknowledgment
Margin Static
LatexType environment
LatexName ack
LabelType Above
LabelBottomsep 1
LabelString "Acknowledgment[[theorem]]"
LabelString "Acknowledgment"
parsep 0.3
LabelFont
Size large
@ -562,8 +562,5 @@ Style Acknowledgment[[theorem]]
DocBookWrapperTag acknowledgements
End
Style Acknowledgement
ObsoletedBy Acknowledgment[[theorem]]
End
Input theorems-refprefix.inc

View File

@ -293,7 +293,7 @@ Style submitto
End
Style Acknowledgments[[credits]]
Style Acknowledgments
Margin Dynamic
LatexType Command
LatexName ack{}
@ -307,7 +307,7 @@ Style Acknowledgments[[credits]]
BottomSep 0.4
Align Block
LabelType Static
LabelString "Acknowledgments[[credits]]"
LabelString "Acknowledgments"
Font
Series Bold
Size Normal
@ -317,10 +317,6 @@ Style Acknowledgments[[credits]]
DocBookAttr role='acknowledgments'
End
Style Acknowledgments
ObsoletedBy Acknowledgments[[credits]]
End
Style "Bibliography (plain)"
Margin First_Dynamic

View File

@ -217,8 +217,8 @@ Style Subsubsection*
EndFont
End
# Acknowledgement(s) style definitions
Style Acknowledgments[[credits]]
# Acknowledgment(s) style definitions
Style Acknowledgments
Category BackMatter
Margin Static
LatexType Command
@ -246,6 +246,3 @@ Style Acknowledgments[[credits]]
EndFont
End
Style Acknowledgements
ObsoletedBy Acknowledgments[[credits]]
End

View File

@ -250,21 +250,17 @@ Style Synopsis
DocBookAttr role='synopsis'
End
Style Acknowledgments[[credits]]
Style Acknowledgments
CopyStyle "Short Author"
LatexName ack
InTitle 0
LabelString "Acknowledgments[[credits]]:"
LabelString "Acknowledgments:"
Category BackMatter
TopSep 0.7
DocBookTag para
DocBookWrapperTag acknowledgements
End
Style Acknowledgements
ObsoletedBy Acknowledgments[[credits]]
End
Style References
Margin Static
Category BackMatter

View File

@ -281,13 +281,13 @@ Style "Preprint number"
End
Style Acknowledgments[[credits]]
Style Acknowledgments
CopyStyle Abstract
LatexName acknowledgments
Category BackMatter
InTitle 0
LabelType Above
LabelString "Acknowledgments[[credits]]"
LabelString "Acknowledgments"
Font
Size Normal
EndFont
@ -301,10 +301,6 @@ Style Acknowledgments[[credits]]
DocBookAbstract false
End
Style Acknowledgments
ObsoletedBy Acknowledgments[[credits]]
End
InsetLayout "Flex:Online citation"
LyxType custom

View File

@ -338,7 +338,7 @@ Style Keywords
End
Style Acknowledgments[[credits]]
Style Acknowledgments
Category BackMatter
Margin Static
LatexType Environment
@ -350,7 +350,7 @@ Style Acknowledgments[[credits]]
ParSep 0
Align Block
LabelType Centered
LabelString "Acknowledgments[[credits]]"
LabelString "Acknowledgments"
LabelBottomSep 0.5
LabelFont
Series Bold
@ -361,11 +361,6 @@ Style Acknowledgments[[credits]]
End
Style Acknowledgements
ObsoletedBy Acknowledgments[[credits]]
End
Style Appendix
Margin Static
LatexType Command

View File

@ -141,13 +141,13 @@ Style Affiliation
DocBookWrapperMergeWithPrevious true
End
Style Acknowledgments[[credits]]
Style Acknowledgments
Category BackMatter
Argument 1
LabelString "Title of acknowledgment[[credits]]"
LabelString "Title of acknowledgment"
Mandatory 1
EndArgument
LabelString "Acknowledgments[[credits]]"
LabelString "Acknowledgments"
LabelType Static
LabelSep " "
LabelFont
@ -162,10 +162,6 @@ Style Acknowledgments[[credits]]
DocBookSection true
End
Style Acknowledgments
ObsoletedBy Acknowledgments[[credits]]
End
InsetLayout Flex:URL
LyxType custom
ContentAsLabel 1

View File

@ -258,13 +258,13 @@ End
########### Back matter #############
Style Acknowledgments[[credits]]
Style Acknowledgments
CopyStyle Standard
Category BackMatter
LatexType Environment
LatexName acknowledgments
LabelType Centered
LabelString "acknowledgments[[credits]]"
LabelString "acknowledgments"
LabelBottomSep 0.5
LabelFont
Series Bold
@ -277,10 +277,6 @@ Style Acknowledgments[[credits]]
DocBookSection true
End
Style Acknowledgments
ObsoletedBy Acknowledgments[[credits]]
End
##### stuff specific to REVTeX 4.1

View File

@ -278,7 +278,7 @@ Style Abstract
End
Style Acknowledgments[[credits]]
Style Acknowledgments
Category BackMatter
LatexType Environment
LatexName acknowledgments
@ -288,7 +288,7 @@ Style Acknowledgments[[credits]]
Align Block
AlignPossible Block, Left, Right, Center
LabelType Centered
LabelString "Acknowledgments[[credits]]"
LabelString "Acknowledgments"
LabelBottomSep 0.5
LabelFont
Series Bold
@ -299,10 +299,6 @@ Style Acknowledgments[[credits]]
DocBookSection true
End
Style Acknowledgments
ObsoletedBy Acknowledgments[[credits]]
End
Style PACS
Category FrontMatter

View File

@ -232,20 +232,17 @@ Style Abstract
End
Style Acknowledgments[[credits]]
Style Acknowledgments
CopyStyle Abstract
LatexType Command
LatexName acks
Category BackMatter
LabelBottomsep 0
LabelType Above
LabelString "Acknowledgments[[credits]]"
LabelString "Acknowledgments"
DocBookTag para
DocBookWrapperTag acknowledgements
DocBookSection true
End
Style Acknowledgments
ObsoletedBy Acknowledgments[[credits]]
End

View File

@ -97,17 +97,14 @@ Style Abstract
End
Style Acknowledgments[[credits]]
Style Acknowledgments
CopyStyle Abstract
# NextNoIndent 1
# LatexType Command
LatexName acknowledgments
LabelString "ACKNOWLEDGMENTS[[credits]]"
LabelString "ACKNOWLEDGMENTS"
DocBookTag para
DocBookWrapperTag acknowledgements
DocBookSection true
End
Style Acknowledgments
ObsoletedBy Acknowledgments[[credits]]
End

View File

@ -622,7 +622,7 @@ Style Preface
DocBookSectionTag preface
End
Style Acknowledgment[[credits]]
Style Acknowledgment
Category BackMatter
Margin First_Dynamic
LatexType Environment
@ -637,7 +637,7 @@ Style Acknowledgment[[credits]]
Align Block
AlignPossible Block, Left
LabelType Static
LabelString "Acknowledgments[[credits]]"
LabelString "Acknowledgments"
Font
Size Small
EndFont
@ -650,19 +650,11 @@ Style Acknowledgment[[credits]]
DocBookWrapperTag acknowledgements
End
Style Acknowledgments[[credits]]
CopyStyle Acknowledgment[[credits]]
Style Acknowledgments
CopyStyle Acknowledgment
LatexName acknowledgements
End
Style Acknowledgement
ObsoletedBy Acknowledgment[[credits]]
End
Style Acknowledgements
ObsoletedBy Acknowledgments[[credits]]
End
Style Bibliography
Margin First_Dynamic
LatexType Bib_Environment

View File

@ -54,8 +54,7 @@ NoStyle Sol
NoStyle Abstract*
NoStyle TOC_Title
NoStyle TOC_Author
NoStyle Acknowledgements
NoStyle Acknowledgments[[credits]]
NoStyle Acknowledgments
NoStyle Keywords

View File

@ -50,8 +50,7 @@ NoStyle TOC_Title
NoStyle TOC_Author
NoStyle Proof(smartQED)
NoStyle Acknowledgement
NoStyle Acknowledgment[[credits]]
NoStyle Acknowledgment
NoStyle Keywords

View File

@ -58,8 +58,7 @@ NoStyle Sol
NoStyle Abstract*
NoStyle TOC_Title
NoStyle TOC_Author
NoStyle Acknowledgements
NoStyle Acknowledgments[[credits]]
NoStyle Acknowledgments
NoStyle Keywords

View File

@ -18,7 +18,7 @@ ClassOptions
FontSize 10
End
NoStyle Acknowledgements[[credits]]
NoStyle Acknowledgments
NoStyle Institute
Style Abstract

View File

@ -19,8 +19,7 @@ ClassOptions
FontSize ""
End
NoStyle Acknowledgements
NoStyle Acknowledgments[[credits]]
NoStyle Acknowledgments
# Additional headings
@ -156,7 +155,7 @@ Style Preface
Category "For editors"
End
Style Acknowledgment[[credits]]
Style Acknowledgment
Category "For editors"
End

View File

@ -64,7 +64,7 @@ NoStyle Sol
NoStyle Abstract*
NoStyle TOC_Title
NoStyle TOC_Author
NoStyle Acknowledgements[[credits]]
NoStyle Acknowledgments
NoStyle Keywords

View File

@ -4710,6 +4710,94 @@ def revert_hyper_other(document):
i += 1
ack_layouts_new = {
"aa" : "Acknowledgments",
"aapaper" : "Acknowledgments",
"aastex" : "Acknowledgments",
"aastex62" : "Acknowledgments",
"achemso" : "Acknowledgments",
"acmart" : "Acknowledgments",
"apa" : "Acknowledgments",
"copernicus" : "Acknowledgments",
"egs" : "Acknowledgments",# + Acknowledgment
"elsart" : "Acknowledgment",
"isprs" : "Acknowledgments",
"iucr" : "Acknowledgments",
"kluwer" : "Acknowledgments",
"svglobal3" : "Acknowledgments",
"svglobal" : "Acknowledgment",
"svjog" : "Acknowledgment",
"svmono" : "Acknowledgment",
"svmult" : "Acknowledgment",
"svprobth" : "Acknowledgment",
}
ack_layouts_old = {
"aa" : "Acknowledgement",
"aapaper" : "Acknowledgement",
"aastex" : "Acknowledgement",
"aastex62" : "Acknowledgement",
"achemso" : "Acknowledgement",
"acmart" : "Acknowledgements",
"apa" : "Acknowledgements",
"copernicus" : "Acknowledgements",
"egs" : "Acknowledgements",# + Acknowledgement
"elsart" : "Acknowledegment",
"isprs" : "Acknowledgements",
"kluwer" : "Acknowledgements",
"svglobal3" : "Acknowledgements",
"svglobal" : "Acknowledgement",
"svjog" : "Acknowledgement",
"svmono" : "Acknowledgement",
"svmult" : "Acknowledgement",
"svprobth" : "Acknowledgement",
}
def convert_acknowledgment(document):
" Fix spelling of acknowledgment styles "
if document.textclass not in list(ack_layouts_old.keys()):
return
i = 0
while True:
i = find_token(document.body, '\\begin_layout ' + ack_layouts_old[document.textclass], i)
if i == -1:
break
document.body[i] = "\\begin_layout " + ack_layouts_new[document.textclass]
if document.textclass != "egs":
return
# egs has two styles
i = 0
while True:
i = find_token(document.body, '\\begin_layout Acknowledgement', i)
if i == -1:
break
document.body[i] = "\\begin_layout Acknowledgment"
def revert_acknowledgment(document):
" Restore old spelling of acknowledgment styles "
if document.textclass not in list(ack_layouts_new.keys()):
return
i = 0
while True:
i = find_token(document.body, '\\begin_layout ' + ack_layouts_new[document.textclass], i)
if i == -1:
break
document.body[i] = "\\begin_layout " + ack_layouts_old[document.textclass]
if document.textclass != "egs":
return
# egs has two styles
i = 0
while True:
i = find_token(document.body, '\\begin_layout Acknowledgment', i)
if i == -1:
break
document.body[i] = "\\begin_layout Acknowledgement"
##
# Conversion hub
#
@ -4785,10 +4873,12 @@ convert = [
[611, []],
[612, [convert_starred_refs]],
[613, []],
[614, [convert_hyper_other]]
[614, [convert_hyper_other]],
[615, [convert_acknowledgment]]
]
revert = [[613, [revert_hyper_other]],
revert = [[614, [revert_acknowledgment]],
[613, [revert_hyper_other]],
[612, [revert_familydefault]],
[611, [revert_starred_refs]],
[610, []],

View File

@ -32,8 +32,8 @@ extern char const * const lyx_version_info;
// Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own.
#define LYX_FORMAT_LYX 614 // rkh: Add 'other' option to hyperlink
#define LYX_FORMAT_TEX2LYX 614
#define LYX_FORMAT_LYX 615 // spitz: acknowledgement > acknowledgment
#define LYX_FORMAT_TEX2LYX 615
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
#ifndef _MSC_VER