mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-23 00:38:01 +00:00
Import optional argument of tabular (vertical alignment)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40147 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
eb882b2666
commit
a3360ac3c6
@ -36,7 +36,6 @@ Format LaTeX feature LyX feature
|
|||||||
332 ? InsetGraphics groupId
|
332 ? InsetGraphics groupId
|
||||||
336 ? \font_cjk
|
336 ? \font_cjk
|
||||||
343 ? \use_default_options
|
343 ? \use_default_options
|
||||||
347 tabular valign InsetTabular
|
|
||||||
350 ? \default_output_format
|
350 ? \default_output_format
|
||||||
353 \printsubindex InsetIndex
|
353 \printsubindex InsetIndex
|
||||||
354 \printindex*, \printsubindex* InsetIndex
|
354 \printindex*, \printsubindex* InsetIndex
|
||||||
|
@ -773,14 +773,20 @@ void handle_hline_below(RowInfo & ri, vector<CellInfo> & ci)
|
|||||||
void handle_tabular(Parser & p, ostream & os, bool is_long_tabular,
|
void handle_tabular(Parser & p, ostream & os, bool is_long_tabular,
|
||||||
Context & context)
|
Context & context)
|
||||||
{
|
{
|
||||||
|
string tabularvalignment("middle");
|
||||||
string posopts = p.getOpt();
|
string posopts = p.getOpt();
|
||||||
if (!posopts.empty()) {
|
if (!posopts.empty()) {
|
||||||
// FIXME: Convert this to ERT
|
// FIXME: Convert this to ERT
|
||||||
if (is_long_tabular)
|
if (is_long_tabular)
|
||||||
cerr << "horizontal longtable";
|
cerr << "horizontal longtable positioning '"
|
||||||
|
<< posopts << "' ignored\n";
|
||||||
|
else if (posopts == "[t]")
|
||||||
|
tabularvalignment = "top";
|
||||||
|
else if (posopts == "[b]")
|
||||||
|
tabularvalignment = "bottom";
|
||||||
else
|
else
|
||||||
cerr << "vertical tabular";
|
cerr << "vertical tabular positioning '"
|
||||||
cerr << " positioning '" << posopts << "' ignored\n";
|
<< posopts << "' ignored\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
vector<ColInfo> colinfo;
|
vector<ColInfo> colinfo;
|
||||||
@ -1106,8 +1112,10 @@ void handle_tabular(Parser & p, ostream & os, bool is_long_tabular,
|
|||||||
<< "\" columns=\"" << colinfo.size() << "\">\n";
|
<< "\" columns=\"" << colinfo.size() << "\">\n";
|
||||||
os << "<features"
|
os << "<features"
|
||||||
<< write_attribute("rotate", false)
|
<< write_attribute("rotate", false)
|
||||||
<< write_attribute("islongtable", is_long_tabular)
|
<< write_attribute("islongtable", is_long_tabular);
|
||||||
<< ">\n";
|
if (!is_long_tabular)
|
||||||
|
os << write_attribute("tabularvalignment", tabularvalignment);
|
||||||
|
os << ">\n";
|
||||||
|
|
||||||
//cerr << "// after header\n";
|
//cerr << "// after header\n";
|
||||||
for (size_t col = 0; col < colinfo.size(); ++col) {
|
for (size_t col = 0; col < colinfo.size(); ++col) {
|
||||||
|
@ -109,7 +109,7 @@ some parts remain
|
|||||||
\caption{rotated table, spanning all columns}
|
\caption{rotated table, spanning all columns}
|
||||||
|
|
||||||
\centering{}%
|
\centering{}%
|
||||||
\begin{tabular}{|c|c|}
|
\begin{tabular}[b]{|c|c|}
|
||||||
\hline
|
\hline
|
||||||
a & b\tabularnewline
|
a & b\tabularnewline
|
||||||
\hline
|
\hline
|
||||||
|
Loading…
x
Reference in New Issue
Block a user