#LyX 2.4 created this file. For more info see https://www.lyx.org/
-\lyxformat 567
+\lyxformat 569
\begin_document
\begin_header
\save_transient_properties true
\papercolumns 1
\papersides 2
\paperpagestyle headings
+\tablestyle default
\tracking_changes true
\output_changes false
\html_math_output 0
\end_inset
for details on paragraph styles.
+\change_inserted -712698321 1553617804
+
+\end_layout
+
+\begin_layout Description
+
+\change_inserted -712698321 1553617862
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1553617809
+TableStyle
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1553617805
+<name>
+\end_layout
+
+\end_inset
+
+] defines the default table style that is used when inserting a table.
+ The following styles are available:
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+
+\change_inserted -712698321 1553617929
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1553617920
+Formal
+\change_unchanged
+
+\end_layout
+
+\end_inset
+
+: formal (
+\begin_inset Quotes eld
+\end_inset
+
+booktabs
+\begin_inset Quotes erd
+\end_inset
+
+) style with horizontal lines only and a bold top and bottom line.
+\end_layout
+
+\begin_layout Itemize
+
+\change_inserted -712698321 1553618031
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1553618006
+Simple_Grid
+\end_layout
+
+\end_inset
+
+: Simple table lines.
+\end_layout
+
+\begin_layout Itemize
+
+\change_inserted -712698321 1553618309
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1553618031
+Grid_with_Head
+\end_layout
+
+\end_inset
+
+: Like
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1553618043
+Simple_Grid
\end_layout
+\end_inset
+
+, but with the header column offset with a second horizontal line.
+ This is also the default style of \SpecialChar LyX
+.
+\end_layout
+
+\begin_layout Itemize
+
+\change_inserted -712698321 1553618280
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1553618261
+No_Borders
+\end_layout
+
+\end_inset
+
+: Table without lines.
+\change_unchanged
+
+\end_layout
+
+\end_deeper
\begin_layout Description
\begin_inset Flex Code
status collapsed
#LyX 2.4 created this file. For more info see https://www.lyx.org/
-\lyxformat 564
+\lyxformat 569
\begin_document
\begin_header
\save_transient_properties true
\papercolumns 1
\papersides 2
\paperpagestyle headings
+\tablestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\begin_inset Flex Code
status collapsed
+\begin_layout Plain Layout
+TableStyle
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+<name>
+\end_layout
+
+\end_inset
+
+] legt den Standardstil fest, der für eingefügte Tabellen verwendet wird.
+ Die folgenden Stile stehen zur Verfügung:
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+Formal
+\end_layout
+
+\end_inset
+
+: formaler Stil (
+\begin_inset Quotes eld
+\end_inset
+
+booktabs
+\begin_inset Quotes erd
+\end_inset
+
+) nur mit horizontalen Linien und fetter Linie am Kopf und Fuß der Tabelle.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+Simple_Grid
+\end_layout
+
+\end_inset
+
+: Einfache Tabellenlinien.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+Grid_with_Head
+\end_layout
+
+\end_inset
+
+: Wie
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+Simple_Grid
+\end_layout
+
+\end_inset
+
+, aber mit einer zusätzlichen horizontalen Linie unter der Kopfzeile.
+ Das ist auch der Standard-Tabellenstil von \SpecialChar LyX
+.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+No_Borders
+\end_layout
+
+\end_inset
+
+: Tabelle ohne Rahmenlinien.
+\end_layout
+
+\end_deeper
+\begin_layout Description
+\begin_inset Flex Code
+status collapsed
+
\begin_layout Plain Layout
TitleLatexName
\end_layout
# This script will update a .layout file to current format
# The latest layout format is also defined in src/TextClass.cpp
-currentFormat = 71
+currentFormat = 72
# Incremented to format 4, 6 April 2007, lasgouttes
# Incremented to format 71, 12 March 2019 by spitz
# New [Inset]Layout tag NeedMBoxProtect
+# Incremented to format 72, 26 March 2019 by spitz
+# New TextClass tag TableStyle
+
# Do not forget to document format change in Customization
# Manual (section "Declaring a new text class").
i += 1
continue
- if format >= 65 and format <= 70:
+ if format >= 65 and format <= 71:
# nothing to do.
i += 1
continue
sides = tclass.sides();
columns = tclass.columns();
pagestyle = tclass.pagestyle();
+ tablestyle = tclass.tablestyle();
use_default_options = true;
// Only if class has a ToC hierarchy
if (tclass.hasTocLevels()) {
return sides == tclass.sides()
&& columns == tclass.columns()
&& pagestyle == tclass.pagestyle()
+ && tablestyle == tclass.tablestyle()
&& use_default_options
&& secnumdepth == tclass.secnumdepth()
&& tocdepth == tclass.tocdepth();
}
case LFUN_TABULAR_INSERT: {
- if (cur.buffer()->masterParams().tablestyle != "default") {
- FuncRequest fr(LFUN_TABULAR_STYLE_INSERT,
- cur.buffer()->masterParams().tablestyle + " "
- + to_ascii(cmd.argument()));
- lyx::dispatch(fr);
+ // if there were no arguments, just open the dialog
+ if (cmd.argument().empty()) {
+ bv->showDialog("tabularcreate");
break;
+ } else if (cur.buffer()->masterParams().tablestyle != "default"
+ || bv->buffer().params().documentClass().tablestyle() != "default") {
+ string tabstyle = cur.buffer()->masterParams().tablestyle;
+ if (tabstyle == "default")
+ tabstyle = bv->buffer().params().documentClass().tablestyle();
+ if (!libFileSearch("tabletemplates", tabstyle + ".lyx").empty()) {
+ FuncRequest fr(LFUN_TABULAR_STYLE_INSERT,
+ tabstyle + " " + to_ascii(cmd.argument()));
+ lyx::dispatch(fr);
+ break;
+ } else
+ // Unknown style. Report and fall back to default.
+ cur.errorMessage(from_utf8(N_("Table Style ")) + from_utf8(tabstyle) +
+ from_utf8(N_(" not known")));
+
}
- // if there were no arguments, just open the dialog
if (doInsertInset(cur, this, cmd, false, true))
cur.posForward();
- else
- bv->showDialog("tabularcreate");
-
break;
}
// You should also run the development/tools/updatelayouts.py script,
// to update the format of all of our layout files.
//
-int const LAYOUT_FORMAT = 71; // spitz: NeedMBoxProtect
+int const LAYOUT_FORMAT = 72; // spitz: TableStyle
// Layout format for the current lyx file format. Controls which format is
: loaded_(false), tex_class_avail_(false),
opt_enginetype_("authoryear|numerical"), opt_fontsize_("10|11|12"),
opt_pagestyle_("empty|plain|headings|fancy"), pagestyle_("default"),
- columns_(1), sides_(OneSide), secnumdepth_(3), tocdepth_(3),
- outputType_(LATEX), outputFormat_("latex"), has_output_format_(false),
- defaultfont_(sane_font),
+ tablestyle_("default"), columns_(1), sides_(OneSide), secnumdepth_(3),
+ tocdepth_(3), outputType_(LATEX), outputFormat_("latex"),
+ has_output_format_(false), defaultfont_(sane_font),
titletype_(TITLE_COMMAND_AFTER), titlename_("maketitle"),
min_toclevel_(0), max_toclevel_(0), maxcitenames_(2),
cite_full_author_list_(true)
TC_MAXCITENAMES,
TC_DEFAULTBIBLIO,
TC_FULLAUTHORLIST,
- TC_OUTLINERNAME
+ TC_OUTLINERNAME,
+ TC_TABLESTYLE
};
{ "secnumdepth", TC_SECNUMDEPTH },
{ "sides", TC_SIDES },
{ "style", TC_STYLE },
+ { "tablestyle", TC_TABLESTYLE },
{ "titlelatexname", TC_TITLELATEXNAME },
{ "titlelatextype", TC_TITLELATEXTYPE },
{ "tocdepth", TC_TOCDEPTH }
case TC_OUTLINERNAME:
error = !readOutlinerName(lexrc);
break;
+
+ case TC_TABLESTYLE:
+ lexrc.next();
+ tablestyle_ = rtrim(lexrc.getString());
+ break;
} // end of switch
}
///
std::string pagestyle_;
///
+ std::string tablestyle_;
+ ///
std::string class_header_;
///
docstring defaultlayout_;
///
std::string const & pagestyle() const { return pagestyle_; }
///
+ std::string const & tablestyle() const { return tablestyle_; }
+ ///
docstring const & preamble() const { return preamble_; }
///
docstring const & htmlpreamble() const { return htmlpreamble_; }