]> git.lyx.org Git - lyx.git/blobdiff - lib/layouts/tufte-book.layout
Merge branch 'master' of git.lyx.org:lyx
[lyx.git] / lib / layouts / tufte-book.layout
index 59059f2cf7a988bd1b304f5265af9118071c725b..80c01cf3e1fbeacb618e10a0a4f43abf4be8e298 100644 (file)
@@ -1,14 +1,36 @@
 #% Do not delete the line below; configure depends on this
-#  \DeclareLaTeXClass[tufte-book]{book (Tufte)}
+#  \DeclareLaTeXClass[tufte-book]{Tufte Book}
+#  \DeclareCategory{Books}
 # tufte-book textclass definition file.
 # Jason Waskiewicz <jason.waskiewicz@sendit.nodak.edu>, 2009/10/18
-# Modified by Uwe Stöhr <uwestoehr@web.de>, 2009/10/24
+# Modified by Uwe Stöhr <uwestoehr@web.de>, 2009/11/15
 
-Format 11
+Format 80
 
 Provides geometry 1
 Provides natbib-internal 1
 
+Sides          2
+PageStyle      Headings
+
+ClassOptions
+       Other           nohyper
+end
+
+# Tufte uses \cite for margin note citations
+AddToCiteEngine authoryear
+       cite[][]
+End
+
+CiteFormat authoryear
+       _sidenote Sidenote
+       _side sidenote
+       _fullcite bibl. entry
+       _bibentry Full bibliography entry.
+       # "Margin: Full bibliography entry." (dialog) / "Margin: Key (bibliography entry)"
+       cite {%dialog%[[%_sidenote%]][[%_side%]]}: {%dialog%[[%_bibentry%]][[{%label%[[%!fullcite%]][[%key%%!nextkey% (%_fullcite%)]]}]]}
+End
+
 Style Standard
        Margin          Static
        LatexType       Paragraph
@@ -22,103 +44,242 @@ End
 
 # import other layouts
 Input stdlayouts.inc
-Input book.layout
+Input stdclass.inc
+
+Style Title
+       InPreamble              1
+       NeedProtect             1
+End
+
+Style Author
+       InPreamble              1
+       NeedProtect             1
+End
+
+Style Date
+       InPreamble              1
+       NeedProtect             1
+End
 
+NoStyle Abstract
+NoStyle Chapter
+NoCounter chapter
+NoStyle Section
+NoStyle Subsection
+NoCounter subsection
 NoStyle Subsubsection
+NoCounter subsubsection
 NoStyle Subsubsection*
 NoStyle Paragraph
+NoCounter paragraph
 NoStyle Paragraph*
 NoStyle Subparagraph
+NoCounter subparagraph
 NoStyle Subparagraph*
 
-InsetLayout Sidenote
-       LyxType         custom
-       LatexType       command
-       LatexName       sidenote
-       Decoration      classic
-       LabelString     "sidenote"
+Style Chapter
+       Margin                  Static
+       Category                Sectioning
+       LabelType               No_Label
+       LabelCounter    chapter
+       TocLevel                0
+       LatexType               Command
+       LatexName               chapter
+       NeedProtect             1
+       NextNoIndent    1
+       ParSkip                 0.4
+       TopSep                  2
+       BottomSep               0.8
+       ParSep                  0.8
+       Align                   Block
+       RefPrefix               chap
+       Argument 1
+         LabelString   "Short Title|S"
+         Tooltip       "The chapter as it appears in the table of contents/running headers"
+         InsertCotext  1
+         IsTocCaption  1
+       EndArgument
+       Font
+         Series                Bold
+         Size                  Huge
+       EndFont
+End
+
+Style Section
+       Category                Sectioning
+       Margin                  Dynamic
+       LabelType               No_Label
+       LabelCounter    section
+       TocLevel                1
+       LatexType               Command
+       LatexName               section
+       NeedProtect             1
+       NextNoIndent    1
+       LabelSep                xxx
+       ParSkip                 0.4
+       TopSep                  1.3
+       BottomSep               0.7
+       ParSep                  0.7
+       Align                   Block
+       RefPrefix               sec
+       Argument 1
+         LabelString   "Short Title|S"
+         Tooltip       "The section as it appears in the table of contents/running headers"
+         InsertCotext  1
+         IsTocCaption  1
+       EndArgument
+       Font
+         Series                Bold
+         Size                  Larger
+       EndFont
+End
+
+Style Subsection
+       CopyStyle               Section
+       TocLevel                2
+       LatexName               subsection
+       TopSep                  0.9
+       BottomSep               0.5
+       ParSep                  0.5
+       RefPrefix               subsec
        Font
