]> git.lyx.org Git - features.git/blobdiff - lib/layouts/lettre.layout
DocBook: ensure that <info>-related insets in the abstract are not generated in the...
[features.git] / lib / layouts / lettre.layout
index 05a50fd640292b4a15ced89016ba6d5d3b3cac99..bb4d4b1ec7be56fc00adf4bc1c8c706bd0ebda74 100644 (file)
@@ -1,5 +1,6 @@
 #% Do not delete the line below; configure depends on this
-#    \DeclareLaTeXClass{letter (lettre)}
+#  \DeclareLaTeXClass{French Letter (lettre)}
+#  \DeclareCategory{Letters}
 # French Letter textclass definition file. 
 # Author : Alain Castera <castera@in2p3.fr>
 # Modifies only some things from letter.layout
 #  - margins set to dynamic to ensure alignment of line headings
 #  - categories
 #  - ordering control left at the beginning (any other way ?)
+#---------------
+# rev.4; J.-P. Chretien oct 2016
+# update and review for inclusion in lyx-2.2.3
+#  - remove the workaround for page format (not needed after v2.351)
+
+# TODO: DocBook doesn't support several letters in the same file.
 
 
-Format 30
+Format 85
 
 #(pre)declarations (just to impose some order on the menus)
 Style Standard
@@ -128,15 +135,16 @@ Preamble
 
 % to get the specified pagesize 
 % (workaround for an a4paper/lettre problem in pdf mode)
-\@ifpackageloaded{ifpdf}{}{\usepackage{ifpdf}}
-\ifpdf\input pdftexconfig.tex\fi
+% removed in oct 2016, no more needed since 2.351 and created an error with LuaTeX
+%\@ifpackageloaded{ifpdf}{}{\usepackage{ifpdf}}
+%\ifpdf\input pdftexconfig.tex\fi
 
 EndPreamble
 
 # My Address style used to specify sender name and coordinates
 Style My_Address
   CopyStyle     My_Address
-  Category      Headings
+  Category      "Postal Data"
   Margin        Static
   LatexType     Command
   LatexName     MyAddress
@@ -151,6 +159,11 @@ Style My_Address
        \providecommand{\lyaddress}{\address{#1}}
        }
   EndPreamble
+  # Don't break the sequential bunch of elements going into the wrapper.
+  DocBookTag         NONE
+  DocBookWrapperTag  address
+  DocBookWrapperMergeWithPrevious  true
+  DocBookInInfo      always
 End
 
 # City name style
@@ -181,6 +194,11 @@ Style Place
         \renewcommand{\lylieu}{\lieu{#1}}
         }
   EndPreamble
+  DocBookTag         city
+  DocBookTagType     paragraph
+  DocBookWrapperTag  address
+  DocBookWrapperMergeWithPrevious  true
+  DocBookInInfo      always
 End
 
 #suppress City indication
@@ -207,6 +225,11 @@ Style NoPlace
         \renewcommand{\lylieu}{\nolieu{}}
         }
   EndPreamble
+  # Don't break the sequential bunch of elements going into the wrapper.
+  DocBookTag         NONE
+  DocBookWrapperTag  address
+  DocBookWrapperMergeWithPrevious  true
+  DocBookInInfo      always
 End
 
 # date Style
@@ -230,6 +253,9 @@ Style Date
     Shape              Italic
     Color              red
   EndFont
+  DocBookTag      date
+  DocBookTagType  paragraph
+  DocBookInInfo   always
 End
 
 #suppress date indication
@@ -250,6 +276,8 @@ Style NoDate
   EndFont
   Preamble
   EndPreamble
+  DocBookTag     NONE
+  DocBookInInfo  always
 End
 
 # location (i.e. office, department ...)
@@ -280,6 +308,9 @@ Style Location
         \renewcommand{\lylocation}{\location{#1}}
         }
   EndPreamble
+  DocBookWrapperTag  address
+  DocBookWrapperMergeWithPrevious  true
+  DocBookInInfo      always
 End
 
 # telephone Style
@@ -310,6 +341,9 @@ Style Telephone
         \renewcommand{\lytelephone}{\telephone{#1}}
        }
   EndPreamble
+  DocBookWrapperTag  address
+  DocBookWrapperMergeWithPrevious  true
+  DocBookInInfo      always
 End
 
 #suppress telephone indication
@@ -335,7 +369,11 @@ Style NoTelephone
         \renewcommand{\lytelephone}{\notelephone{}}
         }
   EndPreamble
-
+  # Don't break the sequential bunch of elements going into the wrapper.
+  DocBookTag         NONE
+  DocBookWrapperTag  address
+  DocBookWrapperMergeWithPrevious  true
+  DocBookInInfo      always
 End
 
 # telefax Style
@@ -366,6 +404,11 @@ Style Fax
         \renewcommand{\lyfax}{\fax{#1}}
         }
   EndPreamble
+  DocBookTag         fax
+  DocBookTagType     paragraph
+  DocBookWrapperTag  address
+  DocBookWrapperMergeWithPrevious  true
+  DocBookInInfo      always
 End
 
 #suppress fax indication
@@ -391,6 +434,11 @@ Style NoFax
         \renewcommand{\lyfax}{\nofax{}}
         }
   EndPreamble
+  # Don't break the sequential bunch of elements going into the wrapper.
+  DocBookTag         NONE
+  DocBookWrapperTag  address
+  DocBookWrapperMergeWithPrevious  true
+  DocBookInInfo      always
 End
 
 
@@ -422,6 +470,11 @@ Style Email
         \renewcommand{\lyemail}{\email{#1}}
         }
   EndPreamble
+  DocBookTag         email
+  DocBookTagType     paragraph
+  DocBookWrapperTag  address
+  DocBookWrapperMergeWithPrevious  true
+  DocBookInInfo      always
 End
 
 # Subject Style
@@ -444,6 +497,9 @@ Style Subject
     Shape              Italic
     Color              red
   EndFont
+  DocBookTag     title
+  DocBookTagType paragraph
+  DocBookInInfo  maybe
 End
 
 # YourRef Style
@@ -460,6 +516,10 @@ Style YourRef
     Shape              Italic
     Color              red
   EndFont
+  DocBookTag      productnumber
+  DocBookAttr     role='your-ref'
+  DocBookTagType  paragraph
+  DocBookInInfo   always
 End
 
 # MyRef Style
@@ -476,6 +536,10 @@ Style MyRef
     Shape              Italic
     Color              red
   EndFont
+  DocBookTag      productnumber
+  DocBookAttr     role='my-ref'
+  DocBookTagType  paragraph
+  DocBookInInfo   always
 End
 
 Style Send_To_Address
@@ -508,6 +572,11 @@ Style Send_To_Address
          \needsendlettertrue
        }
   EndPreamble
+  DocBookTag         NONE
+  DocBookWrapperTag  address
+  DocBookWrapperAttr role='send-to-address'
+  DocBookWrapperMergeWithPrevious  true
+  DocBookInInfo      always
 End
 
 #As a temporary(?) trick the last(only?) letter of the file must be processed
@@ -530,11 +599,13 @@ Style EndOfMessage
     Shape              Italic
     Color              red
   EndFont
+  DocBookTag  NONE
 End
 
 Style EndOfFile
   CopyStyle            EndOfMessage
   LabelString          EndOfFile.
+  DocBookTag  NONE
 End
 
 # Opening style definition (Accroche)
@@ -668,7 +739,6 @@ Style Post_Scriptum
         \psneededtrue
        }
   EndPreamble
+  DocBookTag   para
+  DocBookAttr  role='post-scriptum'
 End
-
-
-