/usr/share/lyx/layouts/lettre.layout is in lyx-common 2.2.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 | #% Do not delete the line below; configure depends on this
# \DeclareLaTeXClass{French Letter (lettre)}
# \DeclareCategory{Letters}
# French Letter textclass definition file.
# Author : Alain Castera <castera@in2p3.fr>
# Modifies only some things from letter.layout
# to use the lettre.cls class from Denis Megevand
# (almost) nothing regarding fax, only letter
#---------------
# rev 1; A. Castera :
# A lot of LateX code added to avoid being bored by
# the imposed command order of the class letter (see comments)
#---------------
#rev 2; A. Castera :
# further more LaTeX code to make tth happy
# with the class.(Following a request on
# such kind of thing from lyx-users@lists.lyx.org)
#---------------
# rev.3; J.-P. Chretien oct 2010
# general update and review for inclusion in lyx-1.6.8
# - remove tth stuff
# - english named styles (translated in fr.po)
# - margins set to dynamic to ensure alignment of line headings
# - categories
# - ordering control left at the beginning (any other way ?)
Format 60
#(pre)declarations (just to impose some order on the menus)
Style Standard
End
Style My_Address
End
Style Location
End
Style Telephone
End
Style NoTelephone
End
Style Fax
End
Style NoFax
End
Style Email
End
Style Place
End
Style NoPlace
End
Style Date
End
Style NoDate
End
Style Send_To_Address
End
Style Subject
End
Style YourRef
End
Style MyRef
End
Style Opening
End
Style Closing
End
Style Signature
End
Style encl
End
Style cc
End
Style Post_Scriptum
End
Style EndOfMessage
End
Style EndOfFile
End
# Input general definitions
Input letter.layout
Preamble
%% A lot of newif
%% to allow reorder commands and output them when needed only
\newif\ifneedsendletter % we started a letter
\newif\ifneedsendfax % we started a fax
\newif\ifmonaddressused % sender address specified
\newif\ifmonlieuused % city
\newif\ifmonlocationused % sender extra info (office, etc..)
\newif\ifmontelephoneused % sender phone # specified
\newif\ifmonfaxused % sender fax # specified
\newif\ifmonemailused % sender email address specified
\newif\iflyxsigp % first of up to 3 signatures
\newif\iflyxsigs % second signature
\newif\iflyxsigt % third one
\newif\ifpsneeded % post-scriptum
\newif\ifccneeded % carbon copy to somebody
\newif\ifencneeded % encluded items
%% Sometimes you don't want a closing ("formule de politesse"),
%% but the package still needs it. Use a void macro instead of a newif
\newcommand{\Lyclose}{}
%%
%% here is the real stuff : ouput the commands in the "proper" order
\newcommand{\findemessage}
{
\ifneedsendletter %% did we start a letter ?
\iflyxsigp \signature{\Lysigp} \else \name{} \fi
\iflyxsigs \secondsignature{\Lysigs} \fi
\iflyxsigt \thirdsignature{\Lysigt} \fi
\lyxsigpfalse
\lyxsigsfalse
\lyxsigtfalse
\closing{\Lyclose}
\ifpsneeded \ps{P.S. : }{\Lyps} \psneededfalse \fi
\ifccneeded \cc{\Lycc} \ccneededfalse \fi
\ifencneeded \encl{\Lyenc} \encneededfalse \fi
\end{letter}
\needsendletterfalse %% done with letter
\fi % if needSendLetter
\ifneedsendfax \end{telefax} %% nothing provided yet for telefax !
\needsendfaxfalse
\fi % if needSendFax
} %findemessage
% to get the specified pagesize
% (workaround for an a4paper/lettre problem in pdf mode)
\@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 "Postal Data"
Margin Static
LatexType Command
LatexName MyAddress
ParSkip 0.4
BottomSep 1.5
ParSep 1.5
Align Left
AlignPossible Left
Preamble
\newcommand{\MyAddress}[1]{ % will save the info for future use
\monaddressusedtrue
\providecommand{\lyaddress}{\address{#1}}
}
EndPreamble
End
# City name style
Style Place
Category Headings
Margin Dynamic
LatexType Command
LatexName Myplace
LabelSep xx
TopSep 0.4
BottomSep 0.4
ParSep 0.4
Align Block
AlignPossible Block, Left
LabelType Static
LabelString City:
LeftMargin x
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
Preamble
\newcommand{\Myplace}[1]{ % will save the info for future use
\monlieuusedtrue
\providecommand{\lylieu}{\relax}
\renewcommand{\lylieu}{\lieu{#1}}
}
EndPreamble
End
#suppress City indication
Style NoPlace
Category Headings
KeepEmpty 1
LatexType Command
LatexName MyNoPlace
LabelType Static
Margin Dynamic
LabelString NoPlace
LeftMargin x
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
Preamble
\newcommand{\MyNoPlace}{
\monlieuusedtrue
\providecommand{\lylieu}{\relax}
\renewcommand{\lylieu}{\nolieu{}}
}
EndPreamble
End
# date Style
Style Date
Category Headings
Margin Dynamic
LatexType Command
LatexName date
LeftMargin x
LabelSep xx
TopSep 0.4
BottomSep 0.4
ParSep 0.4
Align Block
AlignPossible Block, Left
LabelType Static
LabelString Date:
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
End
#suppress date indication
Style NoDate
Category Headings
KeepEmpty 1
Margin Dynamic
LatexType Command
LatexName nodate
LabelType Static
LeftMargin x
LabelString NoDate
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
Preamble
EndPreamble
End
# location (i.e. office, department ...)
Style Location
Category Headings
Margin Dynamic
LatexType Command
LatexName MyLocation
LeftMargin x
LabelString Office:
LabelSep xx
TopSep 0.4
BottomSep 0.4
ParSep 0.4
Align Block
AlignPossible Block, Left
LabelType Static
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
Preamble
\newcommand{\MyLocation}[1]{ % will save the info for future use
\monlocationusedtrue
\providecommand{\lylocation}{\relax}
\renewcommand{\lylocation}{\location{#1}}
}
EndPreamble
End
# telephone Style
Style Telephone
Category Headings
Margin Dynamic
LatexType Command
LatexName MyTelephone
LeftMargin x
LabelString Tel:
LabelSep xx
TopSep 0.4
BottomSep 0.4
ParSep 0.4
Align Block
AlignPossible Block, Left
LabelType Static
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
Preamble
\newcommand{\MyTelephone}[1]{ % will save the info for future use
\montelephoneusedtrue
\providecommand{\lytelephone}{\relax}
\renewcommand{\lytelephone}{\telephone{#1}}
}
EndPreamble
End
#suppress telephone indication
Style NoTelephone
Category Headings
KeepEmpty 1
Margin Dynamic
LatexType Command
LatexName MyNoTelephone
LabelType Static
LeftMargin x
LabelString NoTel
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
Preamble
\newcommand{\MyNoTelephone}{
\montelephoneusedtrue
\providecommand{\lytelephone}{\relax}
\renewcommand{\lytelephone}{\notelephone{}}
}
EndPreamble
End
# telefax Style
Style Fax
Category Headings
Margin Dynamic
LatexType Command
LatexName MyFax
LeftMargin x
LabelSep xx
TopSep 0.4
BottomSep 0.4
ParSep 0.4
Align Block
AlignPossible Block, Left
LabelType Static
LabelString Fax:
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
Preamble
\newcommand{\MyFax}[1]{ % will save the info for future use
\monfaxusedtrue
\providecommand{\lyfax}{\relax}
\renewcommand{\lyfax}{\fax{#1}}
}
EndPreamble
End
#suppress fax indication
Style NoFax
Category Headings
KeepEmpty 1
Margin Dynamic
LatexType Command
LatexName MyNoFax
LabelType Static
LeftMargin x
LabelString NoFax
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
Preamble
\newcommand{\MyNoFax}{
\monfaxusedtrue
\providecommand{\lyfax}{\relax}
\renewcommand{\lyfax}{\nofax{}}
}
EndPreamble
End
# Email Style
Style Email
Category Headings
Margin Dynamic
LatexType Command
LatexName MyEmail
LeftMargin x
LabelString Email:
LabelSep xx
TopSep 0.4
BottomSep 0.4
ParSep 0.4
Align Block
AlignPossible Block, Left
LabelType Static
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
Preamble
\newcommand{\MyEmail}[1]{ % will save the info for future use
\monemailusedtrue
\providecommand{\lyemail}{\relax}
\renewcommand{\lyemail}{\email{#1}}
}
EndPreamble
End
# Subject Style
Style Subject
Margin Dynamic
LatexType Command
LatexName conc
LeftMargin x
LabelString Subject:
LabelSep xx
TopSep 0.4
BottomSep 0.4
ParSep 0.4
Align Block
AlignPossible Block, Left
LabelType Static
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
End
# YourRef Style
Style YourRef
CopyStyle Subject
Margin Dynamic
LatexType Command
LatexName Vref
LeftMargin x
LabelString YourRef:
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
End
# MyRef Style
Style MyRef
CopyStyle Subject
Margin Dynamic
LatexType Command
LatexName Nref
LeftMargin x
LabelString MyRef:
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
End
Style Send_To_Address
CopyStyle Send_To_Address
Margin Right_Address_Box
LatexType Command
LatexName lettre
Preamble
\newcommand{\lettre}[1] { %% organized as expected by the package
\findemessage %% if we already started a letter or a fax
\begin{letter}{#1} %% now the new one
\ifmonaddressused
\lyaddress{}
\fi
\ifmonlocationused
\lylocation{}
\fi
\ifmonlieuused
\lylieu{}
\fi
\ifmontelephoneused
\lytelephone{}
\fi
\ifmonfaxused
\lyfax{}
\fi
\ifmonemailused
\lyemail{}
\fi
\needsendlettertrue
}
EndPreamble
End
#As a temporary(?) trick the last(only?) letter of the file must be processed
# and to allow changing sender address, location,etc.. in between 2 letters
Style EndOfMessage
Category Closings
KeepEmpty 1
Margin Dynamic
TopSep 0.8
BottomSep 0.8
ParSep 0.8
LatexType Command
LatexName findemessage
LabelType Static
LabelString EndOfMessage.
LeftMargin x
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
End
Style EndOfFile
CopyStyle EndOfMessage
LabelString EndOfFile.
End
# Opening style definition (Accroche)
Style Opening
CopyStyle Opening
Margin Dynamic
LeftMargin x
LabelString Opening:
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
End
# Closing style definition (FormuleDePolitesse, Salutations)
Style Closing
CopyStyle Closing
Margin Dynamic
LeftMargin x
LabelString Closing:
LatexType Command
LatexName lyxclose
Preamble
\newcommand{\lyxclose}[1]{\renewcommand{\Lyclose}{#1}}
EndPreamble
End
# Signature style definition
Style Signature
Margin Dynamic
LeftMargin x
LabelString Signature:
LatexType Command
LatexName lyxsig
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
Preamble
%% automatic assignment of signatures
%% there is only 1 Signature style, but multiple latex commands
\newcommand{\lyxsig}[1]{
\iflyxsigs %% the second sig. exists, so this one is the third
\providecommand{\Lysigt}{\relax}
\renewcommand{\Lysigt}{#1}
\lyxsigttrue
\else %% if lyxsigs exist
\iflyxsigp %% the second one
\providecommand{\Lysigs}{\relax}
\renewcommand{\Lysigs}{#1}
\lyxsigstrue
\else %% the first one
\providecommand{\Lysigp}{\relax}
\renewcommand{\Lysigp}{#1}
\lyxsigptrue
\fi %% if lyxsidp exist
\fi %% if lyxsigs exist
}
EndPreamble
End
# encl style definition (Ci-joint)
Style encl
CopyStyle encl
Category Closings
Margin Dynamic
LeftMargin x
LabelString encl:
LatexName lyxenc
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
Preamble
\newcommand{\lyxenc}[1]{
\providecommand{\Lyenc}{\relax}
\renewcommand{\Lyenc}{#1}
\encneededtrue
}
EndPreamble
End
#Carbon Copy
Style cc
CopyStyle encl
LatexName lyxcc
LeftMargin x
LabelString cc:
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
Preamble
\newcommand{\lyxcc}[1]{
\providecommand{\Lycc}{\relax}
\renewcommand{\Lycc}{#1}
\ccneededtrue
}
EndPreamble
End
#Post Scriptum
Style Post_Scriptum
Category Closings
Margin Dynamic
LatexType Command
LatexName lyxps
LabelSep xx
LabelType Static
LeftMargin x
LabelString P.S.:
# label font definition
LabelFont
Series Bold
Shape Italic
Color red
EndFont
Preamble
\newcommand{\lyxps}[1]{
\providecommand{\Lyps}{\relax}
\renewcommand{\Lyps}{#1}
\psneededtrue
}
EndPreamble
End
|