]> git.lyx.org Git - lyx.git/blob - lib/layouts/stdinsets.inc
Two places where coverity urges us to limit string length
[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 63
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 Note:Comment
126         LabelString           Comment
127         LatexType             environment
128         LatexName             comment
129         Requires              verbatim
130         BgColor               commentbg
131         LabelFont
132           Color               comment
133           Size                Small
134         EndFont
135         MultiPar              true
136         Display               false
137         HTMLTag               div
138         HTMLIsBlock           true
139         HTMLStyle
140         div.note_comment {
141                 display: none;
142         }
143         EndHTMLStyle
144         AddToToc              note
145         IsTocCaption          true
146 End
147
148
149 InsetLayout Note:Note
150         LabelString           Note
151         LatexType             command
152         LatexName             note
153         BgColor               notebg
154         LabelFont
155           Color               note
156           Size                Small
157         EndFont
158         MultiPar              true
159         # Not output for XHTML
160         AddToToc              note
161         IsTocCaption          true
162 End
163
164
165 InsetLayout Note:Greyedout
166         LabelString           Greyedout
167         LatexType             environment
168         LatexName             lyxgreyedout
169         Requires              color,lyxgreyedout
170         BgColor               greyedoutbg
171         Font
172           Color               greyedouttext
173         EndFont
174         LabelFont
175           Color               greyedout
176           Size                Small
177         EndFont
178         MultiPar              true
179         Display               false
180         HTMLInnerTag div
181         HTMLStyle
182                 div.note_greyedout {
183                         display: inline;
184                         color: #A0A0A0;
185                         padding-left: 1ex;
186                         padding-right: 1ex;
187                 }
188         EndHTMLStyle
189         HTMLIsBlock           false
190         AddToToc              note
191         IsTocCaption          true
192 End
193
194 InsetLayout ERT
195         LabelString           ERT
196         LatexType             none
197         Decoration            minimalistic
198         Font
199           Color               latex
200           Family              typewriter
201         EndFont
202         LabelFont
203           Color               latex
204           Size                Small
205         EndFont
206         MultiPar              true
207         CustomPars            false
208         ForcePlain            true
209         PassThru              true
210         ParbreakIsNewline     true
211         KeepEmpty             true
212         FreeSpacing           true
213         ForceLTR              true
214 End
215
216 InsetLayout Phantom
217         Decoration            minimalistic
218         Font
219           Color               phantomtext
220         EndFont
221         MultiPar              false
222         CustomPars            false
223         ForcePlain            true
224 End
225
226 InsetLayout IPADeco
227         Decoration            minimalistic
228         Font
229           Color               foreground
230         EndFont
231         MultiPar              false
232         CustomPars            false
233         ForcePlain            true
234 End
235
236 InsetLayout TOC
237   HTMLTag h2
238   HTMLStyle
239     div.toc {
240       margin: 2em 0em;
241       border-style: solid;
242       border-width: 2px 0px;
243       padding: 1em 0em;
244     }
245     h2.tochead { font-size: x-large; font-weight: bold; }
246     div.lyxtoc-0 {
247       margin: 2em 0em 0em 0em;
248       font-size: xx-large;
249       font-weight: bold;
250     }
251     div.lyxtoc-1 {
252       margin: 1em 0em 0em 0em;
253       font-size: x-large;
254       font-weight: bold;
255     }
256     div.lyxtoc-2 {
257       margin: 0em 0.1em 0em 1em;
258       font-size: large;
259       font-weight: normal;
260     }
261     div.lyxtoc-3 { margin: 0em 0.1em 0em 0.5em; font-size: medium; }
262     div.lyxtoc-4 { margin: 0em 0.1em 0em 0.5em; }
263     div.lyxtoc-5 { margin: 0em 0.1em 0em 0.5em; }
264     div.lyxtoc-6 { margin: 0em 0.1em 0em 0.5em; }
265     a.tocentry {
266       text-decoration: none;
267       color: black;
268     }
269     a.tocentry:visited { color: black; }
270   EndHTMLStyle
271 End
272
273 InsetLayout TOC:Listings
274         # We need the [[List of Listings]] context, since "Listings" is also
275         # the name of the inset and translated differently.
276         # "Listings[[List of Listings]]" is the name of the "List of listings"
277         # ("Listings" is the predefined english name) in listings.sty, so it
278         # must be used here as well.
279         BabelPreamble
280                 \addto\captions$$lang{\renewcommand{\lstlistlistingname}{_(Listings[[List of Listings]])}}
281         EndBabelPreamble
282         # The command does not need to be defined in LangPreamble, since
283         # listings.sty does that already. However it needs to be redefined
284         # in order to be used for non-english single-language documents.
285         LangPreamble
286                 \renewcommand{\lstlistlistingname}{_(Listings[[List of Listings]])}
287         EndLangPreamble
288         FixedWidthPreambleEncoding true
289   HTMLTag h2
290   HTMLStyle
291     div.lyxtoc-flat {
292       margin: 0em 0em 0em 1em;
293       font-size: large;
294       font-weight: normal;
295     }
296   EndHTMLStyle
297 End
298
299 InsetLayout Include:Listings
300         BabelPreamble
301                 \addto\captions$$lang{\renewcommand{\lstlistingname}{_(Listing)}}
302         EndBabelPreamble
303         # The command does not need to be defined in LangPreamble, since
304         # listings.sty does that already. However it needs to be redefined
305         # in order to be used for non-english single-language documents.
306         LangPreamble
307                 \renewcommand{\lstlistingname}{_(Listing)}
308         EndLangPreamble
309         FixedWidthPreambleEncoding true
310 End
311
312 InsetLayout Listings
313         CopyStyle Include:Listings
314         LabelString           Listings[[inset]]
315         LatexType             none
316         Decoration            minimalistic
317         Font
318           Color               foreground
319           Family              typewriter
320         EndFont
321         LabelFont
322           Color               foreground
323           Size                Small
324         EndFont
325         BgColor               listingsbg
326         MultiPar              true
327         PassThru              true
328         ParbreakIsNewline     true
329         KeepEmpty             true
330         FreeSpacing           true
331         ForceLTR              true
332         RefPrefix             lst
333         HTMLTag               pre
334         HTMLStyle
335                 div.float-listings {
336                         border: 2px solid black;
337                         padding: 1ex;
338                         margin: 1ex;
339                 }
340                 div.listings-caption {
341                         text-align: center;
342                         border: 2px solid black;
343                         padding: 1ex;
344                         margin: 1ex;
345         }
346         EndHTMLStyle
347 End
348
349 InsetLayout Branch
350         Decoration            classic
351         LabelFont
352           Color               branchlabel
353           Size                Small
354         EndFont
355         MultiPar              true
356         InToc                 true
357         HTMLIsBlock           false
358         AddToToc              branch
359         IsTocCaption          true
360 End
361
362 InsetLayout Index
363         LabelString           Idx
364         Decoration            classic
365         Font
366           Size                Small
367         EndFont
368         LabelFont
369           Color               indexlabel
370           Size                Small
371         EndFont
372         MultiPar              false
373         CustomPars            false
374         ForcePlain            true
375         ContentAsLabel        true
376         PassThruChars         @|!
377 End
378
379 InsetLayout Box
380         LabelFont
381           Color               foreground
382           Size                Small
383         EndFont
384         MultiPar              true
385 End
386
387 InsetLayout Box:Frameless
388         CopyStyle Box
389         HTMLStyle
390                 div.Frameless { margin: 1em; }
391         EndHTMLStyle
392 End
393
394 InsetLayout Box:Shaded
395         CopyStyle Box
396         BgColor shaded
397         HTMLStyle
398                 div.Shaded {
399                         background-color: gray;
400                         padding: 0.5ex;
401                 }
402         EndHTMLStyle
403 End
404
405 InsetLayout Box:Boxed
406         CopyStyle Box
407         HTMLStyle
408                 div.Boxed {
409                         border: solid thick black;
410                         padding: 0.5ex;
411                 }
412         EndHTMLStyle
413 End
414
415 InsetLayout Box:Framed
416         CopyStyle Box
417         HTMLStyle
418                 div.Framed {
419                         border: solid thick black;
420                         padding: 0.5ex;
421                 }
422         EndHTMLStyle
423 End
424
425 InsetLayout Box:ovalbox
426         CopyStyle Box
427         HTMLStyle
428                 div.ovalbox {
429                         border: groove medium black;
430                         padding: 0.5ex;
431                 }
432         EndHTMLStyle
433 End
434
435 InsetLayout Box:Ovalbox
436         CopyStyle Box
437         HTMLStyle
438                 div.Ovalbox {
439                         border: ridge thick black;
440                         padding: 0.5ex;
441                 }
442         EndHTMLStyle
443 End
444
445 InsetLayout Box:Shadowbox
446         CopyStyle Box
447         HTMLStyle
448                 div.Shadowbox { border: solid gray medium; border-bottom: solid black 1ex; border-right: solid black 1ex; padding: 0.5ex; }
449         EndHTMLStyle
450 End
451
452 InsetLayout Box:Doublebox
453         CopyStyle Box
454         HTMLStyle
455                 div.Doublebox {
456                         border: double thick black;
457                         padding: 0.5ex;
458                 }
459         EndHTMLStyle
460 End
461
462 InsetLayout Float
463         LabelFont
464           Color               collapsable
465           Size                Small
466         EndFont
467         MultiPar              true
468         HTMLStyle
469                 div.float {
470                         border: 2px solid black;
471                         text-align: center;
472                 }
473         EndHTMLStyle
474 End
475
476 #InsetWrap requires these, independently of whether stdfloats.inc is included
477 OutlinerName table        "Tables" #no AddToToc (built-in)
478 OutlinerName figure       "Figures" #no AddToToc (built-in)
479
480 InsetLayout Wrap
481         LabelFont
482           Color               collapsable
483           Size                Small
484         EndFont
485         MultiPar              true
486         RefPrefix             wrap
487         HTMLStyle
488                 div.wrap {
489                         float: right;
490                         border: 2px solid black;
491                         padding: 1ex;
492                         margin: 1ex;
493                 }
494         EndHTMLStyle
495 End
496
497 InsetLayout "Flex:URL"
498         LyXType               standard
499         Decoration            classic
500         LabelString           URL
501         ContentAsLabel        true
502         LatexName             url
503         LatexType             command
504         Requires              url
505         MultiPar              false
506         CustomPars            false
507         ForcePlain            true
508         PassThru              true
509         FreeSpacing           true
510         ForceLTR              true
511         Font
512           Family              Typewriter
513           Color               urltext
514         EndFont
515         LabelFont
516           Family              Typewriter
517           Color               urllabel
518           Size                Small
519         EndFont
520         HTMLIsBlock           false
521 End
522
523 InsetLayout Argument
524         LabelString           Argument
525         LabelFont
526           Color               collapsable
527           Size                Small
528         EndFont
529         MultiPar              false
530         ForceLocalFontSwitch  1
531 End
532
533 InsetLayout Info
534         Decoration            conglomerate
535         HTMLStyle
536                 span.info { font-family: sans-serif; }
537         EndHTMLStyle
538         HTMLTag               span
539         MultiPar              false
540 End
541
542 InsetLayout Info:menu
543         CopyStyle             Info
544         LatexType             command
545         LatexName             menuitem
546         Preamble
547           \providecommand{\menuitem}[1]{\textsf{#1}}
548         EndPreamble
549         Decoration            conglomerate
550         Font
551           Family              sans
552         EndFont
553         HTMLAttr              "class='info menu'"
554         HTMLStyle
555                 span.menu { font-family: sans-serif; }
556         EndHTMLStyle
557 End
558
559 InsetLayout Info:shortcut
560         CopyStyle             Info
561         LatexType             command
562         LatexName             shortcut
563         Preamble
564           \providecommand{\shortcut}[1]{\mbox{\textsf{#1}}}
565         EndPreamble
566         Decoration            conglomerate
567         Font
568           Family              sans
569         EndFont
570         HTMLAttr              "class='info shortcut'"
571         HTMLStyle
572                 span.shortcut { font-family: sans-serif; }
573         EndHTMLStyle
574 End
575
576 InsetLayout Info:shortcuts
577         CopyStyle             Info
578         LatexType             command
579         LatexName             shortcut
580         Preamble
581           \providecommand{\shortcut}[1]{\textsf{#1}}
582         EndPreamble
583         Decoration            conglomerate
584         Font
585           Family              sans
586         EndFont
587         HTMLAttr              "class='info shortcut'"
588         HTMLStyle
589                 span.shortcuts { font-family: sans-serif; }
590         EndHTMLStyle
591 End
592
593 InsetLayout Caption:Standard
594         LabelString          standard
595         LaTeXType            command
596         LatexName            caption
597         NeedProtect          1
598         MultiPar             false
599         Argument 1
600                 LabelString   "Short Title|S"
601                 Tooltip       "The caption as it appears in the list of figures/tables"
602                 InsertCotext  1
603         EndArgument
604         HTMLStyle
605                 div.float-caption {
606                         text-align: center;
607                         border: 2px solid black;
608                         padding: 1ex;
609                         margin: 1ex;
610                 }
611         EndHTMLStyle
612         HTMLAttr "class='float-caption float-caption-standard'"
613 End
614
615
616 InsetLayout Caption:Unnumbered
617         CopyStyle            Caption:Standard
618         LabelString          unlabelled
619         LatexName            caption*
620         ResetArgs            1
621 End
622
623
624 InsetLayout Preview
625         LabelString           Preview
626         Decoration            minimalistic
627         MultiPar              true
628 End
629
630
631 InsetLayout Script
632         LatexType       command
633         MultiPar        false
634         ForcePlain      1
635         CustomPars      0
636         InToc           1
637         HTMLIsBlock     0
638 End
639
640
641 InsetLayout Script:superscript
642         CopyStyle       Script
643         LaTeXName       textsuperscript
644         HTMLTag         sup
645 End
646
647
648 InsetLayout Script:subscript
649         CopyStyle       Script
650         Requires        subscript
651         LaTeXName       textsubscript
652         HTMLTag         sub
653 End
654
655
656 InsetLayout PrintNomencl
657   HTMLTag h2
658 End
659
660 InsetLayout Tabular
661         HTMLStyle
662                 table {
663                         border-collapse: collapse;
664                         display: inline-block;
665                 }
666                 td {
667                         border: 1px solid black;
668                         padding: 0.5ex;
669                 }
670         EndHTMLStyle
671 End