]> git.lyx.org Git - lyx.git/blob - lib/layouts/stdinsets.inc
fc54ac80eb562f76ba93486c39ae33f23bce62ab
[lyx.git] / lib / layouts / stdinsets.inc
1 # Textclass definition file for LaTeX.
2 # Author : Martin vermeer <martin.vermeer@hut.fi>
3 # Inset layouts definition
4 #
5 # Detailed format description is available in the customization manual
6
7 Format 67
8
9 Provides stdinsets 1
10
11 OutlinerName marginalnote "Marginal notes"
12 OutlinerName footnote     "Footnotes"
13 OutlinerName note         "Notes"
14 OutlinerName branch       "Branches"
15 OutlinerName index        "Index Entries" #no AddToToc (built-in)
16 OutlinerName listing      "Listings" #no AddToToc (built-in)
17
18 InsetLayout Marginal
19         LabelString           margin
20         LatexType             command
21         LatexName             marginpar
22         Font
23           Size                Small
24         EndFont
25         LabelFont
26           Color               marginlabel
27           Size                Small
28         EndFont
29         MultiPar              true
30         NeedProtect           true
31         HTMLStyle
32                 div.marginal {
33                         border: 2px solid black;
34                         padding: 1ex;
35                         margin: 1ex;
36                         background-color: #F0F0F0;
37                         float:right;
38                         font-size: small;
39                         font-weight: medium;
40                         font-family: serif;
41                         font-variant: normal;
42                         font-style: normal;
43                 }
44         EndHTMLStyle
45         AddToToc              marginalnote
46         IsTocCaption          true
47 End
48
49 InsetLayout Foot
50         LabelString           foot
51         LatexType             Command
52         LatexName             footnote
53         Counter               footnote
54         Font
55           Size                Small
56         EndFont
57         LabelFont
58           Color               footlabel
59           Size                Small
60         EndFont
61         MultiPar              true
62         RefPrefix             fn
63         HTMLLabel             \arabic{footnote}
64         HTMLInnerTag          div
65         HTMLStyle
66                 span.foot_label {
67                         vertical-align: super;
68                         font-size: smaller;
69                         font-weight: bold;
70                         text-decoration: underline;
71                 }
72                 div.foot {
73                         display: inline;
74                         font-size: small;
75                         font-weight: medium;
76                         font-family: serif;
77                         font-variant: normal;
78                         font-style: normal;
79                 }
80                 div.foot_inner { display: none; }
81                 div.foot:hover div.foot_inner {
82                         display: block;
83                         border: 1px double black;
84                         margin: 0em 1em;
85                         padding: 1em;
86                 }
87         EndHTMLStyle
88         AddToToc              footnote
89         IsTocCaption          true
90 End
91
92 InsetLayout Foot:InTitle
93         CopyStyle             Foot
94         LatexName             thanks
95         NeedProtect           true
96         Counter               thanks
97         MultiPar              false
98         HTMLLabel             \fnsymbol{thanks}
99         HTMLInnerTag          span
100         HTMLStyle
101                 span.foot_intitle_label {
102                         vertical-align: super;
103                         font-size: smaller;
104                         font-weight: bold;
105                         text-decoration: underline;
106                 }
107                 span.foot_intitle {
108                         display: inline;
109                         font-size: small;
110                         font-weight: medium;
111                         font-family: serif;
112                         font-variant: normal;
113                         font-style: normal;
114                 }
115                 span.foot_intitle_inner { display: none; }
116                 span.foot_intitle:hover span.foot_intitle_inner {
117                         display: block;
118                         border: 1px double black;
119                         margin: 0em 1em;
120                         padding: 1em;
121                 }
122         EndHTMLStyle
123 End
124
125 InsetLayout Foot:InFloatTable
126         CopyStyle             Foot
127         LatexName             tablefootnote
128         Requires              tablefootnote
129 End
130
131
132 InsetLayout Note:Comment
133         LabelString           Comment
134         LatexType             environment
135         LatexName             comment
136         Requires              verbatim
137         BgColor               commentbg
138         LabelFont
139           Color               comment
140           Size                Small
141         EndFont
142         MultiPar              true
143         Display               false
144         HTMLTag               div
145         HTMLIsBlock           true
146         HTMLStyle
147         div.note_comment {
148                 display: none;
149         }
150         EndHTMLStyle
151         AddToToc              note
152         IsTocCaption          true
153         NeedCProtect          true
154 End
155
156
157 InsetLayout Note:Note
158         LabelString           Note
159         LatexType             command
160         LatexName             note
161         BgColor               notebg
162         LabelFont
163           Color               note
164           Size                Small
165         EndFont
166         MultiPar              true
167         # Not output for XHTML
168         AddToToc              note
169         IsTocCaption          true
170 End
171
172
173 InsetLayout Note:Greyedout
174         LabelString           Greyedout
175         LatexType             environment
176         LatexName             lyxgreyedout
177         Requires              color,lyxgreyedout
178         BgColor               greyedoutbg
179         Font
180           Color               greyedouttext
181         EndFont
182         LabelFont
183           Color               greyedout
184           Size                Small
185         EndFont
186         MultiPar              true
187         Display               false
188         HTMLInnerTag div
189         HTMLStyle
190                 div.note_greyedout {
191                         display: inline;
192                         color: #A0A0A0;
193                         padding-left: 1ex;
194                         padding-right: 1ex;
195                 }
196         EndHTMLStyle
197         HTMLIsBlock           false
198         AddToToc              note
199         IsTocCaption          true
200         NeedCProtect          true
201 End
202
203 InsetLayout ERT
204         LabelString           ERT
205         LatexType             none
206         Decoration            minimalistic
207         Font
208           Color               latex
209           Family              typewriter
210         EndFont
211         LabelFont
212           Color               latex
213           Size                Small
214         EndFont
215         MultiPar              true
216         CustomPars            false
217         ForcePlain            true
218         PassThru              true
219         ParbreakIsNewline     true
220         KeepEmpty             true
221         FreeSpacing           true
222         ForceLTR              true
223 End
224
225 InsetLayout Phantom
226         Decoration            minimalistic
227         Font
228           Color               phantomtext
229         EndFont
230         MultiPar              false
231         CustomPars            false
232         ForcePlain            true
233 End
234
235 InsetLayout IPADeco
236         Decoration            minimalistic
237         Font
238           Color               foreground
239         EndFont
240         MultiPar              false
241         CustomPars            false
242         ForcePlain            true
243 End
244
245 InsetLayout TOC
246   HTMLTag h2
247   HTMLStyle
248     div.toc {
249       margin: 2em 0em;
250       border-style: solid;
251       border-width: 2px 0px;
252       padding: 1em 0em;
253     }
254     h2.tochead { font-size: x-large; font-weight: bold; }
255     div.lyxtoc-0 {
256       margin: 2em 0em 0em 0em;
257       font-size: xx-large;
258       font-weight: bold;
259     }
260     div.lyxtoc-1 {
261       margin: 1em 0em 0em 0em;
262       font-size: x-large;
263       font-weight: bold;
264     }
265     div.lyxtoc-2 {
266       margin: 0em 0.1em 0em 1em;
267       font-size: large;
268       font-weight: normal;
269     }
270     div.lyxtoc-3 { margin: 0em 0.1em 0em 0.5em; font-size: medium; }
271     div.lyxtoc-4 { margin: 0em 0.1em 0em 0.5em; }
272     div.lyxtoc-5 { margin: 0em 0.1em 0em 0.5em; }
273     div.lyxtoc-6 { margin: 0em 0.1em 0em 0.5em; }
274     a.tocentry {
275       text-decoration: none;
276       color: black;
277     }
278     a.tocentry:visited { color: black; }
279   EndHTMLStyle
280 End
281
282 InsetLayout TOC:Listings
283         # We need the [[List of Listings]] context, since "Listings" is also
284         # the name of the inset and translated differently.
285         # "Listings[[List of Listings]]" is the name of the "List of listings"
286         # ("Listings" is the predefined english name) in listings.sty, so it
287         # must be used here as well.
288         BabelPreamble
289                 \addto\captions$$lang{\renewcommand{\lstlistlistingname}{_(Listings[[List of Listings]])}}
290         EndBabelPreamble
291         # The command does not need to be defined in LangPreamble, since
292         # listings.sty does that already. However it needs to be redefined
293         # in order to be used for non-english single-language documents.
294         LangPreamble
295                 \renewcommand{\lstlistlistingname}{_(Listings[[List of Listings]])}
296         EndLangPreamble
297         FixedWidthPreambleEncoding true
298   HTMLTag h2
299   HTMLStyle
300     div.lyxtoc-flat {
301       margin: 0em 0em 0em 1em;
302       font-size: large;
303       font-weight: normal;
304     }
305   EndHTMLStyle
306 End
307
308 InsetLayout TOC:MintedListings
309         # "List of Listings" is the name of the "List of listings"
310         # in minted.sty so it must be used here as well.
311         BabelPreamble
312                 \addto\captions$$lang{\renewcommand{\listoflistingscaption}{_(List of Listings)}}
313         EndBabelPreamble
314         # The command does not need to be defined in LangPreamble, since
315         # minted.sty does that already. However it needs to be redefined
316         # in order to be used for non-english single-language documents.
317         LangPreamble
318                 \renewcommand{\listoflistingscaption}{_(List of Listings)}
319         EndLangPreamble
320         FixedWidthPreambleEncoding false
321   HTMLTag h2
322   HTMLStyle
323     div.lyxtoc-flat {
324       margin: 0em 0em 0em 1em;
325       font-size: large;
326       font-weight: normal;
327     }
328   EndHTMLStyle
329 End
330
331 InsetLayout Include:Listings
332         BabelPreamble
333                 \addto\captions$$lang{\renewcommand{\lstlistingname}{_(Listing)}}
334         EndBabelPreamble
335         # The command does not need to be defined in LangPreamble, since
336         # listings.sty does that already. However it needs to be redefined
337         # in order to be used for non-english single-language documents.
338         LangPreamble
339                 \renewcommand{\lstlistingname}{_(Listing)}
340         EndLangPreamble
341         FixedWidthPreambleEncoding true
342 End
343
344 InsetLayout Listings
345         CopyStyle Include:Listings
346         LabelString           Listings[[inset]]
347         LatexType             none
348         Decoration            minimalistic
349         Font
350           Color               foreground
351           Family              typewriter
352         EndFont
353         LabelFont
354           Color               foreground
355           Size                Small
356         EndFont
357         BgColor               listingsbg
358         MultiPar              true
359         PassThru              true
360         ParbreakIsNewline     true
361         KeepEmpty             true
362         FreeSpacing           true
363         ForceLTR              true
364         NeedCProtect          true
365         RefPrefix             lst
366         HTMLTag               pre
367         HTMLStyle
368                 div.float-listings {
369                         border: 2px solid black;
370                         padding: 1ex;
371                         margin: 1ex;
372                 }
373                 div.listings-caption {
374                         text-align: center;
375                         border: 2px solid black;
376                         padding: 1ex;
377                         margin: 1ex;
378         }
379         EndHTMLStyle
380 End
381
382 InsetLayout MintedListings
383         CopyStyle Listings
384         BabelPreamble
385                 \addto\captions$$lang{\renewcommand{\listingscaption}{_(Listing)}}
386         EndBabelPreamble
387         # The command does not need to be defined in LangPreamble, since
388         # minted.sty does that already. However it needs to be redefined
389         # in order to be used for non-english single-language documents.
390         LangPreamble
391                 \renewcommand{\listingscaption}{_(Listing)}
392         EndLangPreamble
393         FixedWidthPreambleEncoding false
394 End
395
396 InsetLayout Branch
397         Decoration            classic
398         LabelFont
399           Color               branchlabel
400           Size                Small
401         EndFont
402         MultiPar              true
403         InToc                 true
404         HTMLIsBlock           false
405         AddToToc              branch
406         IsTocCaption          true
407 End
408
409 InsetLayout Index
410         LabelString           Idx
411         Decoration            classic
412         Font
413           Size                Small
414         EndFont
415         LabelFont
416           Color               indexlabel
417           Size                Small
418         EndFont
419         MultiPar              false
420         CustomPars            false
421         ForcePlain            true
422         ContentAsLabel        true
423         PassThruChars         @|!
424 End
425
426 InsetLayout Box
427         LabelFont
428           Color               foreground
429           Size                Small
430         EndFont
431         MultiPar              true
432 End
433
434 InsetLayout Box:Frameless
435         CopyStyle Box
436         HTMLStyle
437                 div.Frameless { margin: 1em; }
438         EndHTMLStyle
439 End
440
441 InsetLayout Box:Shaded
442         CopyStyle Box
443         BgColor shaded
444         HTMLStyle
445                 div.Shaded {
446                         background-color: gray;
447                         padding: 0.5ex;
448                 }
449         EndHTMLStyle
450 End
451
452 InsetLayout Box:Boxed
453         CopyStyle Box
454         HTMLStyle
455                 div.Boxed {
456                         border: solid thick black;
457                         padding: 0.5ex;
458                 }
459         EndHTMLStyle
460 End
461
462 InsetLayout Box:Framed
463         CopyStyle Box
464         HTMLStyle
465                 div.Framed {
466                         border: solid thick black;
467                         padding: 0.5ex;
468                 }
469         EndHTMLStyle
470 End
471
472 InsetLayout Box:ovalbox
473         CopyStyle Box
474         HTMLStyle
475                 div.ovalbox {
476                         border: groove medium black;
477                         padding: 0.5ex;
478                 }
479         EndHTMLStyle
480 End
481
482 InsetLayout Box:Ovalbox
483         CopyStyle Box
484         HTMLStyle
485                 div.Ovalbox {
486                         border: ridge thick black;
487                         padding: 0.5ex;
488                 }
489         EndHTMLStyle
490 End
491
492 InsetLayout Box:Shadowbox
493         CopyStyle Box
494         HTMLStyle
495                 div.Shadowbox { border: solid gray medium; border-bottom: solid black 1ex; border-right: solid black 1ex; padding: 0.5ex; }
496         EndHTMLStyle
497 End
498
499 InsetLayout Box:Doublebox
500         CopyStyle Box
501         HTMLStyle
502                 div.Doublebox {
503                         border: double thick black;
504                         padding: 0.5ex;
505                 }
506         EndHTMLStyle
507 End
508
509 InsetLayout Float
510         LabelFont
511           Color               collapsible
512           Size                Small
513         EndFont
514         MultiPar              true
515         HTMLStyle
516                 div.float {
517                         border: 2px solid black;
518                         text-align: center;
519                 }
520         EndHTMLStyle
521 End
522
523 #InsetWrap requires these, independently of whether stdfloats.inc is included
524 OutlinerName table        "Tables" #no AddToToc (built-in)
525 OutlinerName figure       "Figures" #no AddToToc (built-in)
526
527 InsetLayout Wrap
528         LabelFont
529           Color               collapsible
530           Size                Small
531         EndFont
532         MultiPar              true
533         RefPrefix             wrap
534         HTMLStyle
535                 div.wrap {
536                         float: right;
537                         border: 2px solid black;
538                         padding: 1ex;
539                         margin: 1ex;
540                 }
541         EndHTMLStyle
542 End
543
544 InsetLayout "Flex:URL"
545         LyXType               standard
546         Decoration            classic
547         LabelString           URL
548         ContentAsLabel        true
549         LatexName             url
550         LatexType             command
551         Requires              url
552         MultiPar              false
553         CustomPars            false
554         ForcePlain            true
555         PassThru              true
556         FreeSpacing           true
557         ForceLTR              true
558         NeedCProtect          true
559         Font
560           Family              Typewriter
561           Color               urltext
562         EndFont
563         LabelFont
564           Family              Typewriter
565           Color               urllabel
566           Size                Small
567         EndFont
568         HTMLIsBlock           false
569 End
570
571 InsetLayout Argument
572         LabelString           Argument
573         LabelFont
574           Color               collapsible
575           Size                Small
576         EndFont
577         MultiPar              false
578         ForceLocalFontSwitch  1
579 End
580
581 InsetLayout Info
582         Decoration            conglomerate
583         HTMLStyle
584                 span.info { font-family: sans-serif; }
585         EndHTMLStyle
586         HTMLTag               span
587         MultiPar              false
588 End
589
590 InsetLayout Info:menu
591         CopyStyle             Info
592         LatexType             command
593         LatexName             menuitem
594         Preamble
595           \providecommand{\menuitem}[1]{\textsf{#1}}
596         EndPreamble
597         Decoration            conglomerate
598         Font
599           Family              sans
600         EndFont
601         HTMLAttr              "class='info menu'"
602         HTMLStyle
603                 span.menu { font-family: sans-serif; }
604         EndHTMLStyle
605 End
606
607 InsetLayout Info:shortcut
608         CopyStyle             Info
609         LatexType             command
610         LatexName             shortcut
611         Preamble
612           \providecommand{\shortcut}[1]{\mbox{\textsf{#1}}}
613         EndPreamble
614         Decoration            conglomerate
615         Font
616           Family              sans
617         EndFont
618         HTMLAttr              "class='info shortcut'"
619         HTMLStyle
620                 span.shortcut { font-family: sans-serif; }
621         EndHTMLStyle
622 End
623
624 InsetLayout Info:shortcuts
625         CopyStyle             Info
626         LatexType             command
627         LatexName             shortcut
628         Preamble
629           \providecommand{\shortcut}[1]{\textsf{#1}}
630         EndPreamble
631         Decoration            conglomerate
632         Font
633           Family              sans
634         EndFont
635         HTMLAttr              "class='info shortcut'"
636         HTMLStyle
637                 span.shortcuts { font-family: sans-serif; }
638         EndHTMLStyle
639 End
640
641 InsetLayout Caption:Standard
642         LabelString          standard
643         LaTeXType            command
644         LatexName            caption
645         NeedProtect          1
646         MultiPar             false
647         Argument 1
648                 LabelString   "Short Title|S"
649                 Tooltip       "The caption as it appears in the list of figures/tables"
650                 InsertCotext  1
651         EndArgument
652         HTMLStyle
653                 div.float-caption {
654                         text-align: center;
655                         border: 2px solid black;
656                         padding: 1ex;
657                         margin: 1ex;
658                 }
659         EndHTMLStyle
660         HTMLAttr "class='float-caption float-caption-standard'"
661 End
662
663
664 InsetLayout Caption:Unnumbered
665         CopyStyle            Caption:Standard
666         LabelString          unlabelled
667         LatexName            caption*
668         ResetArgs            1
669 End
670
671
672 InsetLayout Preview
673         LabelString           Preview
674         Decoration            minimalistic
675         MultiPar              true
676 End
677
678
679 InsetLayout Script
680         LatexType       command
681         MultiPar        false
682         ForcePlain      1
683         CustomPars      0
684         InToc           1
685         HTMLIsBlock     0
686 End
687
688
689 InsetLayout Script:superscript
690         CopyStyle       Script
691         LaTeXName       textsuperscript
692         HTMLTag         sup
693 End
694
695
696 InsetLayout Script:subscript
697         CopyStyle       Script
698         Requires        subscript
699         LaTeXName       textsubscript
700         HTMLTag         sub
701 End
702
703
704 InsetLayout PrintNomencl
705         BabelPreamble
706                 \addto\captions$$lang{%
707                         \def\eqdeclaration#1{, _(see equation[[nomencl]])\nobreakspace(#1)}%
708                         \def\pagedeclaration#1{, _(page[[nomencl]])\nobreakspace#1}%
709                         \def\nomname{_(Nomenclature[[output]])}%
710                 }
711         EndBabelPreamble
712         # The command is defined for several languages in nomencl.sty. However, we need to define
713         # it anyway for the other, non suppported languages.
714         LangPreamble
715                 \def\eqdeclaration#1{, _(see equation[[nomencl]])\nobreakspace(#1)}
716                 \def\pagedeclaration#1{, _(page[[nomencl]])\nobreakspace#1}
717                 \def\nomname{_(Nomenclature[[output]])}
718         EndLangPreamble
719         HTMLTag h2
720 End
721
722 InsetLayout Tabular
723         HTMLStyle
724                 table {
725                         border-collapse: collapse;
726                         display: inline-block;
727                 }
728                 td {
729                         border: 1px solid black;
730                         padding: 0.5ex;
731                 }
732         EndHTMLStyle
733 End