]> git.lyx.org Git - lyx.git/blob - src/insets/InsetLayout.cpp
Add option to Argument to let it be inserted with a copy of the co-text.
[lyx.git] / src / insets / InsetLayout.cpp
1 // -*- C++ -*-
2 /**
3  * \file InsetLayout.cpp
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Martin Vermeer
8  * \author Richard Heck
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #include <config.h>
14
15 #include "InsetLayout.h"
16
17 #include "ColorSet.h"
18 #include "Layout.h"
19 #include "Lexer.h"
20 #include "TextClass.h"
21
22 #include "support/debug.h"
23 #include "support/lstrings.h"
24 #include "support/textutils.h"
25
26 #include <vector>
27
28 using std::string;
29 using std::set;
30 using std::vector;
31
32 using namespace lyx::support;
33
34 namespace lyx {
35
36 InsetLayout::InsetLayout() :
37         name_(from_ascii("undefined")), lyxtype_(STANDARD),
38         labelstring_(from_ascii("UNDEFINED")), contentaslabel_(false),
39         decoration_(DEFAULT), latextype_(NOLATEXTYPE), font_(inherit_font),
40         labelfont_(sane_font), bgcolor_(Color_error),
41         fixedwidthpreambleencoding_(false), htmlforcecss_ (false),
42         htmlisblock_(true), multipar_(true), custompars_(true),
43         forceplain_(false), passthru_(false), parbreakisnewline_(false),
44         freespacing_(false), keepempty_(false), forceltr_(false),
45         forceownlines_(false), needprotect_(false), intoc_(false),
46         spellcheck_(true), resetsfont_(false), display_(true),
47         forcelocalfontswitch_(false)
48 {
49         labelfont_.setColor(Color_error);
50 }
51
52
53 InsetLayout::InsetDecoration translateDecoration(std::string const & str)
54 {
55         if (compare_ascii_no_case(str, "classic") == 0)
56                 return InsetLayout::CLASSIC;
57         if (compare_ascii_no_case(str, "minimalistic") == 0)
58                 return InsetLayout::MINIMALISTIC;
59         if (compare_ascii_no_case(str, "conglomerate") == 0)
60                 return InsetLayout::CONGLOMERATE;
61         return InsetLayout::DEFAULT;
62 }
63
64 namespace {
65
66 InsetLayout::InsetLaTeXType translateLaTeXType(std::string const & str)
67 {
68         if (compare_ascii_no_case(str, "command") == 0)
69                 return InsetLayout::COMMAND;
70         if (compare_ascii_no_case(str, "environment") == 0)
71                 return InsetLayout::ENVIRONMENT;
72         if (compare_ascii_no_case(str, "none") == 0)
73                 return InsetLayout::NOLATEXTYPE;
74         return InsetLayout::ILT_ERROR;
75 }
76
77 } // namespace anon
78
79
80 bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
81 {
82         enum {
83                 IL_ARGUMENT,
84                 IL_BABELPREAMBLE,
85                 IL_BGCOLOR,
86                 IL_CONTENTASLABEL,
87                 IL_COPYSTYLE,
88                 IL_COUNTER,
89                 IL_CUSTOMPARS,
90                 IL_DECORATION,
91                 IL_DISPLAY,
92                 IL_FIXEDWIDTH_PREAMBLE_ENCODING,
93                 IL_FONT,
94                 IL_FORCE_LOCAL_FONT_SWITCH,
95                 IL_FORCELTR,
96                 IL_FORCEOWNLINES,
97                 IL_FORCEPLAIN,
98                 IL_FREESPACING,
99                 IL_HTMLTAG,
100                 IL_HTMLATTR,
101                 IL_HTMLFORCECSS,
102                 IL_HTMLINNERTAG,
103                 IL_HTMLINNERATTR,
104                 IL_HTMLISBLOCK,
105                 IL_HTMLLABEL,
106                 IL_HTMLSTYLE,
107                 IL_HTMLPREAMBLE,
108                 IL_INTOC,
109                 IL_LABELFONT,
110                 IL_LABELSTRING,
111                 IL_LANGPREAMBLE,
112                 IL_LATEXNAME,
113                 IL_LATEXPARAM,
114                 IL_LATEXTYPE,
115                 IL_LEFTDELIM,
116                 IL_LYXTYPE,
117                 IL_OBSOLETEDBY,
118                 IL_KEEPEMPTY,
119                 IL_MULTIPAR,
120                 IL_NEEDPROTECT,
121                 IL_PASSTHRU,
122                 IL_PASSTHRU_CHARS,
123                 IL_PARBREAKISNEWLINE,
124                 IL_PREAMBLE,
125                 IL_REQUIRES,
126                 IL_RIGHTDELIM,
127                 IL_REFPREFIX,
128                 IL_RESETARGS,
129                 IL_RESETSFONT,
130                 IL_SPELLCHECK,
131                 IL_END
132         };
133
134
135         LexerKeyword elementTags[] = {
136                 { "argument", IL_ARGUMENT },
137                 { "babelpreamble", IL_BABELPREAMBLE },
138                 { "bgcolor", IL_BGCOLOR },
139                 { "contentaslabel", IL_CONTENTASLABEL },
140                 { "copystyle", IL_COPYSTYLE },
141                 { "counter", IL_COUNTER},
142                 { "custompars", IL_CUSTOMPARS },
143                 { "decoration", IL_DECORATION },
144                 { "display", IL_DISPLAY },
145                 { "end", IL_END },
146                 { "fixedwidthpreambleencoding", IL_FIXEDWIDTH_PREAMBLE_ENCODING },
147                 { "font", IL_FONT },
148                 { "forcelocalfontswitch", IL_FORCE_LOCAL_FONT_SWITCH },
149                 { "forceltr", IL_FORCELTR },
150                 { "forceownlines", IL_FORCEOWNLINES },
151                 { "forceplain", IL_FORCEPLAIN },
152                 { "freespacing", IL_FREESPACING },
153                 { "htmlattr", IL_HTMLATTR },
154                 { "htmlforcecss", IL_HTMLFORCECSS },
155                 { "htmlinnerattr", IL_HTMLINNERATTR},
156                 { "htmlinnertag", IL_HTMLINNERTAG},
157                 { "htmlisblock", IL_HTMLISBLOCK},
158                 { "htmllabel", IL_HTMLLABEL },
159                 { "htmlpreamble", IL_HTMLPREAMBLE },
160                 { "htmlstyle", IL_HTMLSTYLE },
161                 { "htmltag", IL_HTMLTAG },
162                 { "intoc", IL_INTOC },
163                 { "keepempty", IL_KEEPEMPTY },
164                 { "labelfont", IL_LABELFONT },
165                 { "labelstring", IL_LABELSTRING },
166                 { "langpreamble", IL_LANGPREAMBLE },
167                 { "latexname", IL_LATEXNAME },
168                 { "latexparam", IL_LATEXPARAM },
169                 { "latextype", IL_LATEXTYPE },
170                 { "leftdelim", IL_LEFTDELIM },
171                 { "lyxtype", IL_LYXTYPE },
172                 { "multipar", IL_MULTIPAR },
173                 { "needprotect", IL_NEEDPROTECT },
174                 { "obsoletedby", IL_OBSOLETEDBY },
175                 { "parbreakisnewline", IL_PARBREAKISNEWLINE },
176                 { "passthru", IL_PASSTHRU },
177                 { "passthruchars", IL_PASSTHRU_CHARS },
178                 { "preamble", IL_PREAMBLE },
179                 { "refprefix", IL_REFPREFIX },
180                 { "requires", IL_REQUIRES },
181                 { "resetargs", IL_RESETARGS },
182                 { "resetsfont", IL_RESETSFONT },
183                 { "rightdelim", IL_RIGHTDELIM },
184                 { "spellcheck", IL_SPELLCHECK }
185         };
186
187         lex.pushTable(elementTags);
188
189         labelfont_ = inherit_font;
190         bgcolor_ = Color_none;
191         bool getout = false;
192         // whether we've read the CustomPars or ForcePlain tag
193         // for issuing a warning in case MultiPars comes later
194         bool readCustomOrPlain = false;
195
196         string tmp;
197         while (!getout && lex.isOK()) {
198                 int le = lex.lex();
199                 switch (le) {
200                 case Lexer::LEX_UNDEF:
201                         lex.printError("Unknown InsetLayout tag");
202                         continue;
203                 default:
204                         break;
205                 }
206                 switch (le) {
207                 // FIXME
208                 // Perhaps a more elegant way to deal with the next two would be the
209                 // way this sort of thing is handled in Layout::read(), namely, by
210                 // using the Lexer.
211                 case IL_LYXTYPE: {
212                         // make sure that we have the right sort of name.
213                         if (name_ != from_ascii("undefined")
214                             && name_.substr(0,5) != from_ascii("Flex:")) {
215                                 LYXERR0("Flex insets must have names of the form `Flex:<name>'.\n"
216                                         "This one has the name `" << to_utf8(name_) << "'\n"
217                                         "Ignoring LyXType declaration.");
218                                 break;
219                         }
220                         string lt;
221                         lex >> lt;
222                         lyxtype_ = translateLyXType(lt);
223                         if (lyxtype_  == NOLYXTYPE)
224                                 LYXERR0("Unknown LyXType `" << lt << "'.");
225                         if (lyxtype_ == CHARSTYLE)
226                                 multipar_ = false;
227                         break;
228                 }
229                 case IL_LATEXTYPE:  {
230                         string lt;
231                         lex >> lt;
232                         latextype_ = translateLaTeXType(lt);
233                         if (latextype_  == ILT_ERROR)
234                                 LYXERR0("Unknown LaTeXType `" << lt << "'.");
235                         break;
236                 }
237                 case IL_LABELSTRING:
238                         lex >> labelstring_;
239                         break;
240                 case IL_DECORATION:
241                         lex >> tmp;
242                         decoration_ = translateDecoration(tmp);
243                         break;
244                 case IL_LATEXNAME:
245                         lex >> latexname_;
246                         break;
247                 case IL_LATEXPARAM:
248                         lex >> tmp;
249                         latexparam_ = subst(tmp, "&quot;", "\"");
250                         break;
251                 case IL_LEFTDELIM:
252                         lex >> leftdelim_;
253                         leftdelim_ = subst(leftdelim_, from_ascii("<br/>"),
254                                                     from_ascii("\n"));
255                         break;
256                 case IL_FIXEDWIDTH_PREAMBLE_ENCODING:
257                         lex >> fixedwidthpreambleencoding_;
258                         break;
259                 case IL_FORCE_LOCAL_FONT_SWITCH:
260                         lex >> forcelocalfontswitch_;
261                         break;
262                 case IL_RIGHTDELIM:
263                         lex >> rightdelim_;
264                         rightdelim_ = subst(rightdelim_, from_ascii("<br/>"),
265                                                      from_ascii("\n"));
266                         break;
267                 case IL_LABELFONT:
268                         labelfont_ = lyxRead(lex, inherit_font);
269                         break;
270                 case IL_FORCELTR:
271                         lex >> forceltr_;
272                         break;
273                 case IL_FORCEOWNLINES:
274                         lex >> forceownlines_;
275                         break;
276                 case IL_INTOC:
277                         lex >> intoc_;
278                         break;
279                 case IL_MULTIPAR:
280                         lex >> multipar_;
281                         // the defaults for these depend upon multipar_
282                         if (readCustomOrPlain)
283                                 LYXERR0("Warning: Read MultiPar after CustomPars or ForcePlain. "
284                                         "Previous value may be overwritten!");
285                         readCustomOrPlain = false;
286                         custompars_ = multipar_;
287                         forceplain_ = !multipar_;
288                         break;
289                 case IL_COUNTER:
290                         lex >> counter_;
291                         break;
292                 case IL_CUSTOMPARS:
293                         lex >> custompars_;
294                         readCustomOrPlain = true;
295                         break;
296                 case IL_FORCEPLAIN:
297                         lex >> forceplain_;
298                         readCustomOrPlain = true;
299                         break;
300                 case IL_PASSTHRU:
301                         lex >> passthru_;
302                         break;
303                 case IL_PASSTHRU_CHARS:
304                         lex >> passthru_chars_;
305                         break;
306                 case IL_PARBREAKISNEWLINE:
307                         lex >> parbreakisnewline_;
308                         break;
309                 case IL_KEEPEMPTY:
310                         lex >> keepempty_;
311                         break;
312                 case IL_FREESPACING:
313                         lex >> freespacing_;
314                         break;
315                 case IL_NEEDPROTECT:
316                         lex >> needprotect_;
317                         break;
318                 case IL_CONTENTASLABEL:
319                         lex >> contentaslabel_;
320                         break;
321                 case IL_COPYSTYLE: {
322                         // initialize with a known style
323                         docstring style;
324                         lex >> style;
325                         style = subst(style, '_', ' ');
326
327                         // We don't want to apply the algorithm in DocumentClass::insetLayout()
328                         // here. So we do it the long way.
329                         TextClass::InsetLayouts::const_iterator it =
330                                         tclass.insetLayouts().find(style);
331                         if (it != tclass.insetLayouts().end()) {
332                                 docstring const tmpname = name_;
333                                 this->operator=(it->second);
334                                 name_ = tmpname;
335                         } else {
336                                 LYXERR0("Cannot copy unknown InsetLayout `"
337                                         << style << "' to InsetLayout `"
338                                         << name() << "'\n"
339                                         << "All InsetLayouts so far:");
340                                 TextClass::InsetLayouts::const_iterator lit =
341                                                 tclass.insetLayouts().begin();
342                                 TextClass::InsetLayouts::const_iterator len =
343                                                 tclass.insetLayouts().end();
344                                 for (; lit != len; ++lit)
345                                         lyxerr << lit->second.name() << "\n";
346                         }
347                         break;
348                 }
349                 case IL_OBSOLETEDBY: {
350                         docstring style;
351                         lex >> style;
352                         style = subst(style, '_', ' ');
353
354                         // We don't want to apply the algorithm in DocumentClass::insetLayout()
355                         // here. So we do it the long way.
356                         TextClass::InsetLayouts::const_iterator it =
357                                         tclass.insetLayouts().find(style);
358                         if (it != tclass.insetLayouts().end()) {
359                                 docstring const tmpname = name_;
360                                 this->operator=(it->second);
361                                 name_ = tmpname;
362                                 if (obsoleted_by().empty())
363                                         obsoleted_by_ = style;
364                         } else {
365                                 LYXERR0("Cannot replace InsetLayout `"
366                                         << name()
367                                         << "' with unknown InsetLayout `"
368                                         << style << "'\n"
369                                         << "All InsetLayouts so far:");
370                                 TextClass::InsetLayouts::const_iterator lit =
371                                                 tclass.insetLayouts().begin();
372                                 TextClass::InsetLayouts::const_iterator len =
373                                                 tclass.insetLayouts().end();
374                                 for (; lit != len; ++lit)
375                                         lyxerr << lit->second.name() << "\n";
376                         }
377                         break;
378                 }
379
380                 case IL_FONT: {
381                         font_ = lyxRead(lex, inherit_font);
382                         // If you want to define labelfont, you need to do so after
383                         // font is defined.
384                         labelfont_ = font_;
385                         break;
386                 }
387                 case IL_RESETARGS:
388                         bool reset;
389                         lex >> reset;
390                         if (reset) {
391                                 latexargs_.clear();
392                                 postcommandargs_.clear();
393                         }
394                         break;
395                 case IL_ARGUMENT:
396                         readArgument(lex);
397                         break;
398                 case IL_BGCOLOR:
399                         lex >> tmp;
400                         bgcolor_ = lcolor.getFromLyXName(tmp);
401                         break;
402                 case IL_PREAMBLE:
403                         preamble_ = from_utf8(lex.getLongString("EndPreamble"));
404                         break;
405                 case IL_BABELPREAMBLE:
406                         babelpreamble_ = from_utf8(lex.getLongString("EndBabelPreamble"));
407                         break;
408                 case IL_LANGPREAMBLE:
409                         langpreamble_ = from_utf8(lex.getLongString("EndLangPreamble"));
410                         break;
411                 case IL_REFPREFIX:
412                         lex >> refprefix_;
413                         break;
414                 case IL_HTMLTAG:
415                         lex >> htmltag_;
416                         break;
417                 case IL_HTMLATTR:
418                         lex >> htmlattr_;
419                         break;
420                 case IL_HTMLFORCECSS:
421                         lex >> htmlforcecss_;
422                         break;
423                 case IL_HTMLINNERTAG:
424                         lex >> htmlinnertag_;
425                         break;
426                 case IL_HTMLINNERATTR:
427                         lex >> htmlinnerattr_;
428                         break;
429                 case IL_HTMLLABEL:
430                         lex >> htmllabel_;
431                         break;
432                 case IL_HTMLISBLOCK:
433                         lex >> htmlisblock_;
434                         break;
435                 case IL_HTMLSTYLE:
436                         htmlstyle_ = from_utf8(lex.getLongString("EndHTMLStyle"));
437                         break;
438                 case IL_HTMLPREAMBLE:
439                         htmlpreamble_ = from_utf8(lex.getLongString("EndPreamble"));
440                         break;
441                 case IL_REQUIRES: {
442                         lex.eatLine();
443                         vector<string> const req
444                                 = getVectorFromString(lex.getString());
445                         requires_.insert(req.begin(), req.end());
446                         break;
447                 }
448                 case IL_SPELLCHECK:
449                         lex >> spellcheck_;
450                         break;
451                 case IL_RESETSFONT:
452                         lex >> resetsfont_;
453                         break;
454                 case IL_DISPLAY:
455                         lex >> display_;
456                         break;
457                 case IL_END:
458                         getout = true;
459                         break;
460                 }
461         }
462
463         // Here add element to list if getout == true
464         if (!getout)
465                 return false;
466
467         // The label font is generally used as-is without
468         // any realization against a given context.
469         labelfont_.realize(sane_font);
470
471         lex.popTable();
472         return true;
473 }
474
475
476 InsetLayout::InsetLyXType translateLyXType(std::string const & str)
477 {
478         if (compare_ascii_no_case(str, "charstyle") == 0)
479                 return InsetLayout::CHARSTYLE;
480         if (compare_ascii_no_case(str, "custom") == 0)
481                 return InsetLayout::CUSTOM;
482         if (compare_ascii_no_case(str, "element") == 0)
483                 return InsetLayout::ELEMENT;
484         if (compare_ascii_no_case(str, "end") == 0)
485                 return InsetLayout::END;
486         if (compare_ascii_no_case(str, "standard") == 0)
487                 return InsetLayout::STANDARD;
488         return InsetLayout::NOLYXTYPE;
489 }
490
491
492 string const & InsetLayout::htmltag() const
493 {
494         if (htmltag_.empty())
495                 htmltag_ = multipar_ ? "div" : "span";
496         return htmltag_;
497 }
498
499
500 string const & InsetLayout::htmlattr() const
501 {
502         if (htmlattr_.empty())
503                 htmlattr_ = "class=\"" + defaultCSSClass() + "\"";
504         return htmlattr_;
505 }
506
507
508 string const & InsetLayout::htmlinnerattr() const
509 {
510         if (htmlinnerattr_.empty())
511                 htmlinnerattr_ = "class=\"" + defaultCSSClass() + "_inner\"";
512         return htmlinnerattr_;
513 }
514
515
516 string InsetLayout::defaultCSSClass() const
517 {
518         if (!defaultcssclass_.empty())
519                 return defaultcssclass_;
520         string d;
521         string n = to_utf8(name());
522         string::const_iterator it = n.begin();
523         string::const_iterator en = n.end();
524         for (; it != en; ++it) {
525                 if (!isAlphaASCII(*it))
526                         d += "_";
527                 else if (isLower(*it))
528                         d += *it;
529                 else
530                         d += lowercase(*it);
531         }
532         // are there other characters we need to remove?
533         defaultcssclass_ = d;
534         return defaultcssclass_;
535 }
536
537
538 void InsetLayout::makeDefaultCSS() const
539 {
540         if (!htmldefaultstyle_.empty())
541                 return;
542         docstring const mainfontCSS = font_.asCSS();
543         if (!mainfontCSS.empty())
544                 htmldefaultstyle_ =
545                                 from_ascii(htmltag() + "." + defaultCSSClass() + " {\n") +
546                                 mainfontCSS + from_ascii("\n}\n");
547 }
548
549
550 docstring InsetLayout::htmlstyle() const
551 {
552         if (!htmlstyle_.empty() && !htmlforcecss_)
553                 return htmlstyle_;
554         if (htmldefaultstyle_.empty())
555                 makeDefaultCSS();
556         docstring retval = htmldefaultstyle_;
557         if (!htmlstyle_.empty())
558                 retval += '\n' + htmlstyle_ + '\n';
559         return retval;
560 }
561
562 void InsetLayout::readArgument(Lexer & lex)
563 {
564         Layout::latexarg arg;
565         arg.mandatory = false;
566         arg.autoinsert = false;
567         arg.insertcotext = false;
568         bool error = false;
569         bool finished = false;
570         arg.font = inherit_font;
571         arg.labelfont = inherit_font;
572         string nr;
573         lex >> nr;
574         bool const postcmd = prefixIs(nr, "post:");
575         while (!finished && lex.isOK() && !error) {
576                 lex.next();
577                 string const tok = ascii_lowercase(lex.getString());
578
579                 if (tok.empty()) {
580                         continue;
581                 } else if (tok == "endargument") {
582                         finished = true;
583                 } else if (tok == "labelstring") {
584                         lex.next();
585                         arg.labelstring = lex.getDocString();
586                 } else if (tok == "menustring") {
587                         lex.next();
588                         arg.menustring = lex.getDocString();
589                 } else if (tok == "mandatory") {
590                         lex.next();
591                         arg.mandatory = lex.getBool();
592                 } else if (tok == "autoinsert") {
593                         lex.next();
594                         arg.autoinsert = lex.getBool();
595                 } else if (tok == "insertcotext") {
596                         lex.next();
597                         arg.insertcotext = lex.getBool();
598                 } else if (tok == "leftdelim") {
599                         lex.next();
600                         arg.ldelim = lex.getDocString();
601                         arg.ldelim = subst(arg.ldelim,
602                                                     from_ascii("<br/>"), from_ascii("\n"));
603                 } else if (tok == "rightdelim") {
604                         lex.next();
605                         arg.rdelim = lex.getDocString();
606                         arg.rdelim = subst(arg.rdelim,
607                                                     from_ascii("<br/>"), from_ascii("\n"));
608                 } else if (tok == "defaultarg") {
609                         lex.next();
610                         arg.defaultarg = lex.getDocString();
611                 } else if (tok == "presetarg") {
612                         lex.next();
613                         arg.presetarg = lex.getDocString();
614                 } else if (tok == "tooltip") {
615                         lex.next();
616                         arg.tooltip = lex.getDocString();
617                 } else if (tok == "requires") {
618                         lex.next();
619                         arg.requires = lex.getString();
620                 } else if (tok == "decoration") {
621                         lex.next();
622                         arg.decoration = lex.getString();
623                 } else if (tok == "font") {
624                         arg.font = lyxRead(lex, arg.font);
625                 } else if (tok == "labelfont") {
626                         arg.labelfont = lyxRead(lex, arg.labelfont);
627                 } else if (tok == "passthruchars") {
628                         lex.next();
629                         arg.pass_thru_chars = lex.getDocString();
630                 } else {
631                         lex.printError("Unknown tag");
632                         error = true;
633                 }
634         }
635         if (arg.labelstring.empty())
636                 LYXERR0("Incomplete Argument definition!");
637         else if (postcmd)
638                 postcommandargs_[nr] = arg;
639         else
640                 latexargs_[nr] = arg;
641 }
642
643
644 Layout::LaTeXArgMap InsetLayout::args() const
645 {
646         Layout::LaTeXArgMap args = latexargs_;
647         if (!postcommandargs_.empty())
648                 args.insert(postcommandargs_.begin(), postcommandargs_.end());
649         return args;
650 }
651
652
653 unsigned int InsetLayout::optArgs() const
654 {
655         unsigned int nr = 0;
656         Layout::LaTeXArgMap const args = InsetLayout::args();
657         Layout::LaTeXArgMap::const_iterator it = args.begin();
658         for (; it != args.end(); ++it) {
659                 if (!(*it).second.mandatory)
660                         ++nr;
661         }
662         return nr;
663 }
664
665
666 unsigned int InsetLayout::requiredArgs() const
667 {
668         unsigned int nr = 0;
669         Layout::LaTeXArgMap const args = InsetLayout::args();
670         Layout::LaTeXArgMap::const_iterator it = args.begin();
671         for (; it != args.end(); ++it) {
672                 if ((*it).second.mandatory)
673                         ++nr;
674         }
675         return nr;
676 }
677
678
679 } //namespace lyx