X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Flayouts%2Fdinbrief.layout;h=b102f99cf0bb4670d787523342479a9b8bdc17b7;hb=bbbd1820957f8a3584765eecc8533da6853a979f;hp=6be1cbf3de99e43d60e25ee943b29bf2f5307ea4;hpb=d252730dff10221be69df2a8c889cd311ae20e27;p=lyx.git diff --git a/lib/layouts/dinbrief.layout b/lib/layouts/dinbrief.layout index 6be1cbf3de..b102f99cf0 100644 --- a/lib/layouts/dinbrief.layout +++ b/lib/layouts/dinbrief.layout @@ -1,195 +1,475 @@ #% Do not delete the line below; configure depends on this -# \DeclareLaTeXClass{letter (DIN-Brief, German)} +# \DeclareLaTeXClass{DIN-Brief} +# \DeclareCategory{Letters} # German DIN-Brief textclass definition file. # Author : Juergen Vigna # Modified by: Carsten Kaemmerer -# Modifies only some things from letter.layout +# Modified by: Guenter Milde +# Dummy Style DinBrief for common layout features (removed at eof) +# Dummy Style Addresses for common address features (removed at eof) +# Generic style names (there are german translations for most names) +# Additional Styles and twiddeled layout +# Many "ObsoletedBy" to ease conversion from g-brief, scrletter, +# or letter (see also the update of the dinbrief.lyx template) +# Modified by: Juergen Spitzmueller +# use English strings, localization is done by gettext! +# TODO: DocBook doesn't support several letters in the same file. + +Format 104 -Format 7 Input letter.layout +# dinbrief's \phone has 2 args, area and number. We define an empty +# command that can be set by the Area_Code style +Preamble + \newcommand{\areacode}{} +EndPreamble -Style My_Address - Margin Static - LeftMargin Unterschrift: - LabelType Static - LabelString "Briefkopf:" - LabelSep x +# auxiliary style copied by other dinbrief styles +# the LeftMargin is set to the probably longest string +# (no typo! the umlaut is delibarately omitted) +Style DinBrief + Category Letter + LatexType Command + Margin Static + LeftMargin "Rucksende-Adresse:" + Align Left + AlignPossible Left + LabelType Static + LabelSep x LabelFont - Shape Italic - Size Small - Color blue + Series Medium + Shape Italic + Size Small + Color textlabel1 EndFont - BottomSep 0.5 - Spacing Other 0.9 End +Style Addresses + CopyStyle DinBrief + Category "Postal Data" +End +# Open a new letter +# in dinbrief, this is an environment spanning the whole letter +# (see scrlettr2 for an alternative lyx-implementation) Style Send_To_Address - Margin Static - BottomSep 0.1 - LeftMargin Unterschrift: - LabelType Static - LabelString "Adresse:" - LabelSep x - LabelFont - Series Medium - Shape Italic - Size Small - Color blue - EndFont - Spacing Other 0.9 + CopyStyle Addresses + LabelString "Address:" + KeepEmpty 1 + BottomSep 0.1 + LatexName letter + DocBookTag NONE + DocBookWrapperTag address + DocBookWrapperAttr role='send-to-address' + DocBookWrapperMergeWithPrevious true + DocBookInInfo always End +# Data Fields, placed according to DIN norm +# --------------------------------------------------------- -Style Opening - LeftMargin Unterschrift: - LabelString "Anrede:" - LabelSep x - LabelFont - Series Medium - Shape Italic - Size Small - Color blue +# need to be placed before the Opening in the LyX document! + +# backaddress in letter head +Style My_Address + CopyStyle Addresses + LabelString "Sender Address:" + LatexName address + KeepEmpty 1 + BottomSep 0.5 + AlignPossible Block, Left, Right, Center + DocBookTag address + DocBookInInfo always +End + +# backaddress in address window +Style "Return address" + CopyStyle Addresses + LabelString "Backaddress:" + LatexName backaddress + TextFont + Size Small EndFont + DocBookTag NONE + DocBookWrapperTag address + DocBookWrapperAttr role='return-address' + DocBookInInfo always End +# Printed above the address (e.g., Air Mail, Registered Mail) +Style "Postal comment" + CopyStyle Addresses + LabelString "Postal Remark:" + LatexName postremark + DocBookTag otheraddr + DocBookAttr role='postal-comment' + DocBookTagType paragraph + DocBookWrapperTag address + DocBookWrapperAttr role='send-to-address' + DocBookWrapperMergeWithPrevious true + DocBookInInfo always +End + +# Printed right next to Receiver (e.g., Urgent, Confidential) +Style Handling + CopyStyle Addresses + LabelString "Handling:" + LatexName handling + DocBookTag otheraddr + DocBookAttr role='handling' + DocBookTagType paragraph + DocBookWrapperTag address + DocBookWrapperAttr role='send-to-address' + DocBookWrapperMergeWithPrevious true + DocBookInInfo always +End + +Style YourRef + CopyStyle DinBrief + LabelString "Your ref.:" + LatexName yourmail + DocBookTag productnumber + DocBookAttr role='your-ref' + DocBookTagType paragraph + DocBookInInfo always +End + +Style MyRef + CopyStyle DinBrief + LabelString "Our ref.:" + LatexName sign + DocBookTag productnumber + DocBookAttr role='my-ref' + DocBookTagType paragraph + DocBookInInfo always +End + +Style Writer + CopyStyle DinBrief + LabelString "Writer:" + LatexName writer + DocBookTag personname + DocBookTagType paragraph + DocBookWrapperTag othercredit + DocBookWrapperAttr class='typesetter' + DocBookInInfo always +End Style Signature - LeftMargin Unterschrift: - LabelString "Unterschrift:" - LabelSep x - LabelFont - Series Medium - Shape Italic - Size Small - Color blue - EndFont + CopyStyle DinBrief + Category Closings + LabelString "Signature:" + LatexName signature + DocBookTag para + DocBookAttr role='opening' End +# contact info at the bottom of the first page +Style Bottomtext + CopyStyle DinBrief + LabelString "Bottom text:" + LatexName bottomtext + AlignPossible Block, Left, Right, Center + # TODO: DocBook, this is typically within the elements in LyX, but that makes no sense for DocBook. + DocBookTag para + DocBookAttr role='bottom-text' +End -Style Closing - LeftMargin Unterschrift: - LabelString "Gruss:" - LabelSep x - LabelFont - Series Medium - Shape Italic - Size Small - Color blue - EndFont +# dinbrief's \phone has 2 args, area and number, +# define both as distinct styles + +Style "Area code" + CopyStyle DinBrief + LabelString "Area Code:" + LatexName "renewcommand{\areacode}" + # TODO: should be in
, but too far away from these paragraphs. + DocBookTag phone + DocBookAttr role='area-code' + DocBookTagType paragraph + DocBookInInfo always +End + +Style Telephone + CopyStyle DinBrief + LabelString "Telephone:" + LatexName phone + LatexParam {\areacode} + # TODO: should be in
, but too far away from these paragraphs. + DocBookTag phone + DocBookTagType paragraph + DocBookInInfo always +End + +Style Location + CopyStyle DinBrief + LabelString "Location:" + LatexName place + Margin Right_Address_Box + TopSep 0.1 + BottomSep 0.1 + ParSep 0.1 + DocBookTag address + DocBookAttr role='location' + DocBookInInfo always +End + +Style Date + CopyStyle Location + LabelString "Date:" + LatexName date + DocBookTag date + DocBookAttr "" + DocBookTagType paragraph + DocBookInInfo always + DocBookNoFontInside true +End + +# dinbrief does not emphasize the subject line +Style Subject + CopyStyle DinBrief + LabelString "Subject:" + LatexName subject + TopSep 0.4 + BottomSep 0.4 + ParSep 0.4 + Align Block + AlignPossible Block, Left, Right, Center + DocBookTag title + DocBookTagType paragraph + DocBookInInfo always End +# Opening (Anrede) +# ---------------- + +# sets the above data fields + +Style Opening + CopyStyle DinBrief + LabelType Above + LeftMargin "" + LabelString "Opening:" + LatexName opening + KeepEmpty 1 + TopSep 1.5 + BottomSep 1 + DocBookTag para + DocBookAttr role='opening' +End + +# Backmatter (styles to be used at the end of the letter) +# ------------------------------------------------------- + +# placed in order of appearance in the document + +Style Closing + CopyStyle Opening + Category Closings + LabelString "Closing:" + LatexName closing + Argument 1 + LabelString "Signature|S" + Tooltip "Here you can insert a signature scan" + EndArgument + KeepEmpty 1 + DocBookTag para + DocBookAttr role='closing' +End Style encl - LabelString "Anlagen:" - LeftMargin Unterschrift: - LabelSep x + CopyStyle Opening + Category Closings + LabelString "encl:" + LatexName encl + TopSep 0.4 + BottomSep 0.4 + KeepEmpty 0 LabelFont - Series Medium - Shape Italic - Size Small - Color blue + Series Medium + Shape Up + Size Normal + Color foreground EndFont + DocBookTag para + DocBookAttr role='enclosed' End +Style cc + CopyStyle encl + LabelString "cc:" + LatexName cc + DocBookTag para + DocBookAttr role='carbon-copy' +End -Style ps - Margin Static - LatexType Command - LatexName ps - LeftMargin Unterschrift: - LabelSep x - TopSep 0.4 - BottomSep 0.4 - ParSep 0.4 - Align Block - AlignPossible Block, Left - LabelType Static - LabelString "PS:" - LabelFont - Series Medium - Shape Italic - Size Small - Color blue - EndFont +Style PS + CopyStyle encl + LabelString "Post Scriptum:" + LatexName ps + Align Block + AlignPossible Block, Left + ParSep 0.4 + DocBookTag para + DocBookAttr role='post-scriptum' End +# Obsoleted (or differently named) styles +# --------------------------------------- -Style cc - LabelString "Verteiler:" - LeftMargin Unterschrift: - LabelSep x - LabelFont - Series Medium - Shape Italic - Size Small - Color blue - EndFont +# ease conversion from g-brief, scrletter, or letter + +# scrletter +Style SenderAddress + ObsoletedBy My_Address End +# scrletter +Style Backaddress + ObsoletedBy "Return address" +End -Style Betreff - Margin Static - LatexType Command - LatexName subject - LeftMargin Unterschrift: - LabelSep x - KeepEmpty 1 - TopSep 0.4 - BottomSep 0.4 - ParSep 0.4 - Align Block - AlignPossible Block, Left - LabelType Static - LabelString "Betreff:" - LabelFont - Shape Italic - Size Small - Color blue - EndFont - TextFont - Shape Italic - EndFont +# g-brief-de +Style RetourAdresse + ObsoletedBy "Return address" +End + +# dinbrief (gm old), g-brief-en, scrletter, ... +Style Address + ObsoletedBy Send_To_Address +End + +# g-brief-de, g-brief2 +Style Adresse + ObsoletedBy Send_To_Address +End + +# g-brief-de +Style Postvermerk + ObsoletedBy "Postal comment" End +# g-brief-de +Style Zusatz + ObsoletedBy Handling +End + +# g-brief-de +Style IhrZeichen + ObsoletedBy YourRef +End + +# These are identical in this class +Style YourMail + ObsoletedBy YourRef +End + +# g-brief-de +Style IhrSchreiben + ObsoletedBy YourRef +End +# g-brief-de +Style MeinZeichen + ObsoletedBy MyRef +End + +# g-brief-de +Style Unterschrift + ObsoletedBy Signature +End + +# dinbrief (gm old) +Style Phone + ObsoletedBy Telephone +End + +# g-brief-de +Style Telefon + ObsoletedBy Telephone +End + +# dinbrief (gm old) +Style Place + ObsoletedBy Location +End + +# dinbrief v2 Style Stadt - Margin Right_Address_Box - LatexType Command - LatexName place - LabelSep x - TopSep 0.1 - BottomSep 0.1 - ParSep 0.1 - Align Block - AlignPossible Block, Left - LabelType Static - LabelString "Stadt:" - LabelFont - Shape Italic - Size Small - Color blue - EndFont + ObsoletedBy Location +End + +# g-brief-en +Style Town + ObsoletedBy Location End +# g-brief-de +Style Ort + ObsoletedBy Location +End +# g-brief-de Style Datum - Margin Right_Address_Box - LatexType Command - LatexName date - LabelSep x - TopSep 0.1 - BottomSep 0.1 - ParSep 0.1 - Align Block - AlignPossible Block, Left - LabelType Static - LabelString "Datum:" - LabelFont - Shape Italic - Size Small - Color blue - EndFont + ObsoletedBy Date +End + +# g-brief-en, g-brief2 +Style Reference + ObsoletedBy Subject +End + +# g-brief-de +Style Betreff + ObsoletedBy Subject End + +# g-brief-de +Style Anrede + ObsoletedBy Opening +End + +# in dinbrief, the letter text is in Standard format +Style Letter + ObsoletedBy Standard +End + +# g-brief-de +Style Brieftext + ObsoletedBy Standard +End + +# g-brief-de +Style Gruss + ObsoletedBy Closing +End + +Style ps + ObsoletedBy PS +End + +# g-brief-de +Style Encl. + ObsoletedBy encl +End + +# g-brief-de +Style Anlagen + ObsoletedBy encl +End + +# scrletter +Style CC + ObsoletedBy cc +End + +# g-brief-de +Style Verteiler + ObsoletedBy cc +End + +# Remove auxiliary styles +NoStyle DinBrief +NoStyle Addresses +