From: Thibaut Cuvelier Date: Sun, 5 Dec 2021 21:53:36 +0000 (+0100) Subject: DocBook: implement margin/sidenotes in Tufte. X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e3489d54e3485ef186eb70b06d4372eaa400db98;p=features.git DocBook: implement margin/sidenotes in Tufte. --- diff --git a/autotests/export/docbook/Tufte_Book.xml b/autotests/export/docbook/Tufte_Book.xml index 3289cfd763..0c1cd5707b 100644 --- a/autotests/export/docbook/Tufte_Book.xml +++ b/autotests/export/docbook/Tufte_Book.xml @@ -1,6 +1,6 @@ + See https://www.lyx.org/ for more information --> Tufte Examples @@ -19,10 +19,15 @@ Working with Text One of the most prominent and distinctive features of this style is the extensive use of sidenotes. There is a wide margin to provide ample room for sidenotes and small figures. Any footnotes will automatically be converted to sidenotes. This is a sidenote that was entered using a footnote. - Alternatively, you can also use the Sidenote inset directly; you'll find it in the Insert⇒Custom Insets menu.This is a sidenote that was entered using a sidenote. -If you like to place ancillary information in the margin without the sidenote mark (the superscript number), you can use the Marginnote inset. This is Tufte's margin note. Notice that there isn't a number preceding the note, and there is no number in the main text where this note was written. The normal margin note will work as well, but it will look rather odd. + Alternatively, you can also use the Sidenote inset directly; you'll find it in the Insert⇒Custom Insets menu. +This is a sidenote that was entered using a sidenote. + +If you like to place ancillary information in the margin without the sidenote mark (the superscript number), you can use the Marginnote inset. +This is Tufte's margin note. Notice that there isn't a number preceding the note, and there is no number in the main text where this note was written. + The normal margin note will work as well, but it will look rather odd. -This is a normal margin note. Don't use it. +This is a normal margin note. Don't use it. + Another useful innovation is Tufte's NewThought character style (Edit⇒TextStyle⇒NewThought). It introduces new thoughts by means of small caps, as demonstrated in this paragraph. The Tufte document classes include two new character styles and some improvements on existing commands for letterspacing. When setting strings of ALL CAPS or small caps, the letterspacing—that is, the spacing between the letters—should be increased slightly. The AllCaps character style (Edit⇒TextStyle⇒AllCaps) has proper letterspacing for strings of FULL CAPITAL LETTERS, and the SmallCaps character style (Edit⇒TextStyle⇒SmallCaps) has letterspacing for small capital letters. These commands will also automatically convert the case of the text to upper- or lowercase, respectively. diff --git a/lib/layouts/tufte-book.layout b/lib/layouts/tufte-book.layout index f36f395059..bc79f5d6ef 100644 --- a/lib/layouts/tufte-book.layout +++ b/lib/layouts/tufte-book.layout @@ -170,6 +170,10 @@ InsetLayout Flex:Sidenote Color marginlabel Size Small EndFont + DocBookTag footnote + DocBookAttr role='sidenote' + DocBookItemTag para + DocBookTagType inline ResetsFont true End @@ -183,6 +187,7 @@ InsetLayout Flex:Marginnote Shape Up Series Medium EndFont + DocBookAttr role='marginnote' MultiPar true End @@ -201,6 +206,7 @@ InsetLayout Flex:NewThought ResetsFont true DocBookTag emphasis DocBookAttr role='newthought' + DocBookTagType inline End InsetLayout Flex:AllCaps