From b30f7c3e9e4a6fd86c3df81a9abf76535ac48df2 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Mon, 22 Mar 2010 11:59:22 +0000 Subject: [PATCH] Move the RefPrefix definitions to their own file, for easy inclusion in other layouts. Also fix up some of those layotus. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33836 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/Makefile.am | 1 + lib/layouts/beamer.layout | 4 +++- lib/layouts/egs.layout | 1 + lib/layouts/isprs.layout | 1 - lib/layouts/ltugboat.layout | 1 + lib/layouts/stdrefprefix.inc | 38 +++++++++++++++++++++++++++++++++++ lib/layouts/stdsections.inc | 8 +------- lib/layouts/tufte-book.layout | 3 +++ 8 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 lib/layouts/stdrefprefix.inc diff --git a/lib/Makefile.am b/lib/Makefile.am index f046cda233..6acb4433ad 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1135,6 +1135,7 @@ dist_layouts_DATA =\ layouts/stdlayouts.inc \ layouts/stdletter.inc \ layouts/stdlists.inc \ + layouts/stdrefprefix.inc \ layouts/stdsections.inc \ layouts/stdstarsections.inc \ layouts/stdstruct.inc \ diff --git a/lib/layouts/beamer.layout b/lib/layouts/beamer.layout index 0b7796e188..a4a0cced01 100644 --- a/lib/layouts/beamer.layout +++ b/lib/layouts/beamer.layout @@ -123,6 +123,7 @@ Style Part Align Center LabelType Static LabelString "Part" + RefPrefix part # standard font definition Font @@ -154,6 +155,7 @@ Style Section LabelType Counter LabelCounter section LabelString "Section \arabic{section}" + RefPrefix sec OptionalArgs 1 Font @@ -196,6 +198,7 @@ Style Subsection LabelType Counter LabelCounter subsection LabelString "Subsection \arabic{section}.\arabic{subsection}" + RefPrefix sub OptionalArgs 1 # standard font definition @@ -1235,4 +1238,3 @@ Preamble \def\gobbletableofcontents#1{\origtableofcontents} } EndPreamble - diff --git a/lib/layouts/egs.layout b/lib/layouts/egs.layout index 5987502342..74ff81c65c 100644 --- a/lib/layouts/egs.layout +++ b/lib/layouts/egs.layout @@ -656,3 +656,4 @@ Input stdinsets.inc Input stdfloats.inc Input numarticle.inc Input stdcounters.inc +Input stdrefprefix.inc diff --git a/lib/layouts/isprs.layout b/lib/layouts/isprs.layout index e7b7182746..04651773ab 100644 --- a/lib/layouts/isprs.layout +++ b/lib/layouts/isprs.layout @@ -239,4 +239,3 @@ Style Acknowledgements Size Normal EndFont End - diff --git a/lib/layouts/ltugboat.layout b/lib/layouts/ltugboat.layout index 6b6ca8fab2..bc9a28e933 100644 --- a/lib/layouts/ltugboat.layout +++ b/lib/layouts/ltugboat.layout @@ -130,6 +130,7 @@ Input stdlayouts.inc Input stdfloats.inc Input stdcounters.inc Input stdinsets.inc +Input stdrefprefix.inc Style Title diff --git a/lib/layouts/stdrefprefix.inc b/lib/layouts/stdrefprefix.inc new file mode 100644 index 0000000000..872108caa4 --- /dev/null +++ b/lib/layouts/stdrefprefix.inc @@ -0,0 +1,38 @@ +# Standard RefPrefix definitions. +# This defines the label prefixes for use with refstyle.sty. +# +# Author: Richard Heck +# +# Note that this file is included in stdsections.inc, which is included +# in stdclass.inc, so any file that includes either of these will get +# the standard RefPrefix definitions. + +Format 25 + +IfStyle Part + RefPrefix part +End + +IfStyle Chapter + RefPrefix chap +End + +IfStyle Section + RefPrefix sec +End + +IfStyle Subsection + RefPrefix sub +End + +IfStyle Subsubsection + RefPrefix sub +End + +IfStyle Paragraph + RefPrefix par +End + +IfStyle Subparagraph + RefPrefix par +End diff --git a/lib/layouts/stdsections.inc b/lib/layouts/stdsections.inc index 0a1cf60c36..e0bd201804 100644 --- a/lib/layouts/stdsections.inc +++ b/lib/layouts/stdsections.inc @@ -26,7 +26,6 @@ Style Part BottomSep 4 ParSep 0.8 Align Center - RefPrefix part Alignpossible Center Font Series Bold @@ -54,7 +53,6 @@ Style Chapter ParSep 0.8 Align Block OptionalArgs 1 - RefPrefix cha Font Series Bold Size Huge @@ -80,7 +78,6 @@ Style Section ParSep 0.7 Align Block OptionalArgs 1 - RefPrefix sec Font Series Bold Size Larger @@ -101,7 +98,6 @@ Style Subsection Series Bold Size Large EndFont - RefPrefix sub HTMLTag h3 End @@ -117,7 +113,6 @@ Style Subsubsection Series Bold Size Normal EndFont - RefPrefix sub HTMLTag h4 End @@ -129,7 +124,6 @@ Style Paragraph LatexName paragraph TopSep 0.4 BottomSep 0 - RefPrefix par End @@ -140,7 +134,7 @@ Style Subparagraph LatexName subparagraph NextNoIndent 0 LeftMargin MM - RefPrefix subp End +Input stdrefprefix.inc Input numarticle.inc diff --git a/lib/layouts/tufte-book.layout b/lib/layouts/tufte-book.layout index 9ea864e5ee..845a6d6443 100644 --- a/lib/layouts/tufte-book.layout +++ b/lib/layouts/tufte-book.layout @@ -57,6 +57,7 @@ Style Chapter BottomSep 0.8 ParSep 0.8 Align Block + RefPrefix chap OptionalArgs 1 Font Series Bold @@ -80,6 +81,7 @@ Style Section BottomSep 0.7 ParSep 0.7 Align Block + RefPrefix sec OptionalArgs 1 Font Series Bold @@ -94,6 +96,7 @@ Style Subsection TopSep 0.9 BottomSep 0.5 ParSep 0.5 + RefPrefix sub Font Series Bold Size Large