-         Color         foreground
-         Size          Small
-         Misc          No_Emph
-         Misc          No_Noun
-         Misc          No_Bar
+         Series                Bold
+         Size                  Large
+       EndFont
+End
+
+InsetLayout Flex:Sidenote
+       LyxType                 custom
+       LatexType               command
+       LatexName               sidenote
+       Decoration              classic
+       LabelString             "sidenote"
+       Font
+         Color                 foreground
+         Size                  Small
+         Misc                  No_Emph
+         Misc                  No_Noun
+         Misc                  No_Bar
        EndFont
        LabelFont
-         Color         marginlabel
-         Size          Small
+         Color                 marginlabel
+         Size                  Small
        EndFont
+       ResetsFont              true
 End
 
-InsetLayout Allcaps
-       CopyStyle       Sidenote
-       Decoration      Conglomerate
-       LatexName       allcaps
-       LabelString     "allcaps"
+InsetLayout Flex:Marginnote
+       CopyStyle               Flex:Sidenote
+       LatexName               marginnote
+       Decoration              classic
+       LabelString             "marginnote"
        Font
-         Misc          Noun
+         Family                Roman
+         Shape                 Up
+         Series                Medium
+       EndFont
+       MultiPar                true
+End
+
+InsetLayout Flex:NewThought
+       LyXType                 charstyle
+       LatexType               Command
+       LatexName               newthought
+       LabelString             "new thought"
+       Font
+         Shape                 SmallCaps
        EndFont
        LabelFont
-         Color         blue
+         Family                Roman
+         Color                 red
        EndFont
+       ResetsFont              true
 End
 
-InsetLayout Newthought
-       CopyStyle       Sidenote
-       Decoration      Conglomerate
-       LatexName       newthought
-       LabelString     "new thought"
+InsetLayout Flex:AllCaps
+       CopyStyle               Flex:NewThought
+       LatexName               allcaps
+       LabelString             "allcaps"
        Font
-         Shape         SmallCaps
+         Shape                 Up
+         Misc                  Noun
        EndFont
        LabelFont
-         Color         red
+         Color                 blue
+       EndFont
+End
+
+InsetLayout Flex:SmallCaps
+       CopyStyle               Flex:NewThought
+       LatexName               smallcaps
+       LabelString             "smallcaps"
+       LabelFont
+         Color                 green
        EndFont
 End
 
 Style Full_Width
-       Margin          Static
-       LaTeXType       environment
-       LaTeXName       fullwidth
-       Category        MainText
+       Margin                  Static
+       LaTeXType               environment
+       LaTeXName               fullwidth
+       Category                MainText
        NextNoIndent    1
-       ParSkip         0
-       ItemSep         0
-       TopSep          0.5
-       BottomSep       0.5
-       ParSep          0
-       Align           Block
+       ParSkip                 0
+       ItemSep                 0
+       TopSep                  0.5
+       BottomSep               0.5
+       ParSep                  0
+       Align                   Block
        AlignPossible   Block, Left, Right, Center
-       LabelType       No_Label
+       LabelType               No_Label
 End
 
 # this steps the counters
-Counter
-  Name          marginfigure
+Counter                marginfigure
 End
-Counter
-  Name          margintable
+
+Counter                margintable
 End
 
 # define the floats
 Float
-       Type            margintable
-       GuiName         MarginTable
-       Placement       tbp
-       Extension       lot
+       Type                    margintable
+       GuiName                 MarginTable
+       Placement               tbp
+       AllowedPlacement none
+       AllowsSideways  0
+       AllowsWide              0
+       Extension               lot
        NumberWithin    none
-       Style           plain
-       ListName        "List of Tables"
-       LaTeXBuiltin    true
+       Style                   plain
+       ListName                "List of Tables"
+       ListCommand             listoftables
+       IsPredefined    true
+       UsesFloatPkg    false
 End
 
 Float
-       Type            marginfigure
-       GuiName         MarginFigure
-       Placement       tbp
-       Extension       lof
+       Type                    marginfigure
+       GuiName                 MarginFigure
+       Placement               tbp
+       AllowedPlacement none
+       AllowsSideways  0
+       AllowsWide              0
+       Extension               lof
        NumberWithin    none
-       Style           plain
-       ListName        "List of Figures"
-       LaTeXBuiltin    true
-End
\ No newline at end of file
+       Style                   plain
+       ListName                "List of Figures"
+       ListCommand             listoffigures
+       IsPredefined    true
+       UsesFloatPkg    false
+End
+
+Style Bibliography
+       TopSep                  4
+       LabelString             "Bibliography"
+       LabelFont
+         Series                Bold
+         Size                  Huge
+       EndFont
+       TocLevel                0
+End