diff --git a/development/FORMAT b/development/FORMAT index aba24ce190..132df53eda 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -1,5 +1,9 @@ LyX file-format changes ----------------------- + +2008-05-09 Jürgen Spitzmüller + * Format incremented to 333: fixes in the APA layout. + 2008-05-06 Pavel Sanda * Format incremented to 332: Added groupId for graphics insets. diff --git a/lib/layouts/apa.layout b/lib/layouts/apa.layout index 2db4f1c991..5417968948 100644 --- a/lib/layouts/apa.layout +++ b/lib/layouts/apa.layout @@ -2,7 +2,7 @@ # \DeclareLaTeXClass[apa,apacite.sty]{article (APA)} # Author: Randy Gobbel -Format 7 +Format 4 Columns 1 Sides 1 PageStyle Headers @@ -63,6 +63,7 @@ Style RightHeader Size Small EndFont Align Right + AlignPossible Right End @@ -263,6 +264,7 @@ Style CenteredCaption ParSkip 0.4 TopSep 0.5 Align Center + AlignPossible Center LabelType Sensitive LabelString "Senseless!" OptionalArgs 1 @@ -271,6 +273,7 @@ Style CenteredCaption EndFont LatexName centeredcaption Align Center + AlignPossible Center End @@ -288,18 +291,66 @@ End Input stdsections.inc Input stdstarsections.inc -Input stdinsets.inc + Input stdfloats.inc Input stdcounters.inc NoStyle Part -NoStyle Section -NoStyle Subsection -NoStyle Subsubsection +NoStyle Part* NoStyle Chapter -NoStyle Paragraph -NoStyle Subparagraph NoStyle Chapter* +NoStyle Section* +NoStyle Subsection* +NoStyle Subsubsection* +NoStyle Paragraph* +NoStyle Subparagraph* + + +Style Section + LabelType No_Label + Align Center + Font + Series Bold + Size Huge + EndFont +End + + +Style Subsection + LabelType No_Label + Font + Series Bold + Size Larger + EndFont +End + + +Style Subsubsection + LabelType No_Label + Font + Series Bold + Size Large + EndFont +End + + +Style Paragraph + LabelType No_Label + Font + Series Bold + Size Normal + EndFont +End + + +Style Subparagraph + LabelType No_Label + Font + Series Bold + Size Normal + Shape Italic + EndFont +End Style Itemize diff --git a/lib/lyx2lyx/lyx_1_6.py b/lib/lyx2lyx/lyx_1_6.py index f96d9d8696..b4df663d48 100644 --- a/lib/lyx2lyx/lyx_1_6.py +++ b/lib/lyx2lyx/lyx_1_6.py @@ -2208,6 +2208,30 @@ def revert_graphics_group(document): i = i + 1 +def update_apa_styles(document): + ' Replace obsolete styles' + + if document.textclass != "apa": + return + + obsoletedby = { "Acknowledgments": "Acknowledgements", + "Section*": "Section", + "Subsection*": "Subsection", + "Subsubsection*": "Subsubsection", + "Paragraph*": "Paragraph", + "Subparagraph*": "Subparagraph"} + i = 0 + while 1: + i = find_token(document.body, "\\begin_layout", i) + if i == -1: + return + + layout = document.body[i][14:] + if layout in obsoletedby: + document.body[i] = "\\begin_layout " + obsoletedby[layout] + + i += 1 + ## # Conversion hub # @@ -2269,9 +2293,11 @@ convert = [[277, [fix_wrong_tables]], [330, []], [331, [convert_ltcaption]], [332, []], + [333, [update_apa_styles]], ] -revert = [[331, [revert_graphics_group]], +revert = [[332, []], + [331, [revert_graphics_group]], [330, [revert_ltcaption]], [329, [revert_leftarrowfill, revert_rightarrowfill, revert_upbracefill, revert_downbracefill]], [328, [revert_master]], diff --git a/src/Buffer.cpp b/src/Buffer.cpp index b6e234b752..534cbfb435 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -115,7 +115,7 @@ namespace os = support::os; namespace { -int const LYX_FORMAT = 332; //ps, graphgroups +int const LYX_FORMAT = 333; typedef map DepClean; typedef map > RefCache;