X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Flayouts%2Ftufte-book.layout;h=c0430709ea4d034deea2e2c1cbcb0189ed28967e;hb=e2e74ffb0a72477420bfc2a8be0fcfbafe52e8ae;hp=3fa075b80f6953479ac11648afddc800ee6cc3cb;hpb=4d6f9eb089bfa664374e599db17d9f671a22f968;p=lyx.git diff --git a/lib/layouts/tufte-book.layout b/lib/layouts/tufte-book.layout index 3fa075b80f..c0430709ea 100644 --- a/lib/layouts/tufte-book.layout +++ b/lib/layouts/tufte-book.layout @@ -1,22 +1,37 @@ #% Do not delete the line below; configure depends on this -# \DeclareLaTeXClass[tufte-book,bibentry.sty,changepage.sty,fancyhdr.sty,ifmtarg.sty,letterspace.sty,multicol.sty,natbib.sty,optparams.sty,paralist.sty,placeins.sty,ragged2e.sty,setspace.sty,textcase.sty,titlesec.sty,titletoc.sty,xcolor.sty,xifthen.sty,xkeyval.sty]{Tufte Book} +# \DeclareLaTeXClass[tufte-book]{Tufte Book} # \DeclareCategory{Books} # tufte-book textclass definition file. # Jason Waskiewicz , 2009/10/18 # Modified by Uwe Stöhr , 2009/11/15 -Format 58 +Format 104 Provides geometry 1 Provides natbib-internal 1 Sides 2 PageStyle Headings +DocBookRoot book 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 @@ -34,14 +49,17 @@ 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 @@ -71,20 +89,25 @@ Style Chapter NeedProtect 1 NextNoIndent 1 ParSkip 0.4 - TopSep 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" + Tooltip "The chapter as it appears in the table of contents/running headers" InsertCotext 1 + IsTocCaption 1 EndArgument Font Series Bold Size Huge EndFont + # h1 is used for the document title. + HTMLTag h2 + DocBookTag title + DocBookSectionTag chapter End Style Section @@ -106,13 +129,17 @@ Style Section RefPrefix sec Argument 1 LabelString "Short Title|S" - Tooltip "The section as it appears in the table of contents/running headers" + Tooltip "The section as it appears in the table of contents/running headers" InsertCotext 1 + IsTocCaption 1 EndArgument Font Series Bold Size Larger EndFont + HTMLTag h3 + DocBookTag title + DocBookSectionTag section End Style Subsection @@ -135,6 +162,8 @@ InsetLayout Flex:Sidenote LatexName sidenote Decoration classic LabelString "sidenote" + ResetsFont true + InheritFont false Font Color foreground Size Small @@ -146,7 +175,10 @@ InsetLayout Flex:Sidenote Color marginlabel Size Small EndFont - ResetsFont true + DocBookTag footnote + DocBookAttr role='sidenote' + DocBookItemTag para + DocBookTagType inline End InsetLayout Flex:Marginnote @@ -154,11 +186,7 @@ InsetLayout Flex:Marginnote LatexName marginnote Decoration classic LabelString "marginnote" - Font - Family Roman - Shape Up - Series Medium - EndFont + DocBookAttr role='marginnote' MultiPar true End @@ -167,14 +195,17 @@ InsetLayout Flex:NewThought LatexType Command LatexName newthought LabelString "new thought" + ResetsFont true Font Shape SmallCaps EndFont LabelFont Family Roman - Color red + Color textlabel3 EndFont - ResetsFont true + DocBookTag emphasis + DocBookAttr role='newthought' + DocBookTagType inline End InsetLayout Flex:AllCaps @@ -186,8 +217,10 @@ InsetLayout Flex:AllCaps Misc Noun EndFont LabelFont - Color blue + Color textlabel1 EndFont + DocBookTag emphasis + DocBookAttr role='allcaps' End InsetLayout Flex:SmallCaps @@ -195,8 +228,10 @@ InsetLayout Flex:SmallCaps LatexName smallcaps LabelString "smallcaps" LabelFont - Color green + Color textlabel2 EndFont + DocBookTag emphasis + DocBookAttr role='smallcaps' End Style Full_Width @@ -213,13 +248,19 @@ Style Full_Width Align Block AlignPossible Block, Left, Right, Center LabelType No_Label + DocBookTag para + DocBookAttr role='fullwidth' End # this steps the counters Counter marginfigure + GuiName "Margin Figure" + PrettyFormat "Margin Figure ##" End Counter margintable + GuiName "Margin Table" + PrettyFormat "Margin Table ##" End # define the floats @@ -262,4 +303,5 @@ Style Bibliography Series Bold Size Huge EndFont + TocLevel 0 End